From 2ae8af12d65f0fa32ceb18286f7896102082d034 Mon Sep 17 00:00:00 2001 From: Phil Elsasser Date: Mon, 15 Oct 2018 20:41:00 -0600 Subject: [PATCH 1/4] updated to latest version of marketprotocol@1.4.0 --- package-lock.json | 537 ++++++++++++++++++++++++++++++++++++++++++++-- package.json | 2 +- 2 files changed, 516 insertions(+), 23 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2de1502..1ab99b5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,15 +1,16 @@ { "name": "@marketprotocol/abis", - "version": "0.0.3", + "version": "0.0.4", "lockfileVersion": 1, "requires": true, "dependencies": { "@marketprotocol/marketprotocol": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@marketprotocol/marketprotocol/-/marketprotocol-1.3.1.tgz", - "integrity": "sha512-gxnEFyew7IISXdTvVcSuCM6p2exauOJ5q+TWk1/wuw0wFSB0kWxo5DIwuqqaUkOL7+74JVN8fJ4DU6a5rIL5qg==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@marketprotocol/marketprotocol/-/marketprotocol-1.4.0.tgz", + "integrity": "sha512-TeCFIXDUvVyIXUQ+qIsCxbpjMNdPrRGjGiIMXM3mPDgQH0qvOlBg0I5fJP8qL4NGmokUKhhFLcCUDDTnvid+IA==", "dev": true, "requires": { + "chainlink": "github:smartcontractkit/chainlink#b395d572aa34374461e99327e048405c56a575c3", "openzeppelin-solidity": "1.9.0", "truffle": "4.1.13" } @@ -20,6 +21,12 @@ "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", "dev": true }, + "asap": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", + "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=", + "dev": true + }, "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", @@ -48,12 +55,92 @@ "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", "dev": true }, + "camel-case": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-3.0.0.tgz", + "integrity": "sha1-yjw2iKTpzzpM2nd9xNy8cTJJz3M=", + "dev": true, + "requires": { + "no-case": "2.3.2", + "upper-case": "1.1.3" + } + }, "camelcase": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", "dev": true }, + "cbor": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/cbor/-/cbor-4.1.1.tgz", + "integrity": "sha512-x9Pc1gT3JxUEZTOA9YdRdpg8hohBEFPAc26c85PlGYvzoc77PXr1lvfBKmBPFcf7eYsOs0hWRWWmfqJozrvDnw==", + "dev": true, + "requires": { + "bignumber.js": "7.2.1", + "commander": "2.19.0", + "json-text-sequence": "0.1.1", + "nofilter": "0.0.3" + }, + "dependencies": { + "bignumber.js": { + "version": "7.2.1", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-7.2.1.tgz", + "integrity": "sha512-S4XzBk5sMB+Rcb/LNcpzXr57VRTxgAvaAEDAl1AwRx27j00hT84O6OkteE7u8UB3NuaaygCRrEpqox4uDOrbdQ==", + "dev": true + }, + "commander": { + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.19.0.tgz", + "integrity": "sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg==", + "dev": true + } + } + }, + "chainlink": { + "version": "github:smartcontractkit/chainlink#b395d572aa34374461e99327e048405c56a575c3", + "dev": true, + "requires": { + "change-case": "3.0.2", + "formik": "1.3.1", + "openzeppelin-solidity": "1.12.0", + "solidity-cborutils": "github:smartcontractkit/solidity-cborutils#7c5e4491f1f59aea65582728bf8d9ae0df6e366d" + }, + "dependencies": { + "openzeppelin-solidity": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/openzeppelin-solidity/-/openzeppelin-solidity-1.12.0.tgz", + "integrity": "sha512-WlorzMXIIurugiSdw121RVD5qA3EfSI7GybTn+/Du0mPNgairjt29NpVTAaH8eLjAeAwlw46y7uQKy0NYem/gA==", + "dev": true + } + } + }, + "change-case": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/change-case/-/change-case-3.0.2.tgz", + "integrity": "sha512-Mww+SLF6MZ0U6kdg11algyKd5BARbyM4TbFBepwowYSR5ClfQGCGtxNXgykpN0uF/bstWeaGDT4JWaDh8zWAHA==", + "dev": true, + "requires": { + "camel-case": "3.0.0", + "constant-case": "2.0.0", + "dot-case": "2.1.1", + "header-case": "1.0.1", + "is-lower-case": "1.1.3", + "is-upper-case": "1.1.2", + "lower-case": "1.1.4", + "lower-case-first": "1.0.2", + "no-case": "2.3.2", + "param-case": "2.1.1", + "pascal-case": "2.0.1", + "path-case": "2.1.1", + "sentence-case": "2.1.1", + "snake-case": "2.1.0", + "swap-case": "1.1.2", + "title-case": "2.1.1", + "upper-case": "1.1.3", + "upper-case-first": "1.1.2" + } + }, "cliui": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", @@ -83,6 +170,32 @@ "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "dev": true }, + "constant-case": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/constant-case/-/constant-case-2.0.0.tgz", + "integrity": "sha1-QXV2TTidP6nI7NKRhu1gBSQ7akY=", + "dev": true, + "requires": { + "snake-case": "2.1.0", + "upper-case": "1.1.3" + } + }, + "core-js": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-1.2.7.tgz", + "integrity": "sha1-ZSKUwUZR2yj6k70tX/KYOk8IxjY=", + "dev": true + }, + "create-react-context": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/create-react-context/-/create-react-context-0.2.3.tgz", + "integrity": "sha512-CQBmD0+QGgTaxDL3OX1IDXYqjkp2It4RIbcb99jS6AEg27Ga+a9G3JtK6SIu0HBwPLZlmwt9F7UwWA4Bn92Rag==", + "dev": true, + "requires": { + "fbjs": "0.8.17", + "gud": "1.0.0" + } + }, "debug": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", @@ -98,12 +211,42 @@ "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", "dev": true }, + "deepmerge": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-2.2.1.tgz", + "integrity": "sha512-R9hc1Xa/NOBi9WRVUWg19rl1UB7Tt4kuPd+thNJgFZoxXsTz7ncaPaeIm+40oSGuP33DfMb4sZt1QIGiJzC4EA==", + "dev": true + }, + "delimit-stream": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/delimit-stream/-/delimit-stream-0.1.0.tgz", + "integrity": "sha1-m4MZR3wOX4rrPONXrjBfwl6hzSs=", + "dev": true + }, "diff": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/diff/-/diff-3.3.1.tgz", "integrity": "sha512-MKPHZDMB0o6yHyDryUOScqZibp914ksXwAMYMTHj6KO8UeKsRYNJD3oNCKjTqZon+V488P7N/HzXF8t7ZR95ww==", "dev": true }, + "dot-case": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/dot-case/-/dot-case-2.1.1.tgz", + "integrity": "sha1-NNzzf1Co6TwrO8qLt/uRVcfaO+4=", + "dev": true, + "requires": { + "no-case": "2.3.2" + } + }, + "encoding": { + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz", + "integrity": "sha1-U4tm8+5izRq1HsMjgp0flIDHS+s=", + "dev": true, + "requires": { + "iconv-lite": "0.4.24" + } + }, "error-ex": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", @@ -119,6 +262,21 @@ "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", "dev": true }, + "fbjs": { + "version": "0.8.17", + "resolved": "https://registry.npmjs.org/fbjs/-/fbjs-0.8.17.tgz", + "integrity": "sha1-xNWY6taUkRJlPWWIsBpc3Nn5D90=", + "dev": true, + "requires": { + "core-js": "1.2.7", + "isomorphic-fetch": "2.2.1", + "loose-envify": "1.4.0", + "object-assign": "4.1.1", + "promise": "7.3.1", + "setimmediate": "1.0.5", + "ua-parser-js": "0.7.18" + } + }, "find-up": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", @@ -129,6 +287,23 @@ "pinkie-promise": "2.0.1" } }, + "formik": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/formik/-/formik-1.3.1.tgz", + "integrity": "sha512-cOTpwP4vy8bj7HhEGC2IWFFhsztBlZOJoTRgGa64NxcM30rV15ub5nTliQA3Vs8vqWSlGEc6k67SR8YZIV7pew==", + "dev": true, + "requires": { + "create-react-context": "0.2.3", + "deepmerge": "2.2.1", + "hoist-non-react-statics": "2.5.5", + "lodash.clonedeep": "4.5.0", + "lodash.topath": "4.5.2", + "prop-types": "15.6.2", + "react-fast-compare": "1.0.0", + "tslib": "1.9.3", + "warning": "3.0.0" + } + }, "fs-extra": { "version": "0.30.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.30.0.tgz", @@ -155,9 +330,9 @@ "dev": true }, "glob": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", "dev": true, "requires": { "fs.realpath": "1.0.0", @@ -180,6 +355,12 @@ "integrity": "sha512-hKlsbA5Vu3xsh1Cg3J7jSmX/WaW6A5oBeqzM88oNbCRQFz+zUaXm6yxS4RVytp1scBoJzSYl4YAEOQIt6O8V1Q==", "dev": true }, + "gud": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/gud/-/gud-1.0.0.tgz", + "integrity": "sha512-zGEOVKFM5sVPPrYs7J5/hYEw2Pof8KCyOwyhG8sAF26mCAeUFAcYPu1mwB7hhpIP29zOIBaDqwuHdLp0jvZXjw==", + "dev": true + }, "has-flag": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", @@ -192,12 +373,37 @@ "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=", "dev": true }, + "header-case": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/header-case/-/header-case-1.0.1.tgz", + "integrity": "sha1-lTWXMZfBRLCWE81l0xfvGZY70C0=", + "dev": true, + "requires": { + "no-case": "2.3.2", + "upper-case": "1.1.3" + } + }, + "hoist-non-react-statics": { + "version": "2.5.5", + "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-2.5.5.tgz", + "integrity": "sha512-rqcy4pJo55FTTLWt+bU8ukscqHeE/e9KWvsOW2b/a3afxQZhwkQdT1rPPCJ0rYXdj4vNcasY8zHTH+jF/qStxw==", + "dev": true + }, "hosted-git-info": { "version": "2.7.1", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz", "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==", "dev": true }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "requires": { + "safer-buffer": "2.1.2" + } + }, "inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", @@ -244,12 +450,61 @@ "number-is-nan": "1.0.1" } }, + "is-lower-case": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/is-lower-case/-/is-lower-case-1.1.3.tgz", + "integrity": "sha1-fhR75HaNxGbbO/shzGCzHmrWk5M=", + "dev": true, + "requires": { + "lower-case": "1.1.4" + } + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true + }, + "is-upper-case": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-upper-case/-/is-upper-case-1.1.2.tgz", + "integrity": "sha1-jQsfp+eTOh5YSDYA7H2WYcuvdW8=", + "dev": true, + "requires": { + "upper-case": "1.1.3" + } + }, "is-utf8": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", "dev": true }, + "isomorphic-fetch": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz", + "integrity": "sha1-YRrhrPFPXoH3KVB0coGf6XM1WKk=", + "dev": true, + "requires": { + "node-fetch": "1.7.3", + "whatwg-fetch": "3.0.0" + } + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "json-text-sequence": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/json-text-sequence/-/json-text-sequence-0.1.1.tgz", + "integrity": "sha1-py8hfcSvxGKf/1/rME3BvVGi89I=", + "dev": true, + "requires": { + "delimit-stream": "0.1.0" + } + }, "jsonfile": { "version": "2.4.0", "resolved": "http://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", @@ -296,6 +551,42 @@ "integrity": "sha1-DZnzzNem0mHRm9rrkkUAXShYCOc=", "dev": true }, + "lodash.clonedeep": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", + "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", + "dev": true + }, + "lodash.topath": { + "version": "4.5.2", + "resolved": "https://registry.npmjs.org/lodash.topath/-/lodash.topath-4.5.2.tgz", + "integrity": "sha1-NhY1Hzu6YZlKCTGYlmC9AyVP0Ak=", + "dev": true + }, + "loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "dev": true, + "requires": { + "js-tokens": "4.0.0" + } + }, + "lower-case": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-1.1.4.tgz", + "integrity": "sha1-miyr0bno4K6ZOkv31YdcOcQujqw=", + "dev": true + }, + "lower-case-first": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/lower-case-first/-/lower-case-first-1.0.2.tgz", + "integrity": "sha1-5dp8JvKacHO+AtUrrJmA5ZIq36E=", + "dev": true, + "requires": { + "lower-case": "1.1.4" + } + }, "memorystream": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", @@ -342,6 +633,22 @@ "he": "1.1.1", "mkdirp": "0.5.1", "supports-color": "4.4.0" + }, + "dependencies": { + "glob": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "dev": true, + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + } } }, "ms": { @@ -350,6 +657,31 @@ "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", "dev": true }, + "no-case": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/no-case/-/no-case-2.3.2.tgz", + "integrity": "sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ==", + "dev": true, + "requires": { + "lower-case": "1.1.4" + } + }, + "node-fetch": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.3.tgz", + "integrity": "sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ==", + "dev": true, + "requires": { + "encoding": "0.1.12", + "is-stream": "1.1.0" + } + }, + "nofilter": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/nofilter/-/nofilter-0.0.3.tgz", + "integrity": "sha1-JB40IHgXeoaTowQ+g/N1Z+J2QQw=", + "dev": true + }, "normalize-package-data": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", @@ -358,7 +690,7 @@ "requires": { "hosted-git-info": "2.7.1", "is-builtin-module": "1.0.0", - "semver": "5.5.1", + "semver": "5.6.0", "validate-npm-package-license": "3.0.4" } }, @@ -368,6 +700,12 @@ "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", "dev": true }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true + }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -398,6 +736,15 @@ "lcid": "1.0.0" } }, + "param-case": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/param-case/-/param-case-2.1.1.tgz", + "integrity": "sha1-35T9jPZTHs915r75oIWPvHK+Ikc=", + "dev": true, + "requires": { + "no-case": "2.3.2" + } + }, "parse-json": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", @@ -407,6 +754,25 @@ "error-ex": "1.3.2" } }, + "pascal-case": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pascal-case/-/pascal-case-2.0.1.tgz", + "integrity": "sha1-LVeNNFX2YNpl7KGO+VtODekSdh4=", + "dev": true, + "requires": { + "camel-case": "3.0.0", + "upper-case-first": "1.1.2" + } + }, + "path-case": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/path-case/-/path-case-2.1.1.tgz", + "integrity": "sha1-lLgDfDctP+KQbkZbtF4l0ibo7qU=", + "dev": true, + "requires": { + "no-case": "2.3.2" + } + }, "path-exists": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", @@ -454,6 +820,31 @@ "pinkie": "2.0.4" } }, + "promise": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", + "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==", + "dev": true, + "requires": { + "asap": "2.0.6" + } + }, + "prop-types": { + "version": "15.6.2", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.6.2.tgz", + "integrity": "sha512-3pboPvLiWD7dkI3qf3KbUe6hKFKa52w+AE0VCqECtf+QHAKgOL37tTaNCnuX1nAAQ4ZhyP+kYVKf8rLmJ/feDQ==", + "dev": true, + "requires": { + "loose-envify": "1.4.0", + "object-assign": "4.1.1" + } + }, + "react-fast-compare": { + "version": "1.0.0", + "resolved": "http://registry.npmjs.org/react-fast-compare/-/react-fast-compare-1.0.0.tgz", + "integrity": "sha512-dcQpdWr62flXQJuM8/bVEY5/10ad2SYBUafp8H4q4WHR3fTA/MMlp8mpzX12I0CCoEJc1P6QdiMg7U+7lFS6Rw==", + "dev": true + }, "read-pkg": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", @@ -499,32 +890,57 @@ "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", "dev": true, "requires": { - "glob": "7.1.2" + "glob": "7.1.3" } }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, "semver": { - "version": "5.5.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.1.tgz", - "integrity": "sha512-PqpAxfrEhlSUWge8dwIp4tZnQ25DIOthpiaHNIthsjEFQD6EvqUKUDM7L8O2rShkFccYo1VjJR0coWfNkCubRw==", + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", + "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==", "dev": true }, + "sentence-case": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/sentence-case/-/sentence-case-2.1.1.tgz", + "integrity": "sha1-H24t2jnBaL+S0T+G1KkYkz9mftQ=", + "dev": true, + "requires": { + "no-case": "2.3.2", + "upper-case-first": "1.1.2" + } + }, "set-blocking": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", "dev": true }, - "solc": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/solc/-/solc-0.4.24.tgz", - "integrity": "sha512-2xd7Cf1HeVwrIb6Bu1cwY2/TaLRodrppCq3l7rhLimFQgmxptXhTC3+/wesVLpB09F1A2kZgvbMOgH7wvhFnBQ==", + "setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=", + "dev": true + }, + "snake-case": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/snake-case/-/snake-case-2.1.0.tgz", + "integrity": "sha1-Qb2xtz8w7GagTU4srRt2OH1NbZ8=", + "dev": true, + "requires": { + "no-case": "2.3.2" + } + }, + "solidity-cborutils": { + "version": "github:smartcontractkit/solidity-cborutils#7c5e4491f1f59aea65582728bf8d9ae0df6e366d", "dev": true, "requires": { - "fs-extra": "0.30.0", - "memorystream": "0.3.1", - "require-from-string": "1.2.1", - "semver": "5.5.1", - "yargs": "4.8.1" + "cbor": "4.1.1" } }, "spdx-correct": { @@ -597,6 +1013,26 @@ "has-flag": "2.0.0" } }, + "swap-case": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/swap-case/-/swap-case-1.1.2.tgz", + "integrity": "sha1-w5IDpFhzhfrTyFCgvRvK+ggZdOM=", + "dev": true, + "requires": { + "lower-case": "1.1.4", + "upper-case": "1.1.3" + } + }, + "title-case": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/title-case/-/title-case-2.1.1.tgz", + "integrity": "sha1-PhJyFtpY0rxb7PE3q5Ha46fNj6o=", + "dev": true, + "requires": { + "no-case": "2.3.2", + "upper-case": "1.1.3" + } + }, "truffle": { "version": "4.1.13", "resolved": "https://registry.npmjs.org/truffle/-/truffle-4.1.13.tgz", @@ -606,6 +1042,48 @@ "mocha": "4.1.0", "original-require": "1.0.1", "solc": "0.4.24" + }, + "dependencies": { + "solc": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/solc/-/solc-0.4.24.tgz", + "integrity": "sha512-2xd7Cf1HeVwrIb6Bu1cwY2/TaLRodrppCq3l7rhLimFQgmxptXhTC3+/wesVLpB09F1A2kZgvbMOgH7wvhFnBQ==", + "dev": true, + "requires": { + "fs-extra": "0.30.0", + "memorystream": "0.3.1", + "require-from-string": "1.2.1", + "semver": "5.6.0", + "yargs": "4.8.1" + } + } + } + }, + "tslib": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", + "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==", + "dev": true + }, + "ua-parser-js": { + "version": "0.7.18", + "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.18.tgz", + "integrity": "sha512-LtzwHlVHwFGTptfNSgezHp7WUlwiqb0gA9AALRbKaERfxwJoiX0A73QbTToxteIAuIaFshhgIZfqK8s7clqgnA==", + "dev": true + }, + "upper-case": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/upper-case/-/upper-case-1.1.3.tgz", + "integrity": "sha1-9rRQHC7EzdJrp4vnIilh3ndiFZg=", + "dev": true + }, + "upper-case-first": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/upper-case-first/-/upper-case-first-1.1.2.tgz", + "integrity": "sha1-XXm+3P8UQZUY/S7bCgUHybaFkRU=", + "dev": true, + "requires": { + "upper-case": "1.1.3" } }, "validate-npm-package-license": { @@ -618,6 +1096,21 @@ "spdx-expression-parse": "3.0.0" } }, + "warning": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/warning/-/warning-3.0.0.tgz", + "integrity": "sha1-MuU3fLVy3kqwR1O9+IIcAe1gW3w=", + "dev": true, + "requires": { + "loose-envify": "1.4.0" + } + }, + "whatwg-fetch": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.0.0.tgz", + "integrity": "sha512-9GSJUgz1D4MfyKU7KRqwOjXCXTqWdFNvEr7eUBYchQiVc744mqK/MzXPNR2WsPkmkOa4ywfg8C2n8h+13Bey1Q==", + "dev": true + }, "which-module": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", @@ -676,7 +1169,7 @@ }, "yargs-parser": { "version": "2.4.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-2.4.1.tgz", + "resolved": "http://registry.npmjs.org/yargs-parser/-/yargs-parser-2.4.1.tgz", "integrity": "sha1-hVaN488VD/SfpRgl8DqMiA3cxcQ=", "dev": true, "requires": { diff --git a/package.json b/package.json index a0ba779..0fac7f6 100644 --- a/package.json +++ b/package.json @@ -26,6 +26,6 @@ }, "homepage": "https://marketprotocol.io", "devDependencies": { - "@marketprotocol/marketprotocol": "^1.3.1" + "@marketprotocol/marketprotocol": "^1.4.0" } } From 69f780ea30e2cafe10bf7882fab286cd10c2bc57 Mon Sep 17 00:00:00 2001 From: Phil Elsasser Date: Mon, 15 Oct 2018 20:53:55 -0600 Subject: [PATCH 2/4] updated migrations --- migrations/2_deploy_contracts.js | 110 ++++++++++++++----------------- 1 file changed, 50 insertions(+), 60 deletions(-) diff --git a/migrations/2_deploy_contracts.js b/migrations/2_deploy_contracts.js index 9c33bc1..595682a 100644 --- a/migrations/2_deploy_contracts.js +++ b/migrations/2_deploy_contracts.js @@ -4,17 +4,14 @@ const MathLib = artifacts.require( const OrderLib = artifacts.require( '@marketprotocol/marketprotocol/OrderLib.sol' ); -const QueryTest = artifacts.require( - '@marketprotocol/marketprotocol/OraclizeQueryTest.sol' -); const MarketContractOraclize = artifacts.require( '@marketprotocol/marketprotocol/MarketContractOraclize.sol' ); const MarketContractFactory = artifacts.require( '@marketprotocol/marketprotocol/MarketContractFactoryOraclize.sol' ); -const MarketCollateralPoolFactory = artifacts.require( - '@marketprotocol/marketprotocol/MarketCollateralPoolFactory.sol' +const MarketCollateralPool = artifacts.require( + '@marketprotocol/marketprotocol/MarketCollateralPool.sol' ); const MarketContractRegistry = artifacts.require( '@marketprotocol/marketprotocol/MarketContractRegistry.sol' @@ -22,74 +19,67 @@ const MarketContractRegistry = artifacts.require( const MarketToken = artifacts.require( '@marketprotocol/marketprotocol/MarketToken.sol' ); +const MarketTradingHub = artifacts.require( + '@marketprotocol/marketprotocol/MarketTradingHub.sol' +); -module.exports = function(deployer, network) { +module.exports = function (deployer, network) { if (network !== 'live') { - deployer.deploy(MathLib); - deployer.deploy(OrderLib); - deployer.deploy(MarketContractRegistry).then(function() { - - deployer.link( - MathLib, - QueryTest, - MarketContractOraclize, - MarketContractFactory - ); + return deployer.deploy([MathLib, OrderLib, MarketContractRegistry]).then(function () { deployer.link( MathLib, - MarketCollateralPoolFactory + [ + MarketContractOraclize, + MarketCollateralPool, + MarketContractFactory + ] ); - deployer.link(OrderLib, MarketContractFactory, MarketContractOraclize); - // deploy our quest test contract - deployer.deploy(QueryTest).then(function(queryTestInstance) { - // by forcing the first query when we deploy we can make sure all the prices are accurate since - // the first query is free with oraclize. - return queryTestInstance.testOracleQuery( - 'URL', - 'json(https://api.kraken.com/0/public/Ticker?pair=BCHUSD).result.BCHUSD.c.0', - ); - }); + deployer.link(OrderLib, [MarketContractFactory, MarketContractOraclize, MarketTradingHub]); - // deploy MKT token - const marketTokenToLockForTrading = 0; // for testing purposes, require no lock - const marketTokenAmountForContractCreation = 0; //for testing purposes require no balance - return deployer - .deploy( - MarketToken, - marketTokenToLockForTrading, - marketTokenAmountForContractCreation - ) - .then(function() { - // deploy and set up main factory to create MARKET Protocol smart contracts. - return MarketContractRegistry.deployed().then(function( - marketContractRegistry - ) { + // deploy the global collateral pool + return deployer.deploy(MarketCollateralPool).then(function (marketCollateralPool) { + // deploy MKT token + const marketTokenToLockForTrading = 0; // for testing purposes, require no lock + const marketTokenAmountForContractCreation = 0; //for testing purposes require no balance + return deployer + .deploy( + MarketToken, + marketTokenToLockForTrading, + marketTokenAmountForContractCreation + ) + .then(function () { + // deploy our trading hub! return deployer.deploy( - MarketCollateralPoolFactory, - marketContractRegistry.address - ).then(function(collateralPoolFactory) - { - return deployer - .deploy( - MarketContractFactory, - marketContractRegistry.address, - MarketToken.address, - collateralPoolFactory.address, - { - gas: 7000000 - } - ) - .then(function(factory) { - // white list the factory - return marketContractRegistry - .addFactoryAddress(factory.address) + MarketTradingHub, + MarketToken.address, + MarketCollateralPool.address + ).then(function (marketTradingHub) { + return marketCollateralPool.setMarketTradingHubAddress( + marketTradingHub.address + ).then(function () { + // deploy and set up main factory to create MARKET Protocol smart contracts. + return MarketContractRegistry.deployed().then(function ( + marketContractRegistry + ) { + return deployer.deploy( + MarketContractFactory, + marketContractRegistry.address, + MarketToken.address, + { + gas: 7000000 + } + ).then(function (factory) { + // white list the factory + return marketContractRegistry.addFactoryAddress(factory.address) + }); }); + }); }); }); - }); + }); }); } }; From 21e37b38973dc2ad981e139795db425885a91ecd Mon Sep 17 00:00:00 2001 From: Phil Elsasser Date: Mon, 15 Oct 2018 21:16:23 -0600 Subject: [PATCH 3/4] updated rinkeby abis! fixes #1 --- build/contracts/MarketCollateralPool.json | 20579 ++++++++++++++++ .../MarketCollateralPoolFactory.json | 1995 -- .../MarketContractFactoryOraclize.json | 1842 +- build/contracts/MarketContractOraclize.json | 2655 +- build/contracts/MarketContractRegistry.json | 2155 +- build/contracts/MarketToken.json | 2674 +- build/contracts/MarketTradingHub.json | 15560 ++++++++++++ build/contracts/MathLib.json | 3588 +-- build/contracts/Migrations.json | 6 +- build/contracts/OrderLib.json | 3370 +-- 10 files changed, 44314 insertions(+), 10110 deletions(-) create mode 100644 build/contracts/MarketCollateralPool.json delete mode 100644 build/contracts/MarketCollateralPoolFactory.json create mode 100644 build/contracts/MarketTradingHub.json diff --git a/build/contracts/MarketCollateralPool.json b/build/contracts/MarketCollateralPool.json new file mode 100644 index 0000000..bd0bb54 --- /dev/null +++ b/build/contracts/MarketCollateralPool.json @@ -0,0 +1,20579 @@ +{ + "contractName": "MarketCollateralPool", + "abi": [ + { + "constant": true, + "inputs": [], + "name": "marketTradingHub", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "address" + }, + { + "name": "", + "type": "address" + } + ], + "name": "tokenAddressToAccountBalance", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "address" + }, + { + "name": "", + "type": "address" + } + ], + "name": "tokenAddressToBalanceLockTime", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "owner", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "address" + } + ], + "name": "contractAddressToCollateralPoolBalance", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "collateralTokenAddress", + "type": "address" + }, + { + "indexed": true, + "name": "user", + "type": "address" + }, + { + "indexed": false, + "name": "balance", + "type": "uint256" + } + ], + "name": "UpdatedUserBalance", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "constant": true, + "inputs": [ + { + "name": "marketContractAddress", + "type": "address" + }, + { + "name": "userAddress", + "type": "address" + } + ], + "name": "getUserNetPosition", + "outputs": [ + { + "name": "", + "type": "int256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "marketContractAddress", + "type": "address" + }, + { + "name": "userAddress", + "type": "address" + } + ], + "name": "getUserPositionCount", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "marketContractAddress", + "type": "address" + }, + { + "name": "userAddress", + "type": "address" + }, + { + "name": "index", + "type": "uint256" + } + ], + "name": "getUserPosition", + "outputs": [ + { + "name": "", + "type": "uint256" + }, + { + "name": "", + "type": "int256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "collateralTokenAddress", + "type": "address" + }, + { + "name": "userAddress", + "type": "address" + } + ], + "name": "getUserUnallocatedBalance", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "collateralTokenAddress", + "type": "address" + }, + { + "name": "depositAmount", + "type": "uint256" + } + ], + "name": "depositTokensForTrading", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "marketContractAddress", + "type": "address" + } + ], + "name": "settleAndClose", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "marketContractAddress", + "type": "address" + }, + { + "name": "maker", + "type": "address" + }, + { + "name": "taker", + "type": "address" + }, + { + "name": "qty", + "type": "int256" + }, + { + "name": "price", + "type": "uint256" + } + ], + "name": "updatePositions", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "marketTradingHubAddress", + "type": "address" + } + ], + "name": "setMarketTradingHubAddress", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "collateralTokenAddress", + "type": "address" + }, + { + "name": "withdrawAmount", + "type": "uint256" + } + ], + "name": "withdrawTokens", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x608060405234801561001057600080fd5b50336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550612ab0806100606000396000f3006080604052600436106100db576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306b091f9146100e057806319bfe4861461012d57806321e83c5514610184578063240d413e146101fb57806326fca2e21461027257806339a7ab44146103095780634858c0631461035657806357553cb1146103995780635e9f2eb3146104105780636f806935146104535780637d6aaab1146104ca5780638da5cb5b14610552578063ca7b1b4d146105a9578063f29edff014610600578063f2fde38b14610677575b600080fd5b3480156100ec57600080fd5b5061012b600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506106ba565b005b34801561013957600080fd5b50610142610863565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561019057600080fd5b506101e5600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610889565b6040518082815260200191505060405180910390f35b34801561020757600080fd5b5061025c600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506108ae565b6040518082815260200191505060405180910390f35b34801561027e57600080fd5b50610307600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190505050610935565b005b34801561031557600080fd5b50610354600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610a67565b005b34801561036257600080fd5b50610397600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c12565b005b3480156103a557600080fd5b506103fa600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610cb1565b6040518082815260200191505060405180910390f35b34801561041c57600080fd5b50610451600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610d3b565b005b34801561045f57600080fd5b506104b4600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611179565b6040518082815260200191505060405180910390f35b3480156104d657600080fd5b50610535600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061119e565b604051808381526020018281526020019250505060405180910390f35b34801561055e57600080fd5b50610567611256565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156105b557600080fd5b506105ea600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061127b565b6040518082815260200191505060405180910390f35b34801561060c57600080fd5b50610661600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611293565b6040518082815260200191505060405180910390f35b34801561068357600080fd5b506106b8600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611320565b005b600061074b82600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461147590919063ffffffff16565b905080600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506107f933838573ffffffffffffffffffffffffffffffffffffffff1661148e9092919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167ff5caacab1b992b09cc130576f869129fd1275e04ea5eee86f5c0c4040f222fe1836040518082815260200191505060405180910390a3505050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6003602052816000526040600020602052806000526040600020600091509150505481565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610a22576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001807f43616e206f6e6c792062652063616c6c6564206279207468652074726164696e81526020017f672068756200000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b859050610a3181868585611579565b610a5f81857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff860285611579565b505050505050565b6000610af882600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546116d890919063ffffffff16565b9050610b273330848673ffffffffffffffffffffffffffffffffffffffff166116f6909392919063ffffffff16565b80600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055503373ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167ff5caacab1b992b09cc130576f869129fd1275e04ea5eee86f5c0c4040f222fe1836040518082815260200191505060405180910390a3505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610c6d57600080fd5b80600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154905092915050565b6000808291508173ffffffffffffffffffffffffffffffffffffffff16633270bb5b6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610da557600080fd5b505af1158015610db9573d6000803e3d6000fd5b505050506040513d6020811015610dcf57600080fd5b81019080805190602001909291905050501515610e54576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f436f6e7472616374206973206e6f7420736574746c656400000000000000000081525060200191505060405180910390fd5b600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905060008160010154141515610fb257610fb18282337fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8560010154028673ffffffffffffffffffffffffffffffffffffffff1663f348e8b26040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610f7157600080fd5b505af1158015610f85573d6000803e3d6000fd5b505050506040513d6020811015610f9b57600080fd5b8101908080519060200190929190505050611816565b5b6111748273ffffffffffffffffffffffffffffffffffffffff1663323bb7756040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561101957600080fd5b505af115801561102d573d6000803e3d6000fd5b505050506040513d602081101561104357600080fd5b8101908080519060200190929190505050600360008573ffffffffffffffffffffffffffffffffffffffff1663323bb7756040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156110bc57600080fd5b505af11580156110d0573d6000803e3d6000fd5b505050506040513d60208110156110e657600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546106ba565b505050565b6004602052816000526040600020602052806000526040600020600091509150505481565b6000806000600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018481548110151561122f57fe5b90600052602060002090600202019050806000015481600101549250925050935093915050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915090505481565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000180549050905092915050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561137b57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515156113b757600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600082821115151561148357fe5b818303905092915050565b8273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561153157600080fd5b505af1158015611545573d6000803e3d6000fd5b505050506040513d602081101561155b57600080fd5b8101908080519060200190929190505050151561157457fe5b505050565b600080600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209150600082600101541480611620575061161f848360010154611e9590919063ffffffff16565b5b15611637576116328683878787611eaf565b6116b1565b611640846121c1565b61164d83600101546121c1565b101515611666576116618683878787611816565b6116b0565b6116998683877fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff86600101540287611816565b8382600101540190506116af8683878487611eaf565b5b5b6116c88483600101546121df90919063ffffffff16565b8260010181905550505050505050565b60008082840190508381101515156116ec57fe5b8091505092915050565b8373ffffffffffffffffffffffffffffffffffffffff166323b872dd8484846040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b1580156117cd57600080fd5b505af11580156117e1573d6000803e3d6000fd5b505050506040513d60208110156117f757600080fd5b8101908080519060200190929190505050151561181057fe5b50505050565b6000806000809250849150600087600001805490501415151561183557fe5b5b600082141515611e755786600001600188600001805490500381548110151561185b57fe5b90600052602060002090600202019050611874826121c1565b61188182600101546121c1565b111515611b7657611b3e73__MathLib_______________________________63ed981d4f8a73ffffffffffffffffffffffffffffffffffffffff1663c32b1dfa6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561190957600080fd5b505af115801561191d573d6000803e3d6000fd5b505050506040513d602081101561193357600080fd5b81019080805190602001909291905050508b73ffffffffffffffffffffffffffffffffffffffff1663b5471dee6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156119a857600080fd5b505af11580156119bc573d6000803e3d6000fd5b505050506040513d60208110156119d257600080fd5b81019080805190602001909291905050508c73ffffffffffffffffffffffffffffffffffffffff1663ca361d676040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015611a4757600080fd5b505af1158015611a5b573d6000803e3d6000fd5b505050506040513d6020811015611a7157600080fd5b810190808051906020019092919050505086600101548a6040518663ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808681526020018581526020018481526020018381526020018281526020019550505050505060206040518083038186803b158015611af457600080fd5b505af4158015611b08573d6000803e3d6000fd5b505050506040513d6020811015611b1e57600080fd5b8101908080519060200190929190505050846116d890919063ffffffff16565b9250611b578160010154836121df90919063ffffffff16565b915086600001805480919060019003611b709190612a23565b50611e70565b611b8d8282600101546121df90919063ffffffff16565b8160010181905550611e6973__MathLib_______________________________63ed981d4f8a73ffffffffffffffffffffffffffffffffffffffff1663c32b1dfa6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015611c1657600080fd5b505af1158015611c2a573d6000803e3d6000fd5b505050506040513d6020811015611c4057600080fd5b81019080805190602001909291905050508b73ffffffffffffffffffffffffffffffffffffffff1663b5471dee6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015611cb557600080fd5b505af1158015611cc9573d6000803e3d6000fd5b505050506040513d6020811015611cdf57600080fd5b81019080805190602001909291905050508c73ffffffffffffffffffffffffffffffffffffffff1663ca361d676040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015611d5457600080fd5b505af1158015611d68573d6000803e3d6000fd5b505050506040513d6020811015611d7e57600080fd5b81019080805190602001909291905050507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff88028a6040518663ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808681526020018581526020018481526020018381526020018281526020019550505050505060206040518083038186803b158015611e1f57600080fd5b505af4158015611e33573d6000803e3d6000fd5b505050506040513d6020811015611e4957600080fd5b8101908080519060200190929190505050846116d890919063ffffffff16565b9250611e75565b611836565b600083141515611e8b57611e8a888785612247565b5b5050505050505050565b600081831480611ea757506000828402135b905092915050565b600073__MathLib_______________________________63ed981d4f8773ffffffffffffffffffffffffffffffffffffffff1663c32b1dfa6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015611f2f57600080fd5b505af1158015611f43573d6000803e3d6000fd5b505050506040513d6020811015611f5957600080fd5b81019080805190602001909291905050508873ffffffffffffffffffffffffffffffffffffffff1663b5471dee6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015611fce57600080fd5b505af1158015611fe2573d6000803e3d6000fd5b505050506040513d6020811015611ff857600080fd5b81019080805190602001909291905050508973ffffffffffffffffffffffffffffffffffffffff1663ca361d676040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561206d57600080fd5b505af1158015612081573d6000803e3d6000fd5b505050506040513d602081101561209757600080fd5b810190808051906020019092919050505087876040518663ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808681526020018581526020018481526020018381526020018281526020019550505050505060206040518083038186803b15801561211657600080fd5b505af415801561212a573d6000803e3d6000fd5b505050506040513d602081101561214057600080fd5b8101908080519060200190929190505050905061215e868583612635565b84600001604080519081016040528084815260200185815250908060018154018082558091505090600182039060005260206000209060020201600090919290919091506000820151816000015560208201518160010155505050505050505050565b6000808212156121d6578160000390506121da565b8190505b919050565b60008082840190506121f18484611e95565b15156121ff57809150612240565b600084121515612225578360ff60019060020a021903831315151561222057fe5b61223c565b8360ff60019060020a0203831215151561223b57fe5b5b8091505b5092915050565b600061237682600360008773ffffffffffffffffffffffffffffffffffffffff1663323bb7756040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156122b557600080fd5b505af11580156122c9573d6000803e3d6000fd5b505050506040513d60208110156122df57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546116d890919063ffffffff16565b905080600360008673ffffffffffffffffffffffffffffffffffffffff1663323bb7756040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156123e157600080fd5b505af11580156123f5573d6000803e3d6000fd5b505050506040513d602081101561240b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506124e982600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461147590919063ffffffff16565b600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1663323bb7756040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156125a757600080fd5b505af11580156125bb573d6000803e3d6000fd5b505050506040513d60208110156125d157600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff167ff5caacab1b992b09cc130576f869129fd1275e04ea5eee86f5c0c4040f222fe1836040518082815260200191505060405180910390a350505050565b600061276482600360008773ffffffffffffffffffffffffffffffffffffffff1663323bb7756040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156126a357600080fd5b505af11580156126b7573d6000803e3d6000fd5b505050506040513d60208110156126cd57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461147590919063ffffffff16565b905080600360008673ffffffffffffffffffffffffffffffffffffffff1663323bb7756040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156127cf57600080fd5b505af11580156127e3573d6000803e3d6000fd5b505050506040513d60208110156127f957600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506128d782600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546116d890919063ffffffff16565b600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1663323bb7756040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561299557600080fd5b505af11580156129a9573d6000803e3d6000fd5b505050506040513d60208110156129bf57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff167ff5caacab1b992b09cc130576f869129fd1275e04ea5eee86f5c0c4040f222fe1836040518082815260200191505060405180910390a350505050565b815481835581811115612a5057600202816002028360005260206000209182019101612a4f9190612a55565b5b505050565b612a8191905b80821115612a7d57600080820160009055600182016000905550600201612a5b565b5090565b905600a165627a7a723058201bcca9b75061e7b565ef87e5bb54135830dda363a6f228bfca97560dcb2b7ff20029", + "deployedBytecode": "0x6080604052600436106100db576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306b091f9146100e057806319bfe4861461012d57806321e83c5514610184578063240d413e146101fb57806326fca2e21461027257806339a7ab44146103095780634858c0631461035657806357553cb1146103995780635e9f2eb3146104105780636f806935146104535780637d6aaab1146104ca5780638da5cb5b14610552578063ca7b1b4d146105a9578063f29edff014610600578063f2fde38b14610677575b600080fd5b3480156100ec57600080fd5b5061012b600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506106ba565b005b34801561013957600080fd5b50610142610863565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561019057600080fd5b506101e5600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610889565b6040518082815260200191505060405180910390f35b34801561020757600080fd5b5061025c600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506108ae565b6040518082815260200191505060405180910390f35b34801561027e57600080fd5b50610307600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190505050610935565b005b34801561031557600080fd5b50610354600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610a67565b005b34801561036257600080fd5b50610397600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c12565b005b3480156103a557600080fd5b506103fa600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610cb1565b6040518082815260200191505060405180910390f35b34801561041c57600080fd5b50610451600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610d3b565b005b34801561045f57600080fd5b506104b4600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611179565b6040518082815260200191505060405180910390f35b3480156104d657600080fd5b50610535600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061119e565b604051808381526020018281526020019250505060405180910390f35b34801561055e57600080fd5b50610567611256565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156105b557600080fd5b506105ea600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061127b565b6040518082815260200191505060405180910390f35b34801561060c57600080fd5b50610661600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611293565b6040518082815260200191505060405180910390f35b34801561068357600080fd5b506106b8600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611320565b005b600061074b82600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461147590919063ffffffff16565b905080600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506107f933838573ffffffffffffffffffffffffffffffffffffffff1661148e9092919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167ff5caacab1b992b09cc130576f869129fd1275e04ea5eee86f5c0c4040f222fe1836040518082815260200191505060405180910390a3505050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6003602052816000526040600020602052806000526040600020600091509150505481565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610a22576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001807f43616e206f6e6c792062652063616c6c6564206279207468652074726164696e81526020017f672068756200000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b859050610a3181868585611579565b610a5f81857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff860285611579565b505050505050565b6000610af882600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546116d890919063ffffffff16565b9050610b273330848673ffffffffffffffffffffffffffffffffffffffff166116f6909392919063ffffffff16565b80600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055503373ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167ff5caacab1b992b09cc130576f869129fd1275e04ea5eee86f5c0c4040f222fe1836040518082815260200191505060405180910390a3505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610c6d57600080fd5b80600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154905092915050565b6000808291508173ffffffffffffffffffffffffffffffffffffffff16633270bb5b6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610da557600080fd5b505af1158015610db9573d6000803e3d6000fd5b505050506040513d6020811015610dcf57600080fd5b81019080805190602001909291905050501515610e54576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f436f6e7472616374206973206e6f7420736574746c656400000000000000000081525060200191505060405180910390fd5b600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905060008160010154141515610fb257610fb18282337fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8560010154028673ffffffffffffffffffffffffffffffffffffffff1663f348e8b26040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610f7157600080fd5b505af1158015610f85573d6000803e3d6000fd5b505050506040513d6020811015610f9b57600080fd5b8101908080519060200190929190505050611816565b5b6111748273ffffffffffffffffffffffffffffffffffffffff1663323bb7756040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561101957600080fd5b505af115801561102d573d6000803e3d6000fd5b505050506040513d602081101561104357600080fd5b8101908080519060200190929190505050600360008573ffffffffffffffffffffffffffffffffffffffff1663323bb7756040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156110bc57600080fd5b505af11580156110d0573d6000803e3d6000fd5b505050506040513d60208110156110e657600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546106ba565b505050565b6004602052816000526040600020602052806000526040600020600091509150505481565b6000806000600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018481548110151561122f57fe5b90600052602060002090600202019050806000015481600101549250925050935093915050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915090505481565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000180549050905092915050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561137b57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515156113b757600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600082821115151561148357fe5b818303905092915050565b8273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561153157600080fd5b505af1158015611545573d6000803e3d6000fd5b505050506040513d602081101561155b57600080fd5b8101908080519060200190929190505050151561157457fe5b505050565b600080600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209150600082600101541480611620575061161f848360010154611e9590919063ffffffff16565b5b15611637576116328683878787611eaf565b6116b1565b611640846121c1565b61164d83600101546121c1565b101515611666576116618683878787611816565b6116b0565b6116998683877fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff86600101540287611816565b8382600101540190506116af8683878487611eaf565b5b5b6116c88483600101546121df90919063ffffffff16565b8260010181905550505050505050565b60008082840190508381101515156116ec57fe5b8091505092915050565b8373ffffffffffffffffffffffffffffffffffffffff166323b872dd8484846040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b1580156117cd57600080fd5b505af11580156117e1573d6000803e3d6000fd5b505050506040513d60208110156117f757600080fd5b8101908080519060200190929190505050151561181057fe5b50505050565b6000806000809250849150600087600001805490501415151561183557fe5b5b600082141515611e755786600001600188600001805490500381548110151561185b57fe5b90600052602060002090600202019050611874826121c1565b61188182600101546121c1565b111515611b7657611b3e73__MathLib_______________________________63ed981d4f8a73ffffffffffffffffffffffffffffffffffffffff1663c32b1dfa6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561190957600080fd5b505af115801561191d573d6000803e3d6000fd5b505050506040513d602081101561193357600080fd5b81019080805190602001909291905050508b73ffffffffffffffffffffffffffffffffffffffff1663b5471dee6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156119a857600080fd5b505af11580156119bc573d6000803e3d6000fd5b505050506040513d60208110156119d257600080fd5b81019080805190602001909291905050508c73ffffffffffffffffffffffffffffffffffffffff1663ca361d676040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015611a4757600080fd5b505af1158015611a5b573d6000803e3d6000fd5b505050506040513d6020811015611a7157600080fd5b810190808051906020019092919050505086600101548a6040518663ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808681526020018581526020018481526020018381526020018281526020019550505050505060206040518083038186803b158015611af457600080fd5b505af4158015611b08573d6000803e3d6000fd5b505050506040513d6020811015611b1e57600080fd5b8101908080519060200190929190505050846116d890919063ffffffff16565b9250611b578160010154836121df90919063ffffffff16565b915086600001805480919060019003611b709190612a23565b50611e70565b611b8d8282600101546121df90919063ffffffff16565b8160010181905550611e6973__MathLib_______________________________63ed981d4f8a73ffffffffffffffffffffffffffffffffffffffff1663c32b1dfa6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015611c1657600080fd5b505af1158015611c2a573d6000803e3d6000fd5b505050506040513d6020811015611c4057600080fd5b81019080805190602001909291905050508b73ffffffffffffffffffffffffffffffffffffffff1663b5471dee6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015611cb557600080fd5b505af1158015611cc9573d6000803e3d6000fd5b505050506040513d6020811015611cdf57600080fd5b81019080805190602001909291905050508c73ffffffffffffffffffffffffffffffffffffffff1663ca361d676040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015611d5457600080fd5b505af1158015611d68573d6000803e3d6000fd5b505050506040513d6020811015611d7e57600080fd5b81019080805190602001909291905050507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff88028a6040518663ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808681526020018581526020018481526020018381526020018281526020019550505050505060206040518083038186803b158015611e1f57600080fd5b505af4158015611e33573d6000803e3d6000fd5b505050506040513d6020811015611e4957600080fd5b8101908080519060200190929190505050846116d890919063ffffffff16565b9250611e75565b611836565b600083141515611e8b57611e8a888785612247565b5b5050505050505050565b600081831480611ea757506000828402135b905092915050565b600073__MathLib_______________________________63ed981d4f8773ffffffffffffffffffffffffffffffffffffffff1663c32b1dfa6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015611f2f57600080fd5b505af1158015611f43573d6000803e3d6000fd5b505050506040513d6020811015611f5957600080fd5b81019080805190602001909291905050508873ffffffffffffffffffffffffffffffffffffffff1663b5471dee6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015611fce57600080fd5b505af1158015611fe2573d6000803e3d6000fd5b505050506040513d6020811015611ff857600080fd5b81019080805190602001909291905050508973ffffffffffffffffffffffffffffffffffffffff1663ca361d676040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561206d57600080fd5b505af1158015612081573d6000803e3d6000fd5b505050506040513d602081101561209757600080fd5b810190808051906020019092919050505087876040518663ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808681526020018581526020018481526020018381526020018281526020019550505050505060206040518083038186803b15801561211657600080fd5b505af415801561212a573d6000803e3d6000fd5b505050506040513d602081101561214057600080fd5b8101908080519060200190929190505050905061215e868583612635565b84600001604080519081016040528084815260200185815250908060018154018082558091505090600182039060005260206000209060020201600090919290919091506000820151816000015560208201518160010155505050505050505050565b6000808212156121d6578160000390506121da565b8190505b919050565b60008082840190506121f18484611e95565b15156121ff57809150612240565b600084121515612225578360ff60019060020a021903831315151561222057fe5b61223c565b8360ff60019060020a0203831215151561223b57fe5b5b8091505b5092915050565b600061237682600360008773ffffffffffffffffffffffffffffffffffffffff1663323bb7756040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156122b557600080fd5b505af11580156122c9573d6000803e3d6000fd5b505050506040513d60208110156122df57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546116d890919063ffffffff16565b905080600360008673ffffffffffffffffffffffffffffffffffffffff1663323bb7756040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156123e157600080fd5b505af11580156123f5573d6000803e3d6000fd5b505050506040513d602081101561240b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506124e982600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461147590919063ffffffff16565b600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1663323bb7756040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156125a757600080fd5b505af11580156125bb573d6000803e3d6000fd5b505050506040513d60208110156125d157600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff167ff5caacab1b992b09cc130576f869129fd1275e04ea5eee86f5c0c4040f222fe1836040518082815260200191505060405180910390a350505050565b600061276482600360008773ffffffffffffffffffffffffffffffffffffffff1663323bb7756040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156126a357600080fd5b505af11580156126b7573d6000803e3d6000fd5b505050506040513d60208110156126cd57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461147590919063ffffffff16565b905080600360008673ffffffffffffffffffffffffffffffffffffffff1663323bb7756040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156127cf57600080fd5b505af11580156127e3573d6000803e3d6000fd5b505050506040513d60208110156127f957600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506128d782600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546116d890919063ffffffff16565b600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1663323bb7756040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561299557600080fd5b505af11580156129a9573d6000803e3d6000fd5b505050506040513d60208110156129bf57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff167ff5caacab1b992b09cc130576f869129fd1275e04ea5eee86f5c0c4040f222fe1836040518082815260200191505060405180910390a350505050565b815481835581811115612a5057600202816002028360005260206000209182019101612a4f9190612a55565b5b505050565b612a8191905b80821115612a7d57600080820160009055600182016000905550600201612a5b565b5090565b905600a165627a7a723058201bcca9b75061e7b565ef87e5bb54135830dda363a6f228bfca97560dcb2b7ff20029", + "sourceMap": "1216:15639:2:-;;;2292:24;8:9:-1;5:2;;;30:1;27;20:12;5:2;2292:24:2;509:10:41;501:5;;:18;;;;;;;;;;;;;;;;;;1216:15639:2;;;;;;", + "deployedSourceMap": "1216:15639:2:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8194:563;;8:9:-1;5:2;;;30:1;27;20:12;5:2;8194:563:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2147:31;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2147:31:2;;;;;;;;;;;;;;;;;;;;;;;;;;;1932:80;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1932:80:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4247:232;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4247:232:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7088:580;;8:9:-1;5:2;;;30:1;27;20:12;5:2;7088:580:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4854:502;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4854:502:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7862:145;;8:9:-1;5:2;;;30:1;27;20:12;5:2;7862:145:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;2574:209;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2574:209:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5707:964;;8:9:-1;5:2;;;30:1;27;20:12;5:2;5707:964:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;2059:81;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2059:81:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3762:316;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3762:316:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;238:20:41;;8:9:-1;5:2;;;30:1;27;20:12;5:2;238:20:41;;;;;;;;;;;;;;;;;;;;;;;;;;;1636:70:2;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1636:70:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3123:217;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3123:217:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;832:174:41;;8:9:-1;5:2;;;30:1;27;20:12;5:2;832:174:41;;;;;;;;;;;;;;;;;;;;;;;;;;;;8194:563:2;8291:30;8324:111;8411:14;8324:28;:52;8353:22;8324:52;;;;;;;;;;;;;;;:64;8377:10;8324:64;;;;;;;;;;;;;;;;:73;;:111;;;;:::i;:::-;8291:144;;8513:22;8446:28;:52;8475:22;8446:52;;;;;;;;;;;;;;;:64;8499:10;8446:64;;;;;;;;;;;;;;;:89;;;;8587:70;8630:10;8642:14;8593:22;8587:42;;;;:70;;;;;:::i;:::-;8715:10;8672:78;;8691:22;8672:78;;;8727:22;8672:78;;;;;;;;;;;;;;;;;;8194:563;;;:::o;2147:31::-;;;;;;;;;;;;;:::o;1932:80::-;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;4247:232::-;4380:4;4407:28;:52;4436:22;4407:52;;;;;;;;;;;;;;;:65;4460:11;4407:65;;;;;;;;;;;;;;;;4400:72;;4247:232;;;;:::o;7088:580::-;7279:29;16777:16;;;;;;;;;;;16763:30;;:10;:30;;;16755:80;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7326:21;7279:69;;7358:107;7386:14;7414:5;7433:3;7450:5;7358:14;:107::i;:::-;7549:112;7577:14;7605:5;7630:2;7624:3;:8;7646:5;7549:14;:112::i;:::-;7088:580;;;;;;:::o;4854:502::-;4961:27;4991:83;5060:13;4991:28;:52;5020:22;4991:52;;;;;;;;;;;;;;;:64;5044:10;4991:64;;;;;;;;;;;;;;;;:68;;:83;;;;:::i;:::-;4961:113;;5084:79;5131:10;5143:4;5149:13;5090:22;5084:46;;;;:79;;;;;;:::i;:::-;5240:19;5173:28;:52;5202:22;5173:52;;;;;;;;;;;;;;;:64;5226:10;5173:64;;;;;;;;;;;;;;;:86;;;;5317:10;5274:75;;5293:22;5274:75;;;5329:19;5274:75;;;;;;;;;;;;;;;;;;4854:502;;;:::o;7862:145::-;653:5:41;;;;;;;;;;;639:19;;:10;:19;;;631:28;;;;;;;;7977:23:2;7958:16;;:42;;;;;;;;;;;;;;;;;;7862:145;:::o;2574:209::-;2677:3;2699:29;:52;2729:21;2699:52;;;;;;;;;;;;;;;:65;2752:11;2699:65;;;;;;;;;;;;;;;:77;;;2692:84;;2574:209;;;;:::o;5707:964::-;5781:29;5932:34;5828:21;5781:69;;5868:14;:24;;;:26;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;5868:26:2;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;5868:26:2;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;5868:26:2;;;;;;;;;;;;;;;;5860:62;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5969:29;:52;5999:21;5969:52;;;;;;;;;;;;;;;:64;6022:10;5969:64;;;;;;;;;;;;;;;5932:101;;6073:1;6047:10;:22;;;:27;;6043:388;;;6201:219;6240:14;6272:10;6300;6353:3;6328:10;:22;;;:28;6374:14;:30;;;:32;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6374:32:2;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6374:32:2;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;6374:32:2;;;;;;;;;;;;;;;;6201:21;:219::i;:::-;6043:388;6488:176;6516:14;:39;;;:41;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6516:41:2;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6516:41:2;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;6516:41:2;;;;;;;;;;;;;;;;6571:28;:71;6600:14;:39;;;:41;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6600:41:2;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6600:41:2;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;6600:41:2;;;;;;;;;;;;;;;;6571:71;;;;;;;;;;;;;;;:83;6643:10;6571:83;;;;;;;;;;;;;;;;6488:14;:176::i;:::-;5707:964;;;:::o;2059:81::-;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;3762:316::-;3904:4;3910:3;3929:20;3952:29;:52;3982:21;3952:52;;;;;;;;;;;;;;;:65;4005:11;3952:65;;;;;;;;;;;;;;;:75;;4028:5;3952:82;;;;;;;;;;;;;;;;;;;;3929:105;;4052:3;:9;;;4063:3;:7;;;4044:27;;;;3762:316;;;;;;;:::o;238:20:41:-;;;;;;;;;;;;;:::o;1636:70:2:-;;;;;;;;;;;;;;;;;:::o;3123:217::-;3228:4;3251:29;:52;3281:21;3251:52;;;;;;;;;;;;;;;:65;3304:11;3251:65;;;;;;;;;;;;;;;:75;;:82;;;;3244:89;;3123:217;;;;:::o;832:174:41:-;653:5;;;;;;;;;;;639:19;;:10;:19;;;631:28;;;;;;;;928:1;908:22;;:8;:22;;;;900:31;;;;;;;;970:8;942:37;;963:5;;;;;;;;;;;942:37;;;;;;;;;;;;993:8;985:5;;:16;;;;;;;;;;;;;;;;;;832:174;:::o;1246:125:12:-;1309:7;1340:1;1335;:6;;1328:14;;;;;;1363:1;1359;:5;1352:12;;1246:125;;;;:::o;368:120:46:-;457:5;:14;;;472:2;476:5;457:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;457:25:46;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;457:25:46;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;457:25:46;;;;;;;;;;;;;;;;450:33;;;;;;368:120;;;:::o;11137:1837:2:-;11294:39;12486:13;11336:29;:45;11366:14;11336:45;;;;;;;;;;;;;;;:58;11382:11;11336:58;;;;;;;;;;;;;;;11294:100;;11439:1;11408:15;:27;;;:32;:79;;;;11444:43;11483:3;11444:15;:27;;;:38;;:43;;;;:::i;:::-;11408:79;11404:1427;;;11553:170;11589:14;11621:15;11654:11;11683:3;11704:5;11553:18;:170::i;:::-;11404:1427;;;11864:9;:3;:7;:9::i;:::-;11827:33;:15;:27;;;:31;:33::i;:::-;:46;;11823:998;;;11924:197;11967:14;12003:15;12040:11;12073:3;12098:5;11924:21;:197::i;:::-;11823:998;;;12219:226;12262:14;12298:15;12335:11;12398:2;12368:15;:27;;;:32;12422:5;12219:21;:226::i;:::-;12532:3;12502:15;:27;;;:33;12486:49;;12606:200;12646:14;12682:15;12719:11;12752:9;12783:5;12606:18;:200::i;:::-;11823:998;11404:1427;12870:36;12902:3;12870:15;:27;;;:31;;:36;;;;:::i;:::-;12840:15;:27;;:66;;;;11137:1837;;;;;;:::o;1377:143:12:-;1435:7;1454:9;1470:1;1466;:5;1454:17;;1493:1;1488;:6;;1481:14;;;;;;1512:1;1505:8;;1377:143;;;;;:::o;492:169:46:-;620:5;:18;;;639:4;645:2;649:5;620:35;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;620:35:46;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;620:35:46;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;620:35:46;;;;;;;;;;;;;;;;613:43;;;;;;492:169;;;;:::o;14493:2220:2:-;14701:36;14751:15;15009:25;14740:1;14701:40;;14769:3;14751:21;;14894:1;14863:10;:20;;:27;;;;:32;;14856:40;;;;;;14924:1580;14946:1;14931:11;:16;;14924:1580;;;15037:10;:20;;15088:1;15058:10;:20;;:27;;;;:31;15037:53;;;;;;;;;;;;;;;;;;;;15009:81;;15158:17;:11;:15;:17::i;:::-;15136:18;:8;:12;;;:16;:18::i;:::-;:39;;15132:1362;;;15272:362;15329:7;:33;15388:14;:26;;;:28;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;15388:28:2;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;15388:28:2;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;15388:28:2;;;;;;;;;;;;;;;;15442:14;:24;;;:26;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;15442:26:2;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;15442:26:2;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;15442:26:2;;;;;;;;;;;;;;;;15494:14;:29;;;:31;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;15494:31:2;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;15494:31:2;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;15494:31:2;;;;;;;;;;;;;;;;15551:8;:12;;;15589:5;15329:287;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;15329:287:2;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;15329:287:2;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;15329:287:2;;;;;;;;;;;;;;;;15272:31;:35;;:362;;;;:::i;:::-;15238:396;;15666:29;15682:8;:12;;;15666:11;:15;;:29;;;;:::i;:::-;15652:43;;15713:10;:20;;:29;;;;;;;;;;;;:::i;:::-;;15132:1362;;;15883:29;15900:11;15883:8;:12;;;:16;;:29;;;;:::i;:::-;15868:8;:12;;:44;;;;16028:366;16085:7;:33;16144:14;:26;;;:28;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;16144:28:2;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;16144:28:2;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;16144:28:2;;;;;;;;;;;;;;;;16198:14;:24;;;:26;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;16198:26:2;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;16198:26:2;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;16198:26:2;;;;;;;;;;;;;;;;16250:14;:29;;;:31;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;16250:31:2;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;16250:31:2;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;16250:31:2;;;;;;;;;;;;;;;;16321:2;16307:11;:16;16349:5;16085:291;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;16085:291:2;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;16085:291:2;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;16085:291:2;;;;;;;;;;;;;;;;16028:31;:35;;:366;;;;:::i;:::-;15994:400;;16474:5;;15132:1362;14924:1580;;;16553:1;16518:31;:36;;16514:193;;;16608:88;16635:14;16651:11;16664:31;16608:26;:88::i;:::-;16514:193;14493:2220;;;;;;;;:::o;2916:109:12:-;2973:4;3003:1;2998;:6;:19;;;;3016:1;3012;3008;:5;:9;2998:19;2989:29;;2916:109;;;;:::o;13469:624:2:-;13679:21;13703:7;:33;13750:14;:26;;;:28;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;13750:28:2;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;13750:28:2;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;13750:28:2;;;;;;;;;;;;;;;;13792:14;:24;;;:26;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;13792:26:2;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;13792:26:2;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;13792:26:2;;;;;;;;;;;;;;;;13832:14;:29;;;:31;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;13832:31:2;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;13832:31:2;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;13832:31:2;;;;;;;;;;;;;;;;13877:3;13894:5;13703:206;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;13703:206:2;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;13703:206:2;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;13703:206:2;;;;;;;;;;;;;;;;13679:230;;13919:69;13942:14;13958:11;13971:16;13919:22;:69::i;:::-;13998:15;:25;;14029:20;;;;;;;;;14038:5;14029:20;;;;14045:3;14029:20;;;13998:52;;39:1:-1;33:3;27:10;23:18;57:10;52:3;45:23;79:10;72:17;;0:93;13998:52:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;13469:624;;;;;;:::o;3139:167:12:-;3185:7;3212:1;3208;:5;3204:96;;;3242:1;3241:2;;3229:15;;;;3204:96;3287:1;3275:14;;3139:167;;;;:::o;1673:509::-;1729:6;1747:8;1762:1;1758;:5;1747:16;;1778;1789:1;1792;1778:10;:16::i;:::-;1777:17;1773:126;;;1887:1;1880:8;;;;1773:126;1918:1;1913;:6;;1909:249;;;2022:1;856:3;850:1;842:17;;;;839:22;2009:14;2004:1;:19;;1997:27;;;;;;1909:249;;;2145:1;792:3;786:1;778:17;;;;2132:14;2127:1;:19;;2120:27;;;;;;1909:249;2174:1;2167:8;;1673:509;;;;;;:::o;10064:665:2:-;10225:15;10243:104;10330:16;10243:28;:71;10272:14;:39;;;:41;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;10272:41:2;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;10272:41:2;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;10272:41:2;;;;;;;;;;;;;;;;10243:71;;;;;;;;;;;;;;;:82;10315:9;10243:82;;;;;;;;;;;;;;;;:86;;:104;;;;:::i;:::-;10225:122;;10442:10;10357:28;:71;10386:14;:39;;;:41;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;10386:41:2;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;10386:41:2;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;10386:41:2;;;;;;;;;;;;;;;;10357:71;;;;;;;;;;;;;;;:82;10429:9;10357:82;;;;;;;;;;;;;;;:95;;;;10519:103;10596:16;10519:38;:54;10558:14;10519:54;;;;;;;;;;;;;;;;:63;;:103;;;;:::i;:::-;10462:38;:54;10501:14;10462:54;;;;;;;;;;;;;;;:160;;;;10700:9;10638:84;;10657:14;:39;;;:41;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;10657:41:2;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;10657:41:2;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;10657:41:2;;;;;;;;;;;;;;;;10638:84;;;10711:10;10638:84;;;;;;;;;;;;;;;;;;10064:665;;;;:::o;9114:674::-;9273:15;9291:137;9402:16;9291:28;:71;9320:14;:39;;;:41;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;9320:41:2;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;9320:41:2;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;9320:41:2;;;;;;;;;;;;;;;;9291:71;;;;;;;;;;;;;;;:84;9363:11;9291:84;;;;;;;;;;;;;;;;:93;;:137;;;;:::i;:::-;9273:155;;9526:10;9439:28;:71;9468:14;:39;;;:41;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;9468:41:2;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;9468:41:2;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;9468:41:2;;;;;;;;;;;;;;;;9439:71;;;;;;;;;;;;;;;:84;9511:11;9439:84;;;;;;;;;;;;;;;:97;;;;9603:76;9662:16;9603:38;:54;9642:14;9603:54;;;;;;;;;;;;;;;;:58;;:76;;;;:::i;:::-;9546:38;:54;9585:14;9546:54;;;;;;;;;;;;;;;:133;;;;9757:11;9695:86;;9714:14;:39;;;:41;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;9714:41:2;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;9714:41:2;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;9714:41:2;;;;;;;;;;;;;;;;9695:86;;;9770:10;9695:86;;;;;;;;;;;;;;;;;;9114:674;;;;:::o;1216:15639::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o", + "source": "/*\n Copyright 2017-2018 Phillip A. Elsasser\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n*/\n\npragma solidity ^0.4.24;\n\nimport \"./libraries/MathLib.sol\";\nimport \"./MarketContract.sol\";\n\nimport \"openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol\";\nimport \"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol\";\nimport \"openzeppelin-solidity/contracts/ownership/Ownable.sol\";\n\n\n/// @title MarketCollateralPool is a contract controlled by Market Contracts. It holds collateral balances\n/// as well as user balances and open positions. It should be instantiated and then linked to a specific market\n/// contract factory.\n// TODO: add time lock!\n/// @author Phil Elsasser \ncontract MarketCollateralPool is Ownable {\n using MathLib for uint;\n using MathLib for int;\n using SafeERC20 for ERC20;\n\n struct UserNetPosition {\n Position[] positions; // all open positions (lifo upon exit - allows us to not reindex array!)\n int netPosition; // net position across all prices / executions\n }\n\n struct Position {\n uint price;\n int qty;\n }\n\n mapping(address => uint) public contractAddressToCollateralPoolBalance; // current balance of all collateral committed\n mapping(address => mapping(address => UserNetPosition)) contractAddressToUserPosition;\n\n // stores account balances allowed to be allocated to orders\n mapping(address => mapping(address => uint)) public tokenAddressToAccountBalance;\n // stores account balances lock time\n mapping(address => mapping(address => uint)) public tokenAddressToBalanceLockTime;\n\n address public marketTradingHub;\n\n event UpdatedUserBalance(address indexed collateralTokenAddress, address indexed user, uint balance);\n\n constructor() public { }\n\n /// @notice get the net position for a give user address\n /// @param marketContractAddress MARKET Contract address to return position for\n /// @param userAddress address to return position for\n /// @return the users current open position.\n function getUserNetPosition(address marketContractAddress, address userAddress) external view returns (int) {\n return contractAddressToUserPosition[marketContractAddress][userAddress].netPosition;\n }\n\n /// @notice gets the number of positions currently held by this address. Useful for iterating\n /// over the positions array in order to retrieve all users data.\n /// @param marketContractAddress MARKET Contract address\n /// @param userAddress address of user\n /// @return number of open unique positions in the array.\n function getUserPositionCount(address marketContractAddress, address userAddress) external view returns (uint) {\n return contractAddressToUserPosition[marketContractAddress][userAddress].positions.length;\n }\n\n /// @notice Allows for retrieval of user position struct (since solidity cannot return the struct) we return\n /// the data as a tuple of (uint, int) that represents (price, qty)\n /// @param marketContractAddress MARKET Contract address\n /// @param userAddress address of user\n /// @param index 0 based index of position in array (older positions are lower indexes)\n /// @return (price, qty) tuple\n function getUserPosition(\n address marketContractAddress,\n address userAddress,\n uint index\n ) external view returns (uint, int)\n {\n Position storage pos = contractAddressToUserPosition[marketContractAddress][userAddress].positions[index];\n return (pos.price, pos.qty);\n }\n\n /// @param collateralTokenAddress ERC20 token address\n /// @param userAddress address of user\n /// @return the users currently unallocated token balance\n function getUserUnallocatedBalance(\n address collateralTokenAddress,\n address userAddress\n ) external view returns (uint)\n {\n return tokenAddressToAccountBalance[collateralTokenAddress][userAddress];\n }\n\n /*\n // EXTERNAL METHODS\n */\n\n /// @notice deposits tokens to the smart contract to fund the user account and provide needed tokens for collateral\n /// pool upon trade matching.\n /// @param collateralTokenAddress ERC20 token address\n /// @param depositAmount qty of ERC20 tokens to deposit to the smart contract to cover open orders and collateral\n function depositTokensForTrading(address collateralTokenAddress, uint256 depositAmount) external {\n uint256 balanceAfterDeposit = tokenAddressToAccountBalance[collateralTokenAddress][msg.sender].add(depositAmount);\n ERC20(collateralTokenAddress).safeTransferFrom(msg.sender, this, depositAmount);\n tokenAddressToAccountBalance[collateralTokenAddress][msg.sender] = balanceAfterDeposit;\n emit UpdatedUserBalance(collateralTokenAddress, msg.sender, balanceAfterDeposit);\n }\n\n // @notice called by a user after settlement has occurred. This function will finalize all accounting around any\n // outstanding positions and return all remaining collateral to the caller. This should only be called after\n // settlement has occurred.\n /// @param marketContractAddress address of the MARKET Contract being traded.\n function settleAndClose(address marketContractAddress) external {\n MarketContract marketContract = MarketContract(marketContractAddress);\n require(marketContract.isSettled(), \"Contract is not settled\");\n UserNetPosition storage userNetPos = contractAddressToUserPosition[marketContractAddress][msg.sender];\n if (userNetPos.netPosition != 0) {\n // this user has a position that we need to settle based upon the settlement price of the contract\n reduceUserNetPosition(\n marketContract,\n userNetPos,\n msg.sender,\n userNetPos.netPosition * - 1,\n marketContract.settlementPrice()\n );\n }\n\n // transfer all balances back to user.\n withdrawTokens(\n marketContract.COLLATERAL_TOKEN_ADDRESS(),\n tokenAddressToAccountBalance[marketContract.COLLATERAL_TOKEN_ADDRESS()][msg.sender]\n );\n }\n\n /// @dev called by our linked trading hub when a trade occurs to update both maker and takers positions.\n /// @param marketContractAddress address of the market contract being traded\n /// @param maker address of the maker in the trade\n /// @param taker address of the taker in the trade\n /// @param qty quantity transacted between parties\n /// @param price agreed price of the matched trade.\n function updatePositions(\n address marketContractAddress,\n address maker,\n address taker,\n int qty,\n uint price\n ) external onlyTradingHub\n {\n MarketContract marketContract = MarketContract(marketContractAddress);\n updatePosition(\n marketContract,\n maker,\n qty,\n price\n );\n // continue process for taker, but qty is opposite sign for taker\n updatePosition(\n marketContract,\n taker,\n qty * -1,\n price\n );\n }\n\n /*\n // PUBLIC METHODS\n */\n\n /// @notice allows for us to set our trading hub address post deployment.\n /// @param marketTradingHubAddress address of our linked trading hub\n function setMarketTradingHubAddress(address marketTradingHubAddress) public onlyOwner {\n marketTradingHub = marketTradingHubAddress;\n }\n\n /// @notice removes token from users trading account\n /// @param collateralTokenAddress ERC20 token address\n /// @param withdrawAmount qty of token to attempt to withdraw\n function withdrawTokens(address collateralTokenAddress, uint256 withdrawAmount) public {\n uint256 balanceAfterWithdrawal = tokenAddressToAccountBalance[collateralTokenAddress][msg.sender].subtract(\n withdrawAmount\n );\n\n tokenAddressToAccountBalance[collateralTokenAddress][msg.sender] = balanceAfterWithdrawal; // update balance before external call!\n ERC20(collateralTokenAddress).safeTransfer(msg.sender, withdrawAmount);\n emit UpdatedUserBalance(collateralTokenAddress, msg.sender, balanceAfterWithdrawal);\n }\n\n /*\n // PRIVATE METHODS\n */\n\n /// @notice moves collateral from a user's account to the pool upon trade execution.\n /// @param marketContract the MARKET Contract being traded.\n /// @param fromAddress address of user entering trade\n /// @param collateralAmount amount of collateral to transfer from user account to collateral pool\n function commitCollateralToPool(\n MarketContract marketContract,\n address fromAddress,\n uint collateralAmount\n ) private\n {\n uint newBalance = tokenAddressToAccountBalance[marketContract.COLLATERAL_TOKEN_ADDRESS()][fromAddress].subtract(\n collateralAmount\n );\n\n tokenAddressToAccountBalance[marketContract.COLLATERAL_TOKEN_ADDRESS()][fromAddress] = newBalance;\n contractAddressToCollateralPoolBalance[marketContract] = contractAddressToCollateralPoolBalance[marketContract].add(collateralAmount);\n\n emit UpdatedUserBalance(marketContract.COLLATERAL_TOKEN_ADDRESS(), fromAddress, newBalance);\n }\n\n /// @notice withdraws collateral from pool to a user account upon exit or trade settlement\n /// @param marketContract the MARKET Contract being traded.\n /// @param toAddress address of user\n /// @param collateralAmount amount to transfer from pool to user.\n function withdrawCollateralFromPool(\n MarketContract marketContract,\n address toAddress,\n uint collateralAmount\n ) private\n {\n uint newBalance = tokenAddressToAccountBalance[marketContract.COLLATERAL_TOKEN_ADDRESS()][toAddress].add(collateralAmount);\n tokenAddressToAccountBalance[marketContract.COLLATERAL_TOKEN_ADDRESS()][toAddress] = newBalance;\n contractAddressToCollateralPoolBalance[marketContract] = contractAddressToCollateralPoolBalance[marketContract].subtract(\n collateralAmount\n );\n\n emit UpdatedUserBalance(marketContract.COLLATERAL_TOKEN_ADDRESS(), toAddress, newBalance);\n }\n\n /// @dev handles all needed internal accounting when a user enters into a new trade\n /// @param marketContract the MARKET Contract being traded.\n /// @param userAddress storage struct containing position information for this user\n /// @param qty signed quantity this users position is changing by, + for buy and - for sell\n /// @param price transacted price of the new position / trade\n function updatePosition(\n MarketContract marketContract,\n address userAddress,\n int qty,\n uint price\n ) private\n {\n UserNetPosition storage userNetPosition = contractAddressToUserPosition[marketContract][userAddress];\n if (userNetPosition.netPosition == 0 || userNetPosition.netPosition.isSameSign(qty)) {\n // new position or adding to open pos\n addUserNetPosition(\n marketContract,\n userNetPosition,\n userAddress,\n qty,\n price\n );\n } else { // opposite side from open position, reduce, flattened, or flipped.\n if (userNetPosition.netPosition.abs() >= qty.abs()) { // pos is reduced or flattened\n reduceUserNetPosition(\n marketContract,\n userNetPosition,\n userAddress,\n qty,\n price\n );\n } else { // pos is flipped, reduce and then create new open pos!\n reduceUserNetPosition(\n marketContract,\n userNetPosition,\n userAddress,\n userNetPosition.netPosition * -1,\n price\n ); // flatten completely\n\n int newNetPos = userNetPosition.netPosition + qty; // the portion remaining after flattening\n addUserNetPosition(\n marketContract,\n userNetPosition,\n userAddress,\n newNetPos,\n price\n );\n }\n }\n userNetPosition.netPosition = userNetPosition.netPosition.add(qty); // keep track of total net pos across all prices for user.\n }\n\n /// @dev calculates the needed collateral for a new position and commits it to the pool removing it from the\n /// users account and creates the needed Position struct to record the new position.\n /// @param marketContract The MARKET Contract being traded.\n /// @param userNetPosition current positions held by user\n /// @param userAddress address of user entering into the position\n /// @param qty signed quantity of the trade\n /// @param price agreed price of trade\n function addUserNetPosition(\n MarketContract marketContract,\n UserNetPosition storage userNetPosition,\n address userAddress,\n int qty,\n uint price\n ) private\n {\n uint neededCollateral = MathLib.calculateNeededCollateral(\n marketContract.PRICE_FLOOR(),\n marketContract.PRICE_CAP(),\n marketContract.QTY_MULTIPLIER(),\n qty,\n price\n );\n commitCollateralToPool(marketContract, userAddress, neededCollateral);\n userNetPosition.positions.push(Position(price, qty)); // append array with new position\n }\n\n /// @dev reduces net position correctly allocating collateral back to user\n /// @param marketContract The MARKET Contract being traded.\n /// @param userNetPos storage struct for this users position\n /// @param userAddress address of user who is reducing their pos\n /// @param qty signed quantity of the qty to reduce this users position by\n /// @param price transacted price\n function reduceUserNetPosition(\n MarketContract marketContract,\n UserNetPosition storage userNetPos,\n address userAddress,\n int qty,\n uint price\n ) private\n {\n uint collateralToReturnToUserAccount = 0;\n int qtyToReduce = qty; // note: this sign is opposite of our users position\n assert(userNetPos.positions.length != 0); // sanity check\n while (qtyToReduce != 0) { //TODO: ensure we dont run out of gas here!\n Position storage position = userNetPos.positions[userNetPos.positions.length - 1]; // get the last pos (LIFO)\n if (position.qty.abs() <= qtyToReduce.abs()) { // this position is completely consumed!\n collateralToReturnToUserAccount = collateralToReturnToUserAccount.add(\n MathLib.calculateNeededCollateral(\n marketContract.PRICE_FLOOR(),\n marketContract.PRICE_CAP(),\n marketContract.QTY_MULTIPLIER(),\n position.qty,\n price\n )\n );\n qtyToReduce = qtyToReduce.add(position.qty);\n userNetPos.positions.length--; // remove this position from our array.\n } else { // this position stays, just reduce the qty.\n position.qty = position.qty.add(qtyToReduce);\n // pos is opp sign of qty we are reducing here!\n collateralToReturnToUserAccount = collateralToReturnToUserAccount.add(\n MathLib.calculateNeededCollateral(\n marketContract.PRICE_FLOOR(),\n marketContract.PRICE_CAP(),\n marketContract.QTY_MULTIPLIER(),\n qtyToReduce * -1,\n price\n )\n );\n// qtyToReduce = 0; // completely reduced now!\n break;\n }\n }\n\n if (collateralToReturnToUserAccount != 0) { // allocate funds back to user acct.\n withdrawCollateralFromPool(marketContract, userAddress, collateralToReturnToUserAccount);\n }\n }\n\n modifier onlyTradingHub() {\n require(msg.sender == marketTradingHub, \"Can only be called by the trading hub\");\n _;\n }\n}\n", + "sourcePath": "/home/travis/build/MARKETProtocol/MARKETProtocol/contracts/MarketCollateralPool.sol", + "ast": { + "absolutePath": "/home/travis/build/MARKETProtocol/MARKETProtocol/contracts/MarketCollateralPool.sol", + "exportedSymbols": { + "MarketCollateralPool": [ + 841 + ] + }, + "id": 842, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 91, + "literals": [ + "solidity", + "^", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "608:24:2" + }, + { + "absolutePath": "/home/travis/build/MARKETProtocol/MARKETProtocol/contracts/libraries/MathLib.sol", + "file": "./libraries/MathLib.sol", + "id": 92, + "nodeType": "ImportDirective", + "scope": 842, + "sourceUnit": 2799, + "src": "634:33:2", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/travis/build/MARKETProtocol/MARKETProtocol/contracts/MarketContract.sol", + "file": "./MarketContract.sol", + "id": 93, + "nodeType": "ImportDirective", + "scope": 842, + "sourceUnit": 1019, + "src": "668:30:2", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol", + "file": "openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol", + "id": 94, + "nodeType": "ImportDirective", + "scope": 842, + "sourceUnit": 7388, + "src": "700:67:2", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol", + "file": "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol", + "id": 95, + "nodeType": "ImportDirective", + "scope": 842, + "sourceUnit": 7294, + "src": "768:63:2", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "openzeppelin-solidity/contracts/ownership/Ownable.sol", + "file": "openzeppelin-solidity/contracts/ownership/Ownable.sol", + "id": 96, + "nodeType": "ImportDirective", + "scope": 842, + "sourceUnit": 7084, + "src": "832:63:2", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 97, + "name": "Ownable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 7083, + "src": "1249:7:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Ownable_$7083", + "typeString": "contract Ownable" + } + }, + "id": 98, + "nodeType": "InheritanceSpecifier", + "src": "1249:7:2" + } + ], + "contractDependencies": [ + 7083 + ], + "contractKind": "contract", + "documentation": "@author Phil Elsasser ", + "fullyImplemented": true, + "id": 841, + "linearizedBaseContracts": [ + 841, + 7083 + ], + "name": "MarketCollateralPool", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 101, + "libraryName": { + "contractScope": null, + "id": 99, + "name": "MathLib", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2798, + "src": "1269:7:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MathLib_$2798", + "typeString": "library MathLib" + } + }, + "nodeType": "UsingForDirective", + "src": "1263:23:2", + "typeName": { + "id": 100, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1281:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "id": 104, + "libraryName": { + "contractScope": null, + "id": 102, + "name": "MathLib", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2798, + "src": "1297:7:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MathLib_$2798", + "typeString": "library MathLib" + } + }, + "nodeType": "UsingForDirective", + "src": "1291:22:2", + "typeName": { + "id": 103, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "1309:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + }, + { + "id": 107, + "libraryName": { + "contractScope": null, + "id": 105, + "name": "SafeERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 7387, + "src": "1324:9:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeERC20_$7387", + "typeString": "library SafeERC20" + } + }, + "nodeType": "UsingForDirective", + "src": "1318:26:2", + "typeName": { + "contractScope": null, + "id": 106, + "name": "ERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 7293, + "src": "1338:5:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20_$7293", + "typeString": "contract ERC20" + } + } + }, + { + "canonicalName": "MarketCollateralPool.UserNetPosition", + "id": 113, + "members": [ + { + "constant": false, + "id": 110, + "name": "positions", + "nodeType": "VariableDeclaration", + "scope": 113, + "src": "1383:20:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_Position_$118_storage_$dyn_storage_ptr", + "typeString": "struct MarketCollateralPool.Position[]" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 108, + "name": "Position", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 118, + "src": "1383:8:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Position_$118_storage_ptr", + "typeString": "struct MarketCollateralPool.Position" + } + }, + "id": 109, + "length": null, + "nodeType": "ArrayTypeName", + "src": "1383:10:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_Position_$118_storage_$dyn_storage_ptr", + "typeString": "struct MarketCollateralPool.Position[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 112, + "name": "netPosition", + "nodeType": "VariableDeclaration", + "scope": 113, + "src": "1488:15:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 111, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "1488:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "name": "UserNetPosition", + "nodeType": "StructDefinition", + "scope": 841, + "src": "1350:214:2", + "visibility": "public" + }, + { + "canonicalName": "MarketCollateralPool.Position", + "id": 118, + "members": [ + { + "constant": false, + "id": 115, + "name": "price", + "nodeType": "VariableDeclaration", + "scope": 118, + "src": "1596:10:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 114, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1596:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 117, + "name": "qty", + "nodeType": "VariableDeclaration", + "scope": 118, + "src": "1616:7:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 116, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "1616:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "name": "Position", + "nodeType": "StructDefinition", + "scope": 841, + "src": "1570:60:2", + "visibility": "public" + }, + { + "constant": false, + "id": 122, + "name": "contractAddressToCollateralPoolBalance", + "nodeType": "VariableDeclaration", + "scope": 841, + "src": "1636:70:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 121, + "keyType": { + "id": 119, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1644:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1636:24:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 120, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1655:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 128, + "name": "contractAddressToUserPosition", + "nodeType": "VariableDeclaration", + "scope": 841, + "src": "1775:85:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_struct$_UserNetPosition_$113_storage_$_$", + "typeString": "mapping(address => mapping(address => struct MarketCollateralPool.UserNetPosition))" + }, + "typeName": { + "id": 127, + "keyType": { + "id": 123, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1783:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1775:55:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_struct$_UserNetPosition_$113_storage_$_$", + "typeString": "mapping(address => mapping(address => struct MarketCollateralPool.UserNetPosition))" + }, + "valueType": { + "id": 126, + "keyType": { + "id": 124, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1802:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1794:35:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_UserNetPosition_$113_storage_$", + "typeString": "mapping(address => struct MarketCollateralPool.UserNetPosition)" + }, + "valueType": { + "contractScope": null, + "id": 125, + "name": "UserNetPosition", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 113, + "src": "1813:15:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_UserNetPosition_$113_storage_ptr", + "typeString": "struct MarketCollateralPool.UserNetPosition" + } + } + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 134, + "name": "tokenAddressToAccountBalance", + "nodeType": "VariableDeclaration", + "scope": 841, + "src": "1932:80:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + }, + "typeName": { + "id": 133, + "keyType": { + "id": 129, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1940:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1932:44:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + }, + "valueType": { + "id": 132, + "keyType": { + "id": 130, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1959:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1951:24:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 131, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1970:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 140, + "name": "tokenAddressToBalanceLockTime", + "nodeType": "VariableDeclaration", + "scope": 841, + "src": "2059:81:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + }, + "typeName": { + "id": 139, + "keyType": { + "id": 135, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2067:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "2059:44:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + }, + "valueType": { + "id": 138, + "keyType": { + "id": 136, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2086:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "2078:24:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 137, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2097:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 142, + "name": "marketTradingHub", + "nodeType": "VariableDeclaration", + "scope": 841, + "src": "2147:31:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 141, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2147:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": null, + "id": 150, + "name": "UpdatedUserBalance", + "nodeType": "EventDefinition", + "parameters": { + "id": 149, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 144, + "indexed": true, + "name": "collateralTokenAddress", + "nodeType": "VariableDeclaration", + "scope": 150, + "src": "2210:38:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 143, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2210:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 146, + "indexed": true, + "name": "user", + "nodeType": "VariableDeclaration", + "scope": 150, + "src": "2250:20:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 145, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2250:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 148, + "indexed": false, + "name": "balance", + "nodeType": "VariableDeclaration", + "scope": 150, + "src": "2272:12:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 147, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2272:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2209:76:2" + }, + "src": "2185:101:2" + }, + { + "body": { + "id": 153, + "nodeType": "Block", + "src": "2313:3:2", + "statements": [] + }, + "documentation": null, + "id": 154, + "implemented": true, + "isConstructor": true, + "isDeclaredConst": false, + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 151, + "nodeType": "ParameterList", + "parameters": [], + "src": "2303:2:2" + }, + "payable": false, + "returnParameters": { + "id": 152, + "nodeType": "ParameterList", + "parameters": [], + "src": "2313:0:2" + }, + "scope": 841, + "src": "2292:24:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 170, + "nodeType": "Block", + "src": "2682:101:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 163, + "name": "contractAddressToUserPosition", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 128, + "src": "2699:29:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_struct$_UserNetPosition_$113_storage_$_$", + "typeString": "mapping(address => mapping(address => struct MarketCollateralPool.UserNetPosition storage ref))" + } + }, + "id": 165, + "indexExpression": { + "argumentTypes": null, + "id": 164, + "name": "marketContractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 156, + "src": "2729:21:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2699:52:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_UserNetPosition_$113_storage_$", + "typeString": "mapping(address => struct MarketCollateralPool.UserNetPosition storage ref)" + } + }, + "id": 167, + "indexExpression": { + "argumentTypes": null, + "id": 166, + "name": "userAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 158, + "src": "2752:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2699:65:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_UserNetPosition_$113_storage", + "typeString": "struct MarketCollateralPool.UserNetPosition storage ref" + } + }, + "id": 168, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "netPosition", + "nodeType": "MemberAccess", + "referencedDeclaration": 112, + "src": "2699:77:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "functionReturnParameters": 162, + "id": 169, + "nodeType": "Return", + "src": "2692:84:2" + } + ] + }, + "documentation": "@notice get the net position for a give user address\n @param marketContractAddress MARKET Contract address to return position for\n @param userAddress address to return position for\n @return the users current open position.", + "id": 171, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getUserNetPosition", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 159, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 156, + "name": "marketContractAddress", + "nodeType": "VariableDeclaration", + "scope": 171, + "src": "2602:29:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 155, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2602:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 158, + "name": "userAddress", + "nodeType": "VariableDeclaration", + "scope": 171, + "src": "2633:19:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 157, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2633:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2601:52:2" + }, + "payable": false, + "returnParameters": { + "id": 162, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 161, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 171, + "src": "2677:3:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 160, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "2677:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2676:5:2" + }, + "scope": 841, + "src": "2574:209:2", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 188, + "nodeType": "Block", + "src": "3234:106:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 180, + "name": "contractAddressToUserPosition", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 128, + "src": "3251:29:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_struct$_UserNetPosition_$113_storage_$_$", + "typeString": "mapping(address => mapping(address => struct MarketCollateralPool.UserNetPosition storage ref))" + } + }, + "id": 182, + "indexExpression": { + "argumentTypes": null, + "id": 181, + "name": "marketContractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 173, + "src": "3281:21:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3251:52:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_UserNetPosition_$113_storage_$", + "typeString": "mapping(address => struct MarketCollateralPool.UserNetPosition storage ref)" + } + }, + "id": 184, + "indexExpression": { + "argumentTypes": null, + "id": 183, + "name": "userAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 175, + "src": "3304:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3251:65:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_UserNetPosition_$113_storage", + "typeString": "struct MarketCollateralPool.UserNetPosition storage ref" + } + }, + "id": 185, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "positions", + "nodeType": "MemberAccess", + "referencedDeclaration": 110, + "src": "3251:75:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_Position_$118_storage_$dyn_storage", + "typeString": "struct MarketCollateralPool.Position storage ref[] storage ref" + } + }, + "id": 186, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3251:82:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 179, + "id": 187, + "nodeType": "Return", + "src": "3244:89:2" + } + ] + }, + "documentation": "@notice gets the number of positions currently held by this address. Useful for iterating\n over the positions array in order to retrieve all users data.\n @param marketContractAddress MARKET Contract address\n @param userAddress address of user\n @return number of open unique positions in the array.", + "id": 189, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getUserPositionCount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 176, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 173, + "name": "marketContractAddress", + "nodeType": "VariableDeclaration", + "scope": 189, + "src": "3153:29:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 172, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3153:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 175, + "name": "userAddress", + "nodeType": "VariableDeclaration", + "scope": 189, + "src": "3184:19:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 174, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3184:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3152:52:2" + }, + "payable": false, + "returnParameters": { + "id": 179, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 178, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 189, + "src": "3228:4:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 177, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3228:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3227:6:2" + }, + "scope": 841, + "src": "3123:217:2", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 219, + "nodeType": "Block", + "src": "3919:159:2", + "statements": [ + { + "assignments": [ + 203 + ], + "declarations": [ + { + "constant": false, + "id": 203, + "name": "pos", + "nodeType": "VariableDeclaration", + "scope": 220, + "src": "3929:20:2", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Position_$118_storage_ptr", + "typeString": "struct MarketCollateralPool.Position" + }, + "typeName": { + "contractScope": null, + "id": 202, + "name": "Position", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 118, + "src": "3929:8:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Position_$118_storage_ptr", + "typeString": "struct MarketCollateralPool.Position" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 212, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 204, + "name": "contractAddressToUserPosition", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 128, + "src": "3952:29:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_struct$_UserNetPosition_$113_storage_$_$", + "typeString": "mapping(address => mapping(address => struct MarketCollateralPool.UserNetPosition storage ref))" + } + }, + "id": 206, + "indexExpression": { + "argumentTypes": null, + "id": 205, + "name": "marketContractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 191, + "src": "3982:21:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3952:52:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_UserNetPosition_$113_storage_$", + "typeString": "mapping(address => struct MarketCollateralPool.UserNetPosition storage ref)" + } + }, + "id": 208, + "indexExpression": { + "argumentTypes": null, + "id": 207, + "name": "userAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 193, + "src": "4005:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3952:65:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_UserNetPosition_$113_storage", + "typeString": "struct MarketCollateralPool.UserNetPosition storage ref" + } + }, + "id": 209, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "positions", + "nodeType": "MemberAccess", + "referencedDeclaration": 110, + "src": "3952:75:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_Position_$118_storage_$dyn_storage", + "typeString": "struct MarketCollateralPool.Position storage ref[] storage ref" + } + }, + "id": 211, + "indexExpression": { + "argumentTypes": null, + "id": 210, + "name": "index", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 195, + "src": "4028:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3952:82:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Position_$118_storage", + "typeString": "struct MarketCollateralPool.Position storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3929:105:2" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 213, + "name": "pos", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 203, + "src": "4052:3:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Position_$118_storage_ptr", + "typeString": "struct MarketCollateralPool.Position storage pointer" + } + }, + "id": 214, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "price", + "nodeType": "MemberAccess", + "referencedDeclaration": 115, + "src": "4052:9:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 215, + "name": "pos", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 203, + "src": "4063:3:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Position_$118_storage_ptr", + "typeString": "struct MarketCollateralPool.Position storage pointer" + } + }, + "id": 216, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "qty", + "nodeType": "MemberAccess", + "referencedDeclaration": 117, + "src": "4063:7:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "id": 217, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "4051:20:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_int256_$", + "typeString": "tuple(uint256,int256)" + } + }, + "functionReturnParameters": 201, + "id": 218, + "nodeType": "Return", + "src": "4044:27:2" + } + ] + }, + "documentation": "@notice Allows for retrieval of user position struct (since solidity cannot return the struct) we return\n the data as a tuple of (uint, int) that represents (price, qty)\n @param marketContractAddress MARKET Contract address\n @param userAddress address of user\n @param index 0 based index of position in array (older positions are lower indexes)\n @return (price, qty) tuple", + "id": 220, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getUserPosition", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 196, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 191, + "name": "marketContractAddress", + "nodeType": "VariableDeclaration", + "scope": 220, + "src": "3796:29:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 190, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3796:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 193, + "name": "userAddress", + "nodeType": "VariableDeclaration", + "scope": 220, + "src": "3835:19:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 192, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3835:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 195, + "name": "index", + "nodeType": "VariableDeclaration", + "scope": 220, + "src": "3864:10:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 194, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3864:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3786:94:2" + }, + "payable": false, + "returnParameters": { + "id": 201, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 198, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 220, + "src": "3904:4:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 197, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3904:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 200, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 220, + "src": "3910:3:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 199, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "3910:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3903:11:2" + }, + "scope": 841, + "src": "3762:316:2", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 235, + "nodeType": "Block", + "src": "4390:89:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 229, + "name": "tokenAddressToAccountBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 134, + "src": "4407:28:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 231, + "indexExpression": { + "argumentTypes": null, + "id": 230, + "name": "collateralTokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 222, + "src": "4436:22:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4407:52:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 233, + "indexExpression": { + "argumentTypes": null, + "id": 232, + "name": "userAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 224, + "src": "4460:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4407:65:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 228, + "id": 234, + "nodeType": "Return", + "src": "4400:72:2" + } + ] + }, + "documentation": "@param collateralTokenAddress ERC20 token address\n @param userAddress address of user\n @return the users currently unallocated token balance", + "id": 236, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getUserUnallocatedBalance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 225, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 222, + "name": "collateralTokenAddress", + "nodeType": "VariableDeclaration", + "scope": 236, + "src": "4291:30:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 221, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4291:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 224, + "name": "userAddress", + "nodeType": "VariableDeclaration", + "scope": 236, + "src": "4331:19:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 223, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4331:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4281:75:2" + }, + "payable": false, + "returnParameters": { + "id": 228, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 227, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 236, + "src": "4380:4:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 226, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4380:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4379:6:2" + }, + "scope": 841, + "src": "4247:232:2", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 281, + "nodeType": "Block", + "src": "4951:405:2", + "statements": [ + { + "assignments": [ + 244 + ], + "declarations": [ + { + "constant": false, + "id": 244, + "name": "balanceAfterDeposit", + "nodeType": "VariableDeclaration", + "scope": 282, + "src": "4961:27:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 243, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4961:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 254, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 252, + "name": "depositAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 240, + "src": "5060:13:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 245, + "name": "tokenAddressToAccountBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 134, + "src": "4991:28:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 247, + "indexExpression": { + "argumentTypes": null, + "id": 246, + "name": "collateralTokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 238, + "src": "5020:22:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4991:52:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 250, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 248, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8183, + "src": "5044:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 249, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5044:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4991:64:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 251, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 2552, + "src": "4991:68:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 253, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4991:83:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4961:113:2" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 259, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8183, + "src": "5131:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 260, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5131:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 261, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8212, + "src": "5143:4:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketCollateralPool_$841", + "typeString": "contract MarketCollateralPool" + } + }, + { + "argumentTypes": null, + "id": 262, + "name": "depositAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 240, + "src": "5149:13:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_contract$_MarketCollateralPool_$841", + "typeString": "contract MarketCollateralPool" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 256, + "name": "collateralTokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 238, + "src": "5090:22:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 255, + "name": "ERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7293, + "src": "5084:5:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC20_$7293_$", + "typeString": "type(contract ERC20)" + } + }, + "id": 257, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5084:29:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20_$7293", + "typeString": "contract ERC20" + } + }, + "id": 258, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "safeTransferFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 7368, + "src": "5084:46:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_ERC20_$7293_$_t_address_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_ERC20_$7293_$", + "typeString": "function (contract ERC20,address,address,uint256)" + } + }, + "id": 263, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5084:79:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 264, + "nodeType": "ExpressionStatement", + "src": "5084:79:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 272, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 265, + "name": "tokenAddressToAccountBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 134, + "src": "5173:28:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 269, + "indexExpression": { + "argumentTypes": null, + "id": 266, + "name": "collateralTokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 238, + "src": "5202:22:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5173:52:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 270, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 267, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8183, + "src": "5226:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 268, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5226:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5173:64:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 271, + "name": "balanceAfterDeposit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 244, + "src": "5240:19:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5173:86:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 273, + "nodeType": "ExpressionStatement", + "src": "5173:86:2" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 275, + "name": "collateralTokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 238, + "src": "5293:22:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 276, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8183, + "src": "5317:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 277, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5317:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 278, + "name": "balanceAfterDeposit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 244, + "src": "5329:19:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 274, + "name": "UpdatedUserBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 150, + "src": "5274:18:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 279, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5274:75:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 280, + "nodeType": "EmitStatement", + "src": "5269:80:2" + } + ] + }, + "documentation": "@notice deposits tokens to the smart contract to fund the user account and provide needed tokens for collateral\n pool upon trade matching.\n @param collateralTokenAddress ERC20 token address\n @param depositAmount qty of ERC20 tokens to deposit to the smart contract to cover open orders and collateral", + "id": 282, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "depositTokensForTrading", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 241, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 238, + "name": "collateralTokenAddress", + "nodeType": "VariableDeclaration", + "scope": 282, + "src": "4887:30:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 237, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4887:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 240, + "name": "depositAmount", + "nodeType": "VariableDeclaration", + "scope": 282, + "src": "4919:21:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 239, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4919:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4886:55:2" + }, + "payable": false, + "returnParameters": { + "id": 242, + "nodeType": "ParameterList", + "parameters": [], + "src": "4951:0:2" + }, + "scope": 841, + "src": "4854:502:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 344, + "nodeType": "Block", + "src": "5771:900:2", + "statements": [ + { + "assignments": [ + 288 + ], + "declarations": [ + { + "constant": false, + "id": 288, + "name": "marketContract", + "nodeType": "VariableDeclaration", + "scope": 345, + "src": "5781:29:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + }, + "typeName": { + "contractScope": null, + "id": 287, + "name": "MarketContract", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1018, + "src": "5781:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 292, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 290, + "name": "marketContractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 284, + "src": "5828:21:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 289, + "name": "MarketContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1018, + "src": "5813:14:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_MarketContract_$1018_$", + "typeString": "type(contract MarketContract)" + } + }, + "id": 291, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5813:37:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5781:69:2" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 294, + "name": "marketContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 288, + "src": "5868:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + "id": 295, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isSettled", + "nodeType": "MemberAccess", + "referencedDeclaration": 867, + "src": "5868:24:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_bool_$", + "typeString": "function () view external returns (bool)" + } + }, + "id": 296, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5868:26:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "436f6e7472616374206973206e6f7420736574746c6564", + "id": 297, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5896:25:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e85e74ee8892d05d6f146063cf69d91cd6f36266147f7107b539675c925d9eb9", + "typeString": "literal_string \"Contract is not settled\"" + }, + "value": "Contract is not settled" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_e85e74ee8892d05d6f146063cf69d91cd6f36266147f7107b539675c925d9eb9", + "typeString": "literal_string \"Contract is not settled\"" + } + ], + "id": 293, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 8186, + 8187 + ], + "referencedDeclaration": 8187, + "src": "5860:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 298, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5860:62:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 299, + "nodeType": "ExpressionStatement", + "src": "5860:62:2" + }, + { + "assignments": [ + 301 + ], + "declarations": [ + { + "constant": false, + "id": 301, + "name": "userNetPos", + "nodeType": "VariableDeclaration", + "scope": 345, + "src": "5932:34:2", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_UserNetPosition_$113_storage_ptr", + "typeString": "struct MarketCollateralPool.UserNetPosition" + }, + "typeName": { + "contractScope": null, + "id": 300, + "name": "UserNetPosition", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 113, + "src": "5932:15:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_UserNetPosition_$113_storage_ptr", + "typeString": "struct MarketCollateralPool.UserNetPosition" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 308, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 302, + "name": "contractAddressToUserPosition", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 128, + "src": "5969:29:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_struct$_UserNetPosition_$113_storage_$_$", + "typeString": "mapping(address => mapping(address => struct MarketCollateralPool.UserNetPosition storage ref))" + } + }, + "id": 304, + "indexExpression": { + "argumentTypes": null, + "id": 303, + "name": "marketContractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 284, + "src": "5999:21:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5969:52:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_UserNetPosition_$113_storage_$", + "typeString": "mapping(address => struct MarketCollateralPool.UserNetPosition storage ref)" + } + }, + "id": 307, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 305, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8183, + "src": "6022:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 306, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6022:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5969:64:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_UserNetPosition_$113_storage", + "typeString": "struct MarketCollateralPool.UserNetPosition storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5932:101:2" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 312, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 309, + "name": "userNetPos", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 301, + "src": "6047:10:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_UserNetPosition_$113_storage_ptr", + "typeString": "struct MarketCollateralPool.UserNetPosition storage pointer" + } + }, + "id": 310, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "netPosition", + "nodeType": "MemberAccess", + "referencedDeclaration": 112, + "src": "6047:22:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 311, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6073:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "6047:27:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 329, + "nodeType": "IfStatement", + "src": "6043:388:2", + "trueBody": { + "id": 328, + "nodeType": "Block", + "src": "6076:355:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 314, + "name": "marketContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 288, + "src": "6240:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + { + "argumentTypes": null, + "id": 315, + "name": "userNetPos", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 301, + "src": "6272:10:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_UserNetPosition_$113_storage_ptr", + "typeString": "struct MarketCollateralPool.UserNetPosition storage pointer" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 316, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8183, + "src": "6300:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 317, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6300:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 322, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 318, + "name": "userNetPos", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 301, + "src": "6328:10:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_UserNetPosition_$113_storage_ptr", + "typeString": "struct MarketCollateralPool.UserNetPosition storage pointer" + } + }, + "id": 319, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "netPosition", + "nodeType": "MemberAccess", + "referencedDeclaration": 112, + "src": "6328:22:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 321, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "-", + "prefix": true, + "src": "6353:3:2", + "subExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 320, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6355:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "typeDescriptions": { + "typeIdentifier": "t_rational_-1_by_1", + "typeString": "int_const -1" + } + }, + "src": "6328:28:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 323, + "name": "marketContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 288, + "src": "6374:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + "id": 324, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "settlementPrice", + "nodeType": "MemberAccess", + "referencedDeclaration": 864, + "src": "6374:30:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 325, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6374:32:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + }, + { + "typeIdentifier": "t_struct$_UserNetPosition_$113_storage_ptr", + "typeString": "struct MarketCollateralPool.UserNetPosition storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 313, + "name": "reduceUserNetPosition", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 828, + "src": "6201:21:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_MarketContract_$1018_$_t_struct$_UserNetPosition_$113_storage_ptr_$_t_address_$_t_int256_$_t_uint256_$returns$__$", + "typeString": "function (contract MarketContract,struct MarketCollateralPool.UserNetPosition storage pointer,address,int256,uint256)" + } + }, + "id": 326, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6201:219:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 327, + "nodeType": "ExpressionStatement", + "src": "6201:219:2" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 331, + "name": "marketContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 288, + "src": "6516:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + "id": 332, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "COLLATERAL_TOKEN_ADDRESS", + "nodeType": "MemberAccess", + "referencedDeclaration": 850, + "src": "6516:39:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_address_$", + "typeString": "function () view external returns (address)" + } + }, + "id": 333, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6516:41:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 334, + "name": "tokenAddressToAccountBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 134, + "src": "6571:28:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 338, + "indexExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 335, + "name": "marketContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 288, + "src": "6600:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + "id": 336, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "COLLATERAL_TOKEN_ADDRESS", + "nodeType": "MemberAccess", + "referencedDeclaration": 850, + "src": "6600:39:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_address_$", + "typeString": "function () view external returns (address)" + } + }, + "id": 337, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6600:41:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6571:71:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 341, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 339, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8183, + "src": "6643:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 340, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6643:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6571:83:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 330, + "name": "withdrawTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 441, + "src": "6488:14:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 342, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6488:176:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 343, + "nodeType": "ExpressionStatement", + "src": "6488:176:2" + } + ] + }, + "documentation": "@param marketContractAddress address of the MARKET Contract being traded.", + "id": 345, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "settleAndClose", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 285, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 284, + "name": "marketContractAddress", + "nodeType": "VariableDeclaration", + "scope": 345, + "src": "5731:29:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 283, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5731:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5730:31:2" + }, + "payable": false, + "returnParameters": { + "id": 286, + "nodeType": "ParameterList", + "parameters": [], + "src": "5771:0:2" + }, + "scope": 841, + "src": "5707:964:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 383, + "nodeType": "Block", + "src": "7269:399:2", + "statements": [ + { + "assignments": [ + 361 + ], + "declarations": [ + { + "constant": false, + "id": 361, + "name": "marketContract", + "nodeType": "VariableDeclaration", + "scope": 384, + "src": "7279:29:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + }, + "typeName": { + "contractScope": null, + "id": 360, + "name": "MarketContract", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1018, + "src": "7279:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 365, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 363, + "name": "marketContractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 347, + "src": "7326:21:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 362, + "name": "MarketContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1018, + "src": "7311:14:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_MarketContract_$1018_$", + "typeString": "type(contract MarketContract)" + } + }, + "id": 364, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7311:37:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7279:69:2" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 367, + "name": "marketContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 361, + "src": "7386:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + { + "argumentTypes": null, + "id": 368, + "name": "maker", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "7414:5:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 369, + "name": "qty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 353, + "src": "7433:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + { + "argumentTypes": null, + "id": 370, + "name": "price", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 355, + "src": "7450:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 366, + "name": "updatePosition", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 642, + "src": "7358:14:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_MarketContract_$1018_$_t_address_$_t_int256_$_t_uint256_$returns$__$", + "typeString": "function (contract MarketContract,address,int256,uint256)" + } + }, + "id": 371, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7358:107:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 372, + "nodeType": "ExpressionStatement", + "src": "7358:107:2" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 374, + "name": "marketContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 361, + "src": "7577:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + { + "argumentTypes": null, + "id": 375, + "name": "taker", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 351, + "src": "7605:5:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 379, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 376, + "name": "qty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 353, + "src": "7624:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 378, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "-", + "prefix": true, + "src": "7630:2:2", + "subExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 377, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7631:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "typeDescriptions": { + "typeIdentifier": "t_rational_-1_by_1", + "typeString": "int_const -1" + } + }, + "src": "7624:8:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + { + "argumentTypes": null, + "id": 380, + "name": "price", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 355, + "src": "7646:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 373, + "name": "updatePosition", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 642, + "src": "7549:14:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_MarketContract_$1018_$_t_address_$_t_int256_$_t_uint256_$returns$__$", + "typeString": "function (contract MarketContract,address,int256,uint256)" + } + }, + "id": 381, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7549:112:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 382, + "nodeType": "ExpressionStatement", + "src": "7549:112:2" + } + ] + }, + "documentation": "@dev called by our linked trading hub when a trade occurs to update both maker and takers positions.\n @param marketContractAddress address of the market contract being traded\n @param maker address of the maker in the trade\n @param taker address of the taker in the trade\n @param qty quantity transacted between parties\n @param price agreed price of the matched trade.", + "id": 384, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 358, + "modifierName": { + "argumentTypes": null, + "id": 357, + "name": "onlyTradingHub", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 840, + "src": "7250:14:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "7250:14:2" + } + ], + "name": "updatePositions", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 356, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 347, + "name": "marketContractAddress", + "nodeType": "VariableDeclaration", + "scope": 384, + "src": "7122:29:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 346, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7122:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 349, + "name": "maker", + "nodeType": "VariableDeclaration", + "scope": 384, + "src": "7161:13:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 348, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7161:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 351, + "name": "taker", + "nodeType": "VariableDeclaration", + "scope": 384, + "src": "7184:13:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 350, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7184:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 353, + "name": "qty", + "nodeType": "VariableDeclaration", + "scope": 384, + "src": "7207:7:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 352, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "7207:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 355, + "name": "price", + "nodeType": "VariableDeclaration", + "scope": 384, + "src": "7224:10:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 354, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "7224:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7112:128:2" + }, + "payable": false, + "returnParameters": { + "id": 359, + "nodeType": "ParameterList", + "parameters": [], + "src": "7269:0:2" + }, + "scope": 841, + "src": "7088:580:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 395, + "nodeType": "Block", + "src": "7948:59:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 393, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 391, + "name": "marketTradingHub", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 142, + "src": "7958:16:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 392, + "name": "marketTradingHubAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 386, + "src": "7977:23:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "7958:42:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 394, + "nodeType": "ExpressionStatement", + "src": "7958:42:2" + } + ] + }, + "documentation": "@notice allows for us to set our trading hub address post deployment.\n @param marketTradingHubAddress address of our linked trading hub", + "id": 396, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 389, + "modifierName": { + "argumentTypes": null, + "id": 388, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7057, + "src": "7938:9:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "7938:9:2" + } + ], + "name": "setMarketTradingHubAddress", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 387, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 386, + "name": "marketTradingHubAddress", + "nodeType": "VariableDeclaration", + "scope": 396, + "src": "7898:31:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 385, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7898:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7897:33:2" + }, + "payable": false, + "returnParameters": { + "id": 390, + "nodeType": "ParameterList", + "parameters": [], + "src": "7948:0:2" + }, + "scope": 841, + "src": "7862:145:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 440, + "nodeType": "Block", + "src": "8281:476:2", + "statements": [ + { + "assignments": [ + 404 + ], + "declarations": [ + { + "constant": false, + "id": 404, + "name": "balanceAfterWithdrawal", + "nodeType": "VariableDeclaration", + "scope": 441, + "src": "8291:30:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 403, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8291:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 414, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 412, + "name": "withdrawAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 400, + "src": "8411:14:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 405, + "name": "tokenAddressToAccountBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 134, + "src": "8324:28:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 407, + "indexExpression": { + "argumentTypes": null, + "id": 406, + "name": "collateralTokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 398, + "src": "8353:22:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8324:52:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 410, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 408, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8183, + "src": "8377:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 409, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "8377:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8324:64:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 411, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "subtract", + "nodeType": "MemberAccess", + "referencedDeclaration": 2528, + "src": "8324:73:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 413, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8324:111:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8291:144:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 422, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 415, + "name": "tokenAddressToAccountBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 134, + "src": "8446:28:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 419, + "indexExpression": { + "argumentTypes": null, + "id": 416, + "name": "collateralTokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 398, + "src": "8475:22:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8446:52:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 420, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 417, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8183, + "src": "8499:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 418, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "8499:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "8446:64:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 421, + "name": "balanceAfterWithdrawal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 404, + "src": "8513:22:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8446:89:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 423, + "nodeType": "ExpressionStatement", + "src": "8446:89:2" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 428, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8183, + "src": "8630:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 429, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "8630:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 430, + "name": "withdrawAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 400, + "src": "8642:14:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 425, + "name": "collateralTokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 398, + "src": "8593:22:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 424, + "name": "ERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7293, + "src": "8587:5:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC20_$7293_$", + "typeString": "type(contract ERC20)" + } + }, + "id": 426, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8587:29:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20_$7293", + "typeString": "contract ERC20" + } + }, + "id": 427, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "safeTransfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 7347, + "src": "8587:42:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_ERC20Basic_$7325_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_ERC20Basic_$7325_$", + "typeString": "function (contract ERC20Basic,address,uint256)" + } + }, + "id": 431, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8587:70:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 432, + "nodeType": "ExpressionStatement", + "src": "8587:70:2" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 434, + "name": "collateralTokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 398, + "src": "8691:22:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 435, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8183, + "src": "8715:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 436, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "8715:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 437, + "name": "balanceAfterWithdrawal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 404, + "src": "8727:22:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 433, + "name": "UpdatedUserBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 150, + "src": "8672:18:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 438, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8672:78:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 439, + "nodeType": "EmitStatement", + "src": "8667:83:2" + } + ] + }, + "documentation": "@notice removes token from users trading account\n @param collateralTokenAddress ERC20 token address\n @param withdrawAmount qty of token to attempt to withdraw", + "id": 441, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "withdrawTokens", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 401, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 398, + "name": "collateralTokenAddress", + "nodeType": "VariableDeclaration", + "scope": 441, + "src": "8218:30:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 397, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8218:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 400, + "name": "withdrawAmount", + "nodeType": "VariableDeclaration", + "scope": 441, + "src": "8250:22:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 399, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8250:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8217:56:2" + }, + "payable": false, + "returnParameters": { + "id": 402, + "nodeType": "ParameterList", + "parameters": [], + "src": "8281:0:2" + }, + "scope": 841, + "src": "8194:563:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 492, + "nodeType": "Block", + "src": "9263:525:2", + "statements": [ + { + "assignments": [ + 451 + ], + "declarations": [ + { + "constant": false, + "id": 451, + "name": "newBalance", + "nodeType": "VariableDeclaration", + "scope": 493, + "src": "9273:15:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 450, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "9273:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 462, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 460, + "name": "collateralAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 447, + "src": "9402:16:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 452, + "name": "tokenAddressToAccountBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 134, + "src": "9291:28:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 456, + "indexExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 453, + "name": "marketContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 443, + "src": "9320:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + "id": 454, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "COLLATERAL_TOKEN_ADDRESS", + "nodeType": "MemberAccess", + "referencedDeclaration": 850, + "src": "9320:39:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_address_$", + "typeString": "function () view external returns (address)" + } + }, + "id": 455, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9320:41:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9291:71:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 458, + "indexExpression": { + "argumentTypes": null, + "id": 457, + "name": "fromAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 445, + "src": "9363:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9291:84:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 459, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "subtract", + "nodeType": "MemberAccess", + "referencedDeclaration": 2528, + "src": "9291:93:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 461, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9291:137:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9273:155:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 471, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 463, + "name": "tokenAddressToAccountBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 134, + "src": "9439:28:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 468, + "indexExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 464, + "name": "marketContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 443, + "src": "9468:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + "id": 465, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "COLLATERAL_TOKEN_ADDRESS", + "nodeType": "MemberAccess", + "referencedDeclaration": 850, + "src": "9468:39:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_address_$", + "typeString": "function () view external returns (address)" + } + }, + "id": 466, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9468:41:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9439:71:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 469, + "indexExpression": { + "argumentTypes": null, + "id": 467, + "name": "fromAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 445, + "src": "9511:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "9439:84:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 470, + "name": "newBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 451, + "src": "9526:10:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9439:97:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 472, + "nodeType": "ExpressionStatement", + "src": "9439:97:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 482, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 473, + "name": "contractAddressToCollateralPoolBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 122, + "src": "9546:38:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 475, + "indexExpression": { + "argumentTypes": null, + "id": 474, + "name": "marketContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 443, + "src": "9585:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "9546:54:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 480, + "name": "collateralAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 447, + "src": "9662:16:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 476, + "name": "contractAddressToCollateralPoolBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 122, + "src": "9603:38:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 478, + "indexExpression": { + "argumentTypes": null, + "id": 477, + "name": "marketContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 443, + "src": "9642:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9603:54:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 479, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 2552, + "src": "9603:58:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 481, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9603:76:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9546:133:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 483, + "nodeType": "ExpressionStatement", + "src": "9546:133:2" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 485, + "name": "marketContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 443, + "src": "9714:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + "id": 486, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "COLLATERAL_TOKEN_ADDRESS", + "nodeType": "MemberAccess", + "referencedDeclaration": 850, + "src": "9714:39:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_address_$", + "typeString": "function () view external returns (address)" + } + }, + "id": 487, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9714:41:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 488, + "name": "fromAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 445, + "src": "9757:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 489, + "name": "newBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 451, + "src": "9770:10:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 484, + "name": "UpdatedUserBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 150, + "src": "9695:18:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 490, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9695:86:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 491, + "nodeType": "EmitStatement", + "src": "9690:91:2" + } + ] + }, + "documentation": "@notice moves collateral from a user's account to the pool upon trade execution.\n @param marketContract the MARKET Contract being traded.\n @param fromAddress address of user entering trade\n @param collateralAmount amount of collateral to transfer from user account to collateral pool", + "id": 493, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "commitCollateralToPool", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 448, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 443, + "name": "marketContract", + "nodeType": "VariableDeclaration", + "scope": 493, + "src": "9155:29:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + }, + "typeName": { + "contractScope": null, + "id": 442, + "name": "MarketContract", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1018, + "src": "9155:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 445, + "name": "fromAddress", + "nodeType": "VariableDeclaration", + "scope": 493, + "src": "9194:19:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 444, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9194:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 447, + "name": "collateralAmount", + "nodeType": "VariableDeclaration", + "scope": 493, + "src": "9223:21:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 446, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "9223:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9145:105:2" + }, + "payable": false, + "returnParameters": { + "id": 449, + "nodeType": "ParameterList", + "parameters": [], + "src": "9263:0:2" + }, + "scope": 841, + "src": "9114:674:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "private" + }, + { + "body": { + "id": 544, + "nodeType": "Block", + "src": "10215:514:2", + "statements": [ + { + "assignments": [ + 503 + ], + "declarations": [ + { + "constant": false, + "id": 503, + "name": "newBalance", + "nodeType": "VariableDeclaration", + "scope": 545, + "src": "10225:15:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 502, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "10225:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 514, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 512, + "name": "collateralAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 499, + "src": "10330:16:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 504, + "name": "tokenAddressToAccountBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 134, + "src": "10243:28:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 508, + "indexExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 505, + "name": "marketContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 495, + "src": "10272:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + "id": 506, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "COLLATERAL_TOKEN_ADDRESS", + "nodeType": "MemberAccess", + "referencedDeclaration": 850, + "src": "10272:39:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_address_$", + "typeString": "function () view external returns (address)" + } + }, + "id": 507, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10272:41:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10243:71:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 510, + "indexExpression": { + "argumentTypes": null, + "id": 509, + "name": "toAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 497, + "src": "10315:9:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10243:82:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 511, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 2552, + "src": "10243:86:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 513, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10243:104:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "10225:122:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 523, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 515, + "name": "tokenAddressToAccountBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 134, + "src": "10357:28:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 520, + "indexExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 516, + "name": "marketContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 495, + "src": "10386:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + "id": 517, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "COLLATERAL_TOKEN_ADDRESS", + "nodeType": "MemberAccess", + "referencedDeclaration": 850, + "src": "10386:39:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_address_$", + "typeString": "function () view external returns (address)" + } + }, + "id": 518, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10386:41:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10357:71:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 521, + "indexExpression": { + "argumentTypes": null, + "id": 519, + "name": "toAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 497, + "src": "10429:9:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "10357:82:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 522, + "name": "newBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 503, + "src": "10442:10:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10357:95:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 524, + "nodeType": "ExpressionStatement", + "src": "10357:95:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 534, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 525, + "name": "contractAddressToCollateralPoolBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 122, + "src": "10462:38:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 527, + "indexExpression": { + "argumentTypes": null, + "id": 526, + "name": "marketContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 495, + "src": "10501:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "10462:54:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 532, + "name": "collateralAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 499, + "src": "10596:16:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 528, + "name": "contractAddressToCollateralPoolBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 122, + "src": "10519:38:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 530, + "indexExpression": { + "argumentTypes": null, + "id": 529, + "name": "marketContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 495, + "src": "10558:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10519:54:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 531, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "subtract", + "nodeType": "MemberAccess", + "referencedDeclaration": 2528, + "src": "10519:63:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 533, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10519:103:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10462:160:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 535, + "nodeType": "ExpressionStatement", + "src": "10462:160:2" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 537, + "name": "marketContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 495, + "src": "10657:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + "id": 538, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "COLLATERAL_TOKEN_ADDRESS", + "nodeType": "MemberAccess", + "referencedDeclaration": 850, + "src": "10657:39:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_address_$", + "typeString": "function () view external returns (address)" + } + }, + "id": 539, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10657:41:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 540, + "name": "toAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 497, + "src": "10700:9:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 541, + "name": "newBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 503, + "src": "10711:10:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 536, + "name": "UpdatedUserBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 150, + "src": "10638:18:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 542, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10638:84:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 543, + "nodeType": "EmitStatement", + "src": "10633:89:2" + } + ] + }, + "documentation": "@notice withdraws collateral from pool to a user account upon exit or trade settlement\n @param marketContract the MARKET Contract being traded.\n @param toAddress address of user\n @param collateralAmount amount to transfer from pool to user.", + "id": 545, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "withdrawCollateralFromPool", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 500, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 495, + "name": "marketContract", + "nodeType": "VariableDeclaration", + "scope": 545, + "src": "10109:29:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + }, + "typeName": { + "contractScope": null, + "id": 494, + "name": "MarketContract", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1018, + "src": "10109:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 497, + "name": "toAddress", + "nodeType": "VariableDeclaration", + "scope": 545, + "src": "10148:17:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 496, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10148:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 499, + "name": "collateralAmount", + "nodeType": "VariableDeclaration", + "scope": 545, + "src": "10175:21:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 498, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "10175:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10099:103:2" + }, + "payable": false, + "returnParameters": { + "id": 501, + "nodeType": "ParameterList", + "parameters": [], + "src": "10215:0:2" + }, + "scope": 841, + "src": "10064:665:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "private" + }, + { + "body": { + "id": 641, + "nodeType": "Block", + "src": "11284:1690:2", + "statements": [ + { + "assignments": [ + 557 + ], + "declarations": [ + { + "constant": false, + "id": 557, + "name": "userNetPosition", + "nodeType": "VariableDeclaration", + "scope": 642, + "src": "11294:39:2", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_UserNetPosition_$113_storage_ptr", + "typeString": "struct MarketCollateralPool.UserNetPosition" + }, + "typeName": { + "contractScope": null, + "id": 556, + "name": "UserNetPosition", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 113, + "src": "11294:15:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_UserNetPosition_$113_storage_ptr", + "typeString": "struct MarketCollateralPool.UserNetPosition" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 563, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 558, + "name": "contractAddressToUserPosition", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 128, + "src": "11336:29:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_struct$_UserNetPosition_$113_storage_$_$", + "typeString": "mapping(address => mapping(address => struct MarketCollateralPool.UserNetPosition storage ref))" + } + }, + "id": 560, + "indexExpression": { + "argumentTypes": null, + "id": 559, + "name": "marketContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 547, + "src": "11366:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11336:45:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_UserNetPosition_$113_storage_$", + "typeString": "mapping(address => struct MarketCollateralPool.UserNetPosition storage ref)" + } + }, + "id": 562, + "indexExpression": { + "argumentTypes": null, + "id": 561, + "name": "userAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 549, + "src": "11382:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11336:58:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_UserNetPosition_$113_storage", + "typeString": "struct MarketCollateralPool.UserNetPosition storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11294:100:2" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 573, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 567, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 564, + "name": "userNetPosition", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 557, + "src": "11408:15:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_UserNetPosition_$113_storage_ptr", + "typeString": "struct MarketCollateralPool.UserNetPosition storage pointer" + } + }, + "id": 565, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "netPosition", + "nodeType": "MemberAccess", + "referencedDeclaration": 112, + "src": "11408:27:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 566, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11439:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "11408:32:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 571, + "name": "qty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 551, + "src": "11483:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 568, + "name": "userNetPosition", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 557, + "src": "11444:15:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_UserNetPosition_$113_storage_ptr", + "typeString": "struct MarketCollateralPool.UserNetPosition storage pointer" + } + }, + "id": 569, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "netPosition", + "nodeType": "MemberAccess", + "referencedDeclaration": 112, + "src": "11444:27:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 570, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isSameSign", + "nodeType": "MemberAccess", + "referencedDeclaration": 2663, + "src": "11444:38:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_bool_$bound_to$_t_int256_$", + "typeString": "function (int256,int256) pure returns (bool)" + } + }, + "id": 572, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11444:43:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "11408:79:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 629, + "nodeType": "Block", + "src": "11740:1091:2", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 590, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 583, + "name": "userNetPosition", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 557, + "src": "11827:15:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_UserNetPosition_$113_storage_ptr", + "typeString": "struct MarketCollateralPool.UserNetPosition storage pointer" + } + }, + "id": 584, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "netPosition", + "nodeType": "MemberAccess", + "referencedDeclaration": 112, + "src": "11827:27:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 585, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "abs", + "nodeType": "MemberAccess", + "referencedDeclaration": 2686, + "src": "11827:31:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_uint256_$bound_to$_t_int256_$", + "typeString": "function (int256) pure returns (uint256)" + } + }, + "id": 586, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11827:33:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 587, + "name": "qty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 551, + "src": "11864:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 588, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "abs", + "nodeType": "MemberAccess", + "referencedDeclaration": 2686, + "src": "11864:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_uint256_$bound_to$_t_int256_$", + "typeString": "function (int256) pure returns (uint256)" + } + }, + "id": 589, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11864:9:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "11827:46:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 627, + "nodeType": "Block", + "src": "12142:679:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 601, + "name": "marketContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 547, + "src": "12262:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + { + "argumentTypes": null, + "id": 602, + "name": "userNetPosition", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 557, + "src": "12298:15:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_UserNetPosition_$113_storage_ptr", + "typeString": "struct MarketCollateralPool.UserNetPosition storage pointer" + } + }, + { + "argumentTypes": null, + "id": 603, + "name": "userAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 549, + "src": "12335:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 608, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 604, + "name": "userNetPosition", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 557, + "src": "12368:15:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_UserNetPosition_$113_storage_ptr", + "typeString": "struct MarketCollateralPool.UserNetPosition storage pointer" + } + }, + "id": 605, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "netPosition", + "nodeType": "MemberAccess", + "referencedDeclaration": 112, + "src": "12368:27:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 607, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "-", + "prefix": true, + "src": "12398:2:2", + "subExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 606, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12399:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "typeDescriptions": { + "typeIdentifier": "t_rational_-1_by_1", + "typeString": "int_const -1" + } + }, + "src": "12368:32:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + { + "argumentTypes": null, + "id": 609, + "name": "price", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 553, + "src": "12422:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + }, + { + "typeIdentifier": "t_struct$_UserNetPosition_$113_storage_ptr", + "typeString": "struct MarketCollateralPool.UserNetPosition storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 600, + "name": "reduceUserNetPosition", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 828, + "src": "12219:21:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_MarketContract_$1018_$_t_struct$_UserNetPosition_$113_storage_ptr_$_t_address_$_t_int256_$_t_uint256_$returns$__$", + "typeString": "function (contract MarketContract,struct MarketCollateralPool.UserNetPosition storage pointer,address,int256,uint256)" + } + }, + "id": 610, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12219:226:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 611, + "nodeType": "ExpressionStatement", + "src": "12219:226:2" + }, + { + "assignments": [ + 613 + ], + "declarations": [ + { + "constant": false, + "id": 613, + "name": "newNetPos", + "nodeType": "VariableDeclaration", + "scope": 642, + "src": "12486:13:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 612, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "12486:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 618, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 617, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 614, + "name": "userNetPosition", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 557, + "src": "12502:15:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_UserNetPosition_$113_storage_ptr", + "typeString": "struct MarketCollateralPool.UserNetPosition storage pointer" + } + }, + "id": 615, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "netPosition", + "nodeType": "MemberAccess", + "referencedDeclaration": 112, + "src": "12502:27:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "id": 616, + "name": "qty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 551, + "src": "12532:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "12502:33:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12486:49:2" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 620, + "name": "marketContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 547, + "src": "12646:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + { + "argumentTypes": null, + "id": 621, + "name": "userNetPosition", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 557, + "src": "12682:15:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_UserNetPosition_$113_storage_ptr", + "typeString": "struct MarketCollateralPool.UserNetPosition storage pointer" + } + }, + { + "argumentTypes": null, + "id": 622, + "name": "userAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 549, + "src": "12719:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 623, + "name": "newNetPos", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 613, + "src": "12752:9:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + { + "argumentTypes": null, + "id": 624, + "name": "price", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 553, + "src": "12783:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + }, + { + "typeIdentifier": "t_struct$_UserNetPosition_$113_storage_ptr", + "typeString": "struct MarketCollateralPool.UserNetPosition storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 619, + "name": "addUserNetPosition", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 690, + "src": "12606:18:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_MarketContract_$1018_$_t_struct$_UserNetPosition_$113_storage_ptr_$_t_address_$_t_int256_$_t_uint256_$returns$__$", + "typeString": "function (contract MarketContract,struct MarketCollateralPool.UserNetPosition storage pointer,address,int256,uint256)" + } + }, + "id": 625, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12606:200:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 626, + "nodeType": "ExpressionStatement", + "src": "12606:200:2" + } + ] + }, + "id": 628, + "nodeType": "IfStatement", + "src": "11823:998:2", + "trueBody": { + "id": 599, + "nodeType": "Block", + "src": "11875:261:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 592, + "name": "marketContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 547, + "src": "11967:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + { + "argumentTypes": null, + "id": 593, + "name": "userNetPosition", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 557, + "src": "12003:15:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_UserNetPosition_$113_storage_ptr", + "typeString": "struct MarketCollateralPool.UserNetPosition storage pointer" + } + }, + { + "argumentTypes": null, + "id": 594, + "name": "userAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 549, + "src": "12040:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 595, + "name": "qty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 551, + "src": "12073:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + { + "argumentTypes": null, + "id": 596, + "name": "price", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 553, + "src": "12098:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + }, + { + "typeIdentifier": "t_struct$_UserNetPosition_$113_storage_ptr", + "typeString": "struct MarketCollateralPool.UserNetPosition storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 591, + "name": "reduceUserNetPosition", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 828, + "src": "11924:21:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_MarketContract_$1018_$_t_struct$_UserNetPosition_$113_storage_ptr_$_t_address_$_t_int256_$_t_uint256_$returns$__$", + "typeString": "function (contract MarketContract,struct MarketCollateralPool.UserNetPosition storage pointer,address,int256,uint256)" + } + }, + "id": 597, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11924:197:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 598, + "nodeType": "ExpressionStatement", + "src": "11924:197:2" + } + ] + } + } + ] + }, + "id": 630, + "nodeType": "IfStatement", + "src": "11404:1427:2", + "trueBody": { + "id": 582, + "nodeType": "Block", + "src": "11489:245:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 575, + "name": "marketContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 547, + "src": "11589:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + { + "argumentTypes": null, + "id": 576, + "name": "userNetPosition", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 557, + "src": "11621:15:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_UserNetPosition_$113_storage_ptr", + "typeString": "struct MarketCollateralPool.UserNetPosition storage pointer" + } + }, + { + "argumentTypes": null, + "id": 577, + "name": "userAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 549, + "src": "11654:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 578, + "name": "qty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 551, + "src": "11683:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + { + "argumentTypes": null, + "id": 579, + "name": "price", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 553, + "src": "11704:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + }, + { + "typeIdentifier": "t_struct$_UserNetPosition_$113_storage_ptr", + "typeString": "struct MarketCollateralPool.UserNetPosition storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 574, + "name": "addUserNetPosition", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 690, + "src": "11553:18:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_MarketContract_$1018_$_t_struct$_UserNetPosition_$113_storage_ptr_$_t_address_$_t_int256_$_t_uint256_$returns$__$", + "typeString": "function (contract MarketContract,struct MarketCollateralPool.UserNetPosition storage pointer,address,int256,uint256)" + } + }, + "id": 580, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11553:170:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 581, + "nodeType": "ExpressionStatement", + "src": "11553:170:2" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "id": 639, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 631, + "name": "userNetPosition", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 557, + "src": "12840:15:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_UserNetPosition_$113_storage_ptr", + "typeString": "struct MarketCollateralPool.UserNetPosition storage pointer" + } + }, + "id": 633, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "netPosition", + "nodeType": "MemberAccess", + "referencedDeclaration": 112, + "src": "12840:27:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 637, + "name": "qty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 551, + "src": "12902:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 634, + "name": "userNetPosition", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 557, + "src": "12870:15:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_UserNetPosition_$113_storage_ptr", + "typeString": "struct MarketCollateralPool.UserNetPosition storage pointer" + } + }, + "id": 635, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "netPosition", + "nodeType": "MemberAccess", + "referencedDeclaration": 112, + "src": "12870:27:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 636, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 2601, + "src": "12870:31:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_int256_$bound_to$_t_int256_$", + "typeString": "function (int256,int256) pure returns (int256)" + } + }, + "id": 638, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12870:36:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "12840:66:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 640, + "nodeType": "ExpressionStatement", + "src": "12840:66:2" + } + ] + }, + "documentation": "@dev handles all needed internal accounting when a user enters into a new trade\n @param marketContract the MARKET Contract being traded.\n @param userAddress storage struct containing position information for this user\n @param qty signed quantity this users position is changing by, + for buy and - for sell\n @param price transacted price of the new position / trade", + "id": 642, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "updatePosition", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 554, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 547, + "name": "marketContract", + "nodeType": "VariableDeclaration", + "scope": 642, + "src": "11170:29:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + }, + "typeName": { + "contractScope": null, + "id": 546, + "name": "MarketContract", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1018, + "src": "11170:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 549, + "name": "userAddress", + "nodeType": "VariableDeclaration", + "scope": 642, + "src": "11209:19:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 548, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11209:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 551, + "name": "qty", + "nodeType": "VariableDeclaration", + "scope": 642, + "src": "11238:7:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 550, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "11238:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 553, + "name": "price", + "nodeType": "VariableDeclaration", + "scope": 642, + "src": "11255:10:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 552, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "11255:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11160:111:2" + }, + "payable": false, + "returnParameters": { + "id": 555, + "nodeType": "ParameterList", + "parameters": [], + "src": "11284:0:2" + }, + "scope": 841, + "src": "11137:1837:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "private" + }, + { + "body": { + "id": 689, + "nodeType": "Block", + "src": "13669:424:2", + "statements": [ + { + "assignments": [ + 656 + ], + "declarations": [ + { + "constant": false, + "id": 656, + "name": "neededCollateral", + "nodeType": "VariableDeclaration", + "scope": 690, + "src": "13679:21:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 655, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "13679:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 671, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 659, + "name": "marketContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 644, + "src": "13750:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + "id": 660, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "PRICE_FLOOR", + "nodeType": "MemberAccess", + "referencedDeclaration": 854, + "src": "13750:26:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 661, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13750:28:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 662, + "name": "marketContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 644, + "src": "13792:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + "id": 663, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "PRICE_CAP", + "nodeType": "MemberAccess", + "referencedDeclaration": 852, + "src": "13792:24:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 664, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13792:26:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 665, + "name": "marketContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 644, + "src": "13832:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + "id": 666, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "QTY_MULTIPLIER", + "nodeType": "MemberAccess", + "referencedDeclaration": 858, + "src": "13832:29:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 667, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13832:31:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 668, + "name": "qty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 650, + "src": "13877:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + { + "argumentTypes": null, + "id": 669, + "name": "price", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 652, + "src": "13894:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 657, + "name": "MathLib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2798, + "src": "13703:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_MathLib_$2798_$", + "typeString": "type(library MathLib)" + } + }, + "id": 658, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "calculateNeededCollateral", + "nodeType": "MemberAccess", + "referencedDeclaration": 2797, + "src": "13703:33:2", + "typeDescriptions": { + "typeIdentifier": "t_function_delegatecall_pure$_t_uint256_$_t_uint256_$_t_uint256_$_t_int256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,uint256,int256,uint256) pure returns (uint256)" + } + }, + "id": 670, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13703:206:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13679:230:2" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 673, + "name": "marketContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 644, + "src": "13942:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + { + "argumentTypes": null, + "id": 674, + "name": "userAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 648, + "src": "13958:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 675, + "name": "neededCollateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 656, + "src": "13971:16:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 672, + "name": "commitCollateralToPool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 493, + "src": "13919:22:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_MarketContract_$1018_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract MarketContract,address,uint256)" + } + }, + "id": 676, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13919:69:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 677, + "nodeType": "ExpressionStatement", + "src": "13919:69:2" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 684, + "name": "price", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 652, + "src": "14038:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 685, + "name": "qty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 650, + "src": "14045:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 683, + "name": "Position", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 118, + "src": "14029:8:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_struct$_Position_$118_storage_ptr_$", + "typeString": "type(struct MarketCollateralPool.Position storage pointer)" + } + }, + "id": 686, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "structConstructorCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14029:20:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Position_$118_memory", + "typeString": "struct MarketCollateralPool.Position memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Position_$118_memory", + "typeString": "struct MarketCollateralPool.Position memory" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 678, + "name": "userNetPosition", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 646, + "src": "13998:15:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_UserNetPosition_$113_storage_ptr", + "typeString": "struct MarketCollateralPool.UserNetPosition storage pointer" + } + }, + "id": 681, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "positions", + "nodeType": "MemberAccess", + "referencedDeclaration": 110, + "src": "13998:25:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_Position_$118_storage_$dyn_storage", + "typeString": "struct MarketCollateralPool.Position storage ref[] storage ref" + } + }, + "id": 682, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "push", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "13998:30:2", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_struct$_Position_$118_storage_$returns$_t_uint256_$", + "typeString": "function (struct MarketCollateralPool.Position storage ref) returns (uint256)" + } + }, + "id": 687, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13998:52:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 688, + "nodeType": "ExpressionStatement", + "src": "13998:52:2" + } + ] + }, + "documentation": "@dev calculates the needed collateral for a new position and commits it to the pool removing it from the\n users account and creates the needed Position struct to record the new position.\n @param marketContract The MARKET Contract being traded.\n @param userNetPosition current positions held by user\n @param userAddress address of user entering into the position\n @param qty signed quantity of the trade\n @param price agreed price of trade", + "id": 690, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "addUserNetPosition", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 653, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 644, + "name": "marketContract", + "nodeType": "VariableDeclaration", + "scope": 690, + "src": "13506:29:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + }, + "typeName": { + "contractScope": null, + "id": 643, + "name": "MarketContract", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1018, + "src": "13506:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 646, + "name": "userNetPosition", + "nodeType": "VariableDeclaration", + "scope": 690, + "src": "13545:39:2", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_UserNetPosition_$113_storage_ptr", + "typeString": "struct MarketCollateralPool.UserNetPosition" + }, + "typeName": { + "contractScope": null, + "id": 645, + "name": "UserNetPosition", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 113, + "src": "13545:15:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_UserNetPosition_$113_storage_ptr", + "typeString": "struct MarketCollateralPool.UserNetPosition" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 648, + "name": "userAddress", + "nodeType": "VariableDeclaration", + "scope": 690, + "src": "13594:19:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 647, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13594:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 650, + "name": "qty", + "nodeType": "VariableDeclaration", + "scope": 690, + "src": "13623:7:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 649, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "13623:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 652, + "name": "price", + "nodeType": "VariableDeclaration", + "scope": 690, + "src": "13640:10:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 651, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "13640:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13496:160:2" + }, + "payable": false, + "returnParameters": { + "id": 654, + "nodeType": "ParameterList", + "parameters": [], + "src": "13669:0:2" + }, + "scope": 841, + "src": "13469:624:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "private" + }, + { + "body": { + "id": 827, + "nodeType": "Block", + "src": "14691:2022:2", + "statements": [ + { + "assignments": [ + 704 + ], + "declarations": [ + { + "constant": false, + "id": 704, + "name": "collateralToReturnToUserAccount", + "nodeType": "VariableDeclaration", + "scope": 828, + "src": "14701:36:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 703, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "14701:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 706, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 705, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14740:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "14701:40:2" + }, + { + "assignments": [ + 708 + ], + "declarations": [ + { + "constant": false, + "id": 708, + "name": "qtyToReduce", + "nodeType": "VariableDeclaration", + "scope": 828, + "src": "14751:15:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 707, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "14751:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 710, + "initialValue": { + "argumentTypes": null, + "id": 709, + "name": "qty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 698, + "src": "14769:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14751:21:2" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 716, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 712, + "name": "userNetPos", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 694, + "src": "14863:10:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_UserNetPosition_$113_storage_ptr", + "typeString": "struct MarketCollateralPool.UserNetPosition storage pointer" + } + }, + "id": 713, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "positions", + "nodeType": "MemberAccess", + "referencedDeclaration": 110, + "src": "14863:20:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_Position_$118_storage_$dyn_storage", + "typeString": "struct MarketCollateralPool.Position storage ref[] storage ref" + } + }, + "id": 714, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "14863:27:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 715, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14894:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "14863:32:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 711, + "name": "assert", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8172, + "src": "14856:6:2", + "typeDescriptions": { + "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 717, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14856:40:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 718, + "nodeType": "ExpressionStatement", + "src": "14856:40:2" + }, + { + "body": { + "id": 814, + "nodeType": "Block", + "src": "14949:1555:2", + "statements": [ + { + "assignments": [ + 723 + ], + "declarations": [ + { + "constant": false, + "id": 723, + "name": "position", + "nodeType": "VariableDeclaration", + "scope": 828, + "src": "15009:25:2", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Position_$118_storage_ptr", + "typeString": "struct MarketCollateralPool.Position" + }, + "typeName": { + "contractScope": null, + "id": 722, + "name": "Position", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 118, + "src": "15009:8:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Position_$118_storage_ptr", + "typeString": "struct MarketCollateralPool.Position" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 732, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 724, + "name": "userNetPos", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 694, + "src": "15037:10:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_UserNetPosition_$113_storage_ptr", + "typeString": "struct MarketCollateralPool.UserNetPosition storage pointer" + } + }, + "id": 725, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "positions", + "nodeType": "MemberAccess", + "referencedDeclaration": 110, + "src": "15037:20:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_Position_$118_storage_$dyn_storage", + "typeString": "struct MarketCollateralPool.Position storage ref[] storage ref" + } + }, + "id": 731, + "indexExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 730, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 726, + "name": "userNetPos", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 694, + "src": "15058:10:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_UserNetPosition_$113_storage_ptr", + "typeString": "struct MarketCollateralPool.UserNetPosition storage pointer" + } + }, + "id": 727, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "positions", + "nodeType": "MemberAccess", + "referencedDeclaration": 110, + "src": "15058:20:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_Position_$118_storage_$dyn_storage", + "typeString": "struct MarketCollateralPool.Position storage ref[] storage ref" + } + }, + "id": 728, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "15058:27:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 729, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15088:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "15058:31:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "15037:53:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Position_$118_storage", + "typeString": "struct MarketCollateralPool.Position storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "15009:81:2" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 740, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 733, + "name": "position", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 723, + "src": "15136:8:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Position_$118_storage_ptr", + "typeString": "struct MarketCollateralPool.Position storage pointer" + } + }, + "id": 734, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "qty", + "nodeType": "MemberAccess", + "referencedDeclaration": 117, + "src": "15136:12:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 735, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "abs", + "nodeType": "MemberAccess", + "referencedDeclaration": 2686, + "src": "15136:16:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_uint256_$bound_to$_t_int256_$", + "typeString": "function (int256) pure returns (uint256)" + } + }, + "id": 736, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15136:18:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 737, + "name": "qtyToReduce", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 708, + "src": "15158:11:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 738, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "abs", + "nodeType": "MemberAccess", + "referencedDeclaration": 2686, + "src": "15158:15:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_uint256_$bound_to$_t_int256_$", + "typeString": "function (int256) pure returns (uint256)" + } + }, + "id": 739, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15158:17:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "15136:39:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 812, + "nodeType": "Block", + "src": "15804:690:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 786, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 778, + "name": "position", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 723, + "src": "15868:8:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Position_$118_storage_ptr", + "typeString": "struct MarketCollateralPool.Position storage pointer" + } + }, + "id": 780, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "qty", + "nodeType": "MemberAccess", + "referencedDeclaration": 117, + "src": "15868:12:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 784, + "name": "qtyToReduce", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 708, + "src": "15900:11:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 781, + "name": "position", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 723, + "src": "15883:8:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Position_$118_storage_ptr", + "typeString": "struct MarketCollateralPool.Position storage pointer" + } + }, + "id": 782, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "qty", + "nodeType": "MemberAccess", + "referencedDeclaration": 117, + "src": "15883:12:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 783, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 2601, + "src": "15883:16:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_int256_$bound_to$_t_int256_$", + "typeString": "function (int256,int256) pure returns (int256)" + } + }, + "id": 785, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15883:29:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "15868:44:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 787, + "nodeType": "ExpressionStatement", + "src": "15868:44:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 809, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 788, + "name": "collateralToReturnToUserAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 704, + "src": "15994:31:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 793, + "name": "marketContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 692, + "src": "16144:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + "id": 794, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "PRICE_FLOOR", + "nodeType": "MemberAccess", + "referencedDeclaration": 854, + "src": "16144:26:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 795, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16144:28:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 796, + "name": "marketContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 692, + "src": "16198:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + "id": 797, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "PRICE_CAP", + "nodeType": "MemberAccess", + "referencedDeclaration": 852, + "src": "16198:24:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 798, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16198:26:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 799, + "name": "marketContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 692, + "src": "16250:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + "id": 800, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "QTY_MULTIPLIER", + "nodeType": "MemberAccess", + "referencedDeclaration": 858, + "src": "16250:29:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 801, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16250:31:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 805, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 802, + "name": "qtyToReduce", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 708, + "src": "16307:11:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 804, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "-", + "prefix": true, + "src": "16321:2:2", + "subExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 803, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16322:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "typeDescriptions": { + "typeIdentifier": "t_rational_-1_by_1", + "typeString": "int_const -1" + } + }, + "src": "16307:16:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + { + "argumentTypes": null, + "id": 806, + "name": "price", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 700, + "src": "16349:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 791, + "name": "MathLib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2798, + "src": "16085:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_MathLib_$2798_$", + "typeString": "type(library MathLib)" + } + }, + "id": 792, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "calculateNeededCollateral", + "nodeType": "MemberAccess", + "referencedDeclaration": 2797, + "src": "16085:33:2", + "typeDescriptions": { + "typeIdentifier": "t_function_delegatecall_pure$_t_uint256_$_t_uint256_$_t_uint256_$_t_int256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,uint256,int256,uint256) pure returns (uint256)" + } + }, + "id": 807, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16085:291:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 789, + "name": "collateralToReturnToUserAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 704, + "src": "16028:31:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 790, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 2552, + "src": "16028:35:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 808, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16028:366:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "15994:400:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 810, + "nodeType": "ExpressionStatement", + "src": "15994:400:2" + }, + { + "id": 811, + "nodeType": "Break", + "src": "16474:5:2" + } + ] + }, + "id": 813, + "nodeType": "IfStatement", + "src": "15132:1362:2", + "trueBody": { + "id": 777, + "nodeType": "Block", + "src": "15177:621:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 760, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 741, + "name": "collateralToReturnToUserAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 704, + "src": "15238:31:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 746, + "name": "marketContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 692, + "src": "15388:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + "id": 747, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "PRICE_FLOOR", + "nodeType": "MemberAccess", + "referencedDeclaration": 854, + "src": "15388:26:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 748, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15388:28:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 749, + "name": "marketContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 692, + "src": "15442:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + "id": 750, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "PRICE_CAP", + "nodeType": "MemberAccess", + "referencedDeclaration": 852, + "src": "15442:24:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 751, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15442:26:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 752, + "name": "marketContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 692, + "src": "15494:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + "id": 753, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "QTY_MULTIPLIER", + "nodeType": "MemberAccess", + "referencedDeclaration": 858, + "src": "15494:29:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 754, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15494:31:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 755, + "name": "position", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 723, + "src": "15551:8:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Position_$118_storage_ptr", + "typeString": "struct MarketCollateralPool.Position storage pointer" + } + }, + "id": 756, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "qty", + "nodeType": "MemberAccess", + "referencedDeclaration": 117, + "src": "15551:12:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + { + "argumentTypes": null, + "id": 757, + "name": "price", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 700, + "src": "15589:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 744, + "name": "MathLib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2798, + "src": "15329:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_MathLib_$2798_$", + "typeString": "type(library MathLib)" + } + }, + "id": 745, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "calculateNeededCollateral", + "nodeType": "MemberAccess", + "referencedDeclaration": 2797, + "src": "15329:33:2", + "typeDescriptions": { + "typeIdentifier": "t_function_delegatecall_pure$_t_uint256_$_t_uint256_$_t_uint256_$_t_int256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,uint256,int256,uint256) pure returns (uint256)" + } + }, + "id": 758, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15329:287:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 742, + "name": "collateralToReturnToUserAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 704, + "src": "15272:31:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 743, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 2552, + "src": "15272:35:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 759, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15272:362:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "15238:396:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 761, + "nodeType": "ExpressionStatement", + "src": "15238:396:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 768, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 762, + "name": "qtyToReduce", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 708, + "src": "15652:11:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 765, + "name": "position", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 723, + "src": "15682:8:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Position_$118_storage_ptr", + "typeString": "struct MarketCollateralPool.Position storage pointer" + } + }, + "id": 766, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "qty", + "nodeType": "MemberAccess", + "referencedDeclaration": 117, + "src": "15682:12:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "expression": { + "argumentTypes": null, + "id": 763, + "name": "qtyToReduce", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 708, + "src": "15666:11:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 764, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 2601, + "src": "15666:15:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_int256_$bound_to$_t_int256_$", + "typeString": "function (int256,int256) pure returns (int256)" + } + }, + "id": 767, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15666:29:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "15652:43:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 769, + "nodeType": "ExpressionStatement", + "src": "15652:43:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 775, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "--", + "prefix": false, + "src": "15713:29:2", + "subExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 770, + "name": "userNetPos", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 694, + "src": "15713:10:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_UserNetPosition_$113_storage_ptr", + "typeString": "struct MarketCollateralPool.UserNetPosition storage pointer" + } + }, + "id": 773, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "positions", + "nodeType": "MemberAccess", + "referencedDeclaration": 110, + "src": "15713:20:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_Position_$118_storage_$dyn_storage", + "typeString": "struct MarketCollateralPool.Position storage ref[] storage ref" + } + }, + "id": 774, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "15713:27:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 776, + "nodeType": "ExpressionStatement", + "src": "15713:29:2" + } + ] + } + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 721, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 719, + "name": "qtyToReduce", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 708, + "src": "14931:11:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 720, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14946:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "14931:16:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 815, + "nodeType": "WhileStatement", + "src": "14924:1580:2" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 818, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 816, + "name": "collateralToReturnToUserAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 704, + "src": "16518:31:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 817, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16553:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "16518:36:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 826, + "nodeType": "IfStatement", + "src": "16514:193:2", + "trueBody": { + "id": 825, + "nodeType": "Block", + "src": "16556:151:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 820, + "name": "marketContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 692, + "src": "16635:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + { + "argumentTypes": null, + "id": 821, + "name": "userAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 696, + "src": "16651:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 822, + "name": "collateralToReturnToUserAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 704, + "src": "16664:31:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 819, + "name": "withdrawCollateralFromPool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 545, + "src": "16608:26:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_MarketContract_$1018_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract MarketContract,address,uint256)" + } + }, + "id": 823, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16608:88:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 824, + "nodeType": "ExpressionStatement", + "src": "16608:88:2" + } + ] + } + } + ] + }, + "documentation": "@dev reduces net position correctly allocating collateral back to user\n @param marketContract The MARKET Contract being traded.\n @param userNetPos storage struct for this users position\n @param userAddress address of user who is reducing their pos\n @param qty signed quantity of the qty to reduce this users position by\n @param price transacted price", + "id": 828, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "reduceUserNetPosition", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 701, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 692, + "name": "marketContract", + "nodeType": "VariableDeclaration", + "scope": 828, + "src": "14533:29:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + }, + "typeName": { + "contractScope": null, + "id": 691, + "name": "MarketContract", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1018, + "src": "14533:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 694, + "name": "userNetPos", + "nodeType": "VariableDeclaration", + "scope": 828, + "src": "14572:34:2", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_UserNetPosition_$113_storage_ptr", + "typeString": "struct MarketCollateralPool.UserNetPosition" + }, + "typeName": { + "contractScope": null, + "id": 693, + "name": "UserNetPosition", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 113, + "src": "14572:15:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_UserNetPosition_$113_storage_ptr", + "typeString": "struct MarketCollateralPool.UserNetPosition" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 696, + "name": "userAddress", + "nodeType": "VariableDeclaration", + "scope": 828, + "src": "14616:19:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 695, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "14616:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 698, + "name": "qty", + "nodeType": "VariableDeclaration", + "scope": 828, + "src": "14645:7:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 697, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "14645:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 700, + "name": "price", + "nodeType": "VariableDeclaration", + "scope": 828, + "src": "14662:10:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 699, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "14662:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14523:155:2" + }, + "payable": false, + "returnParameters": { + "id": 702, + "nodeType": "ParameterList", + "parameters": [], + "src": "14691:0:2" + }, + "scope": 841, + "src": "14493:2220:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "private" + }, + { + "body": { + "id": 839, + "nodeType": "Block", + "src": "16745:108:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 834, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 831, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8183, + "src": "16763:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 832, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "16763:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 833, + "name": "marketTradingHub", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 142, + "src": "16777:16:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "16763:30:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "43616e206f6e6c792062652063616c6c6564206279207468652074726164696e6720687562", + "id": 835, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16795:39:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6e692ca996dafdcc67dd9dac9183b7f10149e59c26a63f375363668f7e7a50b8", + "typeString": "literal_string \"Can only be called by the trading hub\"" + }, + "value": "Can only be called by the trading hub" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_6e692ca996dafdcc67dd9dac9183b7f10149e59c26a63f375363668f7e7a50b8", + "typeString": "literal_string \"Can only be called by the trading hub\"" + } + ], + "id": 830, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 8186, + 8187 + ], + "referencedDeclaration": 8187, + "src": "16755:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 836, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16755:80:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 837, + "nodeType": "ExpressionStatement", + "src": "16755:80:2" + }, + { + "id": 838, + "nodeType": "PlaceholderStatement", + "src": "16845:1:2" + } + ] + }, + "documentation": null, + "id": 840, + "name": "onlyTradingHub", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 829, + "nodeType": "ParameterList", + "parameters": [], + "src": "16742:2:2" + }, + "src": "16719:134:2", + "visibility": "internal" + } + ], + "scope": 842, + "src": "1216:15639:2" + } + ], + "src": "608:16248:2" + }, + "legacyAST": { + "absolutePath": "/home/travis/build/MARKETProtocol/MARKETProtocol/contracts/MarketCollateralPool.sol", + "exportedSymbols": { + "MarketCollateralPool": [ + 841 + ] + }, + "id": 842, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 91, + "literals": [ + "solidity", + "^", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "608:24:2" + }, + { + "absolutePath": "/home/travis/build/MARKETProtocol/MARKETProtocol/contracts/libraries/MathLib.sol", + "file": "./libraries/MathLib.sol", + "id": 92, + "nodeType": "ImportDirective", + "scope": 842, + "sourceUnit": 2799, + "src": "634:33:2", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/travis/build/MARKETProtocol/MARKETProtocol/contracts/MarketContract.sol", + "file": "./MarketContract.sol", + "id": 93, + "nodeType": "ImportDirective", + "scope": 842, + "sourceUnit": 1019, + "src": "668:30:2", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol", + "file": "openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol", + "id": 94, + "nodeType": "ImportDirective", + "scope": 842, + "sourceUnit": 7388, + "src": "700:67:2", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol", + "file": "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol", + "id": 95, + "nodeType": "ImportDirective", + "scope": 842, + "sourceUnit": 7294, + "src": "768:63:2", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "openzeppelin-solidity/contracts/ownership/Ownable.sol", + "file": "openzeppelin-solidity/contracts/ownership/Ownable.sol", + "id": 96, + "nodeType": "ImportDirective", + "scope": 842, + "sourceUnit": 7084, + "src": "832:63:2", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 97, + "name": "Ownable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 7083, + "src": "1249:7:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Ownable_$7083", + "typeString": "contract Ownable" + } + }, + "id": 98, + "nodeType": "InheritanceSpecifier", + "src": "1249:7:2" + } + ], + "contractDependencies": [ + 7083 + ], + "contractKind": "contract", + "documentation": "@author Phil Elsasser ", + "fullyImplemented": true, + "id": 841, + "linearizedBaseContracts": [ + 841, + 7083 + ], + "name": "MarketCollateralPool", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 101, + "libraryName": { + "contractScope": null, + "id": 99, + "name": "MathLib", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2798, + "src": "1269:7:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MathLib_$2798", + "typeString": "library MathLib" + } + }, + "nodeType": "UsingForDirective", + "src": "1263:23:2", + "typeName": { + "id": 100, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1281:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "id": 104, + "libraryName": { + "contractScope": null, + "id": 102, + "name": "MathLib", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2798, + "src": "1297:7:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MathLib_$2798", + "typeString": "library MathLib" + } + }, + "nodeType": "UsingForDirective", + "src": "1291:22:2", + "typeName": { + "id": 103, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "1309:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + }, + { + "id": 107, + "libraryName": { + "contractScope": null, + "id": 105, + "name": "SafeERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 7387, + "src": "1324:9:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeERC20_$7387", + "typeString": "library SafeERC20" + } + }, + "nodeType": "UsingForDirective", + "src": "1318:26:2", + "typeName": { + "contractScope": null, + "id": 106, + "name": "ERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 7293, + "src": "1338:5:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20_$7293", + "typeString": "contract ERC20" + } + } + }, + { + "canonicalName": "MarketCollateralPool.UserNetPosition", + "id": 113, + "members": [ + { + "constant": false, + "id": 110, + "name": "positions", + "nodeType": "VariableDeclaration", + "scope": 113, + "src": "1383:20:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_Position_$118_storage_$dyn_storage_ptr", + "typeString": "struct MarketCollateralPool.Position[]" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 108, + "name": "Position", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 118, + "src": "1383:8:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Position_$118_storage_ptr", + "typeString": "struct MarketCollateralPool.Position" + } + }, + "id": 109, + "length": null, + "nodeType": "ArrayTypeName", + "src": "1383:10:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_Position_$118_storage_$dyn_storage_ptr", + "typeString": "struct MarketCollateralPool.Position[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 112, + "name": "netPosition", + "nodeType": "VariableDeclaration", + "scope": 113, + "src": "1488:15:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 111, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "1488:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "name": "UserNetPosition", + "nodeType": "StructDefinition", + "scope": 841, + "src": "1350:214:2", + "visibility": "public" + }, + { + "canonicalName": "MarketCollateralPool.Position", + "id": 118, + "members": [ + { + "constant": false, + "id": 115, + "name": "price", + "nodeType": "VariableDeclaration", + "scope": 118, + "src": "1596:10:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 114, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1596:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 117, + "name": "qty", + "nodeType": "VariableDeclaration", + "scope": 118, + "src": "1616:7:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 116, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "1616:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "name": "Position", + "nodeType": "StructDefinition", + "scope": 841, + "src": "1570:60:2", + "visibility": "public" + }, + { + "constant": false, + "id": 122, + "name": "contractAddressToCollateralPoolBalance", + "nodeType": "VariableDeclaration", + "scope": 841, + "src": "1636:70:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 121, + "keyType": { + "id": 119, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1644:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1636:24:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 120, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1655:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 128, + "name": "contractAddressToUserPosition", + "nodeType": "VariableDeclaration", + "scope": 841, + "src": "1775:85:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_struct$_UserNetPosition_$113_storage_$_$", + "typeString": "mapping(address => mapping(address => struct MarketCollateralPool.UserNetPosition))" + }, + "typeName": { + "id": 127, + "keyType": { + "id": 123, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1783:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1775:55:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_struct$_UserNetPosition_$113_storage_$_$", + "typeString": "mapping(address => mapping(address => struct MarketCollateralPool.UserNetPosition))" + }, + "valueType": { + "id": 126, + "keyType": { + "id": 124, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1802:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1794:35:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_UserNetPosition_$113_storage_$", + "typeString": "mapping(address => struct MarketCollateralPool.UserNetPosition)" + }, + "valueType": { + "contractScope": null, + "id": 125, + "name": "UserNetPosition", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 113, + "src": "1813:15:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_UserNetPosition_$113_storage_ptr", + "typeString": "struct MarketCollateralPool.UserNetPosition" + } + } + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 134, + "name": "tokenAddressToAccountBalance", + "nodeType": "VariableDeclaration", + "scope": 841, + "src": "1932:80:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + }, + "typeName": { + "id": 133, + "keyType": { + "id": 129, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1940:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1932:44:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + }, + "valueType": { + "id": 132, + "keyType": { + "id": 130, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1959:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1951:24:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 131, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1970:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 140, + "name": "tokenAddressToBalanceLockTime", + "nodeType": "VariableDeclaration", + "scope": 841, + "src": "2059:81:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + }, + "typeName": { + "id": 139, + "keyType": { + "id": 135, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2067:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "2059:44:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + }, + "valueType": { + "id": 138, + "keyType": { + "id": 136, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2086:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "2078:24:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 137, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2097:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 142, + "name": "marketTradingHub", + "nodeType": "VariableDeclaration", + "scope": 841, + "src": "2147:31:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 141, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2147:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": null, + "id": 150, + "name": "UpdatedUserBalance", + "nodeType": "EventDefinition", + "parameters": { + "id": 149, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 144, + "indexed": true, + "name": "collateralTokenAddress", + "nodeType": "VariableDeclaration", + "scope": 150, + "src": "2210:38:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 143, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2210:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 146, + "indexed": true, + "name": "user", + "nodeType": "VariableDeclaration", + "scope": 150, + "src": "2250:20:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 145, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2250:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 148, + "indexed": false, + "name": "balance", + "nodeType": "VariableDeclaration", + "scope": 150, + "src": "2272:12:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 147, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2272:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2209:76:2" + }, + "src": "2185:101:2" + }, + { + "body": { + "id": 153, + "nodeType": "Block", + "src": "2313:3:2", + "statements": [] + }, + "documentation": null, + "id": 154, + "implemented": true, + "isConstructor": true, + "isDeclaredConst": false, + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 151, + "nodeType": "ParameterList", + "parameters": [], + "src": "2303:2:2" + }, + "payable": false, + "returnParameters": { + "id": 152, + "nodeType": "ParameterList", + "parameters": [], + "src": "2313:0:2" + }, + "scope": 841, + "src": "2292:24:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 170, + "nodeType": "Block", + "src": "2682:101:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 163, + "name": "contractAddressToUserPosition", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 128, + "src": "2699:29:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_struct$_UserNetPosition_$113_storage_$_$", + "typeString": "mapping(address => mapping(address => struct MarketCollateralPool.UserNetPosition storage ref))" + } + }, + "id": 165, + "indexExpression": { + "argumentTypes": null, + "id": 164, + "name": "marketContractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 156, + "src": "2729:21:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2699:52:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_UserNetPosition_$113_storage_$", + "typeString": "mapping(address => struct MarketCollateralPool.UserNetPosition storage ref)" + } + }, + "id": 167, + "indexExpression": { + "argumentTypes": null, + "id": 166, + "name": "userAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 158, + "src": "2752:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2699:65:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_UserNetPosition_$113_storage", + "typeString": "struct MarketCollateralPool.UserNetPosition storage ref" + } + }, + "id": 168, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "netPosition", + "nodeType": "MemberAccess", + "referencedDeclaration": 112, + "src": "2699:77:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "functionReturnParameters": 162, + "id": 169, + "nodeType": "Return", + "src": "2692:84:2" + } + ] + }, + "documentation": "@notice get the net position for a give user address\n @param marketContractAddress MARKET Contract address to return position for\n @param userAddress address to return position for\n @return the users current open position.", + "id": 171, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getUserNetPosition", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 159, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 156, + "name": "marketContractAddress", + "nodeType": "VariableDeclaration", + "scope": 171, + "src": "2602:29:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 155, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2602:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 158, + "name": "userAddress", + "nodeType": "VariableDeclaration", + "scope": 171, + "src": "2633:19:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 157, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2633:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2601:52:2" + }, + "payable": false, + "returnParameters": { + "id": 162, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 161, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 171, + "src": "2677:3:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 160, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "2677:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2676:5:2" + }, + "scope": 841, + "src": "2574:209:2", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 188, + "nodeType": "Block", + "src": "3234:106:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 180, + "name": "contractAddressToUserPosition", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 128, + "src": "3251:29:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_struct$_UserNetPosition_$113_storage_$_$", + "typeString": "mapping(address => mapping(address => struct MarketCollateralPool.UserNetPosition storage ref))" + } + }, + "id": 182, + "indexExpression": { + "argumentTypes": null, + "id": 181, + "name": "marketContractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 173, + "src": "3281:21:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3251:52:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_UserNetPosition_$113_storage_$", + "typeString": "mapping(address => struct MarketCollateralPool.UserNetPosition storage ref)" + } + }, + "id": 184, + "indexExpression": { + "argumentTypes": null, + "id": 183, + "name": "userAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 175, + "src": "3304:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3251:65:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_UserNetPosition_$113_storage", + "typeString": "struct MarketCollateralPool.UserNetPosition storage ref" + } + }, + "id": 185, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "positions", + "nodeType": "MemberAccess", + "referencedDeclaration": 110, + "src": "3251:75:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_Position_$118_storage_$dyn_storage", + "typeString": "struct MarketCollateralPool.Position storage ref[] storage ref" + } + }, + "id": 186, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3251:82:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 179, + "id": 187, + "nodeType": "Return", + "src": "3244:89:2" + } + ] + }, + "documentation": "@notice gets the number of positions currently held by this address. Useful for iterating\n over the positions array in order to retrieve all users data.\n @param marketContractAddress MARKET Contract address\n @param userAddress address of user\n @return number of open unique positions in the array.", + "id": 189, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getUserPositionCount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 176, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 173, + "name": "marketContractAddress", + "nodeType": "VariableDeclaration", + "scope": 189, + "src": "3153:29:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 172, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3153:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 175, + "name": "userAddress", + "nodeType": "VariableDeclaration", + "scope": 189, + "src": "3184:19:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 174, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3184:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3152:52:2" + }, + "payable": false, + "returnParameters": { + "id": 179, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 178, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 189, + "src": "3228:4:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 177, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3228:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3227:6:2" + }, + "scope": 841, + "src": "3123:217:2", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 219, + "nodeType": "Block", + "src": "3919:159:2", + "statements": [ + { + "assignments": [ + 203 + ], + "declarations": [ + { + "constant": false, + "id": 203, + "name": "pos", + "nodeType": "VariableDeclaration", + "scope": 220, + "src": "3929:20:2", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Position_$118_storage_ptr", + "typeString": "struct MarketCollateralPool.Position" + }, + "typeName": { + "contractScope": null, + "id": 202, + "name": "Position", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 118, + "src": "3929:8:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Position_$118_storage_ptr", + "typeString": "struct MarketCollateralPool.Position" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 212, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 204, + "name": "contractAddressToUserPosition", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 128, + "src": "3952:29:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_struct$_UserNetPosition_$113_storage_$_$", + "typeString": "mapping(address => mapping(address => struct MarketCollateralPool.UserNetPosition storage ref))" + } + }, + "id": 206, + "indexExpression": { + "argumentTypes": null, + "id": 205, + "name": "marketContractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 191, + "src": "3982:21:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3952:52:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_UserNetPosition_$113_storage_$", + "typeString": "mapping(address => struct MarketCollateralPool.UserNetPosition storage ref)" + } + }, + "id": 208, + "indexExpression": { + "argumentTypes": null, + "id": 207, + "name": "userAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 193, + "src": "4005:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3952:65:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_UserNetPosition_$113_storage", + "typeString": "struct MarketCollateralPool.UserNetPosition storage ref" + } + }, + "id": 209, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "positions", + "nodeType": "MemberAccess", + "referencedDeclaration": 110, + "src": "3952:75:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_Position_$118_storage_$dyn_storage", + "typeString": "struct MarketCollateralPool.Position storage ref[] storage ref" + } + }, + "id": 211, + "indexExpression": { + "argumentTypes": null, + "id": 210, + "name": "index", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 195, + "src": "4028:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3952:82:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Position_$118_storage", + "typeString": "struct MarketCollateralPool.Position storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3929:105:2" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 213, + "name": "pos", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 203, + "src": "4052:3:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Position_$118_storage_ptr", + "typeString": "struct MarketCollateralPool.Position storage pointer" + } + }, + "id": 214, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "price", + "nodeType": "MemberAccess", + "referencedDeclaration": 115, + "src": "4052:9:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 215, + "name": "pos", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 203, + "src": "4063:3:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Position_$118_storage_ptr", + "typeString": "struct MarketCollateralPool.Position storage pointer" + } + }, + "id": 216, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "qty", + "nodeType": "MemberAccess", + "referencedDeclaration": 117, + "src": "4063:7:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "id": 217, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "4051:20:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_int256_$", + "typeString": "tuple(uint256,int256)" + } + }, + "functionReturnParameters": 201, + "id": 218, + "nodeType": "Return", + "src": "4044:27:2" + } + ] + }, + "documentation": "@notice Allows for retrieval of user position struct (since solidity cannot return the struct) we return\n the data as a tuple of (uint, int) that represents (price, qty)\n @param marketContractAddress MARKET Contract address\n @param userAddress address of user\n @param index 0 based index of position in array (older positions are lower indexes)\n @return (price, qty) tuple", + "id": 220, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getUserPosition", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 196, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 191, + "name": "marketContractAddress", + "nodeType": "VariableDeclaration", + "scope": 220, + "src": "3796:29:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 190, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3796:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 193, + "name": "userAddress", + "nodeType": "VariableDeclaration", + "scope": 220, + "src": "3835:19:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 192, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3835:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 195, + "name": "index", + "nodeType": "VariableDeclaration", + "scope": 220, + "src": "3864:10:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 194, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3864:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3786:94:2" + }, + "payable": false, + "returnParameters": { + "id": 201, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 198, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 220, + "src": "3904:4:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 197, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3904:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 200, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 220, + "src": "3910:3:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 199, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "3910:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3903:11:2" + }, + "scope": 841, + "src": "3762:316:2", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 235, + "nodeType": "Block", + "src": "4390:89:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 229, + "name": "tokenAddressToAccountBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 134, + "src": "4407:28:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 231, + "indexExpression": { + "argumentTypes": null, + "id": 230, + "name": "collateralTokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 222, + "src": "4436:22:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4407:52:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 233, + "indexExpression": { + "argumentTypes": null, + "id": 232, + "name": "userAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 224, + "src": "4460:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4407:65:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 228, + "id": 234, + "nodeType": "Return", + "src": "4400:72:2" + } + ] + }, + "documentation": "@param collateralTokenAddress ERC20 token address\n @param userAddress address of user\n @return the users currently unallocated token balance", + "id": 236, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getUserUnallocatedBalance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 225, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 222, + "name": "collateralTokenAddress", + "nodeType": "VariableDeclaration", + "scope": 236, + "src": "4291:30:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 221, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4291:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 224, + "name": "userAddress", + "nodeType": "VariableDeclaration", + "scope": 236, + "src": "4331:19:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 223, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4331:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4281:75:2" + }, + "payable": false, + "returnParameters": { + "id": 228, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 227, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 236, + "src": "4380:4:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 226, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4380:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4379:6:2" + }, + "scope": 841, + "src": "4247:232:2", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 281, + "nodeType": "Block", + "src": "4951:405:2", + "statements": [ + { + "assignments": [ + 244 + ], + "declarations": [ + { + "constant": false, + "id": 244, + "name": "balanceAfterDeposit", + "nodeType": "VariableDeclaration", + "scope": 282, + "src": "4961:27:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 243, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4961:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 254, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 252, + "name": "depositAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 240, + "src": "5060:13:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 245, + "name": "tokenAddressToAccountBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 134, + "src": "4991:28:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 247, + "indexExpression": { + "argumentTypes": null, + "id": 246, + "name": "collateralTokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 238, + "src": "5020:22:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4991:52:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 250, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 248, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8183, + "src": "5044:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 249, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5044:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4991:64:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 251, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 2552, + "src": "4991:68:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 253, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4991:83:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4961:113:2" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 259, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8183, + "src": "5131:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 260, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5131:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 261, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8212, + "src": "5143:4:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketCollateralPool_$841", + "typeString": "contract MarketCollateralPool" + } + }, + { + "argumentTypes": null, + "id": 262, + "name": "depositAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 240, + "src": "5149:13:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_contract$_MarketCollateralPool_$841", + "typeString": "contract MarketCollateralPool" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 256, + "name": "collateralTokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 238, + "src": "5090:22:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 255, + "name": "ERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7293, + "src": "5084:5:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC20_$7293_$", + "typeString": "type(contract ERC20)" + } + }, + "id": 257, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5084:29:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20_$7293", + "typeString": "contract ERC20" + } + }, + "id": 258, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "safeTransferFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 7368, + "src": "5084:46:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_ERC20_$7293_$_t_address_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_ERC20_$7293_$", + "typeString": "function (contract ERC20,address,address,uint256)" + } + }, + "id": 263, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5084:79:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 264, + "nodeType": "ExpressionStatement", + "src": "5084:79:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 272, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 265, + "name": "tokenAddressToAccountBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 134, + "src": "5173:28:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 269, + "indexExpression": { + "argumentTypes": null, + "id": 266, + "name": "collateralTokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 238, + "src": "5202:22:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5173:52:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 270, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 267, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8183, + "src": "5226:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 268, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5226:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5173:64:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 271, + "name": "balanceAfterDeposit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 244, + "src": "5240:19:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5173:86:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 273, + "nodeType": "ExpressionStatement", + "src": "5173:86:2" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 275, + "name": "collateralTokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 238, + "src": "5293:22:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 276, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8183, + "src": "5317:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 277, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5317:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 278, + "name": "balanceAfterDeposit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 244, + "src": "5329:19:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 274, + "name": "UpdatedUserBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 150, + "src": "5274:18:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 279, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5274:75:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 280, + "nodeType": "EmitStatement", + "src": "5269:80:2" + } + ] + }, + "documentation": "@notice deposits tokens to the smart contract to fund the user account and provide needed tokens for collateral\n pool upon trade matching.\n @param collateralTokenAddress ERC20 token address\n @param depositAmount qty of ERC20 tokens to deposit to the smart contract to cover open orders and collateral", + "id": 282, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "depositTokensForTrading", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 241, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 238, + "name": "collateralTokenAddress", + "nodeType": "VariableDeclaration", + "scope": 282, + "src": "4887:30:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 237, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4887:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 240, + "name": "depositAmount", + "nodeType": "VariableDeclaration", + "scope": 282, + "src": "4919:21:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 239, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4919:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4886:55:2" + }, + "payable": false, + "returnParameters": { + "id": 242, + "nodeType": "ParameterList", + "parameters": [], + "src": "4951:0:2" + }, + "scope": 841, + "src": "4854:502:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 344, + "nodeType": "Block", + "src": "5771:900:2", + "statements": [ + { + "assignments": [ + 288 + ], + "declarations": [ + { + "constant": false, + "id": 288, + "name": "marketContract", + "nodeType": "VariableDeclaration", + "scope": 345, + "src": "5781:29:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + }, + "typeName": { + "contractScope": null, + "id": 287, + "name": "MarketContract", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1018, + "src": "5781:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 292, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 290, + "name": "marketContractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 284, + "src": "5828:21:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 289, + "name": "MarketContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1018, + "src": "5813:14:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_MarketContract_$1018_$", + "typeString": "type(contract MarketContract)" + } + }, + "id": 291, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5813:37:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5781:69:2" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 294, + "name": "marketContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 288, + "src": "5868:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + "id": 295, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isSettled", + "nodeType": "MemberAccess", + "referencedDeclaration": 867, + "src": "5868:24:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_bool_$", + "typeString": "function () view external returns (bool)" + } + }, + "id": 296, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5868:26:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "436f6e7472616374206973206e6f7420736574746c6564", + "id": 297, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5896:25:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e85e74ee8892d05d6f146063cf69d91cd6f36266147f7107b539675c925d9eb9", + "typeString": "literal_string \"Contract is not settled\"" + }, + "value": "Contract is not settled" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_e85e74ee8892d05d6f146063cf69d91cd6f36266147f7107b539675c925d9eb9", + "typeString": "literal_string \"Contract is not settled\"" + } + ], + "id": 293, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 8186, + 8187 + ], + "referencedDeclaration": 8187, + "src": "5860:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 298, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5860:62:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 299, + "nodeType": "ExpressionStatement", + "src": "5860:62:2" + }, + { + "assignments": [ + 301 + ], + "declarations": [ + { + "constant": false, + "id": 301, + "name": "userNetPos", + "nodeType": "VariableDeclaration", + "scope": 345, + "src": "5932:34:2", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_UserNetPosition_$113_storage_ptr", + "typeString": "struct MarketCollateralPool.UserNetPosition" + }, + "typeName": { + "contractScope": null, + "id": 300, + "name": "UserNetPosition", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 113, + "src": "5932:15:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_UserNetPosition_$113_storage_ptr", + "typeString": "struct MarketCollateralPool.UserNetPosition" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 308, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 302, + "name": "contractAddressToUserPosition", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 128, + "src": "5969:29:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_struct$_UserNetPosition_$113_storage_$_$", + "typeString": "mapping(address => mapping(address => struct MarketCollateralPool.UserNetPosition storage ref))" + } + }, + "id": 304, + "indexExpression": { + "argumentTypes": null, + "id": 303, + "name": "marketContractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 284, + "src": "5999:21:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5969:52:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_UserNetPosition_$113_storage_$", + "typeString": "mapping(address => struct MarketCollateralPool.UserNetPosition storage ref)" + } + }, + "id": 307, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 305, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8183, + "src": "6022:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 306, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6022:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5969:64:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_UserNetPosition_$113_storage", + "typeString": "struct MarketCollateralPool.UserNetPosition storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5932:101:2" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 312, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 309, + "name": "userNetPos", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 301, + "src": "6047:10:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_UserNetPosition_$113_storage_ptr", + "typeString": "struct MarketCollateralPool.UserNetPosition storage pointer" + } + }, + "id": 310, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "netPosition", + "nodeType": "MemberAccess", + "referencedDeclaration": 112, + "src": "6047:22:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 311, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6073:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "6047:27:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 329, + "nodeType": "IfStatement", + "src": "6043:388:2", + "trueBody": { + "id": 328, + "nodeType": "Block", + "src": "6076:355:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 314, + "name": "marketContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 288, + "src": "6240:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + { + "argumentTypes": null, + "id": 315, + "name": "userNetPos", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 301, + "src": "6272:10:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_UserNetPosition_$113_storage_ptr", + "typeString": "struct MarketCollateralPool.UserNetPosition storage pointer" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 316, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8183, + "src": "6300:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 317, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6300:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 322, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 318, + "name": "userNetPos", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 301, + "src": "6328:10:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_UserNetPosition_$113_storage_ptr", + "typeString": "struct MarketCollateralPool.UserNetPosition storage pointer" + } + }, + "id": 319, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "netPosition", + "nodeType": "MemberAccess", + "referencedDeclaration": 112, + "src": "6328:22:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 321, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "-", + "prefix": true, + "src": "6353:3:2", + "subExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 320, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6355:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "typeDescriptions": { + "typeIdentifier": "t_rational_-1_by_1", + "typeString": "int_const -1" + } + }, + "src": "6328:28:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 323, + "name": "marketContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 288, + "src": "6374:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + "id": 324, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "settlementPrice", + "nodeType": "MemberAccess", + "referencedDeclaration": 864, + "src": "6374:30:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 325, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6374:32:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + }, + { + "typeIdentifier": "t_struct$_UserNetPosition_$113_storage_ptr", + "typeString": "struct MarketCollateralPool.UserNetPosition storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 313, + "name": "reduceUserNetPosition", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 828, + "src": "6201:21:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_MarketContract_$1018_$_t_struct$_UserNetPosition_$113_storage_ptr_$_t_address_$_t_int256_$_t_uint256_$returns$__$", + "typeString": "function (contract MarketContract,struct MarketCollateralPool.UserNetPosition storage pointer,address,int256,uint256)" + } + }, + "id": 326, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6201:219:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 327, + "nodeType": "ExpressionStatement", + "src": "6201:219:2" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 331, + "name": "marketContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 288, + "src": "6516:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + "id": 332, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "COLLATERAL_TOKEN_ADDRESS", + "nodeType": "MemberAccess", + "referencedDeclaration": 850, + "src": "6516:39:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_address_$", + "typeString": "function () view external returns (address)" + } + }, + "id": 333, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6516:41:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 334, + "name": "tokenAddressToAccountBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 134, + "src": "6571:28:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 338, + "indexExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 335, + "name": "marketContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 288, + "src": "6600:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + "id": 336, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "COLLATERAL_TOKEN_ADDRESS", + "nodeType": "MemberAccess", + "referencedDeclaration": 850, + "src": "6600:39:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_address_$", + "typeString": "function () view external returns (address)" + } + }, + "id": 337, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6600:41:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6571:71:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 341, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 339, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8183, + "src": "6643:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 340, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6643:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6571:83:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 330, + "name": "withdrawTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 441, + "src": "6488:14:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 342, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6488:176:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 343, + "nodeType": "ExpressionStatement", + "src": "6488:176:2" + } + ] + }, + "documentation": "@param marketContractAddress address of the MARKET Contract being traded.", + "id": 345, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "settleAndClose", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 285, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 284, + "name": "marketContractAddress", + "nodeType": "VariableDeclaration", + "scope": 345, + "src": "5731:29:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 283, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5731:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5730:31:2" + }, + "payable": false, + "returnParameters": { + "id": 286, + "nodeType": "ParameterList", + "parameters": [], + "src": "5771:0:2" + }, + "scope": 841, + "src": "5707:964:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 383, + "nodeType": "Block", + "src": "7269:399:2", + "statements": [ + { + "assignments": [ + 361 + ], + "declarations": [ + { + "constant": false, + "id": 361, + "name": "marketContract", + "nodeType": "VariableDeclaration", + "scope": 384, + "src": "7279:29:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + }, + "typeName": { + "contractScope": null, + "id": 360, + "name": "MarketContract", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1018, + "src": "7279:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 365, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 363, + "name": "marketContractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 347, + "src": "7326:21:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 362, + "name": "MarketContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1018, + "src": "7311:14:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_MarketContract_$1018_$", + "typeString": "type(contract MarketContract)" + } + }, + "id": 364, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7311:37:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7279:69:2" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 367, + "name": "marketContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 361, + "src": "7386:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + { + "argumentTypes": null, + "id": 368, + "name": "maker", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "7414:5:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 369, + "name": "qty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 353, + "src": "7433:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + { + "argumentTypes": null, + "id": 370, + "name": "price", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 355, + "src": "7450:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 366, + "name": "updatePosition", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 642, + "src": "7358:14:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_MarketContract_$1018_$_t_address_$_t_int256_$_t_uint256_$returns$__$", + "typeString": "function (contract MarketContract,address,int256,uint256)" + } + }, + "id": 371, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7358:107:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 372, + "nodeType": "ExpressionStatement", + "src": "7358:107:2" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 374, + "name": "marketContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 361, + "src": "7577:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + { + "argumentTypes": null, + "id": 375, + "name": "taker", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 351, + "src": "7605:5:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 379, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 376, + "name": "qty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 353, + "src": "7624:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 378, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "-", + "prefix": true, + "src": "7630:2:2", + "subExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 377, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7631:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "typeDescriptions": { + "typeIdentifier": "t_rational_-1_by_1", + "typeString": "int_const -1" + } + }, + "src": "7624:8:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + { + "argumentTypes": null, + "id": 380, + "name": "price", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 355, + "src": "7646:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 373, + "name": "updatePosition", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 642, + "src": "7549:14:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_MarketContract_$1018_$_t_address_$_t_int256_$_t_uint256_$returns$__$", + "typeString": "function (contract MarketContract,address,int256,uint256)" + } + }, + "id": 381, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7549:112:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 382, + "nodeType": "ExpressionStatement", + "src": "7549:112:2" + } + ] + }, + "documentation": "@dev called by our linked trading hub when a trade occurs to update both maker and takers positions.\n @param marketContractAddress address of the market contract being traded\n @param maker address of the maker in the trade\n @param taker address of the taker in the trade\n @param qty quantity transacted between parties\n @param price agreed price of the matched trade.", + "id": 384, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 358, + "modifierName": { + "argumentTypes": null, + "id": 357, + "name": "onlyTradingHub", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 840, + "src": "7250:14:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "7250:14:2" + } + ], + "name": "updatePositions", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 356, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 347, + "name": "marketContractAddress", + "nodeType": "VariableDeclaration", + "scope": 384, + "src": "7122:29:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 346, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7122:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 349, + "name": "maker", + "nodeType": "VariableDeclaration", + "scope": 384, + "src": "7161:13:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 348, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7161:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 351, + "name": "taker", + "nodeType": "VariableDeclaration", + "scope": 384, + "src": "7184:13:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 350, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7184:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 353, + "name": "qty", + "nodeType": "VariableDeclaration", + "scope": 384, + "src": "7207:7:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 352, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "7207:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 355, + "name": "price", + "nodeType": "VariableDeclaration", + "scope": 384, + "src": "7224:10:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 354, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "7224:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7112:128:2" + }, + "payable": false, + "returnParameters": { + "id": 359, + "nodeType": "ParameterList", + "parameters": [], + "src": "7269:0:2" + }, + "scope": 841, + "src": "7088:580:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 395, + "nodeType": "Block", + "src": "7948:59:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 393, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 391, + "name": "marketTradingHub", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 142, + "src": "7958:16:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 392, + "name": "marketTradingHubAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 386, + "src": "7977:23:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "7958:42:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 394, + "nodeType": "ExpressionStatement", + "src": "7958:42:2" + } + ] + }, + "documentation": "@notice allows for us to set our trading hub address post deployment.\n @param marketTradingHubAddress address of our linked trading hub", + "id": 396, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 389, + "modifierName": { + "argumentTypes": null, + "id": 388, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7057, + "src": "7938:9:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "7938:9:2" + } + ], + "name": "setMarketTradingHubAddress", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 387, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 386, + "name": "marketTradingHubAddress", + "nodeType": "VariableDeclaration", + "scope": 396, + "src": "7898:31:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 385, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7898:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7897:33:2" + }, + "payable": false, + "returnParameters": { + "id": 390, + "nodeType": "ParameterList", + "parameters": [], + "src": "7948:0:2" + }, + "scope": 841, + "src": "7862:145:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 440, + "nodeType": "Block", + "src": "8281:476:2", + "statements": [ + { + "assignments": [ + 404 + ], + "declarations": [ + { + "constant": false, + "id": 404, + "name": "balanceAfterWithdrawal", + "nodeType": "VariableDeclaration", + "scope": 441, + "src": "8291:30:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 403, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8291:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 414, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 412, + "name": "withdrawAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 400, + "src": "8411:14:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 405, + "name": "tokenAddressToAccountBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 134, + "src": "8324:28:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 407, + "indexExpression": { + "argumentTypes": null, + "id": 406, + "name": "collateralTokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 398, + "src": "8353:22:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8324:52:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 410, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 408, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8183, + "src": "8377:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 409, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "8377:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8324:64:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 411, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "subtract", + "nodeType": "MemberAccess", + "referencedDeclaration": 2528, + "src": "8324:73:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 413, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8324:111:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8291:144:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 422, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 415, + "name": "tokenAddressToAccountBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 134, + "src": "8446:28:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 419, + "indexExpression": { + "argumentTypes": null, + "id": 416, + "name": "collateralTokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 398, + "src": "8475:22:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8446:52:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 420, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 417, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8183, + "src": "8499:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 418, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "8499:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "8446:64:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 421, + "name": "balanceAfterWithdrawal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 404, + "src": "8513:22:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8446:89:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 423, + "nodeType": "ExpressionStatement", + "src": "8446:89:2" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 428, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8183, + "src": "8630:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 429, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "8630:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 430, + "name": "withdrawAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 400, + "src": "8642:14:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 425, + "name": "collateralTokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 398, + "src": "8593:22:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 424, + "name": "ERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7293, + "src": "8587:5:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC20_$7293_$", + "typeString": "type(contract ERC20)" + } + }, + "id": 426, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8587:29:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20_$7293", + "typeString": "contract ERC20" + } + }, + "id": 427, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "safeTransfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 7347, + "src": "8587:42:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_ERC20Basic_$7325_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_ERC20Basic_$7325_$", + "typeString": "function (contract ERC20Basic,address,uint256)" + } + }, + "id": 431, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8587:70:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 432, + "nodeType": "ExpressionStatement", + "src": "8587:70:2" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 434, + "name": "collateralTokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 398, + "src": "8691:22:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 435, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8183, + "src": "8715:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 436, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "8715:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 437, + "name": "balanceAfterWithdrawal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 404, + "src": "8727:22:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 433, + "name": "UpdatedUserBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 150, + "src": "8672:18:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 438, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8672:78:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 439, + "nodeType": "EmitStatement", + "src": "8667:83:2" + } + ] + }, + "documentation": "@notice removes token from users trading account\n @param collateralTokenAddress ERC20 token address\n @param withdrawAmount qty of token to attempt to withdraw", + "id": 441, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "withdrawTokens", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 401, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 398, + "name": "collateralTokenAddress", + "nodeType": "VariableDeclaration", + "scope": 441, + "src": "8218:30:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 397, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8218:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 400, + "name": "withdrawAmount", + "nodeType": "VariableDeclaration", + "scope": 441, + "src": "8250:22:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 399, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8250:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8217:56:2" + }, + "payable": false, + "returnParameters": { + "id": 402, + "nodeType": "ParameterList", + "parameters": [], + "src": "8281:0:2" + }, + "scope": 841, + "src": "8194:563:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 492, + "nodeType": "Block", + "src": "9263:525:2", + "statements": [ + { + "assignments": [ + 451 + ], + "declarations": [ + { + "constant": false, + "id": 451, + "name": "newBalance", + "nodeType": "VariableDeclaration", + "scope": 493, + "src": "9273:15:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 450, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "9273:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 462, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 460, + "name": "collateralAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 447, + "src": "9402:16:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 452, + "name": "tokenAddressToAccountBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 134, + "src": "9291:28:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 456, + "indexExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 453, + "name": "marketContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 443, + "src": "9320:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + "id": 454, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "COLLATERAL_TOKEN_ADDRESS", + "nodeType": "MemberAccess", + "referencedDeclaration": 850, + "src": "9320:39:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_address_$", + "typeString": "function () view external returns (address)" + } + }, + "id": 455, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9320:41:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9291:71:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 458, + "indexExpression": { + "argumentTypes": null, + "id": 457, + "name": "fromAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 445, + "src": "9363:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9291:84:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 459, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "subtract", + "nodeType": "MemberAccess", + "referencedDeclaration": 2528, + "src": "9291:93:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 461, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9291:137:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9273:155:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 471, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 463, + "name": "tokenAddressToAccountBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 134, + "src": "9439:28:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 468, + "indexExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 464, + "name": "marketContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 443, + "src": "9468:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + "id": 465, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "COLLATERAL_TOKEN_ADDRESS", + "nodeType": "MemberAccess", + "referencedDeclaration": 850, + "src": "9468:39:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_address_$", + "typeString": "function () view external returns (address)" + } + }, + "id": 466, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9468:41:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9439:71:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 469, + "indexExpression": { + "argumentTypes": null, + "id": 467, + "name": "fromAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 445, + "src": "9511:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "9439:84:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 470, + "name": "newBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 451, + "src": "9526:10:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9439:97:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 472, + "nodeType": "ExpressionStatement", + "src": "9439:97:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 482, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 473, + "name": "contractAddressToCollateralPoolBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 122, + "src": "9546:38:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 475, + "indexExpression": { + "argumentTypes": null, + "id": 474, + "name": "marketContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 443, + "src": "9585:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "9546:54:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 480, + "name": "collateralAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 447, + "src": "9662:16:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 476, + "name": "contractAddressToCollateralPoolBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 122, + "src": "9603:38:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 478, + "indexExpression": { + "argumentTypes": null, + "id": 477, + "name": "marketContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 443, + "src": "9642:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9603:54:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 479, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 2552, + "src": "9603:58:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 481, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9603:76:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9546:133:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 483, + "nodeType": "ExpressionStatement", + "src": "9546:133:2" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 485, + "name": "marketContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 443, + "src": "9714:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + "id": 486, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "COLLATERAL_TOKEN_ADDRESS", + "nodeType": "MemberAccess", + "referencedDeclaration": 850, + "src": "9714:39:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_address_$", + "typeString": "function () view external returns (address)" + } + }, + "id": 487, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9714:41:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 488, + "name": "fromAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 445, + "src": "9757:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 489, + "name": "newBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 451, + "src": "9770:10:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 484, + "name": "UpdatedUserBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 150, + "src": "9695:18:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 490, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9695:86:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 491, + "nodeType": "EmitStatement", + "src": "9690:91:2" + } + ] + }, + "documentation": "@notice moves collateral from a user's account to the pool upon trade execution.\n @param marketContract the MARKET Contract being traded.\n @param fromAddress address of user entering trade\n @param collateralAmount amount of collateral to transfer from user account to collateral pool", + "id": 493, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "commitCollateralToPool", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 448, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 443, + "name": "marketContract", + "nodeType": "VariableDeclaration", + "scope": 493, + "src": "9155:29:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + }, + "typeName": { + "contractScope": null, + "id": 442, + "name": "MarketContract", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1018, + "src": "9155:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 445, + "name": "fromAddress", + "nodeType": "VariableDeclaration", + "scope": 493, + "src": "9194:19:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 444, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9194:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 447, + "name": "collateralAmount", + "nodeType": "VariableDeclaration", + "scope": 493, + "src": "9223:21:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 446, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "9223:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9145:105:2" + }, + "payable": false, + "returnParameters": { + "id": 449, + "nodeType": "ParameterList", + "parameters": [], + "src": "9263:0:2" + }, + "scope": 841, + "src": "9114:674:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "private" + }, + { + "body": { + "id": 544, + "nodeType": "Block", + "src": "10215:514:2", + "statements": [ + { + "assignments": [ + 503 + ], + "declarations": [ + { + "constant": false, + "id": 503, + "name": "newBalance", + "nodeType": "VariableDeclaration", + "scope": 545, + "src": "10225:15:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 502, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "10225:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 514, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 512, + "name": "collateralAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 499, + "src": "10330:16:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 504, + "name": "tokenAddressToAccountBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 134, + "src": "10243:28:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 508, + "indexExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 505, + "name": "marketContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 495, + "src": "10272:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + "id": 506, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "COLLATERAL_TOKEN_ADDRESS", + "nodeType": "MemberAccess", + "referencedDeclaration": 850, + "src": "10272:39:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_address_$", + "typeString": "function () view external returns (address)" + } + }, + "id": 507, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10272:41:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10243:71:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 510, + "indexExpression": { + "argumentTypes": null, + "id": 509, + "name": "toAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 497, + "src": "10315:9:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10243:82:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 511, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 2552, + "src": "10243:86:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 513, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10243:104:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "10225:122:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 523, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 515, + "name": "tokenAddressToAccountBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 134, + "src": "10357:28:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 520, + "indexExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 516, + "name": "marketContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 495, + "src": "10386:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + "id": 517, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "COLLATERAL_TOKEN_ADDRESS", + "nodeType": "MemberAccess", + "referencedDeclaration": 850, + "src": "10386:39:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_address_$", + "typeString": "function () view external returns (address)" + } + }, + "id": 518, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10386:41:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10357:71:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 521, + "indexExpression": { + "argumentTypes": null, + "id": 519, + "name": "toAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 497, + "src": "10429:9:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "10357:82:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 522, + "name": "newBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 503, + "src": "10442:10:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10357:95:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 524, + "nodeType": "ExpressionStatement", + "src": "10357:95:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 534, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 525, + "name": "contractAddressToCollateralPoolBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 122, + "src": "10462:38:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 527, + "indexExpression": { + "argumentTypes": null, + "id": 526, + "name": "marketContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 495, + "src": "10501:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "10462:54:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 532, + "name": "collateralAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 499, + "src": "10596:16:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 528, + "name": "contractAddressToCollateralPoolBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 122, + "src": "10519:38:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 530, + "indexExpression": { + "argumentTypes": null, + "id": 529, + "name": "marketContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 495, + "src": "10558:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10519:54:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 531, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "subtract", + "nodeType": "MemberAccess", + "referencedDeclaration": 2528, + "src": "10519:63:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 533, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10519:103:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10462:160:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 535, + "nodeType": "ExpressionStatement", + "src": "10462:160:2" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 537, + "name": "marketContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 495, + "src": "10657:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + "id": 538, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "COLLATERAL_TOKEN_ADDRESS", + "nodeType": "MemberAccess", + "referencedDeclaration": 850, + "src": "10657:39:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_address_$", + "typeString": "function () view external returns (address)" + } + }, + "id": 539, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10657:41:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 540, + "name": "toAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 497, + "src": "10700:9:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 541, + "name": "newBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 503, + "src": "10711:10:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 536, + "name": "UpdatedUserBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 150, + "src": "10638:18:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 542, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10638:84:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 543, + "nodeType": "EmitStatement", + "src": "10633:89:2" + } + ] + }, + "documentation": "@notice withdraws collateral from pool to a user account upon exit or trade settlement\n @param marketContract the MARKET Contract being traded.\n @param toAddress address of user\n @param collateralAmount amount to transfer from pool to user.", + "id": 545, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "withdrawCollateralFromPool", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 500, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 495, + "name": "marketContract", + "nodeType": "VariableDeclaration", + "scope": 545, + "src": "10109:29:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + }, + "typeName": { + "contractScope": null, + "id": 494, + "name": "MarketContract", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1018, + "src": "10109:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 497, + "name": "toAddress", + "nodeType": "VariableDeclaration", + "scope": 545, + "src": "10148:17:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 496, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10148:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 499, + "name": "collateralAmount", + "nodeType": "VariableDeclaration", + "scope": 545, + "src": "10175:21:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 498, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "10175:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10099:103:2" + }, + "payable": false, + "returnParameters": { + "id": 501, + "nodeType": "ParameterList", + "parameters": [], + "src": "10215:0:2" + }, + "scope": 841, + "src": "10064:665:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "private" + }, + { + "body": { + "id": 641, + "nodeType": "Block", + "src": "11284:1690:2", + "statements": [ + { + "assignments": [ + 557 + ], + "declarations": [ + { + "constant": false, + "id": 557, + "name": "userNetPosition", + "nodeType": "VariableDeclaration", + "scope": 642, + "src": "11294:39:2", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_UserNetPosition_$113_storage_ptr", + "typeString": "struct MarketCollateralPool.UserNetPosition" + }, + "typeName": { + "contractScope": null, + "id": 556, + "name": "UserNetPosition", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 113, + "src": "11294:15:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_UserNetPosition_$113_storage_ptr", + "typeString": "struct MarketCollateralPool.UserNetPosition" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 563, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 558, + "name": "contractAddressToUserPosition", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 128, + "src": "11336:29:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_struct$_UserNetPosition_$113_storage_$_$", + "typeString": "mapping(address => mapping(address => struct MarketCollateralPool.UserNetPosition storage ref))" + } + }, + "id": 560, + "indexExpression": { + "argumentTypes": null, + "id": 559, + "name": "marketContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 547, + "src": "11366:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11336:45:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_UserNetPosition_$113_storage_$", + "typeString": "mapping(address => struct MarketCollateralPool.UserNetPosition storage ref)" + } + }, + "id": 562, + "indexExpression": { + "argumentTypes": null, + "id": 561, + "name": "userAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 549, + "src": "11382:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11336:58:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_UserNetPosition_$113_storage", + "typeString": "struct MarketCollateralPool.UserNetPosition storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11294:100:2" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 573, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 567, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 564, + "name": "userNetPosition", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 557, + "src": "11408:15:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_UserNetPosition_$113_storage_ptr", + "typeString": "struct MarketCollateralPool.UserNetPosition storage pointer" + } + }, + "id": 565, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "netPosition", + "nodeType": "MemberAccess", + "referencedDeclaration": 112, + "src": "11408:27:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 566, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11439:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "11408:32:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 571, + "name": "qty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 551, + "src": "11483:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 568, + "name": "userNetPosition", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 557, + "src": "11444:15:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_UserNetPosition_$113_storage_ptr", + "typeString": "struct MarketCollateralPool.UserNetPosition storage pointer" + } + }, + "id": 569, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "netPosition", + "nodeType": "MemberAccess", + "referencedDeclaration": 112, + "src": "11444:27:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 570, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isSameSign", + "nodeType": "MemberAccess", + "referencedDeclaration": 2663, + "src": "11444:38:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_bool_$bound_to$_t_int256_$", + "typeString": "function (int256,int256) pure returns (bool)" + } + }, + "id": 572, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11444:43:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "11408:79:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 629, + "nodeType": "Block", + "src": "11740:1091:2", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 590, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 583, + "name": "userNetPosition", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 557, + "src": "11827:15:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_UserNetPosition_$113_storage_ptr", + "typeString": "struct MarketCollateralPool.UserNetPosition storage pointer" + } + }, + "id": 584, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "netPosition", + "nodeType": "MemberAccess", + "referencedDeclaration": 112, + "src": "11827:27:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 585, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "abs", + "nodeType": "MemberAccess", + "referencedDeclaration": 2686, + "src": "11827:31:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_uint256_$bound_to$_t_int256_$", + "typeString": "function (int256) pure returns (uint256)" + } + }, + "id": 586, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11827:33:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 587, + "name": "qty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 551, + "src": "11864:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 588, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "abs", + "nodeType": "MemberAccess", + "referencedDeclaration": 2686, + "src": "11864:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_uint256_$bound_to$_t_int256_$", + "typeString": "function (int256) pure returns (uint256)" + } + }, + "id": 589, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11864:9:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "11827:46:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 627, + "nodeType": "Block", + "src": "12142:679:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 601, + "name": "marketContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 547, + "src": "12262:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + { + "argumentTypes": null, + "id": 602, + "name": "userNetPosition", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 557, + "src": "12298:15:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_UserNetPosition_$113_storage_ptr", + "typeString": "struct MarketCollateralPool.UserNetPosition storage pointer" + } + }, + { + "argumentTypes": null, + "id": 603, + "name": "userAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 549, + "src": "12335:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 608, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 604, + "name": "userNetPosition", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 557, + "src": "12368:15:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_UserNetPosition_$113_storage_ptr", + "typeString": "struct MarketCollateralPool.UserNetPosition storage pointer" + } + }, + "id": 605, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "netPosition", + "nodeType": "MemberAccess", + "referencedDeclaration": 112, + "src": "12368:27:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 607, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "-", + "prefix": true, + "src": "12398:2:2", + "subExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 606, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12399:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "typeDescriptions": { + "typeIdentifier": "t_rational_-1_by_1", + "typeString": "int_const -1" + } + }, + "src": "12368:32:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + { + "argumentTypes": null, + "id": 609, + "name": "price", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 553, + "src": "12422:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + }, + { + "typeIdentifier": "t_struct$_UserNetPosition_$113_storage_ptr", + "typeString": "struct MarketCollateralPool.UserNetPosition storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 600, + "name": "reduceUserNetPosition", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 828, + "src": "12219:21:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_MarketContract_$1018_$_t_struct$_UserNetPosition_$113_storage_ptr_$_t_address_$_t_int256_$_t_uint256_$returns$__$", + "typeString": "function (contract MarketContract,struct MarketCollateralPool.UserNetPosition storage pointer,address,int256,uint256)" + } + }, + "id": 610, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12219:226:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 611, + "nodeType": "ExpressionStatement", + "src": "12219:226:2" + }, + { + "assignments": [ + 613 + ], + "declarations": [ + { + "constant": false, + "id": 613, + "name": "newNetPos", + "nodeType": "VariableDeclaration", + "scope": 642, + "src": "12486:13:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 612, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "12486:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 618, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 617, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 614, + "name": "userNetPosition", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 557, + "src": "12502:15:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_UserNetPosition_$113_storage_ptr", + "typeString": "struct MarketCollateralPool.UserNetPosition storage pointer" + } + }, + "id": 615, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "netPosition", + "nodeType": "MemberAccess", + "referencedDeclaration": 112, + "src": "12502:27:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "id": 616, + "name": "qty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 551, + "src": "12532:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "12502:33:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12486:49:2" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 620, + "name": "marketContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 547, + "src": "12646:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + { + "argumentTypes": null, + "id": 621, + "name": "userNetPosition", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 557, + "src": "12682:15:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_UserNetPosition_$113_storage_ptr", + "typeString": "struct MarketCollateralPool.UserNetPosition storage pointer" + } + }, + { + "argumentTypes": null, + "id": 622, + "name": "userAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 549, + "src": "12719:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 623, + "name": "newNetPos", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 613, + "src": "12752:9:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + { + "argumentTypes": null, + "id": 624, + "name": "price", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 553, + "src": "12783:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + }, + { + "typeIdentifier": "t_struct$_UserNetPosition_$113_storage_ptr", + "typeString": "struct MarketCollateralPool.UserNetPosition storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 619, + "name": "addUserNetPosition", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 690, + "src": "12606:18:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_MarketContract_$1018_$_t_struct$_UserNetPosition_$113_storage_ptr_$_t_address_$_t_int256_$_t_uint256_$returns$__$", + "typeString": "function (contract MarketContract,struct MarketCollateralPool.UserNetPosition storage pointer,address,int256,uint256)" + } + }, + "id": 625, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12606:200:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 626, + "nodeType": "ExpressionStatement", + "src": "12606:200:2" + } + ] + }, + "id": 628, + "nodeType": "IfStatement", + "src": "11823:998:2", + "trueBody": { + "id": 599, + "nodeType": "Block", + "src": "11875:261:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 592, + "name": "marketContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 547, + "src": "11967:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + { + "argumentTypes": null, + "id": 593, + "name": "userNetPosition", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 557, + "src": "12003:15:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_UserNetPosition_$113_storage_ptr", + "typeString": "struct MarketCollateralPool.UserNetPosition storage pointer" + } + }, + { + "argumentTypes": null, + "id": 594, + "name": "userAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 549, + "src": "12040:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 595, + "name": "qty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 551, + "src": "12073:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + { + "argumentTypes": null, + "id": 596, + "name": "price", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 553, + "src": "12098:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + }, + { + "typeIdentifier": "t_struct$_UserNetPosition_$113_storage_ptr", + "typeString": "struct MarketCollateralPool.UserNetPosition storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 591, + "name": "reduceUserNetPosition", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 828, + "src": "11924:21:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_MarketContract_$1018_$_t_struct$_UserNetPosition_$113_storage_ptr_$_t_address_$_t_int256_$_t_uint256_$returns$__$", + "typeString": "function (contract MarketContract,struct MarketCollateralPool.UserNetPosition storage pointer,address,int256,uint256)" + } + }, + "id": 597, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11924:197:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 598, + "nodeType": "ExpressionStatement", + "src": "11924:197:2" + } + ] + } + } + ] + }, + "id": 630, + "nodeType": "IfStatement", + "src": "11404:1427:2", + "trueBody": { + "id": 582, + "nodeType": "Block", + "src": "11489:245:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 575, + "name": "marketContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 547, + "src": "11589:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + { + "argumentTypes": null, + "id": 576, + "name": "userNetPosition", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 557, + "src": "11621:15:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_UserNetPosition_$113_storage_ptr", + "typeString": "struct MarketCollateralPool.UserNetPosition storage pointer" + } + }, + { + "argumentTypes": null, + "id": 577, + "name": "userAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 549, + "src": "11654:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 578, + "name": "qty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 551, + "src": "11683:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + { + "argumentTypes": null, + "id": 579, + "name": "price", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 553, + "src": "11704:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + }, + { + "typeIdentifier": "t_struct$_UserNetPosition_$113_storage_ptr", + "typeString": "struct MarketCollateralPool.UserNetPosition storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 574, + "name": "addUserNetPosition", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 690, + "src": "11553:18:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_MarketContract_$1018_$_t_struct$_UserNetPosition_$113_storage_ptr_$_t_address_$_t_int256_$_t_uint256_$returns$__$", + "typeString": "function (contract MarketContract,struct MarketCollateralPool.UserNetPosition storage pointer,address,int256,uint256)" + } + }, + "id": 580, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11553:170:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 581, + "nodeType": "ExpressionStatement", + "src": "11553:170:2" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "id": 639, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 631, + "name": "userNetPosition", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 557, + "src": "12840:15:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_UserNetPosition_$113_storage_ptr", + "typeString": "struct MarketCollateralPool.UserNetPosition storage pointer" + } + }, + "id": 633, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "netPosition", + "nodeType": "MemberAccess", + "referencedDeclaration": 112, + "src": "12840:27:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 637, + "name": "qty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 551, + "src": "12902:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 634, + "name": "userNetPosition", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 557, + "src": "12870:15:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_UserNetPosition_$113_storage_ptr", + "typeString": "struct MarketCollateralPool.UserNetPosition storage pointer" + } + }, + "id": 635, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "netPosition", + "nodeType": "MemberAccess", + "referencedDeclaration": 112, + "src": "12870:27:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 636, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 2601, + "src": "12870:31:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_int256_$bound_to$_t_int256_$", + "typeString": "function (int256,int256) pure returns (int256)" + } + }, + "id": 638, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12870:36:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "12840:66:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 640, + "nodeType": "ExpressionStatement", + "src": "12840:66:2" + } + ] + }, + "documentation": "@dev handles all needed internal accounting when a user enters into a new trade\n @param marketContract the MARKET Contract being traded.\n @param userAddress storage struct containing position information for this user\n @param qty signed quantity this users position is changing by, + for buy and - for sell\n @param price transacted price of the new position / trade", + "id": 642, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "updatePosition", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 554, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 547, + "name": "marketContract", + "nodeType": "VariableDeclaration", + "scope": 642, + "src": "11170:29:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + }, + "typeName": { + "contractScope": null, + "id": 546, + "name": "MarketContract", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1018, + "src": "11170:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 549, + "name": "userAddress", + "nodeType": "VariableDeclaration", + "scope": 642, + "src": "11209:19:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 548, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11209:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 551, + "name": "qty", + "nodeType": "VariableDeclaration", + "scope": 642, + "src": "11238:7:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 550, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "11238:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 553, + "name": "price", + "nodeType": "VariableDeclaration", + "scope": 642, + "src": "11255:10:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 552, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "11255:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11160:111:2" + }, + "payable": false, + "returnParameters": { + "id": 555, + "nodeType": "ParameterList", + "parameters": [], + "src": "11284:0:2" + }, + "scope": 841, + "src": "11137:1837:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "private" + }, + { + "body": { + "id": 689, + "nodeType": "Block", + "src": "13669:424:2", + "statements": [ + { + "assignments": [ + 656 + ], + "declarations": [ + { + "constant": false, + "id": 656, + "name": "neededCollateral", + "nodeType": "VariableDeclaration", + "scope": 690, + "src": "13679:21:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 655, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "13679:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 671, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 659, + "name": "marketContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 644, + "src": "13750:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + "id": 660, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "PRICE_FLOOR", + "nodeType": "MemberAccess", + "referencedDeclaration": 854, + "src": "13750:26:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 661, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13750:28:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 662, + "name": "marketContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 644, + "src": "13792:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + "id": 663, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "PRICE_CAP", + "nodeType": "MemberAccess", + "referencedDeclaration": 852, + "src": "13792:24:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 664, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13792:26:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 665, + "name": "marketContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 644, + "src": "13832:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + "id": 666, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "QTY_MULTIPLIER", + "nodeType": "MemberAccess", + "referencedDeclaration": 858, + "src": "13832:29:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 667, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13832:31:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 668, + "name": "qty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 650, + "src": "13877:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + { + "argumentTypes": null, + "id": 669, + "name": "price", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 652, + "src": "13894:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 657, + "name": "MathLib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2798, + "src": "13703:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_MathLib_$2798_$", + "typeString": "type(library MathLib)" + } + }, + "id": 658, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "calculateNeededCollateral", + "nodeType": "MemberAccess", + "referencedDeclaration": 2797, + "src": "13703:33:2", + "typeDescriptions": { + "typeIdentifier": "t_function_delegatecall_pure$_t_uint256_$_t_uint256_$_t_uint256_$_t_int256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,uint256,int256,uint256) pure returns (uint256)" + } + }, + "id": 670, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13703:206:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13679:230:2" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 673, + "name": "marketContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 644, + "src": "13942:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + { + "argumentTypes": null, + "id": 674, + "name": "userAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 648, + "src": "13958:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 675, + "name": "neededCollateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 656, + "src": "13971:16:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 672, + "name": "commitCollateralToPool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 493, + "src": "13919:22:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_MarketContract_$1018_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract MarketContract,address,uint256)" + } + }, + "id": 676, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13919:69:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 677, + "nodeType": "ExpressionStatement", + "src": "13919:69:2" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 684, + "name": "price", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 652, + "src": "14038:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 685, + "name": "qty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 650, + "src": "14045:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 683, + "name": "Position", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 118, + "src": "14029:8:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_struct$_Position_$118_storage_ptr_$", + "typeString": "type(struct MarketCollateralPool.Position storage pointer)" + } + }, + "id": 686, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "structConstructorCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14029:20:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Position_$118_memory", + "typeString": "struct MarketCollateralPool.Position memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Position_$118_memory", + "typeString": "struct MarketCollateralPool.Position memory" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 678, + "name": "userNetPosition", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 646, + "src": "13998:15:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_UserNetPosition_$113_storage_ptr", + "typeString": "struct MarketCollateralPool.UserNetPosition storage pointer" + } + }, + "id": 681, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "positions", + "nodeType": "MemberAccess", + "referencedDeclaration": 110, + "src": "13998:25:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_Position_$118_storage_$dyn_storage", + "typeString": "struct MarketCollateralPool.Position storage ref[] storage ref" + } + }, + "id": 682, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "push", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "13998:30:2", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_struct$_Position_$118_storage_$returns$_t_uint256_$", + "typeString": "function (struct MarketCollateralPool.Position storage ref) returns (uint256)" + } + }, + "id": 687, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13998:52:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 688, + "nodeType": "ExpressionStatement", + "src": "13998:52:2" + } + ] + }, + "documentation": "@dev calculates the needed collateral for a new position and commits it to the pool removing it from the\n users account and creates the needed Position struct to record the new position.\n @param marketContract The MARKET Contract being traded.\n @param userNetPosition current positions held by user\n @param userAddress address of user entering into the position\n @param qty signed quantity of the trade\n @param price agreed price of trade", + "id": 690, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "addUserNetPosition", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 653, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 644, + "name": "marketContract", + "nodeType": "VariableDeclaration", + "scope": 690, + "src": "13506:29:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + }, + "typeName": { + "contractScope": null, + "id": 643, + "name": "MarketContract", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1018, + "src": "13506:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 646, + "name": "userNetPosition", + "nodeType": "VariableDeclaration", + "scope": 690, + "src": "13545:39:2", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_UserNetPosition_$113_storage_ptr", + "typeString": "struct MarketCollateralPool.UserNetPosition" + }, + "typeName": { + "contractScope": null, + "id": 645, + "name": "UserNetPosition", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 113, + "src": "13545:15:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_UserNetPosition_$113_storage_ptr", + "typeString": "struct MarketCollateralPool.UserNetPosition" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 648, + "name": "userAddress", + "nodeType": "VariableDeclaration", + "scope": 690, + "src": "13594:19:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 647, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13594:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 650, + "name": "qty", + "nodeType": "VariableDeclaration", + "scope": 690, + "src": "13623:7:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 649, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "13623:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 652, + "name": "price", + "nodeType": "VariableDeclaration", + "scope": 690, + "src": "13640:10:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 651, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "13640:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13496:160:2" + }, + "payable": false, + "returnParameters": { + "id": 654, + "nodeType": "ParameterList", + "parameters": [], + "src": "13669:0:2" + }, + "scope": 841, + "src": "13469:624:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "private" + }, + { + "body": { + "id": 827, + "nodeType": "Block", + "src": "14691:2022:2", + "statements": [ + { + "assignments": [ + 704 + ], + "declarations": [ + { + "constant": false, + "id": 704, + "name": "collateralToReturnToUserAccount", + "nodeType": "VariableDeclaration", + "scope": 828, + "src": "14701:36:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 703, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "14701:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 706, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 705, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14740:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "14701:40:2" + }, + { + "assignments": [ + 708 + ], + "declarations": [ + { + "constant": false, + "id": 708, + "name": "qtyToReduce", + "nodeType": "VariableDeclaration", + "scope": 828, + "src": "14751:15:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 707, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "14751:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 710, + "initialValue": { + "argumentTypes": null, + "id": 709, + "name": "qty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 698, + "src": "14769:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14751:21:2" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 716, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 712, + "name": "userNetPos", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 694, + "src": "14863:10:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_UserNetPosition_$113_storage_ptr", + "typeString": "struct MarketCollateralPool.UserNetPosition storage pointer" + } + }, + "id": 713, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "positions", + "nodeType": "MemberAccess", + "referencedDeclaration": 110, + "src": "14863:20:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_Position_$118_storage_$dyn_storage", + "typeString": "struct MarketCollateralPool.Position storage ref[] storage ref" + } + }, + "id": 714, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "14863:27:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 715, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14894:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "14863:32:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 711, + "name": "assert", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8172, + "src": "14856:6:2", + "typeDescriptions": { + "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 717, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14856:40:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 718, + "nodeType": "ExpressionStatement", + "src": "14856:40:2" + }, + { + "body": { + "id": 814, + "nodeType": "Block", + "src": "14949:1555:2", + "statements": [ + { + "assignments": [ + 723 + ], + "declarations": [ + { + "constant": false, + "id": 723, + "name": "position", + "nodeType": "VariableDeclaration", + "scope": 828, + "src": "15009:25:2", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Position_$118_storage_ptr", + "typeString": "struct MarketCollateralPool.Position" + }, + "typeName": { + "contractScope": null, + "id": 722, + "name": "Position", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 118, + "src": "15009:8:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Position_$118_storage_ptr", + "typeString": "struct MarketCollateralPool.Position" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 732, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 724, + "name": "userNetPos", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 694, + "src": "15037:10:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_UserNetPosition_$113_storage_ptr", + "typeString": "struct MarketCollateralPool.UserNetPosition storage pointer" + } + }, + "id": 725, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "positions", + "nodeType": "MemberAccess", + "referencedDeclaration": 110, + "src": "15037:20:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_Position_$118_storage_$dyn_storage", + "typeString": "struct MarketCollateralPool.Position storage ref[] storage ref" + } + }, + "id": 731, + "indexExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 730, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 726, + "name": "userNetPos", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 694, + "src": "15058:10:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_UserNetPosition_$113_storage_ptr", + "typeString": "struct MarketCollateralPool.UserNetPosition storage pointer" + } + }, + "id": 727, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "positions", + "nodeType": "MemberAccess", + "referencedDeclaration": 110, + "src": "15058:20:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_Position_$118_storage_$dyn_storage", + "typeString": "struct MarketCollateralPool.Position storage ref[] storage ref" + } + }, + "id": 728, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "15058:27:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 729, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15088:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "15058:31:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "15037:53:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Position_$118_storage", + "typeString": "struct MarketCollateralPool.Position storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "15009:81:2" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 740, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 733, + "name": "position", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 723, + "src": "15136:8:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Position_$118_storage_ptr", + "typeString": "struct MarketCollateralPool.Position storage pointer" + } + }, + "id": 734, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "qty", + "nodeType": "MemberAccess", + "referencedDeclaration": 117, + "src": "15136:12:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 735, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "abs", + "nodeType": "MemberAccess", + "referencedDeclaration": 2686, + "src": "15136:16:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_uint256_$bound_to$_t_int256_$", + "typeString": "function (int256) pure returns (uint256)" + } + }, + "id": 736, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15136:18:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 737, + "name": "qtyToReduce", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 708, + "src": "15158:11:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 738, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "abs", + "nodeType": "MemberAccess", + "referencedDeclaration": 2686, + "src": "15158:15:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_uint256_$bound_to$_t_int256_$", + "typeString": "function (int256) pure returns (uint256)" + } + }, + "id": 739, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15158:17:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "15136:39:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 812, + "nodeType": "Block", + "src": "15804:690:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 786, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 778, + "name": "position", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 723, + "src": "15868:8:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Position_$118_storage_ptr", + "typeString": "struct MarketCollateralPool.Position storage pointer" + } + }, + "id": 780, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "qty", + "nodeType": "MemberAccess", + "referencedDeclaration": 117, + "src": "15868:12:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 784, + "name": "qtyToReduce", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 708, + "src": "15900:11:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 781, + "name": "position", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 723, + "src": "15883:8:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Position_$118_storage_ptr", + "typeString": "struct MarketCollateralPool.Position storage pointer" + } + }, + "id": 782, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "qty", + "nodeType": "MemberAccess", + "referencedDeclaration": 117, + "src": "15883:12:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 783, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 2601, + "src": "15883:16:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_int256_$bound_to$_t_int256_$", + "typeString": "function (int256,int256) pure returns (int256)" + } + }, + "id": 785, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15883:29:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "15868:44:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 787, + "nodeType": "ExpressionStatement", + "src": "15868:44:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 809, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 788, + "name": "collateralToReturnToUserAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 704, + "src": "15994:31:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 793, + "name": "marketContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 692, + "src": "16144:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + "id": 794, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "PRICE_FLOOR", + "nodeType": "MemberAccess", + "referencedDeclaration": 854, + "src": "16144:26:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 795, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16144:28:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 796, + "name": "marketContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 692, + "src": "16198:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + "id": 797, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "PRICE_CAP", + "nodeType": "MemberAccess", + "referencedDeclaration": 852, + "src": "16198:24:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 798, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16198:26:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 799, + "name": "marketContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 692, + "src": "16250:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + "id": 800, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "QTY_MULTIPLIER", + "nodeType": "MemberAccess", + "referencedDeclaration": 858, + "src": "16250:29:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 801, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16250:31:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 805, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 802, + "name": "qtyToReduce", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 708, + "src": "16307:11:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 804, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "-", + "prefix": true, + "src": "16321:2:2", + "subExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 803, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16322:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "typeDescriptions": { + "typeIdentifier": "t_rational_-1_by_1", + "typeString": "int_const -1" + } + }, + "src": "16307:16:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + { + "argumentTypes": null, + "id": 806, + "name": "price", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 700, + "src": "16349:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 791, + "name": "MathLib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2798, + "src": "16085:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_MathLib_$2798_$", + "typeString": "type(library MathLib)" + } + }, + "id": 792, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "calculateNeededCollateral", + "nodeType": "MemberAccess", + "referencedDeclaration": 2797, + "src": "16085:33:2", + "typeDescriptions": { + "typeIdentifier": "t_function_delegatecall_pure$_t_uint256_$_t_uint256_$_t_uint256_$_t_int256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,uint256,int256,uint256) pure returns (uint256)" + } + }, + "id": 807, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16085:291:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 789, + "name": "collateralToReturnToUserAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 704, + "src": "16028:31:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 790, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 2552, + "src": "16028:35:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 808, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16028:366:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "15994:400:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 810, + "nodeType": "ExpressionStatement", + "src": "15994:400:2" + }, + { + "id": 811, + "nodeType": "Break", + "src": "16474:5:2" + } + ] + }, + "id": 813, + "nodeType": "IfStatement", + "src": "15132:1362:2", + "trueBody": { + "id": 777, + "nodeType": "Block", + "src": "15177:621:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 760, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 741, + "name": "collateralToReturnToUserAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 704, + "src": "15238:31:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 746, + "name": "marketContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 692, + "src": "15388:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + "id": 747, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "PRICE_FLOOR", + "nodeType": "MemberAccess", + "referencedDeclaration": 854, + "src": "15388:26:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 748, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15388:28:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 749, + "name": "marketContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 692, + "src": "15442:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + "id": 750, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "PRICE_CAP", + "nodeType": "MemberAccess", + "referencedDeclaration": 852, + "src": "15442:24:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 751, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15442:26:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 752, + "name": "marketContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 692, + "src": "15494:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + "id": 753, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "QTY_MULTIPLIER", + "nodeType": "MemberAccess", + "referencedDeclaration": 858, + "src": "15494:29:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 754, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15494:31:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 755, + "name": "position", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 723, + "src": "15551:8:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Position_$118_storage_ptr", + "typeString": "struct MarketCollateralPool.Position storage pointer" + } + }, + "id": 756, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "qty", + "nodeType": "MemberAccess", + "referencedDeclaration": 117, + "src": "15551:12:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + { + "argumentTypes": null, + "id": 757, + "name": "price", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 700, + "src": "15589:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 744, + "name": "MathLib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2798, + "src": "15329:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_MathLib_$2798_$", + "typeString": "type(library MathLib)" + } + }, + "id": 745, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "calculateNeededCollateral", + "nodeType": "MemberAccess", + "referencedDeclaration": 2797, + "src": "15329:33:2", + "typeDescriptions": { + "typeIdentifier": "t_function_delegatecall_pure$_t_uint256_$_t_uint256_$_t_uint256_$_t_int256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,uint256,int256,uint256) pure returns (uint256)" + } + }, + "id": 758, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15329:287:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 742, + "name": "collateralToReturnToUserAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 704, + "src": "15272:31:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 743, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 2552, + "src": "15272:35:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 759, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15272:362:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "15238:396:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 761, + "nodeType": "ExpressionStatement", + "src": "15238:396:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 768, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 762, + "name": "qtyToReduce", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 708, + "src": "15652:11:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 765, + "name": "position", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 723, + "src": "15682:8:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Position_$118_storage_ptr", + "typeString": "struct MarketCollateralPool.Position storage pointer" + } + }, + "id": 766, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "qty", + "nodeType": "MemberAccess", + "referencedDeclaration": 117, + "src": "15682:12:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "expression": { + "argumentTypes": null, + "id": 763, + "name": "qtyToReduce", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 708, + "src": "15666:11:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 764, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 2601, + "src": "15666:15:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_int256_$bound_to$_t_int256_$", + "typeString": "function (int256,int256) pure returns (int256)" + } + }, + "id": 767, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15666:29:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "15652:43:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 769, + "nodeType": "ExpressionStatement", + "src": "15652:43:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 775, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "--", + "prefix": false, + "src": "15713:29:2", + "subExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 770, + "name": "userNetPos", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 694, + "src": "15713:10:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_UserNetPosition_$113_storage_ptr", + "typeString": "struct MarketCollateralPool.UserNetPosition storage pointer" + } + }, + "id": 773, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "positions", + "nodeType": "MemberAccess", + "referencedDeclaration": 110, + "src": "15713:20:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_Position_$118_storage_$dyn_storage", + "typeString": "struct MarketCollateralPool.Position storage ref[] storage ref" + } + }, + "id": 774, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "15713:27:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 776, + "nodeType": "ExpressionStatement", + "src": "15713:29:2" + } + ] + } + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 721, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 719, + "name": "qtyToReduce", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 708, + "src": "14931:11:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 720, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14946:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "14931:16:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 815, + "nodeType": "WhileStatement", + "src": "14924:1580:2" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 818, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 816, + "name": "collateralToReturnToUserAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 704, + "src": "16518:31:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 817, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16553:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "16518:36:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 826, + "nodeType": "IfStatement", + "src": "16514:193:2", + "trueBody": { + "id": 825, + "nodeType": "Block", + "src": "16556:151:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 820, + "name": "marketContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 692, + "src": "16635:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + { + "argumentTypes": null, + "id": 821, + "name": "userAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 696, + "src": "16651:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 822, + "name": "collateralToReturnToUserAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 704, + "src": "16664:31:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 819, + "name": "withdrawCollateralFromPool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 545, + "src": "16608:26:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_MarketContract_$1018_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract MarketContract,address,uint256)" + } + }, + "id": 823, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16608:88:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 824, + "nodeType": "ExpressionStatement", + "src": "16608:88:2" + } + ] + } + } + ] + }, + "documentation": "@dev reduces net position correctly allocating collateral back to user\n @param marketContract The MARKET Contract being traded.\n @param userNetPos storage struct for this users position\n @param userAddress address of user who is reducing their pos\n @param qty signed quantity of the qty to reduce this users position by\n @param price transacted price", + "id": 828, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "reduceUserNetPosition", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 701, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 692, + "name": "marketContract", + "nodeType": "VariableDeclaration", + "scope": 828, + "src": "14533:29:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + }, + "typeName": { + "contractScope": null, + "id": 691, + "name": "MarketContract", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1018, + "src": "14533:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 694, + "name": "userNetPos", + "nodeType": "VariableDeclaration", + "scope": 828, + "src": "14572:34:2", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_UserNetPosition_$113_storage_ptr", + "typeString": "struct MarketCollateralPool.UserNetPosition" + }, + "typeName": { + "contractScope": null, + "id": 693, + "name": "UserNetPosition", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 113, + "src": "14572:15:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_UserNetPosition_$113_storage_ptr", + "typeString": "struct MarketCollateralPool.UserNetPosition" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 696, + "name": "userAddress", + "nodeType": "VariableDeclaration", + "scope": 828, + "src": "14616:19:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 695, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "14616:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 698, + "name": "qty", + "nodeType": "VariableDeclaration", + "scope": 828, + "src": "14645:7:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 697, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "14645:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 700, + "name": "price", + "nodeType": "VariableDeclaration", + "scope": 828, + "src": "14662:10:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 699, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "14662:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14523:155:2" + }, + "payable": false, + "returnParameters": { + "id": 702, + "nodeType": "ParameterList", + "parameters": [], + "src": "14691:0:2" + }, + "scope": 841, + "src": "14493:2220:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "private" + }, + { + "body": { + "id": 839, + "nodeType": "Block", + "src": "16745:108:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 834, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 831, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8183, + "src": "16763:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 832, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "16763:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 833, + "name": "marketTradingHub", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 142, + "src": "16777:16:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "16763:30:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "43616e206f6e6c792062652063616c6c6564206279207468652074726164696e6720687562", + "id": 835, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16795:39:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6e692ca996dafdcc67dd9dac9183b7f10149e59c26a63f375363668f7e7a50b8", + "typeString": "literal_string \"Can only be called by the trading hub\"" + }, + "value": "Can only be called by the trading hub" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_6e692ca996dafdcc67dd9dac9183b7f10149e59c26a63f375363668f7e7a50b8", + "typeString": "literal_string \"Can only be called by the trading hub\"" + } + ], + "id": 830, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 8186, + 8187 + ], + "referencedDeclaration": 8187, + "src": "16755:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 836, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16755:80:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 837, + "nodeType": "ExpressionStatement", + "src": "16755:80:2" + }, + { + "id": 838, + "nodeType": "PlaceholderStatement", + "src": "16845:1:2" + } + ] + }, + "documentation": null, + "id": 840, + "name": "onlyTradingHub", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 829, + "nodeType": "ParameterList", + "parameters": [], + "src": "16742:2:2" + }, + "src": "16719:134:2", + "visibility": "internal" + } + ], + "scope": 842, + "src": "1216:15639:2" + } + ], + "src": "608:16248:2" + }, + "compiler": { + "name": "solc", + "version": "0.4.24+commit.e67f0147.Emscripten.clang" + }, + "networks": { + "4": { + "events": {}, + "links": { + "MathLib": "0x063574399f3f73d3b23006b1403a57cfbbabc10d" + }, + "address": "0x5f18de94219ddf1c851e1bcc032e093a3a860a35", + "transactionHash": "0x38959eae32faf3bb78d8d05e062ae29cd92143e99cbea334d9fc1fc58d76abb8" + } + }, + "schemaVersion": "2.0.1", + "updatedAt": "2018-10-16T03:15:00.555Z" +} \ No newline at end of file diff --git a/build/contracts/MarketCollateralPoolFactory.json b/build/contracts/MarketCollateralPoolFactory.json deleted file mode 100644 index b69dbe4..0000000 --- a/build/contracts/MarketCollateralPoolFactory.json +++ /dev/null @@ -1,1995 +0,0 @@ -{ - "contractName": "MarketCollateralPoolFactory", - "abi": [ - { - "constant": true, - "inputs": [], - "name": "owner", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "marketContractRegistry", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "name": "registryAddress", - "type": "address" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "constant": false, - "inputs": [ - { - "name": "marketContractAddress", - "type": "address" - } - ], - "name": "deployMarketCollateralPool", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "registryAddress", - "type": "address" - } - ], - "name": "setRegistryAddress", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - } - ], - "bytecode": "0x608060405234801561001057600080fd5b50604051602080612aaf83398101806040528101908080519060200190929190505050336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506129eb806100c46000396000f30060806040526004361061006d576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680636a8da881146100725780638da5cb5b146100b5578063ab7b49931461010c578063ceaaa9151461014f578063f2fde38b146101a6575b600080fd5b34801561007e57600080fd5b506100b3600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506101e9565b005b3480156100c157600080fd5b506100ca610403565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561011857600080fd5b5061014d600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610428565b005b34801561015b57600080fd5b50610164610503565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101b257600080fd5b506101e7600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610529565b005b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad23de63836040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b1580156102a857600080fd5b505af11580156102bc573d6000803e3d6000fd5b505050506040513d60208110156102d257600080fd5b810190808051906020019092919050505015156102ee57600080fd5b816102f761067e565b808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050604051809103906000f080158015610349573d6000803e3d6000fd5b5090508173ffffffffffffffffffffffffffffffffffffffff1663c201293b826040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050600060405180830381600087803b1580156103e757600080fd5b505af11580156103fb573d6000803e3d6000fd5b505050505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561048357600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515156104bf57600080fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561058457600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515156105c057600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6040516123318061068f833901905600608060405234801561001057600080fd5b506040516020806123318339810180604052810190808051906020019092919050505080600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415151561007057600080fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505080600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663798ddbc86040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561017857600080fd5b505af115801561018c573d6000803e3d6000fd5b505050506040513d60208110156101a257600080fd5b8101908080519060200190929190505050600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505061212e806102036000396000f3006080604052600436106100ba576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680631c88ef1e146100bf578063315a095d1461012757806331e8a7ef146101545780633bc6db30146101ab5780633f7f4f17146101c257806345aff2fa14610219578063798ddbc8146102705780637bb55cd2146102c75780638af6375f1461031e578063a68e5ad014610349578063aafff7e114610376578063eeaba083146103cd575b600080fd5b3480156100cb57600080fd5b5061010a600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610444565b604051808381526020018281526020019250505060405180910390f35b34801561013357600080fd5b50610152600480360381019080803590602001909291905050506104be565b005b34801561016057600080fd5b50610195600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610695565b6040518082815260200191505060405180910390f35b3480156101b757600080fd5b506101c06106e4565b005b3480156101ce57600080fd5b50610203600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610a98565b6040518082815260200191505060405180910390f35b34801561022557600080fd5b5061025a600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610ae1565b6040518082815260200191505060405180910390f35b34801561027c57600080fd5b50610285610b2d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156102d357600080fd5b506102dc610b53565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561032a57600080fd5b50610333610b78565b6040518082815260200191505060405180910390f35b34801561035557600080fd5b5061037460048036038101908080359060200190929190505050610b7e565b005b34801561038257600080fd5b506103b7600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610eb0565b6040518082815260200191505060405180910390f35b3480156103d957600080fd5b50610442600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190505050610ec8565b005b6000806000600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018481548110151561049857fe5b906000526020600020906002020190508060000154816001015492509250509250929050565b600061051282600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f6190919063ffffffff16565b905080600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506106433383600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663323bb7756040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156105e357600080fd5b505af11580156105f7573d6000803e3d6000fd5b505050506040513d602081101561060d57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16610f7a9092919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167f60ede3b17b4e31768b93d5237d5fceb759f4d879bc5bb7c916a42ebaa311e6e6826040518082815260200191505060405180910390a25050565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001805490509050919050565b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633270bb5b6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561076c57600080fd5b505af1158015610780573d6000803e3d6000fd5b505050506040513d602081101561079657600080fd5b810190808051906020019092919050505015156107b257600080fd5b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663cfab472f600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16336040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b1580156108c557600080fd5b505af11580156108d9573d6000803e3d6000fd5b505050506040513d60208110156108ef57600080fd5b8101908080519060200190929190505050151561090b57600080fd5b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905060008160010154141515610a4d57610a4c81337fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff846001015402600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f348e8b26040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610a0c57600080fd5b505af1158015610a20573d6000803e3d6000fd5b505050506040513d6020811015610a3657600080fd5b8101908080519060200190929190505050611065565b5b610a95600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546104be565b50565b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101549050919050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60015481565b6000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663cfab472f600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16336040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b158015610c9357600080fd5b505af1158015610ca7573d6000803e3d6000fd5b505050506040513d6020811015610cbd57600080fd5b81019080805190602001909291905050501515610cd957600080fd5b610d2b82600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546117ae90919063ffffffff16565b9050610e1a333084600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663323bb7756040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610db957600080fd5b505af1158015610dcd573d6000803e3d6000fd5b505050506040513d6020811015610de357600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166117cc909392919063ffffffff16565b80600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055503373ffffffffffffffffffffffffffffffffffffffff167f60ede3b17b4e31768b93d5237d5fceb759f4d879bc5bb7c916a42ebaa311e6e6826040518082815260200191505060405180910390a25050565b60036020528060005260406000206000915090505481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610f2357600080fd5b610f2e8483836118ec565b610f5b837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8402836118ec565b50505050565b6000828211151515610f6f57fe5b818303905092915050565b8273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561101d57600080fd5b505af1158015611031573d6000803e3d6000fd5b505050506040513d602081101561104757600080fd5b8101908080519060200190929190505050151561106057fe5b505050565b6000806000809250849150600087600001805490501415151561108457fe5b5b600082141515611790578660000160018860000180549050038154811015156110aa57fe5b906000526020600020906002020190506110c382611a09565b6110d08260010154611a09565b11151561142b576113f373__MathLib_______________________________63ed981d4f600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c32b1dfa6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561117a57600080fd5b505af115801561118e573d6000803e3d6000fd5b505050506040513d60208110156111a457600080fd5b8101908080519060200190929190505050600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b5471dee6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561123b57600080fd5b505af115801561124f573d6000803e3d6000fd5b505050506040513d602081101561126557600080fd5b8101908080519060200190929190505050600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ca361d676040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156112fc57600080fd5b505af1158015611310573d6000803e3d6000fd5b505050506040513d602081101561132657600080fd5b810190808051906020019092919050505086600101548a6040518663ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808681526020018581526020018481526020018381526020018281526020019550505050505060206040518083038186803b1580156113a957600080fd5b505af41580156113bd573d6000803e3d6000fd5b505050506040513d60208110156113d357600080fd5b8101908080519060200190929190505050846117ae90919063ffffffff16565b925061140c816001015483611a2790919063ffffffff16565b91508660000180548091906001900361142591906120a1565b5061178b565b611442828260010154611a2790919063ffffffff16565b816001018190555061178473__MathLib_______________________________63ed981d4f600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c32b1dfa6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156114ed57600080fd5b505af1158015611501573d6000803e3d6000fd5b505050506040513d602081101561151757600080fd5b8101908080519060200190929190505050600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b5471dee6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156115ae57600080fd5b505af11580156115c2573d6000803e3d6000fd5b505050506040513d60208110156115d857600080fd5b8101908080519060200190929190505050600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ca361d676040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561166f57600080fd5b505af1158015611683573d6000803e3d6000fd5b505050506040513d602081101561169957600080fd5b81019080805190602001909291905050507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff88028a6040518663ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808681526020018581526020018481526020018381526020018281526020019550505050505060206040518083038186803b15801561173a57600080fd5b505af415801561174e573d6000803e3d6000fd5b505050506040513d602081101561176457600080fd5b8101908080519060200190929190505050846117ae90919063ffffffff16565b9250611790565b611085565b6000831415156117a5576117a48684611a8f565b5b50505050505050565b60008082840190508381101515156117c257fe5b8091505092915050565b8373ffffffffffffffffffffffffffffffffffffffff166323b872dd8484846040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b1580156118a357600080fd5b505af11580156118b7573d6000803e3d6000fd5b505050506040513d60208110156118cd57600080fd5b810190808051906020019092919050505015156118e657fe5b50505050565b600080600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002091506000826001015414806119565750611955848360010154611bd090919063ffffffff16565b5b1561196c5761196782868686611bea565b6119e3565b61197584611a09565b6119828360010154611a09565b10151561199a5761199582868686611065565b6119e2565b6119cc82867fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff85600101540286611065565b8382600101540190506119e182868386611bea565b5b5b6119fa848360010154611a2790919063ffffffff16565b82600101819055505050505050565b600080821215611a1e57816000039050611a22565b8190505b919050565b6000808284019050611a398484611bd0565b1515611a4757809150611a88565b600084121515611a6d578360ff60019060020a0219038313151515611a6857fe5b611a84565b8360ff60019060020a02038312151515611a8357fe5b5b8091505b5092915050565b6000611ae382600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546117ae90919063ffffffff16565b905080600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611b3e82600154610f6190919063ffffffff16565b6001819055508273ffffffffffffffffffffffffffffffffffffffff167f60ede3b17b4e31768b93d5237d5fceb759f4d879bc5bb7c916a42ebaa311e6e6826040518082815260200191505060405180910390a27fc6203b6a88d29510779ca9dba6a5e132f609c335e49a244d6d9e842ebaabb2706001546040518082815260200191505060405180910390a1505050565b600081831480611be257506000828402135b905092915050565b600073__MathLib_______________________________63ed981d4f600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c32b1dfa6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015611c8c57600080fd5b505af1158015611ca0573d6000803e3d6000fd5b505050506040513d6020811015611cb657600080fd5b8101908080519060200190929190505050600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b5471dee6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015611d4d57600080fd5b505af1158015611d61573d6000803e3d6000fd5b505050506040513d6020811015611d7757600080fd5b8101908080519060200190929190505050600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ca361d676040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015611e0e57600080fd5b505af1158015611e22573d6000803e3d6000fd5b505050506040513d6020811015611e3857600080fd5b810190808051906020019092919050505087876040518663ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808681526020018581526020018481526020018381526020018281526020019550505050505060206040518083038186803b158015611eb757600080fd5b505af4158015611ecb573d6000803e3d6000fd5b505050506040513d6020811015611ee157600080fd5b81019080805190602001909291905050509050611efe8482611f60565b846000016040805190810160405280848152602001858152509080600181540180825580915050906001820390600052602060002090600202016000909192909190915060008201518160000155602082015181600101555050505050505050565b6000611fb482600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f6190919063ffffffff16565b905080600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061200f826001546117ae90919063ffffffff16565b6001819055508273ffffffffffffffffffffffffffffffffffffffff167f60ede3b17b4e31768b93d5237d5fceb759f4d879bc5bb7c916a42ebaa311e6e6826040518082815260200191505060405180910390a27fc6203b6a88d29510779ca9dba6a5e132f609c335e49a244d6d9e842ebaabb2706001546040518082815260200191505060405180910390a1505050565b8154818355818111156120ce576002028160020283600052602060002091820191016120cd91906120d3565b5b505050565b6120ff91905b808211156120fb576000808201600090556001820160009055506002016120d9565b5090565b905600a165627a7a723058200ec7e527ae0877b1c2aa375f8c678ebb2c2d28e7b400ff21b65ec622012a9c3e0029a165627a7a72305820cbb2d78093b3f1f9c7580933a07039073aef38ab298dc0ee21635528da3b9a6c0029", - "deployedBytecode": "0x60806040526004361061006d576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680636a8da881146100725780638da5cb5b146100b5578063ab7b49931461010c578063ceaaa9151461014f578063f2fde38b146101a6575b600080fd5b34801561007e57600080fd5b506100b3600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506101e9565b005b3480156100c157600080fd5b506100ca610403565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561011857600080fd5b5061014d600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610428565b005b34801561015b57600080fd5b50610164610503565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101b257600080fd5b506101e7600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610529565b005b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad23de63836040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b1580156102a857600080fd5b505af11580156102bc573d6000803e3d6000fd5b505050506040513d60208110156102d257600080fd5b810190808051906020019092919050505015156102ee57600080fd5b816102f761067e565b808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050604051809103906000f080158015610349573d6000803e3d6000fd5b5090508173ffffffffffffffffffffffffffffffffffffffff1663c201293b826040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050600060405180830381600087803b1580156103e757600080fd5b505af11580156103fb573d6000803e3d6000fd5b505050505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561048357600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515156104bf57600080fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561058457600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515156105c057600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6040516123318061068f833901905600608060405234801561001057600080fd5b506040516020806123318339810180604052810190808051906020019092919050505080600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415151561007057600080fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505080600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663798ddbc86040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561017857600080fd5b505af115801561018c573d6000803e3d6000fd5b505050506040513d60208110156101a257600080fd5b8101908080519060200190929190505050600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505061212e806102036000396000f3006080604052600436106100ba576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680631c88ef1e146100bf578063315a095d1461012757806331e8a7ef146101545780633bc6db30146101ab5780633f7f4f17146101c257806345aff2fa14610219578063798ddbc8146102705780637bb55cd2146102c75780638af6375f1461031e578063a68e5ad014610349578063aafff7e114610376578063eeaba083146103cd575b600080fd5b3480156100cb57600080fd5b5061010a600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610444565b604051808381526020018281526020019250505060405180910390f35b34801561013357600080fd5b50610152600480360381019080803590602001909291905050506104be565b005b34801561016057600080fd5b50610195600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610695565b6040518082815260200191505060405180910390f35b3480156101b757600080fd5b506101c06106e4565b005b3480156101ce57600080fd5b50610203600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610a98565b6040518082815260200191505060405180910390f35b34801561022557600080fd5b5061025a600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610ae1565b6040518082815260200191505060405180910390f35b34801561027c57600080fd5b50610285610b2d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156102d357600080fd5b506102dc610b53565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561032a57600080fd5b50610333610b78565b6040518082815260200191505060405180910390f35b34801561035557600080fd5b5061037460048036038101908080359060200190929190505050610b7e565b005b34801561038257600080fd5b506103b7600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610eb0565b6040518082815260200191505060405180910390f35b3480156103d957600080fd5b50610442600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190505050610ec8565b005b6000806000600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018481548110151561049857fe5b906000526020600020906002020190508060000154816001015492509250509250929050565b600061051282600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f6190919063ffffffff16565b905080600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506106433383600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663323bb7756040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156105e357600080fd5b505af11580156105f7573d6000803e3d6000fd5b505050506040513d602081101561060d57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16610f7a9092919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167f60ede3b17b4e31768b93d5237d5fceb759f4d879bc5bb7c916a42ebaa311e6e6826040518082815260200191505060405180910390a25050565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001805490509050919050565b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633270bb5b6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561076c57600080fd5b505af1158015610780573d6000803e3d6000fd5b505050506040513d602081101561079657600080fd5b810190808051906020019092919050505015156107b257600080fd5b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663cfab472f600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16336040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b1580156108c557600080fd5b505af11580156108d9573d6000803e3d6000fd5b505050506040513d60208110156108ef57600080fd5b8101908080519060200190929190505050151561090b57600080fd5b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905060008160010154141515610a4d57610a4c81337fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff846001015402600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f348e8b26040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610a0c57600080fd5b505af1158015610a20573d6000803e3d6000fd5b505050506040513d6020811015610a3657600080fd5b8101908080519060200190929190505050611065565b5b610a95600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546104be565b50565b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101549050919050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60015481565b6000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663cfab472f600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16336040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b158015610c9357600080fd5b505af1158015610ca7573d6000803e3d6000fd5b505050506040513d6020811015610cbd57600080fd5b81019080805190602001909291905050501515610cd957600080fd5b610d2b82600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546117ae90919063ffffffff16565b9050610e1a333084600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663323bb7756040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610db957600080fd5b505af1158015610dcd573d6000803e3d6000fd5b505050506040513d6020811015610de357600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166117cc909392919063ffffffff16565b80600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055503373ffffffffffffffffffffffffffffffffffffffff167f60ede3b17b4e31768b93d5237d5fceb759f4d879bc5bb7c916a42ebaa311e6e6826040518082815260200191505060405180910390a25050565b60036020528060005260406000206000915090505481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610f2357600080fd5b610f2e8483836118ec565b610f5b837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8402836118ec565b50505050565b6000828211151515610f6f57fe5b818303905092915050565b8273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561101d57600080fd5b505af1158015611031573d6000803e3d6000fd5b505050506040513d602081101561104757600080fd5b8101908080519060200190929190505050151561106057fe5b505050565b6000806000809250849150600087600001805490501415151561108457fe5b5b600082141515611790578660000160018860000180549050038154811015156110aa57fe5b906000526020600020906002020190506110c382611a09565b6110d08260010154611a09565b11151561142b576113f373__MathLib_______________________________63ed981d4f600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c32b1dfa6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561117a57600080fd5b505af115801561118e573d6000803e3d6000fd5b505050506040513d60208110156111a457600080fd5b8101908080519060200190929190505050600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b5471dee6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561123b57600080fd5b505af115801561124f573d6000803e3d6000fd5b505050506040513d602081101561126557600080fd5b8101908080519060200190929190505050600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ca361d676040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156112fc57600080fd5b505af1158015611310573d6000803e3d6000fd5b505050506040513d602081101561132657600080fd5b810190808051906020019092919050505086600101548a6040518663ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808681526020018581526020018481526020018381526020018281526020019550505050505060206040518083038186803b1580156113a957600080fd5b505af41580156113bd573d6000803e3d6000fd5b505050506040513d60208110156113d357600080fd5b8101908080519060200190929190505050846117ae90919063ffffffff16565b925061140c816001015483611a2790919063ffffffff16565b91508660000180548091906001900361142591906120a1565b5061178b565b611442828260010154611a2790919063ffffffff16565b816001018190555061178473__MathLib_______________________________63ed981d4f600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c32b1dfa6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156114ed57600080fd5b505af1158015611501573d6000803e3d6000fd5b505050506040513d602081101561151757600080fd5b8101908080519060200190929190505050600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b5471dee6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156115ae57600080fd5b505af11580156115c2573d6000803e3d6000fd5b505050506040513d60208110156115d857600080fd5b8101908080519060200190929190505050600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ca361d676040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561166f57600080fd5b505af1158015611683573d6000803e3d6000fd5b505050506040513d602081101561169957600080fd5b81019080805190602001909291905050507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff88028a6040518663ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808681526020018581526020018481526020018381526020018281526020019550505050505060206040518083038186803b15801561173a57600080fd5b505af415801561174e573d6000803e3d6000fd5b505050506040513d602081101561176457600080fd5b8101908080519060200190929190505050846117ae90919063ffffffff16565b9250611790565b611085565b6000831415156117a5576117a48684611a8f565b5b50505050505050565b60008082840190508381101515156117c257fe5b8091505092915050565b8373ffffffffffffffffffffffffffffffffffffffff166323b872dd8484846040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b1580156118a357600080fd5b505af11580156118b7573d6000803e3d6000fd5b505050506040513d60208110156118cd57600080fd5b810190808051906020019092919050505015156118e657fe5b50505050565b600080600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002091506000826001015414806119565750611955848360010154611bd090919063ffffffff16565b5b1561196c5761196782868686611bea565b6119e3565b61197584611a09565b6119828360010154611a09565b10151561199a5761199582868686611065565b6119e2565b6119cc82867fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff85600101540286611065565b8382600101540190506119e182868386611bea565b5b5b6119fa848360010154611a2790919063ffffffff16565b82600101819055505050505050565b600080821215611a1e57816000039050611a22565b8190505b919050565b6000808284019050611a398484611bd0565b1515611a4757809150611a88565b600084121515611a6d578360ff60019060020a0219038313151515611a6857fe5b611a84565b8360ff60019060020a02038312151515611a8357fe5b5b8091505b5092915050565b6000611ae382600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546117ae90919063ffffffff16565b905080600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611b3e82600154610f6190919063ffffffff16565b6001819055508273ffffffffffffffffffffffffffffffffffffffff167f60ede3b17b4e31768b93d5237d5fceb759f4d879bc5bb7c916a42ebaa311e6e6826040518082815260200191505060405180910390a27fc6203b6a88d29510779ca9dba6a5e132f609c335e49a244d6d9e842ebaabb2706001546040518082815260200191505060405180910390a1505050565b600081831480611be257506000828402135b905092915050565b600073__MathLib_______________________________63ed981d4f600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c32b1dfa6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015611c8c57600080fd5b505af1158015611ca0573d6000803e3d6000fd5b505050506040513d6020811015611cb657600080fd5b8101908080519060200190929190505050600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b5471dee6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015611d4d57600080fd5b505af1158015611d61573d6000803e3d6000fd5b505050506040513d6020811015611d7757600080fd5b8101908080519060200190929190505050600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ca361d676040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015611e0e57600080fd5b505af1158015611e22573d6000803e3d6000fd5b505050506040513d6020811015611e3857600080fd5b810190808051906020019092919050505087876040518663ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808681526020018581526020018481526020018381526020018281526020019550505050505060206040518083038186803b158015611eb757600080fd5b505af4158015611ecb573d6000803e3d6000fd5b505050506040513d6020811015611ee157600080fd5b81019080805190602001909291905050509050611efe8482611f60565b846000016040805190810160405280848152602001858152509080600181540180825580915050906001820390600052602060002090600202016000909192909190915060008201518160000155602082015181600101555050505050505050565b6000611fb482600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f6190919063ffffffff16565b905080600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061200f826001546117ae90919063ffffffff16565b6001819055508273ffffffffffffffffffffffffffffffffffffffff167f60ede3b17b4e31768b93d5237d5fceb759f4d879bc5bb7c916a42ebaa311e6e6826040518082815260200191505060405180910390a27fc6203b6a88d29510779ca9dba6a5e132f609c335e49a244d6d9e842ebaabb2706001546040518082815260200191505060405180910390a1505050565b8154818355818111156120ce576002028160020283600052602060002091820191016120cd91906120d3565b5b505050565b6120ff91905b808211156120fb576000808201600090556001820160009055506002016120d9565b5090565b905600a165627a7a723058200ec7e527ae0877b1c2aa375f8c678ebb2c2d28e7b400ff21b65ec622012a9c3e0029a165627a7a72305820cbb2d78093b3f1f9c7580933a07039073aef38ab298dc0ee21635528da3b9a6c0029", - "sourceMap": "840:1307:7:-;;;1139:102;8:9:-1;5:2;;;30:1;27;20:12;5:2;1139:102:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;509:10:25;501:5;;:18;;;;;;;;;;;;;;;;;;1218:15:7;1193:22;;:40;;;;;;;;;;;;;;;;;;1139:102;840:1307;;;;;;", - "deployedSourceMap": "840:1307:7:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1416:404;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1416:404:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;238:20:25;;8:9:-1;5:2;;;30:1;27;20:12;5:2;238:20:25;;;;;;;;;;;;;;;;;;;;;;;;;;;1968:177:7;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1968:177:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;933:37;;8:9:-1;5:2;;;30:1;27;20:12;5:2;933:37:7;;;;;;;;;;;;;;;;;;;;;;;;;;;832:174:25;;8:9:-1;5:2;;;30:1;27;20:12;5:2;832:174:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;1416:404:7;1620:41;1542:22;;;;;;;;;;;1510:76;;;1587:21;1510:99;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1510:99:7;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1510:99:7;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1510:99:7;;;;;;;;;;;;;;;;1502:108;;;;;;;;1689:21;1664:47;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1664:47:7;1620:91;;1736:21;1721:70;;;1792:20;1721:92;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1721:92:7;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1721:92:7;;;;1416:404;;:::o;238:20:25:-;;;;;;;;;;;;;:::o;1968:177:7:-;653:5:25;;;;;;;;;;;639:19;;:10;:19;;;631:28;;;;;;;;2085:1:7;2058:29;;:15;:29;;;;2050:38;;;;;;;;2123:15;2098:22;;:40;;;;;;;;;;;;;;;;;;1968:177;:::o;933:37::-;;;;;;;;;;;;;:::o;832:174:25:-;653:5;;;;;;;;;;;639:19;;:10;:19;;;631:28;;;;;;;;928:1;908:22;;:8;:22;;;;900:31;;;;;;;;970:8;942:37;;963:5;;;;;;;;;;;942:37;;;;;;;;;;;;993:8;985:5;;:16;;;;;;;;;;;;;;;;;;832:174;:::o;840:1307:7:-;;;;;;;;;;:::o", - "source": "/*\n Copyright 2017-2018 Phillip A. Elsasser\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n*/\n\npragma solidity ^0.4.24;\n\nimport \"../MarketCollateralPool.sol\";\nimport \"./MarketCollateralPoolFactoryInterface.sol\";\nimport \"../MarketContractRegistryInterface.sol\";\nimport \"openzeppelin-solidity/contracts/ownership/Ownable.sol\";\n\n\ncontract MarketCollateralPoolFactory is Ownable, MarketCollateralPoolFactoryInterface {\n\n address public marketContractRegistry;\n\n /// @dev deploys our factory and ties it the a supply registry address\n /// @param registryAddress - MarketContractRegistry address to whitelist contracts\n constructor(address registryAddress) public {\n marketContractRegistry = registryAddress;\n\n }\n\n /// @dev creates the needed collateral pool and links it to our market contract.\n /// @param marketContractAddress address of the newly deployed market contract.\n function deployMarketCollateralPool(address marketContractAddress) external {\n require(MarketContractRegistryInterface(marketContractRegistry).isAddressWhiteListed(marketContractAddress));\n MarketCollateralPool marketCollateralPool = new MarketCollateralPool(marketContractAddress);\n MarketContract(marketContractAddress).setCollateralPoolContractAddress(marketCollateralPool);\n }\n\n /// @dev allows for the owner to set the desired registry for contract creation.\n /// @param registryAddress desired registry address.\n function setRegistryAddress(address registryAddress) external onlyOwner {\n require(registryAddress != address(0));\n marketContractRegistry = registryAddress;\n }\n}\n", - "sourcePath": "/home/pelsasser/MARKETProtocol/contracts/factories/MarketCollateralPoolFactory.sol", - "ast": { - "absolutePath": "/home/pelsasser/MARKETProtocol/contracts/factories/MarketCollateralPoolFactory.sol", - "exportedSymbols": { - "MarketCollateralPoolFactory": [ - 1862 - ] - }, - "id": 1863, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 1792, - "literals": [ - "solidity", - "^", - "0.4", - ".24" - ], - "nodeType": "PragmaDirective", - "src": "608:24:7" - }, - { - "absolutePath": "/home/pelsasser/MARKETProtocol/contracts/MarketCollateralPool.sol", - "file": "../MarketCollateralPool.sol", - "id": 1793, - "nodeType": "ImportDirective", - "scope": 1863, - "sourceUnit": 755, - "src": "634:37:7", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "/home/pelsasser/MARKETProtocol/contracts/factories/MarketCollateralPoolFactoryInterface.sol", - "file": "./MarketCollateralPoolFactoryInterface.sol", - "id": 1794, - "nodeType": "ImportDirective", - "scope": 1863, - "sourceUnit": 1871, - "src": "672:52:7", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "/home/pelsasser/MARKETProtocol/contracts/MarketContractRegistryInterface.sol", - "file": "../MarketContractRegistryInterface.sol", - "id": 1795, - "nodeType": "ImportDirective", - "scope": 1863, - "sourceUnit": 1734, - "src": "725:48:7", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "openzeppelin-solidity/contracts/ownership/Ownable.sol", - "file": "openzeppelin-solidity/contracts/ownership/Ownable.sol", - "id": 1796, - "nodeType": "ImportDirective", - "scope": 1863, - "sourceUnit": 4629, - "src": "774:63:7", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 1797, - "name": "Ownable", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 4628, - "src": "880:7:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Ownable_$4628", - "typeString": "contract Ownable" - } - }, - "id": 1798, - "nodeType": "InheritanceSpecifier", - "src": "880:7:7" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 1799, - "name": "MarketCollateralPoolFactoryInterface", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1870, - "src": "889:36:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_MarketCollateralPoolFactoryInterface_$1870", - "typeString": "contract MarketCollateralPoolFactoryInterface" - } - }, - "id": 1800, - "nodeType": "InheritanceSpecifier", - "src": "889:36:7" - } - ], - "contractDependencies": [ - 754, - 1870, - 4628 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 1862, - "linearizedBaseContracts": [ - 1862, - 1870, - 4628 - ], - "name": "MarketCollateralPoolFactory", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 1802, - "name": "marketContractRegistry", - "nodeType": "VariableDeclaration", - "scope": 1862, - "src": "933:37:7", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1801, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "933:7:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "body": { - "id": 1811, - "nodeType": "Block", - "src": "1183:58:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1809, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1807, - "name": "marketContractRegistry", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1802, - "src": "1193:22:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 1808, - "name": "registryAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1804, - "src": "1218:15:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "1193:40:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1810, - "nodeType": "ExpressionStatement", - "src": "1193:40:7" - } - ] - }, - "documentation": "@dev deploys our factory and ties it the a supply registry address\n @param registryAddress - MarketContractRegistry address to whitelist contracts", - "id": 1812, - "implemented": true, - "isConstructor": true, - "isDeclaredConst": false, - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1805, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1804, - "name": "registryAddress", - "nodeType": "VariableDeclaration", - "scope": 1812, - "src": "1151:23:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1803, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1151:7:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1150:25:7" - }, - "payable": false, - "returnParameters": { - "id": 1806, - "nodeType": "ParameterList", - "parameters": [], - "src": "1183:0:7" - }, - "scope": 1862, - "src": "1139:102:7", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1840, - "nodeType": "Block", - "src": "1492:328:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1822, - "name": "marketContractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1814, - "src": "1587:21:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1819, - "name": "marketContractRegistry", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1802, - "src": "1542:22:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 1818, - "name": "MarketContractRegistryInterface", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1733, - "src": "1510:31:7", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_MarketContractRegistryInterface_$1733_$", - "typeString": "type(contract MarketContractRegistryInterface)" - } - }, - "id": 1820, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1510:55:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_MarketContractRegistryInterface_$1733", - "typeString": "contract MarketContractRegistryInterface" - } - }, - "id": 1821, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "isAddressWhiteListed", - "nodeType": "MemberAccess", - "referencedDeclaration": 1732, - "src": "1510:76:7", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_bool_$", - "typeString": "function (address) view external returns (bool)" - } - }, - "id": 1823, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1510:99:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 1817, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5196, - 5197 - ], - "referencedDeclaration": 5196, - "src": "1502:7:7", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 1824, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1502:108:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1825, - "nodeType": "ExpressionStatement", - "src": "1502:108:7" - }, - { - "assignments": [ - 1827 - ], - "declarations": [ - { - "constant": false, - "id": 1827, - "name": "marketCollateralPool", - "nodeType": "VariableDeclaration", - "scope": 1841, - "src": "1620:41:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_MarketCollateralPool_$754", - "typeString": "contract MarketCollateralPool" - }, - "typeName": { - "contractScope": null, - "id": 1826, - "name": "MarketCollateralPool", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 754, - "src": "1620:20:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_MarketCollateralPool_$754", - "typeString": "contract MarketCollateralPool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1832, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1830, - "name": "marketContractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1814, - "src": "1689:21:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 1829, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "NewExpression", - "src": "1664:24:7", - "typeDescriptions": { - "typeIdentifier": "t_function_creation_nonpayable$_t_address_$returns$_t_contract$_MarketCollateralPool_$754_$", - "typeString": "function (address) returns (contract MarketCollateralPool)" - }, - "typeName": { - "contractScope": null, - "id": 1828, - "name": "MarketCollateralPool", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 754, - "src": "1668:20:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_MarketCollateralPool_$754", - "typeString": "contract MarketCollateralPool" - } - } - }, - "id": 1831, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1664:47:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_MarketCollateralPool_$754", - "typeString": "contract MarketCollateralPool" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "1620:91:7" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1837, - "name": "marketCollateralPool", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1827, - "src": "1792:20:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_MarketCollateralPool_$754", - "typeString": "contract MarketCollateralPool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_MarketCollateralPool_$754", - "typeString": "contract MarketCollateralPool" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1834, - "name": "marketContractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1814, - "src": "1736:21:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 1833, - "name": "MarketContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1518, - "src": "1721:14:7", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_MarketContract_$1518_$", - "typeString": "type(contract MarketContract)" - } - }, - "id": 1835, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1721:37:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_MarketContract_$1518", - "typeString": "contract MarketContract" - } - }, - "id": 1836, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setCollateralPoolContractAddress", - "nodeType": "MemberAccess", - "referencedDeclaration": 1420, - "src": "1721:70:7", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", - "typeString": "function (address) external" - } - }, - "id": 1838, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1721:92:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1839, - "nodeType": "ExpressionStatement", - "src": "1721:92:7" - } - ] - }, - "documentation": "@dev creates the needed collateral pool and links it to our market contract.\n @param marketContractAddress address of the newly deployed market contract.", - "id": 1841, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "deployMarketCollateralPool", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1815, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1814, - "name": "marketContractAddress", - "nodeType": "VariableDeclaration", - "scope": 1841, - "src": "1452:29:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1813, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1452:7:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1451:31:7" - }, - "payable": false, - "returnParameters": { - "id": 1816, - "nodeType": "ParameterList", - "parameters": [], - "src": "1492:0:7" - }, - "scope": 1862, - "src": "1416:404:7", - "stateMutability": "nonpayable", - "superFunction": 1869, - "visibility": "external" - }, - { - "body": { - "id": 1860, - "nodeType": "Block", - "src": "2040:105:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 1853, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1849, - "name": "registryAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1843, - "src": "2058:15:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 1851, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2085:1:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 1850, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2077:7:7", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 1852, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2077:10:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "2058:29:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 1848, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5196, - 5197 - ], - "referencedDeclaration": 5196, - "src": "2050:7:7", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 1854, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2050:38:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1855, - "nodeType": "ExpressionStatement", - "src": "2050:38:7" - }, - { - "expression": { - "argumentTypes": null, - "id": 1858, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1856, - "name": "marketContractRegistry", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1802, - "src": "2098:22:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 1857, - "name": "registryAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1843, - "src": "2123:15:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "2098:40:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1859, - "nodeType": "ExpressionStatement", - "src": "2098:40:7" - } - ] - }, - "documentation": "@dev allows for the owner to set the desired registry for contract creation.\n @param registryAddress desired registry address.", - "id": 1861, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [ - { - "arguments": null, - "id": 1846, - "modifierName": { - "argumentTypes": null, - "id": 1845, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4602, - "src": "2030:9:7", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "2030:9:7" - } - ], - "name": "setRegistryAddress", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1844, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1843, - "name": "registryAddress", - "nodeType": "VariableDeclaration", - "scope": 1861, - "src": "1996:23:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1842, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1996:7:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1995:25:7" - }, - "payable": false, - "returnParameters": { - "id": 1847, - "nodeType": "ParameterList", - "parameters": [], - "src": "2040:0:7" - }, - "scope": 1862, - "src": "1968:177:7", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 1863, - "src": "840:1307:7" - } - ], - "src": "608:1540:7" - }, - "legacyAST": { - "absolutePath": "/home/pelsasser/MARKETProtocol/contracts/factories/MarketCollateralPoolFactory.sol", - "exportedSymbols": { - "MarketCollateralPoolFactory": [ - 1862 - ] - }, - "id": 1863, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 1792, - "literals": [ - "solidity", - "^", - "0.4", - ".24" - ], - "nodeType": "PragmaDirective", - "src": "608:24:7" - }, - { - "absolutePath": "/home/pelsasser/MARKETProtocol/contracts/MarketCollateralPool.sol", - "file": "../MarketCollateralPool.sol", - "id": 1793, - "nodeType": "ImportDirective", - "scope": 1863, - "sourceUnit": 755, - "src": "634:37:7", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "/home/pelsasser/MARKETProtocol/contracts/factories/MarketCollateralPoolFactoryInterface.sol", - "file": "./MarketCollateralPoolFactoryInterface.sol", - "id": 1794, - "nodeType": "ImportDirective", - "scope": 1863, - "sourceUnit": 1871, - "src": "672:52:7", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "/home/pelsasser/MARKETProtocol/contracts/MarketContractRegistryInterface.sol", - "file": "../MarketContractRegistryInterface.sol", - "id": 1795, - "nodeType": "ImportDirective", - "scope": 1863, - "sourceUnit": 1734, - "src": "725:48:7", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "openzeppelin-solidity/contracts/ownership/Ownable.sol", - "file": "openzeppelin-solidity/contracts/ownership/Ownable.sol", - "id": 1796, - "nodeType": "ImportDirective", - "scope": 1863, - "sourceUnit": 4629, - "src": "774:63:7", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 1797, - "name": "Ownable", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 4628, - "src": "880:7:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Ownable_$4628", - "typeString": "contract Ownable" - } - }, - "id": 1798, - "nodeType": "InheritanceSpecifier", - "src": "880:7:7" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 1799, - "name": "MarketCollateralPoolFactoryInterface", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1870, - "src": "889:36:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_MarketCollateralPoolFactoryInterface_$1870", - "typeString": "contract MarketCollateralPoolFactoryInterface" - } - }, - "id": 1800, - "nodeType": "InheritanceSpecifier", - "src": "889:36:7" - } - ], - "contractDependencies": [ - 754, - 1870, - 4628 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 1862, - "linearizedBaseContracts": [ - 1862, - 1870, - 4628 - ], - "name": "MarketCollateralPoolFactory", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 1802, - "name": "marketContractRegistry", - "nodeType": "VariableDeclaration", - "scope": 1862, - "src": "933:37:7", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1801, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "933:7:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "body": { - "id": 1811, - "nodeType": "Block", - "src": "1183:58:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1809, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1807, - "name": "marketContractRegistry", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1802, - "src": "1193:22:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 1808, - "name": "registryAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1804, - "src": "1218:15:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "1193:40:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1810, - "nodeType": "ExpressionStatement", - "src": "1193:40:7" - } - ] - }, - "documentation": "@dev deploys our factory and ties it the a supply registry address\n @param registryAddress - MarketContractRegistry address to whitelist contracts", - "id": 1812, - "implemented": true, - "isConstructor": true, - "isDeclaredConst": false, - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1805, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1804, - "name": "registryAddress", - "nodeType": "VariableDeclaration", - "scope": 1812, - "src": "1151:23:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1803, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1151:7:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1150:25:7" - }, - "payable": false, - "returnParameters": { - "id": 1806, - "nodeType": "ParameterList", - "parameters": [], - "src": "1183:0:7" - }, - "scope": 1862, - "src": "1139:102:7", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1840, - "nodeType": "Block", - "src": "1492:328:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1822, - "name": "marketContractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1814, - "src": "1587:21:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1819, - "name": "marketContractRegistry", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1802, - "src": "1542:22:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 1818, - "name": "MarketContractRegistryInterface", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1733, - "src": "1510:31:7", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_MarketContractRegistryInterface_$1733_$", - "typeString": "type(contract MarketContractRegistryInterface)" - } - }, - "id": 1820, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1510:55:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_MarketContractRegistryInterface_$1733", - "typeString": "contract MarketContractRegistryInterface" - } - }, - "id": 1821, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "isAddressWhiteListed", - "nodeType": "MemberAccess", - "referencedDeclaration": 1732, - "src": "1510:76:7", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_bool_$", - "typeString": "function (address) view external returns (bool)" - } - }, - "id": 1823, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1510:99:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 1817, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5196, - 5197 - ], - "referencedDeclaration": 5196, - "src": "1502:7:7", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 1824, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1502:108:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1825, - "nodeType": "ExpressionStatement", - "src": "1502:108:7" - }, - { - "assignments": [ - 1827 - ], - "declarations": [ - { - "constant": false, - "id": 1827, - "name": "marketCollateralPool", - "nodeType": "VariableDeclaration", - "scope": 1841, - "src": "1620:41:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_MarketCollateralPool_$754", - "typeString": "contract MarketCollateralPool" - }, - "typeName": { - "contractScope": null, - "id": 1826, - "name": "MarketCollateralPool", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 754, - "src": "1620:20:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_MarketCollateralPool_$754", - "typeString": "contract MarketCollateralPool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1832, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1830, - "name": "marketContractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1814, - "src": "1689:21:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 1829, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "NewExpression", - "src": "1664:24:7", - "typeDescriptions": { - "typeIdentifier": "t_function_creation_nonpayable$_t_address_$returns$_t_contract$_MarketCollateralPool_$754_$", - "typeString": "function (address) returns (contract MarketCollateralPool)" - }, - "typeName": { - "contractScope": null, - "id": 1828, - "name": "MarketCollateralPool", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 754, - "src": "1668:20:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_MarketCollateralPool_$754", - "typeString": "contract MarketCollateralPool" - } - } - }, - "id": 1831, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1664:47:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_MarketCollateralPool_$754", - "typeString": "contract MarketCollateralPool" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "1620:91:7" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1837, - "name": "marketCollateralPool", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1827, - "src": "1792:20:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_MarketCollateralPool_$754", - "typeString": "contract MarketCollateralPool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_MarketCollateralPool_$754", - "typeString": "contract MarketCollateralPool" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1834, - "name": "marketContractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1814, - "src": "1736:21:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 1833, - "name": "MarketContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1518, - "src": "1721:14:7", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_MarketContract_$1518_$", - "typeString": "type(contract MarketContract)" - } - }, - "id": 1835, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1721:37:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_MarketContract_$1518", - "typeString": "contract MarketContract" - } - }, - "id": 1836, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setCollateralPoolContractAddress", - "nodeType": "MemberAccess", - "referencedDeclaration": 1420, - "src": "1721:70:7", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", - "typeString": "function (address) external" - } - }, - "id": 1838, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1721:92:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1839, - "nodeType": "ExpressionStatement", - "src": "1721:92:7" - } - ] - }, - "documentation": "@dev creates the needed collateral pool and links it to our market contract.\n @param marketContractAddress address of the newly deployed market contract.", - "id": 1841, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "deployMarketCollateralPool", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1815, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1814, - "name": "marketContractAddress", - "nodeType": "VariableDeclaration", - "scope": 1841, - "src": "1452:29:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1813, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1452:7:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1451:31:7" - }, - "payable": false, - "returnParameters": { - "id": 1816, - "nodeType": "ParameterList", - "parameters": [], - "src": "1492:0:7" - }, - "scope": 1862, - "src": "1416:404:7", - "stateMutability": "nonpayable", - "superFunction": 1869, - "visibility": "external" - }, - { - "body": { - "id": 1860, - "nodeType": "Block", - "src": "2040:105:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 1853, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1849, - "name": "registryAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1843, - "src": "2058:15:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 1851, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2085:1:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 1850, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2077:7:7", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 1852, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2077:10:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "2058:29:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 1848, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5196, - 5197 - ], - "referencedDeclaration": 5196, - "src": "2050:7:7", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 1854, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2050:38:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1855, - "nodeType": "ExpressionStatement", - "src": "2050:38:7" - }, - { - "expression": { - "argumentTypes": null, - "id": 1858, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1856, - "name": "marketContractRegistry", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1802, - "src": "2098:22:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 1857, - "name": "registryAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1843, - "src": "2123:15:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "2098:40:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1859, - "nodeType": "ExpressionStatement", - "src": "2098:40:7" - } - ] - }, - "documentation": "@dev allows for the owner to set the desired registry for contract creation.\n @param registryAddress desired registry address.", - "id": 1861, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [ - { - "arguments": null, - "id": 1846, - "modifierName": { - "argumentTypes": null, - "id": 1845, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4602, - "src": "2030:9:7", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "2030:9:7" - } - ], - "name": "setRegistryAddress", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1844, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1843, - "name": "registryAddress", - "nodeType": "VariableDeclaration", - "scope": 1861, - "src": "1996:23:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1842, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1996:7:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1995:25:7" - }, - "payable": false, - "returnParameters": { - "id": 1847, - "nodeType": "ParameterList", - "parameters": [], - "src": "2040:0:7" - }, - "scope": 1862, - "src": "1968:177:7", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 1863, - "src": "840:1307:7" - } - ], - "src": "608:1540:7" - }, - "compiler": { - "name": "solc", - "version": "0.4.24+commit.e67f0147.Emscripten.clang" - }, - "networks": { - "4": { - "events": {}, - "links": { - "MathLib": "0x584d7639dc6cb3a9ada67e8d7c7bbb8efa87909a" - }, - "address": "0x32ad08600d50d5b8e3c27bb83adbfcd7005e0dde", - "transactionHash": "0x4aae110928ba0df273638dd7901fbeb03d87fd74a8c38db802b4f95dc0877914" - } - }, - "schemaVersion": "2.0.1", - "updatedAt": "2018-10-05T14:03:26.620Z" -} \ No newline at end of file diff --git a/build/contracts/MarketContractFactoryOraclize.json b/build/contracts/MarketContractFactoryOraclize.json index 774e9bb..727a1e9 100644 --- a/build/contracts/MarketContractFactoryOraclize.json +++ b/build/contracts/MarketContractFactoryOraclize.json @@ -4,7 +4,7 @@ { "constant": true, "inputs": [], - "name": "collateralPoolFactoryAddress", + "name": "MKT_TOKEN_ADDRESS", "outputs": [ { "name": "", @@ -18,7 +18,7 @@ { "constant": true, "inputs": [], - "name": "MKT_TOKEN_ADDRESS", + "name": "owner", "outputs": [ { "name": "", @@ -32,7 +32,7 @@ { "constant": true, "inputs": [], - "name": "owner", + "name": "marketContractRegistry", "outputs": [ { "name": "", @@ -46,7 +46,7 @@ { "constant": true, "inputs": [], - "name": "marketContractRegistry", + "name": "MKT_TOKEN", "outputs": [ { "name": "", @@ -80,10 +80,6 @@ { "name": "mktTokenAddress", "type": "address" - }, - { - "name": "marketCollateralPoolFactoryAddress", - "type": "address" } ], "payable": false, @@ -169,24 +165,24 @@ "type": "function" } ], - "bytecode": "0x608060405234801561001057600080fd5b506040516060806160d5833981018060405281019080805190602001909291908051906020019092919080519060200190929190505050336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505050615f798061015c6000396000f3006080604052600436106200008a576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680629d553c146200008f578063798ddbc814620000e95780638da5cb5b1462000143578063ab7b4993146200019d578063ceaaa91514620001e3578063f2fde38b146200023d578063fdea945f1462000283575b600080fd5b3480156200009c57600080fd5b50620000a76200031b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b348015620000f657600080fd5b506200010162000341565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156200015057600080fd5b506200015b62000367565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b348015620001aa57600080fd5b50620001e1600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506200038c565b005b348015620001f057600080fd5b50620001fb62000469565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156200024a57600080fd5b5062000281600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506200048f565b005b3480156200029057600080fd5b5062000319600480360381019080803590602001908201803590602001919091929391929390803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908060a001909192919290803590602001908201803590602001919091929391929390803590602001908201803590602001919091929391929390505050620005e6565b005b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515620003e857600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515156200042557600080fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515620004eb57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515156200052857600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000888833600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168a600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b8b8b62000641620008dc565b80806020018b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001876005602002808284378201915050806020018060200184810384528f8f82818152602001925080828437820191505084810383528888828181526020019250808284378201915050848103825286868281815260200192508082843782019150509e505050505050505050505050505050604051809103906000f0801580156200079d573d6000803e3d6000fd5b509050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16639244f496826040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050600060405180830381600087803b1580156200085e57600080fd5b505af115801562000873573d6000803e3d6000fd5b505050508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f38ee3ff13b5d3453452a79e0799d83b2c8207bf126b2798fa512343680f643ee60405160405180910390a3505050505050505050565b60405161566080620008ee83390190560060806040526000600d60006101000a81548160ff0219169083151502179055506000600d60016101000a81548160ff0219169083151502179055503480156200004757600080fd5b506040516200566038038062005660833981018060405281019080805182019291906020018051906020019092919080519060200190929190805190602001909291908051906020019092919091908260a0018051820192919060200180518201929190505050878787878787336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166384281dcc336040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b1580156200027557600080fd5b505af11580156200028a573d6000803e3d6000fd5b505050506040513d6020811015620002a157600080fd5b81019080805190602001909291905050501515620002be57600080fd5b806000600581101515620002ce57fe5b6020020151600781905550806001600581101515620002e957fe5b60200201516006819055506007546006541115156200030757600080fd5b8060026005811015156200031757fe5b60200201516008819055508060036005811015156200033257fe5b60200201516009819055508060046005811015156200034d57fe5b6020020151600a8190555042600a541115156200036957600080fd5b856004908051906020019062000381929190620015b9565b5082600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550846000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050505050506200046b60017f01000000000000000000000000000000000000000000000000000000000000000260107f01000000000000000000000000000000000000000000000000000000000000000217620004db640100000000026401000000009004565b816014908051906020019062000483929190620015b9565b5080601590805190602001906200049c929190620015b9565b50624f1a0042600a540311151515620004b457600080fd5b620004cd62000893640100000000026401000000009004565b505050505050505062001668565b6000601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614806200055e575060006200055c601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1662000a44640100000000026401000000009004565b145b1562000581576200057f600062000a4f640100000000026401000000009004565b505b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156200060857600080fd5b505af11580156200061d573d6000803e3d6000fd5b505050506040513d60208110156200063457600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515620007a157601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156200072357600080fd5b505af115801562000738573d6000803e3d6000fd5b505050506040513d60208110156200074f57600080fd5b8101908080519060200190929190505050601260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663688dcfd7826040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180827effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001915050600060405180830381600087803b1580156200087757600080fd5b505af11580156200088c573d6000803e3d6000fd5b5050505050565b6000620009f3600a5460148054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015620009365780601f106200090a5761010080835404028352916020019162000936565b820191906000526020600020905b8154815290600101906020018083116200091857829003601f168201915b505050505060158054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015620009d55780601f10620009a957610100808354040283529160200191620009d5565b820191906000526020600020905b815481529060010190602001808311620009b757829003601f168201915b5050505050620249f062000a71640100000000026401000000009004565b9050600060010281600019161415151562000a0d57600080fd5b600160176000836000191660001916815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b6000813b9050919050565b600062000a6a6200103e640100000000026401000000009004565b9050919050565b6000806000601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16148062000af75750600062000af5601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1662000a44640100000000026401000000009004565b145b1562000b1a5762000b18600062000a4f640100000000026401000000009004565b505b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801562000ba157600080fd5b505af115801562000bb6573d6000803e3d6000fd5b505050506040513d602081101562000bcd57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151562000d3a57601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801562000cbc57600080fd5b505af115801562000cd1573d6000803e3d6000fd5b505050506040513d602081101562000ce857600080fd5b8101908080519060200190929190505050601260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632ef3accc86856040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b8381101562000ded57808201518184015260208101905062000dd0565b50505050905090810190601f16801562000e1b5780820380516001836020036101000a031916815260200191505b509350505050602060405180830381600087803b15801562000e3c57600080fd5b505af115801562000e51573d6000803e3d6000fd5b505050506040513d602081101562000e6857600080fd5b81019080805190602001909291905050509050601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c51be90f82888888886040518663ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b8381101562000f3b57808201518184015260208101905062000f1e565b50505050905090810190601f16801562000f695780820380516001836020036101000a031916815260200191505b50838103825285818151815260200191508051906020019080838360005b8381101562000fa457808201518184015260208101905062000f87565b50505050905090810190601f16801562000fd25780820380516001836020036101000a031916815260200191505b5096505050505050506020604051808303818588803b15801562000ff557600080fd5b505af11580156200100a573d6000803e3d6000fd5b50505050506040513d60208110156200102257600080fd5b8101908080519060200190929190505050915050949350505050565b6000806200106f731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed62000a44640100000000026401000000009004565b11156200112457731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506200111a6040805190810160405280600b81526020017f6574685f6d61696e6e65740000000000000000000000000000000000000000008152506200159d640100000000026401000000009004565b600190506200159a565b60006200115473c03a2615d5efaf5f49f60b7bb6583eaec212fdf162000a44640100000000026401000000009004565b1115620012095773c03a2615d5efaf5f49f60b7bb6583eaec212fdf1601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550620011ff6040805190810160405280600c81526020017f6574685f726f707374656e3300000000000000000000000000000000000000008152506200159d640100000000026401000000009004565b600190506200159a565b60006200123973b7a07bcf2ba2f2703b24c0691b5278999c59ac7e62000a44640100000000026401000000009004565b1115620012ee5773b7a07bcf2ba2f2703b24c0691b5278999c59ac7e601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550620012e46040805190810160405280600981526020017f6574685f6b6f76616e00000000000000000000000000000000000000000000008152506200159d640100000000026401000000009004565b600190506200159a565b60006200131e73146500cfd35b22e4a392fe0adc06de1a1368ed4862000a44640100000000026401000000009004565b1115620013d35773146500cfd35b22e4a392fe0adc06de1a1368ed48601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550620013c96040805190810160405280600b81526020017f6574685f72696e6b6562790000000000000000000000000000000000000000008152506200159d640100000000026401000000009004565b600190506200159a565b600062001403736f485c8bf6fc43ea212e93bbf8ce046c7f1cb47562000a44640100000000026401000000009004565b11156200146957736f485c8bf6fc43ea212e93bbf8ce046c7f1cb475601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600190506200159a565b6000620014997320e12a1f859b3feae5fb2a0a32c18f5a65555bbf62000a44640100000000026401000000009004565b1115620014ff577320e12a1f859b3feae5fb2a0a32c18f5a65555bbf601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600190506200159a565b60006200152f7351efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa62000a44640100000000026401000000009004565b111562001595577351efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600190506200159a565b600090505b90565b8060139080519060200190620015b5929190620015b9565b5050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620015fc57805160ff19168380011785556200162d565b828001600101855582156200162d579182015b828111156200162c5782518255916020019190600101906200160f565b5b5090506200163c919062001640565b5090565b6200166591905b808211156200166157600081600090555060010162001647565b5090565b90565b613fe880620016786000396000f30060806040526004361061015f576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806302d05d3f14610164578063053f14da146101bb5780630c8eb675146101e657806327dc297e146102765780632fed1b00146102ed578063323bb775146103185780633270bb5b1461036f57806338bbfa501461039e5780633b3c4ae91461045b578063411449bb1461048a5780634c258eb1146104b557806356357d91146104fa5780635ea7867a1461058a578063614d08f81461061a5780636db7f77c146106aa578063798ddbc8146106b4578063930a9d921461070b578063a8e77c9a14610793578063b5471dee146107ea578063bb4b573414610815578063c201293b14610840578063c32b1dfa14610883578063ca361d67146108ae578063d514d12c146108d9578063f348e8b214610930578063fa3fa1961461095b578063fc51b9c51461099e575b600080fd5b34801561017057600080fd5b506101796109fd565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101c757600080fd5b506101d0610a22565b6040518082815260200191505060405180910390f35b3480156101f257600080fd5b506101fb610a28565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561023b578082015181840152602081019050610220565b50505050905090810190601f1680156102685780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561028257600080fd5b506102eb6004803603810190808035600019169060200190929190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290505050610ac6565b005b3480156102f957600080fd5b50610302610b09565b6040518082815260200191505060405180910390f35b34801561032457600080fd5b5061032d610b0f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561037b57600080fd5b50610384610b35565b604051808215151515815260200191505060405180910390f35b3480156103aa57600080fd5b506104596004803603810190808035600019169060200190929190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290505050610b48565b005b34801561046757600080fd5b50610470610cba565b604051808215151515815260200191505060405180910390f35b34801561049657600080fd5b5061049f610ccd565b6040518082815260200191505060405180910390f35b3480156104c157600080fd5b506104e46004803603810190808035600019169060200190929190505050610cd4565b6040518082815260200191505060405180910390f35b34801561050657600080fd5b5061050f610cf1565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561054f578082015181840152602081019050610534565b50505050905090810190601f16801561057c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561059657600080fd5b5061059f610d8f565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156105df5780820151818401526020810190506105c4565b50505050905090810190601f16801561060c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561062657600080fd5b5061062f610e2d565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561066f578082015181840152602081019050610654565b50505050905090810190601f16801561069c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6106b2610ecb565b005b3480156106c057600080fd5b506106c9611119565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561071757600080fd5b5061077d600480360381019080806060019091929192908060a0019091929192908035906020019092919080359060200190929190803560ff1690602001909291908035600019169060200190929190803560001916906020019092919050505061113f565b6040518082815260200191505060405180910390f35b34801561079f57600080fd5b506107a8611b0f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156107f657600080fd5b506107ff611b35565b6040518082815260200191505060405180910390f35b34801561082157600080fd5b5061082a611b3b565b6040518082815260200191505060405180910390f35b34801561084c57600080fd5b50610881600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611b41565b005b34801561088f57600080fd5b50610898611d8f565b6040518082815260200191505060405180910390f35b3480156108ba57600080fd5b506108c3611d95565b6040518082815260200191505060405180910390f35b3480156108e557600080fd5b506108ee611d9b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561093c57600080fd5b50610945611dc1565b6040518082815260200191505060405180910390f35b34801561096757600080fd5b5061099c600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611dc7565b005b3480156109aa57600080fd5b506109e7600480360381019080806060019091929192908060a0019091929192908035906020019092919080359060200190929190505050611f1c565b6040518082815260200191505060405180910390f35b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600b5481565b60168054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610abe5780601f10610a9357610100808354040283529160200191610abe565b820191906000526020600020905b815481529060010190602001808311610aa157829003601f168201915b505050505081565b610b05828260006040519080825280601f01601f191660200182016040528015610aff5781602001602082028038833980820191505090505b50610b48565b5050565b60085481565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600d60009054906101000a900460ff1681565b610b506121a0565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610b8957600080fd5b60176000846000191660001916815260200190815260200160002060009054906101000a900460ff161515610bbd57600080fd5b8160169080519060200190610bd3929190613e85565b50610be082600854612502565b600b819055507f3e19f2256bddc30aeab8054ccbd86723452d07f687b94441de69c05ee212dafa826040518080602001828103825283818151815260200191508051906020019080838360005b83811015610c48578082015181840152602081019050610c2d565b50505050905090810190601f168015610c755780820380516001836020036101000a031916815260200191505b509250505060405180910390a1610c8a6127f6565b60176000846000191660001916815260200190815260200160002060006101000a81549060ff0219169055505050565b600d60019054906101000a900460ff1681565b620249f081565b6000610cea82600f6128c690919063ffffffff16565b9050919050565b60148054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610d875780601f10610d5c57610100808354040283529160200191610d87565b820191906000526020600020905b815481529060010190602001808311610d6a57829003601f168201915b505050505081565b60158054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610e255780601f10610dfa57610100808354040283529160200191610e25565b820191906000526020600020905b815481529060010190602001808311610e0857829003601f168201915b505050505081565b60048054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610ec35780601f10610e9857610100808354040283529160200191610ec3565b820191906000526020600020905b815481529060010190602001808311610ea657829003601f168201915b505050505081565b600080610f7560148054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610f675780601f10610f3c57610100808354040283529160200191610f67565b820191906000526020600020905b815481529060010190602001808311610f4a57829003601f168201915b5050505050620249f061291d565b9150813410151515610f8657600080fd5b6110c860148054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561101f5780601f10610ff45761010080835404028352916020019161101f565b820191906000526020600020905b81548152906001019060200180831161100257829003601f168201915b505050505060158054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156110ba5780601f1061108f576101008083540402835291602001916110ba565b820191906000526020600020905b81548152906001019060200180831161109d57829003601f168201915b5050505050620249f0612cfa565b905060006001028160001916141515156110e157600080fd5b600160176000836000191660001916815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000611149613f05565b6000806000806000600d60019054906101000a900460ff16801561117a5750600d60009054906101000a900460ff16155b151561118557600080fd5b60008c14158015611197575060008b14155b80156111b257506111b18b8d61328d90919063ffffffff16565b5b15156111bd57600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663cfab472f30336040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b1580156112ae57600080fd5b505af11580156112c2573d6000803e3d6000fd5b505050506040513d60208110156112d857600080fd5b810190808051906020019092919050505015156112f457600080fd5b61136b8e600380602002604051908101604052809291908260036020028082843782019150505050508e600580602002604051908101604052809291908260056020028082843782019150505050508e3073ffffffffffffffffffffffffffffffffffffffff166132a7909392919063ffffffff16565b9550600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663cfab472f3088600001516040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b15801561146257600080fd5b505af1158015611476573d6000803e3d6000fd5b505050506040513d602081101561148c57600080fd5b810190808051906020019092919050505015156114a857600080fd5b600073ffffffffffffffffffffffffffffffffffffffff16866020015173ffffffffffffffffffffffffffffffffffffffff16148061151657503373ffffffffffffffffffffffffffffffffffffffff16866020015173ffffffffffffffffffffffffffffffffffffffff16145b151561152157600080fd5b600073ffffffffffffffffffffffffffffffffffffffff16866000015173ffffffffffffffffffffffffffffffffffffffff161415801561159257503373ffffffffffffffffffffffffffffffffffffffff16866000015173ffffffffffffffffffffffffffffffffffffffff1614155b151561159d57600080fd5b856000015173ffffffffffffffffffffffffffffffffffffffff1673__OrderLib______________________________638163681e90918861010001518d8d8d6040518663ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200185600019166000191681526020018460ff1660ff168152602001836000191660001916815260200182600019166000191681526020019550505050505060206040518083038186803b15801561169357600080fd5b505af41580156116a7573d6000803e3d6000fd5b505050506040513d60208110156116bd57600080fd5b810190808051906020019092919050505015156116d957600080fd5b8560c00151421015156117325785610100015160001916600060018111156116fd57fe5b7fe6104340582083fe7674a149f8da127b9d3d7f74a88ccd7610562eb5b61b919360405160405180910390a360009650611afe565b611752611743876101000151610cd4565b8d61343990919063ffffffff16565b945060008514156117a8578561010001516000191660018081111561177357fe5b7fe6104340582083fe7674a149f8da127b9d3d7f74a88ccd7610562eb5b61b919360405160405180910390a360009650611afe565b6117b2858c613450565b9650600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663eeaba0838760000151338a8a60a001516040518563ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828152602001945050505050600060405180830381600087803b1580156118bd57600080fd5b505af11580156118d1573d6000803e3d6000fd5b505050506118f086610100015188600f6134799092919063ffffffff16565b6000935060009250600073ffffffffffffffffffffffffffffffffffffffff16866040015173ffffffffffffffffffffffffffffffffffffffff16141515611a455761193b876134cf565b9150611946876134cf565b90506000866060015111156119c85761196e828288606001516134ed9092919063ffffffff16565b93506119c78660000151876040015186600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661350d909392919063ffffffff16565b5b600086608001511115611a44576119ee828288608001516134ed9092919063ffffffff16565b9250611a4333876040015185600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661350d909392919063ffffffff16565b5b5b856040015173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16876000015173ffffffffffffffffffffffffffffffffffffffff167ff756998387aae83a81d5053664c1ed50a128ecd4e82cc2e135b5a2f367841f598a88888c60a001518d61010001516040518086815260200185815260200184815260200183815260200182600019166000191681526020019550505050505060405180910390a48696505b505050505050979650505050505050565b600d60029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60065481565b600a5481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611b9d57600080fd5b600d60019054906101000a900460ff16151515611bb957600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515611bf557600080fd5b80600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055503073ffffffffffffffffffffffffffffffffffffffff16600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637bb55cd26040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015611cd357600080fd5b505af1158015611ce7573d6000803e3d6000fd5b505050506040513d6020811015611cfd57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16141515611d3057600080fd5b80600d60026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600d60016101000a81548160ff02191690831515021790555050565b60075481565b60095481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600c5481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611e2257600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515611e5e57600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f7f11fe0c7098e1a76afcc68f35abaa07ef156fa7d6dd2d39664812fe37348d1660405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000611f26613f05565b6000808414158015611f475750611f46858561328d90919063ffffffff16565b5b1515611f5257600080fd5b600d60009054906101000a900460ff16151515611f6e57600080fd5b611fe587600380602002604051908101604052809291908260036020028082843782019150505050508760058060200260405190810160405280929190826005602002808284378201915050505050873073ffffffffffffffffffffffffffffffffffffffff166132a7909392919063ffffffff16565b91503373ffffffffffffffffffffffffffffffffffffffff16826000015173ffffffffffffffffffffffffffffffffffffffff1614151561202557600080fd5b8160c001514210151561207e57816101000151600019166000600181111561204957fe5b7fe6104340582083fe7674a149f8da127b9d3d7f74a88ccd7610562eb5b61b919360405160405180910390a360009250612196565b61209e61208f836101000151610cd4565b8661343990919063ffffffff16565b905060008114156120f457816101000151600019166001808111156120bf57fe5b7fe6104340582083fe7674a149f8da127b9d3d7f74a88ccd7610562eb5b61b919360405160405180910390a360009250612196565b6120fe8482613450565b925061211b82610100015184600f61362d9092919063ffffffff16565b81610100015160001916826040015173ffffffffffffffffffffffffffffffffffffffff16836000015173ffffffffffffffffffffffffffffffffffffffff167f7de4479e80e82e22edb1e0010433c8befc804c34988024fa0b0234715102cd8f866040518082815260200191505060405180910390a48292505b5050949350505050565b600080601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16148061221257506000612210601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16613683565b145b1561222357612221600061368e565b505b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156122a957600080fd5b505af11580156122bd573d6000803e3d6000fd5b505050506040513d60208110156122d357600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151561243c57601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156123c057600080fd5b505af11580156123d4573d6000803e3d6000fd5b505050506040513d60208110156123ea57600080fd5b8101908080519060200190929190505050601260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c281d19e6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156124c257600080fd5b505af11580156124d6573d6000803e3d6000fd5b505050506040513d60208110156124ec57600080fd5b8101908080519060200190929190505050905090565b6000606060008060008693506000925060009150600090505b83518110156127d75760307f010000000000000000000000000000000000000000000000000000000000000002848281518110151561255657fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161015801561266e575060397f01000000000000000000000000000000000000000000000000000000000000000284828151811015156125fe57fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191611155b1561271f578115612691576000861415612687576127d7565b8580600190039650505b600a83029250603084828151811015156126a757fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027f0100000000000000000000000000000000000000000000000000000000000000900403830192506127ca565b602e7f010000000000000000000000000000000000000000000000000000000000000002848281518110151561275157fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614156127c957600191505b5b808060010191505061251b565b60008611156127e95785600a0a830292505b8294505050505092915050565b6000600d60009054906101000a900460ff1615612812576128c3565b600a54421115612841576001600d60006101000a81548160ff021916908315150217905550600b5490506128a3565b600654600b54101515612873576001600d60006101000a81548160ff02191690831515021790555060065490506128a2565b600754600b541115156128a1576001600d60006101000a81548160ff02191690831515021790555060075490505b5b5b600d60009054906101000a900460ff16156128c2576128c18161369f565b5b5b50565b60006129158360010160008460001916600019168152602001908152602001600020548460000160008560001916600019168152602001908152602001600020546136e090919063ffffffff16565b905092915050565b600080601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16148061298f5750600061298d601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16613683565b145b156129a05761299e600061368e565b505b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015612a2657600080fd5b505af1158015612a3a573d6000803e3d6000fd5b505050506040513d6020811015612a5057600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515612bb957601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015612b3d57600080fd5b505af1158015612b51573d6000803e3d6000fd5b505050506040513d6020811015612b6757600080fd5b8101908080519060200190929190505050601260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632ef3accc84846040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b83811015612c6a578082015181840152602081019050612c4f565b50505050905090810190601f168015612c975780820380516001836020036101000a031916815260200191505b509350505050602060405180830381600087803b158015612cb757600080fd5b505af1158015612ccb573d6000803e3d6000fd5b505050506040513d6020811015612ce157600080fd5b8101908080519060200190929190505050905092915050565b6000806000601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161480612d6e57506000612d6c601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16613683565b145b15612d7f57612d7d600061368e565b505b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015612e0557600080fd5b505af1158015612e19573d6000803e3d6000fd5b505050506040513d6020811015612e2f57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515612f9857601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015612f1c57600080fd5b505af1158015612f30573d6000803e3d6000fd5b505050506040513d6020811015612f4657600080fd5b8101908080519060200190929190505050601260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632ef3accc86856040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b8381101561304957808201518184015260208101905061302e565b50505050905090810190601f1680156130765780820380516001836020036101000a031916815260200191505b509350505050602060405180830381600087803b15801561309657600080fd5b505af11580156130aa573d6000803e3d6000fd5b505050506040513d60208110156130c057600080fd5b81019080805190602001909291905050509050601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c51be90f8260008888886040518663ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b83811015613192578082015181840152602081019050613177565b50505050905090810190601f1680156131bf5780820380516001836020036101000a031916815260200191505b50838103825285818151815260200191508051906020019080838360005b838110156131f85780820151818401526020810190506131dd565b50505050905090810190601f1680156132255780820380516001836020036101000a031916815260200191505b5096505050505050506020604051808303818588803b15801561324757600080fd5b505af115801561325b573d6000803e3d6000fd5b50505050506040513d602081101561327257600080fd5b81019080805190602001909291905050509150509392505050565b60008183148061329f57506000828402135b905092915050565b6132af613f05565b8360006003811015156132be57fe5b6020020151816000019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505083600160038110151561330957fe5b6020020151816020019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505083600260038110151561335457fe5b6020020151816040019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505082600060058110151561339f57fe5b60200201518160600181815250508260016005811015156133bc57fe5b60200201518160800181815250508260026005811015156133d957fe5b60200201518160a00181815250508260036005811015156133f657fe5b60200201518160c0018181525050818160e001818152505061341a85858585613748565b8161010001906000191690816000191681525050809050949350505050565b600061344883836000036136e0565b905092915050565b600061345b826134cf565b613464846134cf565b1061346f5781613471565b825b905092915050565b6134a9818460000160008560001916600019168152602001908152602001600020546136e090919063ffffffff16565b836000016000846000191660001916815260200190815260200160002081905550505050565b6000808212156134e4578160000390506134e8565b8190505b919050565b6000816134fa85856139a2565b81151561350357fe5b0490509392505050565b8373ffffffffffffffffffffffffffffffffffffffff166323b872dd8484846040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b1580156135e457600080fd5b505af11580156135f8573d6000803e3d6000fd5b505050506040513d602081101561360e57600080fd5b8101908080519060200190929190505050151561362757fe5b50505050565b61365d818460010160008560001916600019168152602001908152602001600020546136e090919063ffffffff16565b836001016000846000191660001916815260200190815260200160002081905550505050565b6000813b9050919050565b60006136986139d5565b9050919050565b80600c819055507f68170b705528d3ff1d324cda28eb28cc3d11ce81207f157c05e11c18411a013c816040518082815260200191505060405180910390a150565b60008082840190506136f2848461328d565b151561370057809150613741565b600084121515613726578360ff60019060020a021903831315151561372157fe5b61373d565b8360ff60019060020a0203831215151561373c57fe5b5b8091505b5092915050565b60008484600060038110151561375a57fe5b602002015185600160038110151561376e57fe5b602002015186600260038110151561378257fe5b602002015186600060058110151561379657fe5b60200201518760016005811015156137aa57fe5b60200201518860026005811015156137be57fe5b60200201518960036005811015156137d257fe5b60200201518a60046005811015156137e657fe5b60200201518a604051602001808b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018781526020018681526020018581526020018481526020018381526020018281526020019a50505050505050505050506040516020818303038152906040526040518082805190602001908083835b60208310151561396b5780518252602082019150602081019050602083039250613946565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390209050949350505050565b600080828402905060008414806139c357508284828115156139c057fe5b04145b15156139cb57fe5b8091505092915050565b6000806139f5731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed613683565b1115613a9757731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550613a8e6040805190810160405280600b81526020017f6574685f6d61696e6e6574000000000000000000000000000000000000000000815250613e6b565b60019050613e68565b6000613ab673c03a2615d5efaf5f49f60b7bb6583eaec212fdf1613683565b1115613b585773c03a2615d5efaf5f49f60b7bb6583eaec212fdf1601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550613b4f6040805190810160405280600c81526020017f6574685f726f707374656e330000000000000000000000000000000000000000815250613e6b565b60019050613e68565b6000613b7773b7a07bcf2ba2f2703b24c0691b5278999c59ac7e613683565b1115613c195773b7a07bcf2ba2f2703b24c0691b5278999c59ac7e601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550613c106040805190810160405280600981526020017f6574685f6b6f76616e0000000000000000000000000000000000000000000000815250613e6b565b60019050613e68565b6000613c3873146500cfd35b22e4a392fe0adc06de1a1368ed48613683565b1115613cda5773146500cfd35b22e4a392fe0adc06de1a1368ed48601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550613cd16040805190810160405280600b81526020017f6574685f72696e6b656279000000000000000000000000000000000000000000815250613e6b565b60019050613e68565b6000613cf9736f485c8bf6fc43ea212e93bbf8ce046c7f1cb475613683565b1115613d5d57736f485c8bf6fc43ea212e93bbf8ce046c7f1cb475601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060019050613e68565b6000613d7c7320e12a1f859b3feae5fb2a0a32c18f5a65555bbf613683565b1115613de0577320e12a1f859b3feae5fb2a0a32c18f5a65555bbf601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060019050613e68565b6000613dff7351efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa613683565b1115613e63577351efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060019050613e68565b600090505b90565b8060139080519060200190613e81929190613e85565b5050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10613ec657805160ff1916838001178555613ef4565b82800160010185558215613ef4579182015b82811115613ef3578251825591602001919060010190613ed8565b5b509050613f019190613f97565b5090565b61012060405190810160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff1681526020016000815260200160008152602001600081526020016000815260200160008152602001600080191681525090565b613fb991905b80821115613fb5576000816000905550600101613f9d565b5090565b905600a165627a7a723058202e1b0d544d6f26cab5c2c3d7c2434937ee68fcc2580418f20a2edf6a5f044a7e0029a165627a7a7230582078b6e13ec47a23415601b04536ddc308c9519116406209b970b8ec2b0b64802d0029", - "deployedBytecode": "0x6080604052600436106200008a576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680629d553c146200008f578063798ddbc814620000e95780638da5cb5b1462000143578063ab7b4993146200019d578063ceaaa91514620001e3578063f2fde38b146200023d578063fdea945f1462000283575b600080fd5b3480156200009c57600080fd5b50620000a76200031b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b348015620000f657600080fd5b506200010162000341565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156200015057600080fd5b506200015b62000367565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b348015620001aa57600080fd5b50620001e1600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506200038c565b005b348015620001f057600080fd5b50620001fb62000469565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156200024a57600080fd5b5062000281600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506200048f565b005b3480156200029057600080fd5b5062000319600480360381019080803590602001908201803590602001919091929391929390803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908060a001909192919290803590602001908201803590602001919091929391929390803590602001908201803590602001919091929391929390505050620005e6565b005b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515620003e857600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515156200042557600080fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515620004eb57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515156200052857600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000888833600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168a600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b8b8b62000641620008dc565b80806020018b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001876005602002808284378201915050806020018060200184810384528f8f82818152602001925080828437820191505084810383528888828181526020019250808284378201915050848103825286868281815260200192508082843782019150509e505050505050505050505050505050604051809103906000f0801580156200079d573d6000803e3d6000fd5b509050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16639244f496826040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050600060405180830381600087803b1580156200085e57600080fd5b505af115801562000873573d6000803e3d6000fd5b505050508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f38ee3ff13b5d3453452a79e0799d83b2c8207bf126b2798fa512343680f643ee60405160405180910390a3505050505050505050565b60405161566080620008ee83390190560060806040526000600d60006101000a81548160ff0219169083151502179055506000600d60016101000a81548160ff0219169083151502179055503480156200004757600080fd5b506040516200566038038062005660833981018060405281019080805182019291906020018051906020019092919080519060200190929190805190602001909291908051906020019092919091908260a0018051820192919060200180518201929190505050878787878787336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166384281dcc336040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b1580156200027557600080fd5b505af11580156200028a573d6000803e3d6000fd5b505050506040513d6020811015620002a157600080fd5b81019080805190602001909291905050501515620002be57600080fd5b806000600581101515620002ce57fe5b6020020151600781905550806001600581101515620002e957fe5b60200201516006819055506007546006541115156200030757600080fd5b8060026005811015156200031757fe5b60200201516008819055508060036005811015156200033257fe5b60200201516009819055508060046005811015156200034d57fe5b6020020151600a8190555042600a541115156200036957600080fd5b856004908051906020019062000381929190620015b9565b5082600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550846000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050505050506200046b60017f01000000000000000000000000000000000000000000000000000000000000000260107f01000000000000000000000000000000000000000000000000000000000000000217620004db640100000000026401000000009004565b816014908051906020019062000483929190620015b9565b5080601590805190602001906200049c929190620015b9565b50624f1a0042600a540311151515620004b457600080fd5b620004cd62000893640100000000026401000000009004565b505050505050505062001668565b6000601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614806200055e575060006200055c601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1662000a44640100000000026401000000009004565b145b1562000581576200057f600062000a4f640100000000026401000000009004565b505b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156200060857600080fd5b505af11580156200061d573d6000803e3d6000fd5b505050506040513d60208110156200063457600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515620007a157601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156200072357600080fd5b505af115801562000738573d6000803e3d6000fd5b505050506040513d60208110156200074f57600080fd5b8101908080519060200190929190505050601260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663688dcfd7826040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180827effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001915050600060405180830381600087803b1580156200087757600080fd5b505af11580156200088c573d6000803e3d6000fd5b5050505050565b6000620009f3600a5460148054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015620009365780601f106200090a5761010080835404028352916020019162000936565b820191906000526020600020905b8154815290600101906020018083116200091857829003601f168201915b505050505060158054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015620009d55780601f10620009a957610100808354040283529160200191620009d5565b820191906000526020600020905b815481529060010190602001808311620009b757829003601f168201915b5050505050620249f062000a71640100000000026401000000009004565b9050600060010281600019161415151562000a0d57600080fd5b600160176000836000191660001916815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b6000813b9050919050565b600062000a6a6200103e640100000000026401000000009004565b9050919050565b6000806000601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16148062000af75750600062000af5601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1662000a44640100000000026401000000009004565b145b1562000b1a5762000b18600062000a4f640100000000026401000000009004565b505b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801562000ba157600080fd5b505af115801562000bb6573d6000803e3d6000fd5b505050506040513d602081101562000bcd57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151562000d3a57601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801562000cbc57600080fd5b505af115801562000cd1573d6000803e3d6000fd5b505050506040513d602081101562000ce857600080fd5b8101908080519060200190929190505050601260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632ef3accc86856040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b8381101562000ded57808201518184015260208101905062000dd0565b50505050905090810190601f16801562000e1b5780820380516001836020036101000a031916815260200191505b509350505050602060405180830381600087803b15801562000e3c57600080fd5b505af115801562000e51573d6000803e3d6000fd5b505050506040513d602081101562000e6857600080fd5b81019080805190602001909291905050509050601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c51be90f82888888886040518663ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b8381101562000f3b57808201518184015260208101905062000f1e565b50505050905090810190601f16801562000f695780820380516001836020036101000a031916815260200191505b50838103825285818151815260200191508051906020019080838360005b8381101562000fa457808201518184015260208101905062000f87565b50505050905090810190601f16801562000fd25780820380516001836020036101000a031916815260200191505b5096505050505050506020604051808303818588803b15801562000ff557600080fd5b505af11580156200100a573d6000803e3d6000fd5b50505050506040513d60208110156200102257600080fd5b8101908080519060200190929190505050915050949350505050565b6000806200106f731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed62000a44640100000000026401000000009004565b11156200112457731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506200111a6040805190810160405280600b81526020017f6574685f6d61696e6e65740000000000000000000000000000000000000000008152506200159d640100000000026401000000009004565b600190506200159a565b60006200115473c03a2615d5efaf5f49f60b7bb6583eaec212fdf162000a44640100000000026401000000009004565b1115620012095773c03a2615d5efaf5f49f60b7bb6583eaec212fdf1601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550620011ff6040805190810160405280600c81526020017f6574685f726f707374656e3300000000000000000000000000000000000000008152506200159d640100000000026401000000009004565b600190506200159a565b60006200123973b7a07bcf2ba2f2703b24c0691b5278999c59ac7e62000a44640100000000026401000000009004565b1115620012ee5773b7a07bcf2ba2f2703b24c0691b5278999c59ac7e601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550620012e46040805190810160405280600981526020017f6574685f6b6f76616e00000000000000000000000000000000000000000000008152506200159d640100000000026401000000009004565b600190506200159a565b60006200131e73146500cfd35b22e4a392fe0adc06de1a1368ed4862000a44640100000000026401000000009004565b1115620013d35773146500cfd35b22e4a392fe0adc06de1a1368ed48601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550620013c96040805190810160405280600b81526020017f6574685f72696e6b6562790000000000000000000000000000000000000000008152506200159d640100000000026401000000009004565b600190506200159a565b600062001403736f485c8bf6fc43ea212e93bbf8ce046c7f1cb47562000a44640100000000026401000000009004565b11156200146957736f485c8bf6fc43ea212e93bbf8ce046c7f1cb475601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600190506200159a565b6000620014997320e12a1f859b3feae5fb2a0a32c18f5a65555bbf62000a44640100000000026401000000009004565b1115620014ff577320e12a1f859b3feae5fb2a0a32c18f5a65555bbf601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600190506200159a565b60006200152f7351efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa62000a44640100000000026401000000009004565b111562001595577351efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600190506200159a565b600090505b90565b8060139080519060200190620015b5929190620015b9565b5050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620015fc57805160ff19168380011785556200162d565b828001600101855582156200162d579182015b828111156200162c5782518255916020019190600101906200160f565b5b5090506200163c919062001640565b5090565b6200166591905b808211156200166157600081600090555060010162001647565b5090565b90565b613fe880620016786000396000f30060806040526004361061015f576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806302d05d3f14610164578063053f14da146101bb5780630c8eb675146101e657806327dc297e146102765780632fed1b00146102ed578063323bb775146103185780633270bb5b1461036f57806338bbfa501461039e5780633b3c4ae91461045b578063411449bb1461048a5780634c258eb1146104b557806356357d91146104fa5780635ea7867a1461058a578063614d08f81461061a5780636db7f77c146106aa578063798ddbc8146106b4578063930a9d921461070b578063a8e77c9a14610793578063b5471dee146107ea578063bb4b573414610815578063c201293b14610840578063c32b1dfa14610883578063ca361d67146108ae578063d514d12c146108d9578063f348e8b214610930578063fa3fa1961461095b578063fc51b9c51461099e575b600080fd5b34801561017057600080fd5b506101796109fd565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101c757600080fd5b506101d0610a22565b6040518082815260200191505060405180910390f35b3480156101f257600080fd5b506101fb610a28565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561023b578082015181840152602081019050610220565b50505050905090810190601f1680156102685780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561028257600080fd5b506102eb6004803603810190808035600019169060200190929190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290505050610ac6565b005b3480156102f957600080fd5b50610302610b09565b6040518082815260200191505060405180910390f35b34801561032457600080fd5b5061032d610b0f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561037b57600080fd5b50610384610b35565b604051808215151515815260200191505060405180910390f35b3480156103aa57600080fd5b506104596004803603810190808035600019169060200190929190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290505050610b48565b005b34801561046757600080fd5b50610470610cba565b604051808215151515815260200191505060405180910390f35b34801561049657600080fd5b5061049f610ccd565b6040518082815260200191505060405180910390f35b3480156104c157600080fd5b506104e46004803603810190808035600019169060200190929190505050610cd4565b6040518082815260200191505060405180910390f35b34801561050657600080fd5b5061050f610cf1565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561054f578082015181840152602081019050610534565b50505050905090810190601f16801561057c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561059657600080fd5b5061059f610d8f565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156105df5780820151818401526020810190506105c4565b50505050905090810190601f16801561060c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561062657600080fd5b5061062f610e2d565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561066f578082015181840152602081019050610654565b50505050905090810190601f16801561069c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6106b2610ecb565b005b3480156106c057600080fd5b506106c9611119565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561071757600080fd5b5061077d600480360381019080806060019091929192908060a0019091929192908035906020019092919080359060200190929190803560ff1690602001909291908035600019169060200190929190803560001916906020019092919050505061113f565b6040518082815260200191505060405180910390f35b34801561079f57600080fd5b506107a8611b0f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156107f657600080fd5b506107ff611b35565b6040518082815260200191505060405180910390f35b34801561082157600080fd5b5061082a611b3b565b6040518082815260200191505060405180910390f35b34801561084c57600080fd5b50610881600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611b41565b005b34801561088f57600080fd5b50610898611d8f565b6040518082815260200191505060405180910390f35b3480156108ba57600080fd5b506108c3611d95565b6040518082815260200191505060405180910390f35b3480156108e557600080fd5b506108ee611d9b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561093c57600080fd5b50610945611dc1565b6040518082815260200191505060405180910390f35b34801561096757600080fd5b5061099c600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611dc7565b005b3480156109aa57600080fd5b506109e7600480360381019080806060019091929192908060a0019091929192908035906020019092919080359060200190929190505050611f1c565b6040518082815260200191505060405180910390f35b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600b5481565b60168054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610abe5780601f10610a9357610100808354040283529160200191610abe565b820191906000526020600020905b815481529060010190602001808311610aa157829003601f168201915b505050505081565b610b05828260006040519080825280601f01601f191660200182016040528015610aff5781602001602082028038833980820191505090505b50610b48565b5050565b60085481565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600d60009054906101000a900460ff1681565b610b506121a0565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610b8957600080fd5b60176000846000191660001916815260200190815260200160002060009054906101000a900460ff161515610bbd57600080fd5b8160169080519060200190610bd3929190613e85565b50610be082600854612502565b600b819055507f3e19f2256bddc30aeab8054ccbd86723452d07f687b94441de69c05ee212dafa826040518080602001828103825283818151815260200191508051906020019080838360005b83811015610c48578082015181840152602081019050610c2d565b50505050905090810190601f168015610c755780820380516001836020036101000a031916815260200191505b509250505060405180910390a1610c8a6127f6565b60176000846000191660001916815260200190815260200160002060006101000a81549060ff0219169055505050565b600d60019054906101000a900460ff1681565b620249f081565b6000610cea82600f6128c690919063ffffffff16565b9050919050565b60148054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610d875780601f10610d5c57610100808354040283529160200191610d87565b820191906000526020600020905b815481529060010190602001808311610d6a57829003601f168201915b505050505081565b60158054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610e255780601f10610dfa57610100808354040283529160200191610e25565b820191906000526020600020905b815481529060010190602001808311610e0857829003601f168201915b505050505081565b60048054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610ec35780601f10610e9857610100808354040283529160200191610ec3565b820191906000526020600020905b815481529060010190602001808311610ea657829003601f168201915b505050505081565b600080610f7560148054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610f675780601f10610f3c57610100808354040283529160200191610f67565b820191906000526020600020905b815481529060010190602001808311610f4a57829003601f168201915b5050505050620249f061291d565b9150813410151515610f8657600080fd5b6110c860148054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561101f5780601f10610ff45761010080835404028352916020019161101f565b820191906000526020600020905b81548152906001019060200180831161100257829003601f168201915b505050505060158054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156110ba5780601f1061108f576101008083540402835291602001916110ba565b820191906000526020600020905b81548152906001019060200180831161109d57829003601f168201915b5050505050620249f0612cfa565b905060006001028160001916141515156110e157600080fd5b600160176000836000191660001916815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000611149613f05565b6000806000806000600d60019054906101000a900460ff16801561117a5750600d60009054906101000a900460ff16155b151561118557600080fd5b60008c14158015611197575060008b14155b80156111b257506111b18b8d61328d90919063ffffffff16565b5b15156111bd57600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663cfab472f30336040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b1580156112ae57600080fd5b505af11580156112c2573d6000803e3d6000fd5b505050506040513d60208110156112d857600080fd5b810190808051906020019092919050505015156112f457600080fd5b61136b8e600380602002604051908101604052809291908260036020028082843782019150505050508e600580602002604051908101604052809291908260056020028082843782019150505050508e3073ffffffffffffffffffffffffffffffffffffffff166132a7909392919063ffffffff16565b9550600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663cfab472f3088600001516040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b15801561146257600080fd5b505af1158015611476573d6000803e3d6000fd5b505050506040513d602081101561148c57600080fd5b810190808051906020019092919050505015156114a857600080fd5b600073ffffffffffffffffffffffffffffffffffffffff16866020015173ffffffffffffffffffffffffffffffffffffffff16148061151657503373ffffffffffffffffffffffffffffffffffffffff16866020015173ffffffffffffffffffffffffffffffffffffffff16145b151561152157600080fd5b600073ffffffffffffffffffffffffffffffffffffffff16866000015173ffffffffffffffffffffffffffffffffffffffff161415801561159257503373ffffffffffffffffffffffffffffffffffffffff16866000015173ffffffffffffffffffffffffffffffffffffffff1614155b151561159d57600080fd5b856000015173ffffffffffffffffffffffffffffffffffffffff1673__OrderLib______________________________638163681e90918861010001518d8d8d6040518663ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200185600019166000191681526020018460ff1660ff168152602001836000191660001916815260200182600019166000191681526020019550505050505060206040518083038186803b15801561169357600080fd5b505af41580156116a7573d6000803e3d6000fd5b505050506040513d60208110156116bd57600080fd5b810190808051906020019092919050505015156116d957600080fd5b8560c00151421015156117325785610100015160001916600060018111156116fd57fe5b7fe6104340582083fe7674a149f8da127b9d3d7f74a88ccd7610562eb5b61b919360405160405180910390a360009650611afe565b611752611743876101000151610cd4565b8d61343990919063ffffffff16565b945060008514156117a8578561010001516000191660018081111561177357fe5b7fe6104340582083fe7674a149f8da127b9d3d7f74a88ccd7610562eb5b61b919360405160405180910390a360009650611afe565b6117b2858c613450565b9650600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663eeaba0838760000151338a8a60a001516040518563ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828152602001945050505050600060405180830381600087803b1580156118bd57600080fd5b505af11580156118d1573d6000803e3d6000fd5b505050506118f086610100015188600f6134799092919063ffffffff16565b6000935060009250600073ffffffffffffffffffffffffffffffffffffffff16866040015173ffffffffffffffffffffffffffffffffffffffff16141515611a455761193b876134cf565b9150611946876134cf565b90506000866060015111156119c85761196e828288606001516134ed9092919063ffffffff16565b93506119c78660000151876040015186600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661350d909392919063ffffffff16565b5b600086608001511115611a44576119ee828288608001516134ed9092919063ffffffff16565b9250611a4333876040015185600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661350d909392919063ffffffff16565b5b5b856040015173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16876000015173ffffffffffffffffffffffffffffffffffffffff167ff756998387aae83a81d5053664c1ed50a128ecd4e82cc2e135b5a2f367841f598a88888c60a001518d61010001516040518086815260200185815260200184815260200183815260200182600019166000191681526020019550505050505060405180910390a48696505b505050505050979650505050505050565b600d60029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60065481565b600a5481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611b9d57600080fd5b600d60019054906101000a900460ff16151515611bb957600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515611bf557600080fd5b80600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055503073ffffffffffffffffffffffffffffffffffffffff16600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637bb55cd26040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015611cd357600080fd5b505af1158015611ce7573d6000803e3d6000fd5b505050506040513d6020811015611cfd57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16141515611d3057600080fd5b80600d60026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600d60016101000a81548160ff02191690831515021790555050565b60075481565b60095481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600c5481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611e2257600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515611e5e57600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f7f11fe0c7098e1a76afcc68f35abaa07ef156fa7d6dd2d39664812fe37348d1660405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000611f26613f05565b6000808414158015611f475750611f46858561328d90919063ffffffff16565b5b1515611f5257600080fd5b600d60009054906101000a900460ff16151515611f6e57600080fd5b611fe587600380602002604051908101604052809291908260036020028082843782019150505050508760058060200260405190810160405280929190826005602002808284378201915050505050873073ffffffffffffffffffffffffffffffffffffffff166132a7909392919063ffffffff16565b91503373ffffffffffffffffffffffffffffffffffffffff16826000015173ffffffffffffffffffffffffffffffffffffffff1614151561202557600080fd5b8160c001514210151561207e57816101000151600019166000600181111561204957fe5b7fe6104340582083fe7674a149f8da127b9d3d7f74a88ccd7610562eb5b61b919360405160405180910390a360009250612196565b61209e61208f836101000151610cd4565b8661343990919063ffffffff16565b905060008114156120f457816101000151600019166001808111156120bf57fe5b7fe6104340582083fe7674a149f8da127b9d3d7f74a88ccd7610562eb5b61b919360405160405180910390a360009250612196565b6120fe8482613450565b925061211b82610100015184600f61362d9092919063ffffffff16565b81610100015160001916826040015173ffffffffffffffffffffffffffffffffffffffff16836000015173ffffffffffffffffffffffffffffffffffffffff167f7de4479e80e82e22edb1e0010433c8befc804c34988024fa0b0234715102cd8f866040518082815260200191505060405180910390a48292505b5050949350505050565b600080601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16148061221257506000612210601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16613683565b145b1561222357612221600061368e565b505b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156122a957600080fd5b505af11580156122bd573d6000803e3d6000fd5b505050506040513d60208110156122d357600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151561243c57601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156123c057600080fd5b505af11580156123d4573d6000803e3d6000fd5b505050506040513d60208110156123ea57600080fd5b8101908080519060200190929190505050601260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c281d19e6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156124c257600080fd5b505af11580156124d6573d6000803e3d6000fd5b505050506040513d60208110156124ec57600080fd5b8101908080519060200190929190505050905090565b6000606060008060008693506000925060009150600090505b83518110156127d75760307f010000000000000000000000000000000000000000000000000000000000000002848281518110151561255657fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161015801561266e575060397f01000000000000000000000000000000000000000000000000000000000000000284828151811015156125fe57fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191611155b1561271f578115612691576000861415612687576127d7565b8580600190039650505b600a83029250603084828151811015156126a757fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027f0100000000000000000000000000000000000000000000000000000000000000900403830192506127ca565b602e7f010000000000000000000000000000000000000000000000000000000000000002848281518110151561275157fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614156127c957600191505b5b808060010191505061251b565b60008611156127e95785600a0a830292505b8294505050505092915050565b6000600d60009054906101000a900460ff1615612812576128c3565b600a54421115612841576001600d60006101000a81548160ff021916908315150217905550600b5490506128a3565b600654600b54101515612873576001600d60006101000a81548160ff02191690831515021790555060065490506128a2565b600754600b541115156128a1576001600d60006101000a81548160ff02191690831515021790555060075490505b5b5b600d60009054906101000a900460ff16156128c2576128c18161369f565b5b5b50565b60006129158360010160008460001916600019168152602001908152602001600020548460000160008560001916600019168152602001908152602001600020546136e090919063ffffffff16565b905092915050565b600080601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16148061298f5750600061298d601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16613683565b145b156129a05761299e600061368e565b505b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015612a2657600080fd5b505af1158015612a3a573d6000803e3d6000fd5b505050506040513d6020811015612a5057600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515612bb957601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015612b3d57600080fd5b505af1158015612b51573d6000803e3d6000fd5b505050506040513d6020811015612b6757600080fd5b8101908080519060200190929190505050601260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632ef3accc84846040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b83811015612c6a578082015181840152602081019050612c4f565b50505050905090810190601f168015612c975780820380516001836020036101000a031916815260200191505b509350505050602060405180830381600087803b158015612cb757600080fd5b505af1158015612ccb573d6000803e3d6000fd5b505050506040513d6020811015612ce157600080fd5b8101908080519060200190929190505050905092915050565b6000806000601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161480612d6e57506000612d6c601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16613683565b145b15612d7f57612d7d600061368e565b505b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015612e0557600080fd5b505af1158015612e19573d6000803e3d6000fd5b505050506040513d6020811015612e2f57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515612f9857601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015612f1c57600080fd5b505af1158015612f30573d6000803e3d6000fd5b505050506040513d6020811015612f4657600080fd5b8101908080519060200190929190505050601260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632ef3accc86856040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b8381101561304957808201518184015260208101905061302e565b50505050905090810190601f1680156130765780820380516001836020036101000a031916815260200191505b509350505050602060405180830381600087803b15801561309657600080fd5b505af11580156130aa573d6000803e3d6000fd5b505050506040513d60208110156130c057600080fd5b81019080805190602001909291905050509050601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c51be90f8260008888886040518663ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b83811015613192578082015181840152602081019050613177565b50505050905090810190601f1680156131bf5780820380516001836020036101000a031916815260200191505b50838103825285818151815260200191508051906020019080838360005b838110156131f85780820151818401526020810190506131dd565b50505050905090810190601f1680156132255780820380516001836020036101000a031916815260200191505b5096505050505050506020604051808303818588803b15801561324757600080fd5b505af115801561325b573d6000803e3d6000fd5b50505050506040513d602081101561327257600080fd5b81019080805190602001909291905050509150509392505050565b60008183148061329f57506000828402135b905092915050565b6132af613f05565b8360006003811015156132be57fe5b6020020151816000019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505083600160038110151561330957fe5b6020020151816020019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505083600260038110151561335457fe5b6020020151816040019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505082600060058110151561339f57fe5b60200201518160600181815250508260016005811015156133bc57fe5b60200201518160800181815250508260026005811015156133d957fe5b60200201518160a00181815250508260036005811015156133f657fe5b60200201518160c0018181525050818160e001818152505061341a85858585613748565b8161010001906000191690816000191681525050809050949350505050565b600061344883836000036136e0565b905092915050565b600061345b826134cf565b613464846134cf565b1061346f5781613471565b825b905092915050565b6134a9818460000160008560001916600019168152602001908152602001600020546136e090919063ffffffff16565b836000016000846000191660001916815260200190815260200160002081905550505050565b6000808212156134e4578160000390506134e8565b8190505b919050565b6000816134fa85856139a2565b81151561350357fe5b0490509392505050565b8373ffffffffffffffffffffffffffffffffffffffff166323b872dd8484846040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b1580156135e457600080fd5b505af11580156135f8573d6000803e3d6000fd5b505050506040513d602081101561360e57600080fd5b8101908080519060200190929190505050151561362757fe5b50505050565b61365d818460010160008560001916600019168152602001908152602001600020546136e090919063ffffffff16565b836001016000846000191660001916815260200190815260200160002081905550505050565b6000813b9050919050565b60006136986139d5565b9050919050565b80600c819055507f68170b705528d3ff1d324cda28eb28cc3d11ce81207f157c05e11c18411a013c816040518082815260200191505060405180910390a150565b60008082840190506136f2848461328d565b151561370057809150613741565b600084121515613726578360ff60019060020a021903831315151561372157fe5b61373d565b8360ff60019060020a0203831215151561373c57fe5b5b8091505b5092915050565b60008484600060038110151561375a57fe5b602002015185600160038110151561376e57fe5b602002015186600260038110151561378257fe5b602002015186600060058110151561379657fe5b60200201518760016005811015156137aa57fe5b60200201518860026005811015156137be57fe5b60200201518960036005811015156137d257fe5b60200201518a60046005811015156137e657fe5b60200201518a604051602001808b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018781526020018681526020018581526020018481526020018381526020018281526020019a50505050505050505050506040516020818303038152906040526040518082805190602001908083835b60208310151561396b5780518252602082019150602081019050602083039250613946565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390209050949350505050565b600080828402905060008414806139c357508284828115156139c057fe5b04145b15156139cb57fe5b8091505092915050565b6000806139f5731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed613683565b1115613a9757731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550613a8e6040805190810160405280600b81526020017f6574685f6d61696e6e6574000000000000000000000000000000000000000000815250613e6b565b60019050613e68565b6000613ab673c03a2615d5efaf5f49f60b7bb6583eaec212fdf1613683565b1115613b585773c03a2615d5efaf5f49f60b7bb6583eaec212fdf1601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550613b4f6040805190810160405280600c81526020017f6574685f726f707374656e330000000000000000000000000000000000000000815250613e6b565b60019050613e68565b6000613b7773b7a07bcf2ba2f2703b24c0691b5278999c59ac7e613683565b1115613c195773b7a07bcf2ba2f2703b24c0691b5278999c59ac7e601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550613c106040805190810160405280600981526020017f6574685f6b6f76616e0000000000000000000000000000000000000000000000815250613e6b565b60019050613e68565b6000613c3873146500cfd35b22e4a392fe0adc06de1a1368ed48613683565b1115613cda5773146500cfd35b22e4a392fe0adc06de1a1368ed48601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550613cd16040805190810160405280600b81526020017f6574685f72696e6b656279000000000000000000000000000000000000000000815250613e6b565b60019050613e68565b6000613cf9736f485c8bf6fc43ea212e93bbf8ce046c7f1cb475613683565b1115613d5d57736f485c8bf6fc43ea212e93bbf8ce046c7f1cb475601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060019050613e68565b6000613d7c7320e12a1f859b3feae5fb2a0a32c18f5a65555bbf613683565b1115613de0577320e12a1f859b3feae5fb2a0a32c18f5a65555bbf601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060019050613e68565b6000613dff7351efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa613683565b1115613e63577351efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060019050613e68565b600090505b90565b8060139080519060200190613e81929190613e85565b5050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10613ec657805160ff1916838001178555613ef4565b82800160010185558215613ef4579182015b82811115613ef3578251825591602001919060010190613ed8565b5b509050613f019190613f97565b5090565b61012060405190810160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff1681526020016000815260200160008152602001600081526020016000815260200160008152602001600080191681525090565b613fb991905b80821115613fb5576000816000905550600101613f9d565b5090565b905600a165627a7a723058202e1b0d544d6f26cab5c2c3d7c2434937ee68fcc2580418f20a2edf6a5f044a7e0029a165627a7a7230582078b6e13ec47a23415601b04536ddc308c9519116406209b970b8ec2b0b64802d0029", - "sourceMap": "945:3464:12:-;;;1506:290;8:9:-1;5:2;;;30:1;27;20:12;5:2;1506:290:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;509:10:25;501:5;;:18;;;;;;;;;;;;;;;;;;1654:15:12;1629:22;;:40;;;;;;;;;;;;;;;;;;1699:15;1679:17;;:35;;;;;;;;;;;;;;;;;;1755:34;1724:28;;:65;;;;;;;;;;;;;;;;;;1506:290;;;945:3464;;;;;;", - "deployedSourceMap": "945:3464:12:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1045:43;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1045:43:12;;;;;;;;;;;;;;;;;;;;;;;;;;;1094:32;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1094:32:12;;;;;;;;;;;;;;;;;;;;;;;;;;;238:20:25;;8:9:-1;5:2;;;30:1;27;20:12;5:2;238:20:25;;;;;;;;;;;;;;;;;;;;;;;;;;;3779:177:12;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3779:177:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;1002:37;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1002:37:12;;;;;;;;;;;;;;;;;;;;;;;;;;;832:174:25;;8:9:-1;5:2;;;30:1;27;20:12;5:2;832:174:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;2921:710:12;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2921:710:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1045:43;;;;;;;;;;;;;:::o;1094:32::-;;;;;;;;;;;;;:::o;238:20:25:-;;;;;;;;;;;;;:::o;3779:177:12:-;653:5:25;;;;;;;;;;;639:19;;:10;:19;;;631:28;;;;;;;;3896:1:12;3869:29;;:15;:29;;;;3861:38;;;;;;;;3934:15;3909:22;;:40;;;;;;;;;;;;;;;;;;3779:177;:::o;1002:37::-;;;;;;;;;;;;;:::o;832:174:25:-;653:5;;;;;;;;;;;639:19;;:10;:19;;;631:28;;;;;;;;928:1;908:22;;:8;:22;;;;900:31;;;;;;;;970:8;942:37;;963:5;;;;;;;;;;;942:37;;;;;;;;;;;;993:8;985:5;;:16;;;;;;;;;;;;;;;;;;832:174;:::o;2921:710:12:-;3149:34;3226:12;;3252:10;3276:17;;;;;;;;;;;3307:22;3343:28;;;;;;;;;;;3385:13;3412:16;;3442:11;;3186:277;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3186:277:12;3149:314;;3505:22;;;;;;;;;;;3473:77;;;3551:11;3473:90;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3473:90:12;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3473:90:12;;;;3612:11;3578:46;;3600:10;3578:46;;;;;;;;;;;;2921:710;;;;;;;;;:::o;945:3464::-;;;;;;;;;;:::o", - "source": "/*\n Copyright 2017-2018 Phillip A. Elsasser\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n*/\n\npragma solidity ^0.4.24;\n\nimport \"./MarketContractOraclize.sol\";\nimport \"../MarketContractRegistryInterface.sol\";\nimport \"../factories/MarketCollateralPoolFactoryInterface.sol\";\n\nimport \"openzeppelin-solidity/contracts/ownership/Ownable.sol\";\n\n\n/// @title MarketContractFactoryOraclize\n/// @author Phil Elsasser \ncontract MarketContractFactoryOraclize is Ownable {\n\n address public marketContractRegistry;\n address public collateralPoolFactoryAddress;\n address public MKT_TOKEN_ADDRESS;\n\n event MarketContractCreated(address indexed creator, address indexed contractAddress);\n\n /// @dev deploys our factory and ties it the a supply registry address\n /// @param registryAddress - address of our MARKET registry\n /// @param mktTokenAddress - MARKET Token address\n /// @param marketCollateralPoolFactoryAddress - address of collateral pool factory.\n constructor(address registryAddress, address mktTokenAddress, address marketCollateralPoolFactoryAddress) public {\n marketContractRegistry = registryAddress;\n MKT_TOKEN_ADDRESS = mktTokenAddress;\n collateralPoolFactoryAddress = marketCollateralPoolFactoryAddress;\n }\n\n /// @dev Deploys a new instance of a market contract and adds it to the whitelist.\n /// @param contractName viewable name of this contract (BTC/ETH, LTC/ETH, etc)\n /// @param collateralTokenAddress address of the ERC20 token that will be used for collateral and pricing\n /// @param contractSpecs array of unsigned integers including:\n /// floorPrice minimum tradeable price of this contract, contract enters settlement if breached\n /// capPrice maximum tradeable price of this contract, contract enters settlement if breached\n /// priceDecimalPlaces number of decimal places to convert our queried price from a floating point to\n /// an integer\n /// qtyMultiplier multiply traded qty by this value from base units of collateral token.\n /// expirationTimeStamp - seconds from epoch that this contract expires and enters settlement\n /// @param oracleDataSource a data-source such as \"URL\", \"WolframAlpha\", \"IPFS\"\n /// see http://docs.oraclize.it/#ethereum-quick-start-simple-query\n /// @param oracleQuery see http://docs.oraclize.it/#ethereum-quick-start-simple-query for examples\n function deployMarketContractOraclize(\n string contractName,\n address collateralTokenAddress,\n uint[5] contractSpecs,\n string oracleDataSource,\n string oracleQuery\n ) external\n {\n MarketContractOraclize mktContract = new MarketContractOraclize(\n contractName,\n msg.sender,\n MKT_TOKEN_ADDRESS,\n collateralTokenAddress,\n collateralPoolFactoryAddress,\n contractSpecs,\n oracleDataSource,\n oracleQuery\n );\n MarketContractRegistryInterface(marketContractRegistry).addAddressToWhiteList(mktContract);\n emit MarketContractCreated(msg.sender, mktContract);\n }\n\n /// @dev allows for the owner to set the desired registry for contract creation.\n /// @param registryAddress desired registry address.\n function setRegistryAddress(address registryAddress) external onlyOwner {\n require(registryAddress != address(0));\n marketContractRegistry = registryAddress;\n }\n\n /*\n currently adding this function pushes us over the edge for gas, for the time being we can leave it out.\n /// @dev allows for the owner to set switch out factories\n /// @param marketCollateralPoolFactoryAddress desired factory address.\n function setCollateralPoolFactoryAddress(address marketCollateralPoolFactoryAddress) external onlyOwner {\n collateralPoolFactoryAddress = marketCollateralPoolFactoryAddress;\n }\n */\n}\n", - "sourcePath": "/home/pelsasser/MARKETProtocol/contracts/oraclize/MarketContractFactoryOraclize.sol", + "bytecode": "0x608060405234801561001057600080fd5b506040516040806144fe8339810180604052810190808051906020019092919080519060200190929190505050336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050506143ad806101516000396000f3006080604052600436106200008b576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063798ddbc814620000905780638da5cb5b14620000ea578063ab7b49931462000144578063ceaaa915146200018a578063ea0a80fb14620001e4578063f2fde38b146200023e578063fdea945f1462000284575b600080fd5b3480156200009d57600080fd5b50620000a86200031c565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b348015620000f757600080fd5b506200010262000342565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156200015157600080fd5b5062000188600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505062000367565b005b3480156200019757600080fd5b50620001a262000444565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b348015620001f157600080fd5b50620001fc6200046a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156200024b57600080fd5b5062000282600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505062000490565b005b3480156200029157600080fd5b506200031a600480360381019080803590602001908201803590602001919091929391929390803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908060a001909192919290803590602001908201803590602001919091929391929390803590602001908201803590602001919091929391929390505050620005e7565b005b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515620003c357600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515156200040057600080fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515620004ec57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515156200052957600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166384281dcc336040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b158015620006a757600080fd5b505af1158015620006bc573d6000803e3d6000fd5b505050506040513d6020811015620006d357600080fd5b81019080805190602001909291905050501515620006f057600080fd5b888860408051908101604052803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681525088888888886200076e6200096e565b808060200188600260200280838360005b838110156200079c5780820151818401526020810190506200077f565b50505050905001876005602002808284378201915050806020018060200184810384528c8c82818152602001925080828437820191505084810383528888828181526020019250808284378201915050848103825286868281815260200192508082843782019150509b505050505050505050505050604051809103906000f0801580156200082f573d6000803e3d6000fd5b509050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16639244f496826040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050600060405180830381600087803b158015620008f057600080fd5b505af115801562000905573d6000803e3d6000fd5b505050508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f38ee3ff13b5d3453452a79e0799d83b2c8207bf126b2798fa512343680f643ee60405160405180910390a3505050505050505050565b604051613a02806200098083390190560060806040526000600a60006101000a81548160ff0219169083151502179055503480156200002c57600080fd5b5060405162003a0238038062003a028339810180604052810190808051820192919060200191908260400191908260a0018051820192919060200180518201929190505050848484336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550806000600581101515620000c457fe5b6020020151600481905550806001600581101515620000df57fe5b6020020151600381905550600454600354111515620000fd57600080fd5b8060026005811015156200010d57fe5b60200201516005819055508060036005811015156200012857fe5b60200201516006819055508060046005811015156200014357fe5b6020020151600781905550426007541115156200015f57600080fd5b826001908051906020019062000177929190620013d1565b508160016002811015156200018857fe5b6020020151600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550816000600281101515620001dd57fe5b60200201516000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050506200028660017f01000000000000000000000000000000000000000000000000000000000000000260107f01000000000000000000000000000000000000000000000000000000000000000217620002f3640100000000026401000000009004565b81600d90805190602001906200029e929190620013d1565b5080600e9080519060200190620002b7929190620013d1565b50624f1a00426007540311151515620002cf57600080fd5b620002e8620006ab640100000000026401000000009004565b505050505062001480565b6000600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161480620003765750600062000374600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff166200085c640100000000026401000000009004565b145b15620003995762000397600062000867640100000000026401000000009004565b505b600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156200042057600080fd5b505af115801562000435573d6000803e3d6000fd5b505050506040513d60208110156200044c57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515620005b957600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156200053b57600080fd5b505af115801562000550573d6000803e3d6000fd5b505050506040513d60208110156200056757600080fd5b8101908080519060200190929190505050600b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663688dcfd7826040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180827effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001915050600060405180830381600087803b1580156200068f57600080fd5b505af1158015620006a4573d6000803e3d6000fd5b5050505050565b60006200080b600754600d8054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156200074e5780601f1062000722576101008083540402835291602001916200074e565b820191906000526020600020905b8154815290600101906020018083116200073057829003601f168201915b5050505050600e8054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015620007ed5780601f10620007c157610100808354040283529160200191620007ed565b820191906000526020600020905b815481529060010190602001808311620007cf57829003601f168201915b5050505050620249f062000889640100000000026401000000009004565b905060006001028160001916141515156200082557600080fd5b600160106000836000191660001916815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b6000813b9050919050565b60006200088262000e56640100000000026401000000009004565b9050919050565b6000806000600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614806200090f575060006200090d600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff166200085c640100000000026401000000009004565b145b15620009325762000930600062000867640100000000026401000000009004565b505b600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015620009b957600080fd5b505af1158015620009ce573d6000803e3d6000fd5b505050506040513d6020811015620009e557600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151562000b5257600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801562000ad457600080fd5b505af115801562000ae9573d6000803e3d6000fd5b505050506040513d602081101562000b0057600080fd5b8101908080519060200190929190505050600b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632ef3accc86856040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b8381101562000c0557808201518184015260208101905062000be8565b50505050905090810190601f16801562000c335780820380516001836020036101000a031916815260200191505b509350505050602060405180830381600087803b15801562000c5457600080fd5b505af115801562000c69573d6000803e3d6000fd5b505050506040513d602081101562000c8057600080fd5b81019080805190602001909291905050509050600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c51be90f82888888886040518663ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b8381101562000d5357808201518184015260208101905062000d36565b50505050905090810190601f16801562000d815780820380516001836020036101000a031916815260200191505b50838103825285818151815260200191508051906020019080838360005b8381101562000dbc57808201518184015260208101905062000d9f565b50505050905090810190601f16801562000dea5780820380516001836020036101000a031916815260200191505b5096505050505050506020604051808303818588803b15801562000e0d57600080fd5b505af115801562000e22573d6000803e3d6000fd5b50505050506040513d602081101562000e3a57600080fd5b8101908080519060200190929190505050915050949350505050565b60008062000e87731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed6200085c640100000000026401000000009004565b111562000f3c57731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed600a60016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555062000f326040805190810160405280600b81526020017f6574685f6d61696e6e6574000000000000000000000000000000000000000000815250620013b5640100000000026401000000009004565b60019050620013b2565b600062000f6c73c03a2615d5efaf5f49f60b7bb6583eaec212fdf16200085c640100000000026401000000009004565b1115620010215773c03a2615d5efaf5f49f60b7bb6583eaec212fdf1600a60016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550620010176040805190810160405280600c81526020017f6574685f726f707374656e330000000000000000000000000000000000000000815250620013b5640100000000026401000000009004565b60019050620013b2565b60006200105173b7a07bcf2ba2f2703b24c0691b5278999c59ac7e6200085c640100000000026401000000009004565b1115620011065773b7a07bcf2ba2f2703b24c0691b5278999c59ac7e600a60016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550620010fc6040805190810160405280600981526020017f6574685f6b6f76616e0000000000000000000000000000000000000000000000815250620013b5640100000000026401000000009004565b60019050620013b2565b60006200113673146500cfd35b22e4a392fe0adc06de1a1368ed486200085c640100000000026401000000009004565b1115620011eb5773146500cfd35b22e4a392fe0adc06de1a1368ed48600a60016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550620011e16040805190810160405280600b81526020017f6574685f72696e6b656279000000000000000000000000000000000000000000815250620013b5640100000000026401000000009004565b60019050620013b2565b60006200121b736f485c8bf6fc43ea212e93bbf8ce046c7f1cb4756200085c640100000000026401000000009004565b11156200128157736f485c8bf6fc43ea212e93bbf8ce046c7f1cb475600a60016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060019050620013b2565b6000620012b17320e12a1f859b3feae5fb2a0a32c18f5a65555bbf6200085c640100000000026401000000009004565b111562001317577320e12a1f859b3feae5fb2a0a32c18f5a65555bbf600a60016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060019050620013b2565b6000620013477351efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa6200085c640100000000026401000000009004565b1115620013ad577351efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa600a60016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060019050620013b2565b600090505b90565b80600c9080519060200190620013cd929190620013d1565b5050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200141457805160ff191683800117855562001445565b8280016001018555821562001445579182015b828111156200144457825182559160200191906001019062001427565b5b50905062001454919062001458565b5090565b6200147d91905b80821115620014795760008160009055506001016200145f565b5090565b90565b61257280620014906000396000f300608060405260043610610107576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806302d05d3f1461010c578063053f14da146101635780630c8eb6751461018e57806327dc297e1461021e5780632fed1b0014610295578063323bb775146102c05780633270bb5b1461031757806338bbfa5014610346578063411449bb1461040357806356357d911461042e5780635ea7867a146104be578063614d08f81461054e5780636db7f77c146105de578063b5471dee146105e8578063bb4b573414610613578063c32b1dfa1461063e578063ca361d6714610669578063f348e8b214610694578063fa3fa196146106bf575b600080fd5b34801561011857600080fd5b50610121610702565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561016f57600080fd5b50610178610727565b6040518082815260200191505060405180910390f35b34801561019a57600080fd5b506101a361072d565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101e35780820151818401526020810190506101c8565b50505050905090810190601f1680156102105780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561022a57600080fd5b506102936004803603810190808035600019169060200190929190803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091929192905050506107cb565b005b3480156102a157600080fd5b506102aa61080e565b6040518082815260200191505060405180910390f35b3480156102cc57600080fd5b506102d5610814565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561032357600080fd5b5061032c61083a565b604051808215151515815260200191505060405180910390f35b34801561035257600080fd5b506104016004803603810190808035600019169060200190929190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919291929050505061084d565b005b34801561040f57600080fd5b5061041861095c565b6040518082815260200191505060405180910390f35b34801561043a57600080fd5b50610443610963565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610483578082015181840152602081019050610468565b50505050905090810190601f1680156104b05780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156104ca57600080fd5b506104d3610a01565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156105135780820151818401526020810190506104f8565b50505050905090810190601f1680156105405780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561055a57600080fd5b50610563610a9f565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156105a3578082015181840152602081019050610588565b50505050905090810190601f1680156105d05780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6105e6610b3d565b005b3480156105f457600080fd5b506105fd610d8b565b6040518082815260200191505060405180910390f35b34801561061f57600080fd5b50610628610d91565b6040518082815260200191505060405180910390f35b34801561064a57600080fd5b50610653610d97565b6040518082815260200191505060405180910390f35b34801561067557600080fd5b5061067e610d9d565b6040518082815260200191505060405180910390f35b3480156106a057600080fd5b506106a9610da3565b6040518082815260200191505060405180910390f35b3480156106cb57600080fd5b50610700600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610da9565b005b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60085481565b600f8054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156107c35780601f10610798576101008083540402835291602001916107c3565b820191906000526020600020905b8154815290600101906020018083116107a657829003601f168201915b505050505081565b61080a828260006040519080825280601f01601f1916602001820160405280156108045781602001602082028038833980820191505090505b5061084d565b5050565b60055481565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600a60009054906101000a900460ff1681565b610855610efe565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561088e57600080fd5b60106000846000191660001916815260200190815260200160002060009054906101000a900460ff1615156108c257600080fd5b81600f90805190602001906108d89291906124a1565b506108e582600554611260565b6008819055507f8848a3fb6a59cb2631434df52b885e109a25f8b683d0721da7ef92618182b4826008546040518082815260200191505060405180910390a161092c611554565b60106000846000191660001916815260200190815260200160002060006101000a81549060ff0219169055505050565b620249f081565b600d8054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156109f95780601f106109ce576101008083540402835291602001916109f9565b820191906000526020600020905b8154815290600101906020018083116109dc57829003601f168201915b505050505081565b600e8054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610a975780601f10610a6c57610100808354040283529160200191610a97565b820191906000526020600020905b815481529060010190602001808311610a7a57829003601f168201915b505050505081565b60018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610b355780601f10610b0a57610100808354040283529160200191610b35565b820191906000526020600020905b815481529060010190602001808311610b1857829003601f168201915b505050505081565b600080610be7600d8054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610bd95780601f10610bae57610100808354040283529160200191610bd9565b820191906000526020600020905b815481529060010190602001808311610bbc57829003601f168201915b5050505050620249f0611624565b9150813410151515610bf857600080fd5b610d3a600d8054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610c915780601f10610c6657610100808354040283529160200191610c91565b820191906000526020600020905b815481529060010190602001808311610c7457829003601f168201915b5050505050600e8054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610d2c5780601f10610d0157610100808354040283529160200191610d2c565b820191906000526020600020905b815481529060010190602001808311610d0f57829003601f168201915b5050505050620249f0611a01565b90506000600102816000191614151515610d5357600080fd5b600160106000836000191660001916815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b60035481565b60075481565b60045481565b60065481565b60095481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610e0457600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515610e4057600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f7f11fe0c7098e1a76afcc68f35abaa07ef156fa7d6dd2d39664812fe37348d1660405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600080600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161480610f7057506000610f6e600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16611f94565b145b15610f8157610f7f6000611f9f565b505b600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561100757600080fd5b505af115801561101b573d6000803e3d6000fd5b505050506040513d602081101561103157600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151561119a57600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561111e57600080fd5b505af1158015611132573d6000803e3d6000fd5b505050506040513d602081101561114857600080fd5b8101908080519060200190929190505050600b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c281d19e6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561122057600080fd5b505af1158015611234573d6000803e3d6000fd5b505050506040513d602081101561124a57600080fd5b8101908080519060200190929190505050905090565b6000606060008060008693506000925060009150600090505b83518110156115355760307f01000000000000000000000000000000000000000000000000000000000000000284828151811015156112b457fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916101580156113cc575060397f010000000000000000000000000000000000000000000000000000000000000002848281518110151561135c57fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191611155b1561147d5781156113ef5760008614156113e557611535565b8580600190039650505b600a830292506030848281518110151561140557fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027f010000000000000000000000000000000000000000000000000000000000000090040383019250611528565b602e7f01000000000000000000000000000000000000000000000000000000000000000284828151811015156114af57fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916141561152757600191505b5b8080600101915050611279565b60008611156115475785600a0a830292505b8294505050505092915050565b6000600a60009054906101000a900460ff161561157057611621565b60075442111561159f576001600a60006101000a81548160ff0219169083151502179055506008549050611601565b6003546008541015156115d1576001600a60006101000a81548160ff0219169083151502179055506003549050611600565b6004546008541115156115ff576001600a60006101000a81548160ff02191690831515021790555060045490505b5b5b600a60009054906101000a900460ff16156116205761161f81611fb0565b5b5b50565b600080600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16148061169657506000611694600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16611f94565b145b156116a7576116a56000611f9f565b505b600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561172d57600080fd5b505af1158015611741573d6000803e3d6000fd5b505050506040513d602081101561175757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415156118c057600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561184457600080fd5b505af1158015611858573d6000803e3d6000fd5b505050506040513d602081101561186e57600080fd5b8101908080519060200190929190505050600b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632ef3accc84846040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b83811015611971578082015181840152602081019050611956565b50505050905090810190601f16801561199e5780820380516001836020036101000a031916815260200191505b509350505050602060405180830381600087803b1580156119be57600080fd5b505af11580156119d2573d6000803e3d6000fd5b505050506040513d60208110156119e857600080fd5b8101908080519060200190929190505050905092915050565b6000806000600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161480611a7557506000611a73600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16611f94565b145b15611a8657611a846000611f9f565b505b600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015611b0c57600080fd5b505af1158015611b20573d6000803e3d6000fd5b505050506040513d6020811015611b3657600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515611c9f57600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015611c2357600080fd5b505af1158015611c37573d6000803e3d6000fd5b505050506040513d6020811015611c4d57600080fd5b8101908080519060200190929190505050600b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632ef3accc86856040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b83811015611d50578082015181840152602081019050611d35565b50505050905090810190601f168015611d7d5780820380516001836020036101000a031916815260200191505b509350505050602060405180830381600087803b158015611d9d57600080fd5b505af1158015611db1573d6000803e3d6000fd5b505050506040513d6020811015611dc757600080fd5b81019080805190602001909291905050509050600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c51be90f8260008888886040518663ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b83811015611e99578082015181840152602081019050611e7e565b50505050905090810190601f168015611ec65780820380516001836020036101000a031916815260200191505b50838103825285818151815260200191508051906020019080838360005b83811015611eff578082015181840152602081019050611ee4565b50505050905090810190601f168015611f2c5780820380516001836020036101000a031916815260200191505b5096505050505050506020604051808303818588803b158015611f4e57600080fd5b505af1158015611f62573d6000803e3d6000fd5b50505050506040513d6020811015611f7957600080fd5b81019080805190602001909291905050509150509392505050565b6000813b9050919050565b6000611fa9611ff1565b9050919050565b806009819055507f68170b705528d3ff1d324cda28eb28cc3d11ce81207f157c05e11c18411a013c816040518082815260200191505060405180910390a150565b600080612011731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed611f94565b11156120b357731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed600a60016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506120aa6040805190810160405280600b81526020017f6574685f6d61696e6e6574000000000000000000000000000000000000000000815250612487565b60019050612484565b60006120d273c03a2615d5efaf5f49f60b7bb6583eaec212fdf1611f94565b11156121745773c03a2615d5efaf5f49f60b7bb6583eaec212fdf1600a60016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061216b6040805190810160405280600c81526020017f6574685f726f707374656e330000000000000000000000000000000000000000815250612487565b60019050612484565b600061219373b7a07bcf2ba2f2703b24c0691b5278999c59ac7e611f94565b11156122355773b7a07bcf2ba2f2703b24c0691b5278999c59ac7e600a60016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061222c6040805190810160405280600981526020017f6574685f6b6f76616e0000000000000000000000000000000000000000000000815250612487565b60019050612484565b600061225473146500cfd35b22e4a392fe0adc06de1a1368ed48611f94565b11156122f65773146500cfd35b22e4a392fe0adc06de1a1368ed48600a60016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506122ed6040805190810160405280600b81526020017f6574685f72696e6b656279000000000000000000000000000000000000000000815250612487565b60019050612484565b6000612315736f485c8bf6fc43ea212e93bbf8ce046c7f1cb475611f94565b111561237957736f485c8bf6fc43ea212e93bbf8ce046c7f1cb475600a60016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060019050612484565b60006123987320e12a1f859b3feae5fb2a0a32c18f5a65555bbf611f94565b11156123fc577320e12a1f859b3feae5fb2a0a32c18f5a65555bbf600a60016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060019050612484565b600061241b7351efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa611f94565b111561247f577351efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa600a60016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060019050612484565b600090505b90565b80600c908051906020019061249d9291906124a1565b5050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106124e257805160ff1916838001178555612510565b82800160010185558215612510579182015b8281111561250f5782518255916020019190600101906124f4565b5b50905061251d9190612521565b5090565b61254391905b8082111561253f576000816000905550600101612527565b5090565b905600a165627a7a7230582084346538b36e33969fd9e39bf57d37a0bb80f6a8398f20a6b19f78858f9743f90029a165627a7a72305820b195aaefd3cb1cac817ccdd30e3620f9c6877f1b7d0be0632ba48ee2c8059b520029", + "deployedBytecode": "0x6080604052600436106200008b576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063798ddbc814620000905780638da5cb5b14620000ea578063ab7b49931462000144578063ceaaa915146200018a578063ea0a80fb14620001e4578063f2fde38b146200023e578063fdea945f1462000284575b600080fd5b3480156200009d57600080fd5b50620000a86200031c565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b348015620000f757600080fd5b506200010262000342565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156200015157600080fd5b5062000188600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505062000367565b005b3480156200019757600080fd5b50620001a262000444565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b348015620001f157600080fd5b50620001fc6200046a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156200024b57600080fd5b5062000282600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505062000490565b005b3480156200029157600080fd5b506200031a600480360381019080803590602001908201803590602001919091929391929390803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908060a001909192919290803590602001908201803590602001919091929391929390803590602001908201803590602001919091929391929390505050620005e7565b005b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515620003c357600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515156200040057600080fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515620004ec57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515156200052957600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166384281dcc336040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b158015620006a757600080fd5b505af1158015620006bc573d6000803e3d6000fd5b505050506040513d6020811015620006d357600080fd5b81019080805190602001909291905050501515620006f057600080fd5b888860408051908101604052803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681525088888888886200076e6200096e565b808060200188600260200280838360005b838110156200079c5780820151818401526020810190506200077f565b50505050905001876005602002808284378201915050806020018060200184810384528c8c82818152602001925080828437820191505084810383528888828181526020019250808284378201915050848103825286868281815260200192508082843782019150509b505050505050505050505050604051809103906000f0801580156200082f573d6000803e3d6000fd5b509050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16639244f496826040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050600060405180830381600087803b158015620008f057600080fd5b505af115801562000905573d6000803e3d6000fd5b505050508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f38ee3ff13b5d3453452a79e0799d83b2c8207bf126b2798fa512343680f643ee60405160405180910390a3505050505050505050565b604051613a02806200098083390190560060806040526000600a60006101000a81548160ff0219169083151502179055503480156200002c57600080fd5b5060405162003a0238038062003a028339810180604052810190808051820192919060200191908260400191908260a0018051820192919060200180518201929190505050848484336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550806000600581101515620000c457fe5b6020020151600481905550806001600581101515620000df57fe5b6020020151600381905550600454600354111515620000fd57600080fd5b8060026005811015156200010d57fe5b60200201516005819055508060036005811015156200012857fe5b60200201516006819055508060046005811015156200014357fe5b6020020151600781905550426007541115156200015f57600080fd5b826001908051906020019062000177929190620013d1565b508160016002811015156200018857fe5b6020020151600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550816000600281101515620001dd57fe5b60200201516000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050506200028660017f01000000000000000000000000000000000000000000000000000000000000000260107f01000000000000000000000000000000000000000000000000000000000000000217620002f3640100000000026401000000009004565b81600d90805190602001906200029e929190620013d1565b5080600e9080519060200190620002b7929190620013d1565b50624f1a00426007540311151515620002cf57600080fd5b620002e8620006ab640100000000026401000000009004565b505050505062001480565b6000600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161480620003765750600062000374600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff166200085c640100000000026401000000009004565b145b15620003995762000397600062000867640100000000026401000000009004565b505b600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156200042057600080fd5b505af115801562000435573d6000803e3d6000fd5b505050506040513d60208110156200044c57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515620005b957600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156200053b57600080fd5b505af115801562000550573d6000803e3d6000fd5b505050506040513d60208110156200056757600080fd5b8101908080519060200190929190505050600b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663688dcfd7826040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180827effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001915050600060405180830381600087803b1580156200068f57600080fd5b505af1158015620006a4573d6000803e3d6000fd5b5050505050565b60006200080b600754600d8054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156200074e5780601f1062000722576101008083540402835291602001916200074e565b820191906000526020600020905b8154815290600101906020018083116200073057829003601f168201915b5050505050600e8054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015620007ed5780601f10620007c157610100808354040283529160200191620007ed565b820191906000526020600020905b815481529060010190602001808311620007cf57829003601f168201915b5050505050620249f062000889640100000000026401000000009004565b905060006001028160001916141515156200082557600080fd5b600160106000836000191660001916815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b6000813b9050919050565b60006200088262000e56640100000000026401000000009004565b9050919050565b6000806000600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614806200090f575060006200090d600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff166200085c640100000000026401000000009004565b145b15620009325762000930600062000867640100000000026401000000009004565b505b600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015620009b957600080fd5b505af1158015620009ce573d6000803e3d6000fd5b505050506040513d6020811015620009e557600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151562000b5257600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801562000ad457600080fd5b505af115801562000ae9573d6000803e3d6000fd5b505050506040513d602081101562000b0057600080fd5b8101908080519060200190929190505050600b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632ef3accc86856040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b8381101562000c0557808201518184015260208101905062000be8565b50505050905090810190601f16801562000c335780820380516001836020036101000a031916815260200191505b509350505050602060405180830381600087803b15801562000c5457600080fd5b505af115801562000c69573d6000803e3d6000fd5b505050506040513d602081101562000c8057600080fd5b81019080805190602001909291905050509050600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c51be90f82888888886040518663ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b8381101562000d5357808201518184015260208101905062000d36565b50505050905090810190601f16801562000d815780820380516001836020036101000a031916815260200191505b50838103825285818151815260200191508051906020019080838360005b8381101562000dbc57808201518184015260208101905062000d9f565b50505050905090810190601f16801562000dea5780820380516001836020036101000a031916815260200191505b5096505050505050506020604051808303818588803b15801562000e0d57600080fd5b505af115801562000e22573d6000803e3d6000fd5b50505050506040513d602081101562000e3a57600080fd5b8101908080519060200190929190505050915050949350505050565b60008062000e87731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed6200085c640100000000026401000000009004565b111562000f3c57731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed600a60016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555062000f326040805190810160405280600b81526020017f6574685f6d61696e6e6574000000000000000000000000000000000000000000815250620013b5640100000000026401000000009004565b60019050620013b2565b600062000f6c73c03a2615d5efaf5f49f60b7bb6583eaec212fdf16200085c640100000000026401000000009004565b1115620010215773c03a2615d5efaf5f49f60b7bb6583eaec212fdf1600a60016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550620010176040805190810160405280600c81526020017f6574685f726f707374656e330000000000000000000000000000000000000000815250620013b5640100000000026401000000009004565b60019050620013b2565b60006200105173b7a07bcf2ba2f2703b24c0691b5278999c59ac7e6200085c640100000000026401000000009004565b1115620011065773b7a07bcf2ba2f2703b24c0691b5278999c59ac7e600a60016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550620010fc6040805190810160405280600981526020017f6574685f6b6f76616e0000000000000000000000000000000000000000000000815250620013b5640100000000026401000000009004565b60019050620013b2565b60006200113673146500cfd35b22e4a392fe0adc06de1a1368ed486200085c640100000000026401000000009004565b1115620011eb5773146500cfd35b22e4a392fe0adc06de1a1368ed48600a60016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550620011e16040805190810160405280600b81526020017f6574685f72696e6b656279000000000000000000000000000000000000000000815250620013b5640100000000026401000000009004565b60019050620013b2565b60006200121b736f485c8bf6fc43ea212e93bbf8ce046c7f1cb4756200085c640100000000026401000000009004565b11156200128157736f485c8bf6fc43ea212e93bbf8ce046c7f1cb475600a60016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060019050620013b2565b6000620012b17320e12a1f859b3feae5fb2a0a32c18f5a65555bbf6200085c640100000000026401000000009004565b111562001317577320e12a1f859b3feae5fb2a0a32c18f5a65555bbf600a60016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060019050620013b2565b6000620013477351efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa6200085c640100000000026401000000009004565b1115620013ad577351efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa600a60016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060019050620013b2565b600090505b90565b80600c9080519060200190620013cd929190620013d1565b5050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200141457805160ff191683800117855562001445565b8280016001018555821562001445579182015b828111156200144457825182559160200191906001019062001427565b5b50905062001454919062001458565b5090565b6200147d91905b80821115620014795760008160009055506001016200145f565b5090565b90565b61257280620014906000396000f300608060405260043610610107576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806302d05d3f1461010c578063053f14da146101635780630c8eb6751461018e57806327dc297e1461021e5780632fed1b0014610295578063323bb775146102c05780633270bb5b1461031757806338bbfa5014610346578063411449bb1461040357806356357d911461042e5780635ea7867a146104be578063614d08f81461054e5780636db7f77c146105de578063b5471dee146105e8578063bb4b573414610613578063c32b1dfa1461063e578063ca361d6714610669578063f348e8b214610694578063fa3fa196146106bf575b600080fd5b34801561011857600080fd5b50610121610702565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561016f57600080fd5b50610178610727565b6040518082815260200191505060405180910390f35b34801561019a57600080fd5b506101a361072d565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101e35780820151818401526020810190506101c8565b50505050905090810190601f1680156102105780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561022a57600080fd5b506102936004803603810190808035600019169060200190929190803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091929192905050506107cb565b005b3480156102a157600080fd5b506102aa61080e565b6040518082815260200191505060405180910390f35b3480156102cc57600080fd5b506102d5610814565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561032357600080fd5b5061032c61083a565b604051808215151515815260200191505060405180910390f35b34801561035257600080fd5b506104016004803603810190808035600019169060200190929190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919291929050505061084d565b005b34801561040f57600080fd5b5061041861095c565b6040518082815260200191505060405180910390f35b34801561043a57600080fd5b50610443610963565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610483578082015181840152602081019050610468565b50505050905090810190601f1680156104b05780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156104ca57600080fd5b506104d3610a01565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156105135780820151818401526020810190506104f8565b50505050905090810190601f1680156105405780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561055a57600080fd5b50610563610a9f565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156105a3578082015181840152602081019050610588565b50505050905090810190601f1680156105d05780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6105e6610b3d565b005b3480156105f457600080fd5b506105fd610d8b565b6040518082815260200191505060405180910390f35b34801561061f57600080fd5b50610628610d91565b6040518082815260200191505060405180910390f35b34801561064a57600080fd5b50610653610d97565b6040518082815260200191505060405180910390f35b34801561067557600080fd5b5061067e610d9d565b6040518082815260200191505060405180910390f35b3480156106a057600080fd5b506106a9610da3565b6040518082815260200191505060405180910390f35b3480156106cb57600080fd5b50610700600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610da9565b005b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60085481565b600f8054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156107c35780601f10610798576101008083540402835291602001916107c3565b820191906000526020600020905b8154815290600101906020018083116107a657829003601f168201915b505050505081565b61080a828260006040519080825280601f01601f1916602001820160405280156108045781602001602082028038833980820191505090505b5061084d565b5050565b60055481565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600a60009054906101000a900460ff1681565b610855610efe565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561088e57600080fd5b60106000846000191660001916815260200190815260200160002060009054906101000a900460ff1615156108c257600080fd5b81600f90805190602001906108d89291906124a1565b506108e582600554611260565b6008819055507f8848a3fb6a59cb2631434df52b885e109a25f8b683d0721da7ef92618182b4826008546040518082815260200191505060405180910390a161092c611554565b60106000846000191660001916815260200190815260200160002060006101000a81549060ff0219169055505050565b620249f081565b600d8054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156109f95780601f106109ce576101008083540402835291602001916109f9565b820191906000526020600020905b8154815290600101906020018083116109dc57829003601f168201915b505050505081565b600e8054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610a975780601f10610a6c57610100808354040283529160200191610a97565b820191906000526020600020905b815481529060010190602001808311610a7a57829003601f168201915b505050505081565b60018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610b355780601f10610b0a57610100808354040283529160200191610b35565b820191906000526020600020905b815481529060010190602001808311610b1857829003601f168201915b505050505081565b600080610be7600d8054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610bd95780601f10610bae57610100808354040283529160200191610bd9565b820191906000526020600020905b815481529060010190602001808311610bbc57829003601f168201915b5050505050620249f0611624565b9150813410151515610bf857600080fd5b610d3a600d8054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610c915780601f10610c6657610100808354040283529160200191610c91565b820191906000526020600020905b815481529060010190602001808311610c7457829003601f168201915b5050505050600e8054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610d2c5780601f10610d0157610100808354040283529160200191610d2c565b820191906000526020600020905b815481529060010190602001808311610d0f57829003601f168201915b5050505050620249f0611a01565b90506000600102816000191614151515610d5357600080fd5b600160106000836000191660001916815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b60035481565b60075481565b60045481565b60065481565b60095481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610e0457600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515610e4057600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f7f11fe0c7098e1a76afcc68f35abaa07ef156fa7d6dd2d39664812fe37348d1660405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600080600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161480610f7057506000610f6e600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16611f94565b145b15610f8157610f7f6000611f9f565b505b600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561100757600080fd5b505af115801561101b573d6000803e3d6000fd5b505050506040513d602081101561103157600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151561119a57600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561111e57600080fd5b505af1158015611132573d6000803e3d6000fd5b505050506040513d602081101561114857600080fd5b8101908080519060200190929190505050600b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c281d19e6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561122057600080fd5b505af1158015611234573d6000803e3d6000fd5b505050506040513d602081101561124a57600080fd5b8101908080519060200190929190505050905090565b6000606060008060008693506000925060009150600090505b83518110156115355760307f01000000000000000000000000000000000000000000000000000000000000000284828151811015156112b457fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916101580156113cc575060397f010000000000000000000000000000000000000000000000000000000000000002848281518110151561135c57fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191611155b1561147d5781156113ef5760008614156113e557611535565b8580600190039650505b600a830292506030848281518110151561140557fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027f010000000000000000000000000000000000000000000000000000000000000090040383019250611528565b602e7f01000000000000000000000000000000000000000000000000000000000000000284828151811015156114af57fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916141561152757600191505b5b8080600101915050611279565b60008611156115475785600a0a830292505b8294505050505092915050565b6000600a60009054906101000a900460ff161561157057611621565b60075442111561159f576001600a60006101000a81548160ff0219169083151502179055506008549050611601565b6003546008541015156115d1576001600a60006101000a81548160ff0219169083151502179055506003549050611600565b6004546008541115156115ff576001600a60006101000a81548160ff02191690831515021790555060045490505b5b5b600a60009054906101000a900460ff16156116205761161f81611fb0565b5b5b50565b600080600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16148061169657506000611694600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16611f94565b145b156116a7576116a56000611f9f565b505b600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561172d57600080fd5b505af1158015611741573d6000803e3d6000fd5b505050506040513d602081101561175757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415156118c057600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561184457600080fd5b505af1158015611858573d6000803e3d6000fd5b505050506040513d602081101561186e57600080fd5b8101908080519060200190929190505050600b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632ef3accc84846040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b83811015611971578082015181840152602081019050611956565b50505050905090810190601f16801561199e5780820380516001836020036101000a031916815260200191505b509350505050602060405180830381600087803b1580156119be57600080fd5b505af11580156119d2573d6000803e3d6000fd5b505050506040513d60208110156119e857600080fd5b8101908080519060200190929190505050905092915050565b6000806000600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161480611a7557506000611a73600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16611f94565b145b15611a8657611a846000611f9f565b505b600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015611b0c57600080fd5b505af1158015611b20573d6000803e3d6000fd5b505050506040513d6020811015611b3657600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515611c9f57600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015611c2357600080fd5b505af1158015611c37573d6000803e3d6000fd5b505050506040513d6020811015611c4d57600080fd5b8101908080519060200190929190505050600b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632ef3accc86856040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b83811015611d50578082015181840152602081019050611d35565b50505050905090810190601f168015611d7d5780820380516001836020036101000a031916815260200191505b509350505050602060405180830381600087803b158015611d9d57600080fd5b505af1158015611db1573d6000803e3d6000fd5b505050506040513d6020811015611dc757600080fd5b81019080805190602001909291905050509050600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c51be90f8260008888886040518663ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b83811015611e99578082015181840152602081019050611e7e565b50505050905090810190601f168015611ec65780820380516001836020036101000a031916815260200191505b50838103825285818151815260200191508051906020019080838360005b83811015611eff578082015181840152602081019050611ee4565b50505050905090810190601f168015611f2c5780820380516001836020036101000a031916815260200191505b5096505050505050506020604051808303818588803b158015611f4e57600080fd5b505af1158015611f62573d6000803e3d6000fd5b50505050506040513d6020811015611f7957600080fd5b81019080805190602001909291905050509150509392505050565b6000813b9050919050565b6000611fa9611ff1565b9050919050565b806009819055507f68170b705528d3ff1d324cda28eb28cc3d11ce81207f157c05e11c18411a013c816040518082815260200191505060405180910390a150565b600080612011731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed611f94565b11156120b357731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed600a60016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506120aa6040805190810160405280600b81526020017f6574685f6d61696e6e6574000000000000000000000000000000000000000000815250612487565b60019050612484565b60006120d273c03a2615d5efaf5f49f60b7bb6583eaec212fdf1611f94565b11156121745773c03a2615d5efaf5f49f60b7bb6583eaec212fdf1600a60016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061216b6040805190810160405280600c81526020017f6574685f726f707374656e330000000000000000000000000000000000000000815250612487565b60019050612484565b600061219373b7a07bcf2ba2f2703b24c0691b5278999c59ac7e611f94565b11156122355773b7a07bcf2ba2f2703b24c0691b5278999c59ac7e600a60016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061222c6040805190810160405280600981526020017f6574685f6b6f76616e0000000000000000000000000000000000000000000000815250612487565b60019050612484565b600061225473146500cfd35b22e4a392fe0adc06de1a1368ed48611f94565b11156122f65773146500cfd35b22e4a392fe0adc06de1a1368ed48600a60016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506122ed6040805190810160405280600b81526020017f6574685f72696e6b656279000000000000000000000000000000000000000000815250612487565b60019050612484565b6000612315736f485c8bf6fc43ea212e93bbf8ce046c7f1cb475611f94565b111561237957736f485c8bf6fc43ea212e93bbf8ce046c7f1cb475600a60016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060019050612484565b60006123987320e12a1f859b3feae5fb2a0a32c18f5a65555bbf611f94565b11156123fc577320e12a1f859b3feae5fb2a0a32c18f5a65555bbf600a60016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060019050612484565b600061241b7351efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa611f94565b111561247f577351efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa600a60016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060019050612484565b600090505b90565b80600c908051906020019061249d9291906124a1565b5050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106124e257805160ff1916838001178555612510565b82800160010185558215612510579182015b8281111561250f5782518255916020019190600101906124f4565b5b50905061251d9190612521565b5090565b61254391905b8082111561253f576000816000905550600101612527565b5090565b905600a165627a7a7230582084346538b36e33969fd9e39bf57d37a0bb80f6a8398f20a6b19f78858f9743f90029a165627a7a72305820b195aaefd3cb1cac817ccdd30e3620f9c6877f1b7d0be0632ba48ee2c8059b520029", + "sourceMap": "917:3009:16:-;;;1375:221;8:9:-1;5:2;;;30:1;27;20:12;5:2;1375:221:16;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;509:10:41;501:5;;:18;;;;;;;;;;;;;;;;;;1479:15:16;1454:22;;:40;;;;;;;;;;;;;;;;;;1524:15;1504:17;;:35;;;;;;;;;;;;;;;;;;1573:15;1549:9;;:40;;;;;;;;;;;;;;;;;;1375:221;;917:3009;;;;;;", + "deployedSourceMap": "917:3009:16:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1017:32;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1017:32:16;;;;;;;;;;;;;;;;;;;;;;;;;;;238:20:41;;8:9:-1;5:2;;;30:1;27;20:12;5:2;238:20:41;;;;;;;;;;;;;;;;;;;;;;;;;;;3747:177:16;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3747:177:16;;;;;;;;;;;;;;;;;;;;;;;;;;;;974:37;;8:9:-1;5:2;;;30:1;27;20:12;5:2;974:37:16;;;;;;;;;;;;;;;;;;;;;;;;;;;1055:28;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1055:28:16;;;;;;;;;;;;;;;;;;;;;;;;;;;832:174:41;;8:9:-1;5:2;;;30:1;27;20:12;5:2;832:174:41;;;;;;;;;;;;;;;;;;;;;;;;;;;;2814:785:16;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2814:785:16;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1017:32;;;;;;;;;;;;;:::o;238:20:41:-;;;;;;;;;;;;;:::o;3747:177:16:-;653:5:41;;;;;;;;;;;639:19;;:10;:19;;;631:28;;;;;;;;3864:1:16;3837:29;;:15;:29;;;;3829:38;;;;;;;;3902:15;3877:22;;:40;;;;;;;;;;;;;;;;;;3747:177;:::o;974:37::-;;;;;;;;;;;;;:::o;1055:28::-;;;;;;;;;;;;;:::o;832:174:41:-;653:5;;;;;;;;;;;639:19;;:10;:19;;;631:28;;;;;;;;928:1;908:22;;:8;:22;;;;900:31;;;;;;;;970:8;942:37;;963:5;;;;;;;;;;;942:37;;;;;;;;;;;;993:8;985:5;;:16;;;;;;;;;;;;;;;;;;832:174;:::o;2814:785:16:-;3154:34;3050:9;;;;;;;;;;;:48;;;3099:10;3050:60;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3050:60:16;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3050:60:16;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;3050:60:16;;;;;;;;;;;;;;;;3042:69;;;;;;;;3231:12;;3191:240;;;;;;;;;3275:10;3191:240;;;;;;;;3303:22;3191:240;;;;;;;3353:13;3380:16;;3410:11;;3191:240;;:::i;:::-;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;3191:240:16;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3191:240:16;3154:277;;3473:22;;;;;;;;;;;3441:77;;;3519:11;3441:90;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3441:90:16;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3441:90:16;;;;3580:11;3546:46;;3568:10;3546:46;;;;;;;;;;;;2814:785;;;;;;;;;:::o;917:3009::-;;;;;;;;;;:::o", + "source": "/*\n Copyright 2017-2018 Phillip A. Elsasser\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n*/\n\npragma solidity ^0.4.24;\n\nimport \"./MarketContractOraclize.sol\";\nimport \"../MarketContractRegistryInterface.sol\";\nimport \"../tokens/MarketToken.sol\";\n\nimport \"openzeppelin-solidity/contracts/ownership/Ownable.sol\";\n\n\n/// @title MarketContractFactoryOraclize\n/// @author Phil Elsasser \ncontract MarketContractFactoryOraclize is Ownable {\n\n address public marketContractRegistry;\n address public MKT_TOKEN_ADDRESS;\n MarketToken public MKT_TOKEN;\n\n event MarketContractCreated(address indexed creator, address indexed contractAddress);\n\n /// @dev deploys our factory and ties it the a supply registry address\n /// @param registryAddress - address of our MARKET registry\n /// @param mktTokenAddress - MARKET Token address\n constructor(address registryAddress, address mktTokenAddress) public {\n marketContractRegistry = registryAddress;\n MKT_TOKEN_ADDRESS = mktTokenAddress;\n MKT_TOKEN = MarketToken(mktTokenAddress);\n }\n\n /// @dev Deploys a new instance of a market contract and adds it to the whitelist.\n /// @param contractName viewable name of this contract (BTC/ETH, LTC/ETH, etc)\n /// @param collateralTokenAddress address of the ERC20 token that will be used for collateral and pricing\n /// @param contractSpecs array of unsigned integers including:\n /// floorPrice minimum tradeable price of this contract, contract enters settlement if breached\n /// capPrice maximum tradeable price of this contract, contract enters settlement if breached\n /// priceDecimalPlaces number of decimal places to convert our queried price from a floating point to\n /// an integer\n /// qtyMultiplier multiply traded qty by this value from base units of collateral token.\n /// expirationTimeStamp seconds from epoch that this contract expires and enters settlement\n /// @param oracleDataSource a data-source such as \"URL\", \"WolframAlpha\", \"IPFS\"\n /// see http://docs.oraclize.it/#ethereum-quick-start-simple-query\n /// @param oracleQuery see http://docs.oraclize.it/#ethereum-quick-start-simple-query for examples\n function deployMarketContractOraclize(\n string contractName,\n address collateralTokenAddress,\n uint[5] contractSpecs,\n string oracleDataSource,\n string oracleQuery\n ) external\n {\n require(MKT_TOKEN.isBalanceSufficientForContractCreation(msg.sender)); // creator must be MKT holder\n MarketContractOraclize mktContract = new MarketContractOraclize(\n contractName,\n [\n msg.sender,\n collateralTokenAddress\n ],\n contractSpecs,\n oracleDataSource,\n oracleQuery\n );\n MarketContractRegistryInterface(marketContractRegistry).addAddressToWhiteList(mktContract);\n emit MarketContractCreated(msg.sender, mktContract);\n }\n\n /// @dev allows for the owner to set the desired registry for contract creation.\n /// @param registryAddress desired registry address.\n function setRegistryAddress(address registryAddress) external onlyOwner {\n require(registryAddress != address(0));\n marketContractRegistry = registryAddress;\n }\n}\n", + "sourcePath": "/home/travis/build/MARKETProtocol/MARKETProtocol/contracts/oraclize/MarketContractFactoryOraclize.sol", "ast": { - "absolutePath": "/home/pelsasser/MARKETProtocol/contracts/oraclize/MarketContractFactoryOraclize.sol", + "absolutePath": "/home/travis/build/MARKETProtocol/MARKETProtocol/contracts/oraclize/MarketContractFactoryOraclize.sol", "exportedSymbols": { "MarketContractFactoryOraclize": [ - 2757 + 3702 ] }, - "id": 2758, + "id": 3703, "nodeType": "SourceUnit", "nodes": [ { - "id": 2652, + "id": 3590, "literals": [ "solidity", "^", @@ -194,49 +190,49 @@ ".24" ], "nodeType": "PragmaDirective", - "src": "608:24:12" + "src": "608:24:16" }, { - "absolutePath": "/home/pelsasser/MARKETProtocol/contracts/oraclize/MarketContractOraclize.sol", + "absolutePath": "/home/travis/build/MARKETProtocol/MARKETProtocol/contracts/oraclize/MarketContractOraclize.sol", "file": "./MarketContractOraclize.sol", - "id": 2653, + "id": 3591, "nodeType": "ImportDirective", - "scope": 2758, - "sourceUnit": 2951, - "src": "634:38:12", + "scope": 3703, + "sourceUnit": 3889, + "src": "634:38:16", "symbolAliases": [], "unitAlias": "" }, { - "absolutePath": "/home/pelsasser/MARKETProtocol/contracts/MarketContractRegistryInterface.sol", + "absolutePath": "/home/travis/build/MARKETProtocol/MARKETProtocol/contracts/MarketContractRegistryInterface.sol", "file": "../MarketContractRegistryInterface.sol", - "id": 2654, + "id": 3592, "nodeType": "ImportDirective", - "scope": 2758, - "sourceUnit": 1734, - "src": "673:48:12", + "scope": 3703, + "sourceUnit": 1236, + "src": "673:48:16", "symbolAliases": [], "unitAlias": "" }, { - "absolutePath": "/home/pelsasser/MARKETProtocol/contracts/factories/MarketCollateralPoolFactoryInterface.sol", - "file": "../factories/MarketCollateralPoolFactoryInterface.sol", - "id": 2655, + "absolutePath": "/home/travis/build/MARKETProtocol/MARKETProtocol/contracts/tokens/MarketToken.sol", + "file": "../tokens/MarketToken.sol", + "id": 3593, "nodeType": "ImportDirective", - "scope": 2758, - "sourceUnit": 1871, - "src": "722:63:12", + "scope": 3703, + "sourceUnit": 5268, + "src": "722:35:16", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "openzeppelin-solidity/contracts/ownership/Ownable.sol", "file": "openzeppelin-solidity/contracts/ownership/Ownable.sol", - "id": 2656, + "id": 3594, "nodeType": "ImportDirective", - "scope": 2758, - "sourceUnit": 4629, - "src": "787:63:12", + "scope": 3703, + "sourceUnit": 7084, + "src": "759:63:16", "symbolAliases": [], "unitAlias": "" }, @@ -246,43 +242,43 @@ "arguments": null, "baseName": { "contractScope": null, - "id": 2657, + "id": 3595, "name": "Ownable", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 4628, - "src": "987:7:12", + "referencedDeclaration": 7083, + "src": "959:7:16", "typeDescriptions": { - "typeIdentifier": "t_contract$_Ownable_$4628", + "typeIdentifier": "t_contract$_Ownable_$7083", "typeString": "contract Ownable" } }, - "id": 2658, + "id": 3596, "nodeType": "InheritanceSpecifier", - "src": "987:7:12" + "src": "959:7:16" } ], "contractDependencies": [ - 2950, - 4628 + 3888, + 7083 ], "contractKind": "contract", "documentation": "@title MarketContractFactoryOraclize\n @author Phil Elsasser ", "fullyImplemented": true, - "id": 2757, + "id": 3702, "linearizedBaseContracts": [ - 2757, - 4628 + 3702, + 7083 ], "name": "MarketContractFactoryOraclize", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, - "id": 2660, + "id": 3598, "name": "marketContractRegistry", "nodeType": "VariableDeclaration", - "scope": 2757, - "src": "1002:37:12", + "scope": 3702, + "src": "974:37:16", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -290,10 +286,10 @@ "typeString": "address" }, "typeName": { - "id": 2659, + "id": 3597, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1002:7:12", + "src": "974:7:16", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -304,11 +300,11 @@ }, { "constant": false, - "id": 2662, - "name": "collateralPoolFactoryAddress", + "id": 3600, + "name": "MKT_TOKEN_ADDRESS", "nodeType": "VariableDeclaration", - "scope": 2757, - "src": "1045:43:12", + "scope": 3702, + "src": "1017:32:16", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -316,10 +312,10 @@ "typeString": "address" }, "typeName": { - "id": 2661, + "id": 3599, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1045:7:12", + "src": "1017:7:16", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -330,25 +326,27 @@ }, { "constant": false, - "id": 2664, - "name": "MKT_TOKEN_ADDRESS", + "id": 3602, + "name": "MKT_TOKEN", "nodeType": "VariableDeclaration", - "scope": 2757, - "src": "1094:32:12", + "scope": 3702, + "src": "1055:28:16", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_contract$_MarketToken_$5267", + "typeString": "contract MarketToken" }, "typeName": { - "id": 2663, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1094:7:12", + "contractScope": null, + "id": 3601, + "name": "MarketToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 5267, + "src": "1055:11:16", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_contract$_MarketToken_$5267", + "typeString": "contract MarketToken" } }, "value": null, @@ -357,21 +355,21 @@ { "anonymous": false, "documentation": null, - "id": 2670, + "id": 3608, "name": "MarketContractCreated", "nodeType": "EventDefinition", "parameters": { - "id": 2669, + "id": 3607, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2666, + "id": 3604, "indexed": true, "name": "creator", "nodeType": "VariableDeclaration", - "scope": 2670, - "src": "1161:23:12", + "scope": 3608, + "src": "1118:23:16", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -379,10 +377,10 @@ "typeString": "address" }, "typeName": { - "id": 2665, + "id": 3603, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1161:7:12", + "src": "1118:7:16", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -393,12 +391,12 @@ }, { "constant": false, - "id": 2668, + "id": 3606, "indexed": true, "name": "contractAddress", "nodeType": "VariableDeclaration", - "scope": 2670, - "src": "1186:31:12", + "scope": 3608, + "src": "1143:31:16", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -406,10 +404,10 @@ "typeString": "address" }, "typeName": { - "id": 2667, + "id": 3605, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1186:7:12", + "src": "1143:7:16", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -419,32 +417,32 @@ "visibility": "internal" } ], - "src": "1160:58:12" + "src": "1117:58:16" }, - "src": "1133:86:12" + "src": "1090:86:16" }, { "body": { - "id": 2691, + "id": 3629, "nodeType": "Block", - "src": "1619:177:12", + "src": "1444:152:16", "statements": [ { "expression": { "argumentTypes": null, - "id": 2681, + "id": 3617, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 2679, + "id": 3615, "name": "marketContractRegistry", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2660, - "src": "1629:22:12", + "referencedDeclaration": 3598, + "src": "1454:22:16", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -454,43 +452,43 @@ "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 2680, + "id": 3616, "name": "registryAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2672, - "src": "1654:15:12", + "referencedDeclaration": 3610, + "src": "1479:15:16", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "src": "1629:40:12", + "src": "1454:40:16", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "id": 2682, + "id": 3618, "nodeType": "ExpressionStatement", - "src": "1629:40:12" + "src": "1454:40:16" }, { "expression": { "argumentTypes": null, - "id": 2685, + "id": 3621, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 2683, + "id": 3619, "name": "MKT_TOKEN_ADDRESS", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2664, - "src": "1679:17:12", + "referencedDeclaration": 3600, + "src": "1504:17:16", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -500,77 +498,113 @@ "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 2684, + "id": 3620, "name": "mktTokenAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2674, - "src": "1699:15:12", + "referencedDeclaration": 3612, + "src": "1524:15:16", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "src": "1679:35:12", + "src": "1504:35:16", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "id": 2686, + "id": 3622, "nodeType": "ExpressionStatement", - "src": "1679:35:12" + "src": "1504:35:16" }, { "expression": { "argumentTypes": null, - "id": 2689, + "id": 3627, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 2687, - "name": "collateralPoolFactoryAddress", + "id": 3623, + "name": "MKT_TOKEN", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2662, - "src": "1724:28:12", + "referencedDeclaration": 3602, + "src": "1549:9:16", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_contract$_MarketToken_$5267", + "typeString": "contract MarketToken" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 2688, - "name": "marketCollateralPoolFactoryAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2676, - "src": "1755:34:12", + "arguments": [ + { + "argumentTypes": null, + "id": 3625, + "name": "mktTokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3612, + "src": "1573:15:16", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3624, + "name": "MarketToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5267, + "src": "1561:11:16", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_MarketToken_$5267_$", + "typeString": "type(contract MarketToken)" + } + }, + "id": 3626, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1561:28:16", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_contract$_MarketToken_$5267", + "typeString": "contract MarketToken" } }, - "src": "1724:65:12", + "src": "1549:40:16", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_contract$_MarketToken_$5267", + "typeString": "contract MarketToken" } }, - "id": 2690, + "id": 3628, "nodeType": "ExpressionStatement", - "src": "1724:65:12" + "src": "1549:40:16" } ] }, - "documentation": "@dev deploys our factory and ties it the a supply registry address\n @param registryAddress - address of our MARKET registry\n @param mktTokenAddress - MARKET Token address\n @param marketCollateralPoolFactoryAddress - address of collateral pool factory.", - "id": 2692, + "documentation": "@dev deploys our factory and ties it the a supply registry address\n @param registryAddress - address of our MARKET registry\n @param mktTokenAddress - MARKET Token address", + "id": 3630, "implemented": true, "isConstructor": true, "isDeclaredConst": false, @@ -578,16 +612,16 @@ "name": "", "nodeType": "FunctionDefinition", "parameters": { - "id": 2677, + "id": 3613, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2672, + "id": 3610, "name": "registryAddress", "nodeType": "VariableDeclaration", - "scope": 2692, - "src": "1518:23:12", + "scope": 3630, + "src": "1387:23:16", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -595,10 +629,10 @@ "typeString": "address" }, "typeName": { - "id": 2671, + "id": 3609, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1518:7:12", + "src": "1387:7:16", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -609,11 +643,11 @@ }, { "constant": false, - "id": 2674, + "id": 3612, "name": "mktTokenAddress", "nodeType": "VariableDeclaration", - "scope": 2692, - "src": "1543:23:12", + "scope": 3630, + "src": "1412:23:16", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -621,36 +655,10 @@ "typeString": "address" }, "typeName": { - "id": 2673, + "id": 3611, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1543:7:12", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2676, - "name": "marketCollateralPoolFactoryAddress", - "nodeType": "VariableDeclaration", - "scope": 2692, - "src": "1568:42:12", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2675, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1568:7:12", + "src": "1412:7:16", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -660,54 +668,179 @@ "visibility": "internal" } ], - "src": "1517:94:12" + "src": "1386:50:16" }, "payable": false, "returnParameters": { - "id": 2678, + "id": 3614, "nodeType": "ParameterList", "parameters": [], - "src": "1619:0:12" + "src": "1444:0:16" }, - "scope": 2757, - "src": "1506:290:12", + "scope": 3702, + "src": "1375:221:16", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { - "id": 2735, + "id": 3680, "nodeType": "Block", - "src": "3139:492:12", + "src": "3032:567:16", "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3648, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8183, + "src": "3099:3:16", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3649, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3099:10:16", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 3646, + "name": "MKT_TOKEN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3602, + "src": "3050:9:16", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketToken_$5267", + "typeString": "contract MarketToken" + } + }, + "id": 3647, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isBalanceSufficientForContractCreation", + "nodeType": "MemberAccess", + "referencedDeclaration": 5108, + "src": "3050:48:16", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view external returns (bool)" + } + }, + "id": 3650, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3050:60:16", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 3645, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 8186, + 8187 + ], + "referencedDeclaration": 8186, + "src": "3042:7:16", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 3651, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3042:69:16", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3652, + "nodeType": "ExpressionStatement", + "src": "3042:69:16" + }, { "assignments": [ - 2708 + 3654 ], "declarations": [ { "constant": false, - "id": 2708, + "id": 3654, "name": "mktContract", "nodeType": "VariableDeclaration", - "scope": 2736, - "src": "3149:34:12", + "scope": 3681, + "src": "3154:34:16", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_contract$_MarketContractOraclize_$2950", + "typeIdentifier": "t_contract$_MarketContractOraclize_$3888", "typeString": "contract MarketContractOraclize" }, "typeName": { "contractScope": null, - "id": 2707, + "id": 3653, "name": "MarketContractOraclize", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2950, - "src": "3149:22:12", + "referencedDeclaration": 3888, + "src": "3154:22:16", "typeDescriptions": { - "typeIdentifier": "t_contract$_MarketContractOraclize_$2950", + "typeIdentifier": "t_contract$_MarketContractOraclize_$3888", "typeString": "contract MarketContractOraclize" } }, @@ -715,18 +848,18 @@ "visibility": "internal" } ], - "id": 2721, + "id": 3666, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, - "id": 2711, + "id": 3657, "name": "contractName", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2694, - "src": "3226:12:12", + "referencedDeclaration": 3632, + "src": "3231:12:16", "typeDescriptions": { "typeIdentifier": "t_string_calldata_ptr", "typeString": "string calldata" @@ -734,80 +867,71 @@ }, { "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2712, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5193, - "src": "3252:3:12", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" + "components": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3658, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8183, + "src": "3275:3:16", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3659, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3275:10:16", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3660, + "name": "collateralTokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3634, + "src": "3303:22:16", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } } - }, - "id": 2713, + ], + "id": 3661, "isConstant": false, + "isInlineArray": true, "isLValue": false, "isPure": false, "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3252:10:12", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 2714, - "name": "MKT_TOKEN_ADDRESS", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2664, - "src": "3276:17:12", + "nodeType": "TupleExpression", + "src": "3257:82:16", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_array$_t_address_$2_memory_ptr", + "typeString": "address[2] memory" } }, { "argumentTypes": null, - "id": 2715, - "name": "collateralTokenAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2696, - "src": "3307:22:12", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 2716, - "name": "collateralPoolFactoryAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2662, - "src": "3343:28:12", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 2717, + "id": 3662, "name": "contractSpecs", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2700, - "src": "3385:13:12", + "referencedDeclaration": 3638, + "src": "3353:13:16", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$5_calldata_ptr", "typeString": "uint256[5] calldata" @@ -815,12 +939,12 @@ }, { "argumentTypes": null, - "id": 2718, + "id": 3663, "name": "oracleDataSource", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2702, - "src": "3412:16:12", + "referencedDeclaration": 3640, + "src": "3380:16:16", "typeDescriptions": { "typeIdentifier": "t_string_calldata_ptr", "typeString": "string calldata" @@ -828,12 +952,12 @@ }, { "argumentTypes": null, - "id": 2719, + "id": 3664, "name": "oracleQuery", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2704, - "src": "3442:11:12", + "referencedDeclaration": 3642, + "src": "3410:11:16", "typeDescriptions": { "typeIdentifier": "t_string_calldata_ptr", "typeString": "string calldata" @@ -847,20 +971,8 @@ "typeString": "string calldata" }, { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_array$_t_address_$2_memory_ptr", + "typeString": "address[2] memory" }, { "typeIdentifier": "t_array$_t_uint256_$5_calldata_ptr", @@ -875,31 +987,31 @@ "typeString": "string calldata" } ], - "id": 2710, + "id": 3656, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "NewExpression", - "src": "3186:26:12", + "src": "3191:26:16", "typeDescriptions": { - "typeIdentifier": "t_function_creation_nonpayable$_t_string_memory_ptr_$_t_address_$_t_address_$_t_address_$_t_address_$_t_array$_t_uint256_$5_memory_ptr_$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$_t_contract$_MarketContractOraclize_$2950_$", - "typeString": "function (string memory,address,address,address,address,uint256[5] memory,string memory,string memory) returns (contract MarketContractOraclize)" + "typeIdentifier": "t_function_creation_nonpayable$_t_string_memory_ptr_$_t_array$_t_address_$2_memory_ptr_$_t_array$_t_uint256_$5_memory_ptr_$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$_t_contract$_MarketContractOraclize_$3888_$", + "typeString": "function (string memory,address[2] memory,uint256[5] memory,string memory,string memory) returns (contract MarketContractOraclize)" }, "typeName": { "contractScope": null, - "id": 2709, + "id": 3655, "name": "MarketContractOraclize", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2950, - "src": "3190:22:12", + "referencedDeclaration": 3888, + "src": "3195:22:16", "typeDescriptions": { - "typeIdentifier": "t_contract$_MarketContractOraclize_$2950", + "typeIdentifier": "t_contract$_MarketContractOraclize_$3888", "typeString": "contract MarketContractOraclize" } } }, - "id": 2720, + "id": 3665, "isConstant": false, "isLValue": false, "isPure": false, @@ -907,14 +1019,14 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3186:277:12", + "src": "3191:240:16", "typeDescriptions": { - "typeIdentifier": "t_contract$_MarketContractOraclize_$2950", + "typeIdentifier": "t_contract$_MarketContractOraclize_$3888", "typeString": "contract MarketContractOraclize" } }, "nodeType": "VariableDeclarationStatement", - "src": "3149:314:12" + "src": "3154:277:16" }, { "expression": { @@ -922,14 +1034,14 @@ "arguments": [ { "argumentTypes": null, - "id": 2726, + "id": 3671, "name": "mktContract", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2708, - "src": "3551:11:12", + "referencedDeclaration": 3654, + "src": "3519:11:16", "typeDescriptions": { - "typeIdentifier": "t_contract$_MarketContractOraclize_$2950", + "typeIdentifier": "t_contract$_MarketContractOraclize_$3888", "typeString": "contract MarketContractOraclize" } } @@ -937,7 +1049,7 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_contract$_MarketContractOraclize_$2950", + "typeIdentifier": "t_contract$_MarketContractOraclize_$3888", "typeString": "contract MarketContractOraclize" } ], @@ -946,12 +1058,12 @@ "arguments": [ { "argumentTypes": null, - "id": 2723, + "id": 3668, "name": "marketContractRegistry", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2660, - "src": "3505:22:12", + "referencedDeclaration": 3598, + "src": "3473:22:16", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -965,18 +1077,18 @@ "typeString": "address" } ], - "id": 2722, + "id": 3667, "name": "MarketContractRegistryInterface", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1733, - "src": "3473:31:12", + "referencedDeclaration": 1235, + "src": "3441:31:16", "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_MarketContractRegistryInterface_$1733_$", + "typeIdentifier": "t_type$_t_contract$_MarketContractRegistryInterface_$1235_$", "typeString": "type(contract MarketContractRegistryInterface)" } }, - "id": 2724, + "id": 3669, "isConstant": false, "isLValue": false, "isPure": false, @@ -984,27 +1096,27 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3473:55:12", + "src": "3441:55:16", "typeDescriptions": { - "typeIdentifier": "t_contract$_MarketContractRegistryInterface_$1733", + "typeIdentifier": "t_contract$_MarketContractRegistryInterface_$1235", "typeString": "contract MarketContractRegistryInterface" } }, - "id": 2725, + "id": 3670, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "addAddressToWhiteList", "nodeType": "MemberAccess", - "referencedDeclaration": 1725, - "src": "3473:77:12", + "referencedDeclaration": 1227, + "src": "3441:77:16", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", "typeString": "function (address) external" } }, - "id": 2727, + "id": 3672, "isConstant": false, "isLValue": false, "isPure": false, @@ -1012,15 +1124,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3473:90:12", + "src": "3441:90:16", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 2728, + "id": 3673, "nodeType": "ExpressionStatement", - "src": "3473:90:12" + "src": "3441:90:16" }, { "eventCall": { @@ -1030,18 +1142,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 2730, + "id": 3675, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 5193, - "src": "3600:3:12", + "referencedDeclaration": 8183, + "src": "3568:3:16", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 2731, + "id": 3676, "isConstant": false, "isLValue": false, "isPure": false, @@ -1049,7 +1161,7 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "3600:10:12", + "src": "3568:10:16", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -1057,14 +1169,14 @@ }, { "argumentTypes": null, - "id": 2732, + "id": 3677, "name": "mktContract", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2708, - "src": "3612:11:12", + "referencedDeclaration": 3654, + "src": "3580:11:16", "typeDescriptions": { - "typeIdentifier": "t_contract$_MarketContractOraclize_$2950", + "typeIdentifier": "t_contract$_MarketContractOraclize_$3888", "typeString": "contract MarketContractOraclize" } } @@ -1076,22 +1188,22 @@ "typeString": "address" }, { - "typeIdentifier": "t_contract$_MarketContractOraclize_$2950", + "typeIdentifier": "t_contract$_MarketContractOraclize_$3888", "typeString": "contract MarketContractOraclize" } ], - "id": 2729, + "id": 3674, "name": "MarketContractCreated", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2670, - "src": "3578:21:12", + "referencedDeclaration": 3608, + "src": "3546:21:16", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", "typeString": "function (address,address)" } }, - "id": 2733, + "id": 3678, "isConstant": false, "isLValue": false, "isPure": false, @@ -1099,20 +1211,20 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3578:46:12", + "src": "3546:46:16", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 2734, + "id": 3679, "nodeType": "EmitStatement", - "src": "3573:51:12" + "src": "3541:51:16" } ] }, - "documentation": "@dev Deploys a new instance of a market contract and adds it to the whitelist.\n @param contractName viewable name of this contract (BTC/ETH, LTC/ETH, etc)\n @param collateralTokenAddress address of the ERC20 token that will be used for collateral and pricing\n @param contractSpecs array of unsigned integers including:\n floorPrice minimum tradeable price of this contract, contract enters settlement if breached\n capPrice maximum tradeable price of this contract, contract enters settlement if breached\n priceDecimalPlaces number of decimal places to convert our queried price from a floating point to\n an integer\n qtyMultiplier multiply traded qty by this value from base units of collateral token.\n expirationTimeStamp - seconds from epoch that this contract expires and enters settlement\n @param oracleDataSource a data-source such as \"URL\", \"WolframAlpha\", \"IPFS\"\n see http://docs.oraclize.it/#ethereum-quick-start-simple-query\n @param oracleQuery see http://docs.oraclize.it/#ethereum-quick-start-simple-query for examples", - "id": 2736, + "documentation": "@dev Deploys a new instance of a market contract and adds it to the whitelist.\n @param contractName viewable name of this contract (BTC/ETH, LTC/ETH, etc)\n @param collateralTokenAddress address of the ERC20 token that will be used for collateral and pricing\n @param contractSpecs array of unsigned integers including:\n floorPrice minimum tradeable price of this contract, contract enters settlement if breached\n capPrice maximum tradeable price of this contract, contract enters settlement if breached\n priceDecimalPlaces number of decimal places to convert our queried price from a floating point to\n an integer\n qtyMultiplier multiply traded qty by this value from base units of collateral token.\n expirationTimeStamp seconds from epoch that this contract expires and enters settlement\n @param oracleDataSource a data-source such as \"URL\", \"WolframAlpha\", \"IPFS\"\n see http://docs.oraclize.it/#ethereum-quick-start-simple-query\n @param oracleQuery see http://docs.oraclize.it/#ethereum-quick-start-simple-query for examples", + "id": 3681, "implemented": true, "isConstructor": false, "isDeclaredConst": false, @@ -1120,16 +1232,16 @@ "name": "deployMarketContractOraclize", "nodeType": "FunctionDefinition", "parameters": { - "id": 2705, + "id": 3643, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2694, + "id": 3632, "name": "contractName", "nodeType": "VariableDeclaration", - "scope": 2736, - "src": "2968:19:12", + "scope": 3681, + "src": "2861:19:16", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1137,10 +1249,10 @@ "typeString": "string" }, "typeName": { - "id": 2693, + "id": 3631, "name": "string", "nodeType": "ElementaryTypeName", - "src": "2968:6:12", + "src": "2861:6:16", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" @@ -1151,11 +1263,11 @@ }, { "constant": false, - "id": 2696, + "id": 3634, "name": "collateralTokenAddress", "nodeType": "VariableDeclaration", - "scope": 2736, - "src": "2997:30:12", + "scope": 3681, + "src": "2890:30:16", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1163,10 +1275,10 @@ "typeString": "address" }, "typeName": { - "id": 2695, + "id": 3633, "name": "address", "nodeType": "ElementaryTypeName", - "src": "2997:7:12", + "src": "2890:7:16", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -1177,11 +1289,11 @@ }, { "constant": false, - "id": 2700, + "id": 3638, "name": "contractSpecs", "nodeType": "VariableDeclaration", - "scope": 2736, - "src": "3037:21:12", + "scope": 3681, + "src": "2930:21:16", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1190,27 +1302,27 @@ }, "typeName": { "baseType": { - "id": 2697, + "id": 3635, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "3037:4:12", + "src": "2930:4:16", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 2699, + "id": 3637, "length": { "argumentTypes": null, "hexValue": "35", - "id": 2698, + "id": 3636, "isConstant": false, "isLValue": false, "isPure": false, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "3042:1:12", + "src": "2935:1:16", "subdenomination": null, "typeDescriptions": { "typeIdentifier": null, @@ -1219,7 +1331,7 @@ "value": "5" }, "nodeType": "ArrayTypeName", - "src": "3037:7:12", + "src": "2930:7:16", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$5_storage_ptr", "typeString": "uint256[5]" @@ -1230,11 +1342,11 @@ }, { "constant": false, - "id": 2702, + "id": 3640, "name": "oracleDataSource", "nodeType": "VariableDeclaration", - "scope": 2736, - "src": "3068:23:12", + "scope": 3681, + "src": "2961:23:16", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1242,10 +1354,10 @@ "typeString": "string" }, "typeName": { - "id": 2701, + "id": 3639, "name": "string", "nodeType": "ElementaryTypeName", - "src": "3068:6:12", + "src": "2961:6:16", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" @@ -1256,11 +1368,11 @@ }, { "constant": false, - "id": 2704, + "id": 3642, "name": "oracleQuery", "nodeType": "VariableDeclaration", - "scope": 2736, - "src": "3101:18:12", + "scope": 3681, + "src": "2994:18:16", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1268,10 +1380,10 @@ "typeString": "string" }, "typeName": { - "id": 2703, + "id": 3641, "name": "string", "nodeType": "ElementaryTypeName", - "src": "3101:6:12", + "src": "2994:6:16", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" @@ -1281,26 +1393,26 @@ "visibility": "internal" } ], - "src": "2958:167:12" + "src": "2851:167:16" }, "payable": false, "returnParameters": { - "id": 2706, + "id": 3644, "nodeType": "ParameterList", "parameters": [], - "src": "3139:0:12" + "src": "3032:0:16" }, - "scope": 2757, - "src": "2921:710:12", + "scope": 3702, + "src": "2814:785:16", "stateMutability": "nonpayable", "superFunction": null, "visibility": "external" }, { "body": { - "id": 2755, + "id": 3700, "nodeType": "Block", - "src": "3851:105:12", + "src": "3819:105:16", "statements": [ { "expression": { @@ -1312,19 +1424,19 @@ "typeIdentifier": "t_address", "typeString": "address" }, - "id": 2748, + "id": 3693, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 2744, + "id": 3689, "name": "registryAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2738, - "src": "3869:15:12", + "referencedDeclaration": 3683, + "src": "3837:15:16", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -1338,14 +1450,14 @@ { "argumentTypes": null, "hexValue": "30", - "id": 2746, + "id": 3691, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "3896:1:12", + "src": "3864:1:16", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -1361,20 +1473,20 @@ "typeString": "int_const 0" } ], - "id": 2745, + "id": 3690, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "3888:7:12", + "src": "3856:7:16", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": "address" }, - "id": 2747, + "id": 3692, "isConstant": false, "isLValue": false, "isPure": true, @@ -1382,13 +1494,13 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3888:10:12", + "src": "3856:10:16", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "src": "3869:29:12", + "src": "3837:29:16", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -1402,21 +1514,21 @@ "typeString": "bool" } ], - "id": 2743, + "id": 3688, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 5196, - 5197 + 8186, + 8187 ], - "referencedDeclaration": 5196, - "src": "3861:7:12", + "referencedDeclaration": 8186, + "src": "3829:7:16", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, - "id": 2749, + "id": 3694, "isConstant": false, "isLValue": false, "isPure": false, @@ -1424,32 +1536,32 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3861:38:12", + "src": "3829:38:16", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 2750, + "id": 3695, "nodeType": "ExpressionStatement", - "src": "3861:38:12" + "src": "3829:38:16" }, { "expression": { "argumentTypes": null, - "id": 2753, + "id": 3698, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 2751, + "id": 3696, "name": "marketContractRegistry", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2660, - "src": "3909:22:12", + "referencedDeclaration": 3598, + "src": "3877:22:16", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -1459,68 +1571,68 @@ "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 2752, + "id": 3697, "name": "registryAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2738, - "src": "3934:15:12", + "referencedDeclaration": 3683, + "src": "3902:15:16", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "src": "3909:40:12", + "src": "3877:40:16", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "id": 2754, + "id": 3699, "nodeType": "ExpressionStatement", - "src": "3909:40:12" + "src": "3877:40:16" } ] }, "documentation": "@dev allows for the owner to set the desired registry for contract creation.\n @param registryAddress desired registry address.", - "id": 2756, + "id": 3701, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [ { "arguments": null, - "id": 2741, + "id": 3686, "modifierName": { "argumentTypes": null, - "id": 2740, + "id": 3685, "name": "onlyOwner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4602, - "src": "3841:9:12", + "referencedDeclaration": 7057, + "src": "3809:9:16", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", - "src": "3841:9:12" + "src": "3809:9:16" } ], "name": "setRegistryAddress", "nodeType": "FunctionDefinition", "parameters": { - "id": 2739, + "id": 3684, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2738, + "id": 3683, "name": "registryAddress", "nodeType": "VariableDeclaration", - "scope": 2756, - "src": "3807:23:12", + "scope": 3701, + "src": "3775:23:16", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1528,10 +1640,10 @@ "typeString": "address" }, "typeName": { - "id": 2737, + "id": 3682, "name": "address", "nodeType": "ElementaryTypeName", - "src": "3807:7:12", + "src": "3775:7:16", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -1541,40 +1653,40 @@ "visibility": "internal" } ], - "src": "3806:25:12" + "src": "3774:25:16" }, "payable": false, "returnParameters": { - "id": 2742, + "id": 3687, "nodeType": "ParameterList", "parameters": [], - "src": "3851:0:12" + "src": "3819:0:16" }, - "scope": 2757, - "src": "3779:177:12", + "scope": 3702, + "src": "3747:177:16", "stateMutability": "nonpayable", "superFunction": null, "visibility": "external" } ], - "scope": 2758, - "src": "945:3464:12" + "scope": 3703, + "src": "917:3009:16" } ], - "src": "608:3802:12" + "src": "608:3319:16" }, "legacyAST": { - "absolutePath": "/home/pelsasser/MARKETProtocol/contracts/oraclize/MarketContractFactoryOraclize.sol", + "absolutePath": "/home/travis/build/MARKETProtocol/MARKETProtocol/contracts/oraclize/MarketContractFactoryOraclize.sol", "exportedSymbols": { "MarketContractFactoryOraclize": [ - 2757 + 3702 ] }, - "id": 2758, + "id": 3703, "nodeType": "SourceUnit", "nodes": [ { - "id": 2652, + "id": 3590, "literals": [ "solidity", "^", @@ -1582,49 +1694,49 @@ ".24" ], "nodeType": "PragmaDirective", - "src": "608:24:12" + "src": "608:24:16" }, { - "absolutePath": "/home/pelsasser/MARKETProtocol/contracts/oraclize/MarketContractOraclize.sol", + "absolutePath": "/home/travis/build/MARKETProtocol/MARKETProtocol/contracts/oraclize/MarketContractOraclize.sol", "file": "./MarketContractOraclize.sol", - "id": 2653, + "id": 3591, "nodeType": "ImportDirective", - "scope": 2758, - "sourceUnit": 2951, - "src": "634:38:12", + "scope": 3703, + "sourceUnit": 3889, + "src": "634:38:16", "symbolAliases": [], "unitAlias": "" }, { - "absolutePath": "/home/pelsasser/MARKETProtocol/contracts/MarketContractRegistryInterface.sol", + "absolutePath": "/home/travis/build/MARKETProtocol/MARKETProtocol/contracts/MarketContractRegistryInterface.sol", "file": "../MarketContractRegistryInterface.sol", - "id": 2654, + "id": 3592, "nodeType": "ImportDirective", - "scope": 2758, - "sourceUnit": 1734, - "src": "673:48:12", + "scope": 3703, + "sourceUnit": 1236, + "src": "673:48:16", "symbolAliases": [], "unitAlias": "" }, { - "absolutePath": "/home/pelsasser/MARKETProtocol/contracts/factories/MarketCollateralPoolFactoryInterface.sol", - "file": "../factories/MarketCollateralPoolFactoryInterface.sol", - "id": 2655, + "absolutePath": "/home/travis/build/MARKETProtocol/MARKETProtocol/contracts/tokens/MarketToken.sol", + "file": "../tokens/MarketToken.sol", + "id": 3593, "nodeType": "ImportDirective", - "scope": 2758, - "sourceUnit": 1871, - "src": "722:63:12", + "scope": 3703, + "sourceUnit": 5268, + "src": "722:35:16", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "openzeppelin-solidity/contracts/ownership/Ownable.sol", "file": "openzeppelin-solidity/contracts/ownership/Ownable.sol", - "id": 2656, + "id": 3594, "nodeType": "ImportDirective", - "scope": 2758, - "sourceUnit": 4629, - "src": "787:63:12", + "scope": 3703, + "sourceUnit": 7084, + "src": "759:63:16", "symbolAliases": [], "unitAlias": "" }, @@ -1634,43 +1746,43 @@ "arguments": null, "baseName": { "contractScope": null, - "id": 2657, + "id": 3595, "name": "Ownable", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 4628, - "src": "987:7:12", + "referencedDeclaration": 7083, + "src": "959:7:16", "typeDescriptions": { - "typeIdentifier": "t_contract$_Ownable_$4628", + "typeIdentifier": "t_contract$_Ownable_$7083", "typeString": "contract Ownable" } }, - "id": 2658, + "id": 3596, "nodeType": "InheritanceSpecifier", - "src": "987:7:12" + "src": "959:7:16" } ], "contractDependencies": [ - 2950, - 4628 + 3888, + 7083 ], "contractKind": "contract", "documentation": "@title MarketContractFactoryOraclize\n @author Phil Elsasser ", "fullyImplemented": true, - "id": 2757, + "id": 3702, "linearizedBaseContracts": [ - 2757, - 4628 + 3702, + 7083 ], "name": "MarketContractFactoryOraclize", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, - "id": 2660, + "id": 3598, "name": "marketContractRegistry", "nodeType": "VariableDeclaration", - "scope": 2757, - "src": "1002:37:12", + "scope": 3702, + "src": "974:37:16", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -1678,10 +1790,10 @@ "typeString": "address" }, "typeName": { - "id": 2659, + "id": 3597, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1002:7:12", + "src": "974:7:16", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -1692,11 +1804,11 @@ }, { "constant": false, - "id": 2662, - "name": "collateralPoolFactoryAddress", + "id": 3600, + "name": "MKT_TOKEN_ADDRESS", "nodeType": "VariableDeclaration", - "scope": 2757, - "src": "1045:43:12", + "scope": 3702, + "src": "1017:32:16", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -1704,10 +1816,10 @@ "typeString": "address" }, "typeName": { - "id": 2661, + "id": 3599, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1045:7:12", + "src": "1017:7:16", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -1718,25 +1830,27 @@ }, { "constant": false, - "id": 2664, - "name": "MKT_TOKEN_ADDRESS", + "id": 3602, + "name": "MKT_TOKEN", "nodeType": "VariableDeclaration", - "scope": 2757, - "src": "1094:32:12", + "scope": 3702, + "src": "1055:28:16", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_contract$_MarketToken_$5267", + "typeString": "contract MarketToken" }, "typeName": { - "id": 2663, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1094:7:12", + "contractScope": null, + "id": 3601, + "name": "MarketToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 5267, + "src": "1055:11:16", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_contract$_MarketToken_$5267", + "typeString": "contract MarketToken" } }, "value": null, @@ -1745,21 +1859,21 @@ { "anonymous": false, "documentation": null, - "id": 2670, + "id": 3608, "name": "MarketContractCreated", "nodeType": "EventDefinition", "parameters": { - "id": 2669, + "id": 3607, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2666, + "id": 3604, "indexed": true, "name": "creator", "nodeType": "VariableDeclaration", - "scope": 2670, - "src": "1161:23:12", + "scope": 3608, + "src": "1118:23:16", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1767,10 +1881,10 @@ "typeString": "address" }, "typeName": { - "id": 2665, + "id": 3603, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1161:7:12", + "src": "1118:7:16", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -1781,12 +1895,12 @@ }, { "constant": false, - "id": 2668, + "id": 3606, "indexed": true, "name": "contractAddress", "nodeType": "VariableDeclaration", - "scope": 2670, - "src": "1186:31:12", + "scope": 3608, + "src": "1143:31:16", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1794,10 +1908,10 @@ "typeString": "address" }, "typeName": { - "id": 2667, + "id": 3605, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1186:7:12", + "src": "1143:7:16", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -1807,32 +1921,32 @@ "visibility": "internal" } ], - "src": "1160:58:12" + "src": "1117:58:16" }, - "src": "1133:86:12" + "src": "1090:86:16" }, { "body": { - "id": 2691, + "id": 3629, "nodeType": "Block", - "src": "1619:177:12", + "src": "1444:152:16", "statements": [ { "expression": { "argumentTypes": null, - "id": 2681, + "id": 3617, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 2679, + "id": 3615, "name": "marketContractRegistry", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2660, - "src": "1629:22:12", + "referencedDeclaration": 3598, + "src": "1454:22:16", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -1842,43 +1956,43 @@ "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 2680, + "id": 3616, "name": "registryAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2672, - "src": "1654:15:12", + "referencedDeclaration": 3610, + "src": "1479:15:16", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "src": "1629:40:12", + "src": "1454:40:16", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "id": 2682, + "id": 3618, "nodeType": "ExpressionStatement", - "src": "1629:40:12" + "src": "1454:40:16" }, { "expression": { "argumentTypes": null, - "id": 2685, + "id": 3621, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 2683, + "id": 3619, "name": "MKT_TOKEN_ADDRESS", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2664, - "src": "1679:17:12", + "referencedDeclaration": 3600, + "src": "1504:17:16", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -1888,77 +2002,113 @@ "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 2684, + "id": 3620, "name": "mktTokenAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2674, - "src": "1699:15:12", + "referencedDeclaration": 3612, + "src": "1524:15:16", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "src": "1679:35:12", + "src": "1504:35:16", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "id": 2686, + "id": 3622, "nodeType": "ExpressionStatement", - "src": "1679:35:12" + "src": "1504:35:16" }, { "expression": { "argumentTypes": null, - "id": 2689, + "id": 3627, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 2687, - "name": "collateralPoolFactoryAddress", + "id": 3623, + "name": "MKT_TOKEN", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2662, - "src": "1724:28:12", + "referencedDeclaration": 3602, + "src": "1549:9:16", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_contract$_MarketToken_$5267", + "typeString": "contract MarketToken" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 2688, - "name": "marketCollateralPoolFactoryAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2676, - "src": "1755:34:12", + "arguments": [ + { + "argumentTypes": null, + "id": 3625, + "name": "mktTokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3612, + "src": "1573:15:16", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3624, + "name": "MarketToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5267, + "src": "1561:11:16", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_MarketToken_$5267_$", + "typeString": "type(contract MarketToken)" + } + }, + "id": 3626, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1561:28:16", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_contract$_MarketToken_$5267", + "typeString": "contract MarketToken" } }, - "src": "1724:65:12", + "src": "1549:40:16", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_contract$_MarketToken_$5267", + "typeString": "contract MarketToken" } }, - "id": 2690, + "id": 3628, "nodeType": "ExpressionStatement", - "src": "1724:65:12" + "src": "1549:40:16" } ] }, - "documentation": "@dev deploys our factory and ties it the a supply registry address\n @param registryAddress - address of our MARKET registry\n @param mktTokenAddress - MARKET Token address\n @param marketCollateralPoolFactoryAddress - address of collateral pool factory.", - "id": 2692, + "documentation": "@dev deploys our factory and ties it the a supply registry address\n @param registryAddress - address of our MARKET registry\n @param mktTokenAddress - MARKET Token address", + "id": 3630, "implemented": true, "isConstructor": true, "isDeclaredConst": false, @@ -1966,16 +2116,16 @@ "name": "", "nodeType": "FunctionDefinition", "parameters": { - "id": 2677, + "id": 3613, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2672, + "id": 3610, "name": "registryAddress", "nodeType": "VariableDeclaration", - "scope": 2692, - "src": "1518:23:12", + "scope": 3630, + "src": "1387:23:16", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1983,10 +2133,10 @@ "typeString": "address" }, "typeName": { - "id": 2671, + "id": 3609, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1518:7:12", + "src": "1387:7:16", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -1997,11 +2147,11 @@ }, { "constant": false, - "id": 2674, + "id": 3612, "name": "mktTokenAddress", "nodeType": "VariableDeclaration", - "scope": 2692, - "src": "1543:23:12", + "scope": 3630, + "src": "1412:23:16", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2009,36 +2159,10 @@ "typeString": "address" }, "typeName": { - "id": 2673, + "id": 3611, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1543:7:12", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2676, - "name": "marketCollateralPoolFactoryAddress", - "nodeType": "VariableDeclaration", - "scope": 2692, - "src": "1568:42:12", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2675, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1568:7:12", + "src": "1412:7:16", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -2048,54 +2172,179 @@ "visibility": "internal" } ], - "src": "1517:94:12" + "src": "1386:50:16" }, "payable": false, "returnParameters": { - "id": 2678, + "id": 3614, "nodeType": "ParameterList", "parameters": [], - "src": "1619:0:12" + "src": "1444:0:16" }, - "scope": 2757, - "src": "1506:290:12", + "scope": 3702, + "src": "1375:221:16", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { - "id": 2735, + "id": 3680, "nodeType": "Block", - "src": "3139:492:12", + "src": "3032:567:16", "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3648, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8183, + "src": "3099:3:16", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3649, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3099:10:16", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 3646, + "name": "MKT_TOKEN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3602, + "src": "3050:9:16", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketToken_$5267", + "typeString": "contract MarketToken" + } + }, + "id": 3647, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isBalanceSufficientForContractCreation", + "nodeType": "MemberAccess", + "referencedDeclaration": 5108, + "src": "3050:48:16", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view external returns (bool)" + } + }, + "id": 3650, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3050:60:16", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 3645, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 8186, + 8187 + ], + "referencedDeclaration": 8186, + "src": "3042:7:16", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 3651, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3042:69:16", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3652, + "nodeType": "ExpressionStatement", + "src": "3042:69:16" + }, { "assignments": [ - 2708 + 3654 ], "declarations": [ { "constant": false, - "id": 2708, + "id": 3654, "name": "mktContract", "nodeType": "VariableDeclaration", - "scope": 2736, - "src": "3149:34:12", + "scope": 3681, + "src": "3154:34:16", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_contract$_MarketContractOraclize_$2950", + "typeIdentifier": "t_contract$_MarketContractOraclize_$3888", "typeString": "contract MarketContractOraclize" }, "typeName": { "contractScope": null, - "id": 2707, + "id": 3653, "name": "MarketContractOraclize", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2950, - "src": "3149:22:12", + "referencedDeclaration": 3888, + "src": "3154:22:16", "typeDescriptions": { - "typeIdentifier": "t_contract$_MarketContractOraclize_$2950", + "typeIdentifier": "t_contract$_MarketContractOraclize_$3888", "typeString": "contract MarketContractOraclize" } }, @@ -2103,18 +2352,18 @@ "visibility": "internal" } ], - "id": 2721, + "id": 3666, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, - "id": 2711, + "id": 3657, "name": "contractName", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2694, - "src": "3226:12:12", + "referencedDeclaration": 3632, + "src": "3231:12:16", "typeDescriptions": { "typeIdentifier": "t_string_calldata_ptr", "typeString": "string calldata" @@ -2122,80 +2371,71 @@ }, { "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2712, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5193, - "src": "3252:3:12", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" + "components": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3658, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8183, + "src": "3275:3:16", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3659, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3275:10:16", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3660, + "name": "collateralTokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3634, + "src": "3303:22:16", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } } - }, - "id": 2713, + ], + "id": 3661, "isConstant": false, + "isInlineArray": true, "isLValue": false, "isPure": false, "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3252:10:12", + "nodeType": "TupleExpression", + "src": "3257:82:16", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 2714, - "name": "MKT_TOKEN_ADDRESS", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2664, - "src": "3276:17:12", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_array$_t_address_$2_memory_ptr", + "typeString": "address[2] memory" } }, { "argumentTypes": null, - "id": 2715, - "name": "collateralTokenAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2696, - "src": "3307:22:12", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 2716, - "name": "collateralPoolFactoryAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2662, - "src": "3343:28:12", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 2717, + "id": 3662, "name": "contractSpecs", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2700, - "src": "3385:13:12", + "referencedDeclaration": 3638, + "src": "3353:13:16", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$5_calldata_ptr", "typeString": "uint256[5] calldata" @@ -2203,12 +2443,12 @@ }, { "argumentTypes": null, - "id": 2718, + "id": 3663, "name": "oracleDataSource", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2702, - "src": "3412:16:12", + "referencedDeclaration": 3640, + "src": "3380:16:16", "typeDescriptions": { "typeIdentifier": "t_string_calldata_ptr", "typeString": "string calldata" @@ -2216,12 +2456,12 @@ }, { "argumentTypes": null, - "id": 2719, + "id": 3664, "name": "oracleQuery", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2704, - "src": "3442:11:12", + "referencedDeclaration": 3642, + "src": "3410:11:16", "typeDescriptions": { "typeIdentifier": "t_string_calldata_ptr", "typeString": "string calldata" @@ -2235,20 +2475,8 @@ "typeString": "string calldata" }, { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_array$_t_address_$2_memory_ptr", + "typeString": "address[2] memory" }, { "typeIdentifier": "t_array$_t_uint256_$5_calldata_ptr", @@ -2263,31 +2491,31 @@ "typeString": "string calldata" } ], - "id": 2710, + "id": 3656, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "NewExpression", - "src": "3186:26:12", + "src": "3191:26:16", "typeDescriptions": { - "typeIdentifier": "t_function_creation_nonpayable$_t_string_memory_ptr_$_t_address_$_t_address_$_t_address_$_t_address_$_t_array$_t_uint256_$5_memory_ptr_$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$_t_contract$_MarketContractOraclize_$2950_$", - "typeString": "function (string memory,address,address,address,address,uint256[5] memory,string memory,string memory) returns (contract MarketContractOraclize)" + "typeIdentifier": "t_function_creation_nonpayable$_t_string_memory_ptr_$_t_array$_t_address_$2_memory_ptr_$_t_array$_t_uint256_$5_memory_ptr_$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$_t_contract$_MarketContractOraclize_$3888_$", + "typeString": "function (string memory,address[2] memory,uint256[5] memory,string memory,string memory) returns (contract MarketContractOraclize)" }, "typeName": { "contractScope": null, - "id": 2709, + "id": 3655, "name": "MarketContractOraclize", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2950, - "src": "3190:22:12", + "referencedDeclaration": 3888, + "src": "3195:22:16", "typeDescriptions": { - "typeIdentifier": "t_contract$_MarketContractOraclize_$2950", + "typeIdentifier": "t_contract$_MarketContractOraclize_$3888", "typeString": "contract MarketContractOraclize" } } }, - "id": 2720, + "id": 3665, "isConstant": false, "isLValue": false, "isPure": false, @@ -2295,14 +2523,14 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3186:277:12", + "src": "3191:240:16", "typeDescriptions": { - "typeIdentifier": "t_contract$_MarketContractOraclize_$2950", + "typeIdentifier": "t_contract$_MarketContractOraclize_$3888", "typeString": "contract MarketContractOraclize" } }, "nodeType": "VariableDeclarationStatement", - "src": "3149:314:12" + "src": "3154:277:16" }, { "expression": { @@ -2310,14 +2538,14 @@ "arguments": [ { "argumentTypes": null, - "id": 2726, + "id": 3671, "name": "mktContract", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2708, - "src": "3551:11:12", + "referencedDeclaration": 3654, + "src": "3519:11:16", "typeDescriptions": { - "typeIdentifier": "t_contract$_MarketContractOraclize_$2950", + "typeIdentifier": "t_contract$_MarketContractOraclize_$3888", "typeString": "contract MarketContractOraclize" } } @@ -2325,7 +2553,7 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_contract$_MarketContractOraclize_$2950", + "typeIdentifier": "t_contract$_MarketContractOraclize_$3888", "typeString": "contract MarketContractOraclize" } ], @@ -2334,12 +2562,12 @@ "arguments": [ { "argumentTypes": null, - "id": 2723, + "id": 3668, "name": "marketContractRegistry", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2660, - "src": "3505:22:12", + "referencedDeclaration": 3598, + "src": "3473:22:16", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -2353,18 +2581,18 @@ "typeString": "address" } ], - "id": 2722, + "id": 3667, "name": "MarketContractRegistryInterface", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1733, - "src": "3473:31:12", + "referencedDeclaration": 1235, + "src": "3441:31:16", "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_MarketContractRegistryInterface_$1733_$", + "typeIdentifier": "t_type$_t_contract$_MarketContractRegistryInterface_$1235_$", "typeString": "type(contract MarketContractRegistryInterface)" } }, - "id": 2724, + "id": 3669, "isConstant": false, "isLValue": false, "isPure": false, @@ -2372,27 +2600,27 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3473:55:12", + "src": "3441:55:16", "typeDescriptions": { - "typeIdentifier": "t_contract$_MarketContractRegistryInterface_$1733", + "typeIdentifier": "t_contract$_MarketContractRegistryInterface_$1235", "typeString": "contract MarketContractRegistryInterface" } }, - "id": 2725, + "id": 3670, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "addAddressToWhiteList", "nodeType": "MemberAccess", - "referencedDeclaration": 1725, - "src": "3473:77:12", + "referencedDeclaration": 1227, + "src": "3441:77:16", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", "typeString": "function (address) external" } }, - "id": 2727, + "id": 3672, "isConstant": false, "isLValue": false, "isPure": false, @@ -2400,15 +2628,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3473:90:12", + "src": "3441:90:16", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 2728, + "id": 3673, "nodeType": "ExpressionStatement", - "src": "3473:90:12" + "src": "3441:90:16" }, { "eventCall": { @@ -2418,18 +2646,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 2730, + "id": 3675, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 5193, - "src": "3600:3:12", + "referencedDeclaration": 8183, + "src": "3568:3:16", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 2731, + "id": 3676, "isConstant": false, "isLValue": false, "isPure": false, @@ -2437,7 +2665,7 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "3600:10:12", + "src": "3568:10:16", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -2445,14 +2673,14 @@ }, { "argumentTypes": null, - "id": 2732, + "id": 3677, "name": "mktContract", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2708, - "src": "3612:11:12", + "referencedDeclaration": 3654, + "src": "3580:11:16", "typeDescriptions": { - "typeIdentifier": "t_contract$_MarketContractOraclize_$2950", + "typeIdentifier": "t_contract$_MarketContractOraclize_$3888", "typeString": "contract MarketContractOraclize" } } @@ -2464,22 +2692,22 @@ "typeString": "address" }, { - "typeIdentifier": "t_contract$_MarketContractOraclize_$2950", + "typeIdentifier": "t_contract$_MarketContractOraclize_$3888", "typeString": "contract MarketContractOraclize" } ], - "id": 2729, + "id": 3674, "name": "MarketContractCreated", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2670, - "src": "3578:21:12", + "referencedDeclaration": 3608, + "src": "3546:21:16", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", "typeString": "function (address,address)" } }, - "id": 2733, + "id": 3678, "isConstant": false, "isLValue": false, "isPure": false, @@ -2487,20 +2715,20 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3578:46:12", + "src": "3546:46:16", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 2734, + "id": 3679, "nodeType": "EmitStatement", - "src": "3573:51:12" + "src": "3541:51:16" } ] }, - "documentation": "@dev Deploys a new instance of a market contract and adds it to the whitelist.\n @param contractName viewable name of this contract (BTC/ETH, LTC/ETH, etc)\n @param collateralTokenAddress address of the ERC20 token that will be used for collateral and pricing\n @param contractSpecs array of unsigned integers including:\n floorPrice minimum tradeable price of this contract, contract enters settlement if breached\n capPrice maximum tradeable price of this contract, contract enters settlement if breached\n priceDecimalPlaces number of decimal places to convert our queried price from a floating point to\n an integer\n qtyMultiplier multiply traded qty by this value from base units of collateral token.\n expirationTimeStamp - seconds from epoch that this contract expires and enters settlement\n @param oracleDataSource a data-source such as \"URL\", \"WolframAlpha\", \"IPFS\"\n see http://docs.oraclize.it/#ethereum-quick-start-simple-query\n @param oracleQuery see http://docs.oraclize.it/#ethereum-quick-start-simple-query for examples", - "id": 2736, + "documentation": "@dev Deploys a new instance of a market contract and adds it to the whitelist.\n @param contractName viewable name of this contract (BTC/ETH, LTC/ETH, etc)\n @param collateralTokenAddress address of the ERC20 token that will be used for collateral and pricing\n @param contractSpecs array of unsigned integers including:\n floorPrice minimum tradeable price of this contract, contract enters settlement if breached\n capPrice maximum tradeable price of this contract, contract enters settlement if breached\n priceDecimalPlaces number of decimal places to convert our queried price from a floating point to\n an integer\n qtyMultiplier multiply traded qty by this value from base units of collateral token.\n expirationTimeStamp seconds from epoch that this contract expires and enters settlement\n @param oracleDataSource a data-source such as \"URL\", \"WolframAlpha\", \"IPFS\"\n see http://docs.oraclize.it/#ethereum-quick-start-simple-query\n @param oracleQuery see http://docs.oraclize.it/#ethereum-quick-start-simple-query for examples", + "id": 3681, "implemented": true, "isConstructor": false, "isDeclaredConst": false, @@ -2508,16 +2736,16 @@ "name": "deployMarketContractOraclize", "nodeType": "FunctionDefinition", "parameters": { - "id": 2705, + "id": 3643, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2694, + "id": 3632, "name": "contractName", "nodeType": "VariableDeclaration", - "scope": 2736, - "src": "2968:19:12", + "scope": 3681, + "src": "2861:19:16", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2525,10 +2753,10 @@ "typeString": "string" }, "typeName": { - "id": 2693, + "id": 3631, "name": "string", "nodeType": "ElementaryTypeName", - "src": "2968:6:12", + "src": "2861:6:16", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" @@ -2539,11 +2767,11 @@ }, { "constant": false, - "id": 2696, + "id": 3634, "name": "collateralTokenAddress", "nodeType": "VariableDeclaration", - "scope": 2736, - "src": "2997:30:12", + "scope": 3681, + "src": "2890:30:16", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2551,10 +2779,10 @@ "typeString": "address" }, "typeName": { - "id": 2695, + "id": 3633, "name": "address", "nodeType": "ElementaryTypeName", - "src": "2997:7:12", + "src": "2890:7:16", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -2565,11 +2793,11 @@ }, { "constant": false, - "id": 2700, + "id": 3638, "name": "contractSpecs", "nodeType": "VariableDeclaration", - "scope": 2736, - "src": "3037:21:12", + "scope": 3681, + "src": "2930:21:16", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2578,27 +2806,27 @@ }, "typeName": { "baseType": { - "id": 2697, + "id": 3635, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "3037:4:12", + "src": "2930:4:16", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 2699, + "id": 3637, "length": { "argumentTypes": null, "hexValue": "35", - "id": 2698, + "id": 3636, "isConstant": false, "isLValue": false, "isPure": false, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "3042:1:12", + "src": "2935:1:16", "subdenomination": null, "typeDescriptions": { "typeIdentifier": null, @@ -2607,7 +2835,7 @@ "value": "5" }, "nodeType": "ArrayTypeName", - "src": "3037:7:12", + "src": "2930:7:16", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$5_storage_ptr", "typeString": "uint256[5]" @@ -2618,11 +2846,11 @@ }, { "constant": false, - "id": 2702, + "id": 3640, "name": "oracleDataSource", "nodeType": "VariableDeclaration", - "scope": 2736, - "src": "3068:23:12", + "scope": 3681, + "src": "2961:23:16", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2630,10 +2858,10 @@ "typeString": "string" }, "typeName": { - "id": 2701, + "id": 3639, "name": "string", "nodeType": "ElementaryTypeName", - "src": "3068:6:12", + "src": "2961:6:16", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" @@ -2644,11 +2872,11 @@ }, { "constant": false, - "id": 2704, + "id": 3642, "name": "oracleQuery", "nodeType": "VariableDeclaration", - "scope": 2736, - "src": "3101:18:12", + "scope": 3681, + "src": "2994:18:16", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2656,10 +2884,10 @@ "typeString": "string" }, "typeName": { - "id": 2703, + "id": 3641, "name": "string", "nodeType": "ElementaryTypeName", - "src": "3101:6:12", + "src": "2994:6:16", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" @@ -2669,26 +2897,26 @@ "visibility": "internal" } ], - "src": "2958:167:12" + "src": "2851:167:16" }, "payable": false, "returnParameters": { - "id": 2706, + "id": 3644, "nodeType": "ParameterList", "parameters": [], - "src": "3139:0:12" + "src": "3032:0:16" }, - "scope": 2757, - "src": "2921:710:12", + "scope": 3702, + "src": "2814:785:16", "stateMutability": "nonpayable", "superFunction": null, "visibility": "external" }, { "body": { - "id": 2755, + "id": 3700, "nodeType": "Block", - "src": "3851:105:12", + "src": "3819:105:16", "statements": [ { "expression": { @@ -2700,19 +2928,19 @@ "typeIdentifier": "t_address", "typeString": "address" }, - "id": 2748, + "id": 3693, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 2744, + "id": 3689, "name": "registryAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2738, - "src": "3869:15:12", + "referencedDeclaration": 3683, + "src": "3837:15:16", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -2726,14 +2954,14 @@ { "argumentTypes": null, "hexValue": "30", - "id": 2746, + "id": 3691, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "3896:1:12", + "src": "3864:1:16", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -2749,20 +2977,20 @@ "typeString": "int_const 0" } ], - "id": 2745, + "id": 3690, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "3888:7:12", + "src": "3856:7:16", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": "address" }, - "id": 2747, + "id": 3692, "isConstant": false, "isLValue": false, "isPure": true, @@ -2770,13 +2998,13 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3888:10:12", + "src": "3856:10:16", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "src": "3869:29:12", + "src": "3837:29:16", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -2790,21 +3018,21 @@ "typeString": "bool" } ], - "id": 2743, + "id": 3688, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 5196, - 5197 + 8186, + 8187 ], - "referencedDeclaration": 5196, - "src": "3861:7:12", + "referencedDeclaration": 8186, + "src": "3829:7:16", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, - "id": 2749, + "id": 3694, "isConstant": false, "isLValue": false, "isPure": false, @@ -2812,32 +3040,32 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3861:38:12", + "src": "3829:38:16", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 2750, + "id": 3695, "nodeType": "ExpressionStatement", - "src": "3861:38:12" + "src": "3829:38:16" }, { "expression": { "argumentTypes": null, - "id": 2753, + "id": 3698, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 2751, + "id": 3696, "name": "marketContractRegistry", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2660, - "src": "3909:22:12", + "referencedDeclaration": 3598, + "src": "3877:22:16", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -2847,68 +3075,68 @@ "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 2752, + "id": 3697, "name": "registryAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2738, - "src": "3934:15:12", + "referencedDeclaration": 3683, + "src": "3902:15:16", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "src": "3909:40:12", + "src": "3877:40:16", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "id": 2754, + "id": 3699, "nodeType": "ExpressionStatement", - "src": "3909:40:12" + "src": "3877:40:16" } ] }, "documentation": "@dev allows for the owner to set the desired registry for contract creation.\n @param registryAddress desired registry address.", - "id": 2756, + "id": 3701, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [ { "arguments": null, - "id": 2741, + "id": 3686, "modifierName": { "argumentTypes": null, - "id": 2740, + "id": 3685, "name": "onlyOwner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4602, - "src": "3841:9:12", + "referencedDeclaration": 7057, + "src": "3809:9:16", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", - "src": "3841:9:12" + "src": "3809:9:16" } ], "name": "setRegistryAddress", "nodeType": "FunctionDefinition", "parameters": { - "id": 2739, + "id": 3684, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2738, + "id": 3683, "name": "registryAddress", "nodeType": "VariableDeclaration", - "scope": 2756, - "src": "3807:23:12", + "scope": 3701, + "src": "3775:23:16", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2916,10 +3144,10 @@ "typeString": "address" }, "typeName": { - "id": 2737, + "id": 3682, "name": "address", "nodeType": "ElementaryTypeName", - "src": "3807:7:12", + "src": "3775:7:16", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -2929,27 +3157,27 @@ "visibility": "internal" } ], - "src": "3806:25:12" + "src": "3774:25:16" }, "payable": false, "returnParameters": { - "id": 2742, + "id": 3687, "nodeType": "ParameterList", "parameters": [], - "src": "3851:0:12" + "src": "3819:0:16" }, - "scope": 2757, - "src": "3779:177:12", + "scope": 3702, + "src": "3747:177:16", "stateMutability": "nonpayable", "superFunction": null, "visibility": "external" } ], - "scope": 2758, - "src": "945:3464:12" + "scope": 3703, + "src": "917:3009:16" } ], - "src": "608:3802:12" + "src": "608:3319:16" }, "compiler": { "name": "solc", @@ -2961,10 +3189,10 @@ "links": { "OrderLib": "0x1cf1af7f3df9e9075796c7a6bf8d91c3398fe984" }, - "address": "0x671ccfd13ff37dd06730e4e5867628e7f06fda78", - "transactionHash": "0x3bfcad2d7b4e4f3f9706fb2f3f8e27f99953de18987613d4af2d5902fef6ba72" + "address": "0x2f18137fb66f921ed6246deb2c636a3cdb25a557", + "transactionHash": "0x10a900594da75ae33b9226419e5f0fa2fea958c60c57541a42afdf8a85a2d3e4" } }, "schemaVersion": "2.0.1", - "updatedAt": "2018-10-05T14:03:26.617Z" + "updatedAt": "2018-10-16T03:15:00.583Z" } \ No newline at end of file diff --git a/build/contracts/MarketContractOraclize.json b/build/contracts/MarketContractOraclize.json index 00feaba..499ee1e 100644 --- a/build/contracts/MarketContractOraclize.json +++ b/build/contracts/MarketContractOraclize.json @@ -85,20 +85,6 @@ "stateMutability": "view", "type": "function" }, - { - "constant": true, - "inputs": [], - "name": "isCollateralPoolContractLinked", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, { "constant": true, "inputs": [], @@ -113,25 +99,6 @@ "stateMutability": "view", "type": "function" }, - { - "constant": true, - "inputs": [ - { - "name": "orderHash", - "type": "bytes32" - } - ], - "name": "getQtyFilledOrCancelledFromOrder", - "outputs": [ - { - "name": "", - "type": "int256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, { "constant": true, "inputs": [], @@ -174,77 +141,6 @@ "stateMutability": "view", "type": "function" }, - { - "constant": true, - "inputs": [], - "name": "MKT_TOKEN_ADDRESS", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "orderAddresses", - "type": "address[3]" - }, - { - "name": "unsignedOrderValues", - "type": "uint256[5]" - }, - { - "name": "orderQty", - "type": "int256" - }, - { - "name": "qtyToFill", - "type": "int256" - }, - { - "name": "v", - "type": "uint8" - }, - { - "name": "r", - "type": "bytes32" - }, - { - "name": "s", - "type": "bytes32" - } - ], - "name": "tradeOrder", - "outputs": [ - { - "name": "filledQty", - "type": "int256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "MARKET_COLLATERAL_POOL_ADDRESS", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, { "constant": true, "inputs": [], @@ -273,20 +169,6 @@ "stateMutability": "view", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "name": "poolAddress", - "type": "address" - } - ], - "name": "setCollateralPoolContractAddress", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -315,20 +197,6 @@ "stateMutability": "view", "type": "function" }, - { - "constant": true, - "inputs": [], - "name": "COLLATERAL_POOL_FACTORY_ADDRESS", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, { "constant": true, "inputs": [], @@ -357,37 +225,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "name": "orderAddresses", - "type": "address[3]" - }, - { - "name": "unsignedOrderValues", - "type": "uint256[5]" - }, - { - "name": "orderQty", - "type": "int256" - }, - { - "name": "qtyToCancel", - "type": "int256" - } - ], - "name": "cancelOrder", - "outputs": [ - { - "name": "qtyCancelled", - "type": "int256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "inputs": [ { @@ -395,20 +232,8 @@ "type": "string" }, { - "name": "creatorAddress", - "type": "address" - }, - { - "name": "marketTokenAddress", - "type": "address" - }, - { - "name": "collateralTokenAddress", - "type": "address" - }, - { - "name": "collateralPoolFactoryAddress", - "type": "address" + "name": "baseAddresses", + "type": "address[2]" }, { "name": "contractSpecs", @@ -433,7 +258,7 @@ { "indexed": false, "name": "price", - "type": "string" + "type": "uint256" } ], "name": "UpdatedLastPrice", @@ -451,126 +276,6 @@ "name": "ContractSettled", "type": "event" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "user", - "type": "address" - }, - { - "indexed": false, - "name": "balance", - "type": "uint256" - } - ], - "name": "UpdatedUserBalance", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "balance", - "type": "uint256" - } - ], - "name": "UpdatedPoolBalance", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "errorCode", - "type": "uint8" - }, - { - "indexed": true, - "name": "orderHash", - "type": "bytes32" - } - ], - "name": "Error", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "maker", - "type": "address" - }, - { - "indexed": true, - "name": "taker", - "type": "address" - }, - { - "indexed": true, - "name": "feeRecipient", - "type": "address" - }, - { - "indexed": false, - "name": "filledQty", - "type": "int256" - }, - { - "indexed": false, - "name": "paidMakerFee", - "type": "uint256" - }, - { - "indexed": false, - "name": "paidTakerFee", - "type": "uint256" - }, - { - "indexed": false, - "name": "price", - "type": "uint256" - }, - { - "indexed": false, - "name": "orderHash", - "type": "bytes32" - } - ], - "name": "OrderFilled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "maker", - "type": "address" - }, - { - "indexed": true, - "name": "feeRecipient", - "type": "address" - }, - { - "indexed": false, - "name": "cancelledQty", - "type": "int256" - }, - { - "indexed": true, - "name": "orderHash", - "type": "bytes32" - } - ], - "name": "OrderCancelled", - "type": "event" - }, { "anonymous": false, "inputs": [ @@ -638,24 +343,24 @@ "type": "function" } ], - "bytecode": "0x60806040526000600d60006101000a81548160ff0219169083151502179055506000600d60016101000a81548160ff0219169083151502179055503480156200004757600080fd5b506040516200566038038062005660833981018060405281019080805182019291906020018051906020019092919080519060200190929190805190602001909291908051906020019092919091908260a0018051820192919060200180518201929190505050878787878787336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166384281dcc336040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b1580156200027557600080fd5b505af11580156200028a573d6000803e3d6000fd5b505050506040513d6020811015620002a157600080fd5b81019080805190602001909291905050501515620002be57600080fd5b806000600581101515620002ce57fe5b6020020151600781905550806001600581101515620002e957fe5b60200201516006819055506007546006541115156200030757600080fd5b8060026005811015156200031757fe5b60200201516008819055508060036005811015156200033257fe5b60200201516009819055508060046005811015156200034d57fe5b6020020151600a8190555042600a541115156200036957600080fd5b856004908051906020019062000381929190620015b9565b5082600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550846000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050505050506200046b60017f01000000000000000000000000000000000000000000000000000000000000000260107f01000000000000000000000000000000000000000000000000000000000000000217620004db640100000000026401000000009004565b816014908051906020019062000483929190620015b9565b5080601590805190602001906200049c929190620015b9565b50624f1a0042600a540311151515620004b457600080fd5b620004cd62000893640100000000026401000000009004565b505050505050505062001668565b6000601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614806200055e575060006200055c601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1662000a44640100000000026401000000009004565b145b1562000581576200057f600062000a4f640100000000026401000000009004565b505b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156200060857600080fd5b505af11580156200061d573d6000803e3d6000fd5b505050506040513d60208110156200063457600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515620007a157601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156200072357600080fd5b505af115801562000738573d6000803e3d6000fd5b505050506040513d60208110156200074f57600080fd5b8101908080519060200190929190505050601260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663688dcfd7826040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180827effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001915050600060405180830381600087803b1580156200087757600080fd5b505af11580156200088c573d6000803e3d6000fd5b5050505050565b6000620009f3600a5460148054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015620009365780601f106200090a5761010080835404028352916020019162000936565b820191906000526020600020905b8154815290600101906020018083116200091857829003601f168201915b505050505060158054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015620009d55780601f10620009a957610100808354040283529160200191620009d5565b820191906000526020600020905b815481529060010190602001808311620009b757829003601f168201915b5050505050620249f062000a71640100000000026401000000009004565b9050600060010281600019161415151562000a0d57600080fd5b600160176000836000191660001916815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b6000813b9050919050565b600062000a6a6200103e640100000000026401000000009004565b9050919050565b6000806000601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16148062000af75750600062000af5601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1662000a44640100000000026401000000009004565b145b1562000b1a5762000b18600062000a4f640100000000026401000000009004565b505b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801562000ba157600080fd5b505af115801562000bb6573d6000803e3d6000fd5b505050506040513d602081101562000bcd57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151562000d3a57601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801562000cbc57600080fd5b505af115801562000cd1573d6000803e3d6000fd5b505050506040513d602081101562000ce857600080fd5b8101908080519060200190929190505050601260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632ef3accc86856040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b8381101562000ded57808201518184015260208101905062000dd0565b50505050905090810190601f16801562000e1b5780820380516001836020036101000a031916815260200191505b509350505050602060405180830381600087803b15801562000e3c57600080fd5b505af115801562000e51573d6000803e3d6000fd5b505050506040513d602081101562000e6857600080fd5b81019080805190602001909291905050509050601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c51be90f82888888886040518663ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b8381101562000f3b57808201518184015260208101905062000f1e565b50505050905090810190601f16801562000f695780820380516001836020036101000a031916815260200191505b50838103825285818151815260200191508051906020019080838360005b8381101562000fa457808201518184015260208101905062000f87565b50505050905090810190601f16801562000fd25780820380516001836020036101000a031916815260200191505b5096505050505050506020604051808303818588803b15801562000ff557600080fd5b505af11580156200100a573d6000803e3d6000fd5b50505050506040513d60208110156200102257600080fd5b8101908080519060200190929190505050915050949350505050565b6000806200106f731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed62000a44640100000000026401000000009004565b11156200112457731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506200111a6040805190810160405280600b81526020017f6574685f6d61696e6e65740000000000000000000000000000000000000000008152506200159d640100000000026401000000009004565b600190506200159a565b60006200115473c03a2615d5efaf5f49f60b7bb6583eaec212fdf162000a44640100000000026401000000009004565b1115620012095773c03a2615d5efaf5f49f60b7bb6583eaec212fdf1601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550620011ff6040805190810160405280600c81526020017f6574685f726f707374656e3300000000000000000000000000000000000000008152506200159d640100000000026401000000009004565b600190506200159a565b60006200123973b7a07bcf2ba2f2703b24c0691b5278999c59ac7e62000a44640100000000026401000000009004565b1115620012ee5773b7a07bcf2ba2f2703b24c0691b5278999c59ac7e601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550620012e46040805190810160405280600981526020017f6574685f6b6f76616e00000000000000000000000000000000000000000000008152506200159d640100000000026401000000009004565b600190506200159a565b60006200131e73146500cfd35b22e4a392fe0adc06de1a1368ed4862000a44640100000000026401000000009004565b1115620013d35773146500cfd35b22e4a392fe0adc06de1a1368ed48601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550620013c96040805190810160405280600b81526020017f6574685f72696e6b6562790000000000000000000000000000000000000000008152506200159d640100000000026401000000009004565b600190506200159a565b600062001403736f485c8bf6fc43ea212e93bbf8ce046c7f1cb47562000a44640100000000026401000000009004565b11156200146957736f485c8bf6fc43ea212e93bbf8ce046c7f1cb475601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600190506200159a565b6000620014997320e12a1f859b3feae5fb2a0a32c18f5a65555bbf62000a44640100000000026401000000009004565b1115620014ff577320e12a1f859b3feae5fb2a0a32c18f5a65555bbf601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600190506200159a565b60006200152f7351efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa62000a44640100000000026401000000009004565b111562001595577351efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600190506200159a565b600090505b90565b8060139080519060200190620015b5929190620015b9565b5050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620015fc57805160ff19168380011785556200162d565b828001600101855582156200162d579182015b828111156200162c5782518255916020019190600101906200160f565b5b5090506200163c919062001640565b5090565b6200166591905b808211156200166157600081600090555060010162001647565b5090565b90565b613fe880620016786000396000f30060806040526004361061015f576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806302d05d3f14610164578063053f14da146101bb5780630c8eb675146101e657806327dc297e146102765780632fed1b00146102ed578063323bb775146103185780633270bb5b1461036f57806338bbfa501461039e5780633b3c4ae91461045b578063411449bb1461048a5780634c258eb1146104b557806356357d91146104fa5780635ea7867a1461058a578063614d08f81461061a5780636db7f77c146106aa578063798ddbc8146106b4578063930a9d921461070b578063a8e77c9a14610793578063b5471dee146107ea578063bb4b573414610815578063c201293b14610840578063c32b1dfa14610883578063ca361d67146108ae578063d514d12c146108d9578063f348e8b214610930578063fa3fa1961461095b578063fc51b9c51461099e575b600080fd5b34801561017057600080fd5b506101796109fd565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101c757600080fd5b506101d0610a22565b6040518082815260200191505060405180910390f35b3480156101f257600080fd5b506101fb610a28565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561023b578082015181840152602081019050610220565b50505050905090810190601f1680156102685780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561028257600080fd5b506102eb6004803603810190808035600019169060200190929190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290505050610ac6565b005b3480156102f957600080fd5b50610302610b09565b6040518082815260200191505060405180910390f35b34801561032457600080fd5b5061032d610b0f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561037b57600080fd5b50610384610b35565b604051808215151515815260200191505060405180910390f35b3480156103aa57600080fd5b506104596004803603810190808035600019169060200190929190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290505050610b48565b005b34801561046757600080fd5b50610470610cba565b604051808215151515815260200191505060405180910390f35b34801561049657600080fd5b5061049f610ccd565b6040518082815260200191505060405180910390f35b3480156104c157600080fd5b506104e46004803603810190808035600019169060200190929190505050610cd4565b6040518082815260200191505060405180910390f35b34801561050657600080fd5b5061050f610cf1565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561054f578082015181840152602081019050610534565b50505050905090810190601f16801561057c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561059657600080fd5b5061059f610d8f565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156105df5780820151818401526020810190506105c4565b50505050905090810190601f16801561060c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561062657600080fd5b5061062f610e2d565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561066f578082015181840152602081019050610654565b50505050905090810190601f16801561069c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6106b2610ecb565b005b3480156106c057600080fd5b506106c9611119565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561071757600080fd5b5061077d600480360381019080806060019091929192908060a0019091929192908035906020019092919080359060200190929190803560ff1690602001909291908035600019169060200190929190803560001916906020019092919050505061113f565b6040518082815260200191505060405180910390f35b34801561079f57600080fd5b506107a8611b0f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156107f657600080fd5b506107ff611b35565b6040518082815260200191505060405180910390f35b34801561082157600080fd5b5061082a611b3b565b6040518082815260200191505060405180910390f35b34801561084c57600080fd5b50610881600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611b41565b005b34801561088f57600080fd5b50610898611d8f565b6040518082815260200191505060405180910390f35b3480156108ba57600080fd5b506108c3611d95565b6040518082815260200191505060405180910390f35b3480156108e557600080fd5b506108ee611d9b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561093c57600080fd5b50610945611dc1565b6040518082815260200191505060405180910390f35b34801561096757600080fd5b5061099c600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611dc7565b005b3480156109aa57600080fd5b506109e7600480360381019080806060019091929192908060a0019091929192908035906020019092919080359060200190929190505050611f1c565b6040518082815260200191505060405180910390f35b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600b5481565b60168054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610abe5780601f10610a9357610100808354040283529160200191610abe565b820191906000526020600020905b815481529060010190602001808311610aa157829003601f168201915b505050505081565b610b05828260006040519080825280601f01601f191660200182016040528015610aff5781602001602082028038833980820191505090505b50610b48565b5050565b60085481565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600d60009054906101000a900460ff1681565b610b506121a0565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610b8957600080fd5b60176000846000191660001916815260200190815260200160002060009054906101000a900460ff161515610bbd57600080fd5b8160169080519060200190610bd3929190613e85565b50610be082600854612502565b600b819055507f3e19f2256bddc30aeab8054ccbd86723452d07f687b94441de69c05ee212dafa826040518080602001828103825283818151815260200191508051906020019080838360005b83811015610c48578082015181840152602081019050610c2d565b50505050905090810190601f168015610c755780820380516001836020036101000a031916815260200191505b509250505060405180910390a1610c8a6127f6565b60176000846000191660001916815260200190815260200160002060006101000a81549060ff0219169055505050565b600d60019054906101000a900460ff1681565b620249f081565b6000610cea82600f6128c690919063ffffffff16565b9050919050565b60148054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610d875780601f10610d5c57610100808354040283529160200191610d87565b820191906000526020600020905b815481529060010190602001808311610d6a57829003601f168201915b505050505081565b60158054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610e255780601f10610dfa57610100808354040283529160200191610e25565b820191906000526020600020905b815481529060010190602001808311610e0857829003601f168201915b505050505081565b60048054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610ec35780601f10610e9857610100808354040283529160200191610ec3565b820191906000526020600020905b815481529060010190602001808311610ea657829003601f168201915b505050505081565b600080610f7560148054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610f675780601f10610f3c57610100808354040283529160200191610f67565b820191906000526020600020905b815481529060010190602001808311610f4a57829003601f168201915b5050505050620249f061291d565b9150813410151515610f8657600080fd5b6110c860148054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561101f5780601f10610ff45761010080835404028352916020019161101f565b820191906000526020600020905b81548152906001019060200180831161100257829003601f168201915b505050505060158054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156110ba5780601f1061108f576101008083540402835291602001916110ba565b820191906000526020600020905b81548152906001019060200180831161109d57829003601f168201915b5050505050620249f0612cfa565b905060006001028160001916141515156110e157600080fd5b600160176000836000191660001916815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000611149613f05565b6000806000806000600d60019054906101000a900460ff16801561117a5750600d60009054906101000a900460ff16155b151561118557600080fd5b60008c14158015611197575060008b14155b80156111b257506111b18b8d61328d90919063ffffffff16565b5b15156111bd57600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663cfab472f30336040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b1580156112ae57600080fd5b505af11580156112c2573d6000803e3d6000fd5b505050506040513d60208110156112d857600080fd5b810190808051906020019092919050505015156112f457600080fd5b61136b8e600380602002604051908101604052809291908260036020028082843782019150505050508e600580602002604051908101604052809291908260056020028082843782019150505050508e3073ffffffffffffffffffffffffffffffffffffffff166132a7909392919063ffffffff16565b9550600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663cfab472f3088600001516040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b15801561146257600080fd5b505af1158015611476573d6000803e3d6000fd5b505050506040513d602081101561148c57600080fd5b810190808051906020019092919050505015156114a857600080fd5b600073ffffffffffffffffffffffffffffffffffffffff16866020015173ffffffffffffffffffffffffffffffffffffffff16148061151657503373ffffffffffffffffffffffffffffffffffffffff16866020015173ffffffffffffffffffffffffffffffffffffffff16145b151561152157600080fd5b600073ffffffffffffffffffffffffffffffffffffffff16866000015173ffffffffffffffffffffffffffffffffffffffff161415801561159257503373ffffffffffffffffffffffffffffffffffffffff16866000015173ffffffffffffffffffffffffffffffffffffffff1614155b151561159d57600080fd5b856000015173ffffffffffffffffffffffffffffffffffffffff1673__OrderLib______________________________638163681e90918861010001518d8d8d6040518663ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200185600019166000191681526020018460ff1660ff168152602001836000191660001916815260200182600019166000191681526020019550505050505060206040518083038186803b15801561169357600080fd5b505af41580156116a7573d6000803e3d6000fd5b505050506040513d60208110156116bd57600080fd5b810190808051906020019092919050505015156116d957600080fd5b8560c00151421015156117325785610100015160001916600060018111156116fd57fe5b7fe6104340582083fe7674a149f8da127b9d3d7f74a88ccd7610562eb5b61b919360405160405180910390a360009650611afe565b611752611743876101000151610cd4565b8d61343990919063ffffffff16565b945060008514156117a8578561010001516000191660018081111561177357fe5b7fe6104340582083fe7674a149f8da127b9d3d7f74a88ccd7610562eb5b61b919360405160405180910390a360009650611afe565b6117b2858c613450565b9650600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663eeaba0838760000151338a8a60a001516040518563ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828152602001945050505050600060405180830381600087803b1580156118bd57600080fd5b505af11580156118d1573d6000803e3d6000fd5b505050506118f086610100015188600f6134799092919063ffffffff16565b6000935060009250600073ffffffffffffffffffffffffffffffffffffffff16866040015173ffffffffffffffffffffffffffffffffffffffff16141515611a455761193b876134cf565b9150611946876134cf565b90506000866060015111156119c85761196e828288606001516134ed9092919063ffffffff16565b93506119c78660000151876040015186600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661350d909392919063ffffffff16565b5b600086608001511115611a44576119ee828288608001516134ed9092919063ffffffff16565b9250611a4333876040015185600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661350d909392919063ffffffff16565b5b5b856040015173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16876000015173ffffffffffffffffffffffffffffffffffffffff167ff756998387aae83a81d5053664c1ed50a128ecd4e82cc2e135b5a2f367841f598a88888c60a001518d61010001516040518086815260200185815260200184815260200183815260200182600019166000191681526020019550505050505060405180910390a48696505b505050505050979650505050505050565b600d60029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60065481565b600a5481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611b9d57600080fd5b600d60019054906101000a900460ff16151515611bb957600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515611bf557600080fd5b80600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055503073ffffffffffffffffffffffffffffffffffffffff16600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637bb55cd26040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015611cd357600080fd5b505af1158015611ce7573d6000803e3d6000fd5b505050506040513d6020811015611cfd57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16141515611d3057600080fd5b80600d60026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600d60016101000a81548160ff02191690831515021790555050565b60075481565b60095481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600c5481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611e2257600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515611e5e57600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f7f11fe0c7098e1a76afcc68f35abaa07ef156fa7d6dd2d39664812fe37348d1660405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000611f26613f05565b6000808414158015611f475750611f46858561328d90919063ffffffff16565b5b1515611f5257600080fd5b600d60009054906101000a900460ff16151515611f6e57600080fd5b611fe587600380602002604051908101604052809291908260036020028082843782019150505050508760058060200260405190810160405280929190826005602002808284378201915050505050873073ffffffffffffffffffffffffffffffffffffffff166132a7909392919063ffffffff16565b91503373ffffffffffffffffffffffffffffffffffffffff16826000015173ffffffffffffffffffffffffffffffffffffffff1614151561202557600080fd5b8160c001514210151561207e57816101000151600019166000600181111561204957fe5b7fe6104340582083fe7674a149f8da127b9d3d7f74a88ccd7610562eb5b61b919360405160405180910390a360009250612196565b61209e61208f836101000151610cd4565b8661343990919063ffffffff16565b905060008114156120f457816101000151600019166001808111156120bf57fe5b7fe6104340582083fe7674a149f8da127b9d3d7f74a88ccd7610562eb5b61b919360405160405180910390a360009250612196565b6120fe8482613450565b925061211b82610100015184600f61362d9092919063ffffffff16565b81610100015160001916826040015173ffffffffffffffffffffffffffffffffffffffff16836000015173ffffffffffffffffffffffffffffffffffffffff167f7de4479e80e82e22edb1e0010433c8befc804c34988024fa0b0234715102cd8f866040518082815260200191505060405180910390a48292505b5050949350505050565b600080601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16148061221257506000612210601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16613683565b145b1561222357612221600061368e565b505b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156122a957600080fd5b505af11580156122bd573d6000803e3d6000fd5b505050506040513d60208110156122d357600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151561243c57601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156123c057600080fd5b505af11580156123d4573d6000803e3d6000fd5b505050506040513d60208110156123ea57600080fd5b8101908080519060200190929190505050601260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c281d19e6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156124c257600080fd5b505af11580156124d6573d6000803e3d6000fd5b505050506040513d60208110156124ec57600080fd5b8101908080519060200190929190505050905090565b6000606060008060008693506000925060009150600090505b83518110156127d75760307f010000000000000000000000000000000000000000000000000000000000000002848281518110151561255657fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161015801561266e575060397f01000000000000000000000000000000000000000000000000000000000000000284828151811015156125fe57fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191611155b1561271f578115612691576000861415612687576127d7565b8580600190039650505b600a83029250603084828151811015156126a757fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027f0100000000000000000000000000000000000000000000000000000000000000900403830192506127ca565b602e7f010000000000000000000000000000000000000000000000000000000000000002848281518110151561275157fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614156127c957600191505b5b808060010191505061251b565b60008611156127e95785600a0a830292505b8294505050505092915050565b6000600d60009054906101000a900460ff1615612812576128c3565b600a54421115612841576001600d60006101000a81548160ff021916908315150217905550600b5490506128a3565b600654600b54101515612873576001600d60006101000a81548160ff02191690831515021790555060065490506128a2565b600754600b541115156128a1576001600d60006101000a81548160ff02191690831515021790555060075490505b5b5b600d60009054906101000a900460ff16156128c2576128c18161369f565b5b5b50565b60006129158360010160008460001916600019168152602001908152602001600020548460000160008560001916600019168152602001908152602001600020546136e090919063ffffffff16565b905092915050565b600080601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16148061298f5750600061298d601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16613683565b145b156129a05761299e600061368e565b505b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015612a2657600080fd5b505af1158015612a3a573d6000803e3d6000fd5b505050506040513d6020811015612a5057600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515612bb957601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015612b3d57600080fd5b505af1158015612b51573d6000803e3d6000fd5b505050506040513d6020811015612b6757600080fd5b8101908080519060200190929190505050601260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632ef3accc84846040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b83811015612c6a578082015181840152602081019050612c4f565b50505050905090810190601f168015612c975780820380516001836020036101000a031916815260200191505b509350505050602060405180830381600087803b158015612cb757600080fd5b505af1158015612ccb573d6000803e3d6000fd5b505050506040513d6020811015612ce157600080fd5b8101908080519060200190929190505050905092915050565b6000806000601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161480612d6e57506000612d6c601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16613683565b145b15612d7f57612d7d600061368e565b505b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015612e0557600080fd5b505af1158015612e19573d6000803e3d6000fd5b505050506040513d6020811015612e2f57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515612f9857601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015612f1c57600080fd5b505af1158015612f30573d6000803e3d6000fd5b505050506040513d6020811015612f4657600080fd5b8101908080519060200190929190505050601260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632ef3accc86856040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b8381101561304957808201518184015260208101905061302e565b50505050905090810190601f1680156130765780820380516001836020036101000a031916815260200191505b509350505050602060405180830381600087803b15801561309657600080fd5b505af11580156130aa573d6000803e3d6000fd5b505050506040513d60208110156130c057600080fd5b81019080805190602001909291905050509050601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c51be90f8260008888886040518663ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b83811015613192578082015181840152602081019050613177565b50505050905090810190601f1680156131bf5780820380516001836020036101000a031916815260200191505b50838103825285818151815260200191508051906020019080838360005b838110156131f85780820151818401526020810190506131dd565b50505050905090810190601f1680156132255780820380516001836020036101000a031916815260200191505b5096505050505050506020604051808303818588803b15801561324757600080fd5b505af115801561325b573d6000803e3d6000fd5b50505050506040513d602081101561327257600080fd5b81019080805190602001909291905050509150509392505050565b60008183148061329f57506000828402135b905092915050565b6132af613f05565b8360006003811015156132be57fe5b6020020151816000019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505083600160038110151561330957fe5b6020020151816020019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505083600260038110151561335457fe5b6020020151816040019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505082600060058110151561339f57fe5b60200201518160600181815250508260016005811015156133bc57fe5b60200201518160800181815250508260026005811015156133d957fe5b60200201518160a00181815250508260036005811015156133f657fe5b60200201518160c0018181525050818160e001818152505061341a85858585613748565b8161010001906000191690816000191681525050809050949350505050565b600061344883836000036136e0565b905092915050565b600061345b826134cf565b613464846134cf565b1061346f5781613471565b825b905092915050565b6134a9818460000160008560001916600019168152602001908152602001600020546136e090919063ffffffff16565b836000016000846000191660001916815260200190815260200160002081905550505050565b6000808212156134e4578160000390506134e8565b8190505b919050565b6000816134fa85856139a2565b81151561350357fe5b0490509392505050565b8373ffffffffffffffffffffffffffffffffffffffff166323b872dd8484846040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b1580156135e457600080fd5b505af11580156135f8573d6000803e3d6000fd5b505050506040513d602081101561360e57600080fd5b8101908080519060200190929190505050151561362757fe5b50505050565b61365d818460010160008560001916600019168152602001908152602001600020546136e090919063ffffffff16565b836001016000846000191660001916815260200190815260200160002081905550505050565b6000813b9050919050565b60006136986139d5565b9050919050565b80600c819055507f68170b705528d3ff1d324cda28eb28cc3d11ce81207f157c05e11c18411a013c816040518082815260200191505060405180910390a150565b60008082840190506136f2848461328d565b151561370057809150613741565b600084121515613726578360ff60019060020a021903831315151561372157fe5b61373d565b8360ff60019060020a0203831215151561373c57fe5b5b8091505b5092915050565b60008484600060038110151561375a57fe5b602002015185600160038110151561376e57fe5b602002015186600260038110151561378257fe5b602002015186600060058110151561379657fe5b60200201518760016005811015156137aa57fe5b60200201518860026005811015156137be57fe5b60200201518960036005811015156137d257fe5b60200201518a60046005811015156137e657fe5b60200201518a604051602001808b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018781526020018681526020018581526020018481526020018381526020018281526020019a50505050505050505050506040516020818303038152906040526040518082805190602001908083835b60208310151561396b5780518252602082019150602081019050602083039250613946565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390209050949350505050565b600080828402905060008414806139c357508284828115156139c057fe5b04145b15156139cb57fe5b8091505092915050565b6000806139f5731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed613683565b1115613a9757731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550613a8e6040805190810160405280600b81526020017f6574685f6d61696e6e6574000000000000000000000000000000000000000000815250613e6b565b60019050613e68565b6000613ab673c03a2615d5efaf5f49f60b7bb6583eaec212fdf1613683565b1115613b585773c03a2615d5efaf5f49f60b7bb6583eaec212fdf1601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550613b4f6040805190810160405280600c81526020017f6574685f726f707374656e330000000000000000000000000000000000000000815250613e6b565b60019050613e68565b6000613b7773b7a07bcf2ba2f2703b24c0691b5278999c59ac7e613683565b1115613c195773b7a07bcf2ba2f2703b24c0691b5278999c59ac7e601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550613c106040805190810160405280600981526020017f6574685f6b6f76616e0000000000000000000000000000000000000000000000815250613e6b565b60019050613e68565b6000613c3873146500cfd35b22e4a392fe0adc06de1a1368ed48613683565b1115613cda5773146500cfd35b22e4a392fe0adc06de1a1368ed48601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550613cd16040805190810160405280600b81526020017f6574685f72696e6b656279000000000000000000000000000000000000000000815250613e6b565b60019050613e68565b6000613cf9736f485c8bf6fc43ea212e93bbf8ce046c7f1cb475613683565b1115613d5d57736f485c8bf6fc43ea212e93bbf8ce046c7f1cb475601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060019050613e68565b6000613d7c7320e12a1f859b3feae5fb2a0a32c18f5a65555bbf613683565b1115613de0577320e12a1f859b3feae5fb2a0a32c18f5a65555bbf601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060019050613e68565b6000613dff7351efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa613683565b1115613e63577351efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060019050613e68565b600090505b90565b8060139080519060200190613e81929190613e85565b5050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10613ec657805160ff1916838001178555613ef4565b82800160010185558215613ef4579182015b82811115613ef3578251825591602001919060010190613ed8565b5b509050613f019190613f97565b5090565b61012060405190810160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff1681526020016000815260200160008152602001600081526020016000815260200160008152602001600080191681525090565b613fb991905b80821115613fb5576000816000905550600101613f9d565b5090565b905600a165627a7a723058202e1b0d544d6f26cab5c2c3d7c2434937ee68fcc2580418f20a2edf6a5f044a7e0029", - "deployedBytecode": "0x60806040526004361061015f576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806302d05d3f14610164578063053f14da146101bb5780630c8eb675146101e657806327dc297e146102765780632fed1b00146102ed578063323bb775146103185780633270bb5b1461036f57806338bbfa501461039e5780633b3c4ae91461045b578063411449bb1461048a5780634c258eb1146104b557806356357d91146104fa5780635ea7867a1461058a578063614d08f81461061a5780636db7f77c146106aa578063798ddbc8146106b4578063930a9d921461070b578063a8e77c9a14610793578063b5471dee146107ea578063bb4b573414610815578063c201293b14610840578063c32b1dfa14610883578063ca361d67146108ae578063d514d12c146108d9578063f348e8b214610930578063fa3fa1961461095b578063fc51b9c51461099e575b600080fd5b34801561017057600080fd5b506101796109fd565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101c757600080fd5b506101d0610a22565b6040518082815260200191505060405180910390f35b3480156101f257600080fd5b506101fb610a28565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561023b578082015181840152602081019050610220565b50505050905090810190601f1680156102685780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561028257600080fd5b506102eb6004803603810190808035600019169060200190929190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290505050610ac6565b005b3480156102f957600080fd5b50610302610b09565b6040518082815260200191505060405180910390f35b34801561032457600080fd5b5061032d610b0f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561037b57600080fd5b50610384610b35565b604051808215151515815260200191505060405180910390f35b3480156103aa57600080fd5b506104596004803603810190808035600019169060200190929190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290505050610b48565b005b34801561046757600080fd5b50610470610cba565b604051808215151515815260200191505060405180910390f35b34801561049657600080fd5b5061049f610ccd565b6040518082815260200191505060405180910390f35b3480156104c157600080fd5b506104e46004803603810190808035600019169060200190929190505050610cd4565b6040518082815260200191505060405180910390f35b34801561050657600080fd5b5061050f610cf1565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561054f578082015181840152602081019050610534565b50505050905090810190601f16801561057c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561059657600080fd5b5061059f610d8f565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156105df5780820151818401526020810190506105c4565b50505050905090810190601f16801561060c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561062657600080fd5b5061062f610e2d565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561066f578082015181840152602081019050610654565b50505050905090810190601f16801561069c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6106b2610ecb565b005b3480156106c057600080fd5b506106c9611119565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561071757600080fd5b5061077d600480360381019080806060019091929192908060a0019091929192908035906020019092919080359060200190929190803560ff1690602001909291908035600019169060200190929190803560001916906020019092919050505061113f565b6040518082815260200191505060405180910390f35b34801561079f57600080fd5b506107a8611b0f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156107f657600080fd5b506107ff611b35565b6040518082815260200191505060405180910390f35b34801561082157600080fd5b5061082a611b3b565b6040518082815260200191505060405180910390f35b34801561084c57600080fd5b50610881600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611b41565b005b34801561088f57600080fd5b50610898611d8f565b6040518082815260200191505060405180910390f35b3480156108ba57600080fd5b506108c3611d95565b6040518082815260200191505060405180910390f35b3480156108e557600080fd5b506108ee611d9b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561093c57600080fd5b50610945611dc1565b6040518082815260200191505060405180910390f35b34801561096757600080fd5b5061099c600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611dc7565b005b3480156109aa57600080fd5b506109e7600480360381019080806060019091929192908060a0019091929192908035906020019092919080359060200190929190505050611f1c565b6040518082815260200191505060405180910390f35b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600b5481565b60168054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610abe5780601f10610a9357610100808354040283529160200191610abe565b820191906000526020600020905b815481529060010190602001808311610aa157829003601f168201915b505050505081565b610b05828260006040519080825280601f01601f191660200182016040528015610aff5781602001602082028038833980820191505090505b50610b48565b5050565b60085481565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600d60009054906101000a900460ff1681565b610b506121a0565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610b8957600080fd5b60176000846000191660001916815260200190815260200160002060009054906101000a900460ff161515610bbd57600080fd5b8160169080519060200190610bd3929190613e85565b50610be082600854612502565b600b819055507f3e19f2256bddc30aeab8054ccbd86723452d07f687b94441de69c05ee212dafa826040518080602001828103825283818151815260200191508051906020019080838360005b83811015610c48578082015181840152602081019050610c2d565b50505050905090810190601f168015610c755780820380516001836020036101000a031916815260200191505b509250505060405180910390a1610c8a6127f6565b60176000846000191660001916815260200190815260200160002060006101000a81549060ff0219169055505050565b600d60019054906101000a900460ff1681565b620249f081565b6000610cea82600f6128c690919063ffffffff16565b9050919050565b60148054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610d875780601f10610d5c57610100808354040283529160200191610d87565b820191906000526020600020905b815481529060010190602001808311610d6a57829003601f168201915b505050505081565b60158054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610e255780601f10610dfa57610100808354040283529160200191610e25565b820191906000526020600020905b815481529060010190602001808311610e0857829003601f168201915b505050505081565b60048054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610ec35780601f10610e9857610100808354040283529160200191610ec3565b820191906000526020600020905b815481529060010190602001808311610ea657829003601f168201915b505050505081565b600080610f7560148054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610f675780601f10610f3c57610100808354040283529160200191610f67565b820191906000526020600020905b815481529060010190602001808311610f4a57829003601f168201915b5050505050620249f061291d565b9150813410151515610f8657600080fd5b6110c860148054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561101f5780601f10610ff45761010080835404028352916020019161101f565b820191906000526020600020905b81548152906001019060200180831161100257829003601f168201915b505050505060158054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156110ba5780601f1061108f576101008083540402835291602001916110ba565b820191906000526020600020905b81548152906001019060200180831161109d57829003601f168201915b5050505050620249f0612cfa565b905060006001028160001916141515156110e157600080fd5b600160176000836000191660001916815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000611149613f05565b6000806000806000600d60019054906101000a900460ff16801561117a5750600d60009054906101000a900460ff16155b151561118557600080fd5b60008c14158015611197575060008b14155b80156111b257506111b18b8d61328d90919063ffffffff16565b5b15156111bd57600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663cfab472f30336040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b1580156112ae57600080fd5b505af11580156112c2573d6000803e3d6000fd5b505050506040513d60208110156112d857600080fd5b810190808051906020019092919050505015156112f457600080fd5b61136b8e600380602002604051908101604052809291908260036020028082843782019150505050508e600580602002604051908101604052809291908260056020028082843782019150505050508e3073ffffffffffffffffffffffffffffffffffffffff166132a7909392919063ffffffff16565b9550600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663cfab472f3088600001516040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b15801561146257600080fd5b505af1158015611476573d6000803e3d6000fd5b505050506040513d602081101561148c57600080fd5b810190808051906020019092919050505015156114a857600080fd5b600073ffffffffffffffffffffffffffffffffffffffff16866020015173ffffffffffffffffffffffffffffffffffffffff16148061151657503373ffffffffffffffffffffffffffffffffffffffff16866020015173ffffffffffffffffffffffffffffffffffffffff16145b151561152157600080fd5b600073ffffffffffffffffffffffffffffffffffffffff16866000015173ffffffffffffffffffffffffffffffffffffffff161415801561159257503373ffffffffffffffffffffffffffffffffffffffff16866000015173ffffffffffffffffffffffffffffffffffffffff1614155b151561159d57600080fd5b856000015173ffffffffffffffffffffffffffffffffffffffff1673__OrderLib______________________________638163681e90918861010001518d8d8d6040518663ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200185600019166000191681526020018460ff1660ff168152602001836000191660001916815260200182600019166000191681526020019550505050505060206040518083038186803b15801561169357600080fd5b505af41580156116a7573d6000803e3d6000fd5b505050506040513d60208110156116bd57600080fd5b810190808051906020019092919050505015156116d957600080fd5b8560c00151421015156117325785610100015160001916600060018111156116fd57fe5b7fe6104340582083fe7674a149f8da127b9d3d7f74a88ccd7610562eb5b61b919360405160405180910390a360009650611afe565b611752611743876101000151610cd4565b8d61343990919063ffffffff16565b945060008514156117a8578561010001516000191660018081111561177357fe5b7fe6104340582083fe7674a149f8da127b9d3d7f74a88ccd7610562eb5b61b919360405160405180910390a360009650611afe565b6117b2858c613450565b9650600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663eeaba0838760000151338a8a60a001516040518563ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828152602001945050505050600060405180830381600087803b1580156118bd57600080fd5b505af11580156118d1573d6000803e3d6000fd5b505050506118f086610100015188600f6134799092919063ffffffff16565b6000935060009250600073ffffffffffffffffffffffffffffffffffffffff16866040015173ffffffffffffffffffffffffffffffffffffffff16141515611a455761193b876134cf565b9150611946876134cf565b90506000866060015111156119c85761196e828288606001516134ed9092919063ffffffff16565b93506119c78660000151876040015186600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661350d909392919063ffffffff16565b5b600086608001511115611a44576119ee828288608001516134ed9092919063ffffffff16565b9250611a4333876040015185600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661350d909392919063ffffffff16565b5b5b856040015173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16876000015173ffffffffffffffffffffffffffffffffffffffff167ff756998387aae83a81d5053664c1ed50a128ecd4e82cc2e135b5a2f367841f598a88888c60a001518d61010001516040518086815260200185815260200184815260200183815260200182600019166000191681526020019550505050505060405180910390a48696505b505050505050979650505050505050565b600d60029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60065481565b600a5481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611b9d57600080fd5b600d60019054906101000a900460ff16151515611bb957600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515611bf557600080fd5b80600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055503073ffffffffffffffffffffffffffffffffffffffff16600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637bb55cd26040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015611cd357600080fd5b505af1158015611ce7573d6000803e3d6000fd5b505050506040513d6020811015611cfd57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16141515611d3057600080fd5b80600d60026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600d60016101000a81548160ff02191690831515021790555050565b60075481565b60095481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600c5481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611e2257600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515611e5e57600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f7f11fe0c7098e1a76afcc68f35abaa07ef156fa7d6dd2d39664812fe37348d1660405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000611f26613f05565b6000808414158015611f475750611f46858561328d90919063ffffffff16565b5b1515611f5257600080fd5b600d60009054906101000a900460ff16151515611f6e57600080fd5b611fe587600380602002604051908101604052809291908260036020028082843782019150505050508760058060200260405190810160405280929190826005602002808284378201915050505050873073ffffffffffffffffffffffffffffffffffffffff166132a7909392919063ffffffff16565b91503373ffffffffffffffffffffffffffffffffffffffff16826000015173ffffffffffffffffffffffffffffffffffffffff1614151561202557600080fd5b8160c001514210151561207e57816101000151600019166000600181111561204957fe5b7fe6104340582083fe7674a149f8da127b9d3d7f74a88ccd7610562eb5b61b919360405160405180910390a360009250612196565b61209e61208f836101000151610cd4565b8661343990919063ffffffff16565b905060008114156120f457816101000151600019166001808111156120bf57fe5b7fe6104340582083fe7674a149f8da127b9d3d7f74a88ccd7610562eb5b61b919360405160405180910390a360009250612196565b6120fe8482613450565b925061211b82610100015184600f61362d9092919063ffffffff16565b81610100015160001916826040015173ffffffffffffffffffffffffffffffffffffffff16836000015173ffffffffffffffffffffffffffffffffffffffff167f7de4479e80e82e22edb1e0010433c8befc804c34988024fa0b0234715102cd8f866040518082815260200191505060405180910390a48292505b5050949350505050565b600080601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16148061221257506000612210601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16613683565b145b1561222357612221600061368e565b505b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156122a957600080fd5b505af11580156122bd573d6000803e3d6000fd5b505050506040513d60208110156122d357600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151561243c57601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156123c057600080fd5b505af11580156123d4573d6000803e3d6000fd5b505050506040513d60208110156123ea57600080fd5b8101908080519060200190929190505050601260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c281d19e6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156124c257600080fd5b505af11580156124d6573d6000803e3d6000fd5b505050506040513d60208110156124ec57600080fd5b8101908080519060200190929190505050905090565b6000606060008060008693506000925060009150600090505b83518110156127d75760307f010000000000000000000000000000000000000000000000000000000000000002848281518110151561255657fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161015801561266e575060397f01000000000000000000000000000000000000000000000000000000000000000284828151811015156125fe57fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191611155b1561271f578115612691576000861415612687576127d7565b8580600190039650505b600a83029250603084828151811015156126a757fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027f0100000000000000000000000000000000000000000000000000000000000000900403830192506127ca565b602e7f010000000000000000000000000000000000000000000000000000000000000002848281518110151561275157fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614156127c957600191505b5b808060010191505061251b565b60008611156127e95785600a0a830292505b8294505050505092915050565b6000600d60009054906101000a900460ff1615612812576128c3565b600a54421115612841576001600d60006101000a81548160ff021916908315150217905550600b5490506128a3565b600654600b54101515612873576001600d60006101000a81548160ff02191690831515021790555060065490506128a2565b600754600b541115156128a1576001600d60006101000a81548160ff02191690831515021790555060075490505b5b5b600d60009054906101000a900460ff16156128c2576128c18161369f565b5b5b50565b60006129158360010160008460001916600019168152602001908152602001600020548460000160008560001916600019168152602001908152602001600020546136e090919063ffffffff16565b905092915050565b600080601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16148061298f5750600061298d601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16613683565b145b156129a05761299e600061368e565b505b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015612a2657600080fd5b505af1158015612a3a573d6000803e3d6000fd5b505050506040513d6020811015612a5057600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515612bb957601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015612b3d57600080fd5b505af1158015612b51573d6000803e3d6000fd5b505050506040513d6020811015612b6757600080fd5b8101908080519060200190929190505050601260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632ef3accc84846040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b83811015612c6a578082015181840152602081019050612c4f565b50505050905090810190601f168015612c975780820380516001836020036101000a031916815260200191505b509350505050602060405180830381600087803b158015612cb757600080fd5b505af1158015612ccb573d6000803e3d6000fd5b505050506040513d6020811015612ce157600080fd5b8101908080519060200190929190505050905092915050565b6000806000601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161480612d6e57506000612d6c601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16613683565b145b15612d7f57612d7d600061368e565b505b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015612e0557600080fd5b505af1158015612e19573d6000803e3d6000fd5b505050506040513d6020811015612e2f57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515612f9857601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015612f1c57600080fd5b505af1158015612f30573d6000803e3d6000fd5b505050506040513d6020811015612f4657600080fd5b8101908080519060200190929190505050601260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632ef3accc86856040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b8381101561304957808201518184015260208101905061302e565b50505050905090810190601f1680156130765780820380516001836020036101000a031916815260200191505b509350505050602060405180830381600087803b15801561309657600080fd5b505af11580156130aa573d6000803e3d6000fd5b505050506040513d60208110156130c057600080fd5b81019080805190602001909291905050509050601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c51be90f8260008888886040518663ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b83811015613192578082015181840152602081019050613177565b50505050905090810190601f1680156131bf5780820380516001836020036101000a031916815260200191505b50838103825285818151815260200191508051906020019080838360005b838110156131f85780820151818401526020810190506131dd565b50505050905090810190601f1680156132255780820380516001836020036101000a031916815260200191505b5096505050505050506020604051808303818588803b15801561324757600080fd5b505af115801561325b573d6000803e3d6000fd5b50505050506040513d602081101561327257600080fd5b81019080805190602001909291905050509150509392505050565b60008183148061329f57506000828402135b905092915050565b6132af613f05565b8360006003811015156132be57fe5b6020020151816000019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505083600160038110151561330957fe5b6020020151816020019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505083600260038110151561335457fe5b6020020151816040019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505082600060058110151561339f57fe5b60200201518160600181815250508260016005811015156133bc57fe5b60200201518160800181815250508260026005811015156133d957fe5b60200201518160a00181815250508260036005811015156133f657fe5b60200201518160c0018181525050818160e001818152505061341a85858585613748565b8161010001906000191690816000191681525050809050949350505050565b600061344883836000036136e0565b905092915050565b600061345b826134cf565b613464846134cf565b1061346f5781613471565b825b905092915050565b6134a9818460000160008560001916600019168152602001908152602001600020546136e090919063ffffffff16565b836000016000846000191660001916815260200190815260200160002081905550505050565b6000808212156134e4578160000390506134e8565b8190505b919050565b6000816134fa85856139a2565b81151561350357fe5b0490509392505050565b8373ffffffffffffffffffffffffffffffffffffffff166323b872dd8484846040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b1580156135e457600080fd5b505af11580156135f8573d6000803e3d6000fd5b505050506040513d602081101561360e57600080fd5b8101908080519060200190929190505050151561362757fe5b50505050565b61365d818460010160008560001916600019168152602001908152602001600020546136e090919063ffffffff16565b836001016000846000191660001916815260200190815260200160002081905550505050565b6000813b9050919050565b60006136986139d5565b9050919050565b80600c819055507f68170b705528d3ff1d324cda28eb28cc3d11ce81207f157c05e11c18411a013c816040518082815260200191505060405180910390a150565b60008082840190506136f2848461328d565b151561370057809150613741565b600084121515613726578360ff60019060020a021903831315151561372157fe5b61373d565b8360ff60019060020a0203831215151561373c57fe5b5b8091505b5092915050565b60008484600060038110151561375a57fe5b602002015185600160038110151561376e57fe5b602002015186600260038110151561378257fe5b602002015186600060058110151561379657fe5b60200201518760016005811015156137aa57fe5b60200201518860026005811015156137be57fe5b60200201518960036005811015156137d257fe5b60200201518a60046005811015156137e657fe5b60200201518a604051602001808b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018781526020018681526020018581526020018481526020018381526020018281526020019a50505050505050505050506040516020818303038152906040526040518082805190602001908083835b60208310151561396b5780518252602082019150602081019050602083039250613946565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390209050949350505050565b600080828402905060008414806139c357508284828115156139c057fe5b04145b15156139cb57fe5b8091505092915050565b6000806139f5731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed613683565b1115613a9757731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550613a8e6040805190810160405280600b81526020017f6574685f6d61696e6e6574000000000000000000000000000000000000000000815250613e6b565b60019050613e68565b6000613ab673c03a2615d5efaf5f49f60b7bb6583eaec212fdf1613683565b1115613b585773c03a2615d5efaf5f49f60b7bb6583eaec212fdf1601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550613b4f6040805190810160405280600c81526020017f6574685f726f707374656e330000000000000000000000000000000000000000815250613e6b565b60019050613e68565b6000613b7773b7a07bcf2ba2f2703b24c0691b5278999c59ac7e613683565b1115613c195773b7a07bcf2ba2f2703b24c0691b5278999c59ac7e601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550613c106040805190810160405280600981526020017f6574685f6b6f76616e0000000000000000000000000000000000000000000000815250613e6b565b60019050613e68565b6000613c3873146500cfd35b22e4a392fe0adc06de1a1368ed48613683565b1115613cda5773146500cfd35b22e4a392fe0adc06de1a1368ed48601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550613cd16040805190810160405280600b81526020017f6574685f72696e6b656279000000000000000000000000000000000000000000815250613e6b565b60019050613e68565b6000613cf9736f485c8bf6fc43ea212e93bbf8ce046c7f1cb475613683565b1115613d5d57736f485c8bf6fc43ea212e93bbf8ce046c7f1cb475601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060019050613e68565b6000613d7c7320e12a1f859b3feae5fb2a0a32c18f5a65555bbf613683565b1115613de0577320e12a1f859b3feae5fb2a0a32c18f5a65555bbf601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060019050613e68565b6000613dff7351efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa613683565b1115613e63577351efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060019050613e68565b600090505b90565b8060139080519060200190613e81929190613e85565b5050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10613ec657805160ff1916838001178555613ef4565b82800160010185558215613ef4579182015b82811115613ef3578251825591602001919060010190613ed8565b5b509050613f019190613f97565b5090565b61012060405190810160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff1681526020016000815260200160008152602001600081526020016000815260200160008152602001600080191681525090565b613fb991905b80821115613fb5576000816000905550600101613f9d565b5090565b905600a165627a7a723058202e1b0d544d6f26cab5c2c3d7c2434937ee68fcc2580418f20a2edf6a5f044a7e0029", - "sourceMap": "875:5632:13:-;;;2308:5:3;2284:29;;;;;;;;;;;;;;;;;;;;2364:5;2319:50;;;;;;;;;;;;;;;;;;;;2601:1060:13;8:9:-1;5:2;;;30:1;27;20:12;5:2;2601:1060:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2918:12;2940:14;2964:18;2992:22;3024:28;3062:13;1017:10:0;1007:7;;:20;;;;;;;;;;;;;;;;;;4580:28:3;4546:31;;:62;;;;;;;;;;;;;;;;;;4638:18;4618:17;;:38;;;;;;;;;;;;;;;;;;4690:18;4666:9;;:43;;;;;;;;;;;;;;;;;;4727:9;;;;;;;;;;;:48;;;4776:10;4727:60;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4727:60:3;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;4727:60:3;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;4727:60:3;;;;;;;;;;;;;;;;4719:69;;;;;;;;4845:13;4859:1;4845:16;;;;;;;;;;;;;4831:11;:30;;;;4883:13;4897:1;4883:16;;;;;;;;;;;;;4871:9;:28;;;;4929:11;;4917:9;;:23;4909:32;;;;;;;;4975:13;4989:1;4975:16;;;;;;;;;;;;;4952:20;:39;;;;5018:13;5032:1;5018:16;;;;;;;;;;;;;5001:14;:33;;;;5057:13;5071:1;5057:16;;;;;;;;;;;;;5044:10;:29;;;;5104:3;5091:10;;:16;5083:25;;;;;;;;5135:12;5119:13;:28;;;;;;;;;;;;:::i;:::-;;5184:22;5157:24;;:49;;;;;;;;;;;;;;;;;;5226:14;5216:7;;:24;;;;;;;;;;;;;;;;;;4293:954;;;;;;3104:58:13;1928:4:17;3144:17:13;;1884:4:17;3122:19:13;;:39;3104:17;;;:58;;;:::i;:::-;3303:16;3282:18;:37;;;;;;;;;;;;:::i;:::-;;3344:11;3329:12;:26;;;;;;;;;;;;:::i;:::-;;3544:7;3537:3;3524:10;;:16;:27;;3516:36;;;;;;;;3562:13;:11;;;:13;;;:::i;:::-;2601:1060;;;;;;;;875:5632;;6602:114:17;2254:1;2248:3;;;;;;;;;;;2240:15;;;2239:49;;;;2286:1;2259:25;2279:3;;;;;;;;;;;2259:11;;;:25;;;:::i;:::-;:28;2239:49;2236:101;;;2302:35;1970:1;2302:19;;;:35;;;:::i;:::-;;2236:101;2372:3;;;;;;;;;;;:14;;;:16;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2372:16:17;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2372:16:17;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2372:16:17;;;;;;;;;;;;;;;;2351:37;;2359:8;;;;;;;;;;;2351:37;;;;2348:92;;;2423:3;;;;;;;;;;;:14;;;:16;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2423:16:17;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2423:16:17;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2423:16:17;;;;;;;;;;;;;;;;2402:8;;:38;;;;;;;;;;;;;;;;;;2348:92;6680:8;;;;;;;;;;;:21;;;6702:6;6680:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6680:29:17;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6680:29:17;;;;6602:114;:::o;5573:932:13:-;6272:15;6290:138;6318:10;;6342:18;6290:138;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6374:12;6290:138;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1104:6;6290:14;;;:138;;;:::i;:::-;6272:156;;6457:1;6446:12;;:7;:12;;;;;6438:21;;;;;;;;6494:4;6469:13;:22;6483:7;6469:22;;;;;;;;;;;;;;;;;;:29;;;;;;;;;;;;;;;;;;5573:932;:::o;6858:150:17:-;6920:10;6986:5;6974:18;6965:27;;6951:51;;;:::o;2564:183::-;2627:4;2647:21;:19;;;:21;;;:::i;:::-;2640:28;;2564:183;;;:::o;5732:383::-;5848:10;5869;2254:1;2248:3;;;;;;;;;;;2240:15;;;2239:49;;;;2286:1;2259:25;2279:3;;;;;;;;;;;2259:11;;;:25;;;:::i;:::-;:28;2239:49;2236:101;;;2302:35;1970:1;2302:19;;;:35;;;:::i;:::-;;2236:101;2372:3;;;;;;;;;;;:14;;;:16;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2372:16:17;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2372:16:17;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2372:16:17;;;;;;;;;;;;;;;;2351:37;;2359:8;;;;;;;;;;;2351:37;;;;2348:92;;;2423:3;;;;;;;;;;;:14;;;:16;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2423:16:17;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2423:16:17;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2423:16:17;;;;;;;;;;;;;;;;2402:8;;:38;;;;;;;;;;;;;;;;;;2348:92;5882:8;;;;;;;;;;;:17;;;5900:10;5912:8;5882:39;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;5882:39:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;5882:39:17;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;5882:39:17;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;5882:39:17;;;;;;;;;;;;;;;;5869:52;;6030:8;;;;;;;;;;;:27;;;6064:5;6071:9;6082:10;6094:3;6099:8;6030:78;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;6030:78:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;6030:78:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6030:78:17;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6030:78:17;;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;6030:78:17;;;;;;;;;;;;;;;;6023:85;;5732:383;;;;;;;:::o;2752:1749::-;2800:4;2875:1;2819:55;2831:42;2819:11;;;:55;;;:::i;:::-;:57;2815:245;;;2929:42;2901:3;;:71;;;;;;;;;;;;;;;;;;2986:38;;;;;;;;;;;;;;;;;;;:23;;;:38;;;:::i;:::-;3045:4;3038:11;;;;2815:245;3129:1;3073:55;3085:42;3073:11;;;:55;;;:::i;:::-;:57;3069:254;;;3191:42;3163:3;;:71;;;;;;;;;;;;;;;;;;3248:39;;;;;;;;;;;;;;;;;;;:23;;;:39;;;:::i;:::-;3308:4;3301:11;;;;3069:254;3392:1;3336:55;3348:42;3336:11;;;:55;;;:::i;:::-;:57;3332:249;;;3452:42;3424:3;;:71;;;;;;;;;;;;;;;;;;3509:36;;;;;;;;;;;;;;;;;;;:23;;;:36;;;:::i;:::-;3566:4;3559:11;;;;3332:249;3650:1;3594:55;3606:42;3594:11;;;:55;;;:::i;:::-;:57;3590:253;;;3712:42;3684:3;;:71;;;;;;;;;;;;;;;;;;3769:38;;;;;;;;;;;;;;;;;;;:23;;;:38;;;:::i;:::-;3828:4;3821:11;;;;3590:253;3912:1;3856:55;3868:42;3856:11;;;:55;;;:::i;:::-;:57;3852:201;;;3974:42;3946:3;;:71;;;;;;;;;;;;;;;;;;4038:4;4031:11;;;;3852:201;4122:1;4066:55;4078:42;4066:11;;;:55;;;:::i;:::-;:57;4062:200;;;4183:42;4155:3;;:71;;;;;;;;;;;;;;;;;;4247:4;4240:11;;;;4062:200;4331:1;4275:55;4287:42;4275:11;;;:55;;;:::i;:::-;:57;4271:202;;;4394:42;4366:3;;:71;;;;;;;;;;;;;;;;;;4458:4;4451:11;;;;4271:202;4489:5;4482:12;;2752:1749;;:::o;7645:118::-;7743:13;7719:21;:37;;;;;;;;;;;;:::i;:::-;;7645:118;:::o;875:5632:13:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;", - "deployedSourceMap": "875:5632:13:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;947:22:0;;8:9:-1;5:2;;;30:1;27;20:12;5:2;947:22:0;;;;;;;;;;;;;;;;;;;;;;;;;;;2224:21:3;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2224:21:3;;;;;;;;;;;;;;;;;;;;;;;1251:34:13;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1251:34:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;1251:34:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4507:111:17;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4507:111:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1935:32:3;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1935:32:3;;;;;;;;;;;;;;;;;;;;;;;1834:39;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1834:39:3;;;;;;;;;;;;;;;;;;;;;;;;;;;2284:29;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2284:29:3;;;;;;;;;;;;;;;;;;;;;;;;;;;4930:528:13;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4930:528:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2319:50:3;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2319:50:3;;;;;;;;;;;;;;;;;;;;;;;;;;;1062:48:13;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1062:48:13;;;;;;;;;;;;;;;;;;;;;;;12629:168:3;;8:9:-1;5:2;;;30:1;27;20:12;5:2;12629:168:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;992:32:13;;8:9:-1;5:2;;;30:1;27;20:12;5:2;992:32:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;992:32:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1030:26;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1030:26:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;1030:26:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1801:27:3;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1801:27:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;1801:27:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4051:599:13;;;;;;1734:32:3;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1734:32:3;;;;;;;;;;;;;;;;;;;;;;;;;;;5771:2986;;8:9:-1;5:2;;;30:1;27;20:12;5:2;5771:2986:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2394:45;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2394:45:3;;;;;;;;;;;;;;;;;;;;;;;;;;;1879:21;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1879:21:3;;;;;;;;;;;;;;;;;;;;;;;2172:22;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2172:22:3;;;;;;;;;;;;;;;;;;;;;;;10874:540;;8:9:-1;5:2;;;30:1;27;20:12;5:2;10874:540:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;1906:23;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1906:23:3;;;;;;;;;;;;;;;;;;;;;;;2047:26;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2047:26:3;;;;;;;;;;;;;;;;;;;;;;;1682:46;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1682:46:3;;;;;;;;;;;;;;;;;;;;;;;;;;;2251:27;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2251:27:3;;;;;;;;;;;;;;;;;;;;;;;1131:198:0;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1131:198:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;9228:1354:3;;8:9:-1;5:2;;;30:1;27;20:12;5:2;9228:1354:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;947:22:0;;;;;;;;;;;;;:::o;2224:21:3:-;;;;:::o;1251:34:13:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;4507:111:17:-;4573:38;4584:4;4590:6;4608:1;4598:12;;;;;;;;;;;;;;;;;;;;;;;;;29:2:-1;21:6;17:15;117:4;105:10;97:6;88:34;148:4;140:6;136:17;126:27;;0:157;4598:12:17;;;;4573:10;:38::i;:::-;4507:111;;:::o;1935:32:3:-;;;;:::o;1834:39::-;;;;;;;;;;;;;:::o;2284:29::-;;;;;;;;;;;;;:::o;4930:528:13:-;5034:20;:18;:20::i;:::-;5020:34;;:10;:34;;;5012:43;;;;;;;;5073:13;:22;5087:7;5073:22;;;;;;;;;;;;;;;;;;;;;;;;;;;5065:31;;;;;;;;5168:6;5145:20;:29;;;;;;;;;;;;:::i;:::-;;5196:38;5205:6;5213:20;;5196:8;:38::i;:::-;5184:9;:50;;;;5249:24;5266:6;5249:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;5249:24:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5283:17;:15;:17::i;:::-;5384:13;:22;5398:7;5384:22;;;;;;;;;;;;;;;;;;5377:29;;;;;;;;;;;4930:528;;;:::o;2319:50:3:-;;;;;;;;;;;;;:::o;1062:48:13:-;1104:6;1062:48;:::o;12629:168:3:-;12711:3;12733:57;12780:9;12733:13;:46;;:57;;;;:::i;:::-;12726:64;;12629:168;;;:::o;992:32:13:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;1030:26::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;1801:27:3:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;4051:599:13:-;4112:9;4441:15;4124:57;4142:18;4124:57;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1104:6;4124:17;:57::i;:::-;4112:69;;4212:4;4199:9;:17;;4191:26;;;;;;;;4459:114;4487:18;4459:114;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4519:12;4459:114;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1104:6;4459:14;:114::i;:::-;4441:132;;4602:1;4591:12;;:7;:12;;;;;4583:21;;;;;;;;4639:4;4614:13;:22;4628:7;4614:22;;;;;;;;;;;;;;;;;;:29;;;;;;;;;;;;;;;;;;4051:599;;:::o;1734:32:3:-;;;;;;;;;;;;;:::o;5771:2986::-;5987:13;6297:27;;:::i;:::-;7033:16;7591:17;7622;7759;7808:16;6024:30;;;;;;;;;;;:44;;;;;6059:9;;;;;;;;;;;6058:10;6024:44;6016:53;;;;;;;;6129:1;6117:8;:13;;:31;;;;;6147:1;6134:9;:14;;6117:31;:65;;;;;6152:30;6172:9;6152:8;:19;;:30;;;;:::i;:::-;6117:65;6109:74;;;;;;;;6234:9;;;;;;;;;;;:34;;;6269:4;6275:10;6234:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6234:52:3;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6234:52:3;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;6234:52:3;;;;;;;;;;;;;;;;6226:61;;;;;;;;6327:72;6353:14;6327:72;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6369:19;6327:72;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6390:8;6335:4;6327:25;;;;:72;;;;;;:::i;:::-;6297:102;;6417:9;;;;;;;;;;;:34;;;6452:4;6458:5;:11;;;6417:53;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6417:53:3;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6417:53:3;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;6417:53:3;;;;;;;;;;;;;;;;6409:62;;;;;;;;6573:1;6550:25;;:5;:11;;;:25;;;:54;;;;6594:10;6579:25;;:5;:11;;;:25;;;6550:54;6542:63;;;;;;;;6681:1;6658:25;;:5;:11;;;:25;;;;:54;;;;;6702:10;6687:25;;:5;:11;;;:25;;;;6658:54;6650:63;;;;;;;;6744:5;:11;;;:28;;;;;;6790:5;:15;;;6823:1;6842;6861;6744:128;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6744:128:3;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6744:128:3;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;6744:128:3;;;;;;;;;;;;;;;;6723:150;;;;;;;;6896:5;:25;;;6889:3;:32;;6885:138;;;6974:5;:15;;;6942:48;;;6948:24;6942:48;;;;;;;;;;;;;;;;;;7011:1;7004:8;;;;6885:138;7052:68;7070:49;7103:5;:15;;;7070:32;:49::i;:::-;7052:8;:17;;:68;;;;:::i;:::-;7033:87;;7150:1;7134:12;:17;7130:165;;;7246:5;:15;;;7217:45;;;7223:21;7217:45;;;;;;;;;;;;;;;;;;7283:1;7276:8;;;;7130:165;7317:39;7332:12;7346:9;7317:14;:39::i;:::-;7305:51;;7366:20;;;;;;;;;;;:36;;;7416:5;:11;;;7441:10;7465:9;7488:5;:11;;;7366:143;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;7366:143:3;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;7366:143:3;;;;7519:61;7553:5;:15;;;7570:9;7519:13;:33;;:61;;;;;:::i;:::-;7611:1;7591:21;;7642:1;7622:21;;7688:1;7658:32;;:5;:18;;;:32;;;;7654:823;;;7779:15;:9;:13;:15::i;:::-;7759:35;;7827:15;:9;:13;:15::i;:::-;7808:34;;7877:1;7860:5;:14;;;:18;7856:299;;;7913:58;7945:12;7959:11;7913:5;:14;;;:31;;:58;;;;;:::i;:::-;7898:73;;7989:151;8037:5;:11;;;8070:5;:18;;;8110:12;7989:9;;;;;;;;;;;:26;;;;:151;;;;;;:::i;:::-;7856:299;8190:1;8173:5;:14;;;:18;8169:298;;;8226:58;8258:12;8272:11;8226:5;:14;;;:31;;:58;;;;;:::i;:::-;8211:73;;8302:150;8350:10;8382:5;:18;;;8422:12;8302:9;;;;;;;;;;;:26;;;;:150;;;;;;:::i;:::-;8169:298;7654:823;8566:5;:18;;;8492:231;;8542:10;8492:231;;8517:5;:11;;;8492:231;;;8598:9;8621:12;8647;8673:5;:11;;;8698:5;:15;;;8492:231;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8741:9;8734:16;;5771:2986;;;;;;;;;;;;;;;;:::o;2394:45::-;;;;;;;;;;;;;:::o;1879:21::-;;;;:::o;2172:22::-;;;;:::o;10874:540::-;14315:31;;;;;;;;;;;14301:45;;:10;:45;;;14293:54;;;;;;;;10977:30;;;;;;;;;;;10976:31;10968:40;;;;;;;;11088:1;11065:25;;:11;:25;;;;11057:34;;;;;;;;11189:11;11145:20;;:56;;;;;;;;;;;;;;;;;;11267:4;11219:53;;:20;;;;;;;;;;;:34;;;:36;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;11219:36:3;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;11219:36:3;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;11219:36:3;;;;;;;;;;;;;;;;:53;;;11211:62;;;;;;;;11349:11;11316:30;;:44;;;;;;;;;;;;;;;;;;11403:4;11370:30;;:37;;;;;;;;;;;;;;;;;;10874:540;:::o;1906:23::-;;;;:::o;2047:26::-;;;;:::o;1682:46::-;;;;;;;;;;;;;:::o;2251:27::-;;;;:::o;1131:198:0:-;1390:7;;;;;;;;;;;1376:21;;:10;:21;;;1368:30;;;;;;;;1235:1;1213:24;;:10;:24;;;;1205:33;;;;;;;;1281:10;1253:39;;1272:7;;;;;;;;;;;1253:39;;;;;;;;;;;;1312:10;1302:7;;:20;;;;;;;;;;;;;;;;;;1131:198;:::o;9228:1354:3:-;9392:16;9569:27;;:::i;:::-;9944:16;9447:1;9432:11;:16;;:52;;;;;9452:32;9475:8;9452:11;:22;;:32;;;;:::i;:::-;9432:52;9424:61;;;;;;;;9549:9;;;;;;;;;;;9548:10;9540:19;;;;;;;;9599:72;9625:14;9599:72;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9641:19;9599:72;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9662:8;9607:4;9599:25;;;;:72;;;;;;:::i;:::-;9569:102;;9704:10;9689:25;;:5;:11;;;:25;;;9681:34;;;;;;;;9807:5;:25;;;9800:3;:32;;9796:138;;;9885:5;:15;;;9853:48;;;9859:24;9853:48;;;;;;;;;;;;;;;;;;9922:1;9915:8;;;;9796:138;9963:68;9981:49;10014:5;:15;;;9981:32;:49::i;:::-;9963:8;:17;;:68;;;;:::i;:::-;9944:87;;10061:1;10045:12;:17;10041:173;;;10165:5;:15;;;10136:45;;;10142:21;10136:45;;;;;;;;;;;;;;;;;;10202:1;10195:8;;;;10041:173;10239:41;10254:11;10267:12;10239:14;:41::i;:::-;10224:56;;10327:67;10364:5;:15;;;10381:12;10327:13;:36;;:67;;;;;:::i;:::-;10520:5;:15;;;10409:136;;;10462:5;:18;;;10409:136;;10437:5;:11;;;10409:136;;;10494:12;10409:136;;;;;;;;;;;;;;;;;;10563:12;10556:19;;9228:1354;;;;;;;;;:::o;6485:112:17:-;6545:7;2254:1;2248:3;;;;;;;;;;;2240:15;;;2239:49;;;;2286:1;2259:25;2279:3;;;;;;;;;;;2259:11;:25::i;:::-;:28;2239:49;2236:101;;;2302:35;1970:1;2302:19;:35::i;:::-;;2236:101;2372:3;;;;;;;;;;;:14;;;:16;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2372:16:17;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2372:16:17;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2372:16:17;;;;;;;;;;;;;;;;2351:37;;2359:8;;;;;;;;;;;2351:37;;;;2348:92;;;2423:3;;;;;;;;;;;:14;;;:16;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2423:16:17;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2423:16:17;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2423:16:17;;;;;;;;;;;;;;;;2402:8;;:38;;;;;;;;;;;;;;;;;;2348:92;6570:8;;;;;;;;;;;:18;;;:20;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6570:20:17;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6570:20:17;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;6570:20:17;;;;;;;;;;;;;;;;6563:27;;6485:112;:::o;7013:593::-;7074:4;7090:20;7132:9;7155:13;7191:6;7119:2;7090:32;;7144:1;7132:13;;7171:5;7155:21;;7198:1;7191:8;;7186:357;7203:7;:14;7201:1;:16;7186:357;;;7256:2;7242:16;;:7;7250:1;7242:10;;;;;;;;;;;;;;;;;;;;:16;;;;;7241:38;;;;;7276:2;7262:16;;:7;7270:1;7262:10;;;;;;;;;;;;;;;;;;;;:16;;;;;7241:38;7237:295;;;7302:8;7298:102;;;7342:1;7336:2;:7;7332:49;;;7345:5;;7332:49;7377:4;;;;;;;;7298:102;7425:2;7417:10;;;;7472:2;7458:7;7466:1;7458:10;;;;;;;;;;;;;;;;;;;;7453:16;;;:21;7445:29;;;;7237:295;;;7513:2;7499:16;;:7;7507:1;7499:10;;;;;;;;;;;;;;;;;;;;:16;;;;7495:37;;;7528:4;7517:15;;7495:37;7237:295;7219:3;;;;;;;7186:357;;;7561:1;7556:2;:6;7552:26;;;7576:2;7572;:6;7564:14;;;;7552:26;7595:4;7588:11;;7013:593;;;;;;;;:::o;13014:851:3:-;13126:23;13064:9;;;;;;;;;;;13060:56;;;13109:7;;13060:56;13169:10;;13163:3;:16;13159:616;;;13288:4;13276:9;;:16;;;;;;;;;;;;;;;;;;13384:9;;13363:30;;13159:616;;;13427:9;;13414;;:22;;13410:365;;;13528:4;13516:9;;:16;;;;;;;;;;;;;;;;;;13567:9;;13546:30;;13410:365;;;13610:11;;13597:9;;:24;;13593:182;;;13714:4;13702:9;;:16;;;;;;;;;;;;;;;;;;13753:11;;13732:32;;13593:182;13410:365;13159:616;13789:9;;;;;;;;;;;13785:74;;;13814:34;13829:18;13814:14;:34::i;:::-;13785:74;13014:851;;:::o;1449:236:10:-;1583:3;1609:69;1644:4;:22;;:33;1667:9;1644:33;;;;;;;;;;;;;;;;;;1609:4;:19;;:30;1629:9;1609:30;;;;;;;;;;;;;;;;;;:34;;:69;;;;:::i;:::-;1602:76;;1449:236;;;;:::o;4915:159:17:-;5006:4;2254:1;2248:3;;;;;;;;;;;2240:15;;;2239:49;;;;2286:1;2259:25;2279:3;;;;;;;;;;;2259:11;:25::i;:::-;:28;2239:49;2236:101;;;2302:35;1970:1;2302:19;:35::i;:::-;;2236:101;2372:3;;;;;;;;;;;:14;;;:16;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2372:16:17;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2372:16:17;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2372:16:17;;;;;;;;;;;;;;;;2351:37;;2359:8;;;;;;;;;;;2351:37;;;;2348:92;;;2423:3;;;;;;;;;;;:14;;;:16;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2423:16:17;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2423:16:17;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2423:16:17;;;;;;;;;;;;;;;;2402:8;;:38;;;;;;;;;;;;;;;;;;2348:92;5028:8;;;;;;;;;;;:17;;;5046:10;5058:8;5028:39;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;5028:39:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;5028:39:17;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;5028:39:17;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;5028:39:17;;;;;;;;;;;;;;;;5021:46;;4915:159;;;;:::o;6120:359::-;6220:10;6241;2254:1;2248:3;;;;;;;;;;;2240:15;;;2239:49;;;;2286:1;2259:25;2279:3;;;;;;;;;;;2259:11;:25::i;:::-;:28;2239:49;2236:101;;;2302:35;1970:1;2302:19;:35::i;:::-;;2236:101;2372:3;;;;;;;;;;;:14;;;:16;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2372:16:17;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2372:16:17;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2372:16:17;;;;;;;;;;;;;;;;2351:37;;2359:8;;;;;;;;;;;2351:37;;;;2348:92;;;2423:3;;;;;;;;;;;:14;;;:16;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2423:16:17;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2423:16:17;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2423:16:17;;;;;;;;;;;;;;;;2402:8;;:38;;;;;;;;;;;;;;;;;;2348:92;6254:8;;;;;;;;;;;:17;;;6272:10;6284:8;6254:39;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;6254:39:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6254:39:17;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6254:39:17;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;6254:39:17;;;;;;;;;;;;;;;;6241:52;;6402:8;;;;;;;;;;;:27;;;6436:5;6443:1;6446:10;6458:3;6463:8;6402:70;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;6402:70:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;6402:70:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6402:70:17;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6402:70:17;;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;6402:70:17;;;;;;;;;;;;;;;;6395:77;;6120:359;;;;;;:::o;2916:109:9:-;2973:4;3003:1;2998;:6;:19;;;;3016:1;3012;3008;:5;:9;2998:19;2989:29;;2916:109;;;;:::o;3844:752:10:-;4021:11;;:::i;:::-;4062:14;4077:1;4062:17;;;;;;;;;;;;;4048:5;:11;;:31;;;;;;;;;;;4103:14;4118:1;4103:17;;;;;;;;;;;;;4089:5;:11;;:31;;;;;;;;;;;4151:14;4166:1;4151:17;;;;;;;;;;;;;4130:5;:18;;:38;;;;;;;;;;;4195:19;4215:1;4195:22;;;;;;;;;;;;;4178:5;:14;;:39;;;;;4244:19;4264:1;4244:22;;;;;;;;;;;;;4227:5;:14;;:39;;;;;4290:19;4310:1;4290:22;;;;;;;;;;;;;4276:5;:11;;:36;;;;;4350:19;4370:1;4350:22;;;;;;;;;;;;;4322:5;:25;;:50;;;;;4394:8;4382:5;:9;;:20;;;;;4430:137;4459:15;4488:14;4516:19;4549:8;4430:15;:137::i;:::-;4412:5;:15;;:155;;;;;;;;;;;;;4584:5;4577:12;;3844:752;;;;;;:::o;2354:122:9:-;2415:6;2440:10;2444:1;2448;2447:2;;2440:3;:10::i;:::-;2433:17;;2354:122;;;;:::o;3537:115::-;3596:6;3630;3634:1;3630:3;:6::i;:::-;3621;3625:1;3621:3;:6::i;:::-;:15;:24;;3644:1;3621:24;;;3640:1;3621:24;3614:31;;3537:115;;;;:::o;4802:195:10:-;4945:45;4980:9;4945:4;:19;;:30;4965:9;4945:30;;;;;;;;;;;;;;;;;;:34;;:45;;;;:::i;:::-;4912:4;:19;;:30;4932:9;4912:30;;;;;;;;;;;;;;;;;:78;;;;4802:195;;;:::o;3139:167:9:-;3185:7;3212:1;3208;:5;3204:96;;;3242:1;3241:2;;3229:15;;;;3204:96;3287:1;3275:14;;3139:167;;;;:::o;1037:203::-;1167:7;1222:11;1197:22;1206:1;1209:9;1197:8;:22::i;:::-;:36;;;;;;;;1190:43;;1037:203;;;;;:::o;492:169:30:-;620:5;:18;;;639:4;645:2;649:5;620:35;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;620:35:30;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;620:35:30;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;620:35:30;;;;;;;;;;;;;;;;613:43;;;;;;492:169;;;;:::o;5191:210:10:-;5343:51;5381:12;5343:4;:22;;:33;5366:9;5343:33;;;;;;;;;;;;;;;;;;:37;;:51;;;;:::i;:::-;5307:4;:22;;:33;5330:9;5307:33;;;;;;;;;;;;;;;;;:87;;;;5191:210;;;:::o;6858:150:17:-;6920:10;6986:5;6974:18;6965:27;;6951:51;;;:::o;2564:183::-;2627:4;2647:21;:19;:21::i;:::-;2640:28;;2564:183;;;:::o;14020:166:3:-;14107:20;14089:15;:38;;;;14142:37;14158:20;14142:37;;;;;;;;;;;;;;;;;;14020:166;:::o;1673:509:9:-;1729:6;1747:8;1762:1;1758;:5;1747:16;;1778;1789:1;1792;1778:10;:16::i;:::-;1777:17;1773:126;;;1887:1;1880:8;;;;1773:126;1918:1;1913;:6;;1909:249;;;2022:1;856:3;850:1;842:17;;;;839:22;2009:14;2004:1;:19;;1997:27;;;;;;1909:249;;;2145:1;792:3;786:1;778:17;;;;2132:14;2127:1;:19;;2120:27;;;;;;1909:249;2174:1;2167:8;;1673:509;;;;;;:::o;2115:643:10:-;2294:7;2381:15;2414:14;2429:1;2414:17;;;;;;;;;;;;;2449:14;2464:1;2449:17;;;;;;;;;;;;;2484:14;2499:1;2484:17;;;;;;;;;;;;;2519:19;2539:1;2519:22;;;;;;;;;;;;;2559:19;2579:1;2559:22;;;;;;;;;;;;;2599:19;2619:1;2599:22;;;;;;;;;;;;;2639:19;2659:1;2639:22;;;;;;;;;;;;;2679:19;2699:1;2679:22;;;;;;;;;;;;;2719:8;2347:394;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;2347:394:10;;;2324:427;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;51:19;36:153;;;182:3;176:10;171:3;164:23;98:2;93:3;89:12;82:19;;123:2;118:3;114:12;107:19;;148:2;143:3;139:12;132:19;;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;2324:427:10;;;;;;;;;;;;;;;;2317:434;;2115:643;;;;;;:::o;869:162:9:-;932:7;951:9;967:1;963;:5;951:17;;990:1;985;:6;:20;;;;1004:1;999;995;:5;;;;;;;;:10;985:20;978:28;;;;;;1023:1;1016:8;;869:162;;;;;:::o;2752:1749:17:-;2800:4;2875:1;2819:55;2831:42;2819:11;:55::i;:::-;:57;2815:245;;;2929:42;2901:3;;:71;;;;;;;;;;;;;;;;;;2986:38;;;;;;;;;;;;;;;;;;;:23;:38::i;:::-;3045:4;3038:11;;;;2815:245;3129:1;3073:55;3085:42;3073:11;:55::i;:::-;:57;3069:254;;;3191:42;3163:3;;:71;;;;;;;;;;;;;;;;;;3248:39;;;;;;;;;;;;;;;;;;;:23;:39::i;:::-;3308:4;3301:11;;;;3069:254;3392:1;3336:55;3348:42;3336:11;:55::i;:::-;:57;3332:249;;;3452:42;3424:3;;:71;;;;;;;;;;;;;;;;;;3509:36;;;;;;;;;;;;;;;;;;;:23;:36::i;:::-;3566:4;3559:11;;;;3332:249;3650:1;3594:55;3606:42;3594:11;:55::i;:::-;:57;3590:253;;;3712:42;3684:3;;:71;;;;;;;;;;;;;;;;;;3769:38;;;;;;;;;;;;;;;;;;;:23;:38::i;:::-;3828:4;3821:11;;;;3590:253;3912:1;3856:55;3868:42;3856:11;:55::i;:::-;:57;3852:201;;;3974:42;3946:3;;:71;;;;;;;;;;;;;;;;;;4038:4;4031:11;;;;3852:201;4122:1;4066:55;4078:42;4066:11;:55::i;:::-;:57;4062:200;;;4183:42;4155:3;;:71;;;;;;;;;;;;;;;;;;4247:4;4240:11;;;;4062:200;4331:1;4275:55;4287:42;4275:11;:55::i;:::-;:57;4271:202;;;4394:42;4366:3;;:71;;;;;;;;;;;;;;;;;;4458:4;4451:11;;;;4271:202;4489:5;4482:12;;2752:1749;;:::o;7645:118::-;7743:13;7719:21;:37;;;;;;;;;;;;:::i;:::-;;7645:118;:::o;875:5632:13:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o", - "source": "/*\n Copyright 2017-2018 Phillip A. Elsasser\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n*/\n\npragma solidity ^0.4.24;\n\nimport \"./oraclizeAPI.sol\";\nimport \"../libraries/MathLib.sol\";\nimport \"../MarketContract.sol\";\n\n\n/// @title MarketContract first example of a MarketProtocol contract using Oraclize services\n/// @author Phil Elsasser \ncontract MarketContractOraclize is MarketContract, usingOraclize {\n using MathLib for uint;\n\n // constants\n string public ORACLE_DATA_SOURCE;\n string public ORACLE_QUERY;\n uint constant public QUERY_CALLBACK_GAS = 150000;\n //uint constant public QUERY_CALLBACK_GAS_PRICE = 20000000000 wei; // 20 gwei - need to make this dynamic!\n\n // state variables\n string public lastPriceQueryResult;\n mapping(bytes32 => bool) validQueryIDs;\n\n /// @param contractName viewable name of this contract (BTC/ETH, LTC/ETH, etc)\n /// @param creatorAddress address of the person creating the contract\n /// @param marketTokenAddress address of our member token\n /// @param collateralTokenAddress address of the ERC20 token that will be used for collateral and pricing\n /// @param collateralPoolFactoryAddress address of the factory creating the collateral pools\n /// @param contractSpecs array of unsigned integers including:\n /// floorPrice minimum tradeable price of this contract, contract enters settlement if breached\n /// capPrice maximum tradeable price of this contract, contract enters settlement if breached\n /// priceDecimalPlaces number of decimal places to convert our queried price from a floating point to\n /// an integer\n /// qtyMultiplier multiply traded qty by this value from base units of collateral token.\n /// expirationTimeStamp - seconds from epoch that this contract expires and enters settlement\n /// @param oracleDataSource a data-source such as \"URL\", \"WolframAlpha\", \"IPFS\"\n /// see http://docs.oraclize.it/#ethereum-quick-start-simple-query\n /// @param oracleQuery see http://docs.oraclize.it/#ethereum-quick-start-simple-query for examples\n constructor(\n string contractName,\n address creatorAddress,\n address marketTokenAddress,\n address collateralTokenAddress,\n address collateralPoolFactoryAddress,\n uint[5] contractSpecs,\n string oracleDataSource,\n string oracleQuery\n ) MarketContract(\n contractName,\n creatorAddress,\n marketTokenAddress,\n collateralTokenAddress,\n collateralPoolFactoryAddress,\n contractSpecs\n ) public\n {\n oraclize_setProof(proofType_TLSNotary | proofStorage_IPFS);\n //oraclize_setCustomGasPrice(QUERY_CALLBACK_GAS_PRICE); //TODO: allow this to be changed by creator.\n ORACLE_DATA_SOURCE = oracleDataSource;\n ORACLE_QUERY = oracleQuery;\n\n // Future timestamp must be within 60 days from now.\n // https://docs.oraclize.it/#ethereum-quick-start-schedule-a-query-in-the-future\n require(EXPIRATION - now <= 60 days);\n queryOracle(); // Schedule a call to oracle at contract expiration time.\n }\n\n /// @notice allows a user to request an extra query to oracle in order to push the contract into\n /// settlement. A user may call this as many times as they like, since they are the ones paying for\n /// the call to our oracle and post processing. This is useful for both a failsafe and as a way to\n /// settle a contract early if a price cap or floor has been breached.\n function requestEarlySettlement() external payable {\n uint cost = oraclize_getPrice(ORACLE_DATA_SOURCE, QUERY_CALLBACK_GAS);\n require(msg.value >= cost); // user must pay enough to cover query and callback\n // create immediate query, we must make sure to store this one separately, so\n // we do not schedule recursive callbacks when the query completes.\n bytes32 queryId = oraclize_query(\n ORACLE_DATA_SOURCE,\n ORACLE_QUERY,\n QUERY_CALLBACK_GAS\n );\n require(queryId != 0);\n validQueryIDs[queryId] = true;\n }\n\n /*\n // PUBLIC METHODS\n */\n\n /// @notice only public for callbacks from oraclize, do not call\n /// @param queryID of the returning query, this should match our own internal mapping\n /// @param result query to be processed\n /// @param proof result proof\n function __callback(bytes32 queryID, string result, bytes proof) public {\n require(msg.sender == oraclize_cbAddress());\n require(validQueryIDs[queryID]); // At expiration or early settlement.\n lastPriceQueryResult = result;\n lastPrice = parseInt(result, PRICE_DECIMAL_PLACES);\n emit UpdatedLastPrice(result);\n checkSettlement(); // Verify settlement at expiration or requested early settlement.\n delete validQueryIDs[queryID];\n proof; // silence compiler warnings\n }\n\n /*\n // PRIVATE METHODS\n */\n\n /// @dev call to oraclize to set up our query and record its hash.\n function queryOracle() private {\n // Require that sufficient funds are available to pay for the query.\n // require(oraclize_getPrice(ORACLE_DATA_SOURCE, QUERY_CALLBACK_GAS) < this.balance);\n // NOTE: Currently the first oracle query call to oraclize.it is free. Since our\n // expiration query will always be the first, there is no needed pre-funding amount\n // to create this query. When we go to the centralized query hub - this will change\n // due to the fact that the address creating the query will always be the query hub.\n // will have to do the analysis to see which is cheaper, free queries, or lower deployment\n // gas costs\n bytes32 queryId = oraclize_query(\n EXPIRATION,\n ORACLE_DATA_SOURCE,\n ORACLE_QUERY,\n QUERY_CALLBACK_GAS\n );\n require(queryId != 0);\n validQueryIDs[queryId] = true;\n }\n}", - "sourcePath": "/home/pelsasser/MARKETProtocol/contracts/oraclize/MarketContractOraclize.sol", + "bytecode": "0x60806040526000600a60006101000a81548160ff0219169083151502179055503480156200002c57600080fd5b5060405162003a0238038062003a028339810180604052810190808051820192919060200191908260400191908260a0018051820192919060200180518201929190505050848484336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550806000600581101515620000c457fe5b6020020151600481905550806001600581101515620000df57fe5b6020020151600381905550600454600354111515620000fd57600080fd5b8060026005811015156200010d57fe5b60200201516005819055508060036005811015156200012857fe5b60200201516006819055508060046005811015156200014357fe5b6020020151600781905550426007541115156200015f57600080fd5b826001908051906020019062000177929190620013d1565b508160016002811015156200018857fe5b6020020151600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550816000600281101515620001dd57fe5b60200201516000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050506200028660017f01000000000000000000000000000000000000000000000000000000000000000260107f01000000000000000000000000000000000000000000000000000000000000000217620002f3640100000000026401000000009004565b81600d90805190602001906200029e929190620013d1565b5080600e9080519060200190620002b7929190620013d1565b50624f1a00426007540311151515620002cf57600080fd5b620002e8620006ab640100000000026401000000009004565b505050505062001480565b6000600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161480620003765750600062000374600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff166200085c640100000000026401000000009004565b145b15620003995762000397600062000867640100000000026401000000009004565b505b600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156200042057600080fd5b505af115801562000435573d6000803e3d6000fd5b505050506040513d60208110156200044c57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515620005b957600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156200053b57600080fd5b505af115801562000550573d6000803e3d6000fd5b505050506040513d60208110156200056757600080fd5b8101908080519060200190929190505050600b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663688dcfd7826040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180827effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001915050600060405180830381600087803b1580156200068f57600080fd5b505af1158015620006a4573d6000803e3d6000fd5b5050505050565b60006200080b600754600d8054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156200074e5780601f1062000722576101008083540402835291602001916200074e565b820191906000526020600020905b8154815290600101906020018083116200073057829003601f168201915b5050505050600e8054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015620007ed5780601f10620007c157610100808354040283529160200191620007ed565b820191906000526020600020905b815481529060010190602001808311620007cf57829003601f168201915b5050505050620249f062000889640100000000026401000000009004565b905060006001028160001916141515156200082557600080fd5b600160106000836000191660001916815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b6000813b9050919050565b60006200088262000e56640100000000026401000000009004565b9050919050565b6000806000600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614806200090f575060006200090d600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff166200085c640100000000026401000000009004565b145b15620009325762000930600062000867640100000000026401000000009004565b505b600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015620009b957600080fd5b505af1158015620009ce573d6000803e3d6000fd5b505050506040513d6020811015620009e557600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151562000b5257600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801562000ad457600080fd5b505af115801562000ae9573d6000803e3d6000fd5b505050506040513d602081101562000b0057600080fd5b8101908080519060200190929190505050600b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632ef3accc86856040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b8381101562000c0557808201518184015260208101905062000be8565b50505050905090810190601f16801562000c335780820380516001836020036101000a031916815260200191505b509350505050602060405180830381600087803b15801562000c5457600080fd5b505af115801562000c69573d6000803e3d6000fd5b505050506040513d602081101562000c8057600080fd5b81019080805190602001909291905050509050600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c51be90f82888888886040518663ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b8381101562000d5357808201518184015260208101905062000d36565b50505050905090810190601f16801562000d815780820380516001836020036101000a031916815260200191505b50838103825285818151815260200191508051906020019080838360005b8381101562000dbc57808201518184015260208101905062000d9f565b50505050905090810190601f16801562000dea5780820380516001836020036101000a031916815260200191505b5096505050505050506020604051808303818588803b15801562000e0d57600080fd5b505af115801562000e22573d6000803e3d6000fd5b50505050506040513d602081101562000e3a57600080fd5b8101908080519060200190929190505050915050949350505050565b60008062000e87731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed6200085c640100000000026401000000009004565b111562000f3c57731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed600a60016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555062000f326040805190810160405280600b81526020017f6574685f6d61696e6e6574000000000000000000000000000000000000000000815250620013b5640100000000026401000000009004565b60019050620013b2565b600062000f6c73c03a2615d5efaf5f49f60b7bb6583eaec212fdf16200085c640100000000026401000000009004565b1115620010215773c03a2615d5efaf5f49f60b7bb6583eaec212fdf1600a60016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550620010176040805190810160405280600c81526020017f6574685f726f707374656e330000000000000000000000000000000000000000815250620013b5640100000000026401000000009004565b60019050620013b2565b60006200105173b7a07bcf2ba2f2703b24c0691b5278999c59ac7e6200085c640100000000026401000000009004565b1115620011065773b7a07bcf2ba2f2703b24c0691b5278999c59ac7e600a60016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550620010fc6040805190810160405280600981526020017f6574685f6b6f76616e0000000000000000000000000000000000000000000000815250620013b5640100000000026401000000009004565b60019050620013b2565b60006200113673146500cfd35b22e4a392fe0adc06de1a1368ed486200085c640100000000026401000000009004565b1115620011eb5773146500cfd35b22e4a392fe0adc06de1a1368ed48600a60016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550620011e16040805190810160405280600b81526020017f6574685f72696e6b656279000000000000000000000000000000000000000000815250620013b5640100000000026401000000009004565b60019050620013b2565b60006200121b736f485c8bf6fc43ea212e93bbf8ce046c7f1cb4756200085c640100000000026401000000009004565b11156200128157736f485c8bf6fc43ea212e93bbf8ce046c7f1cb475600a60016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060019050620013b2565b6000620012b17320e12a1f859b3feae5fb2a0a32c18f5a65555bbf6200085c640100000000026401000000009004565b111562001317577320e12a1f859b3feae5fb2a0a32c18f5a65555bbf600a60016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060019050620013b2565b6000620013477351efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa6200085c640100000000026401000000009004565b1115620013ad577351efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa600a60016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060019050620013b2565b600090505b90565b80600c9080519060200190620013cd929190620013d1565b5050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200141457805160ff191683800117855562001445565b8280016001018555821562001445579182015b828111156200144457825182559160200191906001019062001427565b5b50905062001454919062001458565b5090565b6200147d91905b80821115620014795760008160009055506001016200145f565b5090565b90565b61257280620014906000396000f300608060405260043610610107576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806302d05d3f1461010c578063053f14da146101635780630c8eb6751461018e57806327dc297e1461021e5780632fed1b0014610295578063323bb775146102c05780633270bb5b1461031757806338bbfa5014610346578063411449bb1461040357806356357d911461042e5780635ea7867a146104be578063614d08f81461054e5780636db7f77c146105de578063b5471dee146105e8578063bb4b573414610613578063c32b1dfa1461063e578063ca361d6714610669578063f348e8b214610694578063fa3fa196146106bf575b600080fd5b34801561011857600080fd5b50610121610702565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561016f57600080fd5b50610178610727565b6040518082815260200191505060405180910390f35b34801561019a57600080fd5b506101a361072d565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101e35780820151818401526020810190506101c8565b50505050905090810190601f1680156102105780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561022a57600080fd5b506102936004803603810190808035600019169060200190929190803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091929192905050506107cb565b005b3480156102a157600080fd5b506102aa61080e565b6040518082815260200191505060405180910390f35b3480156102cc57600080fd5b506102d5610814565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561032357600080fd5b5061032c61083a565b604051808215151515815260200191505060405180910390f35b34801561035257600080fd5b506104016004803603810190808035600019169060200190929190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919291929050505061084d565b005b34801561040f57600080fd5b5061041861095c565b6040518082815260200191505060405180910390f35b34801561043a57600080fd5b50610443610963565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610483578082015181840152602081019050610468565b50505050905090810190601f1680156104b05780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156104ca57600080fd5b506104d3610a01565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156105135780820151818401526020810190506104f8565b50505050905090810190601f1680156105405780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561055a57600080fd5b50610563610a9f565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156105a3578082015181840152602081019050610588565b50505050905090810190601f1680156105d05780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6105e6610b3d565b005b3480156105f457600080fd5b506105fd610d8b565b6040518082815260200191505060405180910390f35b34801561061f57600080fd5b50610628610d91565b6040518082815260200191505060405180910390f35b34801561064a57600080fd5b50610653610d97565b6040518082815260200191505060405180910390f35b34801561067557600080fd5b5061067e610d9d565b6040518082815260200191505060405180910390f35b3480156106a057600080fd5b506106a9610da3565b6040518082815260200191505060405180910390f35b3480156106cb57600080fd5b50610700600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610da9565b005b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60085481565b600f8054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156107c35780601f10610798576101008083540402835291602001916107c3565b820191906000526020600020905b8154815290600101906020018083116107a657829003601f168201915b505050505081565b61080a828260006040519080825280601f01601f1916602001820160405280156108045781602001602082028038833980820191505090505b5061084d565b5050565b60055481565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600a60009054906101000a900460ff1681565b610855610efe565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561088e57600080fd5b60106000846000191660001916815260200190815260200160002060009054906101000a900460ff1615156108c257600080fd5b81600f90805190602001906108d89291906124a1565b506108e582600554611260565b6008819055507f8848a3fb6a59cb2631434df52b885e109a25f8b683d0721da7ef92618182b4826008546040518082815260200191505060405180910390a161092c611554565b60106000846000191660001916815260200190815260200160002060006101000a81549060ff0219169055505050565b620249f081565b600d8054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156109f95780601f106109ce576101008083540402835291602001916109f9565b820191906000526020600020905b8154815290600101906020018083116109dc57829003601f168201915b505050505081565b600e8054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610a975780601f10610a6c57610100808354040283529160200191610a97565b820191906000526020600020905b815481529060010190602001808311610a7a57829003601f168201915b505050505081565b60018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610b355780601f10610b0a57610100808354040283529160200191610b35565b820191906000526020600020905b815481529060010190602001808311610b1857829003601f168201915b505050505081565b600080610be7600d8054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610bd95780601f10610bae57610100808354040283529160200191610bd9565b820191906000526020600020905b815481529060010190602001808311610bbc57829003601f168201915b5050505050620249f0611624565b9150813410151515610bf857600080fd5b610d3a600d8054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610c915780601f10610c6657610100808354040283529160200191610c91565b820191906000526020600020905b815481529060010190602001808311610c7457829003601f168201915b5050505050600e8054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610d2c5780601f10610d0157610100808354040283529160200191610d2c565b820191906000526020600020905b815481529060010190602001808311610d0f57829003601f168201915b5050505050620249f0611a01565b90506000600102816000191614151515610d5357600080fd5b600160106000836000191660001916815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b60035481565b60075481565b60045481565b60065481565b60095481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610e0457600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515610e4057600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f7f11fe0c7098e1a76afcc68f35abaa07ef156fa7d6dd2d39664812fe37348d1660405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600080600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161480610f7057506000610f6e600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16611f94565b145b15610f8157610f7f6000611f9f565b505b600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561100757600080fd5b505af115801561101b573d6000803e3d6000fd5b505050506040513d602081101561103157600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151561119a57600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561111e57600080fd5b505af1158015611132573d6000803e3d6000fd5b505050506040513d602081101561114857600080fd5b8101908080519060200190929190505050600b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c281d19e6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561122057600080fd5b505af1158015611234573d6000803e3d6000fd5b505050506040513d602081101561124a57600080fd5b8101908080519060200190929190505050905090565b6000606060008060008693506000925060009150600090505b83518110156115355760307f01000000000000000000000000000000000000000000000000000000000000000284828151811015156112b457fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916101580156113cc575060397f010000000000000000000000000000000000000000000000000000000000000002848281518110151561135c57fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191611155b1561147d5781156113ef5760008614156113e557611535565b8580600190039650505b600a830292506030848281518110151561140557fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027f010000000000000000000000000000000000000000000000000000000000000090040383019250611528565b602e7f01000000000000000000000000000000000000000000000000000000000000000284828151811015156114af57fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916141561152757600191505b5b8080600101915050611279565b60008611156115475785600a0a830292505b8294505050505092915050565b6000600a60009054906101000a900460ff161561157057611621565b60075442111561159f576001600a60006101000a81548160ff0219169083151502179055506008549050611601565b6003546008541015156115d1576001600a60006101000a81548160ff0219169083151502179055506003549050611600565b6004546008541115156115ff576001600a60006101000a81548160ff02191690831515021790555060045490505b5b5b600a60009054906101000a900460ff16156116205761161f81611fb0565b5b5b50565b600080600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16148061169657506000611694600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16611f94565b145b156116a7576116a56000611f9f565b505b600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561172d57600080fd5b505af1158015611741573d6000803e3d6000fd5b505050506040513d602081101561175757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415156118c057600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561184457600080fd5b505af1158015611858573d6000803e3d6000fd5b505050506040513d602081101561186e57600080fd5b8101908080519060200190929190505050600b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632ef3accc84846040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b83811015611971578082015181840152602081019050611956565b50505050905090810190601f16801561199e5780820380516001836020036101000a031916815260200191505b509350505050602060405180830381600087803b1580156119be57600080fd5b505af11580156119d2573d6000803e3d6000fd5b505050506040513d60208110156119e857600080fd5b8101908080519060200190929190505050905092915050565b6000806000600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161480611a7557506000611a73600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16611f94565b145b15611a8657611a846000611f9f565b505b600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015611b0c57600080fd5b505af1158015611b20573d6000803e3d6000fd5b505050506040513d6020811015611b3657600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515611c9f57600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015611c2357600080fd5b505af1158015611c37573d6000803e3d6000fd5b505050506040513d6020811015611c4d57600080fd5b8101908080519060200190929190505050600b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632ef3accc86856040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b83811015611d50578082015181840152602081019050611d35565b50505050905090810190601f168015611d7d5780820380516001836020036101000a031916815260200191505b509350505050602060405180830381600087803b158015611d9d57600080fd5b505af1158015611db1573d6000803e3d6000fd5b505050506040513d6020811015611dc757600080fd5b81019080805190602001909291905050509050600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c51be90f8260008888886040518663ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b83811015611e99578082015181840152602081019050611e7e565b50505050905090810190601f168015611ec65780820380516001836020036101000a031916815260200191505b50838103825285818151815260200191508051906020019080838360005b83811015611eff578082015181840152602081019050611ee4565b50505050905090810190601f168015611f2c5780820380516001836020036101000a031916815260200191505b5096505050505050506020604051808303818588803b158015611f4e57600080fd5b505af1158015611f62573d6000803e3d6000fd5b50505050506040513d6020811015611f7957600080fd5b81019080805190602001909291905050509150509392505050565b6000813b9050919050565b6000611fa9611ff1565b9050919050565b806009819055507f68170b705528d3ff1d324cda28eb28cc3d11ce81207f157c05e11c18411a013c816040518082815260200191505060405180910390a150565b600080612011731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed611f94565b11156120b357731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed600a60016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506120aa6040805190810160405280600b81526020017f6574685f6d61696e6e6574000000000000000000000000000000000000000000815250612487565b60019050612484565b60006120d273c03a2615d5efaf5f49f60b7bb6583eaec212fdf1611f94565b11156121745773c03a2615d5efaf5f49f60b7bb6583eaec212fdf1600a60016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061216b6040805190810160405280600c81526020017f6574685f726f707374656e330000000000000000000000000000000000000000815250612487565b60019050612484565b600061219373b7a07bcf2ba2f2703b24c0691b5278999c59ac7e611f94565b11156122355773b7a07bcf2ba2f2703b24c0691b5278999c59ac7e600a60016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061222c6040805190810160405280600981526020017f6574685f6b6f76616e0000000000000000000000000000000000000000000000815250612487565b60019050612484565b600061225473146500cfd35b22e4a392fe0adc06de1a1368ed48611f94565b11156122f65773146500cfd35b22e4a392fe0adc06de1a1368ed48600a60016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506122ed6040805190810160405280600b81526020017f6574685f72696e6b656279000000000000000000000000000000000000000000815250612487565b60019050612484565b6000612315736f485c8bf6fc43ea212e93bbf8ce046c7f1cb475611f94565b111561237957736f485c8bf6fc43ea212e93bbf8ce046c7f1cb475600a60016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060019050612484565b60006123987320e12a1f859b3feae5fb2a0a32c18f5a65555bbf611f94565b11156123fc577320e12a1f859b3feae5fb2a0a32c18f5a65555bbf600a60016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060019050612484565b600061241b7351efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa611f94565b111561247f577351efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa600a60016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060019050612484565b600090505b90565b80600c908051906020019061249d9291906124a1565b5050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106124e257805160ff1916838001178555612510565b82800160010185558215612510579182015b8281111561250f5782518255916020019190600101906124f4565b5b50905061251d9190612521565b5090565b61254391905b8082111561253f576000816000905550600101612527565b5090565b905600a165627a7a7230582084346538b36e33969fd9e39bf57d37a0bb80f6a8398f20a6b19f78858f9743f90029", + "deployedBytecode": "0x608060405260043610610107576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806302d05d3f1461010c578063053f14da146101635780630c8eb6751461018e57806327dc297e1461021e5780632fed1b0014610295578063323bb775146102c05780633270bb5b1461031757806338bbfa5014610346578063411449bb1461040357806356357d911461042e5780635ea7867a146104be578063614d08f81461054e5780636db7f77c146105de578063b5471dee146105e8578063bb4b573414610613578063c32b1dfa1461063e578063ca361d6714610669578063f348e8b214610694578063fa3fa196146106bf575b600080fd5b34801561011857600080fd5b50610121610702565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561016f57600080fd5b50610178610727565b6040518082815260200191505060405180910390f35b34801561019a57600080fd5b506101a361072d565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101e35780820151818401526020810190506101c8565b50505050905090810190601f1680156102105780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561022a57600080fd5b506102936004803603810190808035600019169060200190929190803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091929192905050506107cb565b005b3480156102a157600080fd5b506102aa61080e565b6040518082815260200191505060405180910390f35b3480156102cc57600080fd5b506102d5610814565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561032357600080fd5b5061032c61083a565b604051808215151515815260200191505060405180910390f35b34801561035257600080fd5b506104016004803603810190808035600019169060200190929190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919291929050505061084d565b005b34801561040f57600080fd5b5061041861095c565b6040518082815260200191505060405180910390f35b34801561043a57600080fd5b50610443610963565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610483578082015181840152602081019050610468565b50505050905090810190601f1680156104b05780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156104ca57600080fd5b506104d3610a01565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156105135780820151818401526020810190506104f8565b50505050905090810190601f1680156105405780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561055a57600080fd5b50610563610a9f565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156105a3578082015181840152602081019050610588565b50505050905090810190601f1680156105d05780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6105e6610b3d565b005b3480156105f457600080fd5b506105fd610d8b565b6040518082815260200191505060405180910390f35b34801561061f57600080fd5b50610628610d91565b6040518082815260200191505060405180910390f35b34801561064a57600080fd5b50610653610d97565b6040518082815260200191505060405180910390f35b34801561067557600080fd5b5061067e610d9d565b6040518082815260200191505060405180910390f35b3480156106a057600080fd5b506106a9610da3565b6040518082815260200191505060405180910390f35b3480156106cb57600080fd5b50610700600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610da9565b005b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60085481565b600f8054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156107c35780601f10610798576101008083540402835291602001916107c3565b820191906000526020600020905b8154815290600101906020018083116107a657829003601f168201915b505050505081565b61080a828260006040519080825280601f01601f1916602001820160405280156108045781602001602082028038833980820191505090505b5061084d565b5050565b60055481565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600a60009054906101000a900460ff1681565b610855610efe565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561088e57600080fd5b60106000846000191660001916815260200190815260200160002060009054906101000a900460ff1615156108c257600080fd5b81600f90805190602001906108d89291906124a1565b506108e582600554611260565b6008819055507f8848a3fb6a59cb2631434df52b885e109a25f8b683d0721da7ef92618182b4826008546040518082815260200191505060405180910390a161092c611554565b60106000846000191660001916815260200190815260200160002060006101000a81549060ff0219169055505050565b620249f081565b600d8054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156109f95780601f106109ce576101008083540402835291602001916109f9565b820191906000526020600020905b8154815290600101906020018083116109dc57829003601f168201915b505050505081565b600e8054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610a975780601f10610a6c57610100808354040283529160200191610a97565b820191906000526020600020905b815481529060010190602001808311610a7a57829003601f168201915b505050505081565b60018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610b355780601f10610b0a57610100808354040283529160200191610b35565b820191906000526020600020905b815481529060010190602001808311610b1857829003601f168201915b505050505081565b600080610be7600d8054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610bd95780601f10610bae57610100808354040283529160200191610bd9565b820191906000526020600020905b815481529060010190602001808311610bbc57829003601f168201915b5050505050620249f0611624565b9150813410151515610bf857600080fd5b610d3a600d8054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610c915780601f10610c6657610100808354040283529160200191610c91565b820191906000526020600020905b815481529060010190602001808311610c7457829003601f168201915b5050505050600e8054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610d2c5780601f10610d0157610100808354040283529160200191610d2c565b820191906000526020600020905b815481529060010190602001808311610d0f57829003601f168201915b5050505050620249f0611a01565b90506000600102816000191614151515610d5357600080fd5b600160106000836000191660001916815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b60035481565b60075481565b60045481565b60065481565b60095481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610e0457600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515610e4057600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f7f11fe0c7098e1a76afcc68f35abaa07ef156fa7d6dd2d39664812fe37348d1660405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600080600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161480610f7057506000610f6e600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16611f94565b145b15610f8157610f7f6000611f9f565b505b600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561100757600080fd5b505af115801561101b573d6000803e3d6000fd5b505050506040513d602081101561103157600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151561119a57600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561111e57600080fd5b505af1158015611132573d6000803e3d6000fd5b505050506040513d602081101561114857600080fd5b8101908080519060200190929190505050600b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c281d19e6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561122057600080fd5b505af1158015611234573d6000803e3d6000fd5b505050506040513d602081101561124a57600080fd5b8101908080519060200190929190505050905090565b6000606060008060008693506000925060009150600090505b83518110156115355760307f01000000000000000000000000000000000000000000000000000000000000000284828151811015156112b457fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916101580156113cc575060397f010000000000000000000000000000000000000000000000000000000000000002848281518110151561135c57fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191611155b1561147d5781156113ef5760008614156113e557611535565b8580600190039650505b600a830292506030848281518110151561140557fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027f010000000000000000000000000000000000000000000000000000000000000090040383019250611528565b602e7f01000000000000000000000000000000000000000000000000000000000000000284828151811015156114af57fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916141561152757600191505b5b8080600101915050611279565b60008611156115475785600a0a830292505b8294505050505092915050565b6000600a60009054906101000a900460ff161561157057611621565b60075442111561159f576001600a60006101000a81548160ff0219169083151502179055506008549050611601565b6003546008541015156115d1576001600a60006101000a81548160ff0219169083151502179055506003549050611600565b6004546008541115156115ff576001600a60006101000a81548160ff02191690831515021790555060045490505b5b5b600a60009054906101000a900460ff16156116205761161f81611fb0565b5b5b50565b600080600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16148061169657506000611694600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16611f94565b145b156116a7576116a56000611f9f565b505b600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561172d57600080fd5b505af1158015611741573d6000803e3d6000fd5b505050506040513d602081101561175757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415156118c057600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561184457600080fd5b505af1158015611858573d6000803e3d6000fd5b505050506040513d602081101561186e57600080fd5b8101908080519060200190929190505050600b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632ef3accc84846040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b83811015611971578082015181840152602081019050611956565b50505050905090810190601f16801561199e5780820380516001836020036101000a031916815260200191505b509350505050602060405180830381600087803b1580156119be57600080fd5b505af11580156119d2573d6000803e3d6000fd5b505050506040513d60208110156119e857600080fd5b8101908080519060200190929190505050905092915050565b6000806000600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161480611a7557506000611a73600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16611f94565b145b15611a8657611a846000611f9f565b505b600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015611b0c57600080fd5b505af1158015611b20573d6000803e3d6000fd5b505050506040513d6020811015611b3657600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515611c9f57600a60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015611c2357600080fd5b505af1158015611c37573d6000803e3d6000fd5b505050506040513d6020811015611c4d57600080fd5b8101908080519060200190929190505050600b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632ef3accc86856040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b83811015611d50578082015181840152602081019050611d35565b50505050905090810190601f168015611d7d5780820380516001836020036101000a031916815260200191505b509350505050602060405180830381600087803b158015611d9d57600080fd5b505af1158015611db1573d6000803e3d6000fd5b505050506040513d6020811015611dc757600080fd5b81019080805190602001909291905050509050600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c51be90f8260008888886040518663ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b83811015611e99578082015181840152602081019050611e7e565b50505050905090810190601f168015611ec65780820380516001836020036101000a031916815260200191505b50838103825285818151815260200191508051906020019080838360005b83811015611eff578082015181840152602081019050611ee4565b50505050905090810190601f168015611f2c5780820380516001836020036101000a031916815260200191505b5096505050505050506020604051808303818588803b158015611f4e57600080fd5b505af1158015611f62573d6000803e3d6000fd5b50505050506040513d6020811015611f7957600080fd5b81019080805190602001909291905050509150509392505050565b6000813b9050919050565b6000611fa9611ff1565b9050919050565b806009819055507f68170b705528d3ff1d324cda28eb28cc3d11ce81207f157c05e11c18411a013c816040518082815260200191505060405180910390a150565b600080612011731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed611f94565b11156120b357731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed600a60016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506120aa6040805190810160405280600b81526020017f6574685f6d61696e6e6574000000000000000000000000000000000000000000815250612487565b60019050612484565b60006120d273c03a2615d5efaf5f49f60b7bb6583eaec212fdf1611f94565b11156121745773c03a2615d5efaf5f49f60b7bb6583eaec212fdf1600a60016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061216b6040805190810160405280600c81526020017f6574685f726f707374656e330000000000000000000000000000000000000000815250612487565b60019050612484565b600061219373b7a07bcf2ba2f2703b24c0691b5278999c59ac7e611f94565b11156122355773b7a07bcf2ba2f2703b24c0691b5278999c59ac7e600a60016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061222c6040805190810160405280600981526020017f6574685f6b6f76616e0000000000000000000000000000000000000000000000815250612487565b60019050612484565b600061225473146500cfd35b22e4a392fe0adc06de1a1368ed48611f94565b11156122f65773146500cfd35b22e4a392fe0adc06de1a1368ed48600a60016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506122ed6040805190810160405280600b81526020017f6574685f72696e6b656279000000000000000000000000000000000000000000815250612487565b60019050612484565b6000612315736f485c8bf6fc43ea212e93bbf8ce046c7f1cb475611f94565b111561237957736f485c8bf6fc43ea212e93bbf8ce046c7f1cb475600a60016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060019050612484565b60006123987320e12a1f859b3feae5fb2a0a32c18f5a65555bbf611f94565b11156123fc577320e12a1f859b3feae5fb2a0a32c18f5a65555bbf600a60016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060019050612484565b600061241b7351efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa611f94565b111561247f577351efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa600a60016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060019050612484565b600090505b90565b80600c908051906020019061249d9291906124a1565b5050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106124e257805160ff1916838001178555612510565b82800160010185558215612510579182015b8281111561250f5782518255916020019190600101906124f4565b5b50905061251d9190612521565b5090565b61254391905b8082111561253f576000816000905550600101612527565b5090565b905600a165627a7a7230582084346538b36e33969fd9e39bf57d37a0bb80f6a8398f20a6b19f78858f9743f90029", + "sourceMap": "875:5455:17:-;;;1483:5:3;1459:29;;;;;;;;;;;;;;;;;;;;2640:841:17;8:9:-1;5:2;;;30:1;27;20:12;5:2;2640:841:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2837:12;2859:13;2882;1017:10:0;1007:7;;:20;;;;;;;;;;;;;;;;;;2767:13:3;2781:1;2767:16;;;;;;;;;;;;;2753:11;:30;;;;2805:13;2819:1;2805:16;;;;;;;;;;;;;2793:9;:28;;;;2851:11;;2839:9;;:23;2831:32;;;;;;;;2897:13;2911:1;2897:16;;;;;;;;;;;;;2874:20;:39;;;;2940:13;2954:1;2940:16;;;;;;;;;;;;;2923:14;:33;;;;2979:13;2993:1;2979:16;;;;;;;;;;;;;2966:10;:29;;;;3026:3;3013:10;;:16;3005:25;;;;;;;;3057:12;3041:13;:28;;;;;;;;;;;;:::i;:::-;;3106:13;3120:1;3106:16;;;;;;;;;;;;;3079:24;;:43;;;;;;;;;;;;;;;;;;3142:13;3156:1;3142:16;;;;;;;;;;;;;3132:7;;:26;;;;;;;;;;;;;;;;;;2620:545;;;2924:58:17;1928:4:21;2964:17:17;;1884:4:21;2942:19:17;;:39;2924:17;;;:58;;;:::i;:::-;3123:16;3102:18;:37;;;;;;;;;;;;:::i;:::-;;3164:11;3149:12;:26;;;;;;;;;;;;:::i;:::-;;3364:7;3357:3;3344:10;;:16;:27;;3336:36;;;;;;;;3382:13;:11;;;:13;;;:::i;:::-;2640:841;;;;;875:5455;;6602:114:21;2254:1;2248:3;;;;;;;;;;;2240:15;;;2239:49;;;;2286:1;2259:25;2279:3;;;;;;;;;;;2259:11;;;:25;;;:::i;:::-;:28;2239:49;2236:101;;;2302:35;1970:1;2302:19;;;:35;;;:::i;:::-;;2236:101;2372:3;;;;;;;;;;;:14;;;:16;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2372:16:21;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2372:16:21;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2372:16:21;;;;;;;;;;;;;;;;2351:37;;2359:8;;;;;;;;;;;2351:37;;;;2348:92;;;2423:3;;;;;;;;;;;:14;;;:16;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2423:16:21;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2423:16:21;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2423:16:21;;;;;;;;;;;;;;;;2402:8;;:38;;;;;;;;;;;;;;;;;;2348:92;6680:8;;;;;;;;;;;:21;;;6702:6;6680:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6680:29:21;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6680:29:21;;;;6602:114;:::o;5396:932:17:-;6095:15;6113:138;6141:10;;6165:18;6113:138;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6197:12;6113:138;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1104:6;6113:14;;;:138;;;:::i;:::-;6095:156;;6280:1;6269:12;;:7;:12;;;;;6261:21;;;;;;;;6317:4;6292:13;:22;6306:7;6292:22;;;;;;;;;;;;;;;;;;:29;;;;;;;;;;;;;;;;;;5396:932;:::o;6858:150:21:-;6920:10;6986:5;6974:18;6965:27;;6951:51;;;:::o;2564:183::-;2627:4;2647:21;:19;;;:21;;;:::i;:::-;2640:28;;2564:183;;;:::o;5732:383::-;5848:10;5869;2254:1;2248:3;;;;;;;;;;;2240:15;;;2239:49;;;;2286:1;2259:25;2279:3;;;;;;;;;;;2259:11;;;:25;;;:::i;:::-;:28;2239:49;2236:101;;;2302:35;1970:1;2302:19;;;:35;;;:::i;:::-;;2236:101;2372:3;;;;;;;;;;;:14;;;:16;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2372:16:21;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2372:16:21;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2372:16:21;;;;;;;;;;;;;;;;2351:37;;2359:8;;;;;;;;;;;2351:37;;;;2348:92;;;2423:3;;;;;;;;;;;:14;;;:16;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2423:16:21;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2423:16:21;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2423:16:21;;;;;;;;;;;;;;;;2402:8;;:38;;;;;;;;;;;;;;;;;;2348:92;5882:8;;;;;;;;;;;:17;;;5900:10;5912:8;5882:39;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;5882:39:21;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;5882:39:21;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;5882:39:21;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;5882:39:21;;;;;;;;;;;;;;;;5869:52;;6030:8;;;;;;;;;;;:27;;;6064:5;6071:9;6082:10;6094:3;6099:8;6030:78;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;6030:78:21;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;6030:78:21;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6030:78:21;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6030:78:21;;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;6030:78:21;;;;;;;;;;;;;;;;6023:85;;5732:383;;;;;;;:::o;2752:1749::-;2800:4;2875:1;2819:55;2831:42;2819:11;;;:55;;;:::i;:::-;:57;2815:245;;;2929:42;2901:3;;:71;;;;;;;;;;;;;;;;;;2986:38;;;;;;;;;;;;;;;;;;;:23;;;:38;;;:::i;:::-;3045:4;3038:11;;;;2815:245;3129:1;3073:55;3085:42;3073:11;;;:55;;;:::i;:::-;:57;3069:254;;;3191:42;3163:3;;:71;;;;;;;;;;;;;;;;;;3248:39;;;;;;;;;;;;;;;;;;;:23;;;:39;;;:::i;:::-;3308:4;3301:11;;;;3069:254;3392:1;3336:55;3348:42;3336:11;;;:55;;;:::i;:::-;:57;3332:249;;;3452:42;3424:3;;:71;;;;;;;;;;;;;;;;;;3509:36;;;;;;;;;;;;;;;;;;;:23;;;:36;;;:::i;:::-;3566:4;3559:11;;;;3332:249;3650:1;3594:55;3606:42;3594:11;;;:55;;;:::i;:::-;:57;3590:253;;;3712:42;3684:3;;:71;;;;;;;;;;;;;;;;;;3769:38;;;;;;;;;;;;;;;;;;;:23;;;:38;;;:::i;:::-;3828:4;3821:11;;;;3590:253;3912:1;3856:55;3868:42;3856:11;;;:55;;;:::i;:::-;:57;3852:201;;;3974:42;3946:3;;:71;;;;;;;;;;;;;;;;;;4038:4;4031:11;;;;3852:201;4122:1;4066:55;4078:42;4066:11;;;:55;;;:::i;:::-;:57;4062:200;;;4183:42;4155:3;;:71;;;;;;;;;;;;;;;;;;4247:4;4240:11;;;;4062:200;4331:1;4275:55;4287:42;4275:11;;;:55;;;:::i;:::-;:57;4271:202;;;4394:42;4366:3;;:71;;;;;;;;;;;;;;;;;;4458:4;4451:11;;;;4271:202;4489:5;4482:12;;2752:1749;;:::o;7645:118::-;7743:13;7719:21;:37;;;;;;;;;;;;:::i;:::-;;7645:118;:::o;875:5455:17:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;", + "deployedSourceMap": "875:5455:17:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;947:22:0;;8:9:-1;5:2;;;30:1;27;20:12;5:2;947:22:0;;;;;;;;;;;;;;;;;;;;;;;;;;;1399:21:3;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1399:21:3;;;;;;;;;;;;;;;;;;;;;;;1251:34:17;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1251:34:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;1251:34:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4507:111:21;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4507:111:21;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1110:32:3;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1110:32:3;;;;;;;;;;;;;;;;;;;;;;;1009:39;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1009:39:3;;;;;;;;;;;;;;;;;;;;;;;;;;;1459:29;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1459:29:3;;;;;;;;;;;;;;;;;;;;;;;;;;;4750:531:17;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4750:531:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1062:48;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1062:48:17;;;;;;;;;;;;;;;;;;;;;;;992:32;;8:9:-1;5:2;;;30:1;27;20:12;5:2;992:32:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;992:32:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1030:26;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1030:26:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;1030:26:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;976:27:3;;8:9:-1;5:2;;;30:1;27;20:12;5:2;976:27:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;976:27:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3871:599:17;;;;;;1054:21:3;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1054:21:3;;;;;;;;;;;;;;;;;;;;;;;1347:22;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1347:22:3;;;;;;;;;;;;;;;;;;;;;;;1081:23;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1081:23:3;;;;;;;;;;;;;;;;;;;;;;;1222:26;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1222:26:3;;;;;;;;;;;;;;;;;;;;;;;1426:27;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1426:27:3;;;;;;;;;;;;;;;;;;;;;;;1131:198:0;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1131:198:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;947:22;;;;;;;;;;;;;:::o;1399:21:3:-;;;;:::o;1251:34:17:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;4507:111:21:-;4573:38;4584:4;4590:6;4608:1;4598:12;;;;;;;;;;;;;;;;;;;;;;;;;29:2:-1;21:6;17:15;117:4;105:10;97:6;88:34;148:4;140:6;136:17;126:27;;0:157;4598:12:21;;;;4573:10;:38::i;:::-;4507:111;;:::o;1110:32:3:-;;;;:::o;1009:39::-;;;;;;;;;;;;;:::o;1459:29::-;;;;;;;;;;;;;:::o;4750:531:17:-;4854:20;:18;:20::i;:::-;4840:34;;:10;:34;;;4832:43;;;;;;;;4893:13;:22;4907:7;4893:22;;;;;;;;;;;;;;;;;;;;;;;;;;;4885:31;;;;;;;;4988:6;4965:20;:29;;;;;;;;;;;;:::i;:::-;;5016:38;5025:6;5033:20;;5016:8;:38::i;:::-;5004:9;:50;;;;5069:27;5086:9;;5069:27;;;;;;;;;;;;;;;;;;5106:17;:15;:17::i;:::-;5207:13;:22;5221:7;5207:22;;;;;;;;;;;;;;;;;;5200:29;;;;;;;;;;;4750:531;;;:::o;1062:48::-;1104:6;1062:48;:::o;992:32::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;1030:26::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;976:27:3:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;3871:599:17:-;3932:9;4261:15;3944:57;3962:18;3944:57;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1104:6;3944:17;:57::i;:::-;3932:69;;4032:4;4019:9;:17;;4011:26;;;;;;;;4279:114;4307:18;4279:114;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4339:12;4279:114;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1104:6;4279:14;:114::i;:::-;4261:132;;4422:1;4411:12;;:7;:12;;;;;4403:21;;;;;;;;4459:4;4434:13;:22;4448:7;4434:22;;;;;;;;;;;;;;;;;;:29;;;;;;;;;;;;;;;;;;3871:599;;:::o;1054:21:3:-;;;;:::o;1347:22::-;;;;:::o;1081:23::-;;;;:::o;1222:26::-;;;;:::o;1426:27::-;;;;:::o;1131:198:0:-;1390:7;;;;;;;;;;;1376:21;;:10;:21;;;1368:30;;;;;;;;1235:1;1213:24;;:10;:24;;;;1205:33;;;;;;;;1281:10;1253:39;;1272:7;;;;;;;;;;;1253:39;;;;;;;;;;;;1312:10;1302:7;;:20;;;;;;;;;;;;;;;;;;1131:198;:::o;6485:112:21:-;6545:7;2254:1;2248:3;;;;;;;;;;;2240:15;;;2239:49;;;;2286:1;2259:25;2279:3;;;;;;;;;;;2259:11;:25::i;:::-;:28;2239:49;2236:101;;;2302:35;1970:1;2302:19;:35::i;:::-;;2236:101;2372:3;;;;;;;;;;;:14;;;:16;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2372:16:21;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2372:16:21;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2372:16:21;;;;;;;;;;;;;;;;2351:37;;2359:8;;;;;;;;;;;2351:37;;;;2348:92;;;2423:3;;;;;;;;;;;:14;;;:16;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2423:16:21;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2423:16:21;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2423:16:21;;;;;;;;;;;;;;;;2402:8;;:38;;;;;;;;;;;;;;;;;;2348:92;6570:8;;;;;;;;;;;:18;;;:20;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6570:20:21;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6570:20:21;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;6570:20:21;;;;;;;;;;;;;;;;6563:27;;6485:112;:::o;7013:593::-;7074:4;7090:20;7132:9;7155:13;7191:6;7119:2;7090:32;;7144:1;7132:13;;7171:5;7155:21;;7198:1;7191:8;;7186:357;7203:7;:14;7201:1;:16;7186:357;;;7256:2;7242:16;;:7;7250:1;7242:10;;;;;;;;;;;;;;;;;;;;:16;;;;;7241:38;;;;;7276:2;7262:16;;:7;7270:1;7262:10;;;;;;;;;;;;;;;;;;;;:16;;;;;7241:38;7237:295;;;7302:8;7298:102;;;7342:1;7336:2;:7;7332:49;;;7345:5;;7332:49;7377:4;;;;;;;;7298:102;7425:2;7417:10;;;;7472:2;7458:7;7466:1;7458:10;;;;;;;;;;;;;;;;;;;;7453:16;;;:21;7445:29;;;;7237:295;;;7513:2;7499:16;;:7;7507:1;7499:10;;;;;;;;;;;;;;;;;;;;:16;;;;7495:37;;;7528:4;7517:15;;7495:37;7237:295;7219:3;;;;;;;7186:357;;;7561:1;7556:2;:6;7552:26;;;7576:2;7572;:6;7564:14;;;;7552:26;7595:4;7588:11;;7013:593;;;;;;;;:::o;3382:851:3:-;3494:23;3432:9;;;;;;;;;;;3428:56;;;3477:7;;3428:56;3537:10;;3531:3;:16;3527:616;;;3656:4;3644:9;;:16;;;;;;;;;;;;;;;;;;3752:9;;3731:30;;3527:616;;;3795:9;;3782;;:22;;3778:365;;;3896:4;3884:9;;:16;;;;;;;;;;;;;;;;;;3935:9;;3914:30;;3778:365;;;3978:11;;3965:9;;:24;;3961:182;;;4082:4;4070:9;;:16;;;;;;;;;;;;;;;;;;4121:11;;4100:32;;3961:182;3778:365;3527:616;4157:9;;;;;;;;;;;4153:74;;;4182:34;4197:18;4182:14;:34::i;:::-;4153:74;3382:851;;:::o;4915:159:21:-;5006:4;2254:1;2248:3;;;;;;;;;;;2240:15;;;2239:49;;;;2286:1;2259:25;2279:3;;;;;;;;;;;2259:11;:25::i;:::-;:28;2239:49;2236:101;;;2302:35;1970:1;2302:19;:35::i;:::-;;2236:101;2372:3;;;;;;;;;;;:14;;;:16;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2372:16:21;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2372:16:21;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2372:16:21;;;;;;;;;;;;;;;;2351:37;;2359:8;;;;;;;;;;;2351:37;;;;2348:92;;;2423:3;;;;;;;;;;;:14;;;:16;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2423:16:21;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2423:16:21;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2423:16:21;;;;;;;;;;;;;;;;2402:8;;:38;;;;;;;;;;;;;;;;;;2348:92;5028:8;;;;;;;;;;;:17;;;5046:10;5058:8;5028:39;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;5028:39:21;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;5028:39:21;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;5028:39:21;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;5028:39:21;;;;;;;;;;;;;;;;5021:46;;4915:159;;;;:::o;6120:359::-;6220:10;6241;2254:1;2248:3;;;;;;;;;;;2240:15;;;2239:49;;;;2286:1;2259:25;2279:3;;;;;;;;;;;2259:11;:25::i;:::-;:28;2239:49;2236:101;;;2302:35;1970:1;2302:19;:35::i;:::-;;2236:101;2372:3;;;;;;;;;;;:14;;;:16;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2372:16:21;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2372:16:21;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2372:16:21;;;;;;;;;;;;;;;;2351:37;;2359:8;;;;;;;;;;;2351:37;;;;2348:92;;;2423:3;;;;;;;;;;;:14;;;:16;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2423:16:21;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2423:16:21;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2423:16:21;;;;;;;;;;;;;;;;2402:8;;:38;;;;;;;;;;;;;;;;;;2348:92;6254:8;;;;;;;;;;;:17;;;6272:10;6284:8;6254:39;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;6254:39:21;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6254:39:21;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6254:39:21;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;6254:39:21;;;;;;;;;;;;;;;;6241:52;;6402:8;;;;;;;;;;;:27;;;6436:5;6443:1;6446:10;6458:3;6463:8;6402:70;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;6402:70:21;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;6402:70:21;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6402:70:21;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6402:70:21;;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;6402:70:21;;;;;;;;;;;;;;;;6395:77;;6120:359;;;;;;:::o;6858:150::-;6920:10;6986:5;6974:18;6965:27;;6951:51;;;:::o;2564:183::-;2627:4;2647:21;:19;:21::i;:::-;2640:28;;2564:183;;;:::o;4388:166:3:-;4475:20;4457:15;:38;;;;4510:37;4526:20;4510:37;;;;;;;;;;;;;;;;;;4388:166;:::o;2752:1749:21:-;2800:4;2875:1;2819:55;2831:42;2819:11;:55::i;:::-;:57;2815:245;;;2929:42;2901:3;;:71;;;;;;;;;;;;;;;;;;2986:38;;;;;;;;;;;;;;;;;;;:23;:38::i;:::-;3045:4;3038:11;;;;2815:245;3129:1;3073:55;3085:42;3073:11;:55::i;:::-;:57;3069:254;;;3191:42;3163:3;;:71;;;;;;;;;;;;;;;;;;3248:39;;;;;;;;;;;;;;;;;;;:23;:39::i;:::-;3308:4;3301:11;;;;3069:254;3392:1;3336:55;3348:42;3336:11;:55::i;:::-;:57;3332:249;;;3452:42;3424:3;;:71;;;;;;;;;;;;;;;;;;3509:36;;;;;;;;;;;;;;;;;;;:23;:36::i;:::-;3566:4;3559:11;;;;3332:249;3650:1;3594:55;3606:42;3594:11;:55::i;:::-;:57;3590:253;;;3712:42;3684:3;;:71;;;;;;;;;;;;;;;;;;3769:38;;;;;;;;;;;;;;;;;;;:23;:38::i;:::-;3828:4;3821:11;;;;3590:253;3912:1;3856:55;3868:42;3856:11;:55::i;:::-;:57;3852:201;;;3974:42;3946:3;;:71;;;;;;;;;;;;;;;;;;4038:4;4031:11;;;;3852:201;4122:1;4066:55;4078:42;4066:11;:55::i;:::-;:57;4062:200;;;4183:42;4155:3;;:71;;;;;;;;;;;;;;;;;;4247:4;4240:11;;;;4062:200;4331:1;4275:55;4287:42;4275:11;:55::i;:::-;:57;4271:202;;;4394:42;4366:3;;:71;;;;;;;;;;;;;;;;;;4458:4;4451:11;;;;4271:202;4489:5;4482:12;;2752:1749;;:::o;7645:118::-;7743:13;7719:21;:37;;;;;;;;;;;;:::i;:::-;;7645:118;:::o;875:5455:17:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o", + "source": "/*\n Copyright 2017-2018 Phillip A. Elsasser\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n*/\n\npragma solidity ^0.4.24;\n\nimport \"./oraclizeAPI.sol\";\nimport \"../libraries/MathLib.sol\";\nimport \"../MarketContract.sol\";\n\n\n/// @title MarketContract first example of a MarketProtocol contract using Oraclize services\n/// @author Phil Elsasser \ncontract MarketContractOraclize is MarketContract, usingOraclize {\n using MathLib for uint;\n\n // constants\n string public ORACLE_DATA_SOURCE;\n string public ORACLE_QUERY;\n uint constant public QUERY_CALLBACK_GAS = 150000;\n //uint constant public QUERY_CALLBACK_GAS_PRICE = 20000000000 wei; // 20 gwei - need to make this dynamic!\n\n // state variables\n string public lastPriceQueryResult;\n mapping(bytes32 => bool) validQueryIDs;\n\n /// @param contractName viewable name of this contract (BTC/ETH, LTC/ETH, etc)\n /// @param baseAddresses array of 2 addresses needed for our contract including:\n /// creatorAddress address of the person creating the contract\n /// collateralTokenAddress address of the ERC20 token that will be used for collateral and pricing\n /// @param contractSpecs array of unsigned integers including:\n /// floorPrice minimum tradeable price of this contract, contract enters settlement if breached\n /// capPrice maximum tradeable price of this contract, contract enters settlement if breached\n /// priceDecimalPlaces number of decimal places to convert our queried price from a floating point to\n /// an integer\n /// qtyMultiplier multiply traded qty by this value from base units of collateral token.\n /// expirationTimeStamp seconds from epoch that this contract expires and enters settlement\n /// @param oracleDataSource a data-source such as \"URL\", \"WolframAlpha\", \"IPFS\"\n /// see http://docs.oraclize.it/#ethereum-quick-start-simple-query\n /// @param oracleQuery see http://docs.oraclize.it/#ethereum-quick-start-simple-query for examples\n constructor(\n string contractName,\n address[2] baseAddresses,\n uint[5] contractSpecs,\n string oracleDataSource,\n string oracleQuery\n ) MarketContract(\n contractName,\n baseAddresses,\n contractSpecs\n ) public\n {\n oraclize_setProof(proofType_TLSNotary | proofStorage_IPFS);\n //oraclize_setCustomGasPrice(QUERY_CALLBACK_GAS_PRICE); //TODO: allow this to be changed by creator.\n ORACLE_DATA_SOURCE = oracleDataSource;\n ORACLE_QUERY = oracleQuery;\n\n // Future timestamp must be within 60 days from now.\n // https://docs.oraclize.it/#ethereum-quick-start-schedule-a-query-in-the-future\n require(EXPIRATION - now <= 60 days);\n queryOracle(); // Schedule a call to oracle at contract expiration time.\n }\n\n /// @notice allows a user to request an extra query to oracle in order to push the contract into\n /// settlement. A user may call this as many times as they like, since they are the ones paying for\n /// the call to our oracle and post processing. This is useful for both a failsafe and as a way to\n /// settle a contract early if a price cap or floor has been breached.\n function requestEarlySettlement() external payable {\n uint cost = oraclize_getPrice(ORACLE_DATA_SOURCE, QUERY_CALLBACK_GAS);\n require(msg.value >= cost); // user must pay enough to cover query and callback\n // create immediate query, we must make sure to store this one separately, so\n // we do not schedule recursive callbacks when the query completes.\n bytes32 queryId = oraclize_query(\n ORACLE_DATA_SOURCE,\n ORACLE_QUERY,\n QUERY_CALLBACK_GAS\n );\n require(queryId != 0);\n validQueryIDs[queryId] = true;\n }\n\n /*\n // PUBLIC METHODS\n */\n\n /// @notice only public for callbacks from oraclize, do not call\n /// @param queryID of the returning query, this should match our own internal mapping\n /// @param result query to be processed\n /// @param proof result proof\n function __callback(bytes32 queryID, string result, bytes proof) public {\n require(msg.sender == oraclize_cbAddress());\n require(validQueryIDs[queryID]); // At expiration or early settlement.\n lastPriceQueryResult = result;\n lastPrice = parseInt(result, PRICE_DECIMAL_PLACES);\n emit UpdatedLastPrice(lastPrice);\n checkSettlement(); // Verify settlement at expiration or requested early settlement.\n delete validQueryIDs[queryID];\n proof; // silence compiler warnings\n }\n\n /*\n // PRIVATE METHODS\n */\n\n /// @dev call to oraclize to set up our query and record its hash.\n function queryOracle() private {\n // Require that sufficient funds are available to pay for the query.\n // require(oraclize_getPrice(ORACLE_DATA_SOURCE, QUERY_CALLBACK_GAS) < this.balance);\n // NOTE: Currently the first oracle query call to oraclize.it is free. Since our\n // expiration query will always be the first, there is no needed pre-funding amount\n // to create this query. When we go to the centralized query hub - this will change\n // due to the fact that the address creating the query will always be the query hub.\n // will have to do the analysis to see which is cheaper, free queries, or lower deployment\n // gas costs\n bytes32 queryId = oraclize_query(\n EXPIRATION,\n ORACLE_DATA_SOURCE,\n ORACLE_QUERY,\n QUERY_CALLBACK_GAS\n );\n require(queryId != 0);\n validQueryIDs[queryId] = true;\n }\n}\n", + "sourcePath": "/home/travis/build/MARKETProtocol/MARKETProtocol/contracts/oraclize/MarketContractOraclize.sol", "ast": { - "absolutePath": "/home/pelsasser/MARKETProtocol/contracts/oraclize/MarketContractOraclize.sol", + "absolutePath": "/home/travis/build/MARKETProtocol/MARKETProtocol/contracts/oraclize/MarketContractOraclize.sol", "exportedSymbols": { "MarketContractOraclize": [ - 2950 + 3888 ] }, - "id": 2951, + "id": 3889, "nodeType": "SourceUnit", "nodes": [ { - "id": 2759, + "id": 3704, "literals": [ "solidity", "^", @@ -663,38 +368,38 @@ ".24" ], "nodeType": "PragmaDirective", - "src": "608:24:13" + "src": "608:24:17" }, { - "absolutePath": "/home/pelsasser/MARKETProtocol/contracts/oraclize/oraclizeAPI.sol", + "absolutePath": "/home/travis/build/MARKETProtocol/MARKETProtocol/contracts/oraclize/oraclizeAPI.sol", "file": "./oraclizeAPI.sol", - "id": 2760, + "id": 3705, "nodeType": "ImportDirective", - "scope": 2951, - "sourceUnit": 3911, - "src": "634:27:13", + "scope": 3889, + "sourceUnit": 4850, + "src": "634:27:17", "symbolAliases": [], "unitAlias": "" }, { - "absolutePath": "/home/pelsasser/MARKETProtocol/contracts/libraries/MathLib.sol", + "absolutePath": "/home/travis/build/MARKETProtocol/MARKETProtocol/contracts/libraries/MathLib.sol", "file": "../libraries/MathLib.sol", - "id": 2761, + "id": 3706, "nodeType": "ImportDirective", - "scope": 2951, - "sourceUnit": 2234, - "src": "662:34:13", + "scope": 3889, + "sourceUnit": 2799, + "src": "662:34:17", "symbolAliases": [], "unitAlias": "" }, { - "absolutePath": "/home/pelsasser/MARKETProtocol/contracts/MarketContract.sol", + "absolutePath": "/home/travis/build/MARKETProtocol/MARKETProtocol/contracts/MarketContract.sol", "file": "../MarketContract.sol", - "id": 2762, + "id": 3707, "nodeType": "ImportDirective", - "scope": 2951, - "sourceUnit": 1519, - "src": "697:31:13", + "scope": 3889, + "sourceUnit": 1019, + "src": "697:31:17", "symbolAliases": [], "unitAlias": "" }, @@ -704,78 +409,78 @@ "arguments": null, "baseName": { "contractScope": null, - "id": 2763, + "id": 3708, "name": "MarketContract", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1518, - "src": "910:14:13", + "referencedDeclaration": 1018, + "src": "910:14:17", "typeDescriptions": { - "typeIdentifier": "t_contract$_MarketContract_$1518", + "typeIdentifier": "t_contract$_MarketContract_$1018", "typeString": "contract MarketContract" } }, - "id": 2764, + "id": 3709, "nodeType": "InheritanceSpecifier", - "src": "910:14:13" + "src": "910:14:17" }, { "arguments": null, "baseName": { "contractScope": null, - "id": 2765, + "id": 3710, "name": "usingOraclize", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 3910, - "src": "926:13:13", + "referencedDeclaration": 4849, + "src": "926:13:17", "typeDescriptions": { - "typeIdentifier": "t_contract$_usingOraclize_$3910", + "typeIdentifier": "t_contract$_usingOraclize_$4849", "typeString": "contract usingOraclize" } }, - "id": 2766, + "id": 3711, "nodeType": "InheritanceSpecifier", - "src": "926:13:13" + "src": "926:13:17" } ], "contractDependencies": [ 55, - 1518, - 3910 + 1018, + 4849 ], "contractKind": "contract", "documentation": "@title MarketContract first example of a MarketProtocol contract using Oraclize services\n @author Phil Elsasser ", "fullyImplemented": true, - "id": 2950, + "id": 3888, "linearizedBaseContracts": [ - 2950, - 3910, - 1518, + 3888, + 4849, + 1018, 55 ], "name": "MarketContractOraclize", "nodeType": "ContractDefinition", "nodes": [ { - "id": 2769, + "id": 3714, "libraryName": { "contractScope": null, - "id": 2767, + "id": 3712, "name": "MathLib", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2233, - "src": "952:7:13", + "referencedDeclaration": 2798, + "src": "952:7:17", "typeDescriptions": { - "typeIdentifier": "t_contract$_MathLib_$2233", + "typeIdentifier": "t_contract$_MathLib_$2798", "typeString": "library MathLib" } }, "nodeType": "UsingForDirective", - "src": "946:23:13", + "src": "946:23:17", "typeName": { - "id": 2768, + "id": 3713, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "964:4:13", + "src": "964:4:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -784,11 +489,11 @@ }, { "constant": false, - "id": 2771, + "id": 3716, "name": "ORACLE_DATA_SOURCE", "nodeType": "VariableDeclaration", - "scope": 2950, - "src": "992:32:13", + "scope": 3888, + "src": "992:32:17", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -796,10 +501,10 @@ "typeString": "string" }, "typeName": { - "id": 2770, + "id": 3715, "name": "string", "nodeType": "ElementaryTypeName", - "src": "992:6:13", + "src": "992:6:17", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" @@ -810,11 +515,11 @@ }, { "constant": false, - "id": 2773, + "id": 3718, "name": "ORACLE_QUERY", "nodeType": "VariableDeclaration", - "scope": 2950, - "src": "1030:26:13", + "scope": 3888, + "src": "1030:26:17", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -822,10 +527,10 @@ "typeString": "string" }, "typeName": { - "id": 2772, + "id": 3717, "name": "string", "nodeType": "ElementaryTypeName", - "src": "1030:6:13", + "src": "1030:6:17", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" @@ -836,11 +541,11 @@ }, { "constant": true, - "id": 2776, + "id": 3721, "name": "QUERY_CALLBACK_GAS", "nodeType": "VariableDeclaration", - "scope": 2950, - "src": "1062:48:13", + "scope": 3888, + "src": "1062:48:17", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -848,10 +553,10 @@ "typeString": "uint256" }, "typeName": { - "id": 2774, + "id": 3719, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "1062:4:13", + "src": "1062:4:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -860,14 +565,14 @@ "value": { "argumentTypes": null, "hexValue": "313530303030", - "id": 2775, + "id": 3720, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "1104:6:13", + "src": "1104:6:17", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_150000_by_1", @@ -879,11 +584,11 @@ }, { "constant": false, - "id": 2778, + "id": 3723, "name": "lastPriceQueryResult", "nodeType": "VariableDeclaration", - "scope": 2950, - "src": "1251:34:13", + "scope": 3888, + "src": "1251:34:17", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -891,10 +596,10 @@ "typeString": "string" }, "typeName": { - "id": 2777, + "id": 3722, "name": "string", "nodeType": "ElementaryTypeName", - "src": "1251:6:13", + "src": "1251:6:17", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" @@ -905,11 +610,11 @@ }, { "constant": false, - "id": 2782, + "id": 3727, "name": "validQueryIDs", "nodeType": "VariableDeclaration", - "scope": 2950, - "src": "1291:38:13", + "scope": 3888, + "src": "1291:38:17", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -917,28 +622,28 @@ "typeString": "mapping(bytes32 => bool)" }, "typeName": { - "id": 2781, + "id": 3726, "keyType": { - "id": 2779, + "id": 3724, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "1299:7:13", + "src": "1299:7:17", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "nodeType": "Mapping", - "src": "1291:24:13", + "src": "1291:24:17", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", "typeString": "mapping(bytes32 => bool)" }, "valueType": { - "id": 2780, + "id": 3725, "name": "bool", "nodeType": "ElementaryTypeName", - "src": "1310:4:13", + "src": "1310:4:17", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -950,9 +655,9 @@ }, { "body": { - "id": 2836, + "id": 3774, "nodeType": "Block", - "src": "3094:567:13", + "src": "2914:567:17", "statements": [ { "expression": { @@ -964,19 +669,19 @@ "typeIdentifier": "t_bytes1", "typeString": "bytes1" }, - "id": 2814, + "id": 3752, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 2812, + "id": 3750, "name": "proofType_TLSNotary", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3330, - "src": "3122:19:13", + "referencedDeclaration": 4269, + "src": "2942:19:17", "typeDescriptions": { "typeIdentifier": "t_bytes1", "typeString": "bytes1" @@ -986,18 +691,18 @@ "operator": "|", "rightExpression": { "argumentTypes": null, - "id": 2813, + "id": 3751, "name": "proofStorage_IPFS", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3333, - "src": "3144:17:13", + "referencedDeclaration": 4272, + "src": "2964:17:17", "typeDescriptions": { "typeIdentifier": "t_bytes1", "typeString": "bytes1" } }, - "src": "3122:39:13", + "src": "2942:39:17", "typeDescriptions": { "typeIdentifier": "t_bytes1", "typeString": "bytes1" @@ -1011,18 +716,18 @@ "typeString": "bytes1" } ], - "id": 2811, + "id": 3749, "name": "oraclize_setProof", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3768, - "src": "3104:17:13", + "referencedDeclaration": 4707, + "src": "2924:17:17", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_bytes1_$returns$__$", "typeString": "function (bytes1)" } }, - "id": 2815, + "id": 3753, "isConstant": false, "isLValue": false, "isPure": false, @@ -1030,32 +735,32 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3104:58:13", + "src": "2924:58:17", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 2816, + "id": 3754, "nodeType": "ExpressionStatement", - "src": "3104:58:13" + "src": "2924:58:17" }, { "expression": { "argumentTypes": null, - "id": 2819, + "id": 3757, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 2817, + "id": 3755, "name": "ORACLE_DATA_SOURCE", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2771, - "src": "3282:18:13", + "referencedDeclaration": 3716, + "src": "3102:18:17", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string storage ref" @@ -1065,43 +770,43 @@ "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 2818, + "id": 3756, "name": "oracleDataSource", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2798, - "src": "3303:16:13", + "referencedDeclaration": 3739, + "src": "3123:16:17", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } }, - "src": "3282:37:13", + "src": "3102:37:17", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string storage ref" } }, - "id": 2820, + "id": 3758, "nodeType": "ExpressionStatement", - "src": "3282:37:13" + "src": "3102:37:17" }, { "expression": { "argumentTypes": null, - "id": 2823, + "id": 3761, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 2821, + "id": 3759, "name": "ORACLE_QUERY", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2773, - "src": "3329:12:13", + "referencedDeclaration": 3718, + "src": "3149:12:17", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string storage ref" @@ -1111,26 +816,26 @@ "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 2822, + "id": 3760, "name": "oracleQuery", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2800, - "src": "3344:11:13", + "referencedDeclaration": 3741, + "src": "3164:11:17", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } }, - "src": "3329:26:13", + "src": "3149:26:17", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string storage ref" } }, - "id": 2824, + "id": 3762, "nodeType": "ExpressionStatement", - "src": "3329:26:13" + "src": "3149:26:17" }, { "expression": { @@ -1142,7 +847,7 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 2830, + "id": 3768, "isConstant": false, "isLValue": false, "isPure": false, @@ -1153,19 +858,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 2828, + "id": 3766, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 2826, + "id": 3764, "name": "EXPIRATION", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 809, - "src": "3524:10:13", + "referencedDeclaration": 860, + "src": "3344:10:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1175,18 +880,18 @@ "operator": "-", "rightExpression": { "argumentTypes": null, - "id": 2827, + "id": 3765, "name": "now", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 5195, - "src": "3537:3:13", + "referencedDeclaration": 8185, + "src": "3357:3:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "3524:16:13", + "src": "3344:16:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1197,14 +902,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "3630", - "id": 2829, + "id": 3767, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "3544:7:13", + "src": "3364:7:17", "subdenomination": "days", "typeDescriptions": { "typeIdentifier": "t_rational_5184000_by_1", @@ -1212,7 +917,7 @@ }, "value": "60" }, - "src": "3524:27:13", + "src": "3344:27:17", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -1226,21 +931,21 @@ "typeString": "bool" } ], - "id": 2825, + "id": 3763, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 5196, - 5197 + 8186, + 8187 ], - "referencedDeclaration": 5196, - "src": "3516:7:13", + "referencedDeclaration": 8186, + "src": "3336:7:17", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, - "id": 2831, + "id": 3769, "isConstant": false, "isLValue": false, "isPure": false, @@ -1248,15 +953,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3516:36:13", + "src": "3336:36:17", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 2832, + "id": 3770, "nodeType": "ExpressionStatement", - "src": "3516:36:13" + "src": "3336:36:17" }, { "expression": { @@ -1264,18 +969,18 @@ "arguments": [], "expression": { "argumentTypes": [], - "id": 2833, + "id": 3771, "name": "queryOracle", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2949, - "src": "3562:11:13", + "referencedDeclaration": 3887, + "src": "3382:11:17", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", "typeString": "function ()" } }, - "id": 2834, + "id": 3772, "isConstant": false, "isLValue": false, "isPure": false, @@ -1283,20 +988,20 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3562:13:13", + "src": "3382:13:17", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 2835, + "id": 3773, "nodeType": "ExpressionStatement", - "src": "3562:13:13" + "src": "3382:13:17" } ] }, - "documentation": "@param contractName viewable name of this contract (BTC/ETH, LTC/ETH, etc)\n @param creatorAddress address of the person creating the contract\n @param marketTokenAddress address of our member token\n @param collateralTokenAddress address of the ERC20 token that will be used for collateral and pricing\n @param collateralPoolFactoryAddress address of the factory creating the collateral pools\n @param contractSpecs array of unsigned integers including:\n floorPrice minimum tradeable price of this contract, contract enters settlement if breached\n capPrice maximum tradeable price of this contract, contract enters settlement if breached\n priceDecimalPlaces number of decimal places to convert our queried price from a floating point to\n an integer\n qtyMultiplier multiply traded qty by this value from base units of collateral token.\n expirationTimeStamp - seconds from epoch that this contract expires and enters settlement\n @param oracleDataSource a data-source such as \"URL\", \"WolframAlpha\", \"IPFS\"\n see http://docs.oraclize.it/#ethereum-quick-start-simple-query\n @param oracleQuery see http://docs.oraclize.it/#ethereum-quick-start-simple-query for examples", - "id": 2837, + "documentation": "@param contractName viewable name of this contract (BTC/ETH, LTC/ETH, etc)\n @param baseAddresses array of 2 addresses needed for our contract including:\n creatorAddress address of the person creating the contract\n collateralTokenAddress address of the ERC20 token that will be used for collateral and pricing\n @param contractSpecs array of unsigned integers including:\n floorPrice minimum tradeable price of this contract, contract enters settlement if breached\n capPrice maximum tradeable price of this contract, contract enters settlement if breached\n priceDecimalPlaces number of decimal places to convert our queried price from a floating point to\n an integer\n qtyMultiplier multiply traded qty by this value from base units of collateral token.\n expirationTimeStamp seconds from epoch that this contract expires and enters settlement\n @param oracleDataSource a data-source such as \"URL\", \"WolframAlpha\", \"IPFS\"\n see http://docs.oraclize.it/#ethereum-quick-start-simple-query\n @param oracleQuery see http://docs.oraclize.it/#ethereum-quick-start-simple-query for examples", + "id": 3775, "implemented": true, "isConstructor": true, "isDeclaredConst": false, @@ -1305,12 +1010,12 @@ "arguments": [ { "argumentTypes": null, - "id": 2803, + "id": 3744, "name": "contractName", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2784, - "src": "2918:12:13", + "referencedDeclaration": 3729, + "src": "2837:12:17", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" @@ -1318,101 +1023,62 @@ }, { "argumentTypes": null, - "id": 2804, - "name": "creatorAddress", + "id": 3745, + "name": "baseAddresses", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2786, - "src": "2940:14:13", + "referencedDeclaration": 3733, + "src": "2859:13:17", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_array$_t_address_$2_memory_ptr", + "typeString": "address[2] memory" } }, { "argumentTypes": null, - "id": 2805, - "name": "marketTokenAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2788, - "src": "2964:18:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 2806, - "name": "collateralTokenAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2790, - "src": "2992:22:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 2807, - "name": "collateralPoolFactoryAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2792, - "src": "3024:28:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 2808, + "id": 3746, "name": "contractSpecs", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2796, - "src": "3062:13:13", + "referencedDeclaration": 3737, + "src": "2882:13:17", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$5_memory_ptr", "typeString": "uint256[5] memory" } } ], - "id": 2809, + "id": 3747, "modifierName": { "argumentTypes": null, - "id": 2802, + "id": 3743, "name": "MarketContract", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1518, - "src": "2894:14:13", + "referencedDeclaration": 1018, + "src": "2813:14:17", "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_MarketContract_$1518_$", + "typeIdentifier": "t_type$_t_contract$_MarketContract_$1018_$", "typeString": "type(contract MarketContract)" } }, "nodeType": "ModifierInvocation", - "src": "2894:187:13" + "src": "2813:88:17" } ], "name": "", "nodeType": "FunctionDefinition", "parameters": { - "id": 2801, + "id": 3742, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2784, + "id": 3729, "name": "contractName", "nodeType": "VariableDeclaration", - "scope": 2837, - "src": "2622:19:13", + "scope": 3775, + "src": "2661:19:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1420,10 +1086,10 @@ "typeString": "string" }, "typeName": { - "id": 2783, + "id": 3728, "name": "string", "nodeType": "ElementaryTypeName", - "src": "2622:6:13", + "src": "2661:6:17", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" @@ -1434,103 +1100,52 @@ }, { "constant": false, - "id": 2786, - "name": "creatorAddress", - "nodeType": "VariableDeclaration", - "scope": 2837, - "src": "2651:22:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2785, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2651:7:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2788, - "name": "marketTokenAddress", + "id": 3733, + "name": "baseAddresses", "nodeType": "VariableDeclaration", - "scope": 2837, - "src": "2683:26:13", + "scope": 3775, + "src": "2690:24:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_array$_t_address_$2_memory_ptr", + "typeString": "address[2]" }, "typeName": { - "id": 2787, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2683:7:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2790, - "name": "collateralTokenAddress", - "nodeType": "VariableDeclaration", - "scope": 2837, - "src": "2719:30:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2789, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2719:7:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2792, - "name": "collateralPoolFactoryAddress", - "nodeType": "VariableDeclaration", - "scope": 2837, - "src": "2759:36:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2791, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2759:7:13", + "baseType": { + "id": 3730, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2690:7:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 3732, + "length": { + "argumentTypes": null, + "hexValue": "32", + "id": 3731, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2698:1:17", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + }, + "value": "2" + }, + "nodeType": "ArrayTypeName", + "src": "2690:10:17", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_array$_t_address_$2_storage_ptr", + "typeString": "address[2]" } }, "value": null, @@ -1538,11 +1153,11 @@ }, { "constant": false, - "id": 2796, + "id": 3737, "name": "contractSpecs", "nodeType": "VariableDeclaration", - "scope": 2837, - "src": "2805:21:13", + "scope": 3775, + "src": "2724:21:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1551,27 +1166,27 @@ }, "typeName": { "baseType": { - "id": 2793, + "id": 3734, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "2805:4:13", + "src": "2724:4:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 2795, + "id": 3736, "length": { "argumentTypes": null, "hexValue": "35", - "id": 2794, + "id": 3735, "isConstant": false, "isLValue": false, "isPure": false, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "2810:1:13", + "src": "2729:1:17", "subdenomination": null, "typeDescriptions": { "typeIdentifier": null, @@ -1580,7 +1195,7 @@ "value": "5" }, "nodeType": "ArrayTypeName", - "src": "2805:7:13", + "src": "2724:7:17", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$5_storage_ptr", "typeString": "uint256[5]" @@ -1591,11 +1206,11 @@ }, { "constant": false, - "id": 2798, + "id": 3739, "name": "oracleDataSource", "nodeType": "VariableDeclaration", - "scope": 2837, - "src": "2836:23:13", + "scope": 3775, + "src": "2755:23:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1603,10 +1218,10 @@ "typeString": "string" }, "typeName": { - "id": 2797, + "id": 3738, "name": "string", "nodeType": "ElementaryTypeName", - "src": "2836:6:13", + "src": "2755:6:17", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" @@ -1617,11 +1232,11 @@ }, { "constant": false, - "id": 2800, + "id": 3741, "name": "oracleQuery", "nodeType": "VariableDeclaration", - "scope": 2837, - "src": "2869:18:13", + "scope": 3775, + "src": "2788:18:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1629,10 +1244,10 @@ "typeString": "string" }, "typeName": { - "id": 2799, + "id": 3740, "name": "string", "nodeType": "ElementaryTypeName", - "src": "2869:6:13", + "src": "2788:6:17", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" @@ -1642,39 +1257,39 @@ "visibility": "internal" } ], - "src": "2612:281:13" + "src": "2651:161:17" }, "payable": false, "returnParameters": { - "id": 2810, + "id": 3748, "nodeType": "ParameterList", "parameters": [], - "src": "3094:0:13" + "src": "2914:0:17" }, - "scope": 2950, - "src": "2601:1060:13", + "scope": 3888, + "src": "2640:841:17", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { - "id": 2874, + "id": 3812, "nodeType": "Block", - "src": "4102:548:13", + "src": "3922:548:17", "statements": [ { "assignments": [ - 2841 + 3779 ], "declarations": [ { "constant": false, - "id": 2841, + "id": 3779, "name": "cost", "nodeType": "VariableDeclaration", - "scope": 2875, - "src": "4112:9:13", + "scope": 3813, + "src": "3932:9:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1682,10 +1297,10 @@ "typeString": "uint256" }, "typeName": { - "id": 2840, + "id": 3778, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "4112:4:13", + "src": "3932:4:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1695,18 +1310,18 @@ "visibility": "internal" } ], - "id": 2846, + "id": 3784, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, - "id": 2843, + "id": 3781, "name": "ORACLE_DATA_SOURCE", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2771, - "src": "4142:18:13", + "referencedDeclaration": 3716, + "src": "3962:18:17", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string storage ref" @@ -1714,12 +1329,12 @@ }, { "argumentTypes": null, - "id": 2844, + "id": 3782, "name": "QUERY_CALLBACK_GAS", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2776, - "src": "4162:18:13", + "referencedDeclaration": 3721, + "src": "3982:18:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1737,21 +1352,21 @@ "typeString": "uint256" } ], - "id": 2842, + "id": 3780, "name": "oraclize_getPrice", "nodeType": "Identifier", "overloadedDeclarations": [ - 3597, - 3615 + 4536, + 4554 ], - "referencedDeclaration": 3615, - "src": "4124:17:13", + "referencedDeclaration": 4554, + "src": "3944:17:17", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_string_memory_ptr_$_t_uint256_$returns$_t_uint256_$", "typeString": "function (string memory,uint256) returns (uint256)" } }, - "id": 2845, + "id": 3783, "isConstant": false, "isLValue": false, "isPure": false, @@ -1759,14 +1374,14 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "4124:57:13", + "src": "3944:57:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", - "src": "4112:69:13" + "src": "3932:69:17" }, { "expression": { @@ -1778,7 +1393,7 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 2851, + "id": 3789, "isConstant": false, "isLValue": false, "isPure": false, @@ -1787,18 +1402,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 2848, + "id": 3786, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 5193, - "src": "4199:3:13", + "referencedDeclaration": 8183, + "src": "4019:3:17", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 2849, + "id": 3787, "isConstant": false, "isLValue": false, "isPure": false, @@ -1806,7 +1421,7 @@ "memberName": "value", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "4199:9:13", + "src": "4019:9:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1816,18 +1431,18 @@ "operator": ">=", "rightExpression": { "argumentTypes": null, - "id": 2850, + "id": 3788, "name": "cost", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2841, - "src": "4212:4:13", + "referencedDeclaration": 3779, + "src": "4032:4:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "4199:17:13", + "src": "4019:17:17", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -1841,21 +1456,21 @@ "typeString": "bool" } ], - "id": 2847, + "id": 3785, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 5196, - 5197 + 8186, + 8187 ], - "referencedDeclaration": 5196, - "src": "4191:7:13", + "referencedDeclaration": 8186, + "src": "4011:7:17", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, - "id": 2852, + "id": 3790, "isConstant": false, "isLValue": false, "isPure": false, @@ -1863,28 +1478,28 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "4191:26:13", + "src": "4011:26:17", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 2853, + "id": 3791, "nodeType": "ExpressionStatement", - "src": "4191:26:13" + "src": "4011:26:17" }, { "assignments": [ - 2855 + 3793 ], "declarations": [ { "constant": false, - "id": 2855, + "id": 3793, "name": "queryId", "nodeType": "VariableDeclaration", - "scope": 2875, - "src": "4441:15:13", + "scope": 3813, + "src": "4261:15:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1892,10 +1507,10 @@ "typeString": "bytes32" }, "typeName": { - "id": 2854, + "id": 3792, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "4441:7:13", + "src": "4261:7:17", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -1905,18 +1520,18 @@ "visibility": "internal" } ], - "id": 2861, + "id": 3799, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, - "id": 2857, + "id": 3795, "name": "ORACLE_DATA_SOURCE", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2771, - "src": "4487:18:13", + "referencedDeclaration": 3716, + "src": "4307:18:17", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string storage ref" @@ -1924,12 +1539,12 @@ }, { "argumentTypes": null, - "id": 2858, + "id": 3796, "name": "ORACLE_QUERY", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2773, - "src": "4519:12:13", + "referencedDeclaration": 3718, + "src": "4339:12:17", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string storage ref" @@ -1937,12 +1552,12 @@ }, { "argumentTypes": null, - "id": 2859, + "id": 3797, "name": "QUERY_CALLBACK_GAS", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2776, - "src": "4545:18:13", + "referencedDeclaration": 3721, + "src": "4365:18:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1964,23 +1579,23 @@ "typeString": "uint256" } ], - "id": 2856, + "id": 3794, "name": "oraclize_query", "nodeType": "Identifier", "overloadedDeclarations": [ - 3644, - 3675, - 3710, - 3743 + 4583, + 4614, + 4649, + 4682 ], - "referencedDeclaration": 3743, - "src": "4459:14:13", + "referencedDeclaration": 4682, + "src": "4279:14:17", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$_t_uint256_$returns$_t_bytes32_$", "typeString": "function (string memory,string memory,uint256) returns (bytes32)" } }, - "id": 2860, + "id": 3798, "isConstant": false, "isLValue": false, "isPure": false, @@ -1988,14 +1603,14 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "4459:114:13", + "src": "4279:114:17", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "nodeType": "VariableDeclarationStatement", - "src": "4441:132:13" + "src": "4261:132:17" }, { "expression": { @@ -2007,19 +1622,19 @@ "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, - "id": 2865, + "id": 3803, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 2863, + "id": 3801, "name": "queryId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2855, - "src": "4591:7:13", + "referencedDeclaration": 3793, + "src": "4411:7:17", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -2030,14 +1645,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "30", - "id": 2864, + "id": 3802, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "4602:1:13", + "src": "4422:1:17", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -2045,7 +1660,7 @@ }, "value": "0" }, - "src": "4591:12:13", + "src": "4411:12:17", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -2059,21 +1674,21 @@ "typeString": "bool" } ], - "id": 2862, + "id": 3800, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 5196, - 5197 + 8186, + 8187 ], - "referencedDeclaration": 5196, - "src": "4583:7:13", + "referencedDeclaration": 8186, + "src": "4403:7:17", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, - "id": 2866, + "id": 3804, "isConstant": false, "isLValue": false, "isPure": false, @@ -2081,20 +1696,20 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "4583:21:13", + "src": "4403:21:17", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 2867, + "id": 3805, "nodeType": "ExpressionStatement", - "src": "4583:21:13" + "src": "4403:21:17" }, { "expression": { "argumentTypes": null, - "id": 2872, + "id": 3810, "isConstant": false, "isLValue": false, "isPure": false, @@ -2103,26 +1718,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 2868, + "id": 3806, "name": "validQueryIDs", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2782, - "src": "4614:13:13", + "referencedDeclaration": 3727, + "src": "4434:13:17", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", "typeString": "mapping(bytes32 => bool)" } }, - "id": 2870, + "id": 3808, "indexExpression": { "argumentTypes": null, - "id": 2869, + "id": 3807, "name": "queryId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2855, - "src": "4628:7:13", + "referencedDeclaration": 3793, + "src": "4448:7:17", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -2133,7 +1748,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "4614:22:13", + "src": "4434:22:17", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -2144,14 +1759,14 @@ "rightHandSide": { "argumentTypes": null, "hexValue": "74727565", - "id": 2871, + "id": 3809, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", - "src": "4639:4:13", + "src": "4459:4:17", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", @@ -2159,20 +1774,20 @@ }, "value": "true" }, - "src": "4614:29:13", + "src": "4434:29:17", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 2873, + "id": 3811, "nodeType": "ExpressionStatement", - "src": "4614:29:13" + "src": "4434:29:17" } ] }, "documentation": "@notice allows a user to request an extra query to oracle in order to push the contract into\n settlement. A user may call this as many times as they like, since they are the ones paying for\n the call to our oracle and post processing. This is useful for both a failsafe and as a way to\n settle a contract early if a price cap or floor has been breached.", - "id": 2875, + "id": 3813, "implemented": true, "isConstructor": false, "isDeclaredConst": false, @@ -2180,29 +1795,29 @@ "name": "requestEarlySettlement", "nodeType": "FunctionDefinition", "parameters": { - "id": 2838, + "id": 3776, "nodeType": "ParameterList", "parameters": [], - "src": "4082:2:13" + "src": "3902:2:17" }, "payable": true, "returnParameters": { - "id": 2839, + "id": 3777, "nodeType": "ParameterList", "parameters": [], - "src": "4102:0:13" + "src": "3922:0:17" }, - "scope": 2950, - "src": "4051:599:13", + "scope": 3888, + "src": "3871:599:17", "stateMutability": "payable", - "superFunction": 1423, + "superFunction": null, "visibility": "external" }, { "body": { - "id": 2923, + "id": 3861, "nodeType": "Block", - "src": "5002:456:13", + "src": "4822:459:17", "statements": [ { "expression": { @@ -2214,7 +1829,7 @@ "typeIdentifier": "t_address", "typeString": "address" }, - "id": 2889, + "id": 3827, "isConstant": false, "isLValue": false, "isPure": false, @@ -2223,18 +1838,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 2885, + "id": 3823, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 5193, - "src": "5020:3:13", + "referencedDeclaration": 8183, + "src": "4840:3:17", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 2886, + "id": 3824, "isConstant": false, "isLValue": false, "isPure": false, @@ -2242,7 +1857,7 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "5020:10:13", + "src": "4840:10:17", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -2255,18 +1870,18 @@ "arguments": [], "expression": { "argumentTypes": [], - "id": 2887, + "id": 3825, "name": "oraclize_cbAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3755, - "src": "5034:18:13", + "referencedDeclaration": 4694, + "src": "4854:18:17", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$__$returns$_t_address_$", "typeString": "function () returns (address)" } }, - "id": 2888, + "id": 3826, "isConstant": false, "isLValue": false, "isPure": false, @@ -2274,13 +1889,13 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "5034:20:13", + "src": "4854:20:17", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "src": "5020:34:13", + "src": "4840:34:17", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -2294,21 +1909,21 @@ "typeString": "bool" } ], - "id": 2884, + "id": 3822, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 5196, - 5197 + 8186, + 8187 ], - "referencedDeclaration": 5196, - "src": "5012:7:13", + "referencedDeclaration": 8186, + "src": "4832:7:17", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, - "id": 2890, + "id": 3828, "isConstant": false, "isLValue": false, "isPure": false, @@ -2316,15 +1931,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "5012:43:13", + "src": "4832:43:17", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 2891, + "id": 3829, "nodeType": "ExpressionStatement", - "src": "5012:43:13" + "src": "4832:43:17" }, { "expression": { @@ -2334,26 +1949,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 2893, + "id": 3831, "name": "validQueryIDs", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2782, - "src": "5073:13:13", + "referencedDeclaration": 3727, + "src": "4893:13:17", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", "typeString": "mapping(bytes32 => bool)" } }, - "id": 2895, + "id": 3833, "indexExpression": { "argumentTypes": null, - "id": 2894, + "id": 3832, "name": "queryID", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2877, - "src": "5087:7:13", + "referencedDeclaration": 3815, + "src": "4907:7:17", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -2364,7 +1979,7 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "5073:22:13", + "src": "4893:22:17", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -2378,21 +1993,21 @@ "typeString": "bool" } ], - "id": 2892, + "id": 3830, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 5196, - 5197 + 8186, + 8187 ], - "referencedDeclaration": 5196, - "src": "5065:7:13", + "referencedDeclaration": 8186, + "src": "4885:7:17", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, - "id": 2896, + "id": 3834, "isConstant": false, "isLValue": false, "isPure": false, @@ -2400,32 +2015,32 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "5065:31:13", + "src": "4885:31:17", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 2897, + "id": 3835, "nodeType": "ExpressionStatement", - "src": "5065:31:13" + "src": "4885:31:17" }, { "expression": { "argumentTypes": null, - "id": 2900, + "id": 3838, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 2898, + "id": 3836, "name": "lastPriceQueryResult", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2778, - "src": "5145:20:13", + "referencedDeclaration": 3723, + "src": "4965:20:17", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string storage ref" @@ -2435,43 +2050,43 @@ "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 2899, + "id": 3837, "name": "result", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2879, - "src": "5168:6:13", + "referencedDeclaration": 3817, + "src": "4988:6:17", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } }, - "src": "5145:29:13", + "src": "4965:29:17", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string storage ref" } }, - "id": 2901, + "id": 3839, "nodeType": "ExpressionStatement", - "src": "5145:29:13" + "src": "4965:29:17" }, { "expression": { "argumentTypes": null, - "id": 2907, + "id": 3845, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 2902, + "id": 3840, "name": "lastPrice", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 811, - "src": "5184:9:13", + "referencedDeclaration": 862, + "src": "5004:9:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2484,12 +2099,12 @@ "arguments": [ { "argumentTypes": null, - "id": 2904, + "id": 3842, "name": "result", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2879, - "src": "5205:6:13", + "referencedDeclaration": 3817, + "src": "5025:6:17", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" @@ -2497,12 +2112,12 @@ }, { "argumentTypes": null, - "id": 2905, + "id": 3843, "name": "PRICE_DECIMAL_PLACES", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 805, - "src": "5213:20:13", + "referencedDeclaration": 856, + "src": "5033:20:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2520,18 +2135,18 @@ "typeString": "uint256" } ], - "id": 2903, + "id": 3841, "name": "parseInt", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3889, - "src": "5196:8:13", + "referencedDeclaration": 4828, + "src": "5016:8:17", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$_t_uint256_$returns$_t_uint256_$", "typeString": "function (string memory,uint256) pure returns (uint256)" } }, - "id": 2906, + "id": 3844, "isConstant": false, "isLValue": false, "isPure": false, @@ -2539,21 +2154,21 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "5196:38:13", + "src": "5016:38:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "5184:50:13", + "src": "5004:50:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 2908, + "id": 3846, "nodeType": "ExpressionStatement", - "src": "5184:50:13" + "src": "5004:50:17" }, { "eventCall": { @@ -2561,37 +2176,37 @@ "arguments": [ { "argumentTypes": null, - "id": 2910, - "name": "result", + "id": 3848, + "name": "lastPrice", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2879, - "src": "5266:6:13", + "referencedDeclaration": 862, + "src": "5086:9:17", "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } ], - "id": 2909, + "id": 3847, "name": "UpdatedLastPrice", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 829, - "src": "5249:16:13", + "referencedDeclaration": 871, + "src": "5069:16:17", "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$returns$__$", - "typeString": "function (string memory)" + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" } }, - "id": 2911, + "id": 3849, "isConstant": false, "isLValue": false, "isPure": false, @@ -2599,15 +2214,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "5249:24:13", + "src": "5069:27:17", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 2912, + "id": 3850, "nodeType": "EmitStatement", - "src": "5244:29:13" + "src": "5064:32:17" }, { "expression": { @@ -2615,18 +2230,18 @@ "arguments": [], "expression": { "argumentTypes": [], - "id": 2913, + "id": 3851, "name": "checkSettlement", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1492, - "src": "5283:15:13", + "referencedDeclaration": 1003, + "src": "5106:15:17", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", "typeString": "function ()" } }, - "id": 2914, + "id": 3852, "isConstant": false, "isLValue": false, "isPure": false, @@ -2634,20 +2249,20 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "5283:17:13", + "src": "5106:17:17", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 2915, + "id": 3853, "nodeType": "ExpressionStatement", - "src": "5283:17:13" + "src": "5106:17:17" }, { "expression": { "argumentTypes": null, - "id": 2919, + "id": 3857, "isConstant": false, "isLValue": false, "isPure": false, @@ -2655,31 +2270,31 @@ "nodeType": "UnaryOperation", "operator": "delete", "prefix": true, - "src": "5377:29:13", + "src": "5200:29:17", "subExpression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 2916, + "id": 3854, "name": "validQueryIDs", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2782, - "src": "5384:13:13", + "referencedDeclaration": 3727, + "src": "5207:13:17", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", "typeString": "mapping(bytes32 => bool)" } }, - "id": 2918, + "id": 3856, "indexExpression": { "argumentTypes": null, - "id": 2917, + "id": 3855, "name": "queryID", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2877, - "src": "5398:7:13", + "referencedDeclaration": 3815, + "src": "5221:7:17", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -2690,7 +2305,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "5384:22:13", + "src": "5207:22:17", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -2701,32 +2316,32 @@ "typeString": "tuple()" } }, - "id": 2920, + "id": 3858, "nodeType": "ExpressionStatement", - "src": "5377:29:13" + "src": "5200:29:17" }, { "expression": { "argumentTypes": null, - "id": 2921, + "id": 3859, "name": "proof", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2881, - "src": "5416:5:13", + "referencedDeclaration": 3819, + "src": "5239:5:17", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } }, - "id": 2922, + "id": 3860, "nodeType": "ExpressionStatement", - "src": "5416:5:13" + "src": "5239:5:17" } ] }, "documentation": "@notice only public for callbacks from oraclize, do not call\n @param queryID of the returning query, this should match our own internal mapping\n @param result query to be processed\n @param proof result proof", - "id": 2924, + "id": 3862, "implemented": true, "isConstructor": false, "isDeclaredConst": false, @@ -2734,16 +2349,16 @@ "name": "__callback", "nodeType": "FunctionDefinition", "parameters": { - "id": 2882, + "id": 3820, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2877, + "id": 3815, "name": "queryID", "nodeType": "VariableDeclaration", - "scope": 2924, - "src": "4950:15:13", + "scope": 3862, + "src": "4770:15:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2751,10 +2366,10 @@ "typeString": "bytes32" }, "typeName": { - "id": 2876, + "id": 3814, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "4950:7:13", + "src": "4770:7:17", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -2765,11 +2380,11 @@ }, { "constant": false, - "id": 2879, + "id": 3817, "name": "result", "nodeType": "VariableDeclaration", - "scope": 2924, - "src": "4967:13:13", + "scope": 3862, + "src": "4787:13:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2777,10 +2392,10 @@ "typeString": "string" }, "typeName": { - "id": 2878, + "id": 3816, "name": "string", "nodeType": "ElementaryTypeName", - "src": "4967:6:13", + "src": "4787:6:17", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" @@ -2791,11 +2406,11 @@ }, { "constant": false, - "id": 2881, + "id": 3819, "name": "proof", "nodeType": "VariableDeclaration", - "scope": 2924, - "src": "4982:11:13", + "scope": 3862, + "src": "4802:11:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2803,10 +2418,10 @@ "typeString": "bytes" }, "typeName": { - "id": 2880, + "id": 3818, "name": "bytes", "nodeType": "ElementaryTypeName", - "src": "4982:5:13", + "src": "4802:5:17", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" @@ -2816,39 +2431,39 @@ "visibility": "internal" } ], - "src": "4949:45:13" + "src": "4769:45:17" }, "payable": false, "returnParameters": { - "id": 2883, + "id": 3821, "nodeType": "ParameterList", "parameters": [], - "src": "5002:0:13" + "src": "4822:0:17" }, - "scope": 2950, - "src": "4930:528:13", + "scope": 3888, + "src": "4750:531:17", "stateMutability": "nonpayable", - "superFunction": 3582, + "superFunction": 4521, "visibility": "public" }, { "body": { - "id": 2948, + "id": 3886, "nodeType": "Block", - "src": "5604:901:13", + "src": "5427:901:17", "statements": [ { "assignments": [ - 2928 + 3866 ], "declarations": [ { "constant": false, - "id": 2928, + "id": 3866, "name": "queryId", "nodeType": "VariableDeclaration", - "scope": 2949, - "src": "6272:15:13", + "scope": 3887, + "src": "6095:15:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2856,10 +2471,10 @@ "typeString": "bytes32" }, "typeName": { - "id": 2927, + "id": 3865, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "6272:7:13", + "src": "6095:7:17", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -2869,18 +2484,18 @@ "visibility": "internal" } ], - "id": 2935, + "id": 3873, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, - "id": 2930, + "id": 3868, "name": "EXPIRATION", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 809, - "src": "6318:10:13", + "referencedDeclaration": 860, + "src": "6141:10:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2888,12 +2503,12 @@ }, { "argumentTypes": null, - "id": 2931, + "id": 3869, "name": "ORACLE_DATA_SOURCE", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2771, - "src": "6342:18:13", + "referencedDeclaration": 3716, + "src": "6165:18:17", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string storage ref" @@ -2901,12 +2516,12 @@ }, { "argumentTypes": null, - "id": 2932, + "id": 3870, "name": "ORACLE_QUERY", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2773, - "src": "6374:12:13", + "referencedDeclaration": 3718, + "src": "6197:12:17", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string storage ref" @@ -2914,12 +2529,12 @@ }, { "argumentTypes": null, - "id": 2933, + "id": 3871, "name": "QUERY_CALLBACK_GAS", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2776, - "src": "6400:18:13", + "referencedDeclaration": 3721, + "src": "6223:18:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2945,23 +2560,23 @@ "typeString": "uint256" } ], - "id": 2929, + "id": 3867, "name": "oraclize_query", "nodeType": "Identifier", "overloadedDeclarations": [ - 3644, - 3675, - 3710, - 3743 + 4583, + 4614, + 4649, + 4682 ], - "referencedDeclaration": 3710, - "src": "6290:14:13", + "referencedDeclaration": 4649, + "src": "6113:14:17", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_string_memory_ptr_$_t_string_memory_ptr_$_t_uint256_$returns$_t_bytes32_$", "typeString": "function (uint256,string memory,string memory,uint256) returns (bytes32)" } }, - "id": 2934, + "id": 3872, "isConstant": false, "isLValue": false, "isPure": false, @@ -2969,14 +2584,14 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "6290:138:13", + "src": "6113:138:17", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "nodeType": "VariableDeclarationStatement", - "src": "6272:156:13" + "src": "6095:156:17" }, { "expression": { @@ -2988,19 +2603,19 @@ "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, - "id": 2939, + "id": 3877, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 2937, + "id": 3875, "name": "queryId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2928, - "src": "6446:7:13", + "referencedDeclaration": 3866, + "src": "6269:7:17", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -3011,14 +2626,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "30", - "id": 2938, + "id": 3876, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "6457:1:13", + "src": "6280:1:17", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -3026,7 +2641,7 @@ }, "value": "0" }, - "src": "6446:12:13", + "src": "6269:12:17", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -3040,21 +2655,21 @@ "typeString": "bool" } ], - "id": 2936, + "id": 3874, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 5196, - 5197 + 8186, + 8187 ], - "referencedDeclaration": 5196, - "src": "6438:7:13", + "referencedDeclaration": 8186, + "src": "6261:7:17", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, - "id": 2940, + "id": 3878, "isConstant": false, "isLValue": false, "isPure": false, @@ -3062,20 +2677,20 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "6438:21:13", + "src": "6261:21:17", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 2941, + "id": 3879, "nodeType": "ExpressionStatement", - "src": "6438:21:13" + "src": "6261:21:17" }, { "expression": { "argumentTypes": null, - "id": 2946, + "id": 3884, "isConstant": false, "isLValue": false, "isPure": false, @@ -3084,26 +2699,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 2942, + "id": 3880, "name": "validQueryIDs", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2782, - "src": "6469:13:13", + "referencedDeclaration": 3727, + "src": "6292:13:17", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", "typeString": "mapping(bytes32 => bool)" } }, - "id": 2944, + "id": 3882, "indexExpression": { "argumentTypes": null, - "id": 2943, + "id": 3881, "name": "queryId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2928, - "src": "6483:7:13", + "referencedDeclaration": 3866, + "src": "6306:7:17", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -3114,7 +2729,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "6469:22:13", + "src": "6292:22:17", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -3125,14 +2740,14 @@ "rightHandSide": { "argumentTypes": null, "hexValue": "74727565", - "id": 2945, + "id": 3883, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", - "src": "6494:4:13", + "src": "6317:4:17", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", @@ -3140,20 +2755,20 @@ }, "value": "true" }, - "src": "6469:29:13", + "src": "6292:29:17", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 2947, + "id": 3885, "nodeType": "ExpressionStatement", - "src": "6469:29:13" + "src": "6292:29:17" } ] }, "documentation": "@dev call to oraclize to set up our query and record its hash.", - "id": 2949, + "id": 3887, "implemented": true, "isConstructor": false, "isDeclaredConst": false, @@ -3161,43 +2776,43 @@ "name": "queryOracle", "nodeType": "FunctionDefinition", "parameters": { - "id": 2925, + "id": 3863, "nodeType": "ParameterList", "parameters": [], - "src": "5593:2:13" + "src": "5416:2:17" }, "payable": false, "returnParameters": { - "id": 2926, + "id": 3864, "nodeType": "ParameterList", "parameters": [], - "src": "5604:0:13" + "src": "5427:0:17" }, - "scope": 2950, - "src": "5573:932:13", + "scope": 3888, + "src": "5396:932:17", "stateMutability": "nonpayable", "superFunction": null, "visibility": "private" } ], - "scope": 2951, - "src": "875:5632:13" + "scope": 3889, + "src": "875:5455:17" } ], - "src": "608:5899:13" + "src": "608:5723:17" }, "legacyAST": { - "absolutePath": "/home/pelsasser/MARKETProtocol/contracts/oraclize/MarketContractOraclize.sol", + "absolutePath": "/home/travis/build/MARKETProtocol/MARKETProtocol/contracts/oraclize/MarketContractOraclize.sol", "exportedSymbols": { "MarketContractOraclize": [ - 2950 + 3888 ] }, - "id": 2951, + "id": 3889, "nodeType": "SourceUnit", "nodes": [ { - "id": 2759, + "id": 3704, "literals": [ "solidity", "^", @@ -3205,38 +2820,38 @@ ".24" ], "nodeType": "PragmaDirective", - "src": "608:24:13" + "src": "608:24:17" }, { - "absolutePath": "/home/pelsasser/MARKETProtocol/contracts/oraclize/oraclizeAPI.sol", + "absolutePath": "/home/travis/build/MARKETProtocol/MARKETProtocol/contracts/oraclize/oraclizeAPI.sol", "file": "./oraclizeAPI.sol", - "id": 2760, + "id": 3705, "nodeType": "ImportDirective", - "scope": 2951, - "sourceUnit": 3911, - "src": "634:27:13", + "scope": 3889, + "sourceUnit": 4850, + "src": "634:27:17", "symbolAliases": [], "unitAlias": "" }, { - "absolutePath": "/home/pelsasser/MARKETProtocol/contracts/libraries/MathLib.sol", + "absolutePath": "/home/travis/build/MARKETProtocol/MARKETProtocol/contracts/libraries/MathLib.sol", "file": "../libraries/MathLib.sol", - "id": 2761, + "id": 3706, "nodeType": "ImportDirective", - "scope": 2951, - "sourceUnit": 2234, - "src": "662:34:13", + "scope": 3889, + "sourceUnit": 2799, + "src": "662:34:17", "symbolAliases": [], "unitAlias": "" }, { - "absolutePath": "/home/pelsasser/MARKETProtocol/contracts/MarketContract.sol", + "absolutePath": "/home/travis/build/MARKETProtocol/MARKETProtocol/contracts/MarketContract.sol", "file": "../MarketContract.sol", - "id": 2762, + "id": 3707, "nodeType": "ImportDirective", - "scope": 2951, - "sourceUnit": 1519, - "src": "697:31:13", + "scope": 3889, + "sourceUnit": 1019, + "src": "697:31:17", "symbolAliases": [], "unitAlias": "" }, @@ -3246,78 +2861,78 @@ "arguments": null, "baseName": { "contractScope": null, - "id": 2763, + "id": 3708, "name": "MarketContract", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1518, - "src": "910:14:13", + "referencedDeclaration": 1018, + "src": "910:14:17", "typeDescriptions": { - "typeIdentifier": "t_contract$_MarketContract_$1518", + "typeIdentifier": "t_contract$_MarketContract_$1018", "typeString": "contract MarketContract" } }, - "id": 2764, + "id": 3709, "nodeType": "InheritanceSpecifier", - "src": "910:14:13" + "src": "910:14:17" }, { "arguments": null, "baseName": { "contractScope": null, - "id": 2765, + "id": 3710, "name": "usingOraclize", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 3910, - "src": "926:13:13", + "referencedDeclaration": 4849, + "src": "926:13:17", "typeDescriptions": { - "typeIdentifier": "t_contract$_usingOraclize_$3910", + "typeIdentifier": "t_contract$_usingOraclize_$4849", "typeString": "contract usingOraclize" } }, - "id": 2766, + "id": 3711, "nodeType": "InheritanceSpecifier", - "src": "926:13:13" + "src": "926:13:17" } ], "contractDependencies": [ 55, - 1518, - 3910 + 1018, + 4849 ], "contractKind": "contract", "documentation": "@title MarketContract first example of a MarketProtocol contract using Oraclize services\n @author Phil Elsasser ", "fullyImplemented": true, - "id": 2950, + "id": 3888, "linearizedBaseContracts": [ - 2950, - 3910, - 1518, + 3888, + 4849, + 1018, 55 ], "name": "MarketContractOraclize", "nodeType": "ContractDefinition", "nodes": [ { - "id": 2769, + "id": 3714, "libraryName": { "contractScope": null, - "id": 2767, + "id": 3712, "name": "MathLib", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2233, - "src": "952:7:13", + "referencedDeclaration": 2798, + "src": "952:7:17", "typeDescriptions": { - "typeIdentifier": "t_contract$_MathLib_$2233", + "typeIdentifier": "t_contract$_MathLib_$2798", "typeString": "library MathLib" } }, "nodeType": "UsingForDirective", - "src": "946:23:13", + "src": "946:23:17", "typeName": { - "id": 2768, + "id": 3713, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "964:4:13", + "src": "964:4:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3326,11 +2941,11 @@ }, { "constant": false, - "id": 2771, + "id": 3716, "name": "ORACLE_DATA_SOURCE", "nodeType": "VariableDeclaration", - "scope": 2950, - "src": "992:32:13", + "scope": 3888, + "src": "992:32:17", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -3338,10 +2953,10 @@ "typeString": "string" }, "typeName": { - "id": 2770, + "id": 3715, "name": "string", "nodeType": "ElementaryTypeName", - "src": "992:6:13", + "src": "992:6:17", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" @@ -3352,11 +2967,11 @@ }, { "constant": false, - "id": 2773, + "id": 3718, "name": "ORACLE_QUERY", "nodeType": "VariableDeclaration", - "scope": 2950, - "src": "1030:26:13", + "scope": 3888, + "src": "1030:26:17", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -3364,10 +2979,10 @@ "typeString": "string" }, "typeName": { - "id": 2772, + "id": 3717, "name": "string", "nodeType": "ElementaryTypeName", - "src": "1030:6:13", + "src": "1030:6:17", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" @@ -3378,11 +2993,11 @@ }, { "constant": true, - "id": 2776, + "id": 3721, "name": "QUERY_CALLBACK_GAS", "nodeType": "VariableDeclaration", - "scope": 2950, - "src": "1062:48:13", + "scope": 3888, + "src": "1062:48:17", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -3390,10 +3005,10 @@ "typeString": "uint256" }, "typeName": { - "id": 2774, + "id": 3719, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "1062:4:13", + "src": "1062:4:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3402,14 +3017,14 @@ "value": { "argumentTypes": null, "hexValue": "313530303030", - "id": 2775, + "id": 3720, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "1104:6:13", + "src": "1104:6:17", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_150000_by_1", @@ -3421,11 +3036,11 @@ }, { "constant": false, - "id": 2778, + "id": 3723, "name": "lastPriceQueryResult", "nodeType": "VariableDeclaration", - "scope": 2950, - "src": "1251:34:13", + "scope": 3888, + "src": "1251:34:17", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -3433,10 +3048,10 @@ "typeString": "string" }, "typeName": { - "id": 2777, + "id": 3722, "name": "string", "nodeType": "ElementaryTypeName", - "src": "1251:6:13", + "src": "1251:6:17", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" @@ -3447,11 +3062,11 @@ }, { "constant": false, - "id": 2782, + "id": 3727, "name": "validQueryIDs", "nodeType": "VariableDeclaration", - "scope": 2950, - "src": "1291:38:13", + "scope": 3888, + "src": "1291:38:17", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -3459,28 +3074,28 @@ "typeString": "mapping(bytes32 => bool)" }, "typeName": { - "id": 2781, + "id": 3726, "keyType": { - "id": 2779, + "id": 3724, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "1299:7:13", + "src": "1299:7:17", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "nodeType": "Mapping", - "src": "1291:24:13", + "src": "1291:24:17", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", "typeString": "mapping(bytes32 => bool)" }, "valueType": { - "id": 2780, + "id": 3725, "name": "bool", "nodeType": "ElementaryTypeName", - "src": "1310:4:13", + "src": "1310:4:17", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -3492,9 +3107,9 @@ }, { "body": { - "id": 2836, + "id": 3774, "nodeType": "Block", - "src": "3094:567:13", + "src": "2914:567:17", "statements": [ { "expression": { @@ -3506,19 +3121,19 @@ "typeIdentifier": "t_bytes1", "typeString": "bytes1" }, - "id": 2814, + "id": 3752, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 2812, + "id": 3750, "name": "proofType_TLSNotary", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3330, - "src": "3122:19:13", + "referencedDeclaration": 4269, + "src": "2942:19:17", "typeDescriptions": { "typeIdentifier": "t_bytes1", "typeString": "bytes1" @@ -3528,18 +3143,18 @@ "operator": "|", "rightExpression": { "argumentTypes": null, - "id": 2813, + "id": 3751, "name": "proofStorage_IPFS", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3333, - "src": "3144:17:13", + "referencedDeclaration": 4272, + "src": "2964:17:17", "typeDescriptions": { "typeIdentifier": "t_bytes1", "typeString": "bytes1" } }, - "src": "3122:39:13", + "src": "2942:39:17", "typeDescriptions": { "typeIdentifier": "t_bytes1", "typeString": "bytes1" @@ -3553,18 +3168,18 @@ "typeString": "bytes1" } ], - "id": 2811, + "id": 3749, "name": "oraclize_setProof", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3768, - "src": "3104:17:13", + "referencedDeclaration": 4707, + "src": "2924:17:17", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_bytes1_$returns$__$", "typeString": "function (bytes1)" } }, - "id": 2815, + "id": 3753, "isConstant": false, "isLValue": false, "isPure": false, @@ -3572,32 +3187,32 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3104:58:13", + "src": "2924:58:17", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 2816, + "id": 3754, "nodeType": "ExpressionStatement", - "src": "3104:58:13" + "src": "2924:58:17" }, { "expression": { "argumentTypes": null, - "id": 2819, + "id": 3757, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 2817, + "id": 3755, "name": "ORACLE_DATA_SOURCE", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2771, - "src": "3282:18:13", + "referencedDeclaration": 3716, + "src": "3102:18:17", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string storage ref" @@ -3607,43 +3222,43 @@ "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 2818, + "id": 3756, "name": "oracleDataSource", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2798, - "src": "3303:16:13", + "referencedDeclaration": 3739, + "src": "3123:16:17", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } }, - "src": "3282:37:13", + "src": "3102:37:17", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string storage ref" } }, - "id": 2820, + "id": 3758, "nodeType": "ExpressionStatement", - "src": "3282:37:13" + "src": "3102:37:17" }, { "expression": { "argumentTypes": null, - "id": 2823, + "id": 3761, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 2821, + "id": 3759, "name": "ORACLE_QUERY", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2773, - "src": "3329:12:13", + "referencedDeclaration": 3718, + "src": "3149:12:17", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string storage ref" @@ -3653,26 +3268,26 @@ "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 2822, + "id": 3760, "name": "oracleQuery", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2800, - "src": "3344:11:13", + "referencedDeclaration": 3741, + "src": "3164:11:17", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } }, - "src": "3329:26:13", + "src": "3149:26:17", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string storage ref" } }, - "id": 2824, + "id": 3762, "nodeType": "ExpressionStatement", - "src": "3329:26:13" + "src": "3149:26:17" }, { "expression": { @@ -3684,7 +3299,7 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 2830, + "id": 3768, "isConstant": false, "isLValue": false, "isPure": false, @@ -3695,19 +3310,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 2828, + "id": 3766, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 2826, + "id": 3764, "name": "EXPIRATION", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 809, - "src": "3524:10:13", + "referencedDeclaration": 860, + "src": "3344:10:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3717,18 +3332,18 @@ "operator": "-", "rightExpression": { "argumentTypes": null, - "id": 2827, + "id": 3765, "name": "now", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 5195, - "src": "3537:3:13", + "referencedDeclaration": 8185, + "src": "3357:3:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "3524:16:13", + "src": "3344:16:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3739,14 +3354,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "3630", - "id": 2829, + "id": 3767, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "3544:7:13", + "src": "3364:7:17", "subdenomination": "days", "typeDescriptions": { "typeIdentifier": "t_rational_5184000_by_1", @@ -3754,7 +3369,7 @@ }, "value": "60" }, - "src": "3524:27:13", + "src": "3344:27:17", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -3768,21 +3383,21 @@ "typeString": "bool" } ], - "id": 2825, + "id": 3763, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 5196, - 5197 + 8186, + 8187 ], - "referencedDeclaration": 5196, - "src": "3516:7:13", + "referencedDeclaration": 8186, + "src": "3336:7:17", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, - "id": 2831, + "id": 3769, "isConstant": false, "isLValue": false, "isPure": false, @@ -3790,15 +3405,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3516:36:13", + "src": "3336:36:17", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 2832, + "id": 3770, "nodeType": "ExpressionStatement", - "src": "3516:36:13" + "src": "3336:36:17" }, { "expression": { @@ -3806,18 +3421,18 @@ "arguments": [], "expression": { "argumentTypes": [], - "id": 2833, + "id": 3771, "name": "queryOracle", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2949, - "src": "3562:11:13", + "referencedDeclaration": 3887, + "src": "3382:11:17", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", "typeString": "function ()" } }, - "id": 2834, + "id": 3772, "isConstant": false, "isLValue": false, "isPure": false, @@ -3825,20 +3440,20 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3562:13:13", + "src": "3382:13:17", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 2835, + "id": 3773, "nodeType": "ExpressionStatement", - "src": "3562:13:13" + "src": "3382:13:17" } ] }, - "documentation": "@param contractName viewable name of this contract (BTC/ETH, LTC/ETH, etc)\n @param creatorAddress address of the person creating the contract\n @param marketTokenAddress address of our member token\n @param collateralTokenAddress address of the ERC20 token that will be used for collateral and pricing\n @param collateralPoolFactoryAddress address of the factory creating the collateral pools\n @param contractSpecs array of unsigned integers including:\n floorPrice minimum tradeable price of this contract, contract enters settlement if breached\n capPrice maximum tradeable price of this contract, contract enters settlement if breached\n priceDecimalPlaces number of decimal places to convert our queried price from a floating point to\n an integer\n qtyMultiplier multiply traded qty by this value from base units of collateral token.\n expirationTimeStamp - seconds from epoch that this contract expires and enters settlement\n @param oracleDataSource a data-source such as \"URL\", \"WolframAlpha\", \"IPFS\"\n see http://docs.oraclize.it/#ethereum-quick-start-simple-query\n @param oracleQuery see http://docs.oraclize.it/#ethereum-quick-start-simple-query for examples", - "id": 2837, + "documentation": "@param contractName viewable name of this contract (BTC/ETH, LTC/ETH, etc)\n @param baseAddresses array of 2 addresses needed for our contract including:\n creatorAddress address of the person creating the contract\n collateralTokenAddress address of the ERC20 token that will be used for collateral and pricing\n @param contractSpecs array of unsigned integers including:\n floorPrice minimum tradeable price of this contract, contract enters settlement if breached\n capPrice maximum tradeable price of this contract, contract enters settlement if breached\n priceDecimalPlaces number of decimal places to convert our queried price from a floating point to\n an integer\n qtyMultiplier multiply traded qty by this value from base units of collateral token.\n expirationTimeStamp seconds from epoch that this contract expires and enters settlement\n @param oracleDataSource a data-source such as \"URL\", \"WolframAlpha\", \"IPFS\"\n see http://docs.oraclize.it/#ethereum-quick-start-simple-query\n @param oracleQuery see http://docs.oraclize.it/#ethereum-quick-start-simple-query for examples", + "id": 3775, "implemented": true, "isConstructor": true, "isDeclaredConst": false, @@ -3847,12 +3462,12 @@ "arguments": [ { "argumentTypes": null, - "id": 2803, + "id": 3744, "name": "contractName", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2784, - "src": "2918:12:13", + "referencedDeclaration": 3729, + "src": "2837:12:17", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" @@ -3860,101 +3475,62 @@ }, { "argumentTypes": null, - "id": 2804, - "name": "creatorAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2786, - "src": "2940:14:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 2805, - "name": "marketTokenAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2788, - "src": "2964:18:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 2806, - "name": "collateralTokenAddress", + "id": 3745, + "name": "baseAddresses", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2790, - "src": "2992:22:13", + "referencedDeclaration": 3733, + "src": "2859:13:17", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_array$_t_address_$2_memory_ptr", + "typeString": "address[2] memory" } }, { "argumentTypes": null, - "id": 2807, - "name": "collateralPoolFactoryAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2792, - "src": "3024:28:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 2808, + "id": 3746, "name": "contractSpecs", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2796, - "src": "3062:13:13", + "referencedDeclaration": 3737, + "src": "2882:13:17", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$5_memory_ptr", "typeString": "uint256[5] memory" } } ], - "id": 2809, + "id": 3747, "modifierName": { "argumentTypes": null, - "id": 2802, + "id": 3743, "name": "MarketContract", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1518, - "src": "2894:14:13", + "referencedDeclaration": 1018, + "src": "2813:14:17", "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_MarketContract_$1518_$", + "typeIdentifier": "t_type$_t_contract$_MarketContract_$1018_$", "typeString": "type(contract MarketContract)" } }, "nodeType": "ModifierInvocation", - "src": "2894:187:13" + "src": "2813:88:17" } ], "name": "", "nodeType": "FunctionDefinition", "parameters": { - "id": 2801, + "id": 3742, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2784, + "id": 3729, "name": "contractName", "nodeType": "VariableDeclaration", - "scope": 2837, - "src": "2622:19:13", + "scope": 3775, + "src": "2661:19:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3962,10 +3538,10 @@ "typeString": "string" }, "typeName": { - "id": 2783, + "id": 3728, "name": "string", "nodeType": "ElementaryTypeName", - "src": "2622:6:13", + "src": "2661:6:17", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" @@ -3976,103 +3552,52 @@ }, { "constant": false, - "id": 2786, - "name": "creatorAddress", - "nodeType": "VariableDeclaration", - "scope": 2837, - "src": "2651:22:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2785, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2651:7:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2788, - "name": "marketTokenAddress", + "id": 3733, + "name": "baseAddresses", "nodeType": "VariableDeclaration", - "scope": 2837, - "src": "2683:26:13", + "scope": 3775, + "src": "2690:24:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_array$_t_address_$2_memory_ptr", + "typeString": "address[2]" }, "typeName": { - "id": 2787, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2683:7:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2790, - "name": "collateralTokenAddress", - "nodeType": "VariableDeclaration", - "scope": 2837, - "src": "2719:30:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2789, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2719:7:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2792, - "name": "collateralPoolFactoryAddress", - "nodeType": "VariableDeclaration", - "scope": 2837, - "src": "2759:36:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2791, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2759:7:13", + "baseType": { + "id": 3730, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2690:7:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 3732, + "length": { + "argumentTypes": null, + "hexValue": "32", + "id": 3731, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2698:1:17", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + }, + "value": "2" + }, + "nodeType": "ArrayTypeName", + "src": "2690:10:17", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_array$_t_address_$2_storage_ptr", + "typeString": "address[2]" } }, "value": null, @@ -4080,11 +3605,11 @@ }, { "constant": false, - "id": 2796, + "id": 3737, "name": "contractSpecs", "nodeType": "VariableDeclaration", - "scope": 2837, - "src": "2805:21:13", + "scope": 3775, + "src": "2724:21:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4093,27 +3618,27 @@ }, "typeName": { "baseType": { - "id": 2793, + "id": 3734, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "2805:4:13", + "src": "2724:4:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 2795, + "id": 3736, "length": { "argumentTypes": null, "hexValue": "35", - "id": 2794, + "id": 3735, "isConstant": false, "isLValue": false, "isPure": false, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "2810:1:13", + "src": "2729:1:17", "subdenomination": null, "typeDescriptions": { "typeIdentifier": null, @@ -4122,7 +3647,7 @@ "value": "5" }, "nodeType": "ArrayTypeName", - "src": "2805:7:13", + "src": "2724:7:17", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$5_storage_ptr", "typeString": "uint256[5]" @@ -4133,11 +3658,11 @@ }, { "constant": false, - "id": 2798, + "id": 3739, "name": "oracleDataSource", "nodeType": "VariableDeclaration", - "scope": 2837, - "src": "2836:23:13", + "scope": 3775, + "src": "2755:23:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4145,10 +3670,10 @@ "typeString": "string" }, "typeName": { - "id": 2797, + "id": 3738, "name": "string", "nodeType": "ElementaryTypeName", - "src": "2836:6:13", + "src": "2755:6:17", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" @@ -4159,11 +3684,11 @@ }, { "constant": false, - "id": 2800, + "id": 3741, "name": "oracleQuery", "nodeType": "VariableDeclaration", - "scope": 2837, - "src": "2869:18:13", + "scope": 3775, + "src": "2788:18:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4171,10 +3696,10 @@ "typeString": "string" }, "typeName": { - "id": 2799, + "id": 3740, "name": "string", "nodeType": "ElementaryTypeName", - "src": "2869:6:13", + "src": "2788:6:17", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" @@ -4184,39 +3709,39 @@ "visibility": "internal" } ], - "src": "2612:281:13" + "src": "2651:161:17" }, "payable": false, "returnParameters": { - "id": 2810, + "id": 3748, "nodeType": "ParameterList", "parameters": [], - "src": "3094:0:13" + "src": "2914:0:17" }, - "scope": 2950, - "src": "2601:1060:13", + "scope": 3888, + "src": "2640:841:17", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { - "id": 2874, + "id": 3812, "nodeType": "Block", - "src": "4102:548:13", + "src": "3922:548:17", "statements": [ { "assignments": [ - 2841 + 3779 ], "declarations": [ { "constant": false, - "id": 2841, + "id": 3779, "name": "cost", "nodeType": "VariableDeclaration", - "scope": 2875, - "src": "4112:9:13", + "scope": 3813, + "src": "3932:9:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4224,10 +3749,10 @@ "typeString": "uint256" }, "typeName": { - "id": 2840, + "id": 3778, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "4112:4:13", + "src": "3932:4:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4237,18 +3762,18 @@ "visibility": "internal" } ], - "id": 2846, + "id": 3784, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, - "id": 2843, + "id": 3781, "name": "ORACLE_DATA_SOURCE", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2771, - "src": "4142:18:13", + "referencedDeclaration": 3716, + "src": "3962:18:17", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string storage ref" @@ -4256,12 +3781,12 @@ }, { "argumentTypes": null, - "id": 2844, + "id": 3782, "name": "QUERY_CALLBACK_GAS", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2776, - "src": "4162:18:13", + "referencedDeclaration": 3721, + "src": "3982:18:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4279,21 +3804,21 @@ "typeString": "uint256" } ], - "id": 2842, + "id": 3780, "name": "oraclize_getPrice", "nodeType": "Identifier", "overloadedDeclarations": [ - 3597, - 3615 + 4536, + 4554 ], - "referencedDeclaration": 3615, - "src": "4124:17:13", + "referencedDeclaration": 4554, + "src": "3944:17:17", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_string_memory_ptr_$_t_uint256_$returns$_t_uint256_$", "typeString": "function (string memory,uint256) returns (uint256)" } }, - "id": 2845, + "id": 3783, "isConstant": false, "isLValue": false, "isPure": false, @@ -4301,14 +3826,14 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "4124:57:13", + "src": "3944:57:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", - "src": "4112:69:13" + "src": "3932:69:17" }, { "expression": { @@ -4320,7 +3845,7 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 2851, + "id": 3789, "isConstant": false, "isLValue": false, "isPure": false, @@ -4329,18 +3854,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 2848, + "id": 3786, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 5193, - "src": "4199:3:13", + "referencedDeclaration": 8183, + "src": "4019:3:17", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 2849, + "id": 3787, "isConstant": false, "isLValue": false, "isPure": false, @@ -4348,7 +3873,7 @@ "memberName": "value", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "4199:9:13", + "src": "4019:9:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4358,18 +3883,18 @@ "operator": ">=", "rightExpression": { "argumentTypes": null, - "id": 2850, + "id": 3788, "name": "cost", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2841, - "src": "4212:4:13", + "referencedDeclaration": 3779, + "src": "4032:4:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "4199:17:13", + "src": "4019:17:17", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -4383,21 +3908,21 @@ "typeString": "bool" } ], - "id": 2847, + "id": 3785, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 5196, - 5197 + 8186, + 8187 ], - "referencedDeclaration": 5196, - "src": "4191:7:13", + "referencedDeclaration": 8186, + "src": "4011:7:17", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, - "id": 2852, + "id": 3790, "isConstant": false, "isLValue": false, "isPure": false, @@ -4405,28 +3930,28 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "4191:26:13", + "src": "4011:26:17", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 2853, + "id": 3791, "nodeType": "ExpressionStatement", - "src": "4191:26:13" + "src": "4011:26:17" }, { "assignments": [ - 2855 + 3793 ], "declarations": [ { "constant": false, - "id": 2855, + "id": 3793, "name": "queryId", "nodeType": "VariableDeclaration", - "scope": 2875, - "src": "4441:15:13", + "scope": 3813, + "src": "4261:15:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4434,10 +3959,10 @@ "typeString": "bytes32" }, "typeName": { - "id": 2854, + "id": 3792, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "4441:7:13", + "src": "4261:7:17", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -4447,18 +3972,18 @@ "visibility": "internal" } ], - "id": 2861, + "id": 3799, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, - "id": 2857, + "id": 3795, "name": "ORACLE_DATA_SOURCE", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2771, - "src": "4487:18:13", + "referencedDeclaration": 3716, + "src": "4307:18:17", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string storage ref" @@ -4466,12 +3991,12 @@ }, { "argumentTypes": null, - "id": 2858, + "id": 3796, "name": "ORACLE_QUERY", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2773, - "src": "4519:12:13", + "referencedDeclaration": 3718, + "src": "4339:12:17", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string storage ref" @@ -4479,12 +4004,12 @@ }, { "argumentTypes": null, - "id": 2859, + "id": 3797, "name": "QUERY_CALLBACK_GAS", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2776, - "src": "4545:18:13", + "referencedDeclaration": 3721, + "src": "4365:18:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4506,23 +4031,23 @@ "typeString": "uint256" } ], - "id": 2856, + "id": 3794, "name": "oraclize_query", "nodeType": "Identifier", "overloadedDeclarations": [ - 3644, - 3675, - 3710, - 3743 + 4583, + 4614, + 4649, + 4682 ], - "referencedDeclaration": 3743, - "src": "4459:14:13", + "referencedDeclaration": 4682, + "src": "4279:14:17", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$_t_uint256_$returns$_t_bytes32_$", "typeString": "function (string memory,string memory,uint256) returns (bytes32)" } }, - "id": 2860, + "id": 3798, "isConstant": false, "isLValue": false, "isPure": false, @@ -4530,14 +4055,14 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "4459:114:13", + "src": "4279:114:17", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "nodeType": "VariableDeclarationStatement", - "src": "4441:132:13" + "src": "4261:132:17" }, { "expression": { @@ -4549,19 +4074,19 @@ "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, - "id": 2865, + "id": 3803, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 2863, + "id": 3801, "name": "queryId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2855, - "src": "4591:7:13", + "referencedDeclaration": 3793, + "src": "4411:7:17", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -4572,14 +4097,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "30", - "id": 2864, + "id": 3802, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "4602:1:13", + "src": "4422:1:17", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -4587,7 +4112,7 @@ }, "value": "0" }, - "src": "4591:12:13", + "src": "4411:12:17", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -4601,21 +4126,21 @@ "typeString": "bool" } ], - "id": 2862, + "id": 3800, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 5196, - 5197 + 8186, + 8187 ], - "referencedDeclaration": 5196, - "src": "4583:7:13", + "referencedDeclaration": 8186, + "src": "4403:7:17", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, - "id": 2866, + "id": 3804, "isConstant": false, "isLValue": false, "isPure": false, @@ -4623,20 +4148,20 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "4583:21:13", + "src": "4403:21:17", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 2867, + "id": 3805, "nodeType": "ExpressionStatement", - "src": "4583:21:13" + "src": "4403:21:17" }, { "expression": { "argumentTypes": null, - "id": 2872, + "id": 3810, "isConstant": false, "isLValue": false, "isPure": false, @@ -4645,26 +4170,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 2868, + "id": 3806, "name": "validQueryIDs", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2782, - "src": "4614:13:13", + "referencedDeclaration": 3727, + "src": "4434:13:17", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", "typeString": "mapping(bytes32 => bool)" } }, - "id": 2870, + "id": 3808, "indexExpression": { "argumentTypes": null, - "id": 2869, + "id": 3807, "name": "queryId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2855, - "src": "4628:7:13", + "referencedDeclaration": 3793, + "src": "4448:7:17", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -4675,7 +4200,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "4614:22:13", + "src": "4434:22:17", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -4686,14 +4211,14 @@ "rightHandSide": { "argumentTypes": null, "hexValue": "74727565", - "id": 2871, + "id": 3809, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", - "src": "4639:4:13", + "src": "4459:4:17", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", @@ -4701,20 +4226,20 @@ }, "value": "true" }, - "src": "4614:29:13", + "src": "4434:29:17", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 2873, + "id": 3811, "nodeType": "ExpressionStatement", - "src": "4614:29:13" + "src": "4434:29:17" } ] }, "documentation": "@notice allows a user to request an extra query to oracle in order to push the contract into\n settlement. A user may call this as many times as they like, since they are the ones paying for\n the call to our oracle and post processing. This is useful for both a failsafe and as a way to\n settle a contract early if a price cap or floor has been breached.", - "id": 2875, + "id": 3813, "implemented": true, "isConstructor": false, "isDeclaredConst": false, @@ -4722,29 +4247,29 @@ "name": "requestEarlySettlement", "nodeType": "FunctionDefinition", "parameters": { - "id": 2838, + "id": 3776, "nodeType": "ParameterList", "parameters": [], - "src": "4082:2:13" + "src": "3902:2:17" }, "payable": true, "returnParameters": { - "id": 2839, + "id": 3777, "nodeType": "ParameterList", "parameters": [], - "src": "4102:0:13" + "src": "3922:0:17" }, - "scope": 2950, - "src": "4051:599:13", + "scope": 3888, + "src": "3871:599:17", "stateMutability": "payable", - "superFunction": 1423, + "superFunction": null, "visibility": "external" }, { "body": { - "id": 2923, + "id": 3861, "nodeType": "Block", - "src": "5002:456:13", + "src": "4822:459:17", "statements": [ { "expression": { @@ -4756,7 +4281,7 @@ "typeIdentifier": "t_address", "typeString": "address" }, - "id": 2889, + "id": 3827, "isConstant": false, "isLValue": false, "isPure": false, @@ -4765,18 +4290,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 2885, + "id": 3823, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 5193, - "src": "5020:3:13", + "referencedDeclaration": 8183, + "src": "4840:3:17", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 2886, + "id": 3824, "isConstant": false, "isLValue": false, "isPure": false, @@ -4784,7 +4309,7 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "5020:10:13", + "src": "4840:10:17", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -4797,18 +4322,18 @@ "arguments": [], "expression": { "argumentTypes": [], - "id": 2887, + "id": 3825, "name": "oraclize_cbAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3755, - "src": "5034:18:13", + "referencedDeclaration": 4694, + "src": "4854:18:17", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$__$returns$_t_address_$", "typeString": "function () returns (address)" } }, - "id": 2888, + "id": 3826, "isConstant": false, "isLValue": false, "isPure": false, @@ -4816,13 +4341,13 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "5034:20:13", + "src": "4854:20:17", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "src": "5020:34:13", + "src": "4840:34:17", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -4836,21 +4361,21 @@ "typeString": "bool" } ], - "id": 2884, + "id": 3822, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 5196, - 5197 + 8186, + 8187 ], - "referencedDeclaration": 5196, - "src": "5012:7:13", + "referencedDeclaration": 8186, + "src": "4832:7:17", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, - "id": 2890, + "id": 3828, "isConstant": false, "isLValue": false, "isPure": false, @@ -4858,15 +4383,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "5012:43:13", + "src": "4832:43:17", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 2891, + "id": 3829, "nodeType": "ExpressionStatement", - "src": "5012:43:13" + "src": "4832:43:17" }, { "expression": { @@ -4876,26 +4401,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 2893, + "id": 3831, "name": "validQueryIDs", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2782, - "src": "5073:13:13", + "referencedDeclaration": 3727, + "src": "4893:13:17", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", "typeString": "mapping(bytes32 => bool)" } }, - "id": 2895, + "id": 3833, "indexExpression": { "argumentTypes": null, - "id": 2894, + "id": 3832, "name": "queryID", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2877, - "src": "5087:7:13", + "referencedDeclaration": 3815, + "src": "4907:7:17", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -4906,7 +4431,7 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "5073:22:13", + "src": "4893:22:17", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -4920,21 +4445,21 @@ "typeString": "bool" } ], - "id": 2892, + "id": 3830, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 5196, - 5197 + 8186, + 8187 ], - "referencedDeclaration": 5196, - "src": "5065:7:13", + "referencedDeclaration": 8186, + "src": "4885:7:17", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, - "id": 2896, + "id": 3834, "isConstant": false, "isLValue": false, "isPure": false, @@ -4942,32 +4467,32 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "5065:31:13", + "src": "4885:31:17", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 2897, + "id": 3835, "nodeType": "ExpressionStatement", - "src": "5065:31:13" + "src": "4885:31:17" }, { "expression": { "argumentTypes": null, - "id": 2900, + "id": 3838, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 2898, + "id": 3836, "name": "lastPriceQueryResult", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2778, - "src": "5145:20:13", + "referencedDeclaration": 3723, + "src": "4965:20:17", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string storage ref" @@ -4977,43 +4502,43 @@ "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 2899, + "id": 3837, "name": "result", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2879, - "src": "5168:6:13", + "referencedDeclaration": 3817, + "src": "4988:6:17", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } }, - "src": "5145:29:13", + "src": "4965:29:17", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string storage ref" } }, - "id": 2901, + "id": 3839, "nodeType": "ExpressionStatement", - "src": "5145:29:13" + "src": "4965:29:17" }, { "expression": { "argumentTypes": null, - "id": 2907, + "id": 3845, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 2902, + "id": 3840, "name": "lastPrice", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 811, - "src": "5184:9:13", + "referencedDeclaration": 862, + "src": "5004:9:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5026,12 +4551,12 @@ "arguments": [ { "argumentTypes": null, - "id": 2904, + "id": 3842, "name": "result", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2879, - "src": "5205:6:13", + "referencedDeclaration": 3817, + "src": "5025:6:17", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" @@ -5039,12 +4564,12 @@ }, { "argumentTypes": null, - "id": 2905, + "id": 3843, "name": "PRICE_DECIMAL_PLACES", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 805, - "src": "5213:20:13", + "referencedDeclaration": 856, + "src": "5033:20:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5062,18 +4587,18 @@ "typeString": "uint256" } ], - "id": 2903, + "id": 3841, "name": "parseInt", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3889, - "src": "5196:8:13", + "referencedDeclaration": 4828, + "src": "5016:8:17", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$_t_uint256_$returns$_t_uint256_$", "typeString": "function (string memory,uint256) pure returns (uint256)" } }, - "id": 2906, + "id": 3844, "isConstant": false, "isLValue": false, "isPure": false, @@ -5081,21 +4606,21 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "5196:38:13", + "src": "5016:38:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "5184:50:13", + "src": "5004:50:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 2908, + "id": 3846, "nodeType": "ExpressionStatement", - "src": "5184:50:13" + "src": "5004:50:17" }, { "eventCall": { @@ -5103,37 +4628,37 @@ "arguments": [ { "argumentTypes": null, - "id": 2910, - "name": "result", + "id": 3848, + "name": "lastPrice", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2879, - "src": "5266:6:13", + "referencedDeclaration": 862, + "src": "5086:9:17", "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } ], - "id": 2909, + "id": 3847, "name": "UpdatedLastPrice", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 829, - "src": "5249:16:13", + "referencedDeclaration": 871, + "src": "5069:16:17", "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$returns$__$", - "typeString": "function (string memory)" + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" } }, - "id": 2911, + "id": 3849, "isConstant": false, "isLValue": false, "isPure": false, @@ -5141,15 +4666,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "5249:24:13", + "src": "5069:27:17", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 2912, + "id": 3850, "nodeType": "EmitStatement", - "src": "5244:29:13" + "src": "5064:32:17" }, { "expression": { @@ -5157,18 +4682,18 @@ "arguments": [], "expression": { "argumentTypes": [], - "id": 2913, + "id": 3851, "name": "checkSettlement", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1492, - "src": "5283:15:13", + "referencedDeclaration": 1003, + "src": "5106:15:17", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", "typeString": "function ()" } }, - "id": 2914, + "id": 3852, "isConstant": false, "isLValue": false, "isPure": false, @@ -5176,20 +4701,20 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "5283:17:13", + "src": "5106:17:17", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 2915, + "id": 3853, "nodeType": "ExpressionStatement", - "src": "5283:17:13" + "src": "5106:17:17" }, { "expression": { "argumentTypes": null, - "id": 2919, + "id": 3857, "isConstant": false, "isLValue": false, "isPure": false, @@ -5197,31 +4722,31 @@ "nodeType": "UnaryOperation", "operator": "delete", "prefix": true, - "src": "5377:29:13", + "src": "5200:29:17", "subExpression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 2916, + "id": 3854, "name": "validQueryIDs", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2782, - "src": "5384:13:13", + "referencedDeclaration": 3727, + "src": "5207:13:17", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", "typeString": "mapping(bytes32 => bool)" } }, - "id": 2918, + "id": 3856, "indexExpression": { "argumentTypes": null, - "id": 2917, + "id": 3855, "name": "queryID", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2877, - "src": "5398:7:13", + "referencedDeclaration": 3815, + "src": "5221:7:17", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -5232,7 +4757,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "5384:22:13", + "src": "5207:22:17", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -5243,32 +4768,32 @@ "typeString": "tuple()" } }, - "id": 2920, + "id": 3858, "nodeType": "ExpressionStatement", - "src": "5377:29:13" + "src": "5200:29:17" }, { "expression": { "argumentTypes": null, - "id": 2921, + "id": 3859, "name": "proof", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2881, - "src": "5416:5:13", + "referencedDeclaration": 3819, + "src": "5239:5:17", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } }, - "id": 2922, + "id": 3860, "nodeType": "ExpressionStatement", - "src": "5416:5:13" + "src": "5239:5:17" } ] }, "documentation": "@notice only public for callbacks from oraclize, do not call\n @param queryID of the returning query, this should match our own internal mapping\n @param result query to be processed\n @param proof result proof", - "id": 2924, + "id": 3862, "implemented": true, "isConstructor": false, "isDeclaredConst": false, @@ -5276,16 +4801,16 @@ "name": "__callback", "nodeType": "FunctionDefinition", "parameters": { - "id": 2882, + "id": 3820, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2877, + "id": 3815, "name": "queryID", "nodeType": "VariableDeclaration", - "scope": 2924, - "src": "4950:15:13", + "scope": 3862, + "src": "4770:15:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5293,10 +4818,10 @@ "typeString": "bytes32" }, "typeName": { - "id": 2876, + "id": 3814, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "4950:7:13", + "src": "4770:7:17", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -5307,11 +4832,11 @@ }, { "constant": false, - "id": 2879, + "id": 3817, "name": "result", "nodeType": "VariableDeclaration", - "scope": 2924, - "src": "4967:13:13", + "scope": 3862, + "src": "4787:13:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5319,10 +4844,10 @@ "typeString": "string" }, "typeName": { - "id": 2878, + "id": 3816, "name": "string", "nodeType": "ElementaryTypeName", - "src": "4967:6:13", + "src": "4787:6:17", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" @@ -5333,11 +4858,11 @@ }, { "constant": false, - "id": 2881, + "id": 3819, "name": "proof", "nodeType": "VariableDeclaration", - "scope": 2924, - "src": "4982:11:13", + "scope": 3862, + "src": "4802:11:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5345,10 +4870,10 @@ "typeString": "bytes" }, "typeName": { - "id": 2880, + "id": 3818, "name": "bytes", "nodeType": "ElementaryTypeName", - "src": "4982:5:13", + "src": "4802:5:17", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" @@ -5358,39 +4883,39 @@ "visibility": "internal" } ], - "src": "4949:45:13" + "src": "4769:45:17" }, "payable": false, "returnParameters": { - "id": 2883, + "id": 3821, "nodeType": "ParameterList", "parameters": [], - "src": "5002:0:13" + "src": "4822:0:17" }, - "scope": 2950, - "src": "4930:528:13", + "scope": 3888, + "src": "4750:531:17", "stateMutability": "nonpayable", - "superFunction": 3582, + "superFunction": 4521, "visibility": "public" }, { "body": { - "id": 2948, + "id": 3886, "nodeType": "Block", - "src": "5604:901:13", + "src": "5427:901:17", "statements": [ { "assignments": [ - 2928 + 3866 ], "declarations": [ { "constant": false, - "id": 2928, + "id": 3866, "name": "queryId", "nodeType": "VariableDeclaration", - "scope": 2949, - "src": "6272:15:13", + "scope": 3887, + "src": "6095:15:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5398,10 +4923,10 @@ "typeString": "bytes32" }, "typeName": { - "id": 2927, + "id": 3865, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "6272:7:13", + "src": "6095:7:17", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -5411,18 +4936,18 @@ "visibility": "internal" } ], - "id": 2935, + "id": 3873, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, - "id": 2930, + "id": 3868, "name": "EXPIRATION", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 809, - "src": "6318:10:13", + "referencedDeclaration": 860, + "src": "6141:10:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5430,12 +4955,12 @@ }, { "argumentTypes": null, - "id": 2931, + "id": 3869, "name": "ORACLE_DATA_SOURCE", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2771, - "src": "6342:18:13", + "referencedDeclaration": 3716, + "src": "6165:18:17", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string storage ref" @@ -5443,12 +4968,12 @@ }, { "argumentTypes": null, - "id": 2932, + "id": 3870, "name": "ORACLE_QUERY", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2773, - "src": "6374:12:13", + "referencedDeclaration": 3718, + "src": "6197:12:17", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string storage ref" @@ -5456,12 +4981,12 @@ }, { "argumentTypes": null, - "id": 2933, + "id": 3871, "name": "QUERY_CALLBACK_GAS", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2776, - "src": "6400:18:13", + "referencedDeclaration": 3721, + "src": "6223:18:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5487,23 +5012,23 @@ "typeString": "uint256" } ], - "id": 2929, + "id": 3867, "name": "oraclize_query", "nodeType": "Identifier", "overloadedDeclarations": [ - 3644, - 3675, - 3710, - 3743 + 4583, + 4614, + 4649, + 4682 ], - "referencedDeclaration": 3710, - "src": "6290:14:13", + "referencedDeclaration": 4649, + "src": "6113:14:17", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_string_memory_ptr_$_t_string_memory_ptr_$_t_uint256_$returns$_t_bytes32_$", "typeString": "function (uint256,string memory,string memory,uint256) returns (bytes32)" } }, - "id": 2934, + "id": 3872, "isConstant": false, "isLValue": false, "isPure": false, @@ -5511,14 +5036,14 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "6290:138:13", + "src": "6113:138:17", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "nodeType": "VariableDeclarationStatement", - "src": "6272:156:13" + "src": "6095:156:17" }, { "expression": { @@ -5530,19 +5055,19 @@ "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, - "id": 2939, + "id": 3877, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 2937, + "id": 3875, "name": "queryId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2928, - "src": "6446:7:13", + "referencedDeclaration": 3866, + "src": "6269:7:17", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -5553,14 +5078,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "30", - "id": 2938, + "id": 3876, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "6457:1:13", + "src": "6280:1:17", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -5568,7 +5093,7 @@ }, "value": "0" }, - "src": "6446:12:13", + "src": "6269:12:17", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -5582,21 +5107,21 @@ "typeString": "bool" } ], - "id": 2936, + "id": 3874, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 5196, - 5197 + 8186, + 8187 ], - "referencedDeclaration": 5196, - "src": "6438:7:13", + "referencedDeclaration": 8186, + "src": "6261:7:17", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, - "id": 2940, + "id": 3878, "isConstant": false, "isLValue": false, "isPure": false, @@ -5604,20 +5129,20 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "6438:21:13", + "src": "6261:21:17", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 2941, + "id": 3879, "nodeType": "ExpressionStatement", - "src": "6438:21:13" + "src": "6261:21:17" }, { "expression": { "argumentTypes": null, - "id": 2946, + "id": 3884, "isConstant": false, "isLValue": false, "isPure": false, @@ -5626,26 +5151,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 2942, + "id": 3880, "name": "validQueryIDs", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2782, - "src": "6469:13:13", + "referencedDeclaration": 3727, + "src": "6292:13:17", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", "typeString": "mapping(bytes32 => bool)" } }, - "id": 2944, + "id": 3882, "indexExpression": { "argumentTypes": null, - "id": 2943, + "id": 3881, "name": "queryId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2928, - "src": "6483:7:13", + "referencedDeclaration": 3866, + "src": "6306:7:17", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -5656,7 +5181,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "6469:22:13", + "src": "6292:22:17", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -5667,14 +5192,14 @@ "rightHandSide": { "argumentTypes": null, "hexValue": "74727565", - "id": 2945, + "id": 3883, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", - "src": "6494:4:13", + "src": "6317:4:17", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", @@ -5682,20 +5207,20 @@ }, "value": "true" }, - "src": "6469:29:13", + "src": "6292:29:17", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 2947, + "id": 3885, "nodeType": "ExpressionStatement", - "src": "6469:29:13" + "src": "6292:29:17" } ] }, "documentation": "@dev call to oraclize to set up our query and record its hash.", - "id": 2949, + "id": 3887, "implemented": true, "isConstructor": false, "isDeclaredConst": false, @@ -5703,30 +5228,30 @@ "name": "queryOracle", "nodeType": "FunctionDefinition", "parameters": { - "id": 2925, + "id": 3863, "nodeType": "ParameterList", "parameters": [], - "src": "5593:2:13" + "src": "5416:2:17" }, "payable": false, "returnParameters": { - "id": 2926, + "id": 3864, "nodeType": "ParameterList", "parameters": [], - "src": "5604:0:13" + "src": "5427:0:17" }, - "scope": 2950, - "src": "5573:932:13", + "scope": 3888, + "src": "5396:932:17", "stateMutability": "nonpayable", "superFunction": null, "visibility": "private" } ], - "scope": 2951, - "src": "875:5632:13" + "scope": 3889, + "src": "875:5455:17" } ], - "src": "608:5899:13" + "src": "608:5723:17" }, "compiler": { "name": "solc", @@ -5741,5 +5266,5 @@ } }, "schemaVersion": "2.0.1", - "updatedAt": "2018-10-05T14:03:26.628Z" + "updatedAt": "2018-10-16T03:15:00.588Z" } \ No newline at end of file diff --git a/build/contracts/MarketContractRegistry.json b/build/contracts/MarketContractRegistry.json index 1df334f..ea0c32e 100644 --- a/build/contracts/MarketContractRegistry.json +++ b/build/contracts/MarketContractRegistry.json @@ -1,6 +1,63 @@ { "contractName": "MarketContractRegistry", "abi": [ + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "uint256" + } + ], + "name": "addressWhiteList", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "address" + } + ], + "name": "factoryAddressWhiteList", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "address" + } + ], + "name": "isWhiteListed", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": true, "inputs": [], @@ -193,24 +250,24 @@ "type": "function" } ], - "bytecode": "0x6080604052336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610d26806100536000396000f30060806040526004361061008e576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806318c0c695146100935780638da5cb5b146100d65780639244f4961461012d578063a051d9c314610170578063ad23de63146101b3578063c6f5d91f1461020e578063d8fbbf311461027a578063f2fde38b146102df575b600080fd5b34801561009f57600080fd5b506100d4600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610322565b005b3480156100e257600080fd5b506100eb610474565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561013957600080fd5b5061016e600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610499565b005b34801561017c57600080fd5b506101b1600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506106a4565b005b3480156101bf57600080fd5b506101f4600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506107f5565b604051808215151515815260200191505060405180910390f35b34801561021a57600080fd5b5061022361084b565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b8381101561026657808201518184015260208101905061024b565b505050509050019250505060405180910390f35b34801561028657600080fd5b506102c5600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506108d9565b604051808215151515815260200191505060405180910390f35b3480156102eb57600080fd5b50610320600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b54565b005b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561037d57600080fd5b600360008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515156103d657600080fd5b6001600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508073ffffffffffffffffffffffffffffffffffffffff167f960c6a67a1f0f46ddffd138f2b7f44cbc573d0e0a073363b287a257b121dc48a60405160405180910390a250565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061053d5750600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b151561054857600080fd5b600160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515156105a157600080fd5b60018060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060028190806001815401808255809150509060018203906000526020600020016000909192909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550508073ffffffffffffffffffffffffffffffffffffffff167f534d18c8ff24ba5980906d732f3075704749427353734fbbf05d50485643b12460405160405180910390a250565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156106ff57600080fd5b600360008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151561075757600080fd5b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508073ffffffffffffffffffffffffffffffffffffffff167f5d6ac55db628f137c53a554c300a684dc6b3db9d8f24e9611ea5e84c282d177d60405160405180910390a250565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b606060028054806020026020016040519081016040528092919081815260200182805480156108cf57602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311610885575b5050505050905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561093657600080fd5b600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151561098e57600080fd5b8273ffffffffffffffffffffffffffffffffffffffff166002838154811015156109b457fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515610a0157600080fd5b6000600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506002600160028054905003815481101515610a7057fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600283815481101515610aaa57fe5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600281818054905003915081610b0a9190610ca9565b508273ffffffffffffffffffffffffffffffffffffffff167f535611fb62fa2a833988f283b779e417e996813e44046f521d76c17b5943b08c60405160405180910390a292915050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610baf57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515610beb57600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b815481835581811115610cd057818360005260206000209182019101610ccf9190610cd5565b5b505050565b610cf791905b80821115610cf3576000816000905550600101610cdb565b5090565b905600a165627a7a72305820b35027cbb3799cdb2671011612d1bc806ad0d774ddaaea7fb060182fb7903d7a0029", - "deployedBytecode": "0x60806040526004361061008e576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806318c0c695146100935780638da5cb5b146100d65780639244f4961461012d578063a051d9c314610170578063ad23de63146101b3578063c6f5d91f1461020e578063d8fbbf311461027a578063f2fde38b146102df575b600080fd5b34801561009f57600080fd5b506100d4600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610322565b005b3480156100e257600080fd5b506100eb610474565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561013957600080fd5b5061016e600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610499565b005b34801561017c57600080fd5b506101b1600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506106a4565b005b3480156101bf57600080fd5b506101f4600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506107f5565b604051808215151515815260200191505060405180910390f35b34801561021a57600080fd5b5061022361084b565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b8381101561026657808201518184015260208101905061024b565b505050509050019250505060405180910390f35b34801561028657600080fd5b506102c5600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506108d9565b604051808215151515815260200191505060405180910390f35b3480156102eb57600080fd5b50610320600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b54565b005b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561037d57600080fd5b600360008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515156103d657600080fd5b6001600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508073ffffffffffffffffffffffffffffffffffffffff167f960c6a67a1f0f46ddffd138f2b7f44cbc573d0e0a073363b287a257b121dc48a60405160405180910390a250565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061053d5750600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b151561054857600080fd5b600160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515156105a157600080fd5b60018060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060028190806001815401808255809150509060018203906000526020600020016000909192909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550508073ffffffffffffffffffffffffffffffffffffffff167f534d18c8ff24ba5980906d732f3075704749427353734fbbf05d50485643b12460405160405180910390a250565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156106ff57600080fd5b600360008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151561075757600080fd5b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508073ffffffffffffffffffffffffffffffffffffffff167f5d6ac55db628f137c53a554c300a684dc6b3db9d8f24e9611ea5e84c282d177d60405160405180910390a250565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b606060028054806020026020016040519081016040528092919081815260200182805480156108cf57602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311610885575b5050505050905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561093657600080fd5b600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151561098e57600080fd5b8273ffffffffffffffffffffffffffffffffffffffff166002838154811015156109b457fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515610a0157600080fd5b6000600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506002600160028054905003815481101515610a7057fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600283815481101515610aaa57fe5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600281818054905003915081610b0a9190610ca9565b508273ffffffffffffffffffffffffffffffffffffffff167f535611fb62fa2a833988f283b779e417e996813e44046f521d76c17b5943b08c60405160405180910390a292915050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610baf57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515610beb57600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b815481835581811115610cd057818360005260206000209182019101610ccf9190610cd5565b5b505050565b610cf791905b80821115610cf3576000816000905550600101610cdb565b5090565b905600a165627a7a72305820b35027cbb3799cdb2671011612d1bc806ad0d774ddaaea7fb060182fb7903d7a0029", - "sourceMap": "833:3508:4:-;;;509:10:25;501:5;;:18;;;;;;;;;;;;;;;;;;833:3508:4;;;;;;", - "deployedSourceMap": "833:3508:4:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3713:242;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3713:242:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;238:20:25;;8:9:-1;5:2;;;30:1;27;20:12;5:2;238:20:25;;;;;;;;;;;;;;;;;;;;;;;;;;;3151:349:4;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3151:349:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;4092:247;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4092:247:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;1605:138;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1605:138:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1836:105;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1836:105:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;1836:105:4;;;;;;;;;;;;;;;;;2284:608;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2284:608:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;832:174:25;;8:9:-1;5:2;;;30:1;27;20:12;5:2;832:174:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;3713:242:4;653:5:25;;;;;;;;;;;639:19;;:10;:19;;;631:28;;;;;;;;3802:23:4;:39;3826:14;3802:39;;;;;;;;;;;;;;;;;;;;;;;;;3801:40;3793:49;;;;;;;;3894:4;3852:23;:39;3876:14;3852:39;;;;;;;;;;;;;;;;:46;;;;;;;;;;;;;;;;;;3933:14;3913:35;;;;;;;;;;;;3713:242;:::o;238:20:25:-;;;;;;;;;;;;;:::o;3151:349:4:-;3248:5;;;;;;;;;;;3234:19;;:10;:19;;;:58;;;;3257:23;:35;3281:10;3257:35;;;;;;;;;;;;;;;;;;;;;;;;;3234:58;3226:67;;;;;;;;3312:13;:30;3326:15;3312:30;;;;;;;;;;;;;;;;;;;;;;;;;3311:31;3303:40;;;;;;;;3386:4;3353:13;:30;3367:15;3353:30;;;;;;;;;;;;;;;;:37;;;;;;;;;;;;;;;;;;3400:16;3422:15;3400:38;;39:1:-1;33:3;27:10;23:18;57:10;52:3;45:23;79:10;72:17;;0:93;3400:38:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3477:15;3453:40;;;;;;;;;;;;3151:349;:::o;4092:247::-;653:5:25;;;;;;;;;;;639:19;;:10;:19;;;631:28;;;;;;;;4183:23:4;:39;4207:14;4183:39;;;;;;;;;;;;;;;;;;;;;;;;;4175:48;;;;;;;;4275:5;4233:23;:39;4257:14;4233:39;;;;;;;;;;;;;;;;:47;;;;;;;;;;;;;;;;;;4317:14;4295:37;;;;;;;;;;;;4092:247;:::o;1605:138::-;1683:4;1706:13;:30;1720:15;1706:30;;;;;;;;;;;;;;;;;;;;;;;;;1699:37;;1605:138;;;:::o;1836:105::-;1890:9;1918:16;1911:23;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1836:105;:::o;2284:608::-;2417:4;653:5:25;;;;;;;;;;;639:19;;:10;:19;;;631:28;;;;;;;;2445:13:4;:30;2459:15;2445:30;;;;;;;;;;;;;;;;;;;;;;;;;2437:39;;;;;;;;2530:15;2494:51;;:16;2511:14;2494:32;;;;;;;;;;;;;;;;;;;;;;;;;;;:51;;;2486:60;;;;;;;;2589:5;2556:13;:30;2570:15;2556:30;;;;;;;;;;;;;;;;:38;;;;;;;;;;;;;;;;;;2743:16;2786:1;2760:16;:23;;;;:27;2743:45;;;;;;;;;;;;;;;;;;;;;;;;;;;2708:16;2725:14;2708:32;;;;;;;;;;;;;;;;;;:80;;;;;;;;;;;;;;;;;;2825:1;2798:16;:28;;;;;;;;;;;;;;:::i;:::-;;2869:15;2841:44;;;;;;;;;;;;2284:608;;;;:::o;832:174:25:-;653:5;;;;;;;;;;;639:19;;:10;:19;;;631:28;;;;;;;;928:1;908:22;;:8;:22;;;;900:31;;;;;;;;970:8;942:37;;963:5;;;;;;;;;;;942:37;;;;;;;;;;;;993:8;985:5;;:16;;;;;;;;;;;;;;;;;;832:174;:::o;833:3508:4:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o", - "source": "/*\n Copyright 2017-2018 Phillip A. Elsasser\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n*/\n\npragma solidity ^0.4.24;\n\nimport \"openzeppelin-solidity/contracts/ownership/Ownable.sol\";\nimport \"./MarketContractRegistryInterface.sol\";\n\n\n/// @title MarketContractRegistry\n/// @author Phil Elsasser \ncontract MarketContractRegistry is Ownable, MarketContractRegistryInterface {\n\n mapping(address => bool) isWhiteListed;\n address[] addressWhiteList; // record of currently deployed addresses;\n mapping(address => bool) factoryAddressWhiteList; // record of authorized factories\n\n // events\n event AddressAddedToWhitelist(address indexed contractAddress);\n event AddressRemovedFromWhitelist(address indexed contractAddress);\n event FactoryAddressAdded(address indexed factoryAddress);\n event FactoryAddressRemoved(address indexed factoryAddress);\n\n /*\n // External Methods\n */\n\n /// @notice determines if an address is a valid MarketContract\n /// @return false if the address is not white listed.\n function isAddressWhiteListed(address contractAddress) external view returns (bool) {\n return isWhiteListed[contractAddress];\n }\n\n /// @notice all currently whitelisted addresses\n /// returns array of addresses\n function getAddressWhiteList() external view returns (address[]) {\n return addressWhiteList;\n }\n\n /// @dev allows for the owner to remove a white listed contract, eventually ownership could transition to\n /// a decentralized smart contract of community members to vote\n /// @param contractAddress contract to removed from white list\n /// @param whiteListIndex of the contractAddress in the addressWhiteList to be removed.\n function removeContractFromWhiteList(\n address contractAddress,\n uint whiteListIndex\n ) external onlyOwner returns (bool)\n {\n require(isWhiteListed[contractAddress]);\n require(addressWhiteList[whiteListIndex] == contractAddress);\n isWhiteListed[contractAddress] = false;\n\n // push the last item in array to replace the address we are removing and then trim the array.\n addressWhiteList[whiteListIndex] = addressWhiteList[addressWhiteList.length - 1];\n addressWhiteList.length -= 1;\n emit AddressRemovedFromWhitelist(contractAddress);\n }\n\n /// @dev allows for the owner or factory to add a white listed contract, eventually ownership could transition to\n /// a decentralized smart contract of community members to vote\n /// @param contractAddress contract to removed from white list\n function addAddressToWhiteList(address contractAddress) external {\n require(msg.sender == owner || factoryAddressWhiteList[msg.sender]);\n require(!isWhiteListed[contractAddress]);\n isWhiteListed[contractAddress] = true;\n addressWhiteList.push(contractAddress);\n emit AddressAddedToWhitelist(contractAddress);\n }\n\n /// @dev allows for the owner to add a new address of a factory responsible for creating new market contracts\n /// @param factoryAddress address of factory to be allowed to add contracts to whitelist\n function addFactoryAddress(address factoryAddress) external onlyOwner {\n require(!factoryAddressWhiteList[factoryAddress]);\n factoryAddressWhiteList[factoryAddress] = true;\n emit FactoryAddressAdded(factoryAddress);\n }\n\n /// @dev allows for the owner to remove an address of a factory\n /// @param factoryAddress address of factory to be removed\n function removeFactoryAddress(address factoryAddress) external onlyOwner {\n require(factoryAddressWhiteList[factoryAddress]);\n factoryAddressWhiteList[factoryAddress] = false;\n emit FactoryAddressRemoved(factoryAddress);\n }\n}\n", - "sourcePath": "/home/pelsasser/MARKETProtocol/contracts/MarketContractRegistry.sol", + "bytecode": "0x6080604052336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610fe0806100536000396000f3006080604052600436106100af576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806318c0c695146100b45780631e7f9f36146100f7578063497acf08146101645780636f9170f6146101bf5780638da5cb5b1461021a5780639244f49614610271578063a051d9c3146102b4578063ad23de63146102f7578063c6f5d91f14610352578063d8fbbf31146103be578063f2fde38b14610423575b600080fd5b3480156100c057600080fd5b506100f5600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610466565b005b34801561010357600080fd5b5061012260048036038101908080359060200190929190505050610621565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561017057600080fd5b506101a5600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061065f565b604051808215151515815260200191505060405180910390f35b3480156101cb57600080fd5b50610200600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061067f565b604051808215151515815260200191505060405180910390f35b34801561022657600080fd5b5061022f61069f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561027d57600080fd5b506102b2600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506106c4565b005b3480156102c057600080fd5b506102f5600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061095e565b005b34801561030357600080fd5b50610338600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610aaf565b604051808215151515815260200191505060405180910390f35b34801561035e57600080fd5b50610367610b05565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b838110156103aa57808201518184015260208101905061038f565b505050509050019250505060405180910390f35b3480156103ca57600080fd5b50610409600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b93565b604051808215151515815260200191505060405180910390f35b34801561042f57600080fd5b50610464600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610e0e565b005b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156104c157600080fd5b600360008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151515610583576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f6164647265737320616c7265616479206164646564000000000000000000000081525060200191505060405180910390fd5b6001600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508073ffffffffffffffffffffffffffffffffffffffff167f960c6a67a1f0f46ddffd138f2b7f44cbc573d0e0a073363b287a257b121dc48a60405160405180910390a250565b60028181548110151561063057fe5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60036020528060005260406000206000915054906101000a900460ff1681565b60016020528060005260406000206000915054906101000a900460ff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806107685750600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b1515610802576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001807f43616e206f6e6c7920626520616464656420627920666163746f72206f72206f81526020017f776e65720000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b600160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615151561085b57600080fd5b60018060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060028190806001815401808255809150509060018203906000526020600020016000909192909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550508073ffffffffffffffffffffffffffffffffffffffff167f534d18c8ff24ba5980906d732f3075704749427353734fbbf05d50485643b12460405160405180910390a250565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156109b957600080fd5b600360008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515610a1157600080fd5b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508073ffffffffffffffffffffffffffffffffffffffff167f5d6ac55db628f137c53a554c300a684dc6b3db9d8f24e9611ea5e84c282d177d60405160405180910390a250565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b60606002805480602002602001604051908101604052809291908181526020018280548015610b8957602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311610b3f575b5050505050905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610bf057600080fd5b600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515610c4857600080fd5b8273ffffffffffffffffffffffffffffffffffffffff16600283815481101515610c6e57fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515610cbb57600080fd5b6000600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506002600160028054905003815481101515610d2a57fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600283815481101515610d6457fe5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600281818054905003915081610dc49190610f63565b508273ffffffffffffffffffffffffffffffffffffffff167f535611fb62fa2a833988f283b779e417e996813e44046f521d76c17b5943b08c60405160405180910390a292915050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610e6957600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515610ea557600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b815481835581811115610f8a57818360005260206000209182019101610f899190610f8f565b5b505050565b610fb191905b80821115610fad576000816000905550600101610f95565b5090565b905600a165627a7a723058204daa6905d2c7904be7a6fd44f81d72326b46f0ccaaa9a8085e775d792f9624570029", + "deployedBytecode": "0x6080604052600436106100af576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806318c0c695146100b45780631e7f9f36146100f7578063497acf08146101645780636f9170f6146101bf5780638da5cb5b1461021a5780639244f49614610271578063a051d9c3146102b4578063ad23de63146102f7578063c6f5d91f14610352578063d8fbbf31146103be578063f2fde38b14610423575b600080fd5b3480156100c057600080fd5b506100f5600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610466565b005b34801561010357600080fd5b5061012260048036038101908080359060200190929190505050610621565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561017057600080fd5b506101a5600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061065f565b604051808215151515815260200191505060405180910390f35b3480156101cb57600080fd5b50610200600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061067f565b604051808215151515815260200191505060405180910390f35b34801561022657600080fd5b5061022f61069f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561027d57600080fd5b506102b2600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506106c4565b005b3480156102c057600080fd5b506102f5600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061095e565b005b34801561030357600080fd5b50610338600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610aaf565b604051808215151515815260200191505060405180910390f35b34801561035e57600080fd5b50610367610b05565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b838110156103aa57808201518184015260208101905061038f565b505050509050019250505060405180910390f35b3480156103ca57600080fd5b50610409600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b93565b604051808215151515815260200191505060405180910390f35b34801561042f57600080fd5b50610464600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610e0e565b005b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156104c157600080fd5b600360008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151515610583576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f6164647265737320616c7265616479206164646564000000000000000000000081525060200191505060405180910390fd5b6001600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508073ffffffffffffffffffffffffffffffffffffffff167f960c6a67a1f0f46ddffd138f2b7f44cbc573d0e0a073363b287a257b121dc48a60405160405180910390a250565b60028181548110151561063057fe5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60036020528060005260406000206000915054906101000a900460ff1681565b60016020528060005260406000206000915054906101000a900460ff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806107685750600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b1515610802576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001807f43616e206f6e6c7920626520616464656420627920666163746f72206f72206f81526020017f776e65720000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b600160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615151561085b57600080fd5b60018060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060028190806001815401808255809150509060018203906000526020600020016000909192909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550508073ffffffffffffffffffffffffffffffffffffffff167f534d18c8ff24ba5980906d732f3075704749427353734fbbf05d50485643b12460405160405180910390a250565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156109b957600080fd5b600360008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515610a1157600080fd5b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508073ffffffffffffffffffffffffffffffffffffffff167f5d6ac55db628f137c53a554c300a684dc6b3db9d8f24e9611ea5e84c282d177d60405160405180910390a250565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b60606002805480602002602001604051908101604052809291908181526020018280548015610b8957602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311610b3f575b5050505050905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610bf057600080fd5b600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515610c4857600080fd5b8273ffffffffffffffffffffffffffffffffffffffff16600283815481101515610c6e57fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515610cbb57600080fd5b6000600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506002600160028054905003815481101515610d2a57fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600283815481101515610d6457fe5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600281818054905003915081610dc49190610f63565b508273ffffffffffffffffffffffffffffffffffffffff167f535611fb62fa2a833988f283b779e417e996813e44046f521d76c17b5943b08c60405160405180910390a292915050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610e6957600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515610ea557600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b815481835581811115610f8a57818360005260206000209182019101610f899190610f8f565b5b505050565b610fb191905b80821115610fad576000816000905550600101610f95565b5090565b905600a165627a7a723058204daa6905d2c7904be7a6fd44f81d72326b46f0ccaaa9a8085e775d792f9624570029", + "sourceMap": "833:3594:4:-;;;509:10:41;501:5;;:18;;;;;;;;;;;;;;;;;;833:3594:4;;;;;;", + "deployedSourceMap": "833:3594:4:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3774:267;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3774:267:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;967:33;;8:9:-1;5:2;;;30:1;27;20:12;5:2;967:33:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1077:55;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1077:55:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;916:45;;8:9:-1;5:2;;;30:1;27;20:12;5:2;916:45:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;238:20:41;;8:9:-1;5:2;;;30:1;27;20:12;5:2;238:20:41;;;;;;;;;;;;;;;;;;;;;;;;;;;3172:389:4;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3172:389:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;4178:247;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4178:247:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;1626:138;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1626:138:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1857:105;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1857:105:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;1857:105:4;;;;;;;;;;;;;;;;;2305:608;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2305:608:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;832:174:41;;8:9:-1;5:2;;;30:1;27;20:12;5:2;832:174:41;;;;;;;;;;;;;;;;;;;;;;;;;;;;3774:267:4;653:5:41;;;;;;;;;;;639:19;;:10;:19;;;631:28;;;;;;;;3863:23:4;:39;3887:14;3863:39;;;;;;;;;;;;;;;;;;;;;;;;;3862:40;3854:74;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3980:4;3938:23;:39;3962:14;3938:39;;;;;;;;;;;;;;;;:46;;;;;;;;;;;;;;;;;;4019:14;3999:35;;;;;;;;;;;;3774:267;:::o;967:33::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;1077:55::-;;;;;;;;;;;;;;;;;;;;;;:::o;916:45::-;;;;;;;;;;;;;;;;;;;;;;:::o;238:20:41:-;;;;;;;;;;;;;:::o;3172:389:4:-;3269:5;;;;;;;;;;;3255:19;;:10;:19;;;:58;;;;3278:23;:35;3302:10;3278:35;;;;;;;;;;;;;;;;;;;;;;;;;3255:58;3247:107;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3373:13;:30;3387:15;3373:30;;;;;;;;;;;;;;;;;;;;;;;;;3372:31;3364:40;;;;;;;;3447:4;3414:13;:30;3428:15;3414:30;;;;;;;;;;;;;;;;:37;;;;;;;;;;;;;;;;;;3461:16;3483:15;3461:38;;39:1:-1;33:3;27:10;23:18;57:10;52:3;45:23;79:10;72:17;;0:93;3461:38:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3538:15;3514:40;;;;;;;;;;;;3172:389;:::o;4178:247::-;653:5:41;;;;;;;;;;;639:19;;:10;:19;;;631:28;;;;;;;;4269:23:4;:39;4293:14;4269:39;;;;;;;;;;;;;;;;;;;;;;;;;4261:48;;;;;;;;4361:5;4319:23;:39;4343:14;4319:39;;;;;;;;;;;;;;;;:47;;;;;;;;;;;;;;;;;;4403:14;4381:37;;;;;;;;;;;;4178:247;:::o;1626:138::-;1704:4;1727:13;:30;1741:15;1727:30;;;;;;;;;;;;;;;;;;;;;;;;;1720:37;;1626:138;;;:::o;1857:105::-;1911:9;1939:16;1932:23;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1857:105;:::o;2305:608::-;2438:4;653:5:41;;;;;;;;;;;639:19;;:10;:19;;;631:28;;;;;;;;2466:13:4;:30;2480:15;2466:30;;;;;;;;;;;;;;;;;;;;;;;;;2458:39;;;;;;;;2551:15;2515:51;;:16;2532:14;2515:32;;;;;;;;;;;;;;;;;;;;;;;;;;;:51;;;2507:60;;;;;;;;2610:5;2577:13;:30;2591:15;2577:30;;;;;;;;;;;;;;;;:38;;;;;;;;;;;;;;;;;;2764:16;2807:1;2781:16;:23;;;;:27;2764:45;;;;;;;;;;;;;;;;;;;;;;;;;;;2729:16;2746:14;2729:32;;;;;;;;;;;;;;;;;;:80;;;;;;;;;;;;;;;;;;2846:1;2819:16;:28;;;;;;;;;;;;;;:::i;:::-;;2890:15;2862:44;;;;;;;;;;;;2305:608;;;;:::o;832:174:41:-;653:5;;;;;;;;;;;639:19;;:10;:19;;;631:28;;;;;;;;928:1;908:22;;:8;:22;;;;900:31;;;;;;;;970:8;942:37;;963:5;;;;;;;;;;;942:37;;;;;;;;;;;;993:8;985:5;;:16;;;;;;;;;;;;;;;;;;832:174;:::o;833:3594:4:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o", + "source": "/*\n Copyright 2017-2018 Phillip A. Elsasser\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n*/\n\npragma solidity ^0.4.24;\n\nimport \"openzeppelin-solidity/contracts/ownership/Ownable.sol\";\nimport \"./MarketContractRegistryInterface.sol\";\n\n\n/// @title MarketContractRegistry\n/// @author Phil Elsasser \ncontract MarketContractRegistry is Ownable, MarketContractRegistryInterface {\n\n mapping(address => bool) public isWhiteListed;\n address[] public addressWhiteList; // record of currently deployed addresses;\n mapping(address => bool) public factoryAddressWhiteList; // record of authorized factories\n\n // events\n event AddressAddedToWhitelist(address indexed contractAddress);\n event AddressRemovedFromWhitelist(address indexed contractAddress);\n event FactoryAddressAdded(address indexed factoryAddress);\n event FactoryAddressRemoved(address indexed factoryAddress);\n\n /*\n // External Methods\n */\n\n /// @notice determines if an address is a valid MarketContract\n /// @return false if the address is not white listed.\n function isAddressWhiteListed(address contractAddress) external view returns (bool) {\n return isWhiteListed[contractAddress];\n }\n\n /// @notice all currently whitelisted addresses\n /// returns array of addresses\n function getAddressWhiteList() external view returns (address[]) {\n return addressWhiteList;\n }\n\n /// @dev allows for the owner to remove a white listed contract, eventually ownership could transition to\n /// a decentralized smart contract of community members to vote\n /// @param contractAddress contract to removed from white list\n /// @param whiteListIndex of the contractAddress in the addressWhiteList to be removed.\n function removeContractFromWhiteList(\n address contractAddress,\n uint whiteListIndex\n ) external onlyOwner returns (bool)\n {\n require(isWhiteListed[contractAddress]);\n require(addressWhiteList[whiteListIndex] == contractAddress);\n isWhiteListed[contractAddress] = false;\n\n // push the last item in array to replace the address we are removing and then trim the array.\n addressWhiteList[whiteListIndex] = addressWhiteList[addressWhiteList.length - 1];\n addressWhiteList.length -= 1;\n emit AddressRemovedFromWhitelist(contractAddress);\n }\n\n /// @dev allows for the owner or factory to add a white listed contract, eventually ownership could transition to\n /// a decentralized smart contract of community members to vote\n /// @param contractAddress contract to removed from white list\n function addAddressToWhiteList(address contractAddress) external {\n require(msg.sender == owner || factoryAddressWhiteList[msg.sender], \"Can only be added by factor or owner\");\n require(!isWhiteListed[contractAddress]);\n isWhiteListed[contractAddress] = true;\n addressWhiteList.push(contractAddress);\n emit AddressAddedToWhitelist(contractAddress);\n }\n\n /// @dev allows for the owner to add a new address of a factory responsible for creating new market contracts\n /// @param factoryAddress address of factory to be allowed to add contracts to whitelist\n function addFactoryAddress(address factoryAddress) external onlyOwner {\n require(!factoryAddressWhiteList[factoryAddress], \"address already added\");\n factoryAddressWhiteList[factoryAddress] = true;\n emit FactoryAddressAdded(factoryAddress);\n }\n\n /// @dev allows for the owner to remove an address of a factory\n /// @param factoryAddress address of factory to be removed\n function removeFactoryAddress(address factoryAddress) external onlyOwner {\n require(factoryAddressWhiteList[factoryAddress]);\n factoryAddressWhiteList[factoryAddress] = false;\n emit FactoryAddressRemoved(factoryAddress);\n }\n}\n", + "sourcePath": "/home/travis/build/MARKETProtocol/MARKETProtocol/contracts/MarketContractRegistry.sol", "ast": { - "absolutePath": "/home/pelsasser/MARKETProtocol/contracts/MarketContractRegistry.sol", + "absolutePath": "/home/travis/build/MARKETProtocol/MARKETProtocol/contracts/MarketContractRegistry.sol", "exportedSymbols": { "MarketContractRegistry": [ - 1718 + 1220 ] }, - "id": 1719, + "id": 1221, "nodeType": "SourceUnit", "nodes": [ { - "id": 1520, + "id": 1020, "literals": [ "solidity", "^", @@ -223,21 +280,21 @@ { "absolutePath": "openzeppelin-solidity/contracts/ownership/Ownable.sol", "file": "openzeppelin-solidity/contracts/ownership/Ownable.sol", - "id": 1521, + "id": 1021, "nodeType": "ImportDirective", - "scope": 1719, - "sourceUnit": 4629, + "scope": 1221, + "sourceUnit": 7084, "src": "634:63:4", "symbolAliases": [], "unitAlias": "" }, { - "absolutePath": "/home/pelsasser/MARKETProtocol/contracts/MarketContractRegistryInterface.sol", + "absolutePath": "/home/travis/build/MARKETProtocol/MARKETProtocol/contracts/MarketContractRegistryInterface.sol", "file": "./MarketContractRegistryInterface.sol", - "id": 1522, + "id": 1022, "nodeType": "ImportDirective", - "scope": 1719, - "sourceUnit": 1734, + "scope": 1221, + "sourceUnit": 1236, "src": "698:47:4", "symbolAliases": [], "unitAlias": "" @@ -248,17 +305,17 @@ "arguments": null, "baseName": { "contractScope": null, - "id": 1523, + "id": 1023, "name": "Ownable", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 4628, + "referencedDeclaration": 7083, "src": "868:7:4", "typeDescriptions": { - "typeIdentifier": "t_contract$_Ownable_$4628", + "typeIdentifier": "t_contract$_Ownable_$7083", "typeString": "contract Ownable" } }, - "id": 1524, + "id": 1024, "nodeType": "InheritanceSpecifier", "src": "868:7:4" }, @@ -266,44 +323,44 @@ "arguments": null, "baseName": { "contractScope": null, - "id": 1525, + "id": 1025, "name": "MarketContractRegistryInterface", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1733, + "referencedDeclaration": 1235, "src": "877:31:4", "typeDescriptions": { - "typeIdentifier": "t_contract$_MarketContractRegistryInterface_$1733", + "typeIdentifier": "t_contract$_MarketContractRegistryInterface_$1235", "typeString": "contract MarketContractRegistryInterface" } }, - "id": 1526, + "id": 1026, "nodeType": "InheritanceSpecifier", "src": "877:31:4" } ], "contractDependencies": [ - 1733, - 4628 + 1235, + 7083 ], "contractKind": "contract", "documentation": "@title MarketContractRegistry\n @author Phil Elsasser ", "fullyImplemented": true, - "id": 1718, + "id": 1220, "linearizedBaseContracts": [ - 1718, - 1733, - 4628 + 1220, + 1235, + 7083 ], "name": "MarketContractRegistry", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, - "id": 1530, + "id": 1030, "name": "isWhiteListed", "nodeType": "VariableDeclaration", - "scope": 1718, - "src": "916:38:4", + "scope": 1220, + "src": "916:45:4", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -311,9 +368,9 @@ "typeString": "mapping(address => bool)" }, "typeName": { - "id": 1529, + "id": 1029, "keyType": { - "id": 1527, + "id": 1027, "name": "address", "nodeType": "ElementaryTypeName", "src": "924:7:4", @@ -329,7 +386,7 @@ "typeString": "mapping(address => bool)" }, "valueType": { - "id": 1528, + "id": 1028, "name": "bool", "nodeType": "ElementaryTypeName", "src": "935:4:4", @@ -340,15 +397,15 @@ } }, "value": null, - "visibility": "internal" + "visibility": "public" }, { "constant": false, - "id": 1533, + "id": 1033, "name": "addressWhiteList", "nodeType": "VariableDeclaration", - "scope": 1718, - "src": "960:26:4", + "scope": 1220, + "src": "967:33:4", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -357,34 +414,34 @@ }, "typeName": { "baseType": { - "id": 1531, + "id": 1031, "name": "address", "nodeType": "ElementaryTypeName", - "src": "960:7:4", + "src": "967:7:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "id": 1532, + "id": 1032, "length": null, "nodeType": "ArrayTypeName", - "src": "960:9:4", + "src": "967:9:4", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", "typeString": "address[]" } }, "value": null, - "visibility": "internal" + "visibility": "public" }, { "constant": false, - "id": 1537, + "id": 1037, "name": "factoryAddressWhiteList", "nodeType": "VariableDeclaration", - "scope": 1718, - "src": "1063:48:4", + "scope": 1220, + "src": "1077:55:4", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -392,28 +449,28 @@ "typeString": "mapping(address => bool)" }, "typeName": { - "id": 1536, + "id": 1036, "keyType": { - "id": 1534, + "id": 1034, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1071:7:4", + "src": "1085:7:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Mapping", - "src": "1063:24:4", + "src": "1077:24:4", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", "typeString": "mapping(address => bool)" }, "valueType": { - "id": 1535, + "id": 1035, "name": "bool", "nodeType": "ElementaryTypeName", - "src": "1082:4:4", + "src": "1096:4:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -421,26 +478,26 @@ } }, "value": null, - "visibility": "internal" + "visibility": "public" }, { "anonymous": false, "documentation": null, - "id": 1541, + "id": 1041, "name": "AddressAddedToWhitelist", "nodeType": "EventDefinition", "parameters": { - "id": 1540, + "id": 1040, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1539, + "id": 1039, "indexed": true, "name": "contractAddress", "nodeType": "VariableDeclaration", - "scope": 1541, - "src": "1202:31:4", + "scope": 1041, + "src": "1223:31:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -448,10 +505,10 @@ "typeString": "address" }, "typeName": { - "id": 1538, + "id": 1038, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1202:7:4", + "src": "1223:7:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -461,28 +518,28 @@ "visibility": "internal" } ], - "src": "1201:33:4" + "src": "1222:33:4" }, - "src": "1172:63:4" + "src": "1193:63:4" }, { "anonymous": false, "documentation": null, - "id": 1545, + "id": 1045, "name": "AddressRemovedFromWhitelist", "nodeType": "EventDefinition", "parameters": { - "id": 1544, + "id": 1044, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1543, + "id": 1043, "indexed": true, "name": "contractAddress", "nodeType": "VariableDeclaration", - "scope": 1545, - "src": "1274:31:4", + "scope": 1045, + "src": "1295:31:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -490,10 +547,10 @@ "typeString": "address" }, "typeName": { - "id": 1542, + "id": 1042, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1274:7:4", + "src": "1295:7:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -503,28 +560,28 @@ "visibility": "internal" } ], - "src": "1273:33:4" + "src": "1294:33:4" }, - "src": "1240:67:4" + "src": "1261:67:4" }, { "anonymous": false, "documentation": null, - "id": 1549, + "id": 1049, "name": "FactoryAddressAdded", "nodeType": "EventDefinition", "parameters": { - "id": 1548, + "id": 1048, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1547, + "id": 1047, "indexed": true, "name": "factoryAddress", "nodeType": "VariableDeclaration", - "scope": 1549, - "src": "1338:30:4", + "scope": 1049, + "src": "1359:30:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -532,10 +589,10 @@ "typeString": "address" }, "typeName": { - "id": 1546, + "id": 1046, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1338:7:4", + "src": "1359:7:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -545,28 +602,28 @@ "visibility": "internal" } ], - "src": "1337:32:4" + "src": "1358:32:4" }, - "src": "1312:58:4" + "src": "1333:58:4" }, { "anonymous": false, "documentation": null, - "id": 1553, + "id": 1053, "name": "FactoryAddressRemoved", "nodeType": "EventDefinition", "parameters": { - "id": 1552, + "id": 1052, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1551, + "id": 1051, "indexed": true, "name": "factoryAddress", "nodeType": "VariableDeclaration", - "scope": 1553, - "src": "1403:30:4", + "scope": 1053, + "src": "1424:30:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -574,10 +631,10 @@ "typeString": "address" }, "typeName": { - "id": 1550, + "id": 1050, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1403:7:4", + "src": "1424:7:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -587,41 +644,41 @@ "visibility": "internal" } ], - "src": "1402:32:4" + "src": "1423:32:4" }, - "src": "1375:60:4" + "src": "1396:60:4" }, { "body": { - "id": 1564, + "id": 1064, "nodeType": "Block", - "src": "1689:54:4", + "src": "1710:54:4", "statements": [ { "expression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 1560, + "id": 1060, "name": "isWhiteListed", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1530, - "src": "1706:13:4", + "referencedDeclaration": 1030, + "src": "1727:13:4", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", "typeString": "mapping(address => bool)" } }, - "id": 1562, + "id": 1062, "indexExpression": { "argumentTypes": null, - "id": 1561, + "id": 1061, "name": "contractAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1555, - "src": "1720:15:4", + "referencedDeclaration": 1055, + "src": "1741:15:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -632,21 +689,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "1706:30:4", + "src": "1727:30:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "functionReturnParameters": 1559, - "id": 1563, + "functionReturnParameters": 1059, + "id": 1063, "nodeType": "Return", - "src": "1699:37:4" + "src": "1720:37:4" } ] }, "documentation": "@notice determines if an address is a valid MarketContract\n @return false if the address is not white listed.", - "id": 1565, + "id": 1065, "implemented": true, "isConstructor": false, "isDeclaredConst": true, @@ -654,16 +711,16 @@ "name": "isAddressWhiteListed", "nodeType": "FunctionDefinition", "parameters": { - "id": 1556, + "id": 1056, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1555, + "id": 1055, "name": "contractAddress", "nodeType": "VariableDeclaration", - "scope": 1565, - "src": "1635:23:4", + "scope": 1065, + "src": "1656:23:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -671,10 +728,10 @@ "typeString": "address" }, "typeName": { - "id": 1554, + "id": 1054, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1635:7:4", + "src": "1656:7:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -684,20 +741,20 @@ "visibility": "internal" } ], - "src": "1634:25:4" + "src": "1655:25:4" }, "payable": false, "returnParameters": { - "id": 1559, + "id": 1059, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1558, + "id": 1058, "name": "", "nodeType": "VariableDeclaration", - "scope": 1565, - "src": "1683:4:4", + "scope": 1065, + "src": "1704:4:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -705,10 +762,10 @@ "typeString": "bool" }, "typeName": { - "id": 1557, + "id": 1057, "name": "bool", "nodeType": "ElementaryTypeName", - "src": "1683:4:4", + "src": "1704:4:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -718,43 +775,43 @@ "visibility": "internal" } ], - "src": "1682:6:4" + "src": "1703:6:4" }, - "scope": 1718, - "src": "1605:138:4", + "scope": 1220, + "src": "1626:138:4", "stateMutability": "view", - "superFunction": 1732, + "superFunction": 1234, "visibility": "external" }, { "body": { - "id": 1573, + "id": 1073, "nodeType": "Block", - "src": "1901:40:4", + "src": "1922:40:4", "statements": [ { "expression": { "argumentTypes": null, - "id": 1571, + "id": 1071, "name": "addressWhiteList", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1533, - "src": "1918:16:4", + "referencedDeclaration": 1033, + "src": "1939:16:4", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_storage", "typeString": "address[] storage ref" } }, - "functionReturnParameters": 1570, - "id": 1572, + "functionReturnParameters": 1070, + "id": 1072, "nodeType": "Return", - "src": "1911:23:4" + "src": "1932:23:4" } ] }, "documentation": "@notice all currently whitelisted addresses\n returns array of addresses", - "id": 1574, + "id": 1074, "implemented": true, "isConstructor": false, "isDeclaredConst": true, @@ -762,23 +819,23 @@ "name": "getAddressWhiteList", "nodeType": "FunctionDefinition", "parameters": { - "id": 1566, + "id": 1066, "nodeType": "ParameterList", "parameters": [], - "src": "1864:2:4" + "src": "1885:2:4" }, "payable": false, "returnParameters": { - "id": 1570, + "id": 1070, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1569, + "id": 1069, "name": "", "nodeType": "VariableDeclaration", - "scope": 1574, - "src": "1890:9:4", + "scope": 1074, + "src": "1911:9:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -787,19 +844,19 @@ }, "typeName": { "baseType": { - "id": 1567, + "id": 1067, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1890:7:4", + "src": "1911:7:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "id": 1568, + "id": 1068, "length": null, "nodeType": "ArrayTypeName", - "src": "1890:9:4", + "src": "1911:9:4", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", "typeString": "address[]" @@ -809,19 +866,19 @@ "visibility": "internal" } ], - "src": "1889:11:4" + "src": "1910:11:4" }, - "scope": 1718, - "src": "1836:105:4", + "scope": 1220, + "src": "1857:105:4", "stateMutability": "view", "superFunction": null, "visibility": "external" }, { "body": { - "id": 1626, + "id": 1126, "nodeType": "Block", - "src": "2427:465:4", + "src": "2448:465:4", "statements": [ { "expression": { @@ -831,26 +888,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 1586, + "id": 1086, "name": "isWhiteListed", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1530, - "src": "2445:13:4", + "referencedDeclaration": 1030, + "src": "2466:13:4", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", "typeString": "mapping(address => bool)" } }, - "id": 1588, + "id": 1088, "indexExpression": { "argumentTypes": null, - "id": 1587, + "id": 1087, "name": "contractAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1576, - "src": "2459:15:4", + "referencedDeclaration": 1076, + "src": "2480:15:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -861,7 +918,7 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "2445:30:4", + "src": "2466:30:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -875,21 +932,21 @@ "typeString": "bool" } ], - "id": 1585, + "id": 1085, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 5196, - 5197 + 8186, + 8187 ], - "referencedDeclaration": 5196, - "src": "2437:7:4", + "referencedDeclaration": 8186, + "src": "2458:7:4", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, - "id": 1589, + "id": 1089, "isConstant": false, "isLValue": false, "isPure": false, @@ -897,15 +954,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "2437:39:4", + "src": "2458:39:4", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 1590, + "id": 1090, "nodeType": "ExpressionStatement", - "src": "2437:39:4" + "src": "2458:39:4" }, { "expression": { @@ -917,7 +974,7 @@ "typeIdentifier": "t_address", "typeString": "address" }, - "id": 1596, + "id": 1096, "isConstant": false, "isLValue": false, "isPure": false, @@ -926,26 +983,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 1592, + "id": 1092, "name": "addressWhiteList", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1533, - "src": "2494:16:4", + "referencedDeclaration": 1033, + "src": "2515:16:4", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_storage", "typeString": "address[] storage ref" } }, - "id": 1594, + "id": 1094, "indexExpression": { "argumentTypes": null, - "id": 1593, + "id": 1093, "name": "whiteListIndex", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1578, - "src": "2511:14:4", + "referencedDeclaration": 1078, + "src": "2532:14:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -956,7 +1013,7 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "2494:32:4", + "src": "2515:32:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -966,18 +1023,18 @@ "operator": "==", "rightExpression": { "argumentTypes": null, - "id": 1595, + "id": 1095, "name": "contractAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1576, - "src": "2530:15:4", + "referencedDeclaration": 1076, + "src": "2551:15:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "src": "2494:51:4", + "src": "2515:51:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -991,21 +1048,21 @@ "typeString": "bool" } ], - "id": 1591, + "id": 1091, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 5196, - 5197 + 8186, + 8187 ], - "referencedDeclaration": 5196, - "src": "2486:7:4", + "referencedDeclaration": 8186, + "src": "2507:7:4", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, - "id": 1597, + "id": 1097, "isConstant": false, "isLValue": false, "isPure": false, @@ -1013,20 +1070,20 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "2486:60:4", + "src": "2507:60:4", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 1598, + "id": 1098, "nodeType": "ExpressionStatement", - "src": "2486:60:4" + "src": "2507:60:4" }, { "expression": { "argumentTypes": null, - "id": 1603, + "id": 1103, "isConstant": false, "isLValue": false, "isPure": false, @@ -1035,26 +1092,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 1599, + "id": 1099, "name": "isWhiteListed", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1530, - "src": "2556:13:4", + "referencedDeclaration": 1030, + "src": "2577:13:4", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", "typeString": "mapping(address => bool)" } }, - "id": 1601, + "id": 1101, "indexExpression": { "argumentTypes": null, - "id": 1600, + "id": 1100, "name": "contractAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1576, - "src": "2570:15:4", + "referencedDeclaration": 1076, + "src": "2591:15:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -1065,7 +1122,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "2556:30:4", + "src": "2577:30:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -1076,14 +1133,14 @@ "rightHandSide": { "argumentTypes": null, "hexValue": "66616c7365", - "id": 1602, + "id": 1102, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", - "src": "2589:5:4", + "src": "2610:5:4", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", @@ -1091,20 +1148,20 @@ }, "value": "false" }, - "src": "2556:38:4", + "src": "2577:38:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 1604, + "id": 1104, "nodeType": "ExpressionStatement", - "src": "2556:38:4" + "src": "2577:38:4" }, { "expression": { "argumentTypes": null, - "id": 1614, + "id": 1114, "isConstant": false, "isLValue": false, "isPure": false, @@ -1113,26 +1170,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 1605, + "id": 1105, "name": "addressWhiteList", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1533, - "src": "2708:16:4", + "referencedDeclaration": 1033, + "src": "2729:16:4", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_storage", "typeString": "address[] storage ref" } }, - "id": 1607, + "id": 1107, "indexExpression": { "argumentTypes": null, - "id": 1606, + "id": 1106, "name": "whiteListIndex", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1578, - "src": "2725:14:4", + "referencedDeclaration": 1078, + "src": "2746:14:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1143,7 +1200,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "2708:32:4", + "src": "2729:32:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -1155,25 +1212,25 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 1608, + "id": 1108, "name": "addressWhiteList", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1533, - "src": "2743:16:4", + "referencedDeclaration": 1033, + "src": "2764:16:4", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_storage", "typeString": "address[] storage ref" } }, - "id": 1613, + "id": 1113, "indexExpression": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 1612, + "id": 1112, "isConstant": false, "isLValue": false, "isPure": false, @@ -1182,18 +1239,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 1609, + "id": 1109, "name": "addressWhiteList", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1533, - "src": "2760:16:4", + "referencedDeclaration": 1033, + "src": "2781:16:4", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_storage", "typeString": "address[] storage ref" } }, - "id": 1610, + "id": 1110, "isConstant": false, "isLValue": true, "isPure": false, @@ -1201,7 +1258,7 @@ "memberName": "length", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "2760:23:4", + "src": "2781:23:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1212,14 +1269,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "31", - "id": 1611, + "id": 1111, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "2786:1:4", + "src": "2807:1:4", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", @@ -1227,7 +1284,7 @@ }, "value": "1" }, - "src": "2760:27:4", + "src": "2781:27:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1238,26 +1295,26 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "2743:45:4", + "src": "2764:45:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "src": "2708:80:4", + "src": "2729:80:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "id": 1615, + "id": 1115, "nodeType": "ExpressionStatement", - "src": "2708:80:4" + "src": "2729:80:4" }, { "expression": { "argumentTypes": null, - "id": 1620, + "id": 1120, "isConstant": false, "isLValue": false, "isPure": false, @@ -1266,18 +1323,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 1616, + "id": 1116, "name": "addressWhiteList", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1533, - "src": "2798:16:4", + "referencedDeclaration": 1033, + "src": "2819:16:4", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_storage", "typeString": "address[] storage ref" } }, - "id": 1618, + "id": 1118, "isConstant": false, "isLValue": true, "isPure": false, @@ -1285,7 +1342,7 @@ "memberName": "length", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "2798:23:4", + "src": "2819:23:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1296,14 +1353,14 @@ "rightHandSide": { "argumentTypes": null, "hexValue": "31", - "id": 1619, + "id": 1119, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "2825:1:4", + "src": "2846:1:4", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", @@ -1311,15 +1368,15 @@ }, "value": "1" }, - "src": "2798:28:4", + "src": "2819:28:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 1621, + "id": 1121, "nodeType": "ExpressionStatement", - "src": "2798:28:4" + "src": "2819:28:4" }, { "eventCall": { @@ -1327,12 +1384,12 @@ "arguments": [ { "argumentTypes": null, - "id": 1623, + "id": 1123, "name": "contractAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1576, - "src": "2869:15:4", + "referencedDeclaration": 1076, + "src": "2890:15:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -1346,18 +1403,18 @@ "typeString": "address" } ], - "id": 1622, + "id": 1122, "name": "AddressRemovedFromWhitelist", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1545, - "src": "2841:27:4", + "referencedDeclaration": 1045, + "src": "2862:27:4", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", "typeString": "function (address)" } }, - "id": 1624, + "id": 1124, "isConstant": false, "isLValue": false, "isPure": false, @@ -1365,57 +1422,57 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "2841:44:4", + "src": "2862:44:4", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 1625, + "id": 1125, "nodeType": "EmitStatement", - "src": "2836:49:4" + "src": "2857:49:4" } ] }, "documentation": "@dev allows for the owner to remove a white listed contract, eventually ownership could transition to\n a decentralized smart contract of community members to vote\n @param contractAddress contract to removed from white list\n @param whiteListIndex of the contractAddress in the addressWhiteList to be removed.", - "id": 1627, + "id": 1127, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [ { "arguments": null, - "id": 1581, + "id": 1081, "modifierName": { "argumentTypes": null, - "id": 1580, + "id": 1080, "name": "onlyOwner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4602, - "src": "2398:9:4", + "referencedDeclaration": 7057, + "src": "2419:9:4", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", - "src": "2398:9:4" + "src": "2419:9:4" } ], "name": "removeContractFromWhiteList", "nodeType": "FunctionDefinition", "parameters": { - "id": 1579, + "id": 1079, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1576, + "id": 1076, "name": "contractAddress", "nodeType": "VariableDeclaration", - "scope": 1627, - "src": "2330:23:4", + "scope": 1127, + "src": "2351:23:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1423,10 +1480,10 @@ "typeString": "address" }, "typeName": { - "id": 1575, + "id": 1075, "name": "address", "nodeType": "ElementaryTypeName", - "src": "2330:7:4", + "src": "2351:7:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -1437,11 +1494,11 @@ }, { "constant": false, - "id": 1578, + "id": 1078, "name": "whiteListIndex", "nodeType": "VariableDeclaration", - "scope": 1627, - "src": "2363:19:4", + "scope": 1127, + "src": "2384:19:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1449,10 +1506,10 @@ "typeString": "uint256" }, "typeName": { - "id": 1577, + "id": 1077, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "2363:4:4", + "src": "2384:4:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1462,20 +1519,20 @@ "visibility": "internal" } ], - "src": "2320:68:4" + "src": "2341:68:4" }, "payable": false, "returnParameters": { - "id": 1584, + "id": 1084, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1583, + "id": 1083, "name": "", "nodeType": "VariableDeclaration", - "scope": 1627, - "src": "2417:4:4", + "scope": 1127, + "src": "2438:4:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1483,10 +1540,10 @@ "typeString": "bool" }, "typeName": { - "id": 1582, + "id": 1082, "name": "bool", "nodeType": "ElementaryTypeName", - "src": "2417:4:4", + "src": "2438:4:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -1496,19 +1553,19 @@ "visibility": "internal" } ], - "src": "2416:6:4" + "src": "2437:6:4" }, - "scope": 1718, - "src": "2284:608:4", + "scope": 1220, + "src": "2305:608:4", "stateMutability": "nonpayable", "superFunction": null, "visibility": "external" }, { "body": { - "id": 1667, + "id": 1168, "nodeType": "Block", - "src": "3216:284:4", + "src": "3237:324:4", "statements": [ { "expression": { @@ -1520,7 +1577,7 @@ "typeIdentifier": "t_bool", "typeString": "bool" }, - "id": 1641, + "id": 1141, "isConstant": false, "isLValue": false, "isPure": false, @@ -1531,7 +1588,7 @@ "typeIdentifier": "t_address", "typeString": "address" }, - "id": 1636, + "id": 1136, "isConstant": false, "isLValue": false, "isPure": false, @@ -1540,18 +1597,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 1633, + "id": 1133, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 5193, - "src": "3234:3:4", + "referencedDeclaration": 8183, + "src": "3255:3:4", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 1634, + "id": 1134, "isConstant": false, "isLValue": false, "isPure": false, @@ -1559,7 +1616,7 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "3234:10:4", + "src": "3255:10:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -1569,18 +1626,18 @@ "operator": "==", "rightExpression": { "argumentTypes": null, - "id": 1635, + "id": 1135, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4576, - "src": "3248:5:4", + "referencedDeclaration": 7031, + "src": "3269:5:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "src": "3234:19:4", + "src": "3255:19:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -1592,34 +1649,34 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 1637, + "id": 1137, "name": "factoryAddressWhiteList", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1537, - "src": "3257:23:4", + "referencedDeclaration": 1037, + "src": "3278:23:4", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", "typeString": "mapping(address => bool)" } }, - "id": 1640, + "id": 1140, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 1638, + "id": 1138, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 5193, - "src": "3281:3:4", + "referencedDeclaration": 8183, + "src": "3302:3:4", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 1639, + "id": 1139, "isConstant": false, "isLValue": false, "isPure": false, @@ -1627,7 +1684,7 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "3281:10:4", + "src": "3302:10:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -1638,17 +1695,35 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "3257:35:4", + "src": "3278:35:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "src": "3234:58:4", + "src": "3255:58:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } + }, + { + "argumentTypes": null, + "hexValue": "43616e206f6e6c7920626520616464656420627920666163746f72206f72206f776e6572", + "id": 1142, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3315:38:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3a684e2a41f13e4ed9bdd762e9a38288b5a5b7588ca65e5e1c0062048da2d7be", + "typeString": "literal_string \"Can only be added by factor or owner\"" + }, + "value": "Can only be added by factor or owner" } ], "expression": { @@ -1656,23 +1731,27 @@ { "typeIdentifier": "t_bool", "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3a684e2a41f13e4ed9bdd762e9a38288b5a5b7588ca65e5e1c0062048da2d7be", + "typeString": "literal_string \"Can only be added by factor or owner\"" } ], - "id": 1632, + "id": 1132, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 5196, - 5197 + 8186, + 8187 ], - "referencedDeclaration": 5196, - "src": "3226:7:4", + "referencedDeclaration": 8187, + "src": "3247:7:4", "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" } }, - "id": 1642, + "id": 1143, "isConstant": false, "isLValue": false, "isPure": false, @@ -1680,15 +1759,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3226:67:4", + "src": "3247:107:4", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 1643, + "id": 1144, "nodeType": "ExpressionStatement", - "src": "3226:67:4" + "src": "3247:107:4" }, { "expression": { @@ -1696,7 +1775,7 @@ "arguments": [ { "argumentTypes": null, - "id": 1648, + "id": 1149, "isConstant": false, "isLValue": false, "isPure": false, @@ -1704,31 +1783,31 @@ "nodeType": "UnaryOperation", "operator": "!", "prefix": true, - "src": "3311:31:4", + "src": "3372:31:4", "subExpression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 1645, + "id": 1146, "name": "isWhiteListed", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1530, - "src": "3312:13:4", + "referencedDeclaration": 1030, + "src": "3373:13:4", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", "typeString": "mapping(address => bool)" } }, - "id": 1647, + "id": 1148, "indexExpression": { "argumentTypes": null, - "id": 1646, + "id": 1147, "name": "contractAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1629, - "src": "3326:15:4", + "referencedDeclaration": 1129, + "src": "3387:15:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -1739,7 +1818,7 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "3312:30:4", + "src": "3373:30:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -1758,21 +1837,21 @@ "typeString": "bool" } ], - "id": 1644, + "id": 1145, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 5196, - 5197 + 8186, + 8187 ], - "referencedDeclaration": 5196, - "src": "3303:7:4", + "referencedDeclaration": 8186, + "src": "3364:7:4", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, - "id": 1649, + "id": 1150, "isConstant": false, "isLValue": false, "isPure": false, @@ -1780,20 +1859,20 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3303:40:4", + "src": "3364:40:4", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 1650, + "id": 1151, "nodeType": "ExpressionStatement", - "src": "3303:40:4" + "src": "3364:40:4" }, { "expression": { "argumentTypes": null, - "id": 1655, + "id": 1156, "isConstant": false, "isLValue": false, "isPure": false, @@ -1802,26 +1881,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 1651, + "id": 1152, "name": "isWhiteListed", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1530, - "src": "3353:13:4", + "referencedDeclaration": 1030, + "src": "3414:13:4", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", "typeString": "mapping(address => bool)" } }, - "id": 1653, + "id": 1154, "indexExpression": { "argumentTypes": null, - "id": 1652, + "id": 1153, "name": "contractAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1629, - "src": "3367:15:4", + "referencedDeclaration": 1129, + "src": "3428:15:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -1832,7 +1911,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "3353:30:4", + "src": "3414:30:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -1843,14 +1922,14 @@ "rightHandSide": { "argumentTypes": null, "hexValue": "74727565", - "id": 1654, + "id": 1155, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", - "src": "3386:4:4", + "src": "3447:4:4", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", @@ -1858,15 +1937,15 @@ }, "value": "true" }, - "src": "3353:37:4", + "src": "3414:37:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 1656, + "id": 1157, "nodeType": "ExpressionStatement", - "src": "3353:37:4" + "src": "3414:37:4" }, { "expression": { @@ -1874,12 +1953,12 @@ "arguments": [ { "argumentTypes": null, - "id": 1660, + "id": 1161, "name": "contractAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1629, - "src": "3422:15:4", + "referencedDeclaration": 1129, + "src": "3483:15:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -1895,18 +1974,18 @@ ], "expression": { "argumentTypes": null, - "id": 1657, + "id": 1158, "name": "addressWhiteList", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1533, - "src": "3400:16:4", + "referencedDeclaration": 1033, + "src": "3461:16:4", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_storage", "typeString": "address[] storage ref" } }, - "id": 1659, + "id": 1160, "isConstant": false, "isLValue": false, "isPure": false, @@ -1914,13 +1993,13 @@ "memberName": "push", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "3400:21:4", + "src": "3461:21:4", "typeDescriptions": { "typeIdentifier": "t_function_arraypush_nonpayable$_t_address_$returns$_t_uint256_$", "typeString": "function (address) returns (uint256)" } }, - "id": 1661, + "id": 1162, "isConstant": false, "isLValue": false, "isPure": false, @@ -1928,15 +2007,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3400:38:4", + "src": "3461:38:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 1662, + "id": 1163, "nodeType": "ExpressionStatement", - "src": "3400:38:4" + "src": "3461:38:4" }, { "eventCall": { @@ -1944,12 +2023,12 @@ "arguments": [ { "argumentTypes": null, - "id": 1664, + "id": 1165, "name": "contractAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1629, - "src": "3477:15:4", + "referencedDeclaration": 1129, + "src": "3538:15:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -1963,18 +2042,18 @@ "typeString": "address" } ], - "id": 1663, + "id": 1164, "name": "AddressAddedToWhitelist", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1541, - "src": "3453:23:4", + "referencedDeclaration": 1041, + "src": "3514:23:4", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", "typeString": "function (address)" } }, - "id": 1665, + "id": 1166, "isConstant": false, "isLValue": false, "isPure": false, @@ -1982,20 +2061,20 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3453:40:4", + "src": "3514:40:4", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 1666, + "id": 1167, "nodeType": "EmitStatement", - "src": "3448:45:4" + "src": "3509:45:4" } ] }, "documentation": "@dev allows for the owner or factory to add a white listed contract, eventually ownership could transition to\n a decentralized smart contract of community members to vote\n @param contractAddress contract to removed from white list", - "id": 1668, + "id": 1169, "implemented": true, "isConstructor": false, "isDeclaredConst": false, @@ -2003,16 +2082,16 @@ "name": "addAddressToWhiteList", "nodeType": "FunctionDefinition", "parameters": { - "id": 1630, + "id": 1130, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1629, + "id": 1129, "name": "contractAddress", "nodeType": "VariableDeclaration", - "scope": 1668, - "src": "3182:23:4", + "scope": 1169, + "src": "3203:23:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2020,10 +2099,10 @@ "typeString": "address" }, "typeName": { - "id": 1628, + "id": 1128, "name": "address", "nodeType": "ElementaryTypeName", - "src": "3182:7:4", + "src": "3203:7:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -2033,26 +2112,26 @@ "visibility": "internal" } ], - "src": "3181:25:4" + "src": "3202:25:4" }, "payable": false, "returnParameters": { - "id": 1631, + "id": 1131, "nodeType": "ParameterList", "parameters": [], - "src": "3216:0:4" + "src": "3237:0:4" }, - "scope": 1718, - "src": "3151:349:4", + "scope": 1220, + "src": "3172:389:4", "stateMutability": "nonpayable", - "superFunction": 1725, + "superFunction": 1227, "visibility": "external" }, { "body": { - "id": 1692, + "id": 1194, "nodeType": "Block", - "src": "3783:172:4", + "src": "3844:197:4", "statements": [ { "expression": { @@ -2060,7 +2139,7 @@ "arguments": [ { "argumentTypes": null, - "id": 1679, + "id": 1180, "isConstant": false, "isLValue": false, "isPure": false, @@ -2068,31 +2147,31 @@ "nodeType": "UnaryOperation", "operator": "!", "prefix": true, - "src": "3801:40:4", + "src": "3862:40:4", "subExpression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 1676, + "id": 1177, "name": "factoryAddressWhiteList", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1537, - "src": "3802:23:4", + "referencedDeclaration": 1037, + "src": "3863:23:4", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", "typeString": "mapping(address => bool)" } }, - "id": 1678, + "id": 1179, "indexExpression": { "argumentTypes": null, - "id": 1677, + "id": 1178, "name": "factoryAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1670, - "src": "3826:14:4", + "referencedDeclaration": 1171, + "src": "3887:14:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -2103,7 +2182,7 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "3802:39:4", + "src": "3863:39:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -2113,6 +2192,24 @@ "typeIdentifier": "t_bool", "typeString": "bool" } + }, + { + "argumentTypes": null, + "hexValue": "6164647265737320616c7265616479206164646564", + "id": 1181, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3904:23:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e3620bf434525f05b8f3e09ff34da1ed381a930e763623c8370675363f272af2", + "typeString": "literal_string \"address already added\"" + }, + "value": "address already added" } ], "expression": { @@ -2120,23 +2217,27 @@ { "typeIdentifier": "t_bool", "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_e3620bf434525f05b8f3e09ff34da1ed381a930e763623c8370675363f272af2", + "typeString": "literal_string \"address already added\"" } ], - "id": 1675, + "id": 1176, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 5196, - 5197 + 8186, + 8187 ], - "referencedDeclaration": 5196, - "src": "3793:7:4", + "referencedDeclaration": 8187, + "src": "3854:7:4", "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" } }, - "id": 1680, + "id": 1182, "isConstant": false, "isLValue": false, "isPure": false, @@ -2144,20 +2245,20 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3793:49:4", + "src": "3854:74:4", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 1681, + "id": 1183, "nodeType": "ExpressionStatement", - "src": "3793:49:4" + "src": "3854:74:4" }, { "expression": { "argumentTypes": null, - "id": 1686, + "id": 1188, "isConstant": false, "isLValue": false, "isPure": false, @@ -2166,26 +2267,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 1682, + "id": 1184, "name": "factoryAddressWhiteList", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1537, - "src": "3852:23:4", + "referencedDeclaration": 1037, + "src": "3938:23:4", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", "typeString": "mapping(address => bool)" } }, - "id": 1684, + "id": 1186, "indexExpression": { "argumentTypes": null, - "id": 1683, + "id": 1185, "name": "factoryAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1670, - "src": "3876:14:4", + "referencedDeclaration": 1171, + "src": "3962:14:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -2196,7 +2297,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "3852:39:4", + "src": "3938:39:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -2207,14 +2308,14 @@ "rightHandSide": { "argumentTypes": null, "hexValue": "74727565", - "id": 1685, + "id": 1187, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", - "src": "3894:4:4", + "src": "3980:4:4", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", @@ -2222,15 +2323,15 @@ }, "value": "true" }, - "src": "3852:46:4", + "src": "3938:46:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 1687, + "id": 1189, "nodeType": "ExpressionStatement", - "src": "3852:46:4" + "src": "3938:46:4" }, { "eventCall": { @@ -2238,12 +2339,12 @@ "arguments": [ { "argumentTypes": null, - "id": 1689, + "id": 1191, "name": "factoryAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1670, - "src": "3933:14:4", + "referencedDeclaration": 1171, + "src": "4019:14:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -2257,18 +2358,18 @@ "typeString": "address" } ], - "id": 1688, + "id": 1190, "name": "FactoryAddressAdded", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1549, - "src": "3913:19:4", + "referencedDeclaration": 1049, + "src": "3999:19:4", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", "typeString": "function (address)" } }, - "id": 1690, + "id": 1192, "isConstant": false, "isLValue": false, "isPure": false, @@ -2276,57 +2377,57 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3913:35:4", + "src": "3999:35:4", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 1691, + "id": 1193, "nodeType": "EmitStatement", - "src": "3908:40:4" + "src": "3994:40:4" } ] }, "documentation": "@dev allows for the owner to add a new address of a factory responsible for creating new market contracts\n @param factoryAddress address of factory to be allowed to add contracts to whitelist", - "id": 1693, + "id": 1195, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [ { "arguments": null, - "id": 1673, + "id": 1174, "modifierName": { "argumentTypes": null, - "id": 1672, + "id": 1173, "name": "onlyOwner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4602, - "src": "3773:9:4", + "referencedDeclaration": 7057, + "src": "3834:9:4", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", - "src": "3773:9:4" + "src": "3834:9:4" } ], "name": "addFactoryAddress", "nodeType": "FunctionDefinition", "parameters": { - "id": 1671, + "id": 1172, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1670, + "id": 1171, "name": "factoryAddress", "nodeType": "VariableDeclaration", - "scope": 1693, - "src": "3740:22:4", + "scope": 1195, + "src": "3801:22:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2334,10 +2435,10 @@ "typeString": "address" }, "typeName": { - "id": 1669, + "id": 1170, "name": "address", "nodeType": "ElementaryTypeName", - "src": "3740:7:4", + "src": "3801:7:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -2347,26 +2448,26 @@ "visibility": "internal" } ], - "src": "3739:24:4" + "src": "3800:24:4" }, "payable": false, "returnParameters": { - "id": 1674, + "id": 1175, "nodeType": "ParameterList", "parameters": [], - "src": "3783:0:4" + "src": "3844:0:4" }, - "scope": 1718, - "src": "3713:242:4", + "scope": 1220, + "src": "3774:267:4", "stateMutability": "nonpayable", "superFunction": null, "visibility": "external" }, { "body": { - "id": 1716, + "id": 1218, "nodeType": "Block", - "src": "4165:174:4", + "src": "4251:174:4", "statements": [ { "expression": { @@ -2376,26 +2477,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 1701, + "id": 1203, "name": "factoryAddressWhiteList", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1537, - "src": "4183:23:4", + "referencedDeclaration": 1037, + "src": "4269:23:4", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", "typeString": "mapping(address => bool)" } }, - "id": 1703, + "id": 1205, "indexExpression": { "argumentTypes": null, - "id": 1702, + "id": 1204, "name": "factoryAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1695, - "src": "4207:14:4", + "referencedDeclaration": 1197, + "src": "4293:14:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -2406,7 +2507,7 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "4183:39:4", + "src": "4269:39:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -2420,21 +2521,21 @@ "typeString": "bool" } ], - "id": 1700, + "id": 1202, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 5196, - 5197 + 8186, + 8187 ], - "referencedDeclaration": 5196, - "src": "4175:7:4", + "referencedDeclaration": 8186, + "src": "4261:7:4", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, - "id": 1704, + "id": 1206, "isConstant": false, "isLValue": false, "isPure": false, @@ -2442,20 +2543,20 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "4175:48:4", + "src": "4261:48:4", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 1705, + "id": 1207, "nodeType": "ExpressionStatement", - "src": "4175:48:4" + "src": "4261:48:4" }, { "expression": { "argumentTypes": null, - "id": 1710, + "id": 1212, "isConstant": false, "isLValue": false, "isPure": false, @@ -2464,26 +2565,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 1706, + "id": 1208, "name": "factoryAddressWhiteList", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1537, - "src": "4233:23:4", + "referencedDeclaration": 1037, + "src": "4319:23:4", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", "typeString": "mapping(address => bool)" } }, - "id": 1708, + "id": 1210, "indexExpression": { "argumentTypes": null, - "id": 1707, + "id": 1209, "name": "factoryAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1695, - "src": "4257:14:4", + "referencedDeclaration": 1197, + "src": "4343:14:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -2494,7 +2595,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "4233:39:4", + "src": "4319:39:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -2505,14 +2606,14 @@ "rightHandSide": { "argumentTypes": null, "hexValue": "66616c7365", - "id": 1709, + "id": 1211, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", - "src": "4275:5:4", + "src": "4361:5:4", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", @@ -2520,15 +2621,15 @@ }, "value": "false" }, - "src": "4233:47:4", + "src": "4319:47:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 1711, + "id": 1213, "nodeType": "ExpressionStatement", - "src": "4233:47:4" + "src": "4319:47:4" }, { "eventCall": { @@ -2536,12 +2637,12 @@ "arguments": [ { "argumentTypes": null, - "id": 1713, + "id": 1215, "name": "factoryAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1695, - "src": "4317:14:4", + "referencedDeclaration": 1197, + "src": "4403:14:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -2555,18 +2656,18 @@ "typeString": "address" } ], - "id": 1712, + "id": 1214, "name": "FactoryAddressRemoved", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1553, - "src": "4295:21:4", + "referencedDeclaration": 1053, + "src": "4381:21:4", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", "typeString": "function (address)" } }, - "id": 1714, + "id": 1216, "isConstant": false, "isLValue": false, "isPure": false, @@ -2574,57 +2675,57 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "4295:37:4", + "src": "4381:37:4", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 1715, + "id": 1217, "nodeType": "EmitStatement", - "src": "4290:42:4" + "src": "4376:42:4" } ] }, "documentation": "@dev allows for the owner to remove an address of a factory\n @param factoryAddress address of factory to be removed", - "id": 1717, + "id": 1219, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [ { "arguments": null, - "id": 1698, + "id": 1200, "modifierName": { "argumentTypes": null, - "id": 1697, + "id": 1199, "name": "onlyOwner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4602, - "src": "4155:9:4", + "referencedDeclaration": 7057, + "src": "4241:9:4", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", - "src": "4155:9:4" + "src": "4241:9:4" } ], "name": "removeFactoryAddress", "nodeType": "FunctionDefinition", "parameters": { - "id": 1696, + "id": 1198, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1695, + "id": 1197, "name": "factoryAddress", "nodeType": "VariableDeclaration", - "scope": 1717, - "src": "4122:22:4", + "scope": 1219, + "src": "4208:22:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2632,10 +2733,10 @@ "typeString": "address" }, "typeName": { - "id": 1694, + "id": 1196, "name": "address", "nodeType": "ElementaryTypeName", - "src": "4122:7:4", + "src": "4208:7:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -2645,40 +2746,40 @@ "visibility": "internal" } ], - "src": "4121:24:4" + "src": "4207:24:4" }, "payable": false, "returnParameters": { - "id": 1699, + "id": 1201, "nodeType": "ParameterList", "parameters": [], - "src": "4165:0:4" + "src": "4251:0:4" }, - "scope": 1718, - "src": "4092:247:4", + "scope": 1220, + "src": "4178:247:4", "stateMutability": "nonpayable", "superFunction": null, "visibility": "external" } ], - "scope": 1719, - "src": "833:3508:4" + "scope": 1221, + "src": "833:3594:4" } ], - "src": "608:3734:4" + "src": "608:3820:4" }, "legacyAST": { - "absolutePath": "/home/pelsasser/MARKETProtocol/contracts/MarketContractRegistry.sol", + "absolutePath": "/home/travis/build/MARKETProtocol/MARKETProtocol/contracts/MarketContractRegistry.sol", "exportedSymbols": { "MarketContractRegistry": [ - 1718 + 1220 ] }, - "id": 1719, + "id": 1221, "nodeType": "SourceUnit", "nodes": [ { - "id": 1520, + "id": 1020, "literals": [ "solidity", "^", @@ -2691,21 +2792,21 @@ { "absolutePath": "openzeppelin-solidity/contracts/ownership/Ownable.sol", "file": "openzeppelin-solidity/contracts/ownership/Ownable.sol", - "id": 1521, + "id": 1021, "nodeType": "ImportDirective", - "scope": 1719, - "sourceUnit": 4629, + "scope": 1221, + "sourceUnit": 7084, "src": "634:63:4", "symbolAliases": [], "unitAlias": "" }, { - "absolutePath": "/home/pelsasser/MARKETProtocol/contracts/MarketContractRegistryInterface.sol", + "absolutePath": "/home/travis/build/MARKETProtocol/MARKETProtocol/contracts/MarketContractRegistryInterface.sol", "file": "./MarketContractRegistryInterface.sol", - "id": 1522, + "id": 1022, "nodeType": "ImportDirective", - "scope": 1719, - "sourceUnit": 1734, + "scope": 1221, + "sourceUnit": 1236, "src": "698:47:4", "symbolAliases": [], "unitAlias": "" @@ -2716,17 +2817,17 @@ "arguments": null, "baseName": { "contractScope": null, - "id": 1523, + "id": 1023, "name": "Ownable", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 4628, + "referencedDeclaration": 7083, "src": "868:7:4", "typeDescriptions": { - "typeIdentifier": "t_contract$_Ownable_$4628", + "typeIdentifier": "t_contract$_Ownable_$7083", "typeString": "contract Ownable" } }, - "id": 1524, + "id": 1024, "nodeType": "InheritanceSpecifier", "src": "868:7:4" }, @@ -2734,44 +2835,44 @@ "arguments": null, "baseName": { "contractScope": null, - "id": 1525, + "id": 1025, "name": "MarketContractRegistryInterface", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1733, + "referencedDeclaration": 1235, "src": "877:31:4", "typeDescriptions": { - "typeIdentifier": "t_contract$_MarketContractRegistryInterface_$1733", + "typeIdentifier": "t_contract$_MarketContractRegistryInterface_$1235", "typeString": "contract MarketContractRegistryInterface" } }, - "id": 1526, + "id": 1026, "nodeType": "InheritanceSpecifier", "src": "877:31:4" } ], "contractDependencies": [ - 1733, - 4628 + 1235, + 7083 ], "contractKind": "contract", "documentation": "@title MarketContractRegistry\n @author Phil Elsasser ", "fullyImplemented": true, - "id": 1718, + "id": 1220, "linearizedBaseContracts": [ - 1718, - 1733, - 4628 + 1220, + 1235, + 7083 ], "name": "MarketContractRegistry", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, - "id": 1530, + "id": 1030, "name": "isWhiteListed", "nodeType": "VariableDeclaration", - "scope": 1718, - "src": "916:38:4", + "scope": 1220, + "src": "916:45:4", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -2779,9 +2880,9 @@ "typeString": "mapping(address => bool)" }, "typeName": { - "id": 1529, + "id": 1029, "keyType": { - "id": 1527, + "id": 1027, "name": "address", "nodeType": "ElementaryTypeName", "src": "924:7:4", @@ -2797,7 +2898,7 @@ "typeString": "mapping(address => bool)" }, "valueType": { - "id": 1528, + "id": 1028, "name": "bool", "nodeType": "ElementaryTypeName", "src": "935:4:4", @@ -2808,15 +2909,15 @@ } }, "value": null, - "visibility": "internal" + "visibility": "public" }, { "constant": false, - "id": 1533, + "id": 1033, "name": "addressWhiteList", "nodeType": "VariableDeclaration", - "scope": 1718, - "src": "960:26:4", + "scope": 1220, + "src": "967:33:4", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -2825,34 +2926,34 @@ }, "typeName": { "baseType": { - "id": 1531, + "id": 1031, "name": "address", "nodeType": "ElementaryTypeName", - "src": "960:7:4", + "src": "967:7:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "id": 1532, + "id": 1032, "length": null, "nodeType": "ArrayTypeName", - "src": "960:9:4", + "src": "967:9:4", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", "typeString": "address[]" } }, "value": null, - "visibility": "internal" + "visibility": "public" }, { "constant": false, - "id": 1537, + "id": 1037, "name": "factoryAddressWhiteList", "nodeType": "VariableDeclaration", - "scope": 1718, - "src": "1063:48:4", + "scope": 1220, + "src": "1077:55:4", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -2860,28 +2961,28 @@ "typeString": "mapping(address => bool)" }, "typeName": { - "id": 1536, + "id": 1036, "keyType": { - "id": 1534, + "id": 1034, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1071:7:4", + "src": "1085:7:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Mapping", - "src": "1063:24:4", + "src": "1077:24:4", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", "typeString": "mapping(address => bool)" }, "valueType": { - "id": 1535, + "id": 1035, "name": "bool", "nodeType": "ElementaryTypeName", - "src": "1082:4:4", + "src": "1096:4:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -2889,26 +2990,26 @@ } }, "value": null, - "visibility": "internal" + "visibility": "public" }, { "anonymous": false, "documentation": null, - "id": 1541, + "id": 1041, "name": "AddressAddedToWhitelist", "nodeType": "EventDefinition", "parameters": { - "id": 1540, + "id": 1040, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1539, + "id": 1039, "indexed": true, "name": "contractAddress", "nodeType": "VariableDeclaration", - "scope": 1541, - "src": "1202:31:4", + "scope": 1041, + "src": "1223:31:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2916,10 +3017,10 @@ "typeString": "address" }, "typeName": { - "id": 1538, + "id": 1038, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1202:7:4", + "src": "1223:7:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -2929,28 +3030,28 @@ "visibility": "internal" } ], - "src": "1201:33:4" + "src": "1222:33:4" }, - "src": "1172:63:4" + "src": "1193:63:4" }, { "anonymous": false, "documentation": null, - "id": 1545, + "id": 1045, "name": "AddressRemovedFromWhitelist", "nodeType": "EventDefinition", "parameters": { - "id": 1544, + "id": 1044, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1543, + "id": 1043, "indexed": true, "name": "contractAddress", "nodeType": "VariableDeclaration", - "scope": 1545, - "src": "1274:31:4", + "scope": 1045, + "src": "1295:31:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2958,10 +3059,10 @@ "typeString": "address" }, "typeName": { - "id": 1542, + "id": 1042, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1274:7:4", + "src": "1295:7:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -2971,28 +3072,28 @@ "visibility": "internal" } ], - "src": "1273:33:4" + "src": "1294:33:4" }, - "src": "1240:67:4" + "src": "1261:67:4" }, { "anonymous": false, "documentation": null, - "id": 1549, + "id": 1049, "name": "FactoryAddressAdded", "nodeType": "EventDefinition", "parameters": { - "id": 1548, + "id": 1048, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1547, + "id": 1047, "indexed": true, "name": "factoryAddress", "nodeType": "VariableDeclaration", - "scope": 1549, - "src": "1338:30:4", + "scope": 1049, + "src": "1359:30:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3000,10 +3101,10 @@ "typeString": "address" }, "typeName": { - "id": 1546, + "id": 1046, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1338:7:4", + "src": "1359:7:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -3013,28 +3114,28 @@ "visibility": "internal" } ], - "src": "1337:32:4" + "src": "1358:32:4" }, - "src": "1312:58:4" + "src": "1333:58:4" }, { "anonymous": false, "documentation": null, - "id": 1553, + "id": 1053, "name": "FactoryAddressRemoved", "nodeType": "EventDefinition", "parameters": { - "id": 1552, + "id": 1052, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1551, + "id": 1051, "indexed": true, "name": "factoryAddress", "nodeType": "VariableDeclaration", - "scope": 1553, - "src": "1403:30:4", + "scope": 1053, + "src": "1424:30:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3042,10 +3143,10 @@ "typeString": "address" }, "typeName": { - "id": 1550, + "id": 1050, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1403:7:4", + "src": "1424:7:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -3055,41 +3156,41 @@ "visibility": "internal" } ], - "src": "1402:32:4" + "src": "1423:32:4" }, - "src": "1375:60:4" + "src": "1396:60:4" }, { "body": { - "id": 1564, + "id": 1064, "nodeType": "Block", - "src": "1689:54:4", + "src": "1710:54:4", "statements": [ { "expression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 1560, + "id": 1060, "name": "isWhiteListed", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1530, - "src": "1706:13:4", + "referencedDeclaration": 1030, + "src": "1727:13:4", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", "typeString": "mapping(address => bool)" } }, - "id": 1562, + "id": 1062, "indexExpression": { "argumentTypes": null, - "id": 1561, + "id": 1061, "name": "contractAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1555, - "src": "1720:15:4", + "referencedDeclaration": 1055, + "src": "1741:15:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -3100,21 +3201,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "1706:30:4", + "src": "1727:30:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "functionReturnParameters": 1559, - "id": 1563, + "functionReturnParameters": 1059, + "id": 1063, "nodeType": "Return", - "src": "1699:37:4" + "src": "1720:37:4" } ] }, "documentation": "@notice determines if an address is a valid MarketContract\n @return false if the address is not white listed.", - "id": 1565, + "id": 1065, "implemented": true, "isConstructor": false, "isDeclaredConst": true, @@ -3122,16 +3223,16 @@ "name": "isAddressWhiteListed", "nodeType": "FunctionDefinition", "parameters": { - "id": 1556, + "id": 1056, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1555, + "id": 1055, "name": "contractAddress", "nodeType": "VariableDeclaration", - "scope": 1565, - "src": "1635:23:4", + "scope": 1065, + "src": "1656:23:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3139,10 +3240,10 @@ "typeString": "address" }, "typeName": { - "id": 1554, + "id": 1054, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1635:7:4", + "src": "1656:7:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -3152,20 +3253,20 @@ "visibility": "internal" } ], - "src": "1634:25:4" + "src": "1655:25:4" }, "payable": false, "returnParameters": { - "id": 1559, + "id": 1059, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1558, + "id": 1058, "name": "", "nodeType": "VariableDeclaration", - "scope": 1565, - "src": "1683:4:4", + "scope": 1065, + "src": "1704:4:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3173,10 +3274,10 @@ "typeString": "bool" }, "typeName": { - "id": 1557, + "id": 1057, "name": "bool", "nodeType": "ElementaryTypeName", - "src": "1683:4:4", + "src": "1704:4:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -3186,43 +3287,43 @@ "visibility": "internal" } ], - "src": "1682:6:4" + "src": "1703:6:4" }, - "scope": 1718, - "src": "1605:138:4", + "scope": 1220, + "src": "1626:138:4", "stateMutability": "view", - "superFunction": 1732, + "superFunction": 1234, "visibility": "external" }, { "body": { - "id": 1573, + "id": 1073, "nodeType": "Block", - "src": "1901:40:4", + "src": "1922:40:4", "statements": [ { "expression": { "argumentTypes": null, - "id": 1571, + "id": 1071, "name": "addressWhiteList", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1533, - "src": "1918:16:4", + "referencedDeclaration": 1033, + "src": "1939:16:4", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_storage", "typeString": "address[] storage ref" } }, - "functionReturnParameters": 1570, - "id": 1572, + "functionReturnParameters": 1070, + "id": 1072, "nodeType": "Return", - "src": "1911:23:4" + "src": "1932:23:4" } ] }, "documentation": "@notice all currently whitelisted addresses\n returns array of addresses", - "id": 1574, + "id": 1074, "implemented": true, "isConstructor": false, "isDeclaredConst": true, @@ -3230,23 +3331,23 @@ "name": "getAddressWhiteList", "nodeType": "FunctionDefinition", "parameters": { - "id": 1566, + "id": 1066, "nodeType": "ParameterList", "parameters": [], - "src": "1864:2:4" + "src": "1885:2:4" }, "payable": false, "returnParameters": { - "id": 1570, + "id": 1070, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1569, + "id": 1069, "name": "", "nodeType": "VariableDeclaration", - "scope": 1574, - "src": "1890:9:4", + "scope": 1074, + "src": "1911:9:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3255,19 +3356,19 @@ }, "typeName": { "baseType": { - "id": 1567, + "id": 1067, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1890:7:4", + "src": "1911:7:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "id": 1568, + "id": 1068, "length": null, "nodeType": "ArrayTypeName", - "src": "1890:9:4", + "src": "1911:9:4", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", "typeString": "address[]" @@ -3277,19 +3378,19 @@ "visibility": "internal" } ], - "src": "1889:11:4" + "src": "1910:11:4" }, - "scope": 1718, - "src": "1836:105:4", + "scope": 1220, + "src": "1857:105:4", "stateMutability": "view", "superFunction": null, "visibility": "external" }, { "body": { - "id": 1626, + "id": 1126, "nodeType": "Block", - "src": "2427:465:4", + "src": "2448:465:4", "statements": [ { "expression": { @@ -3299,26 +3400,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 1586, + "id": 1086, "name": "isWhiteListed", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1530, - "src": "2445:13:4", + "referencedDeclaration": 1030, + "src": "2466:13:4", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", "typeString": "mapping(address => bool)" } }, - "id": 1588, + "id": 1088, "indexExpression": { "argumentTypes": null, - "id": 1587, + "id": 1087, "name": "contractAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1576, - "src": "2459:15:4", + "referencedDeclaration": 1076, + "src": "2480:15:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -3329,7 +3430,7 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "2445:30:4", + "src": "2466:30:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -3343,21 +3444,21 @@ "typeString": "bool" } ], - "id": 1585, + "id": 1085, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 5196, - 5197 + 8186, + 8187 ], - "referencedDeclaration": 5196, - "src": "2437:7:4", + "referencedDeclaration": 8186, + "src": "2458:7:4", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, - "id": 1589, + "id": 1089, "isConstant": false, "isLValue": false, "isPure": false, @@ -3365,15 +3466,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "2437:39:4", + "src": "2458:39:4", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 1590, + "id": 1090, "nodeType": "ExpressionStatement", - "src": "2437:39:4" + "src": "2458:39:4" }, { "expression": { @@ -3385,7 +3486,7 @@ "typeIdentifier": "t_address", "typeString": "address" }, - "id": 1596, + "id": 1096, "isConstant": false, "isLValue": false, "isPure": false, @@ -3394,26 +3495,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 1592, + "id": 1092, "name": "addressWhiteList", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1533, - "src": "2494:16:4", + "referencedDeclaration": 1033, + "src": "2515:16:4", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_storage", "typeString": "address[] storage ref" } }, - "id": 1594, + "id": 1094, "indexExpression": { "argumentTypes": null, - "id": 1593, + "id": 1093, "name": "whiteListIndex", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1578, - "src": "2511:14:4", + "referencedDeclaration": 1078, + "src": "2532:14:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3424,7 +3525,7 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "2494:32:4", + "src": "2515:32:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -3434,18 +3535,18 @@ "operator": "==", "rightExpression": { "argumentTypes": null, - "id": 1595, + "id": 1095, "name": "contractAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1576, - "src": "2530:15:4", + "referencedDeclaration": 1076, + "src": "2551:15:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "src": "2494:51:4", + "src": "2515:51:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -3459,21 +3560,21 @@ "typeString": "bool" } ], - "id": 1591, + "id": 1091, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 5196, - 5197 + 8186, + 8187 ], - "referencedDeclaration": 5196, - "src": "2486:7:4", + "referencedDeclaration": 8186, + "src": "2507:7:4", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, - "id": 1597, + "id": 1097, "isConstant": false, "isLValue": false, "isPure": false, @@ -3481,20 +3582,20 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "2486:60:4", + "src": "2507:60:4", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 1598, + "id": 1098, "nodeType": "ExpressionStatement", - "src": "2486:60:4" + "src": "2507:60:4" }, { "expression": { "argumentTypes": null, - "id": 1603, + "id": 1103, "isConstant": false, "isLValue": false, "isPure": false, @@ -3503,26 +3604,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 1599, + "id": 1099, "name": "isWhiteListed", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1530, - "src": "2556:13:4", + "referencedDeclaration": 1030, + "src": "2577:13:4", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", "typeString": "mapping(address => bool)" } }, - "id": 1601, + "id": 1101, "indexExpression": { "argumentTypes": null, - "id": 1600, + "id": 1100, "name": "contractAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1576, - "src": "2570:15:4", + "referencedDeclaration": 1076, + "src": "2591:15:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -3533,7 +3634,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "2556:30:4", + "src": "2577:30:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -3544,14 +3645,14 @@ "rightHandSide": { "argumentTypes": null, "hexValue": "66616c7365", - "id": 1602, + "id": 1102, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", - "src": "2589:5:4", + "src": "2610:5:4", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", @@ -3559,20 +3660,20 @@ }, "value": "false" }, - "src": "2556:38:4", + "src": "2577:38:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 1604, + "id": 1104, "nodeType": "ExpressionStatement", - "src": "2556:38:4" + "src": "2577:38:4" }, { "expression": { "argumentTypes": null, - "id": 1614, + "id": 1114, "isConstant": false, "isLValue": false, "isPure": false, @@ -3581,26 +3682,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 1605, + "id": 1105, "name": "addressWhiteList", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1533, - "src": "2708:16:4", + "referencedDeclaration": 1033, + "src": "2729:16:4", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_storage", "typeString": "address[] storage ref" } }, - "id": 1607, + "id": 1107, "indexExpression": { "argumentTypes": null, - "id": 1606, + "id": 1106, "name": "whiteListIndex", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1578, - "src": "2725:14:4", + "referencedDeclaration": 1078, + "src": "2746:14:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3611,7 +3712,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "2708:32:4", + "src": "2729:32:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -3623,25 +3724,25 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 1608, + "id": 1108, "name": "addressWhiteList", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1533, - "src": "2743:16:4", + "referencedDeclaration": 1033, + "src": "2764:16:4", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_storage", "typeString": "address[] storage ref" } }, - "id": 1613, + "id": 1113, "indexExpression": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 1612, + "id": 1112, "isConstant": false, "isLValue": false, "isPure": false, @@ -3650,18 +3751,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 1609, + "id": 1109, "name": "addressWhiteList", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1533, - "src": "2760:16:4", + "referencedDeclaration": 1033, + "src": "2781:16:4", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_storage", "typeString": "address[] storage ref" } }, - "id": 1610, + "id": 1110, "isConstant": false, "isLValue": true, "isPure": false, @@ -3669,7 +3770,7 @@ "memberName": "length", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "2760:23:4", + "src": "2781:23:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3680,14 +3781,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "31", - "id": 1611, + "id": 1111, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "2786:1:4", + "src": "2807:1:4", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", @@ -3695,7 +3796,7 @@ }, "value": "1" }, - "src": "2760:27:4", + "src": "2781:27:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3706,26 +3807,26 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "2743:45:4", + "src": "2764:45:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "src": "2708:80:4", + "src": "2729:80:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "id": 1615, + "id": 1115, "nodeType": "ExpressionStatement", - "src": "2708:80:4" + "src": "2729:80:4" }, { "expression": { "argumentTypes": null, - "id": 1620, + "id": 1120, "isConstant": false, "isLValue": false, "isPure": false, @@ -3734,18 +3835,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 1616, + "id": 1116, "name": "addressWhiteList", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1533, - "src": "2798:16:4", + "referencedDeclaration": 1033, + "src": "2819:16:4", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_storage", "typeString": "address[] storage ref" } }, - "id": 1618, + "id": 1118, "isConstant": false, "isLValue": true, "isPure": false, @@ -3753,7 +3854,7 @@ "memberName": "length", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "2798:23:4", + "src": "2819:23:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3764,14 +3865,14 @@ "rightHandSide": { "argumentTypes": null, "hexValue": "31", - "id": 1619, + "id": 1119, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "2825:1:4", + "src": "2846:1:4", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", @@ -3779,15 +3880,15 @@ }, "value": "1" }, - "src": "2798:28:4", + "src": "2819:28:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 1621, + "id": 1121, "nodeType": "ExpressionStatement", - "src": "2798:28:4" + "src": "2819:28:4" }, { "eventCall": { @@ -3795,12 +3896,12 @@ "arguments": [ { "argumentTypes": null, - "id": 1623, + "id": 1123, "name": "contractAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1576, - "src": "2869:15:4", + "referencedDeclaration": 1076, + "src": "2890:15:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -3814,18 +3915,18 @@ "typeString": "address" } ], - "id": 1622, + "id": 1122, "name": "AddressRemovedFromWhitelist", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1545, - "src": "2841:27:4", + "referencedDeclaration": 1045, + "src": "2862:27:4", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", "typeString": "function (address)" } }, - "id": 1624, + "id": 1124, "isConstant": false, "isLValue": false, "isPure": false, @@ -3833,57 +3934,57 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "2841:44:4", + "src": "2862:44:4", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 1625, + "id": 1125, "nodeType": "EmitStatement", - "src": "2836:49:4" + "src": "2857:49:4" } ] }, "documentation": "@dev allows for the owner to remove a white listed contract, eventually ownership could transition to\n a decentralized smart contract of community members to vote\n @param contractAddress contract to removed from white list\n @param whiteListIndex of the contractAddress in the addressWhiteList to be removed.", - "id": 1627, + "id": 1127, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [ { "arguments": null, - "id": 1581, + "id": 1081, "modifierName": { "argumentTypes": null, - "id": 1580, + "id": 1080, "name": "onlyOwner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4602, - "src": "2398:9:4", + "referencedDeclaration": 7057, + "src": "2419:9:4", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", - "src": "2398:9:4" + "src": "2419:9:4" } ], "name": "removeContractFromWhiteList", "nodeType": "FunctionDefinition", "parameters": { - "id": 1579, + "id": 1079, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1576, + "id": 1076, "name": "contractAddress", "nodeType": "VariableDeclaration", - "scope": 1627, - "src": "2330:23:4", + "scope": 1127, + "src": "2351:23:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3891,10 +3992,10 @@ "typeString": "address" }, "typeName": { - "id": 1575, + "id": 1075, "name": "address", "nodeType": "ElementaryTypeName", - "src": "2330:7:4", + "src": "2351:7:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -3905,11 +4006,11 @@ }, { "constant": false, - "id": 1578, + "id": 1078, "name": "whiteListIndex", "nodeType": "VariableDeclaration", - "scope": 1627, - "src": "2363:19:4", + "scope": 1127, + "src": "2384:19:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3917,10 +4018,10 @@ "typeString": "uint256" }, "typeName": { - "id": 1577, + "id": 1077, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "2363:4:4", + "src": "2384:4:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3930,20 +4031,20 @@ "visibility": "internal" } ], - "src": "2320:68:4" + "src": "2341:68:4" }, "payable": false, "returnParameters": { - "id": 1584, + "id": 1084, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1583, + "id": 1083, "name": "", "nodeType": "VariableDeclaration", - "scope": 1627, - "src": "2417:4:4", + "scope": 1127, + "src": "2438:4:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3951,10 +4052,10 @@ "typeString": "bool" }, "typeName": { - "id": 1582, + "id": 1082, "name": "bool", "nodeType": "ElementaryTypeName", - "src": "2417:4:4", + "src": "2438:4:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -3964,19 +4065,19 @@ "visibility": "internal" } ], - "src": "2416:6:4" + "src": "2437:6:4" }, - "scope": 1718, - "src": "2284:608:4", + "scope": 1220, + "src": "2305:608:4", "stateMutability": "nonpayable", "superFunction": null, "visibility": "external" }, { "body": { - "id": 1667, + "id": 1168, "nodeType": "Block", - "src": "3216:284:4", + "src": "3237:324:4", "statements": [ { "expression": { @@ -3988,7 +4089,7 @@ "typeIdentifier": "t_bool", "typeString": "bool" }, - "id": 1641, + "id": 1141, "isConstant": false, "isLValue": false, "isPure": false, @@ -3999,7 +4100,7 @@ "typeIdentifier": "t_address", "typeString": "address" }, - "id": 1636, + "id": 1136, "isConstant": false, "isLValue": false, "isPure": false, @@ -4008,18 +4109,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 1633, + "id": 1133, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 5193, - "src": "3234:3:4", + "referencedDeclaration": 8183, + "src": "3255:3:4", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 1634, + "id": 1134, "isConstant": false, "isLValue": false, "isPure": false, @@ -4027,7 +4128,7 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "3234:10:4", + "src": "3255:10:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -4037,18 +4138,18 @@ "operator": "==", "rightExpression": { "argumentTypes": null, - "id": 1635, + "id": 1135, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4576, - "src": "3248:5:4", + "referencedDeclaration": 7031, + "src": "3269:5:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "src": "3234:19:4", + "src": "3255:19:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -4060,34 +4161,34 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 1637, + "id": 1137, "name": "factoryAddressWhiteList", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1537, - "src": "3257:23:4", + "referencedDeclaration": 1037, + "src": "3278:23:4", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", "typeString": "mapping(address => bool)" } }, - "id": 1640, + "id": 1140, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 1638, + "id": 1138, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 5193, - "src": "3281:3:4", + "referencedDeclaration": 8183, + "src": "3302:3:4", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 1639, + "id": 1139, "isConstant": false, "isLValue": false, "isPure": false, @@ -4095,7 +4196,7 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "3281:10:4", + "src": "3302:10:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -4106,17 +4207,35 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "3257:35:4", + "src": "3278:35:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "src": "3234:58:4", + "src": "3255:58:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } + }, + { + "argumentTypes": null, + "hexValue": "43616e206f6e6c7920626520616464656420627920666163746f72206f72206f776e6572", + "id": 1142, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3315:38:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3a684e2a41f13e4ed9bdd762e9a38288b5a5b7588ca65e5e1c0062048da2d7be", + "typeString": "literal_string \"Can only be added by factor or owner\"" + }, + "value": "Can only be added by factor or owner" } ], "expression": { @@ -4124,23 +4243,27 @@ { "typeIdentifier": "t_bool", "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3a684e2a41f13e4ed9bdd762e9a38288b5a5b7588ca65e5e1c0062048da2d7be", + "typeString": "literal_string \"Can only be added by factor or owner\"" } ], - "id": 1632, + "id": 1132, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 5196, - 5197 + 8186, + 8187 ], - "referencedDeclaration": 5196, - "src": "3226:7:4", + "referencedDeclaration": 8187, + "src": "3247:7:4", "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" } }, - "id": 1642, + "id": 1143, "isConstant": false, "isLValue": false, "isPure": false, @@ -4148,15 +4271,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3226:67:4", + "src": "3247:107:4", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 1643, + "id": 1144, "nodeType": "ExpressionStatement", - "src": "3226:67:4" + "src": "3247:107:4" }, { "expression": { @@ -4164,7 +4287,7 @@ "arguments": [ { "argumentTypes": null, - "id": 1648, + "id": 1149, "isConstant": false, "isLValue": false, "isPure": false, @@ -4172,31 +4295,31 @@ "nodeType": "UnaryOperation", "operator": "!", "prefix": true, - "src": "3311:31:4", + "src": "3372:31:4", "subExpression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 1645, + "id": 1146, "name": "isWhiteListed", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1530, - "src": "3312:13:4", + "referencedDeclaration": 1030, + "src": "3373:13:4", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", "typeString": "mapping(address => bool)" } }, - "id": 1647, + "id": 1148, "indexExpression": { "argumentTypes": null, - "id": 1646, + "id": 1147, "name": "contractAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1629, - "src": "3326:15:4", + "referencedDeclaration": 1129, + "src": "3387:15:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -4207,7 +4330,7 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "3312:30:4", + "src": "3373:30:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -4226,21 +4349,21 @@ "typeString": "bool" } ], - "id": 1644, + "id": 1145, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 5196, - 5197 + 8186, + 8187 ], - "referencedDeclaration": 5196, - "src": "3303:7:4", + "referencedDeclaration": 8186, + "src": "3364:7:4", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, - "id": 1649, + "id": 1150, "isConstant": false, "isLValue": false, "isPure": false, @@ -4248,20 +4371,20 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3303:40:4", + "src": "3364:40:4", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 1650, + "id": 1151, "nodeType": "ExpressionStatement", - "src": "3303:40:4" + "src": "3364:40:4" }, { "expression": { "argumentTypes": null, - "id": 1655, + "id": 1156, "isConstant": false, "isLValue": false, "isPure": false, @@ -4270,26 +4393,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 1651, + "id": 1152, "name": "isWhiteListed", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1530, - "src": "3353:13:4", + "referencedDeclaration": 1030, + "src": "3414:13:4", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", "typeString": "mapping(address => bool)" } }, - "id": 1653, + "id": 1154, "indexExpression": { "argumentTypes": null, - "id": 1652, + "id": 1153, "name": "contractAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1629, - "src": "3367:15:4", + "referencedDeclaration": 1129, + "src": "3428:15:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -4300,7 +4423,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "3353:30:4", + "src": "3414:30:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -4311,14 +4434,14 @@ "rightHandSide": { "argumentTypes": null, "hexValue": "74727565", - "id": 1654, + "id": 1155, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", - "src": "3386:4:4", + "src": "3447:4:4", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", @@ -4326,15 +4449,15 @@ }, "value": "true" }, - "src": "3353:37:4", + "src": "3414:37:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 1656, + "id": 1157, "nodeType": "ExpressionStatement", - "src": "3353:37:4" + "src": "3414:37:4" }, { "expression": { @@ -4342,12 +4465,12 @@ "arguments": [ { "argumentTypes": null, - "id": 1660, + "id": 1161, "name": "contractAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1629, - "src": "3422:15:4", + "referencedDeclaration": 1129, + "src": "3483:15:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -4363,18 +4486,18 @@ ], "expression": { "argumentTypes": null, - "id": 1657, + "id": 1158, "name": "addressWhiteList", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1533, - "src": "3400:16:4", + "referencedDeclaration": 1033, + "src": "3461:16:4", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_storage", "typeString": "address[] storage ref" } }, - "id": 1659, + "id": 1160, "isConstant": false, "isLValue": false, "isPure": false, @@ -4382,13 +4505,13 @@ "memberName": "push", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "3400:21:4", + "src": "3461:21:4", "typeDescriptions": { "typeIdentifier": "t_function_arraypush_nonpayable$_t_address_$returns$_t_uint256_$", "typeString": "function (address) returns (uint256)" } }, - "id": 1661, + "id": 1162, "isConstant": false, "isLValue": false, "isPure": false, @@ -4396,15 +4519,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3400:38:4", + "src": "3461:38:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 1662, + "id": 1163, "nodeType": "ExpressionStatement", - "src": "3400:38:4" + "src": "3461:38:4" }, { "eventCall": { @@ -4412,12 +4535,12 @@ "arguments": [ { "argumentTypes": null, - "id": 1664, + "id": 1165, "name": "contractAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1629, - "src": "3477:15:4", + "referencedDeclaration": 1129, + "src": "3538:15:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -4431,18 +4554,18 @@ "typeString": "address" } ], - "id": 1663, + "id": 1164, "name": "AddressAddedToWhitelist", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1541, - "src": "3453:23:4", + "referencedDeclaration": 1041, + "src": "3514:23:4", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", "typeString": "function (address)" } }, - "id": 1665, + "id": 1166, "isConstant": false, "isLValue": false, "isPure": false, @@ -4450,20 +4573,20 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3453:40:4", + "src": "3514:40:4", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 1666, + "id": 1167, "nodeType": "EmitStatement", - "src": "3448:45:4" + "src": "3509:45:4" } ] }, "documentation": "@dev allows for the owner or factory to add a white listed contract, eventually ownership could transition to\n a decentralized smart contract of community members to vote\n @param contractAddress contract to removed from white list", - "id": 1668, + "id": 1169, "implemented": true, "isConstructor": false, "isDeclaredConst": false, @@ -4471,16 +4594,16 @@ "name": "addAddressToWhiteList", "nodeType": "FunctionDefinition", "parameters": { - "id": 1630, + "id": 1130, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1629, + "id": 1129, "name": "contractAddress", "nodeType": "VariableDeclaration", - "scope": 1668, - "src": "3182:23:4", + "scope": 1169, + "src": "3203:23:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4488,10 +4611,10 @@ "typeString": "address" }, "typeName": { - "id": 1628, + "id": 1128, "name": "address", "nodeType": "ElementaryTypeName", - "src": "3182:7:4", + "src": "3203:7:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -4501,26 +4624,26 @@ "visibility": "internal" } ], - "src": "3181:25:4" + "src": "3202:25:4" }, "payable": false, "returnParameters": { - "id": 1631, + "id": 1131, "nodeType": "ParameterList", "parameters": [], - "src": "3216:0:4" + "src": "3237:0:4" }, - "scope": 1718, - "src": "3151:349:4", + "scope": 1220, + "src": "3172:389:4", "stateMutability": "nonpayable", - "superFunction": 1725, + "superFunction": 1227, "visibility": "external" }, { "body": { - "id": 1692, + "id": 1194, "nodeType": "Block", - "src": "3783:172:4", + "src": "3844:197:4", "statements": [ { "expression": { @@ -4528,7 +4651,7 @@ "arguments": [ { "argumentTypes": null, - "id": 1679, + "id": 1180, "isConstant": false, "isLValue": false, "isPure": false, @@ -4536,31 +4659,31 @@ "nodeType": "UnaryOperation", "operator": "!", "prefix": true, - "src": "3801:40:4", + "src": "3862:40:4", "subExpression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 1676, + "id": 1177, "name": "factoryAddressWhiteList", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1537, - "src": "3802:23:4", + "referencedDeclaration": 1037, + "src": "3863:23:4", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", "typeString": "mapping(address => bool)" } }, - "id": 1678, + "id": 1179, "indexExpression": { "argumentTypes": null, - "id": 1677, + "id": 1178, "name": "factoryAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1670, - "src": "3826:14:4", + "referencedDeclaration": 1171, + "src": "3887:14:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -4571,7 +4694,7 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "3802:39:4", + "src": "3863:39:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -4581,6 +4704,24 @@ "typeIdentifier": "t_bool", "typeString": "bool" } + }, + { + "argumentTypes": null, + "hexValue": "6164647265737320616c7265616479206164646564", + "id": 1181, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3904:23:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e3620bf434525f05b8f3e09ff34da1ed381a930e763623c8370675363f272af2", + "typeString": "literal_string \"address already added\"" + }, + "value": "address already added" } ], "expression": { @@ -4588,23 +4729,27 @@ { "typeIdentifier": "t_bool", "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_e3620bf434525f05b8f3e09ff34da1ed381a930e763623c8370675363f272af2", + "typeString": "literal_string \"address already added\"" } ], - "id": 1675, + "id": 1176, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 5196, - 5197 + 8186, + 8187 ], - "referencedDeclaration": 5196, - "src": "3793:7:4", + "referencedDeclaration": 8187, + "src": "3854:7:4", "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" } }, - "id": 1680, + "id": 1182, "isConstant": false, "isLValue": false, "isPure": false, @@ -4612,20 +4757,20 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3793:49:4", + "src": "3854:74:4", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 1681, + "id": 1183, "nodeType": "ExpressionStatement", - "src": "3793:49:4" + "src": "3854:74:4" }, { "expression": { "argumentTypes": null, - "id": 1686, + "id": 1188, "isConstant": false, "isLValue": false, "isPure": false, @@ -4634,26 +4779,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 1682, + "id": 1184, "name": "factoryAddressWhiteList", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1537, - "src": "3852:23:4", + "referencedDeclaration": 1037, + "src": "3938:23:4", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", "typeString": "mapping(address => bool)" } }, - "id": 1684, + "id": 1186, "indexExpression": { "argumentTypes": null, - "id": 1683, + "id": 1185, "name": "factoryAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1670, - "src": "3876:14:4", + "referencedDeclaration": 1171, + "src": "3962:14:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -4664,7 +4809,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "3852:39:4", + "src": "3938:39:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -4675,14 +4820,14 @@ "rightHandSide": { "argumentTypes": null, "hexValue": "74727565", - "id": 1685, + "id": 1187, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", - "src": "3894:4:4", + "src": "3980:4:4", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", @@ -4690,15 +4835,15 @@ }, "value": "true" }, - "src": "3852:46:4", + "src": "3938:46:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 1687, + "id": 1189, "nodeType": "ExpressionStatement", - "src": "3852:46:4" + "src": "3938:46:4" }, { "eventCall": { @@ -4706,12 +4851,12 @@ "arguments": [ { "argumentTypes": null, - "id": 1689, + "id": 1191, "name": "factoryAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1670, - "src": "3933:14:4", + "referencedDeclaration": 1171, + "src": "4019:14:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -4725,18 +4870,18 @@ "typeString": "address" } ], - "id": 1688, + "id": 1190, "name": "FactoryAddressAdded", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1549, - "src": "3913:19:4", + "referencedDeclaration": 1049, + "src": "3999:19:4", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", "typeString": "function (address)" } }, - "id": 1690, + "id": 1192, "isConstant": false, "isLValue": false, "isPure": false, @@ -4744,57 +4889,57 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3913:35:4", + "src": "3999:35:4", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 1691, + "id": 1193, "nodeType": "EmitStatement", - "src": "3908:40:4" + "src": "3994:40:4" } ] }, "documentation": "@dev allows for the owner to add a new address of a factory responsible for creating new market contracts\n @param factoryAddress address of factory to be allowed to add contracts to whitelist", - "id": 1693, + "id": 1195, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [ { "arguments": null, - "id": 1673, + "id": 1174, "modifierName": { "argumentTypes": null, - "id": 1672, + "id": 1173, "name": "onlyOwner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4602, - "src": "3773:9:4", + "referencedDeclaration": 7057, + "src": "3834:9:4", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", - "src": "3773:9:4" + "src": "3834:9:4" } ], "name": "addFactoryAddress", "nodeType": "FunctionDefinition", "parameters": { - "id": 1671, + "id": 1172, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1670, + "id": 1171, "name": "factoryAddress", "nodeType": "VariableDeclaration", - "scope": 1693, - "src": "3740:22:4", + "scope": 1195, + "src": "3801:22:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4802,10 +4947,10 @@ "typeString": "address" }, "typeName": { - "id": 1669, + "id": 1170, "name": "address", "nodeType": "ElementaryTypeName", - "src": "3740:7:4", + "src": "3801:7:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -4815,26 +4960,26 @@ "visibility": "internal" } ], - "src": "3739:24:4" + "src": "3800:24:4" }, "payable": false, "returnParameters": { - "id": 1674, + "id": 1175, "nodeType": "ParameterList", "parameters": [], - "src": "3783:0:4" + "src": "3844:0:4" }, - "scope": 1718, - "src": "3713:242:4", + "scope": 1220, + "src": "3774:267:4", "stateMutability": "nonpayable", "superFunction": null, "visibility": "external" }, { "body": { - "id": 1716, + "id": 1218, "nodeType": "Block", - "src": "4165:174:4", + "src": "4251:174:4", "statements": [ { "expression": { @@ -4844,26 +4989,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 1701, + "id": 1203, "name": "factoryAddressWhiteList", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1537, - "src": "4183:23:4", + "referencedDeclaration": 1037, + "src": "4269:23:4", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", "typeString": "mapping(address => bool)" } }, - "id": 1703, + "id": 1205, "indexExpression": { "argumentTypes": null, - "id": 1702, + "id": 1204, "name": "factoryAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1695, - "src": "4207:14:4", + "referencedDeclaration": 1197, + "src": "4293:14:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -4874,7 +5019,7 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "4183:39:4", + "src": "4269:39:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -4888,21 +5033,21 @@ "typeString": "bool" } ], - "id": 1700, + "id": 1202, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 5196, - 5197 + 8186, + 8187 ], - "referencedDeclaration": 5196, - "src": "4175:7:4", + "referencedDeclaration": 8186, + "src": "4261:7:4", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, - "id": 1704, + "id": 1206, "isConstant": false, "isLValue": false, "isPure": false, @@ -4910,20 +5055,20 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "4175:48:4", + "src": "4261:48:4", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 1705, + "id": 1207, "nodeType": "ExpressionStatement", - "src": "4175:48:4" + "src": "4261:48:4" }, { "expression": { "argumentTypes": null, - "id": 1710, + "id": 1212, "isConstant": false, "isLValue": false, "isPure": false, @@ -4932,26 +5077,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 1706, + "id": 1208, "name": "factoryAddressWhiteList", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1537, - "src": "4233:23:4", + "referencedDeclaration": 1037, + "src": "4319:23:4", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", "typeString": "mapping(address => bool)" } }, - "id": 1708, + "id": 1210, "indexExpression": { "argumentTypes": null, - "id": 1707, + "id": 1209, "name": "factoryAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1695, - "src": "4257:14:4", + "referencedDeclaration": 1197, + "src": "4343:14:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -4962,7 +5107,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "4233:39:4", + "src": "4319:39:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -4973,14 +5118,14 @@ "rightHandSide": { "argumentTypes": null, "hexValue": "66616c7365", - "id": 1709, + "id": 1211, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", - "src": "4275:5:4", + "src": "4361:5:4", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", @@ -4988,15 +5133,15 @@ }, "value": "false" }, - "src": "4233:47:4", + "src": "4319:47:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 1711, + "id": 1213, "nodeType": "ExpressionStatement", - "src": "4233:47:4" + "src": "4319:47:4" }, { "eventCall": { @@ -5004,12 +5149,12 @@ "arguments": [ { "argumentTypes": null, - "id": 1713, + "id": 1215, "name": "factoryAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1695, - "src": "4317:14:4", + "referencedDeclaration": 1197, + "src": "4403:14:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -5023,18 +5168,18 @@ "typeString": "address" } ], - "id": 1712, + "id": 1214, "name": "FactoryAddressRemoved", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1553, - "src": "4295:21:4", + "referencedDeclaration": 1053, + "src": "4381:21:4", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", "typeString": "function (address)" } }, - "id": 1714, + "id": 1216, "isConstant": false, "isLValue": false, "isPure": false, @@ -5042,57 +5187,57 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "4295:37:4", + "src": "4381:37:4", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 1715, + "id": 1217, "nodeType": "EmitStatement", - "src": "4290:42:4" + "src": "4376:42:4" } ] }, "documentation": "@dev allows for the owner to remove an address of a factory\n @param factoryAddress address of factory to be removed", - "id": 1717, + "id": 1219, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [ { "arguments": null, - "id": 1698, + "id": 1200, "modifierName": { "argumentTypes": null, - "id": 1697, + "id": 1199, "name": "onlyOwner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4602, - "src": "4155:9:4", + "referencedDeclaration": 7057, + "src": "4241:9:4", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", - "src": "4155:9:4" + "src": "4241:9:4" } ], "name": "removeFactoryAddress", "nodeType": "FunctionDefinition", "parameters": { - "id": 1696, + "id": 1198, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1695, + "id": 1197, "name": "factoryAddress", "nodeType": "VariableDeclaration", - "scope": 1717, - "src": "4122:22:4", + "scope": 1219, + "src": "4208:22:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5100,10 +5245,10 @@ "typeString": "address" }, "typeName": { - "id": 1694, + "id": 1196, "name": "address", "nodeType": "ElementaryTypeName", - "src": "4122:7:4", + "src": "4208:7:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -5113,27 +5258,27 @@ "visibility": "internal" } ], - "src": "4121:24:4" + "src": "4207:24:4" }, "payable": false, "returnParameters": { - "id": 1699, + "id": 1201, "nodeType": "ParameterList", "parameters": [], - "src": "4165:0:4" + "src": "4251:0:4" }, - "scope": 1718, - "src": "4092:247:4", + "scope": 1220, + "src": "4178:247:4", "stateMutability": "nonpayable", "superFunction": null, "visibility": "external" } ], - "scope": 1719, - "src": "833:3508:4" + "scope": 1221, + "src": "833:3594:4" } ], - "src": "608:3734:4" + "src": "608:3820:4" }, "compiler": { "name": "solc", @@ -5209,10 +5354,10 @@ } }, "links": {}, - "address": "0xa1649f72ae719b5b4d5ba4829fd1d1aeaadee1f3", - "transactionHash": "0x16aa6d65e7adfce570048183586f9abecf963e30a3846568cf851f6805fba26d" + "address": "0x103440493487648cc2412871cca9e011240588fa", + "transactionHash": "0x4a692ff6b7c636a669ebb03835fd1afca8ba9c177a105a7152473accb81127e6" } }, "schemaVersion": "2.0.1", - "updatedAt": "2018-10-05T14:03:26.632Z" + "updatedAt": "2018-10-16T03:15:00.650Z" } \ No newline at end of file diff --git a/build/contracts/MarketToken.json b/build/contracts/MarketToken.json index b99b33b..64c2b7d 100644 --- a/build/contracts/MarketToken.json +++ b/build/contracts/MarketToken.json @@ -625,24 +625,24 @@ "type": "function" } ], - "bytecode": "0x608060405234801561001057600080fd5b5060405160408061253d8339810180604052810190808051906020019092919080519060200190929190505050336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508160068190555080600781905550601260ff16600a0a6323c3460002600281905550601260ff16600a0a6323c3460002600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505061243c806101016000396000f30060806040526004361061016a576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde031461016f578063095ea7b3146101ff57806318160ddd1461026457806323b872dd1461028f5780632ff2e9dc14610314578063313ce5671461033f5780633cad7c4e1461037057806340fc5e7a1461039d57806342966c68146103f457806345977d03146104215780634f1e43341461044e578063661884631461047b5780636e8c57e6146104e057806370a082311461050b5780637e3475a814610562578063802049ac1461058d57806384281dcc146105d05780638da5cb5b1461062b57806395d89b41146106825780639d564d9a14610712578063a9059cbb1461075f578063aafd775e146107c4578063c752ff621461083b578063cfab472f14610866578063d229a94a146108e1578063d73dd6231461092e578063dd62ed3e14610993578063f2fde38b14610a0a575b600080fd5b34801561017b57600080fd5b50610184610a4d565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101c45780820151818401526020810190506101a9565b50505050905090810190601f1680156101f15780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561020b57600080fd5b5061024a600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610a86565b604051808215151515815260200191505060405180910390f35b34801561027057600080fd5b50610279610b78565b6040518082815260200191505060405180910390f35b34801561029b57600080fd5b506102fa600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b82565b604051808215151515815260200191505060405180910390f35b34801561032057600080fd5b50610329610f41565b6040518082815260200191505060405180910390f35b34801561034b57600080fd5b50610354610f52565b604051808260ff1660ff16815260200191505060405180910390f35b34801561037c57600080fd5b5061039b60048036038101908080359060200190929190505050610f57565b005b3480156103a957600080fd5b506103b2610fbc565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561040057600080fd5b5061041f60048036038101908080359060200190929190505050610fe2565b005b34801561042d57600080fd5b5061044c60048036038101908080359060200190929190505050610fef565b005b34801561045a57600080fd5b50610479600480360381019080803590602001909291905050506111d8565b005b34801561048757600080fd5b506104c6600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061123d565b604051808215151515815260200191505060405180910390f35b3480156104ec57600080fd5b506104f56114ce565b6040518082815260200191505060405180910390f35b34801561051757600080fd5b5061054c600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506114d4565b6040518082815260200191505060405180910390f35b34801561056e57600080fd5b5061057761151d565b6040518082815260200191505060405180910390f35b34801561059957600080fd5b506105ce600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611523565b005b3480156105dc57600080fd5b50610611600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506115c2565b604051808215151515815260200191505060405180910390f35b34801561063757600080fd5b50610640611610565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561068e57600080fd5b50610697611635565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156106d75780820151818401526020810190506106bc565b50505050905090810190601f1680156107045780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561071e57600080fd5b5061075d600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061166e565b005b34801561076b57600080fd5b506107aa600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506117f5565b604051808215151515815260200191505060405180910390f35b3480156107d057600080fd5b50610825600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611a19565b6040518082815260200191505060405180910390f35b34801561084757600080fd5b50610850611aa0565b6040518082815260200191505060405180910390f35b34801561087257600080fd5b506108c7600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611aa6565b604051808215151515815260200191505060405180910390f35b3480156108ed57600080fd5b5061092c600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611b32565b005b34801561093a57600080fd5b50610979600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611cbb565b604051808215151515815260200191505060405180910390f35b34801561099f57600080fd5b506109f4600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611eb7565b6040518082815260200191505060405180910390f35b348015610a1657600080fd5b50610a4b600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611f3e565b005b6040805190810160405280601581526020017f4d41524b45542050726f746f636f6c20546f6b656e000000000000000000000081525081565b600081600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b6000600254905090565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614151515610bbf57600080fd5b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211151515610c0d57600080fd5b600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211151515610c9857600080fd5b610cea82600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461209390919063ffffffff16565b600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610d7f82600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546120ac90919063ffffffff16565b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610e5182600360008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461209390919063ffffffff16565b600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b601260ff16600a0a6323c346000281565b601281565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610fb257600080fd5b8060068190555050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610fec33826120c8565b50565b600073ffffffffffffffffffffffffffffffffffffffff16600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415151561104d57600080fd5b61105681610fe2565b61106b816005546120ac90919063ffffffff16565b600581905550600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663753e88e533836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b15801561113657600080fd5b505af115801561114a573d6000803e3d6000fd5b50505050600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fa6eb8a5f37ca5f03caebe01d969f49f93dd089e57d04580ba05974548fd44e77836040518082815260200191505060405180910390a350565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561123357600080fd5b8060078190555050565b600080600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490508083111561134e576000600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506113e2565b611361838261209390919063ffffffff16565b600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a3600191505092915050565b60075481565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60065481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561157e57600080fd5b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000600754600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410159050919050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6040805190810160405280600381526020017f4d4b54000000000000000000000000000000000000000000000000000000000081525081565b60006116ff82600860008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461209390919063ffffffff16565b905080600860008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061178b8261227e565b3373ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f5893bf91422655305d16e66cf1b6ecd4645b071f6904767d5d79bd91556e3fcf836040518082815260200191505060405180910390a3505050565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415151561183257600080fd5b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115151561188057600080fd5b6118d282600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461209390919063ffffffff16565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061196782600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546120ac90919063ffffffff16565b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b6000600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60055481565b6000600654600860008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015905092915050565b6000611bc382600860008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546120ac90919063ffffffff16565b9050611bcf30836117f5565b5080600860008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055503373ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f5893bf91422655305d16e66cf1b6ecd4645b071f6904767d5d79bd91556e3fcf836040518082815260200191505060405180910390a3505050565b6000611d4c82600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546120ac90919063ffffffff16565b600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611f9957600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515611fd557600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008282111515156120a157fe5b818303905092915050565b600081830190508281101515156120bf57fe5b80905092915050565b600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054811115151561211657600080fd5b61216881600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461209390919063ffffffff16565b600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506121c08160025461209390919063ffffffff16565b6002819055508173ffffffffffffffffffffffffffffffffffffffff167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5826040518082815260200191505060405180910390a2600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b6122d081600160003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461209390919063ffffffff16565b600160003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061236581600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546120ac90919063ffffffff16565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055503373ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505600a165627a7a72305820dbd051ef0462b40d7e944b862d249908b3d5d804e7662dc4c3afc64a89f230fe0029", - "deployedBytecode": "0x60806040526004361061016a576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde031461016f578063095ea7b3146101ff57806318160ddd1461026457806323b872dd1461028f5780632ff2e9dc14610314578063313ce5671461033f5780633cad7c4e1461037057806340fc5e7a1461039d57806342966c68146103f457806345977d03146104215780634f1e43341461044e578063661884631461047b5780636e8c57e6146104e057806370a082311461050b5780637e3475a814610562578063802049ac1461058d57806384281dcc146105d05780638da5cb5b1461062b57806395d89b41146106825780639d564d9a14610712578063a9059cbb1461075f578063aafd775e146107c4578063c752ff621461083b578063cfab472f14610866578063d229a94a146108e1578063d73dd6231461092e578063dd62ed3e14610993578063f2fde38b14610a0a575b600080fd5b34801561017b57600080fd5b50610184610a4d565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101c45780820151818401526020810190506101a9565b50505050905090810190601f1680156101f15780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561020b57600080fd5b5061024a600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610a86565b604051808215151515815260200191505060405180910390f35b34801561027057600080fd5b50610279610b78565b6040518082815260200191505060405180910390f35b34801561029b57600080fd5b506102fa600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b82565b604051808215151515815260200191505060405180910390f35b34801561032057600080fd5b50610329610f41565b6040518082815260200191505060405180910390f35b34801561034b57600080fd5b50610354610f52565b604051808260ff1660ff16815260200191505060405180910390f35b34801561037c57600080fd5b5061039b60048036038101908080359060200190929190505050610f57565b005b3480156103a957600080fd5b506103b2610fbc565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561040057600080fd5b5061041f60048036038101908080359060200190929190505050610fe2565b005b34801561042d57600080fd5b5061044c60048036038101908080359060200190929190505050610fef565b005b34801561045a57600080fd5b50610479600480360381019080803590602001909291905050506111d8565b005b34801561048757600080fd5b506104c6600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061123d565b604051808215151515815260200191505060405180910390f35b3480156104ec57600080fd5b506104f56114ce565b6040518082815260200191505060405180910390f35b34801561051757600080fd5b5061054c600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506114d4565b6040518082815260200191505060405180910390f35b34801561056e57600080fd5b5061057761151d565b6040518082815260200191505060405180910390f35b34801561059957600080fd5b506105ce600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611523565b005b3480156105dc57600080fd5b50610611600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506115c2565b604051808215151515815260200191505060405180910390f35b34801561063757600080fd5b50610640611610565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561068e57600080fd5b50610697611635565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156106d75780820151818401526020810190506106bc565b50505050905090810190601f1680156107045780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561071e57600080fd5b5061075d600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061166e565b005b34801561076b57600080fd5b506107aa600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506117f5565b604051808215151515815260200191505060405180910390f35b3480156107d057600080fd5b50610825600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611a19565b6040518082815260200191505060405180910390f35b34801561084757600080fd5b50610850611aa0565b6040518082815260200191505060405180910390f35b34801561087257600080fd5b506108c7600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611aa6565b604051808215151515815260200191505060405180910390f35b3480156108ed57600080fd5b5061092c600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611b32565b005b34801561093a57600080fd5b50610979600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611cbb565b604051808215151515815260200191505060405180910390f35b34801561099f57600080fd5b506109f4600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611eb7565b6040518082815260200191505060405180910390f35b348015610a1657600080fd5b50610a4b600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611f3e565b005b6040805190810160405280601581526020017f4d41524b45542050726f746f636f6c20546f6b656e000000000000000000000081525081565b600081600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b6000600254905090565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614151515610bbf57600080fd5b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211151515610c0d57600080fd5b600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211151515610c9857600080fd5b610cea82600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461209390919063ffffffff16565b600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610d7f82600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546120ac90919063ffffffff16565b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610e5182600360008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461209390919063ffffffff16565b600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b601260ff16600a0a6323c346000281565b601281565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610fb257600080fd5b8060068190555050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610fec33826120c8565b50565b600073ffffffffffffffffffffffffffffffffffffffff16600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415151561104d57600080fd5b61105681610fe2565b61106b816005546120ac90919063ffffffff16565b600581905550600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663753e88e533836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b15801561113657600080fd5b505af115801561114a573d6000803e3d6000fd5b50505050600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fa6eb8a5f37ca5f03caebe01d969f49f93dd089e57d04580ba05974548fd44e77836040518082815260200191505060405180910390a350565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561123357600080fd5b8060078190555050565b600080600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490508083111561134e576000600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506113e2565b611361838261209390919063ffffffff16565b600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a3600191505092915050565b60075481565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60065481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561157e57600080fd5b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000600754600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410159050919050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6040805190810160405280600381526020017f4d4b54000000000000000000000000000000000000000000000000000000000081525081565b60006116ff82600860008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461209390919063ffffffff16565b905080600860008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061178b8261227e565b3373ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f5893bf91422655305d16e66cf1b6ecd4645b071f6904767d5d79bd91556e3fcf836040518082815260200191505060405180910390a3505050565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415151561183257600080fd5b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115151561188057600080fd5b6118d282600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461209390919063ffffffff16565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061196782600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546120ac90919063ffffffff16565b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b6000600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60055481565b6000600654600860008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015905092915050565b6000611bc382600860008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546120ac90919063ffffffff16565b9050611bcf30836117f5565b5080600860008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055503373ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f5893bf91422655305d16e66cf1b6ecd4645b071f6904767d5d79bd91556e3fcf836040518082815260200191505060405180910390a3505050565b6000611d4c82600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546120ac90919063ffffffff16565b600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611f9957600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515611fd557600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008282111515156120a157fe5b818303905092915050565b600081830190508281101515156120bf57fe5b80905092915050565b600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054811115151561211657600080fd5b61216881600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461209390919063ffffffff16565b600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506121c08160025461209390919063ffffffff16565b6002819055508173ffffffffffffffffffffffffffffffffffffffff167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5826040518082815260200191505060405180910390a2600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b6122d081600160003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461209390919063ffffffff16565b600160003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061236581600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546120ac90919063ffffffff16565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055503373ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505600a165627a7a72305820dbd051ef0462b40d7e944b862d249908b3d5d804e7662dc4c3afc64a89f230fe0029", - "sourceMap": "927:5128:20:-;;;1536:400;8:9:-1;5:2;;;30:1;27;20:12;5:2;1536:400:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;509:10:25;501:5;;:18;;;;;;;;;;;;;;;;;;1643:19:20;1619:21;:43;;;;1708:21;1672:33;:57;;;;1110:2;1173:14;;1169:2;:18;1157:9;:30;1739:12;:29;;;;1110:2;1173:14;;1169:2;:18;1157:9;:30;1850:8;:20;1859:10;1850:20;;;;;;;;;;;;;;;:37;;;;1536:400;;927:5128;;;;;;", - "deployedSourceMap": "927:5128:20:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;975:53;;8:9:-1;5:2;;;30:1;27;20:12;5:2;975:53:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;975:53:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1803:188:31;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1803:188:31;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;371:83:26;;8:9:-1;5:2;;;30:1;27;20:12;5:2;371:83:26;;;;;;;;;;;;;;;;;;;;;;;736:444:31;;8:9:-1;5:2;;;30:1;27;20:12;5:2;736:444:31;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1119:68:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1119:68:20;;;;;;;;;;;;;;;;;;;;;;;1077:35;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1077:35:20;;;;;;;;;;;;;;;;;;;;;;;;;;;5180:119;;8:9:-1;5:2;;;30:1;27;20:12;5:2;5180:119:20;;;;;;;;;;;;;;;;;;;;;;;;;;1189:32:21;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1189:32:21;;;;;;;;;;;;;;;;;;;;;;;;;;;353:73:27;;8:9:-1;5:2;;;30:1;27;20:12;5:2;353:73:27;;;;;;;;;;;;;;;;;;;;;;;;;;1624:363:21;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1624:363:21;;;;;;;;;;;;;;;;;;;;;;;;;;5477:141:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;5477:141:20;;;;;;;;;;;;;;;;;;;;;;;;;;3617:403:31;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3617:403:31;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1280:45:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1280:45:20;;;;;;;;;;;;;;;;;;;;;;;1131:99:26;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1131:99:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1241:33:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1241:33:20;;;;;;;;;;;;;;;;;;;;;;;2125:124:21;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2125:124:21;;;;;;;;;;;;;;;;;;;;;;;;;;;;2754:180:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2754:180:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;238:20:25;;8:9:-1;5:2;;;30:1;27;20:12;5:2;238:20:25;;;;;;;;;;;;;;;;;;;;;;;;;;;1034:37:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1034:37:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;1034:37:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3853:617;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3853:617:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;608:321:26;;8:9:-1;5:2;;;30:1;27;20:12;5:2;608:321:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4721:213:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4721:213:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1270:28:21;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1270:28:21;;;;;;;;;;;;;;;;;;;;;;;2298:239:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2298:239:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3151:476;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3151:476:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2893:262:31;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2893:262:31;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2310:126;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2310:126:31;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;832:174:25;;8:9:-1;5:2;;;30:1;27;20:12;5:2;832:174:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;975:53:20;;;;;;;;;;;;;;;;;;;;:::o;1803:188:31:-;1870:4;1914:6;1882:7;:19;1890:10;1882:19;;;;;;;;;;;;;;;:29;1902:8;1882:29;;;;;;;;;;;;;;;:38;;;;1952:8;1931:38;;1940:10;1931:38;;;1962:6;1931:38;;;;;;;;;;;;;;;;;;1982:4;1975:11;;1803:188;;;;:::o;371:83:26:-;415:7;437:12;;430:19;;371:83;:::o;736:444:31:-;818:4;853:1;838:17;;:3;:17;;;;830:26;;;;;;;;880:8;:15;889:5;880:15;;;;;;;;;;;;;;;;870:6;:25;;862:34;;;;;;;;920:7;:14;928:5;920:14;;;;;;;;;;;;;;;:26;935:10;920:26;;;;;;;;;;;;;;;;910:6;:36;;902:45;;;;;;;;972:27;992:6;972:8;:15;981:5;972:15;;;;;;;;;;;;;;;;:19;;:27;;;;:::i;:::-;954:8;:15;963:5;954:15;;;;;;;;;;;;;;;:45;;;;1021:25;1039:6;1021:8;:13;1030:3;1021:13;;;;;;;;;;;;;;;;:17;;:25;;;;:::i;:::-;1005:8;:13;1014:3;1005:13;;;;;;;;;;;;;;;:41;;;;1081:38;1112:6;1081:7;:14;1089:5;1081:14;;;;;;;;;;;;;;;:26;1096:10;1081:26;;;;;;;;;;;;;;;;:30;;:38;;;;:::i;:::-;1052:7;:14;1060:5;1052:14;;;;;;;;;;;;;;;:26;1067:10;1052:26;;;;;;;;;;;;;;;:67;;;;1146:3;1130:28;;1139:5;1130:28;;;1151:6;1130:28;;;;;;;;;;;;;;;;;;1171:4;1164:11;;736:444;;;;;:::o;1119:68:20:-;1110:2;1173:14;;1169:2;:18;1157:9;:30;1119:68;:::o;1077:35::-;1110:2;1077:35;:::o;5180:119::-;653:5:25;;;;;;;;;;;639:19;;:10;:19;;;631:28;;;;;;;;5283:9:20;5259:21;:33;;;;5180:119;:::o;1189:32:21:-;;;;;;;;;;;;;:::o;353:73:27:-;396:25;402:10;414:6;396:5;:25::i;:::-;353:73;:::o;1624:363:21:-;1712:1;1683:31;;:17;;;;;;;;;;;:31;;;;1675:40;;;;;;;;1726:11;1731:5;1726:4;:11::i;:::-;1817:24;1835:5;1817:13;;:17;;:24;;;;:::i;:::-;1801:13;:40;;;;1870:17;;;;;;;;;;;1852:48;;;1901:10;1913:5;1852:67;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1852:67:21;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1852:67:21;;;;1955:17;;;;;;;;;;;1934:46;;1943:10;1934:46;;;1974:5;1934:46;;;;;;;;;;;;;;;;;;1624:363;:::o;5477:141:20:-;653:5:25;;;;;;;;;;;639:19;;:10;:19;;;631:28;;;;;;;;5601:10:20;5565:33;:46;;;;5477:141;:::o;3617:403:31:-;3700:4;3712:13;3728:7;:19;3736:10;3728:19;;;;;;;;;;;;;;;:29;3748:8;3728:29;;;;;;;;;;;;;;;;3712:45;;3786:8;3767:16;:27;3763:164;;;3836:1;3804:7;:19;3812:10;3804:19;;;;;;;;;;;;;;;:29;3824:8;3804:29;;;;;;;;;;;;;;;:33;;;;3763:164;;;3890:30;3903:16;3890:8;:12;;:30;;;;:::i;:::-;3858:7;:19;3866:10;3858:19;;;;;;;;;;;;;;;:29;3878:8;3858:29;;;;;;;;;;;;;;;:62;;;;3763:164;3958:8;3937:61;;3946:10;3937:61;;;3968:7;:19;3976:10;3968:19;;;;;;;;;;;;;;;:29;3988:8;3968:29;;;;;;;;;;;;;;;;3937:61;;;;;;;;;;;;;;;;;;4011:4;4004:11;;3617:403;;;;;:::o;1280:45:20:-;;;;:::o;1131:99:26:-;1187:7;1209:8;:16;1218:6;1209:16;;;;;;;;;;;;;;;;1202:23;;1131:99;;;:::o;1241:33:20:-;;;;:::o;2125:124:21:-;653:5:25;;;;;;;;;;;639:19;;:10;:19;;;631:28;;;;;;;;2228:14:21;2208:17;;:34;;;;;;;;;;;;;;;;;;2125:124;:::o;2754:180:20:-;2846:4;2894:33;;2869:8;:21;2878:11;2869:21;;;;;;;;;;;;;;;;:58;;2862:65;;2754:180;;;:::o;238:20:25:-;;;;;;;;;;;;;:::o;1034:37:20:-;;;;;;;;;;;;;;;;;;;;:::o;3853:617::-;3943:26;3972:113;4064:11;3972:39;:62;4012:21;3972:62;;;;;;;;;;;;;;;:74;4035:10;3972:74;;;;;;;;;;;;;;;;:78;;:113;;;;:::i;:::-;3943:142;;4298:18;4221:39;:62;4261:21;4221:62;;;;;;;;;;;;;;;:74;4284:10;4221:74;;;;;;;;;;;;;;;:95;;;;4326:43;4357:11;4326:30;:43::i;:::-;4432:10;4384:79;;4409:21;4384:79;;;4444:18;4384:79;;;;;;;;;;;;;;;;;;3853:617;;;:::o;608:321:26:-;671:4;706:1;691:17;;:3;:17;;;;683:26;;;;;;;;733:8;:20;742:10;733:20;;;;;;;;;;;;;;;;723:6;:30;;715:39;;;;;;;;784:32;809:6;784:8;:20;793:10;784:20;;;;;;;;;;;;;;;;:24;;:32;;;;:::i;:::-;761:8;:20;770:10;761:20;;;;;;;;;;;;;;;:55;;;;838:25;856:6;838:8;:13;847:3;838:13;;;;;;;;;;;;;;;;:17;;:25;;;;:::i;:::-;822:8;:13;831:3;822:13;;;;;;;;;;;;;;;:41;;;;895:3;874:33;;883:10;874:33;;;900:6;874:33;;;;;;;;;;;;;;;;;;920:4;913:11;;608:321;;;;:::o;4721:213:20:-;4829:4;4852:39;:62;4892:21;4852:62;;;;;;;;;;;;;;;:75;4915:11;4852:75;;;;;;;;;;;;;;;;4845:82;;4721:213;;;;:::o;1270:28:21:-;;;;:::o;2298:239:20:-;2407:4;2509:21;;2430:39;:62;2470:21;2430:62;;;;;;;;;;;;;;;:75;2493:11;2430:75;;;;;;;;;;;;;;;;:100;;2423:107;;2298:239;;;;:::o;3151:476::-;3261:21;3285:111;3377:9;3285:39;:62;3325:21;3285:62;;;;;;;;;;;;;;;:74;3348:10;3285:74;;;;;;;;;;;;;;;;:78;;:111;;;;:::i;:::-;3261:135;;3406:25;3415:4;3421:9;3406:8;:25::i;:::-;;3518:13;3441:39;:62;3481:21;3441:62;;;;;;;;;;;;;;;:74;3504:10;3441:74;;;;;;;;;;;;;;;:90;;;;3594:10;3546:74;;3571:21;3546:74;;;3606:13;3546:74;;;;;;;;;;;;;;;;;;3151:476;;;:::o;2893:262:31:-;2971:4;3015:46;3049:11;3015:7;:19;3023:10;3015:19;;;;;;;;;;;;;;;:29;3035:8;3015:29;;;;;;;;;;;;;;;;:33;;:46;;;;:::i;:::-;2983:7;:19;2991:10;2983:19;;;;;;;;;;;;;;;:29;3003:8;2983:29;;;;;;;;;;;;;;;:78;;;;3093:8;3072:61;;3081:10;3072:61;;;3103:7;:19;3111:10;3103:19;;;;;;;;;;;;;;;:29;3123:8;3103:29;;;;;;;;;;;;;;;;3072:61;;;;;;;;;;;;;;;;;;3146:4;3139:11;;2893:262;;;;:::o;2310:126::-;2384:7;2406;:15;2414:6;2406:15;;;;;;;;;;;;;;;:25;2422:8;2406:25;;;;;;;;;;;;;;;;2399:32;;2310:126;;;;:::o;832:174:25:-;653:5;;;;;;;;;;;639:19;;:10;:19;;;631:28;;;;;;;;928:1;908:22;;:8;:22;;;;900:31;;;;;;;;970:8;942:37;;963:5;;;;;;;;;;;942:37;;;;;;;;;;;;993:8;985:5;;:16;;;;;;;;;;;;;;;;;;832:174;:::o;836:110:24:-;894:7;921:1;916;:6;;909:14;;;;;;940:1;936;:5;929:12;;836:110;;;;:::o;1008:123::-;1066:9;1091:1;1087;:5;1083:9;;1110:1;1105;:6;;1098:14;;;;;;1125:1;1118:8;;1008:123;;;;:::o;430:438:27:-;508:8;:14;517:4;508:14;;;;;;;;;;;;;;;;498:6;:24;;490:33;;;;;;;;718:26;737:6;718:8;:14;727:4;718:14;;;;;;;;;;;;;;;;:18;;:26;;;;:::i;:::-;701:8;:14;710:4;701:14;;;;;;;;;;;;;;;:43;;;;765:24;782:6;765:12;;:16;;:24;;;;:::i;:::-;750:12;:39;;;;805:4;800:18;;;811:6;800:18;;;;;;;;;;;;;;;;;;852:1;829:34;;838:4;829:34;;;856:6;829:34;;;;;;;;;;;;;;;;;;430:438;;:::o;5798:255:20:-;5891:31;5910:11;5891:8;:14;5900:4;5891:14;;;;;;;;;;;;;;;;:18;;:31;;;;:::i;:::-;5874:8;:14;5883:4;5874:14;;;;;;;;;;;;;;;:48;;;;5955:37;5980:11;5955:8;:20;5964:10;5955:20;;;;;;;;;;;;;;;;:24;;:37;;;;:::i;:::-;5932:8;:20;5941:10;5932:20;;;;;;;;;;;;;;;:60;;;;6022:10;6007:39;;6016:4;6007:39;;;6034:11;6007:39;;;;;;;;;;;;;;;;;;5798:255;:::o", - "source": "/*\n Copyright 2017-2018 Phillip A. Elsasser\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n*/\n\npragma solidity ^0.4.24;\n\nimport \"./UpgradableToken.sol\";\n\n\n/// @title Market Token\n/// @notice Our membership token. Users must lock tokens to enable trading for a given Market Contract\n/// as well as have a minimum balance of tokens to create new Market Contracts.\n/// @author Phil Elsasser \ncontract MarketToken is UpgradeableToken {\n\n string public constant name = \"MARKET Protocol Token\";\n string public constant symbol = \"MKT\";\n uint8 public constant decimals = 18;\n\n uint public constant INITIAL_SUPPLY = 600000000 * 10**uint(decimals); // 600 million tokens with 18 decimals (6e+26)\n\n uint public lockQtyToAllowTrading;\n uint public minBalanceToAllowContractCreation;\n\n mapping(address => mapping(address => uint)) contractAddressToUserAddressToQtyLocked;\n\n event UpdatedUserLockedBalance(address indexed contractAddress, address indexed userAddress, uint balance);\n\n constructor(uint qtyToLockForTrading, uint minBalanceForCreation) public {\n lockQtyToAllowTrading = qtyToLockForTrading;\n minBalanceToAllowContractCreation = minBalanceForCreation;\n totalSupply_ = INITIAL_SUPPLY; //note totalSupply_ and INITIAL_SUPPLY may vary as token's are burnt.\n\n balances[msg.sender] = INITIAL_SUPPLY; // for now allocate all tokens to creator\n }\n\n /*\n // EXTERNAL METHODS\n */\n\n /// @notice checks if a user address has locked the needed qty to allow trading to a given contract address\n /// @param marketContractAddress address of the MarketContract\n /// @param userAddress address of the user\n /// @return true if user has locked tokens to trade the supplied marketContractAddress\n function isUserEnabledForContract(address marketContractAddress, address userAddress) external view returns (bool) {\n return contractAddressToUserAddressToQtyLocked[marketContractAddress][userAddress] >= lockQtyToAllowTrading;\n }\n\n /// @notice checks if a user address has enough token balance to be eligible to create a contract\n /// @param userAddress address of the user\n /// @return true if user has sufficient balance of tokens\n function isBalanceSufficientForContractCreation(address userAddress) external view returns (bool) {\n return balances[userAddress] >= minBalanceToAllowContractCreation;\n }\n\n /// @notice allows user to lock tokens to enable trading for a given market contract\n /// @param marketContractAddress address of the MarketContract\n /// @param qtyToLock desired qty of tokens to lock\n function lockTokensForTradingMarketContract(address marketContractAddress, uint qtyToLock) external {\n uint256 lockedBalance = contractAddressToUserAddressToQtyLocked[marketContractAddress][msg.sender].add(\n qtyToLock\n );\n transfer(this, qtyToLock);\n contractAddressToUserAddressToQtyLocked[marketContractAddress][msg.sender] = lockedBalance;\n emit UpdatedUserLockedBalance(marketContractAddress, msg.sender, lockedBalance);\n }\n\n /// @notice allows user to unlock tokens previously allocated to trading a MarketContract\n /// @param marketContractAddress address of the MarketContract\n /// @param qtyToUnlock desired qty of tokens to unlock\n function unlockTokens(address marketContractAddress, uint qtyToUnlock) external {\n uint256 balanceAfterUnLock = contractAddressToUserAddressToQtyLocked[marketContractAddress][msg.sender].sub(\n qtyToUnlock\n ); // no need to check balance, sub() will ensure sufficient balance to unlock!\n // update balance before external call!\n contractAddressToUserAddressToQtyLocked[marketContractAddress][msg.sender] = balanceAfterUnLock;\n transferLockedTokensBackToUser(qtyToUnlock);\n emit UpdatedUserLockedBalance(marketContractAddress, msg.sender, balanceAfterUnLock);\n }\n\n /// @notice get the currently locked balance for a user given the specific contract address\n /// @param marketContractAddress address of the MarketContract\n /// @param userAddress address of the user\n /// @return the locked balance\n function getLockedBalanceForUser(address marketContractAddress, address userAddress) external view returns (uint) {\n return contractAddressToUserAddressToQtyLocked[marketContractAddress][userAddress];\n }\n\n /*\n // EXTERNAL - ONLY CREATOR METHODS\n */\n\n /// @notice allows the creator to set the qty each user address needs to lock in\n /// order to trade a given MarketContract\n /// @param qtyToLock qty needed to enable trading\n function setLockQtyToAllowTrading(uint qtyToLock) external onlyOwner {\n lockQtyToAllowTrading = qtyToLock;\n }\n\n /// @notice allows the creator to set minimum balance a user must have in order to create MarketContracts\n /// @param minBalance balance to enable contract creation\n function setMinBalanceForContractCreation(uint minBalance) external onlyOwner {\n minBalanceToAllowContractCreation = minBalance;\n }\n\n /*\n // PRIVATE METHODS\n */\n\n /// @dev returns locked balance from this contract to the user's balance\n /// @param qtyToUnlock qty to return to user's balance\n function transferLockedTokensBackToUser(uint qtyToUnlock) private {\n balances[this] = balances[this].sub(qtyToUnlock);\n balances[msg.sender] = balances[msg.sender].add(qtyToUnlock);\n emit Transfer(this, msg.sender, qtyToUnlock);\n }\n}\n", - "sourcePath": "/home/pelsasser/MARKETProtocol/contracts/tokens/MarketToken.sol", + "bytecode": "0x608060405234801561001057600080fd5b5060405160408061253d8339810180604052810190808051906020019092919080519060200190929190505050336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508160068190555080600781905550601260ff16600a0a6323c3460002600281905550601260ff16600a0a6323c3460002600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505061243c806101016000396000f30060806040526004361061016a576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde031461016f578063095ea7b3146101ff57806318160ddd1461026457806323b872dd1461028f5780632ff2e9dc14610314578063313ce5671461033f5780633cad7c4e1461037057806340fc5e7a1461039d57806342966c68146103f457806345977d03146104215780634f1e43341461044e578063661884631461047b5780636e8c57e6146104e057806370a082311461050b5780637e3475a814610562578063802049ac1461058d57806384281dcc146105d05780638da5cb5b1461062b57806395d89b41146106825780639d564d9a14610712578063a9059cbb1461075f578063aafd775e146107c4578063c752ff621461083b578063cfab472f14610866578063d229a94a146108e1578063d73dd6231461092e578063dd62ed3e14610993578063f2fde38b14610a0a575b600080fd5b34801561017b57600080fd5b50610184610a4d565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101c45780820151818401526020810190506101a9565b50505050905090810190601f1680156101f15780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561020b57600080fd5b5061024a600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610a86565b604051808215151515815260200191505060405180910390f35b34801561027057600080fd5b50610279610b78565b6040518082815260200191505060405180910390f35b34801561029b57600080fd5b506102fa600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b82565b604051808215151515815260200191505060405180910390f35b34801561032057600080fd5b50610329610f41565b6040518082815260200191505060405180910390f35b34801561034b57600080fd5b50610354610f52565b604051808260ff1660ff16815260200191505060405180910390f35b34801561037c57600080fd5b5061039b60048036038101908080359060200190929190505050610f57565b005b3480156103a957600080fd5b506103b2610fbc565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561040057600080fd5b5061041f60048036038101908080359060200190929190505050610fe2565b005b34801561042d57600080fd5b5061044c60048036038101908080359060200190929190505050610fef565b005b34801561045a57600080fd5b50610479600480360381019080803590602001909291905050506111d8565b005b34801561048757600080fd5b506104c6600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061123d565b604051808215151515815260200191505060405180910390f35b3480156104ec57600080fd5b506104f56114ce565b6040518082815260200191505060405180910390f35b34801561051757600080fd5b5061054c600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506114d4565b6040518082815260200191505060405180910390f35b34801561056e57600080fd5b5061057761151d565b6040518082815260200191505060405180910390f35b34801561059957600080fd5b506105ce600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611523565b005b3480156105dc57600080fd5b50610611600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506115c2565b604051808215151515815260200191505060405180910390f35b34801561063757600080fd5b50610640611610565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561068e57600080fd5b50610697611635565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156106d75780820151818401526020810190506106bc565b50505050905090810190601f1680156107045780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561071e57600080fd5b5061075d600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061166e565b005b34801561076b57600080fd5b506107aa600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506117f5565b604051808215151515815260200191505060405180910390f35b3480156107d057600080fd5b50610825600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611a19565b6040518082815260200191505060405180910390f35b34801561084757600080fd5b50610850611aa0565b6040518082815260200191505060405180910390f35b34801561087257600080fd5b506108c7600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611aa6565b604051808215151515815260200191505060405180910390f35b3480156108ed57600080fd5b5061092c600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611b32565b005b34801561093a57600080fd5b50610979600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611cbb565b604051808215151515815260200191505060405180910390f35b34801561099f57600080fd5b506109f4600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611eb7565b6040518082815260200191505060405180910390f35b348015610a1657600080fd5b50610a4b600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611f3e565b005b6040805190810160405280601581526020017f4d41524b45542050726f746f636f6c20546f6b656e000000000000000000000081525081565b600081600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b6000600254905090565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614151515610bbf57600080fd5b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211151515610c0d57600080fd5b600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211151515610c9857600080fd5b610cea82600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461209390919063ffffffff16565b600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610d7f82600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546120ac90919063ffffffff16565b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610e5182600360008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461209390919063ffffffff16565b600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b601260ff16600a0a6323c346000281565b601281565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610fb257600080fd5b8060068190555050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610fec33826120c8565b50565b600073ffffffffffffffffffffffffffffffffffffffff16600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415151561104d57600080fd5b61105681610fe2565b61106b816005546120ac90919063ffffffff16565b600581905550600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663753e88e533836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b15801561113657600080fd5b505af115801561114a573d6000803e3d6000fd5b50505050600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fa6eb8a5f37ca5f03caebe01d969f49f93dd089e57d04580ba05974548fd44e77836040518082815260200191505060405180910390a350565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561123357600080fd5b8060078190555050565b600080600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490508083111561134e576000600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506113e2565b611361838261209390919063ffffffff16565b600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a3600191505092915050565b60075481565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60065481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561157e57600080fd5b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000600754600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410159050919050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6040805190810160405280600381526020017f4d4b54000000000000000000000000000000000000000000000000000000000081525081565b60006116ff82600860008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461209390919063ffffffff16565b905080600860008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061178b8261227e565b3373ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f5893bf91422655305d16e66cf1b6ecd4645b071f6904767d5d79bd91556e3fcf836040518082815260200191505060405180910390a3505050565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415151561183257600080fd5b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115151561188057600080fd5b6118d282600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461209390919063ffffffff16565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061196782600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546120ac90919063ffffffff16565b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b6000600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60055481565b6000600654600860008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015905092915050565b6000611bc382600860008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546120ac90919063ffffffff16565b9050611bcf30836117f5565b5080600860008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055503373ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f5893bf91422655305d16e66cf1b6ecd4645b071f6904767d5d79bd91556e3fcf836040518082815260200191505060405180910390a3505050565b6000611d4c82600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546120ac90919063ffffffff16565b600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611f9957600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515611fd557600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008282111515156120a157fe5b818303905092915050565b600081830190508281101515156120bf57fe5b80905092915050565b600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054811115151561211657600080fd5b61216881600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461209390919063ffffffff16565b600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506121c08160025461209390919063ffffffff16565b6002819055508173ffffffffffffffffffffffffffffffffffffffff167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5826040518082815260200191505060405180910390a2600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b6122d081600160003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461209390919063ffffffff16565b600160003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061236581600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546120ac90919063ffffffff16565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055503373ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505600a165627a7a723058204f9ff7c51bb1c48fd3b431a70c81c662b05d10b3da7317c3136637039e081d410029", + "deployedBytecode": "0x60806040526004361061016a576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde031461016f578063095ea7b3146101ff57806318160ddd1461026457806323b872dd1461028f5780632ff2e9dc14610314578063313ce5671461033f5780633cad7c4e1461037057806340fc5e7a1461039d57806342966c68146103f457806345977d03146104215780634f1e43341461044e578063661884631461047b5780636e8c57e6146104e057806370a082311461050b5780637e3475a814610562578063802049ac1461058d57806384281dcc146105d05780638da5cb5b1461062b57806395d89b41146106825780639d564d9a14610712578063a9059cbb1461075f578063aafd775e146107c4578063c752ff621461083b578063cfab472f14610866578063d229a94a146108e1578063d73dd6231461092e578063dd62ed3e14610993578063f2fde38b14610a0a575b600080fd5b34801561017b57600080fd5b50610184610a4d565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101c45780820151818401526020810190506101a9565b50505050905090810190601f1680156101f15780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561020b57600080fd5b5061024a600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610a86565b604051808215151515815260200191505060405180910390f35b34801561027057600080fd5b50610279610b78565b6040518082815260200191505060405180910390f35b34801561029b57600080fd5b506102fa600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b82565b604051808215151515815260200191505060405180910390f35b34801561032057600080fd5b50610329610f41565b6040518082815260200191505060405180910390f35b34801561034b57600080fd5b50610354610f52565b604051808260ff1660ff16815260200191505060405180910390f35b34801561037c57600080fd5b5061039b60048036038101908080359060200190929190505050610f57565b005b3480156103a957600080fd5b506103b2610fbc565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561040057600080fd5b5061041f60048036038101908080359060200190929190505050610fe2565b005b34801561042d57600080fd5b5061044c60048036038101908080359060200190929190505050610fef565b005b34801561045a57600080fd5b50610479600480360381019080803590602001909291905050506111d8565b005b34801561048757600080fd5b506104c6600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061123d565b604051808215151515815260200191505060405180910390f35b3480156104ec57600080fd5b506104f56114ce565b6040518082815260200191505060405180910390f35b34801561051757600080fd5b5061054c600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506114d4565b6040518082815260200191505060405180910390f35b34801561056e57600080fd5b5061057761151d565b6040518082815260200191505060405180910390f35b34801561059957600080fd5b506105ce600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611523565b005b3480156105dc57600080fd5b50610611600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506115c2565b604051808215151515815260200191505060405180910390f35b34801561063757600080fd5b50610640611610565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561068e57600080fd5b50610697611635565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156106d75780820151818401526020810190506106bc565b50505050905090810190601f1680156107045780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561071e57600080fd5b5061075d600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061166e565b005b34801561076b57600080fd5b506107aa600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506117f5565b604051808215151515815260200191505060405180910390f35b3480156107d057600080fd5b50610825600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611a19565b6040518082815260200191505060405180910390f35b34801561084757600080fd5b50610850611aa0565b6040518082815260200191505060405180910390f35b34801561087257600080fd5b506108c7600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611aa6565b604051808215151515815260200191505060405180910390f35b3480156108ed57600080fd5b5061092c600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611b32565b005b34801561093a57600080fd5b50610979600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611cbb565b604051808215151515815260200191505060405180910390f35b34801561099f57600080fd5b506109f4600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611eb7565b6040518082815260200191505060405180910390f35b348015610a1657600080fd5b50610a4b600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611f3e565b005b6040805190810160405280601581526020017f4d41524b45542050726f746f636f6c20546f6b656e000000000000000000000081525081565b600081600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b6000600254905090565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614151515610bbf57600080fd5b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211151515610c0d57600080fd5b600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211151515610c9857600080fd5b610cea82600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461209390919063ffffffff16565b600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610d7f82600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546120ac90919063ffffffff16565b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610e5182600360008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461209390919063ffffffff16565b600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b601260ff16600a0a6323c346000281565b601281565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610fb257600080fd5b8060068190555050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610fec33826120c8565b50565b600073ffffffffffffffffffffffffffffffffffffffff16600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415151561104d57600080fd5b61105681610fe2565b61106b816005546120ac90919063ffffffff16565b600581905550600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663753e88e533836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b15801561113657600080fd5b505af115801561114a573d6000803e3d6000fd5b50505050600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fa6eb8a5f37ca5f03caebe01d969f49f93dd089e57d04580ba05974548fd44e77836040518082815260200191505060405180910390a350565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561123357600080fd5b8060078190555050565b600080600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490508083111561134e576000600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506113e2565b611361838261209390919063ffffffff16565b600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a3600191505092915050565b60075481565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60065481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561157e57600080fd5b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000600754600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410159050919050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6040805190810160405280600381526020017f4d4b54000000000000000000000000000000000000000000000000000000000081525081565b60006116ff82600860008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461209390919063ffffffff16565b905080600860008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061178b8261227e565b3373ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f5893bf91422655305d16e66cf1b6ecd4645b071f6904767d5d79bd91556e3fcf836040518082815260200191505060405180910390a3505050565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415151561183257600080fd5b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115151561188057600080fd5b6118d282600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461209390919063ffffffff16565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061196782600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546120ac90919063ffffffff16565b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b6000600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60055481565b6000600654600860008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015905092915050565b6000611bc382600860008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546120ac90919063ffffffff16565b9050611bcf30836117f5565b5080600860008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055503373ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f5893bf91422655305d16e66cf1b6ecd4645b071f6904767d5d79bd91556e3fcf836040518082815260200191505060405180910390a3505050565b6000611d4c82600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546120ac90919063ffffffff16565b600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611f9957600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515611fd557600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008282111515156120a157fe5b818303905092915050565b600081830190508281101515156120bf57fe5b80905092915050565b600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054811115151561211657600080fd5b61216881600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461209390919063ffffffff16565b600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506121c08160025461209390919063ffffffff16565b6002819055508173ffffffffffffffffffffffffffffffffffffffff167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5826040518082815260200191505060405180910390a2600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b6122d081600160003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461209390919063ffffffff16565b600160003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061236581600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546120ac90919063ffffffff16565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055503373ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505600a165627a7a723058204f9ff7c51bb1c48fd3b431a70c81c662b05d10b3da7317c3136637039e081d410029", + "sourceMap": "927:5193:24:-;;;1536:400;8:9:-1;5:2;;;30:1;27;20:12;5:2;1536:400:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;509:10:41;501:5;;:18;;;;;;;;;;;;;;;;;;1643:19:24;1619:21;:43;;;;1708:21;1672:33;:57;;;;1110:2;1173:14;;1169:2;:18;1157:9;:30;1739:12;:29;;;;1110:2;1173:14;;1169:2;:18;1157:9;:30;1850:8;:20;1859:10;1850:20;;;;;;;;;;;;;;;:37;;;;1536:400;;927:5193;;;;;;", + "deployedSourceMap": "927:5193:24:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;975:53;;8:9:-1;5:2;;;30:1;27;20:12;5:2;975:53:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;975:53:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1803:188:47;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1803:188:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;371:83:42;;8:9:-1;5:2;;;30:1;27;20:12;5:2;371:83:42;;;;;;;;;;;;;;;;;;;;;;;736:444:47;;8:9:-1;5:2;;;30:1;27;20:12;5:2;736:444:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1119:68:24;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1119:68:24;;;;;;;;;;;;;;;;;;;;;;;1077:35;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1077:35:24;;;;;;;;;;;;;;;;;;;;;;;;;;;5245:119;;8:9:-1;5:2;;;30:1;27;20:12;5:2;5245:119:24;;;;;;;;;;;;;;;;;;;;;;;;;;1189:32:25;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1189:32:25;;;;;;;;;;;;;;;;;;;;;;;;;;;353:73:43;;8:9:-1;5:2;;;30:1;27;20:12;5:2;353:73:43;;;;;;;;;;;;;;;;;;;;;;;;;;1624:363:25;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1624:363:25;;;;;;;;;;;;;;;;;;;;;;;;;;5542:141:24;;8:9:-1;5:2;;;30:1;27;20:12;5:2;5542:141:24;;;;;;;;;;;;;;;;;;;;;;;;;;3617:403:47;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3617:403:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1280:45:24;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1280:45:24;;;;;;;;;;;;;;;;;;;;;;;1131:99:42;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1131:99:42;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1241:33:24;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1241:33:24;;;;;;;;;;;;;;;;;;;;;;;2125:124:25;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2125:124:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;2754:180:24;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2754:180:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;238:20:41;;8:9:-1;5:2;;;30:1;27;20:12;5:2;238:20:41;;;;;;;;;;;;;;;;;;;;;;;;;;;1034:37:24;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1034:37:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;1034:37:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3853:682;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3853:682:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;608:321:42;;8:9:-1;5:2;;;30:1;27;20:12;5:2;608:321:42;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4786:213:24;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4786:213:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1270:28:25;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1270:28:25;;;;;;;;;;;;;;;;;;;;;;;2298:239:24;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2298:239:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3151:476;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3151:476:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2893:262:47;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2893:262:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2310:126;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2310:126:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;832:174:41;;8:9:-1;5:2;;;30:1;27;20:12;5:2;832:174:41;;;;;;;;;;;;;;;;;;;;;;;;;;;;975:53:24;;;;;;;;;;;;;;;;;;;;:::o;1803:188:47:-;1870:4;1914:6;1882:7;:19;1890:10;1882:19;;;;;;;;;;;;;;;:29;1902:8;1882:29;;;;;;;;;;;;;;;:38;;;;1952:8;1931:38;;1940:10;1931:38;;;1962:6;1931:38;;;;;;;;;;;;;;;;;;1982:4;1975:11;;1803:188;;;;:::o;371:83:42:-;415:7;437:12;;430:19;;371:83;:::o;736:444:47:-;818:4;853:1;838:17;;:3;:17;;;;830:26;;;;;;;;880:8;:15;889:5;880:15;;;;;;;;;;;;;;;;870:6;:25;;862:34;;;;;;;;920:7;:14;928:5;920:14;;;;;;;;;;;;;;;:26;935:10;920:26;;;;;;;;;;;;;;;;910:6;:36;;902:45;;;;;;;;972:27;992:6;972:8;:15;981:5;972:15;;;;;;;;;;;;;;;;:19;;:27;;;;:::i;:::-;954:8;:15;963:5;954:15;;;;;;;;;;;;;;;:45;;;;1021:25;1039:6;1021:8;:13;1030:3;1021:13;;;;;;;;;;;;;;;;:17;;:25;;;;:::i;:::-;1005:8;:13;1014:3;1005:13;;;;;;;;;;;;;;;:41;;;;1081:38;1112:6;1081:7;:14;1089:5;1081:14;;;;;;;;;;;;;;;:26;1096:10;1081:26;;;;;;;;;;;;;;;;:30;;:38;;;;:::i;:::-;1052:7;:14;1060:5;1052:14;;;;;;;;;;;;;;;:26;1067:10;1052:26;;;;;;;;;;;;;;;:67;;;;1146:3;1130:28;;1139:5;1130:28;;;1151:6;1130:28;;;;;;;;;;;;;;;;;;1171:4;1164:11;;736:444;;;;;:::o;1119:68:24:-;1110:2;1173:14;;1169:2;:18;1157:9;:30;1119:68;:::o;1077:35::-;1110:2;1077:35;:::o;5245:119::-;653:5:41;;;;;;;;;;;639:19;;:10;:19;;;631:28;;;;;;;;5348:9:24;5324:21;:33;;;;5245:119;:::o;1189:32:25:-;;;;;;;;;;;;;:::o;353:73:43:-;396:25;402:10;414:6;396:5;:25::i;:::-;353:73;:::o;1624:363:25:-;1712:1;1683:31;;:17;;;;;;;;;;;:31;;;;1675:40;;;;;;;;1726:11;1731:5;1726:4;:11::i;:::-;1817:24;1835:5;1817:13;;:17;;:24;;;;:::i;:::-;1801:13;:40;;;;1870:17;;;;;;;;;;;1852:48;;;1901:10;1913:5;1852:67;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1852:67:25;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1852:67:25;;;;1955:17;;;;;;;;;;;1934:46;;1943:10;1934:46;;;1974:5;1934:46;;;;;;;;;;;;;;;;;;1624:363;:::o;5542:141:24:-;653:5:41;;;;;;;;;;;639:19;;:10;:19;;;631:28;;;;;;;;5666:10:24;5630:33;:46;;;;5542:141;:::o;3617:403:47:-;3700:4;3712:13;3728:7;:19;3736:10;3728:19;;;;;;;;;;;;;;;:29;3748:8;3728:29;;;;;;;;;;;;;;;;3712:45;;3786:8;3767:16;:27;3763:164;;;3836:1;3804:7;:19;3812:10;3804:19;;;;;;;;;;;;;;;:29;3824:8;3804:29;;;;;;;;;;;;;;;:33;;;;3763:164;;;3890:30;3903:16;3890:8;:12;;:30;;;;:::i;:::-;3858:7;:19;3866:10;3858:19;;;;;;;;;;;;;;;:29;3878:8;3858:29;;;;;;;;;;;;;;;:62;;;;3763:164;3958:8;3937:61;;3946:10;3937:61;;;3968:7;:19;3976:10;3968:19;;;;;;;;;;;;;;;:29;3988:8;3968:29;;;;;;;;;;;;;;;;3937:61;;;;;;;;;;;;;;;;;;4011:4;4004:11;;3617:403;;;;;:::o;1280:45:24:-;;;;:::o;1131:99:42:-;1187:7;1209:8;:16;1218:6;1209:16;;;;;;;;;;;;;;;;1202:23;;1131:99;;;:::o;1241:33:24:-;;;;:::o;2125:124:25:-;653:5:41;;;;;;;;;;;639:19;;:10;:19;;;631:28;;;;;;;;2228:14:25;2208:17;;:34;;;;;;;;;;;;;;;;;;2125:124;:::o;2754:180:24:-;2846:4;2894:33;;2869:8;:21;2878:11;2869:21;;;;;;;;;;;;;;;;:58;;2862:65;;2754:180;;;:::o;238:20:41:-;;;;;;;;;;;;;:::o;1034:37:24:-;;;;;;;;;;;;;;;;;;;;:::o;3853:682::-;3943:26;3972:113;4064:11;3972:39;:62;4012:21;3972:62;;;;;;;;;;;;;;;:74;4035:10;3972:74;;;;;;;;;;;;;;;;:78;;:113;;;;:::i;:::-;3943:142;;4363:18;4286:39;:62;4326:21;4286:62;;;;;;;;;;;;;;;:74;4349:10;4286:74;;;;;;;;;;;;;;;:95;;;;4391:43;4422:11;4391:30;:43::i;:::-;4497:10;4449:79;;4474:21;4449:79;;;4509:18;4449:79;;;;;;;;;;;;;;;;;;3853:682;;;:::o;608:321:42:-;671:4;706:1;691:17;;:3;:17;;;;683:26;;;;;;;;733:8;:20;742:10;733:20;;;;;;;;;;;;;;;;723:6;:30;;715:39;;;;;;;;784:32;809:6;784:8;:20;793:10;784:20;;;;;;;;;;;;;;;;:24;;:32;;;;:::i;:::-;761:8;:20;770:10;761:20;;;;;;;;;;;;;;;:55;;;;838:25;856:6;838:8;:13;847:3;838:13;;;;;;;;;;;;;;;;:17;;:25;;;;:::i;:::-;822:8;:13;831:3;822:13;;;;;;;;;;;;;;;:41;;;;895:3;874:33;;883:10;874:33;;;900:6;874:33;;;;;;;;;;;;;;;;;;920:4;913:11;;608:321;;;;:::o;4786:213:24:-;4894:4;4917:39;:62;4957:21;4917:62;;;;;;;;;;;;;;;:75;4980:11;4917:75;;;;;;;;;;;;;;;;4910:82;;4786:213;;;;:::o;1270:28:25:-;;;;:::o;2298:239:24:-;2407:4;2509:21;;2430:39;:62;2470:21;2430:62;;;;;;;;;;;;;;;:75;2493:11;2430:75;;;;;;;;;;;;;;;;:100;;2423:107;;2298:239;;;;:::o;3151:476::-;3261:21;3285:111;3377:9;3285:39;:62;3325:21;3285:62;;;;;;;;;;;;;;;:74;3348:10;3285:74;;;;;;;;;;;;;;;;:78;;:111;;;;:::i;:::-;3261:135;;3406:25;3415:4;3421:9;3406:8;:25::i;:::-;;3518:13;3441:39;:62;3481:21;3441:62;;;;;;;;;;;;;;;:74;3504:10;3441:74;;;;;;;;;;;;;;;:90;;;;3594:10;3546:74;;3571:21;3546:74;;;3606:13;3546:74;;;;;;;;;;;;;;;;;;3151:476;;;:::o;2893:262:47:-;2971:4;3015:46;3049:11;3015:7;:19;3023:10;3015:19;;;;;;;;;;;;;;;:29;3035:8;3015:29;;;;;;;;;;;;;;;;:33;;:46;;;;:::i;:::-;2983:7;:19;2991:10;2983:19;;;;;;;;;;;;;;;:29;3003:8;2983:29;;;;;;;;;;;;;;;:78;;;;3093:8;3072:61;;3081:10;3072:61;;;3103:7;:19;3111:10;3103:19;;;;;;;;;;;;;;;:29;3123:8;3103:29;;;;;;;;;;;;;;;;3072:61;;;;;;;;;;;;;;;;;;3146:4;3139:11;;2893:262;;;;:::o;2310:126::-;2384:7;2406;:15;2414:6;2406:15;;;;;;;;;;;;;;;:25;2422:8;2406:25;;;;;;;;;;;;;;;;2399:32;;2310:126;;;;:::o;832:174:41:-;653:5;;;;;;;;;;;639:19;;:10;:19;;;631:28;;;;;;;;928:1;908:22;;:8;:22;;;;900:31;;;;;;;;970:8;942:37;;963:5;;;;;;;;;;;942:37;;;;;;;;;;;;993:8;985:5;;:16;;;;;;;;;;;;;;;;;;832:174;:::o;836:110:40:-;894:7;921:1;916;:6;;909:14;;;;;;940:1;936;:5;929:12;;836:110;;;;:::o;1008:123::-;1066:9;1091:1;1087;:5;1083:9;;1110:1;1105;:6;;1098:14;;;;;;1125:1;1118:8;;1008:123;;;;:::o;430:438:43:-;508:8;:14;517:4;508:14;;;;;;;;;;;;;;;;498:6;:24;;490:33;;;;;;;;718:26;737:6;718:8;:14;727:4;718:14;;;;;;;;;;;;;;;;:18;;:26;;;;:::i;:::-;701:8;:14;710:4;701:14;;;;;;;;;;;;;;;:43;;;;765:24;782:6;765:12;;:16;;:24;;;;:::i;:::-;750:12;:39;;;;805:4;800:18;;;811:6;800:18;;;;;;;;;;;;;;;;;;852:1;829:34;;838:4;829:34;;;856:6;829:34;;;;;;;;;;;;;;;;;;430:438;;:::o;5863:255:24:-;5956:31;5975:11;5956:8;:14;5965:4;5956:14;;;;;;;;;;;;;;;;:18;;:31;;;;:::i;:::-;5939:8;:14;5948:4;5939:14;;;;;;;;;;;;;;;:48;;;;6020:37;6045:11;6020:8;:20;6029:10;6020:20;;;;;;;;;;;;;;;;:24;;:37;;;;:::i;:::-;5997:8;:20;6006:10;5997:20;;;;;;;;;;;;;;;:60;;;;6087:10;6072:39;;6081:4;6072:39;;;6099:11;6072:39;;;;;;;;;;;;;;;;;;5863:255;:::o", + "source": "/*\n Copyright 2017-2018 Phillip A. Elsasser\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n*/\n\npragma solidity ^0.4.24;\n\nimport \"./UpgradableToken.sol\";\n\n\n/// @title Market Token\n/// @notice Our membership token. Users must lock tokens to enable trading for a given Market Contract\n/// as well as have a minimum balance of tokens to create new Market Contracts.\n/// @author Phil Elsasser \ncontract MarketToken is UpgradeableToken {\n\n string public constant name = \"MARKET Protocol Token\";\n string public constant symbol = \"MKT\";\n uint8 public constant decimals = 18;\n\n uint public constant INITIAL_SUPPLY = 600000000 * 10**uint(decimals); // 600 million tokens with 18 decimals (6e+26)\n\n uint public lockQtyToAllowTrading;\n uint public minBalanceToAllowContractCreation;\n\n mapping(address => mapping(address => uint)) contractAddressToUserAddressToQtyLocked;\n\n event UpdatedUserLockedBalance(address indexed contractAddress, address indexed userAddress, uint balance);\n\n constructor(uint qtyToLockForTrading, uint minBalanceForCreation) public {\n lockQtyToAllowTrading = qtyToLockForTrading;\n minBalanceToAllowContractCreation = minBalanceForCreation;\n totalSupply_ = INITIAL_SUPPLY; //note totalSupply_ and INITIAL_SUPPLY may vary as token's are burnt.\n\n balances[msg.sender] = INITIAL_SUPPLY; // for now allocate all tokens to creator\n }\n\n /*\n // EXTERNAL METHODS\n */\n\n /// @notice checks if a user address has locked the needed qty to allow trading to a given contract address\n /// @param marketContractAddress address of the MarketContract\n /// @param userAddress address of the user\n /// @return true if user has locked tokens to trade the supplied marketContractAddress\n function isUserEnabledForContract(address marketContractAddress, address userAddress) external view returns (bool) {\n return contractAddressToUserAddressToQtyLocked[marketContractAddress][userAddress] >= lockQtyToAllowTrading;\n }\n\n /// @notice checks if a user address has enough token balance to be eligible to create a contract\n /// @param userAddress address of the user\n /// @return true if user has sufficient balance of tokens\n function isBalanceSufficientForContractCreation(address userAddress) external view returns (bool) {\n return balances[userAddress] >= minBalanceToAllowContractCreation;\n }\n\n /// @notice allows user to lock tokens to enable trading for a given market contract\n /// @param marketContractAddress address of the MarketContract\n /// @param qtyToLock desired qty of tokens to lock\n function lockTokensForTradingMarketContract(address marketContractAddress, uint qtyToLock) external {\n uint256 lockedBalance = contractAddressToUserAddressToQtyLocked[marketContractAddress][msg.sender].add(\n qtyToLock\n );\n transfer(this, qtyToLock);\n contractAddressToUserAddressToQtyLocked[marketContractAddress][msg.sender] = lockedBalance;\n emit UpdatedUserLockedBalance(marketContractAddress, msg.sender, lockedBalance);\n }\n\n /// @notice allows user to unlock tokens previously allocated to trading a MarketContract\n /// @param marketContractAddress address of the MarketContract\n /// @param qtyToUnlock desired qty of tokens to unlock\n function unlockTokens(address marketContractAddress, uint qtyToUnlock) external {\n uint256 balanceAfterUnLock = contractAddressToUserAddressToQtyLocked[marketContractAddress][msg.sender].sub(\n qtyToUnlock\n ); // no need to check balance, sub() will ensure sufficient balance to unlock!\n // TODO: only allow unlock if user has no open position!\n // update balance before external call!\n contractAddressToUserAddressToQtyLocked[marketContractAddress][msg.sender] = balanceAfterUnLock;\n transferLockedTokensBackToUser(qtyToUnlock);\n emit UpdatedUserLockedBalance(marketContractAddress, msg.sender, balanceAfterUnLock);\n }\n\n /// @notice get the currently locked balance for a user given the specific contract address\n /// @param marketContractAddress address of the MarketContract\n /// @param userAddress address of the user\n /// @return the locked balance\n function getLockedBalanceForUser(address marketContractAddress, address userAddress) external view returns (uint) {\n return contractAddressToUserAddressToQtyLocked[marketContractAddress][userAddress];\n }\n\n /*\n // EXTERNAL - ONLY CREATOR METHODS\n */\n\n /// @notice allows the creator to set the qty each user address needs to lock in\n /// order to trade a given MarketContract\n /// @param qtyToLock qty needed to enable trading\n function setLockQtyToAllowTrading(uint qtyToLock) external onlyOwner {\n lockQtyToAllowTrading = qtyToLock;\n }\n\n /// @notice allows the creator to set minimum balance a user must have in order to create MarketContracts\n /// @param minBalance balance to enable contract creation\n function setMinBalanceForContractCreation(uint minBalance) external onlyOwner {\n minBalanceToAllowContractCreation = minBalance;\n }\n\n /*\n // PRIVATE METHODS\n */\n\n /// @dev returns locked balance from this contract to the user's balance\n /// @param qtyToUnlock qty to return to user's balance\n function transferLockedTokensBackToUser(uint qtyToUnlock) private {\n balances[this] = balances[this].sub(qtyToUnlock);\n balances[msg.sender] = balances[msg.sender].add(qtyToUnlock);\n emit Transfer(this, msg.sender, qtyToUnlock);\n }\n}\n", + "sourcePath": "/home/travis/build/MARKETProtocol/MARKETProtocol/contracts/tokens/MarketToken.sol", "ast": { - "absolutePath": "/home/pelsasser/MARKETProtocol/contracts/tokens/MarketToken.sol", + "absolutePath": "/home/travis/build/MARKETProtocol/MARKETProtocol/contracts/tokens/MarketToken.sol", "exportedSymbols": { "MarketToken": [ - 4328 + 5267 ] }, - "id": 4329, + "id": 5268, "nodeType": "SourceUnit", "nodes": [ { - "id": 4071, + "id": 5010, "literals": [ "solidity", "^", @@ -650,16 +650,16 @@ ".24" ], "nodeType": "PragmaDirective", - "src": "608:24:20" + "src": "608:24:24" }, { - "absolutePath": "/home/pelsasser/MARKETProtocol/contracts/tokens/UpgradableToken.sol", + "absolutePath": "/home/travis/build/MARKETProtocol/MARKETProtocol/contracts/tokens/UpgradableToken.sol", "file": "./UpgradableToken.sol", - "id": 4072, + "id": 5011, "nodeType": "ImportDirective", - "scope": 4329, - "sourceUnit": 4407, - "src": "634:31:20", + "scope": 5268, + "sourceUnit": 5346, + "src": "634:31:24", "symbolAliases": [], "unitAlias": "" }, @@ -669,54 +669,54 @@ "arguments": null, "baseName": { "contractScope": null, - "id": 4073, + "id": 5012, "name": "UpgradeableToken", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 4406, - "src": "951:16:20", + "referencedDeclaration": 5345, + "src": "951:16:24", "typeDescriptions": { - "typeIdentifier": "t_contract$_UpgradeableToken_$4406", + "typeIdentifier": "t_contract$_UpgradeableToken_$5345", "typeString": "contract UpgradeableToken" } }, - "id": 4074, + "id": 5013, "nodeType": "InheritanceSpecifier", - "src": "951:16:20" + "src": "951:16:24" } ], "contractDependencies": [ - 4406, - 4628, - 4724, - 4795, - 4838, - 4870, - 5178 + 5345, + 7083, + 7179, + 7250, + 7293, + 7325, + 7633 ], "contractKind": "contract", "documentation": "@title Market Token\n @notice Our membership token. Users must lock tokens to enable trading for a given Market Contract\n as well as have a minimum balance of tokens to create new Market Contracts.\n @author Phil Elsasser ", "fullyImplemented": true, - "id": 4328, + "id": 5267, "linearizedBaseContracts": [ - 4328, - 4406, - 5178, - 4795, - 4724, - 4838, - 4870, - 4628 + 5267, + 5345, + 7633, + 7250, + 7179, + 7293, + 7325, + 7083 ], "name": "MarketToken", "nodeType": "ContractDefinition", "nodes": [ { "constant": true, - "id": 4077, + "id": 5016, "name": "name", "nodeType": "VariableDeclaration", - "scope": 4328, - "src": "975:53:20", + "scope": 5267, + "src": "975:53:24", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -724,10 +724,10 @@ "typeString": "string" }, "typeName": { - "id": 4075, + "id": 5014, "name": "string", "nodeType": "ElementaryTypeName", - "src": "975:6:20", + "src": "975:6:24", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" @@ -736,14 +736,14 @@ "value": { "argumentTypes": null, "hexValue": "4d41524b45542050726f746f636f6c20546f6b656e", - "id": 4076, + "id": 5015, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "1005:23:20", + "src": "1005:23:24", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_e0bc6dbaee97eab3b4d556c6ffb6e8c59dafb0398d3bd88d72a7f979abb854ce", @@ -755,11 +755,11 @@ }, { "constant": true, - "id": 4080, + "id": 5019, "name": "symbol", "nodeType": "VariableDeclaration", - "scope": 4328, - "src": "1034:37:20", + "scope": 5267, + "src": "1034:37:24", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -767,10 +767,10 @@ "typeString": "string" }, "typeName": { - "id": 4078, + "id": 5017, "name": "string", "nodeType": "ElementaryTypeName", - "src": "1034:6:20", + "src": "1034:6:24", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" @@ -779,14 +779,14 @@ "value": { "argumentTypes": null, "hexValue": "4d4b54", - "id": 4079, + "id": 5018, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "1066:5:20", + "src": "1066:5:24", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_44a9d14916e2f5301f94c3794caf0186ef39fb251e961f913aea7eaeff74b613", @@ -798,11 +798,11 @@ }, { "constant": true, - "id": 4083, + "id": 5022, "name": "decimals", "nodeType": "VariableDeclaration", - "scope": 4328, - "src": "1077:35:20", + "scope": 5267, + "src": "1077:35:24", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -810,10 +810,10 @@ "typeString": "uint8" }, "typeName": { - "id": 4081, + "id": 5020, "name": "uint8", "nodeType": "ElementaryTypeName", - "src": "1077:5:20", + "src": "1077:5:24", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" @@ -822,14 +822,14 @@ "value": { "argumentTypes": null, "hexValue": "3138", - "id": 4082, + "id": 5021, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "1110:2:20", + "src": "1110:2:24", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_18_by_1", @@ -841,11 +841,11 @@ }, { "constant": true, - "id": 4092, + "id": 5031, "name": "INITIAL_SUPPLY", "nodeType": "VariableDeclaration", - "scope": 4328, - "src": "1119:68:20", + "scope": 5267, + "src": "1119:68:24", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -853,10 +853,10 @@ "typeString": "uint256" }, "typeName": { - "id": 4084, + "id": 5023, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "1119:4:20", + "src": "1119:4:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -868,7 +868,7 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 4091, + "id": 5030, "isConstant": false, "isLValue": false, "isPure": true, @@ -876,14 +876,14 @@ "leftExpression": { "argumentTypes": null, "hexValue": "363030303030303030", - "id": 4085, + "id": 5024, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "1157:9:20", + "src": "1157:9:24", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_600000000_by_1", @@ -899,7 +899,7 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 4090, + "id": 5029, "isConstant": false, "isLValue": false, "isPure": true, @@ -907,14 +907,14 @@ "leftExpression": { "argumentTypes": null, "hexValue": "3130", - "id": 4086, + "id": 5025, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "1169:2:20", + "src": "1169:2:24", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_10_by_1", @@ -929,12 +929,12 @@ "arguments": [ { "argumentTypes": null, - "id": 4088, + "id": 5027, "name": "decimals", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4083, - "src": "1178:8:20", + "referencedDeclaration": 5022, + "src": "1178:8:24", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" @@ -948,20 +948,20 @@ "typeString": "uint8" } ], - "id": 4087, + "id": 5026, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "1173:4:20", + "src": "1173:4:24", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)" }, "typeName": "uint" }, - "id": 4089, + "id": 5028, "isConstant": false, "isLValue": false, "isPure": true, @@ -969,19 +969,19 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "1173:14:20", + "src": "1173:14:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "1169:18:20", + "src": "1169:18:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "1157:30:20", + "src": "1157:30:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -991,11 +991,11 @@ }, { "constant": false, - "id": 4094, + "id": 5033, "name": "lockQtyToAllowTrading", "nodeType": "VariableDeclaration", - "scope": 4328, - "src": "1241:33:20", + "scope": 5267, + "src": "1241:33:24", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -1003,10 +1003,10 @@ "typeString": "uint256" }, "typeName": { - "id": 4093, + "id": 5032, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "1241:4:20", + "src": "1241:4:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1017,11 +1017,11 @@ }, { "constant": false, - "id": 4096, + "id": 5035, "name": "minBalanceToAllowContractCreation", "nodeType": "VariableDeclaration", - "scope": 4328, - "src": "1280:45:20", + "scope": 5267, + "src": "1280:45:24", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -1029,10 +1029,10 @@ "typeString": "uint256" }, "typeName": { - "id": 4095, + "id": 5034, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "1280:4:20", + "src": "1280:4:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1043,11 +1043,11 @@ }, { "constant": false, - "id": 4102, + "id": 5041, "name": "contractAddressToUserAddressToQtyLocked", "nodeType": "VariableDeclaration", - "scope": 4328, - "src": "1332:84:20", + "scope": 5267, + "src": "1332:84:24", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -1055,46 +1055,46 @@ "typeString": "mapping(address => mapping(address => uint256))" }, "typeName": { - "id": 4101, + "id": 5040, "keyType": { - "id": 4097, + "id": 5036, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1340:7:20", + "src": "1340:7:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Mapping", - "src": "1332:44:20", + "src": "1332:44:24", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", "typeString": "mapping(address => mapping(address => uint256))" }, "valueType": { - "id": 4100, + "id": 5039, "keyType": { - "id": 4098, + "id": 5037, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1359:7:20", + "src": "1359:7:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Mapping", - "src": "1351:24:20", + "src": "1351:24:24", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" }, "valueType": { - "id": 4099, + "id": 5038, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "1370:4:20", + "src": "1370:4:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1108,21 +1108,21 @@ { "anonymous": false, "documentation": null, - "id": 4110, + "id": 5049, "name": "UpdatedUserLockedBalance", "nodeType": "EventDefinition", "parameters": { - "id": 4109, + "id": 5048, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 4104, + "id": 5043, "indexed": true, "name": "contractAddress", "nodeType": "VariableDeclaration", - "scope": 4110, - "src": "1454:31:20", + "scope": 5049, + "src": "1454:31:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1130,10 +1130,10 @@ "typeString": "address" }, "typeName": { - "id": 4103, + "id": 5042, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1454:7:20", + "src": "1454:7:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -1144,12 +1144,12 @@ }, { "constant": false, - "id": 4106, + "id": 5045, "indexed": true, "name": "userAddress", "nodeType": "VariableDeclaration", - "scope": 4110, - "src": "1487:27:20", + "scope": 5049, + "src": "1487:27:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1157,10 +1157,10 @@ "typeString": "address" }, "typeName": { - "id": 4105, + "id": 5044, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1487:7:20", + "src": "1487:7:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -1171,12 +1171,12 @@ }, { "constant": false, - "id": 4108, + "id": 5047, "indexed": false, "name": "balance", "nodeType": "VariableDeclaration", - "scope": 4110, - "src": "1516:12:20", + "scope": 5049, + "src": "1516:12:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1184,10 +1184,10 @@ "typeString": "uint256" }, "typeName": { - "id": 4107, + "id": 5046, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "1516:4:20", + "src": "1516:4:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1197,32 +1197,32 @@ "visibility": "internal" } ], - "src": "1453:76:20" + "src": "1453:76:24" }, - "src": "1423:107:20" + "src": "1423:107:24" }, { "body": { - "id": 4136, + "id": 5075, "nodeType": "Block", - "src": "1609:327:20", + "src": "1609:327:24", "statements": [ { "expression": { "argumentTypes": null, - "id": 4119, + "id": 5058, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 4117, + "id": 5056, "name": "lockQtyToAllowTrading", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4094, - "src": "1619:21:20", + "referencedDeclaration": 5033, + "src": "1619:21:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1232,43 +1232,43 @@ "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 4118, + "id": 5057, "name": "qtyToLockForTrading", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4112, - "src": "1643:19:20", + "referencedDeclaration": 5051, + "src": "1643:19:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "1619:43:20", + "src": "1619:43:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 4120, + "id": 5059, "nodeType": "ExpressionStatement", - "src": "1619:43:20" + "src": "1619:43:24" }, { "expression": { "argumentTypes": null, - "id": 4123, + "id": 5062, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 4121, + "id": 5060, "name": "minBalanceToAllowContractCreation", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4096, - "src": "1672:33:20", + "referencedDeclaration": 5035, + "src": "1672:33:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1278,43 +1278,43 @@ "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 4122, + "id": 5061, "name": "minBalanceForCreation", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4114, - "src": "1708:21:20", + "referencedDeclaration": 5053, + "src": "1708:21:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "1672:57:20", + "src": "1672:57:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 4124, + "id": 5063, "nodeType": "ExpressionStatement", - "src": "1672:57:20" + "src": "1672:57:24" }, { "expression": { "argumentTypes": null, - "id": 4127, + "id": 5066, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 4125, + "id": 5064, "name": "totalSupply_", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4643, - "src": "1739:12:20", + "referencedDeclaration": 7098, + "src": "1739:12:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1324,31 +1324,31 @@ "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 4126, + "id": 5065, "name": "INITIAL_SUPPLY", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4092, - "src": "1754:14:20", + "referencedDeclaration": 5031, + "src": "1754:14:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "1739:29:20", + "src": "1739:29:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 4128, + "id": 5067, "nodeType": "ExpressionStatement", - "src": "1739:29:20" + "src": "1739:29:24" }, { "expression": { "argumentTypes": null, - "id": 4134, + "id": 5073, "isConstant": false, "isLValue": false, "isPure": false, @@ -1357,34 +1357,34 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 4129, + "id": 5068, "name": "balances", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4641, - "src": "1850:8:20", + "referencedDeclaration": 7096, + "src": "1850:8:24", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, - "id": 4132, + "id": 5071, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 4130, + "id": 5069, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 5193, - "src": "1859:3:20", + "referencedDeclaration": 8183, + "src": "1859:3:24", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 4131, + "id": 5070, "isConstant": false, "isLValue": false, "isPure": false, @@ -1392,7 +1392,7 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "1859:10:20", + "src": "1859:10:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -1403,7 +1403,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "1850:20:20", + "src": "1850:20:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1413,31 +1413,31 @@ "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 4133, + "id": 5072, "name": "INITIAL_SUPPLY", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4092, - "src": "1873:14:20", + "referencedDeclaration": 5031, + "src": "1873:14:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "1850:37:20", + "src": "1850:37:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 4135, + "id": 5074, "nodeType": "ExpressionStatement", - "src": "1850:37:20" + "src": "1850:37:24" } ] }, "documentation": null, - "id": 4137, + "id": 5076, "implemented": true, "isConstructor": true, "isDeclaredConst": false, @@ -1445,16 +1445,16 @@ "name": "", "nodeType": "FunctionDefinition", "parameters": { - "id": 4115, + "id": 5054, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 4112, + "id": 5051, "name": "qtyToLockForTrading", "nodeType": "VariableDeclaration", - "scope": 4137, - "src": "1548:24:20", + "scope": 5076, + "src": "1548:24:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1462,10 +1462,10 @@ "typeString": "uint256" }, "typeName": { - "id": 4111, + "id": 5050, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "1548:4:20", + "src": "1548:4:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1476,11 +1476,11 @@ }, { "constant": false, - "id": 4114, + "id": 5053, "name": "minBalanceForCreation", "nodeType": "VariableDeclaration", - "scope": 4137, - "src": "1574:26:20", + "scope": 5076, + "src": "1574:26:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1488,10 +1488,10 @@ "typeString": "uint256" }, "typeName": { - "id": 4113, + "id": 5052, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "1574:4:20", + "src": "1574:4:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1501,26 +1501,26 @@ "visibility": "internal" } ], - "src": "1547:54:20" + "src": "1547:54:24" }, "payable": false, "returnParameters": { - "id": 4116, + "id": 5055, "nodeType": "ParameterList", "parameters": [], - "src": "1609:0:20" + "src": "1609:0:24" }, - "scope": 4328, - "src": "1536:400:20", + "scope": 5267, + "src": "1536:400:24", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { - "id": 4154, + "id": 5093, "nodeType": "Block", - "src": "2413:124:20", + "src": "2413:124:24", "statements": [ { "expression": { @@ -1529,7 +1529,7 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 4152, + "id": 5091, "isConstant": false, "isLValue": false, "isPure": false, @@ -1540,26 +1540,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 4146, + "id": 5085, "name": "contractAddressToUserAddressToQtyLocked", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4102, - "src": "2430:39:20", + "referencedDeclaration": 5041, + "src": "2430:39:24", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", "typeString": "mapping(address => mapping(address => uint256))" } }, - "id": 4148, + "id": 5087, "indexExpression": { "argumentTypes": null, - "id": 4147, + "id": 5086, "name": "marketContractAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4139, - "src": "2470:21:20", + "referencedDeclaration": 5078, + "src": "2470:21:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -1570,21 +1570,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "2430:62:20", + "src": "2430:62:24", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, - "id": 4150, + "id": 5089, "indexExpression": { "argumentTypes": null, - "id": 4149, + "id": 5088, "name": "userAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4141, - "src": "2493:11:20", + "referencedDeclaration": 5080, + "src": "2493:11:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -1595,7 +1595,7 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "2430:75:20", + "src": "2430:75:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1605,32 +1605,32 @@ "operator": ">=", "rightExpression": { "argumentTypes": null, - "id": 4151, + "id": 5090, "name": "lockQtyToAllowTrading", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4094, - "src": "2509:21:20", + "referencedDeclaration": 5033, + "src": "2509:21:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "2430:100:20", + "src": "2430:100:24", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "functionReturnParameters": 4145, - "id": 4153, + "functionReturnParameters": 5084, + "id": 5092, "nodeType": "Return", - "src": "2423:107:20" + "src": "2423:107:24" } ] }, "documentation": "@notice checks if a user address has locked the needed qty to allow trading to a given contract address\n @param marketContractAddress address of the MarketContract\n @param userAddress address of the user\n @return true if user has locked tokens to trade the supplied marketContractAddress", - "id": 4155, + "id": 5094, "implemented": true, "isConstructor": false, "isDeclaredConst": true, @@ -1638,16 +1638,16 @@ "name": "isUserEnabledForContract", "nodeType": "FunctionDefinition", "parameters": { - "id": 4142, + "id": 5081, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 4139, + "id": 5078, "name": "marketContractAddress", "nodeType": "VariableDeclaration", - "scope": 4155, - "src": "2332:29:20", + "scope": 5094, + "src": "2332:29:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1655,10 +1655,10 @@ "typeString": "address" }, "typeName": { - "id": 4138, + "id": 5077, "name": "address", "nodeType": "ElementaryTypeName", - "src": "2332:7:20", + "src": "2332:7:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -1669,11 +1669,11 @@ }, { "constant": false, - "id": 4141, + "id": 5080, "name": "userAddress", "nodeType": "VariableDeclaration", - "scope": 4155, - "src": "2363:19:20", + "scope": 5094, + "src": "2363:19:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1681,10 +1681,10 @@ "typeString": "address" }, "typeName": { - "id": 4140, + "id": 5079, "name": "address", "nodeType": "ElementaryTypeName", - "src": "2363:7:20", + "src": "2363:7:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -1694,20 +1694,20 @@ "visibility": "internal" } ], - "src": "2331:52:20" + "src": "2331:52:24" }, "payable": false, "returnParameters": { - "id": 4145, + "id": 5084, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 4144, + "id": 5083, "name": "", "nodeType": "VariableDeclaration", - "scope": 4155, - "src": "2407:4:20", + "scope": 5094, + "src": "2407:4:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1715,10 +1715,10 @@ "typeString": "bool" }, "typeName": { - "id": 4143, + "id": 5082, "name": "bool", "nodeType": "ElementaryTypeName", - "src": "2407:4:20", + "src": "2407:4:24", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -1728,19 +1728,19 @@ "visibility": "internal" } ], - "src": "2406:6:20" + "src": "2406:6:24" }, - "scope": 4328, - "src": "2298:239:20", + "scope": 5267, + "src": "2298:239:24", "stateMutability": "view", "superFunction": null, "visibility": "external" }, { "body": { - "id": 4168, + "id": 5107, "nodeType": "Block", - "src": "2852:82:20", + "src": "2852:82:24", "statements": [ { "expression": { @@ -1749,7 +1749,7 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 4166, + "id": 5105, "isConstant": false, "isLValue": false, "isPure": false, @@ -1758,26 +1758,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 4162, + "id": 5101, "name": "balances", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4641, - "src": "2869:8:20", + "referencedDeclaration": 7096, + "src": "2869:8:24", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, - "id": 4164, + "id": 5103, "indexExpression": { "argumentTypes": null, - "id": 4163, + "id": 5102, "name": "userAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4157, - "src": "2878:11:20", + "referencedDeclaration": 5096, + "src": "2878:11:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -1788,7 +1788,7 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "2869:21:20", + "src": "2869:21:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1798,32 +1798,32 @@ "operator": ">=", "rightExpression": { "argumentTypes": null, - "id": 4165, + "id": 5104, "name": "minBalanceToAllowContractCreation", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4096, - "src": "2894:33:20", + "referencedDeclaration": 5035, + "src": "2894:33:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "2869:58:20", + "src": "2869:58:24", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "functionReturnParameters": 4161, - "id": 4167, + "functionReturnParameters": 5100, + "id": 5106, "nodeType": "Return", - "src": "2862:65:20" + "src": "2862:65:24" } ] }, "documentation": "@notice checks if a user address has enough token balance to be eligible to create a contract\n @param userAddress address of the user\n @return true if user has sufficient balance of tokens", - "id": 4169, + "id": 5108, "implemented": true, "isConstructor": false, "isDeclaredConst": true, @@ -1831,16 +1831,16 @@ "name": "isBalanceSufficientForContractCreation", "nodeType": "FunctionDefinition", "parameters": { - "id": 4158, + "id": 5097, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 4157, + "id": 5096, "name": "userAddress", "nodeType": "VariableDeclaration", - "scope": 4169, - "src": "2802:19:20", + "scope": 5108, + "src": "2802:19:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1848,10 +1848,10 @@ "typeString": "address" }, "typeName": { - "id": 4156, + "id": 5095, "name": "address", "nodeType": "ElementaryTypeName", - "src": "2802:7:20", + "src": "2802:7:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -1861,20 +1861,20 @@ "visibility": "internal" } ], - "src": "2801:21:20" + "src": "2801:21:24" }, "payable": false, "returnParameters": { - "id": 4161, + "id": 5100, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 4160, + "id": 5099, "name": "", "nodeType": "VariableDeclaration", - "scope": 4169, - "src": "2846:4:20", + "scope": 5108, + "src": "2846:4:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1882,10 +1882,10 @@ "typeString": "bool" }, "typeName": { - "id": 4159, + "id": 5098, "name": "bool", "nodeType": "ElementaryTypeName", - "src": "2846:4:20", + "src": "2846:4:24", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -1895,32 +1895,32 @@ "visibility": "internal" } ], - "src": "2845:6:20" + "src": "2845:6:24" }, - "scope": 4328, - "src": "2754:180:20", + "scope": 5267, + "src": "2754:180:24", "stateMutability": "view", "superFunction": null, "visibility": "external" }, { "body": { - "id": 4209, + "id": 5148, "nodeType": "Block", - "src": "3251:376:20", + "src": "3251:376:24", "statements": [ { "assignments": [ - 4177 + 5116 ], "declarations": [ { "constant": false, - "id": 4177, + "id": 5116, "name": "lockedBalance", "nodeType": "VariableDeclaration", - "scope": 4210, - "src": "3261:21:20", + "scope": 5149, + "src": "3261:21:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1928,10 +1928,10 @@ "typeString": "uint256" }, "typeName": { - "id": 4176, + "id": 5115, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "3261:7:20", + "src": "3261:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1941,18 +1941,18 @@ "visibility": "internal" } ], - "id": 4187, + "id": 5126, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, - "id": 4185, + "id": 5124, "name": "qtyToLock", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4173, - "src": "3377:9:20", + "referencedDeclaration": 5112, + "src": "3377:9:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1972,26 +1972,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 4178, + "id": 5117, "name": "contractAddressToUserAddressToQtyLocked", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4102, - "src": "3285:39:20", + "referencedDeclaration": 5041, + "src": "3285:39:24", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", "typeString": "mapping(address => mapping(address => uint256))" } }, - "id": 4180, + "id": 5119, "indexExpression": { "argumentTypes": null, - "id": 4179, + "id": 5118, "name": "marketContractAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4171, - "src": "3325:21:20", + "referencedDeclaration": 5110, + "src": "3325:21:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -2002,29 +2002,29 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "3285:62:20", + "src": "3285:62:24", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, - "id": 4183, + "id": 5122, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 4181, + "id": 5120, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 5193, - "src": "3348:3:20", + "referencedDeclaration": 8183, + "src": "3348:3:24", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 4182, + "id": 5121, "isConstant": false, "isLValue": false, "isPure": false, @@ -2032,7 +2032,7 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "3348:10:20", + "src": "3348:10:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -2043,27 +2043,27 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "3285:74:20", + "src": "3285:74:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 4184, + "id": 5123, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "add", "nodeType": "MemberAccess", - "referencedDeclaration": 4571, - "src": "3285:78:20", + "referencedDeclaration": 7026, + "src": "3285:78:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, - "id": 4186, + "id": 5125, "isConstant": false, "isLValue": false, "isPure": false, @@ -2071,14 +2071,14 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3285:111:20", + "src": "3285:111:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", - "src": "3261:135:20" + "src": "3261:135:24" }, { "expression": { @@ -2086,25 +2086,25 @@ "arguments": [ { "argumentTypes": null, - "id": 4189, + "id": 5128, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 5230, - "src": "3415:4:20", + "referencedDeclaration": 8232, + "src": "3415:4:24", "typeDescriptions": { - "typeIdentifier": "t_contract$_MarketToken_$4328", + "typeIdentifier": "t_contract$_MarketToken_$5267", "typeString": "contract MarketToken" } }, { "argumentTypes": null, - "id": 4190, + "id": 5129, "name": "qtyToLock", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4173, - "src": "3421:9:20", + "referencedDeclaration": 5112, + "src": "3421:9:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2114,7 +2114,7 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_contract$_MarketToken_$4328", + "typeIdentifier": "t_contract$_MarketToken_$5267", "typeString": "contract MarketToken" }, { @@ -2122,20 +2122,20 @@ "typeString": "uint256" } ], - "id": 4188, + "id": 5127, "name": "transfer", "nodeType": "Identifier", "overloadedDeclarations": [ - 4711 + 7166 ], - "referencedDeclaration": 4711, - "src": "3406:8:20", + "referencedDeclaration": 7166, + "src": "3406:8:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", "typeString": "function (address,uint256) returns (bool)" } }, - "id": 4191, + "id": 5130, "isConstant": false, "isLValue": false, "isPure": false, @@ -2143,20 +2143,20 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3406:25:20", + "src": "3406:25:24", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 4192, + "id": 5131, "nodeType": "ExpressionStatement", - "src": "3406:25:20" + "src": "3406:25:24" }, { "expression": { "argumentTypes": null, - "id": 4200, + "id": 5139, "isConstant": false, "isLValue": false, "isPure": false, @@ -2167,26 +2167,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 4193, + "id": 5132, "name": "contractAddressToUserAddressToQtyLocked", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4102, - "src": "3441:39:20", + "referencedDeclaration": 5041, + "src": "3441:39:24", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", "typeString": "mapping(address => mapping(address => uint256))" } }, - "id": 4197, + "id": 5136, "indexExpression": { "argumentTypes": null, - "id": 4194, + "id": 5133, "name": "marketContractAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4171, - "src": "3481:21:20", + "referencedDeclaration": 5110, + "src": "3481:21:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -2197,29 +2197,29 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "3441:62:20", + "src": "3441:62:24", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, - "id": 4198, + "id": 5137, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 4195, + "id": 5134, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 5193, - "src": "3504:3:20", + "referencedDeclaration": 8183, + "src": "3504:3:24", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 4196, + "id": 5135, "isConstant": false, "isLValue": false, "isPure": false, @@ -2227,7 +2227,7 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "3504:10:20", + "src": "3504:10:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -2238,7 +2238,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "3441:74:20", + "src": "3441:74:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2248,26 +2248,26 @@ "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 4199, + "id": 5138, "name": "lockedBalance", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4177, - "src": "3518:13:20", + "referencedDeclaration": 5116, + "src": "3518:13:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "3441:90:20", + "src": "3441:90:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 4201, + "id": 5140, "nodeType": "ExpressionStatement", - "src": "3441:90:20" + "src": "3441:90:24" }, { "eventCall": { @@ -2275,12 +2275,12 @@ "arguments": [ { "argumentTypes": null, - "id": 4203, + "id": 5142, "name": "marketContractAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4171, - "src": "3571:21:20", + "referencedDeclaration": 5110, + "src": "3571:21:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -2290,18 +2290,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 4204, + "id": 5143, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 5193, - "src": "3594:3:20", + "referencedDeclaration": 8183, + "src": "3594:3:24", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 4205, + "id": 5144, "isConstant": false, "isLValue": false, "isPure": false, @@ -2309,7 +2309,7 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "3594:10:20", + "src": "3594:10:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -2317,12 +2317,12 @@ }, { "argumentTypes": null, - "id": 4206, + "id": 5145, "name": "lockedBalance", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4177, - "src": "3606:13:20", + "referencedDeclaration": 5116, + "src": "3606:13:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2344,18 +2344,18 @@ "typeString": "uint256" } ], - "id": 4202, + "id": 5141, "name": "UpdatedUserLockedBalance", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4110, - "src": "3546:24:20", + "referencedDeclaration": 5049, + "src": "3546:24:24", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,address,uint256)" } }, - "id": 4207, + "id": 5146, "isConstant": false, "isLValue": false, "isPure": false, @@ -2363,20 +2363,20 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3546:74:20", + "src": "3546:74:24", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 4208, + "id": 5147, "nodeType": "EmitStatement", - "src": "3541:79:20" + "src": "3541:79:24" } ] }, "documentation": "@notice allows user to lock tokens to enable trading for a given market contract\n @param marketContractAddress address of the MarketContract\n @param qtyToLock desired qty of tokens to lock", - "id": 4210, + "id": 5149, "implemented": true, "isConstructor": false, "isDeclaredConst": false, @@ -2384,16 +2384,16 @@ "name": "lockTokensForTradingMarketContract", "nodeType": "FunctionDefinition", "parameters": { - "id": 4174, + "id": 5113, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 4171, + "id": 5110, "name": "marketContractAddress", "nodeType": "VariableDeclaration", - "scope": 4210, - "src": "3195:29:20", + "scope": 5149, + "src": "3195:29:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2401,10 +2401,10 @@ "typeString": "address" }, "typeName": { - "id": 4170, + "id": 5109, "name": "address", "nodeType": "ElementaryTypeName", - "src": "3195:7:20", + "src": "3195:7:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -2415,11 +2415,11 @@ }, { "constant": false, - "id": 4173, + "id": 5112, "name": "qtyToLock", "nodeType": "VariableDeclaration", - "scope": 4210, - "src": "3226:14:20", + "scope": 5149, + "src": "3226:14:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2427,10 +2427,10 @@ "typeString": "uint256" }, "typeName": { - "id": 4172, + "id": 5111, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "3226:4:20", + "src": "3226:4:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2440,39 +2440,39 @@ "visibility": "internal" } ], - "src": "3194:47:20" + "src": "3194:47:24" }, "payable": false, "returnParameters": { - "id": 4175, + "id": 5114, "nodeType": "ParameterList", "parameters": [], - "src": "3251:0:20" + "src": "3251:0:24" }, - "scope": 4328, - "src": "3151:476:20", + "scope": 5267, + "src": "3151:476:24", "stateMutability": "nonpayable", "superFunction": null, "visibility": "external" }, { "body": { - "id": 4249, + "id": 5188, "nodeType": "Block", - "src": "3933:537:20", + "src": "3933:602:24", "statements": [ { "assignments": [ - 4218 + 5157 ], "declarations": [ { "constant": false, - "id": 4218, + "id": 5157, "name": "balanceAfterUnLock", "nodeType": "VariableDeclaration", - "scope": 4250, - "src": "3943:26:20", + "scope": 5189, + "src": "3943:26:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2480,10 +2480,10 @@ "typeString": "uint256" }, "typeName": { - "id": 4217, + "id": 5156, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "3943:7:20", + "src": "3943:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2493,18 +2493,18 @@ "visibility": "internal" } ], - "id": 4228, + "id": 5167, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, - "id": 4226, + "id": 5165, "name": "qtyToUnlock", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4214, - "src": "4064:11:20", + "referencedDeclaration": 5153, + "src": "4064:11:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2524,26 +2524,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 4219, + "id": 5158, "name": "contractAddressToUserAddressToQtyLocked", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4102, - "src": "3972:39:20", + "referencedDeclaration": 5041, + "src": "3972:39:24", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", "typeString": "mapping(address => mapping(address => uint256))" } }, - "id": 4221, + "id": 5160, "indexExpression": { "argumentTypes": null, - "id": 4220, + "id": 5159, "name": "marketContractAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4212, - "src": "4012:21:20", + "referencedDeclaration": 5151, + "src": "4012:21:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -2554,29 +2554,29 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "3972:62:20", + "src": "3972:62:24", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, - "id": 4224, + "id": 5163, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 4222, + "id": 5161, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 5193, - "src": "4035:3:20", + "referencedDeclaration": 8183, + "src": "4035:3:24", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 4223, + "id": 5162, "isConstant": false, "isLValue": false, "isPure": false, @@ -2584,7 +2584,7 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "4035:10:20", + "src": "4035:10:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -2595,27 +2595,27 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "3972:74:20", + "src": "3972:74:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 4225, + "id": 5164, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sub", "nodeType": "MemberAccess", - "referencedDeclaration": 4547, - "src": "3972:78:20", + "referencedDeclaration": 7002, + "src": "3972:78:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, - "id": 4227, + "id": 5166, "isConstant": false, "isLValue": false, "isPure": false, @@ -2623,19 +2623,19 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3972:113:20", + "src": "3972:113:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", - "src": "3943:142:20" + "src": "3943:142:24" }, { "expression": { "argumentTypes": null, - "id": 4236, + "id": 5175, "isConstant": false, "isLValue": false, "isPure": false, @@ -2646,26 +2646,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 4229, + "id": 5168, "name": "contractAddressToUserAddressToQtyLocked", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4102, - "src": "4221:39:20", + "referencedDeclaration": 5041, + "src": "4286:39:24", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", "typeString": "mapping(address => mapping(address => uint256))" } }, - "id": 4233, + "id": 5172, "indexExpression": { "argumentTypes": null, - "id": 4230, + "id": 5169, "name": "marketContractAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4212, - "src": "4261:21:20", + "referencedDeclaration": 5151, + "src": "4326:21:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -2676,29 +2676,29 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "4221:62:20", + "src": "4286:62:24", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, - "id": 4234, + "id": 5173, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 4231, + "id": 5170, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 5193, - "src": "4284:3:20", + "referencedDeclaration": 8183, + "src": "4349:3:24", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 4232, + "id": 5171, "isConstant": false, "isLValue": false, "isPure": false, @@ -2706,7 +2706,7 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "4284:10:20", + "src": "4349:10:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -2717,7 +2717,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "4221:74:20", + "src": "4286:74:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2727,26 +2727,26 @@ "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 4235, + "id": 5174, "name": "balanceAfterUnLock", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4218, - "src": "4298:18:20", + "referencedDeclaration": 5157, + "src": "4363:18:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "4221:95:20", + "src": "4286:95:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 4237, + "id": 5176, "nodeType": "ExpressionStatement", - "src": "4221:95:20" + "src": "4286:95:24" }, { "expression": { @@ -2754,12 +2754,12 @@ "arguments": [ { "argumentTypes": null, - "id": 4239, + "id": 5178, "name": "qtyToUnlock", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4214, - "src": "4357:11:20", + "referencedDeclaration": 5153, + "src": "4422:11:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2773,18 +2773,18 @@ "typeString": "uint256" } ], - "id": 4238, + "id": 5177, "name": "transferLockedTokensBackToUser", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4327, - "src": "4326:30:20", + "referencedDeclaration": 5266, + "src": "4391:30:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", "typeString": "function (uint256)" } }, - "id": 4240, + "id": 5179, "isConstant": false, "isLValue": false, "isPure": false, @@ -2792,15 +2792,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "4326:43:20", + "src": "4391:43:24", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 4241, + "id": 5180, "nodeType": "ExpressionStatement", - "src": "4326:43:20" + "src": "4391:43:24" }, { "eventCall": { @@ -2808,12 +2808,12 @@ "arguments": [ { "argumentTypes": null, - "id": 4243, + "id": 5182, "name": "marketContractAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4212, - "src": "4409:21:20", + "referencedDeclaration": 5151, + "src": "4474:21:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -2823,18 +2823,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 4244, + "id": 5183, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 5193, - "src": "4432:3:20", + "referencedDeclaration": 8183, + "src": "4497:3:24", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 4245, + "id": 5184, "isConstant": false, "isLValue": false, "isPure": false, @@ -2842,7 +2842,7 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "4432:10:20", + "src": "4497:10:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -2850,12 +2850,12 @@ }, { "argumentTypes": null, - "id": 4246, + "id": 5185, "name": "balanceAfterUnLock", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4218, - "src": "4444:18:20", + "referencedDeclaration": 5157, + "src": "4509:18:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2877,18 +2877,18 @@ "typeString": "uint256" } ], - "id": 4242, + "id": 5181, "name": "UpdatedUserLockedBalance", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4110, - "src": "4384:24:20", + "referencedDeclaration": 5049, + "src": "4449:24:24", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,address,uint256)" } }, - "id": 4247, + "id": 5186, "isConstant": false, "isLValue": false, "isPure": false, @@ -2896,20 +2896,20 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "4384:79:20", + "src": "4449:79:24", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 4248, + "id": 5187, "nodeType": "EmitStatement", - "src": "4379:84:20" + "src": "4444:84:24" } ] }, "documentation": "@notice allows user to unlock tokens previously allocated to trading a MarketContract\n @param marketContractAddress address of the MarketContract\n @param qtyToUnlock desired qty of tokens to unlock", - "id": 4250, + "id": 5189, "implemented": true, "isConstructor": false, "isDeclaredConst": false, @@ -2917,16 +2917,16 @@ "name": "unlockTokens", "nodeType": "FunctionDefinition", "parameters": { - "id": 4215, + "id": 5154, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 4212, + "id": 5151, "name": "marketContractAddress", "nodeType": "VariableDeclaration", - "scope": 4250, - "src": "3875:29:20", + "scope": 5189, + "src": "3875:29:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2934,10 +2934,10 @@ "typeString": "address" }, "typeName": { - "id": 4211, + "id": 5150, "name": "address", "nodeType": "ElementaryTypeName", - "src": "3875:7:20", + "src": "3875:7:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -2948,11 +2948,11 @@ }, { "constant": false, - "id": 4214, + "id": 5153, "name": "qtyToUnlock", "nodeType": "VariableDeclaration", - "scope": 4250, - "src": "3906:16:20", + "scope": 5189, + "src": "3906:16:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2960,10 +2960,10 @@ "typeString": "uint256" }, "typeName": { - "id": 4213, + "id": 5152, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "3906:4:20", + "src": "3906:4:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2973,26 +2973,26 @@ "visibility": "internal" } ], - "src": "3874:49:20" + "src": "3874:49:24" }, "payable": false, "returnParameters": { - "id": 4216, + "id": 5155, "nodeType": "ParameterList", "parameters": [], - "src": "3933:0:20" + "src": "3933:0:24" }, - "scope": 4328, - "src": "3853:617:20", + "scope": 5267, + "src": "3853:682:24", "stateMutability": "nonpayable", "superFunction": null, "visibility": "external" }, { "body": { - "id": 4265, + "id": 5204, "nodeType": "Block", - "src": "4835:99:20", + "src": "4900:99:24", "statements": [ { "expression": { @@ -3001,26 +3001,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 4259, + "id": 5198, "name": "contractAddressToUserAddressToQtyLocked", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4102, - "src": "4852:39:20", + "referencedDeclaration": 5041, + "src": "4917:39:24", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", "typeString": "mapping(address => mapping(address => uint256))" } }, - "id": 4261, + "id": 5200, "indexExpression": { "argumentTypes": null, - "id": 4260, + "id": 5199, "name": "marketContractAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4252, - "src": "4892:21:20", + "referencedDeclaration": 5191, + "src": "4957:21:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -3031,21 +3031,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "4852:62:20", + "src": "4917:62:24", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, - "id": 4263, + "id": 5202, "indexExpression": { "argumentTypes": null, - "id": 4262, + "id": 5201, "name": "userAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4254, - "src": "4915:11:20", + "referencedDeclaration": 5193, + "src": "4980:11:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -3056,21 +3056,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "4852:75:20", + "src": "4917:75:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "functionReturnParameters": 4258, - "id": 4264, + "functionReturnParameters": 5197, + "id": 5203, "nodeType": "Return", - "src": "4845:82:20" + "src": "4910:82:24" } ] }, "documentation": "@notice get the currently locked balance for a user given the specific contract address\n @param marketContractAddress address of the MarketContract\n @param userAddress address of the user\n @return the locked balance", - "id": 4266, + "id": 5205, "implemented": true, "isConstructor": false, "isDeclaredConst": true, @@ -3078,16 +3078,16 @@ "name": "getLockedBalanceForUser", "nodeType": "FunctionDefinition", "parameters": { - "id": 4255, + "id": 5194, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 4252, + "id": 5191, "name": "marketContractAddress", "nodeType": "VariableDeclaration", - "scope": 4266, - "src": "4754:29:20", + "scope": 5205, + "src": "4819:29:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3095,10 +3095,10 @@ "typeString": "address" }, "typeName": { - "id": 4251, + "id": 5190, "name": "address", "nodeType": "ElementaryTypeName", - "src": "4754:7:20", + "src": "4819:7:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -3109,11 +3109,11 @@ }, { "constant": false, - "id": 4254, + "id": 5193, "name": "userAddress", "nodeType": "VariableDeclaration", - "scope": 4266, - "src": "4785:19:20", + "scope": 5205, + "src": "4850:19:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3121,10 +3121,10 @@ "typeString": "address" }, "typeName": { - "id": 4253, + "id": 5192, "name": "address", "nodeType": "ElementaryTypeName", - "src": "4785:7:20", + "src": "4850:7:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -3134,20 +3134,20 @@ "visibility": "internal" } ], - "src": "4753:52:20" + "src": "4818:52:24" }, "payable": false, "returnParameters": { - "id": 4258, + "id": 5197, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 4257, + "id": 5196, "name": "", "nodeType": "VariableDeclaration", - "scope": 4266, - "src": "4829:4:20", + "scope": 5205, + "src": "4894:4:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3155,10 +3155,10 @@ "typeString": "uint256" }, "typeName": { - "id": 4256, + "id": 5195, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "4829:4:20", + "src": "4894:4:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3168,36 +3168,36 @@ "visibility": "internal" } ], - "src": "4828:6:20" + "src": "4893:6:24" }, - "scope": 4328, - "src": "4721:213:20", + "scope": 5267, + "src": "4786:213:24", "stateMutability": "view", "superFunction": null, "visibility": "external" }, { "body": { - "id": 4277, + "id": 5216, "nodeType": "Block", - "src": "5249:50:20", + "src": "5314:50:24", "statements": [ { "expression": { "argumentTypes": null, - "id": 4275, + "id": 5214, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 4273, + "id": 5212, "name": "lockQtyToAllowTrading", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4094, - "src": "5259:21:20", + "referencedDeclaration": 5033, + "src": "5324:21:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3207,68 +3207,68 @@ "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 4274, + "id": 5213, "name": "qtyToLock", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4268, - "src": "5283:9:20", + "referencedDeclaration": 5207, + "src": "5348:9:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "5259:33:20", + "src": "5324:33:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 4276, + "id": 5215, "nodeType": "ExpressionStatement", - "src": "5259:33:20" + "src": "5324:33:24" } ] }, "documentation": "@notice allows the creator to set the qty each user address needs to lock in\n order to trade a given MarketContract\n @param qtyToLock qty needed to enable trading", - "id": 4278, + "id": 5217, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [ { "arguments": null, - "id": 4271, + "id": 5210, "modifierName": { "argumentTypes": null, - "id": 4270, + "id": 5209, "name": "onlyOwner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4602, - "src": "5239:9:20", + "referencedDeclaration": 7057, + "src": "5304:9:24", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", - "src": "5239:9:20" + "src": "5304:9:24" } ], "name": "setLockQtyToAllowTrading", "nodeType": "FunctionDefinition", "parameters": { - "id": 4269, + "id": 5208, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 4268, + "id": 5207, "name": "qtyToLock", "nodeType": "VariableDeclaration", - "scope": 4278, - "src": "5214:14:20", + "scope": 5217, + "src": "5279:14:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3276,10 +3276,10 @@ "typeString": "uint256" }, "typeName": { - "id": 4267, + "id": 5206, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "5214:4:20", + "src": "5279:4:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3289,43 +3289,43 @@ "visibility": "internal" } ], - "src": "5213:16:20" + "src": "5278:16:24" }, "payable": false, "returnParameters": { - "id": 4272, + "id": 5211, "nodeType": "ParameterList", "parameters": [], - "src": "5249:0:20" + "src": "5314:0:24" }, - "scope": 4328, - "src": "5180:119:20", + "scope": 5267, + "src": "5245:119:24", "stateMutability": "nonpayable", "superFunction": null, "visibility": "external" }, { "body": { - "id": 4289, + "id": 5228, "nodeType": "Block", - "src": "5555:63:20", + "src": "5620:63:24", "statements": [ { "expression": { "argumentTypes": null, - "id": 4287, + "id": 5226, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 4285, + "id": 5224, "name": "minBalanceToAllowContractCreation", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4096, - "src": "5565:33:20", + "referencedDeclaration": 5035, + "src": "5630:33:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3335,68 +3335,68 @@ "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 4286, + "id": 5225, "name": "minBalance", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4280, - "src": "5601:10:20", + "referencedDeclaration": 5219, + "src": "5666:10:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "5565:46:20", + "src": "5630:46:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 4288, + "id": 5227, "nodeType": "ExpressionStatement", - "src": "5565:46:20" + "src": "5630:46:24" } ] }, "documentation": "@notice allows the creator to set minimum balance a user must have in order to create MarketContracts\n @param minBalance balance to enable contract creation", - "id": 4290, + "id": 5229, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [ { "arguments": null, - "id": 4283, + "id": 5222, "modifierName": { "argumentTypes": null, - "id": 4282, + "id": 5221, "name": "onlyOwner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4602, - "src": "5545:9:20", + "referencedDeclaration": 7057, + "src": "5610:9:24", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", - "src": "5545:9:20" + "src": "5610:9:24" } ], "name": "setMinBalanceForContractCreation", "nodeType": "FunctionDefinition", "parameters": { - "id": 4281, + "id": 5220, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 4280, + "id": 5219, "name": "minBalance", "nodeType": "VariableDeclaration", - "scope": 4290, - "src": "5519:15:20", + "scope": 5229, + "src": "5584:15:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3404,10 +3404,10 @@ "typeString": "uint256" }, "typeName": { - "id": 4279, + "id": 5218, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "5519:4:20", + "src": "5584:4:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3417,31 +3417,31 @@ "visibility": "internal" } ], - "src": "5518:17:20" + "src": "5583:17:24" }, "payable": false, "returnParameters": { - "id": 4284, + "id": 5223, "nodeType": "ParameterList", "parameters": [], - "src": "5555:0:20" + "src": "5620:0:24" }, - "scope": 4328, - "src": "5477:141:20", + "scope": 5267, + "src": "5542:141:24", "stateMutability": "nonpayable", "superFunction": null, "visibility": "external" }, { "body": { - "id": 4326, + "id": 5265, "nodeType": "Block", - "src": "5864:189:20", + "src": "5929:189:24", "statements": [ { "expression": { "argumentTypes": null, - "id": 4304, + "id": 5243, "isConstant": false, "isLValue": false, "isPure": false, @@ -3450,28 +3450,28 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 4295, + "id": 5234, "name": "balances", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4641, - "src": "5874:8:20", + "referencedDeclaration": 7096, + "src": "5939:8:24", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, - "id": 4297, + "id": 5236, "indexExpression": { "argumentTypes": null, - "id": 4296, + "id": 5235, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 5230, - "src": "5883:4:20", + "referencedDeclaration": 8232, + "src": "5948:4:24", "typeDescriptions": { - "typeIdentifier": "t_contract$_MarketToken_$4328", + "typeIdentifier": "t_contract$_MarketToken_$5267", "typeString": "contract MarketToken" } }, @@ -3480,7 +3480,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "5874:14:20", + "src": "5939:14:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3493,12 +3493,12 @@ "arguments": [ { "argumentTypes": null, - "id": 4302, + "id": 5241, "name": "qtyToUnlock", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4292, - "src": "5910:11:20", + "referencedDeclaration": 5231, + "src": "5975:11:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3516,28 +3516,28 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 4298, + "id": 5237, "name": "balances", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4641, - "src": "5891:8:20", + "referencedDeclaration": 7096, + "src": "5956:8:24", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, - "id": 4300, + "id": 5239, "indexExpression": { "argumentTypes": null, - "id": 4299, + "id": 5238, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 5230, - "src": "5900:4:20", + "referencedDeclaration": 8232, + "src": "5965:4:24", "typeDescriptions": { - "typeIdentifier": "t_contract$_MarketToken_$4328", + "typeIdentifier": "t_contract$_MarketToken_$5267", "typeString": "contract MarketToken" } }, @@ -3546,27 +3546,27 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "5891:14:20", + "src": "5956:14:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 4301, + "id": 5240, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sub", "nodeType": "MemberAccess", - "referencedDeclaration": 4547, - "src": "5891:18:20", + "referencedDeclaration": 7002, + "src": "5956:18:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, - "id": 4303, + "id": 5242, "isConstant": false, "isLValue": false, "isPure": false, @@ -3574,26 +3574,26 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "5891:31:20", + "src": "5956:31:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "5874:48:20", + "src": "5939:48:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 4305, + "id": 5244, "nodeType": "ExpressionStatement", - "src": "5874:48:20" + "src": "5939:48:24" }, { "expression": { "argumentTypes": null, - "id": 4317, + "id": 5256, "isConstant": false, "isLValue": false, "isPure": false, @@ -3602,34 +3602,34 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 4306, + "id": 5245, "name": "balances", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4641, - "src": "5932:8:20", + "referencedDeclaration": 7096, + "src": "5997:8:24", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, - "id": 4309, + "id": 5248, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 4307, + "id": 5246, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 5193, - "src": "5941:3:20", + "referencedDeclaration": 8183, + "src": "6006:3:24", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 4308, + "id": 5247, "isConstant": false, "isLValue": false, "isPure": false, @@ -3637,7 +3637,7 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "5941:10:20", + "src": "6006:10:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -3648,7 +3648,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "5932:20:20", + "src": "5997:20:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3661,12 +3661,12 @@ "arguments": [ { "argumentTypes": null, - "id": 4315, + "id": 5254, "name": "qtyToUnlock", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4292, - "src": "5980:11:20", + "referencedDeclaration": 5231, + "src": "6045:11:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3684,34 +3684,34 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 4310, + "id": 5249, "name": "balances", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4641, - "src": "5955:8:20", + "referencedDeclaration": 7096, + "src": "6020:8:24", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, - "id": 4313, + "id": 5252, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 4311, + "id": 5250, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 5193, - "src": "5964:3:20", + "referencedDeclaration": 8183, + "src": "6029:3:24", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 4312, + "id": 5251, "isConstant": false, "isLValue": false, "isPure": false, @@ -3719,7 +3719,7 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "5964:10:20", + "src": "6029:10:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -3730,27 +3730,27 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "5955:20:20", + "src": "6020:20:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 4314, + "id": 5253, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "add", "nodeType": "MemberAccess", - "referencedDeclaration": 4571, - "src": "5955:24:20", + "referencedDeclaration": 7026, + "src": "6020:24:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, - "id": 4316, + "id": 5255, "isConstant": false, "isLValue": false, "isPure": false, @@ -3758,21 +3758,21 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "5955:37:20", + "src": "6020:37:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "5932:60:20", + "src": "5997:60:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 4318, + "id": 5257, "nodeType": "ExpressionStatement", - "src": "5932:60:20" + "src": "5997:60:24" }, { "eventCall": { @@ -3780,14 +3780,14 @@ "arguments": [ { "argumentTypes": null, - "id": 4320, + "id": 5259, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 5230, - "src": "6016:4:20", + "referencedDeclaration": 8232, + "src": "6081:4:24", "typeDescriptions": { - "typeIdentifier": "t_contract$_MarketToken_$4328", + "typeIdentifier": "t_contract$_MarketToken_$5267", "typeString": "contract MarketToken" } }, @@ -3795,18 +3795,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 4321, + "id": 5260, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 5193, - "src": "6022:3:20", + "referencedDeclaration": 8183, + "src": "6087:3:24", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 4322, + "id": 5261, "isConstant": false, "isLValue": false, "isPure": false, @@ -3814,7 +3814,7 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "6022:10:20", + "src": "6087:10:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -3822,12 +3822,12 @@ }, { "argumentTypes": null, - "id": 4323, + "id": 5262, "name": "qtyToUnlock", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4292, - "src": "6034:11:20", + "referencedDeclaration": 5231, + "src": "6099:11:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3837,7 +3837,7 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_contract$_MarketToken_$4328", + "typeIdentifier": "t_contract$_MarketToken_$5267", "typeString": "contract MarketToken" }, { @@ -3849,18 +3849,18 @@ "typeString": "uint256" } ], - "id": 4319, + "id": 5258, "name": "Transfer", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4869, - "src": "6007:8:20", + "referencedDeclaration": 7324, + "src": "6072:8:24", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,address,uint256)" } }, - "id": 4324, + "id": 5263, "isConstant": false, "isLValue": false, "isPure": false, @@ -3868,20 +3868,20 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "6007:39:20", + "src": "6072:39:24", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 4325, + "id": 5264, "nodeType": "EmitStatement", - "src": "6002:44:20" + "src": "6067:44:24" } ] }, "documentation": "@dev returns locked balance from this contract to the user's balance\n @param qtyToUnlock qty to return to user's balance", - "id": 4327, + "id": 5266, "implemented": true, "isConstructor": false, "isDeclaredConst": false, @@ -3889,16 +3889,16 @@ "name": "transferLockedTokensBackToUser", "nodeType": "FunctionDefinition", "parameters": { - "id": 4293, + "id": 5232, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 4292, + "id": 5231, "name": "qtyToUnlock", "nodeType": "VariableDeclaration", - "scope": 4327, - "src": "5838:16:20", + "scope": 5266, + "src": "5903:16:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3906,10 +3906,10 @@ "typeString": "uint256" }, "typeName": { - "id": 4291, + "id": 5230, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "5838:4:20", + "src": "5903:4:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3919,40 +3919,40 @@ "visibility": "internal" } ], - "src": "5837:18:20" + "src": "5902:18:24" }, "payable": false, "returnParameters": { - "id": 4294, + "id": 5233, "nodeType": "ParameterList", "parameters": [], - "src": "5864:0:20" + "src": "5929:0:24" }, - "scope": 4328, - "src": "5798:255:20", + "scope": 5267, + "src": "5863:255:24", "stateMutability": "nonpayable", "superFunction": null, "visibility": "private" } ], - "scope": 4329, - "src": "927:5128:20" + "scope": 5268, + "src": "927:5193:24" } ], - "src": "608:5448:20" + "src": "608:5513:24" }, "legacyAST": { - "absolutePath": "/home/pelsasser/MARKETProtocol/contracts/tokens/MarketToken.sol", + "absolutePath": "/home/travis/build/MARKETProtocol/MARKETProtocol/contracts/tokens/MarketToken.sol", "exportedSymbols": { "MarketToken": [ - 4328 + 5267 ] }, - "id": 4329, + "id": 5268, "nodeType": "SourceUnit", "nodes": [ { - "id": 4071, + "id": 5010, "literals": [ "solidity", "^", @@ -3960,16 +3960,16 @@ ".24" ], "nodeType": "PragmaDirective", - "src": "608:24:20" + "src": "608:24:24" }, { - "absolutePath": "/home/pelsasser/MARKETProtocol/contracts/tokens/UpgradableToken.sol", + "absolutePath": "/home/travis/build/MARKETProtocol/MARKETProtocol/contracts/tokens/UpgradableToken.sol", "file": "./UpgradableToken.sol", - "id": 4072, + "id": 5011, "nodeType": "ImportDirective", - "scope": 4329, - "sourceUnit": 4407, - "src": "634:31:20", + "scope": 5268, + "sourceUnit": 5346, + "src": "634:31:24", "symbolAliases": [], "unitAlias": "" }, @@ -3979,54 +3979,54 @@ "arguments": null, "baseName": { "contractScope": null, - "id": 4073, + "id": 5012, "name": "UpgradeableToken", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 4406, - "src": "951:16:20", + "referencedDeclaration": 5345, + "src": "951:16:24", "typeDescriptions": { - "typeIdentifier": "t_contract$_UpgradeableToken_$4406", + "typeIdentifier": "t_contract$_UpgradeableToken_$5345", "typeString": "contract UpgradeableToken" } }, - "id": 4074, + "id": 5013, "nodeType": "InheritanceSpecifier", - "src": "951:16:20" + "src": "951:16:24" } ], "contractDependencies": [ - 4406, - 4628, - 4724, - 4795, - 4838, - 4870, - 5178 + 5345, + 7083, + 7179, + 7250, + 7293, + 7325, + 7633 ], "contractKind": "contract", "documentation": "@title Market Token\n @notice Our membership token. Users must lock tokens to enable trading for a given Market Contract\n as well as have a minimum balance of tokens to create new Market Contracts.\n @author Phil Elsasser ", "fullyImplemented": true, - "id": 4328, + "id": 5267, "linearizedBaseContracts": [ - 4328, - 4406, - 5178, - 4795, - 4724, - 4838, - 4870, - 4628 + 5267, + 5345, + 7633, + 7250, + 7179, + 7293, + 7325, + 7083 ], "name": "MarketToken", "nodeType": "ContractDefinition", "nodes": [ { "constant": true, - "id": 4077, + "id": 5016, "name": "name", "nodeType": "VariableDeclaration", - "scope": 4328, - "src": "975:53:20", + "scope": 5267, + "src": "975:53:24", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -4034,10 +4034,10 @@ "typeString": "string" }, "typeName": { - "id": 4075, + "id": 5014, "name": "string", "nodeType": "ElementaryTypeName", - "src": "975:6:20", + "src": "975:6:24", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" @@ -4046,14 +4046,14 @@ "value": { "argumentTypes": null, "hexValue": "4d41524b45542050726f746f636f6c20546f6b656e", - "id": 4076, + "id": 5015, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "1005:23:20", + "src": "1005:23:24", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_e0bc6dbaee97eab3b4d556c6ffb6e8c59dafb0398d3bd88d72a7f979abb854ce", @@ -4065,11 +4065,11 @@ }, { "constant": true, - "id": 4080, + "id": 5019, "name": "symbol", "nodeType": "VariableDeclaration", - "scope": 4328, - "src": "1034:37:20", + "scope": 5267, + "src": "1034:37:24", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -4077,10 +4077,10 @@ "typeString": "string" }, "typeName": { - "id": 4078, + "id": 5017, "name": "string", "nodeType": "ElementaryTypeName", - "src": "1034:6:20", + "src": "1034:6:24", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" @@ -4089,14 +4089,14 @@ "value": { "argumentTypes": null, "hexValue": "4d4b54", - "id": 4079, + "id": 5018, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "1066:5:20", + "src": "1066:5:24", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_44a9d14916e2f5301f94c3794caf0186ef39fb251e961f913aea7eaeff74b613", @@ -4108,11 +4108,11 @@ }, { "constant": true, - "id": 4083, + "id": 5022, "name": "decimals", "nodeType": "VariableDeclaration", - "scope": 4328, - "src": "1077:35:20", + "scope": 5267, + "src": "1077:35:24", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -4120,10 +4120,10 @@ "typeString": "uint8" }, "typeName": { - "id": 4081, + "id": 5020, "name": "uint8", "nodeType": "ElementaryTypeName", - "src": "1077:5:20", + "src": "1077:5:24", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" @@ -4132,14 +4132,14 @@ "value": { "argumentTypes": null, "hexValue": "3138", - "id": 4082, + "id": 5021, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "1110:2:20", + "src": "1110:2:24", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_18_by_1", @@ -4151,11 +4151,11 @@ }, { "constant": true, - "id": 4092, + "id": 5031, "name": "INITIAL_SUPPLY", "nodeType": "VariableDeclaration", - "scope": 4328, - "src": "1119:68:20", + "scope": 5267, + "src": "1119:68:24", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -4163,10 +4163,10 @@ "typeString": "uint256" }, "typeName": { - "id": 4084, + "id": 5023, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "1119:4:20", + "src": "1119:4:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4178,7 +4178,7 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 4091, + "id": 5030, "isConstant": false, "isLValue": false, "isPure": true, @@ -4186,14 +4186,14 @@ "leftExpression": { "argumentTypes": null, "hexValue": "363030303030303030", - "id": 4085, + "id": 5024, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "1157:9:20", + "src": "1157:9:24", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_600000000_by_1", @@ -4209,7 +4209,7 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 4090, + "id": 5029, "isConstant": false, "isLValue": false, "isPure": true, @@ -4217,14 +4217,14 @@ "leftExpression": { "argumentTypes": null, "hexValue": "3130", - "id": 4086, + "id": 5025, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "1169:2:20", + "src": "1169:2:24", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_10_by_1", @@ -4239,12 +4239,12 @@ "arguments": [ { "argumentTypes": null, - "id": 4088, + "id": 5027, "name": "decimals", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4083, - "src": "1178:8:20", + "referencedDeclaration": 5022, + "src": "1178:8:24", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" @@ -4258,20 +4258,20 @@ "typeString": "uint8" } ], - "id": 4087, + "id": 5026, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "1173:4:20", + "src": "1173:4:24", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)" }, "typeName": "uint" }, - "id": 4089, + "id": 5028, "isConstant": false, "isLValue": false, "isPure": true, @@ -4279,19 +4279,19 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "1173:14:20", + "src": "1173:14:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "1169:18:20", + "src": "1169:18:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "1157:30:20", + "src": "1157:30:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4301,11 +4301,11 @@ }, { "constant": false, - "id": 4094, + "id": 5033, "name": "lockQtyToAllowTrading", "nodeType": "VariableDeclaration", - "scope": 4328, - "src": "1241:33:20", + "scope": 5267, + "src": "1241:33:24", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -4313,10 +4313,10 @@ "typeString": "uint256" }, "typeName": { - "id": 4093, + "id": 5032, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "1241:4:20", + "src": "1241:4:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4327,11 +4327,11 @@ }, { "constant": false, - "id": 4096, + "id": 5035, "name": "minBalanceToAllowContractCreation", "nodeType": "VariableDeclaration", - "scope": 4328, - "src": "1280:45:20", + "scope": 5267, + "src": "1280:45:24", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -4339,10 +4339,10 @@ "typeString": "uint256" }, "typeName": { - "id": 4095, + "id": 5034, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "1280:4:20", + "src": "1280:4:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4353,11 +4353,11 @@ }, { "constant": false, - "id": 4102, + "id": 5041, "name": "contractAddressToUserAddressToQtyLocked", "nodeType": "VariableDeclaration", - "scope": 4328, - "src": "1332:84:20", + "scope": 5267, + "src": "1332:84:24", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -4365,46 +4365,46 @@ "typeString": "mapping(address => mapping(address => uint256))" }, "typeName": { - "id": 4101, + "id": 5040, "keyType": { - "id": 4097, + "id": 5036, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1340:7:20", + "src": "1340:7:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Mapping", - "src": "1332:44:20", + "src": "1332:44:24", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", "typeString": "mapping(address => mapping(address => uint256))" }, "valueType": { - "id": 4100, + "id": 5039, "keyType": { - "id": 4098, + "id": 5037, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1359:7:20", + "src": "1359:7:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Mapping", - "src": "1351:24:20", + "src": "1351:24:24", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" }, "valueType": { - "id": 4099, + "id": 5038, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "1370:4:20", + "src": "1370:4:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4418,21 +4418,21 @@ { "anonymous": false, "documentation": null, - "id": 4110, + "id": 5049, "name": "UpdatedUserLockedBalance", "nodeType": "EventDefinition", "parameters": { - "id": 4109, + "id": 5048, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 4104, + "id": 5043, "indexed": true, "name": "contractAddress", "nodeType": "VariableDeclaration", - "scope": 4110, - "src": "1454:31:20", + "scope": 5049, + "src": "1454:31:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4440,10 +4440,10 @@ "typeString": "address" }, "typeName": { - "id": 4103, + "id": 5042, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1454:7:20", + "src": "1454:7:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -4454,12 +4454,12 @@ }, { "constant": false, - "id": 4106, + "id": 5045, "indexed": true, "name": "userAddress", "nodeType": "VariableDeclaration", - "scope": 4110, - "src": "1487:27:20", + "scope": 5049, + "src": "1487:27:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4467,10 +4467,10 @@ "typeString": "address" }, "typeName": { - "id": 4105, + "id": 5044, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1487:7:20", + "src": "1487:7:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -4481,12 +4481,12 @@ }, { "constant": false, - "id": 4108, + "id": 5047, "indexed": false, "name": "balance", "nodeType": "VariableDeclaration", - "scope": 4110, - "src": "1516:12:20", + "scope": 5049, + "src": "1516:12:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4494,10 +4494,10 @@ "typeString": "uint256" }, "typeName": { - "id": 4107, + "id": 5046, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "1516:4:20", + "src": "1516:4:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4507,32 +4507,32 @@ "visibility": "internal" } ], - "src": "1453:76:20" + "src": "1453:76:24" }, - "src": "1423:107:20" + "src": "1423:107:24" }, { "body": { - "id": 4136, + "id": 5075, "nodeType": "Block", - "src": "1609:327:20", + "src": "1609:327:24", "statements": [ { "expression": { "argumentTypes": null, - "id": 4119, + "id": 5058, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 4117, + "id": 5056, "name": "lockQtyToAllowTrading", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4094, - "src": "1619:21:20", + "referencedDeclaration": 5033, + "src": "1619:21:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4542,43 +4542,43 @@ "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 4118, + "id": 5057, "name": "qtyToLockForTrading", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4112, - "src": "1643:19:20", + "referencedDeclaration": 5051, + "src": "1643:19:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "1619:43:20", + "src": "1619:43:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 4120, + "id": 5059, "nodeType": "ExpressionStatement", - "src": "1619:43:20" + "src": "1619:43:24" }, { "expression": { "argumentTypes": null, - "id": 4123, + "id": 5062, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 4121, + "id": 5060, "name": "minBalanceToAllowContractCreation", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4096, - "src": "1672:33:20", + "referencedDeclaration": 5035, + "src": "1672:33:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4588,43 +4588,43 @@ "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 4122, + "id": 5061, "name": "minBalanceForCreation", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4114, - "src": "1708:21:20", + "referencedDeclaration": 5053, + "src": "1708:21:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "1672:57:20", + "src": "1672:57:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 4124, + "id": 5063, "nodeType": "ExpressionStatement", - "src": "1672:57:20" + "src": "1672:57:24" }, { "expression": { "argumentTypes": null, - "id": 4127, + "id": 5066, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 4125, + "id": 5064, "name": "totalSupply_", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4643, - "src": "1739:12:20", + "referencedDeclaration": 7098, + "src": "1739:12:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4634,31 +4634,31 @@ "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 4126, + "id": 5065, "name": "INITIAL_SUPPLY", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4092, - "src": "1754:14:20", + "referencedDeclaration": 5031, + "src": "1754:14:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "1739:29:20", + "src": "1739:29:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 4128, + "id": 5067, "nodeType": "ExpressionStatement", - "src": "1739:29:20" + "src": "1739:29:24" }, { "expression": { "argumentTypes": null, - "id": 4134, + "id": 5073, "isConstant": false, "isLValue": false, "isPure": false, @@ -4667,34 +4667,34 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 4129, + "id": 5068, "name": "balances", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4641, - "src": "1850:8:20", + "referencedDeclaration": 7096, + "src": "1850:8:24", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, - "id": 4132, + "id": 5071, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 4130, + "id": 5069, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 5193, - "src": "1859:3:20", + "referencedDeclaration": 8183, + "src": "1859:3:24", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 4131, + "id": 5070, "isConstant": false, "isLValue": false, "isPure": false, @@ -4702,7 +4702,7 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "1859:10:20", + "src": "1859:10:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -4713,7 +4713,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "1850:20:20", + "src": "1850:20:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4723,31 +4723,31 @@ "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 4133, + "id": 5072, "name": "INITIAL_SUPPLY", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4092, - "src": "1873:14:20", + "referencedDeclaration": 5031, + "src": "1873:14:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "1850:37:20", + "src": "1850:37:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 4135, + "id": 5074, "nodeType": "ExpressionStatement", - "src": "1850:37:20" + "src": "1850:37:24" } ] }, "documentation": null, - "id": 4137, + "id": 5076, "implemented": true, "isConstructor": true, "isDeclaredConst": false, @@ -4755,16 +4755,16 @@ "name": "", "nodeType": "FunctionDefinition", "parameters": { - "id": 4115, + "id": 5054, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 4112, + "id": 5051, "name": "qtyToLockForTrading", "nodeType": "VariableDeclaration", - "scope": 4137, - "src": "1548:24:20", + "scope": 5076, + "src": "1548:24:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4772,10 +4772,10 @@ "typeString": "uint256" }, "typeName": { - "id": 4111, + "id": 5050, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "1548:4:20", + "src": "1548:4:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4786,11 +4786,11 @@ }, { "constant": false, - "id": 4114, + "id": 5053, "name": "minBalanceForCreation", "nodeType": "VariableDeclaration", - "scope": 4137, - "src": "1574:26:20", + "scope": 5076, + "src": "1574:26:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4798,10 +4798,10 @@ "typeString": "uint256" }, "typeName": { - "id": 4113, + "id": 5052, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "1574:4:20", + "src": "1574:4:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4811,26 +4811,26 @@ "visibility": "internal" } ], - "src": "1547:54:20" + "src": "1547:54:24" }, "payable": false, "returnParameters": { - "id": 4116, + "id": 5055, "nodeType": "ParameterList", "parameters": [], - "src": "1609:0:20" + "src": "1609:0:24" }, - "scope": 4328, - "src": "1536:400:20", + "scope": 5267, + "src": "1536:400:24", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { - "id": 4154, + "id": 5093, "nodeType": "Block", - "src": "2413:124:20", + "src": "2413:124:24", "statements": [ { "expression": { @@ -4839,7 +4839,7 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 4152, + "id": 5091, "isConstant": false, "isLValue": false, "isPure": false, @@ -4850,26 +4850,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 4146, + "id": 5085, "name": "contractAddressToUserAddressToQtyLocked", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4102, - "src": "2430:39:20", + "referencedDeclaration": 5041, + "src": "2430:39:24", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", "typeString": "mapping(address => mapping(address => uint256))" } }, - "id": 4148, + "id": 5087, "indexExpression": { "argumentTypes": null, - "id": 4147, + "id": 5086, "name": "marketContractAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4139, - "src": "2470:21:20", + "referencedDeclaration": 5078, + "src": "2470:21:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -4880,21 +4880,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "2430:62:20", + "src": "2430:62:24", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, - "id": 4150, + "id": 5089, "indexExpression": { "argumentTypes": null, - "id": 4149, + "id": 5088, "name": "userAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4141, - "src": "2493:11:20", + "referencedDeclaration": 5080, + "src": "2493:11:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -4905,7 +4905,7 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "2430:75:20", + "src": "2430:75:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4915,32 +4915,32 @@ "operator": ">=", "rightExpression": { "argumentTypes": null, - "id": 4151, + "id": 5090, "name": "lockQtyToAllowTrading", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4094, - "src": "2509:21:20", + "referencedDeclaration": 5033, + "src": "2509:21:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "2430:100:20", + "src": "2430:100:24", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "functionReturnParameters": 4145, - "id": 4153, + "functionReturnParameters": 5084, + "id": 5092, "nodeType": "Return", - "src": "2423:107:20" + "src": "2423:107:24" } ] }, "documentation": "@notice checks if a user address has locked the needed qty to allow trading to a given contract address\n @param marketContractAddress address of the MarketContract\n @param userAddress address of the user\n @return true if user has locked tokens to trade the supplied marketContractAddress", - "id": 4155, + "id": 5094, "implemented": true, "isConstructor": false, "isDeclaredConst": true, @@ -4948,16 +4948,16 @@ "name": "isUserEnabledForContract", "nodeType": "FunctionDefinition", "parameters": { - "id": 4142, + "id": 5081, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 4139, + "id": 5078, "name": "marketContractAddress", "nodeType": "VariableDeclaration", - "scope": 4155, - "src": "2332:29:20", + "scope": 5094, + "src": "2332:29:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4965,10 +4965,10 @@ "typeString": "address" }, "typeName": { - "id": 4138, + "id": 5077, "name": "address", "nodeType": "ElementaryTypeName", - "src": "2332:7:20", + "src": "2332:7:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -4979,11 +4979,11 @@ }, { "constant": false, - "id": 4141, + "id": 5080, "name": "userAddress", "nodeType": "VariableDeclaration", - "scope": 4155, - "src": "2363:19:20", + "scope": 5094, + "src": "2363:19:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4991,10 +4991,10 @@ "typeString": "address" }, "typeName": { - "id": 4140, + "id": 5079, "name": "address", "nodeType": "ElementaryTypeName", - "src": "2363:7:20", + "src": "2363:7:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -5004,20 +5004,20 @@ "visibility": "internal" } ], - "src": "2331:52:20" + "src": "2331:52:24" }, "payable": false, "returnParameters": { - "id": 4145, + "id": 5084, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 4144, + "id": 5083, "name": "", "nodeType": "VariableDeclaration", - "scope": 4155, - "src": "2407:4:20", + "scope": 5094, + "src": "2407:4:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5025,10 +5025,10 @@ "typeString": "bool" }, "typeName": { - "id": 4143, + "id": 5082, "name": "bool", "nodeType": "ElementaryTypeName", - "src": "2407:4:20", + "src": "2407:4:24", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -5038,19 +5038,19 @@ "visibility": "internal" } ], - "src": "2406:6:20" + "src": "2406:6:24" }, - "scope": 4328, - "src": "2298:239:20", + "scope": 5267, + "src": "2298:239:24", "stateMutability": "view", "superFunction": null, "visibility": "external" }, { "body": { - "id": 4168, + "id": 5107, "nodeType": "Block", - "src": "2852:82:20", + "src": "2852:82:24", "statements": [ { "expression": { @@ -5059,7 +5059,7 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 4166, + "id": 5105, "isConstant": false, "isLValue": false, "isPure": false, @@ -5068,26 +5068,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 4162, + "id": 5101, "name": "balances", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4641, - "src": "2869:8:20", + "referencedDeclaration": 7096, + "src": "2869:8:24", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, - "id": 4164, + "id": 5103, "indexExpression": { "argumentTypes": null, - "id": 4163, + "id": 5102, "name": "userAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4157, - "src": "2878:11:20", + "referencedDeclaration": 5096, + "src": "2878:11:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -5098,7 +5098,7 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "2869:21:20", + "src": "2869:21:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5108,32 +5108,32 @@ "operator": ">=", "rightExpression": { "argumentTypes": null, - "id": 4165, + "id": 5104, "name": "minBalanceToAllowContractCreation", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4096, - "src": "2894:33:20", + "referencedDeclaration": 5035, + "src": "2894:33:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "2869:58:20", + "src": "2869:58:24", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "functionReturnParameters": 4161, - "id": 4167, + "functionReturnParameters": 5100, + "id": 5106, "nodeType": "Return", - "src": "2862:65:20" + "src": "2862:65:24" } ] }, "documentation": "@notice checks if a user address has enough token balance to be eligible to create a contract\n @param userAddress address of the user\n @return true if user has sufficient balance of tokens", - "id": 4169, + "id": 5108, "implemented": true, "isConstructor": false, "isDeclaredConst": true, @@ -5141,16 +5141,16 @@ "name": "isBalanceSufficientForContractCreation", "nodeType": "FunctionDefinition", "parameters": { - "id": 4158, + "id": 5097, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 4157, + "id": 5096, "name": "userAddress", "nodeType": "VariableDeclaration", - "scope": 4169, - "src": "2802:19:20", + "scope": 5108, + "src": "2802:19:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5158,10 +5158,10 @@ "typeString": "address" }, "typeName": { - "id": 4156, + "id": 5095, "name": "address", "nodeType": "ElementaryTypeName", - "src": "2802:7:20", + "src": "2802:7:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -5171,20 +5171,20 @@ "visibility": "internal" } ], - "src": "2801:21:20" + "src": "2801:21:24" }, "payable": false, "returnParameters": { - "id": 4161, + "id": 5100, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 4160, + "id": 5099, "name": "", "nodeType": "VariableDeclaration", - "scope": 4169, - "src": "2846:4:20", + "scope": 5108, + "src": "2846:4:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5192,10 +5192,10 @@ "typeString": "bool" }, "typeName": { - "id": 4159, + "id": 5098, "name": "bool", "nodeType": "ElementaryTypeName", - "src": "2846:4:20", + "src": "2846:4:24", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -5205,32 +5205,32 @@ "visibility": "internal" } ], - "src": "2845:6:20" + "src": "2845:6:24" }, - "scope": 4328, - "src": "2754:180:20", + "scope": 5267, + "src": "2754:180:24", "stateMutability": "view", "superFunction": null, "visibility": "external" }, { "body": { - "id": 4209, + "id": 5148, "nodeType": "Block", - "src": "3251:376:20", + "src": "3251:376:24", "statements": [ { "assignments": [ - 4177 + 5116 ], "declarations": [ { "constant": false, - "id": 4177, + "id": 5116, "name": "lockedBalance", "nodeType": "VariableDeclaration", - "scope": 4210, - "src": "3261:21:20", + "scope": 5149, + "src": "3261:21:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5238,10 +5238,10 @@ "typeString": "uint256" }, "typeName": { - "id": 4176, + "id": 5115, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "3261:7:20", + "src": "3261:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5251,18 +5251,18 @@ "visibility": "internal" } ], - "id": 4187, + "id": 5126, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, - "id": 4185, + "id": 5124, "name": "qtyToLock", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4173, - "src": "3377:9:20", + "referencedDeclaration": 5112, + "src": "3377:9:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5282,26 +5282,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 4178, + "id": 5117, "name": "contractAddressToUserAddressToQtyLocked", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4102, - "src": "3285:39:20", + "referencedDeclaration": 5041, + "src": "3285:39:24", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", "typeString": "mapping(address => mapping(address => uint256))" } }, - "id": 4180, + "id": 5119, "indexExpression": { "argumentTypes": null, - "id": 4179, + "id": 5118, "name": "marketContractAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4171, - "src": "3325:21:20", + "referencedDeclaration": 5110, + "src": "3325:21:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -5312,29 +5312,29 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "3285:62:20", + "src": "3285:62:24", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, - "id": 4183, + "id": 5122, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 4181, + "id": 5120, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 5193, - "src": "3348:3:20", + "referencedDeclaration": 8183, + "src": "3348:3:24", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 4182, + "id": 5121, "isConstant": false, "isLValue": false, "isPure": false, @@ -5342,7 +5342,7 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "3348:10:20", + "src": "3348:10:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -5353,27 +5353,27 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "3285:74:20", + "src": "3285:74:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 4184, + "id": 5123, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "add", "nodeType": "MemberAccess", - "referencedDeclaration": 4571, - "src": "3285:78:20", + "referencedDeclaration": 7026, + "src": "3285:78:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, - "id": 4186, + "id": 5125, "isConstant": false, "isLValue": false, "isPure": false, @@ -5381,14 +5381,14 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3285:111:20", + "src": "3285:111:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", - "src": "3261:135:20" + "src": "3261:135:24" }, { "expression": { @@ -5396,25 +5396,25 @@ "arguments": [ { "argumentTypes": null, - "id": 4189, + "id": 5128, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 5230, - "src": "3415:4:20", + "referencedDeclaration": 8232, + "src": "3415:4:24", "typeDescriptions": { - "typeIdentifier": "t_contract$_MarketToken_$4328", + "typeIdentifier": "t_contract$_MarketToken_$5267", "typeString": "contract MarketToken" } }, { "argumentTypes": null, - "id": 4190, + "id": 5129, "name": "qtyToLock", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4173, - "src": "3421:9:20", + "referencedDeclaration": 5112, + "src": "3421:9:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5424,7 +5424,7 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_contract$_MarketToken_$4328", + "typeIdentifier": "t_contract$_MarketToken_$5267", "typeString": "contract MarketToken" }, { @@ -5432,20 +5432,20 @@ "typeString": "uint256" } ], - "id": 4188, + "id": 5127, "name": "transfer", "nodeType": "Identifier", "overloadedDeclarations": [ - 4711 + 7166 ], - "referencedDeclaration": 4711, - "src": "3406:8:20", + "referencedDeclaration": 7166, + "src": "3406:8:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", "typeString": "function (address,uint256) returns (bool)" } }, - "id": 4191, + "id": 5130, "isConstant": false, "isLValue": false, "isPure": false, @@ -5453,20 +5453,20 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3406:25:20", + "src": "3406:25:24", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 4192, + "id": 5131, "nodeType": "ExpressionStatement", - "src": "3406:25:20" + "src": "3406:25:24" }, { "expression": { "argumentTypes": null, - "id": 4200, + "id": 5139, "isConstant": false, "isLValue": false, "isPure": false, @@ -5477,26 +5477,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 4193, + "id": 5132, "name": "contractAddressToUserAddressToQtyLocked", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4102, - "src": "3441:39:20", + "referencedDeclaration": 5041, + "src": "3441:39:24", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", "typeString": "mapping(address => mapping(address => uint256))" } }, - "id": 4197, + "id": 5136, "indexExpression": { "argumentTypes": null, - "id": 4194, + "id": 5133, "name": "marketContractAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4171, - "src": "3481:21:20", + "referencedDeclaration": 5110, + "src": "3481:21:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -5507,29 +5507,29 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "3441:62:20", + "src": "3441:62:24", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, - "id": 4198, + "id": 5137, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 4195, + "id": 5134, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 5193, - "src": "3504:3:20", + "referencedDeclaration": 8183, + "src": "3504:3:24", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 4196, + "id": 5135, "isConstant": false, "isLValue": false, "isPure": false, @@ -5537,7 +5537,7 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "3504:10:20", + "src": "3504:10:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -5548,7 +5548,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "3441:74:20", + "src": "3441:74:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5558,26 +5558,26 @@ "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 4199, + "id": 5138, "name": "lockedBalance", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4177, - "src": "3518:13:20", + "referencedDeclaration": 5116, + "src": "3518:13:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "3441:90:20", + "src": "3441:90:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 4201, + "id": 5140, "nodeType": "ExpressionStatement", - "src": "3441:90:20" + "src": "3441:90:24" }, { "eventCall": { @@ -5585,12 +5585,12 @@ "arguments": [ { "argumentTypes": null, - "id": 4203, + "id": 5142, "name": "marketContractAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4171, - "src": "3571:21:20", + "referencedDeclaration": 5110, + "src": "3571:21:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -5600,18 +5600,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 4204, + "id": 5143, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 5193, - "src": "3594:3:20", + "referencedDeclaration": 8183, + "src": "3594:3:24", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 4205, + "id": 5144, "isConstant": false, "isLValue": false, "isPure": false, @@ -5619,7 +5619,7 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "3594:10:20", + "src": "3594:10:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -5627,12 +5627,12 @@ }, { "argumentTypes": null, - "id": 4206, + "id": 5145, "name": "lockedBalance", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4177, - "src": "3606:13:20", + "referencedDeclaration": 5116, + "src": "3606:13:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5654,18 +5654,18 @@ "typeString": "uint256" } ], - "id": 4202, + "id": 5141, "name": "UpdatedUserLockedBalance", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4110, - "src": "3546:24:20", + "referencedDeclaration": 5049, + "src": "3546:24:24", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,address,uint256)" } }, - "id": 4207, + "id": 5146, "isConstant": false, "isLValue": false, "isPure": false, @@ -5673,20 +5673,20 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3546:74:20", + "src": "3546:74:24", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 4208, + "id": 5147, "nodeType": "EmitStatement", - "src": "3541:79:20" + "src": "3541:79:24" } ] }, "documentation": "@notice allows user to lock tokens to enable trading for a given market contract\n @param marketContractAddress address of the MarketContract\n @param qtyToLock desired qty of tokens to lock", - "id": 4210, + "id": 5149, "implemented": true, "isConstructor": false, "isDeclaredConst": false, @@ -5694,16 +5694,16 @@ "name": "lockTokensForTradingMarketContract", "nodeType": "FunctionDefinition", "parameters": { - "id": 4174, + "id": 5113, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 4171, + "id": 5110, "name": "marketContractAddress", "nodeType": "VariableDeclaration", - "scope": 4210, - "src": "3195:29:20", + "scope": 5149, + "src": "3195:29:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5711,10 +5711,10 @@ "typeString": "address" }, "typeName": { - "id": 4170, + "id": 5109, "name": "address", "nodeType": "ElementaryTypeName", - "src": "3195:7:20", + "src": "3195:7:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -5725,11 +5725,11 @@ }, { "constant": false, - "id": 4173, + "id": 5112, "name": "qtyToLock", "nodeType": "VariableDeclaration", - "scope": 4210, - "src": "3226:14:20", + "scope": 5149, + "src": "3226:14:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5737,10 +5737,10 @@ "typeString": "uint256" }, "typeName": { - "id": 4172, + "id": 5111, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "3226:4:20", + "src": "3226:4:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5750,39 +5750,39 @@ "visibility": "internal" } ], - "src": "3194:47:20" + "src": "3194:47:24" }, "payable": false, "returnParameters": { - "id": 4175, + "id": 5114, "nodeType": "ParameterList", "parameters": [], - "src": "3251:0:20" + "src": "3251:0:24" }, - "scope": 4328, - "src": "3151:476:20", + "scope": 5267, + "src": "3151:476:24", "stateMutability": "nonpayable", "superFunction": null, "visibility": "external" }, { "body": { - "id": 4249, + "id": 5188, "nodeType": "Block", - "src": "3933:537:20", + "src": "3933:602:24", "statements": [ { "assignments": [ - 4218 + 5157 ], "declarations": [ { "constant": false, - "id": 4218, + "id": 5157, "name": "balanceAfterUnLock", "nodeType": "VariableDeclaration", - "scope": 4250, - "src": "3943:26:20", + "scope": 5189, + "src": "3943:26:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5790,10 +5790,10 @@ "typeString": "uint256" }, "typeName": { - "id": 4217, + "id": 5156, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "3943:7:20", + "src": "3943:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5803,18 +5803,18 @@ "visibility": "internal" } ], - "id": 4228, + "id": 5167, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, - "id": 4226, + "id": 5165, "name": "qtyToUnlock", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4214, - "src": "4064:11:20", + "referencedDeclaration": 5153, + "src": "4064:11:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5834,26 +5834,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 4219, + "id": 5158, "name": "contractAddressToUserAddressToQtyLocked", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4102, - "src": "3972:39:20", + "referencedDeclaration": 5041, + "src": "3972:39:24", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", "typeString": "mapping(address => mapping(address => uint256))" } }, - "id": 4221, + "id": 5160, "indexExpression": { "argumentTypes": null, - "id": 4220, + "id": 5159, "name": "marketContractAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4212, - "src": "4012:21:20", + "referencedDeclaration": 5151, + "src": "4012:21:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -5864,29 +5864,29 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "3972:62:20", + "src": "3972:62:24", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, - "id": 4224, + "id": 5163, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 4222, + "id": 5161, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 5193, - "src": "4035:3:20", + "referencedDeclaration": 8183, + "src": "4035:3:24", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 4223, + "id": 5162, "isConstant": false, "isLValue": false, "isPure": false, @@ -5894,7 +5894,7 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "4035:10:20", + "src": "4035:10:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -5905,27 +5905,27 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "3972:74:20", + "src": "3972:74:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 4225, + "id": 5164, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sub", "nodeType": "MemberAccess", - "referencedDeclaration": 4547, - "src": "3972:78:20", + "referencedDeclaration": 7002, + "src": "3972:78:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, - "id": 4227, + "id": 5166, "isConstant": false, "isLValue": false, "isPure": false, @@ -5933,19 +5933,19 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3972:113:20", + "src": "3972:113:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", - "src": "3943:142:20" + "src": "3943:142:24" }, { "expression": { "argumentTypes": null, - "id": 4236, + "id": 5175, "isConstant": false, "isLValue": false, "isPure": false, @@ -5956,26 +5956,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 4229, + "id": 5168, "name": "contractAddressToUserAddressToQtyLocked", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4102, - "src": "4221:39:20", + "referencedDeclaration": 5041, + "src": "4286:39:24", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", "typeString": "mapping(address => mapping(address => uint256))" } }, - "id": 4233, + "id": 5172, "indexExpression": { "argumentTypes": null, - "id": 4230, + "id": 5169, "name": "marketContractAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4212, - "src": "4261:21:20", + "referencedDeclaration": 5151, + "src": "4326:21:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -5986,29 +5986,29 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "4221:62:20", + "src": "4286:62:24", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, - "id": 4234, + "id": 5173, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 4231, + "id": 5170, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 5193, - "src": "4284:3:20", + "referencedDeclaration": 8183, + "src": "4349:3:24", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 4232, + "id": 5171, "isConstant": false, "isLValue": false, "isPure": false, @@ -6016,7 +6016,7 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "4284:10:20", + "src": "4349:10:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -6027,7 +6027,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "4221:74:20", + "src": "4286:74:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6037,26 +6037,26 @@ "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 4235, + "id": 5174, "name": "balanceAfterUnLock", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4218, - "src": "4298:18:20", + "referencedDeclaration": 5157, + "src": "4363:18:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "4221:95:20", + "src": "4286:95:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 4237, + "id": 5176, "nodeType": "ExpressionStatement", - "src": "4221:95:20" + "src": "4286:95:24" }, { "expression": { @@ -6064,12 +6064,12 @@ "arguments": [ { "argumentTypes": null, - "id": 4239, + "id": 5178, "name": "qtyToUnlock", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4214, - "src": "4357:11:20", + "referencedDeclaration": 5153, + "src": "4422:11:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6083,18 +6083,18 @@ "typeString": "uint256" } ], - "id": 4238, + "id": 5177, "name": "transferLockedTokensBackToUser", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4327, - "src": "4326:30:20", + "referencedDeclaration": 5266, + "src": "4391:30:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", "typeString": "function (uint256)" } }, - "id": 4240, + "id": 5179, "isConstant": false, "isLValue": false, "isPure": false, @@ -6102,15 +6102,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "4326:43:20", + "src": "4391:43:24", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 4241, + "id": 5180, "nodeType": "ExpressionStatement", - "src": "4326:43:20" + "src": "4391:43:24" }, { "eventCall": { @@ -6118,12 +6118,12 @@ "arguments": [ { "argumentTypes": null, - "id": 4243, + "id": 5182, "name": "marketContractAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4212, - "src": "4409:21:20", + "referencedDeclaration": 5151, + "src": "4474:21:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -6133,18 +6133,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 4244, + "id": 5183, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 5193, - "src": "4432:3:20", + "referencedDeclaration": 8183, + "src": "4497:3:24", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 4245, + "id": 5184, "isConstant": false, "isLValue": false, "isPure": false, @@ -6152,7 +6152,7 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "4432:10:20", + "src": "4497:10:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -6160,12 +6160,12 @@ }, { "argumentTypes": null, - "id": 4246, + "id": 5185, "name": "balanceAfterUnLock", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4218, - "src": "4444:18:20", + "referencedDeclaration": 5157, + "src": "4509:18:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6187,18 +6187,18 @@ "typeString": "uint256" } ], - "id": 4242, + "id": 5181, "name": "UpdatedUserLockedBalance", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4110, - "src": "4384:24:20", + "referencedDeclaration": 5049, + "src": "4449:24:24", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,address,uint256)" } }, - "id": 4247, + "id": 5186, "isConstant": false, "isLValue": false, "isPure": false, @@ -6206,20 +6206,20 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "4384:79:20", + "src": "4449:79:24", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 4248, + "id": 5187, "nodeType": "EmitStatement", - "src": "4379:84:20" + "src": "4444:84:24" } ] }, "documentation": "@notice allows user to unlock tokens previously allocated to trading a MarketContract\n @param marketContractAddress address of the MarketContract\n @param qtyToUnlock desired qty of tokens to unlock", - "id": 4250, + "id": 5189, "implemented": true, "isConstructor": false, "isDeclaredConst": false, @@ -6227,16 +6227,16 @@ "name": "unlockTokens", "nodeType": "FunctionDefinition", "parameters": { - "id": 4215, + "id": 5154, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 4212, + "id": 5151, "name": "marketContractAddress", "nodeType": "VariableDeclaration", - "scope": 4250, - "src": "3875:29:20", + "scope": 5189, + "src": "3875:29:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -6244,10 +6244,10 @@ "typeString": "address" }, "typeName": { - "id": 4211, + "id": 5150, "name": "address", "nodeType": "ElementaryTypeName", - "src": "3875:7:20", + "src": "3875:7:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -6258,11 +6258,11 @@ }, { "constant": false, - "id": 4214, + "id": 5153, "name": "qtyToUnlock", "nodeType": "VariableDeclaration", - "scope": 4250, - "src": "3906:16:20", + "scope": 5189, + "src": "3906:16:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -6270,10 +6270,10 @@ "typeString": "uint256" }, "typeName": { - "id": 4213, + "id": 5152, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "3906:4:20", + "src": "3906:4:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6283,26 +6283,26 @@ "visibility": "internal" } ], - "src": "3874:49:20" + "src": "3874:49:24" }, "payable": false, "returnParameters": { - "id": 4216, + "id": 5155, "nodeType": "ParameterList", "parameters": [], - "src": "3933:0:20" + "src": "3933:0:24" }, - "scope": 4328, - "src": "3853:617:20", + "scope": 5267, + "src": "3853:682:24", "stateMutability": "nonpayable", "superFunction": null, "visibility": "external" }, { "body": { - "id": 4265, + "id": 5204, "nodeType": "Block", - "src": "4835:99:20", + "src": "4900:99:24", "statements": [ { "expression": { @@ -6311,26 +6311,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 4259, + "id": 5198, "name": "contractAddressToUserAddressToQtyLocked", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4102, - "src": "4852:39:20", + "referencedDeclaration": 5041, + "src": "4917:39:24", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", "typeString": "mapping(address => mapping(address => uint256))" } }, - "id": 4261, + "id": 5200, "indexExpression": { "argumentTypes": null, - "id": 4260, + "id": 5199, "name": "marketContractAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4252, - "src": "4892:21:20", + "referencedDeclaration": 5191, + "src": "4957:21:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -6341,21 +6341,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "4852:62:20", + "src": "4917:62:24", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, - "id": 4263, + "id": 5202, "indexExpression": { "argumentTypes": null, - "id": 4262, + "id": 5201, "name": "userAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4254, - "src": "4915:11:20", + "referencedDeclaration": 5193, + "src": "4980:11:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -6366,21 +6366,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "4852:75:20", + "src": "4917:75:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "functionReturnParameters": 4258, - "id": 4264, + "functionReturnParameters": 5197, + "id": 5203, "nodeType": "Return", - "src": "4845:82:20" + "src": "4910:82:24" } ] }, "documentation": "@notice get the currently locked balance for a user given the specific contract address\n @param marketContractAddress address of the MarketContract\n @param userAddress address of the user\n @return the locked balance", - "id": 4266, + "id": 5205, "implemented": true, "isConstructor": false, "isDeclaredConst": true, @@ -6388,16 +6388,16 @@ "name": "getLockedBalanceForUser", "nodeType": "FunctionDefinition", "parameters": { - "id": 4255, + "id": 5194, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 4252, + "id": 5191, "name": "marketContractAddress", "nodeType": "VariableDeclaration", - "scope": 4266, - "src": "4754:29:20", + "scope": 5205, + "src": "4819:29:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -6405,10 +6405,10 @@ "typeString": "address" }, "typeName": { - "id": 4251, + "id": 5190, "name": "address", "nodeType": "ElementaryTypeName", - "src": "4754:7:20", + "src": "4819:7:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -6419,11 +6419,11 @@ }, { "constant": false, - "id": 4254, + "id": 5193, "name": "userAddress", "nodeType": "VariableDeclaration", - "scope": 4266, - "src": "4785:19:20", + "scope": 5205, + "src": "4850:19:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -6431,10 +6431,10 @@ "typeString": "address" }, "typeName": { - "id": 4253, + "id": 5192, "name": "address", "nodeType": "ElementaryTypeName", - "src": "4785:7:20", + "src": "4850:7:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -6444,20 +6444,20 @@ "visibility": "internal" } ], - "src": "4753:52:20" + "src": "4818:52:24" }, "payable": false, "returnParameters": { - "id": 4258, + "id": 5197, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 4257, + "id": 5196, "name": "", "nodeType": "VariableDeclaration", - "scope": 4266, - "src": "4829:4:20", + "scope": 5205, + "src": "4894:4:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -6465,10 +6465,10 @@ "typeString": "uint256" }, "typeName": { - "id": 4256, + "id": 5195, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "4829:4:20", + "src": "4894:4:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6478,36 +6478,36 @@ "visibility": "internal" } ], - "src": "4828:6:20" + "src": "4893:6:24" }, - "scope": 4328, - "src": "4721:213:20", + "scope": 5267, + "src": "4786:213:24", "stateMutability": "view", "superFunction": null, "visibility": "external" }, { "body": { - "id": 4277, + "id": 5216, "nodeType": "Block", - "src": "5249:50:20", + "src": "5314:50:24", "statements": [ { "expression": { "argumentTypes": null, - "id": 4275, + "id": 5214, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 4273, + "id": 5212, "name": "lockQtyToAllowTrading", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4094, - "src": "5259:21:20", + "referencedDeclaration": 5033, + "src": "5324:21:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6517,68 +6517,68 @@ "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 4274, + "id": 5213, "name": "qtyToLock", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4268, - "src": "5283:9:20", + "referencedDeclaration": 5207, + "src": "5348:9:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "5259:33:20", + "src": "5324:33:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 4276, + "id": 5215, "nodeType": "ExpressionStatement", - "src": "5259:33:20" + "src": "5324:33:24" } ] }, "documentation": "@notice allows the creator to set the qty each user address needs to lock in\n order to trade a given MarketContract\n @param qtyToLock qty needed to enable trading", - "id": 4278, + "id": 5217, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [ { "arguments": null, - "id": 4271, + "id": 5210, "modifierName": { "argumentTypes": null, - "id": 4270, + "id": 5209, "name": "onlyOwner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4602, - "src": "5239:9:20", + "referencedDeclaration": 7057, + "src": "5304:9:24", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", - "src": "5239:9:20" + "src": "5304:9:24" } ], "name": "setLockQtyToAllowTrading", "nodeType": "FunctionDefinition", "parameters": { - "id": 4269, + "id": 5208, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 4268, + "id": 5207, "name": "qtyToLock", "nodeType": "VariableDeclaration", - "scope": 4278, - "src": "5214:14:20", + "scope": 5217, + "src": "5279:14:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -6586,10 +6586,10 @@ "typeString": "uint256" }, "typeName": { - "id": 4267, + "id": 5206, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "5214:4:20", + "src": "5279:4:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6599,43 +6599,43 @@ "visibility": "internal" } ], - "src": "5213:16:20" + "src": "5278:16:24" }, "payable": false, "returnParameters": { - "id": 4272, + "id": 5211, "nodeType": "ParameterList", "parameters": [], - "src": "5249:0:20" + "src": "5314:0:24" }, - "scope": 4328, - "src": "5180:119:20", + "scope": 5267, + "src": "5245:119:24", "stateMutability": "nonpayable", "superFunction": null, "visibility": "external" }, { "body": { - "id": 4289, + "id": 5228, "nodeType": "Block", - "src": "5555:63:20", + "src": "5620:63:24", "statements": [ { "expression": { "argumentTypes": null, - "id": 4287, + "id": 5226, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 4285, + "id": 5224, "name": "minBalanceToAllowContractCreation", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4096, - "src": "5565:33:20", + "referencedDeclaration": 5035, + "src": "5630:33:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6645,68 +6645,68 @@ "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 4286, + "id": 5225, "name": "minBalance", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4280, - "src": "5601:10:20", + "referencedDeclaration": 5219, + "src": "5666:10:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "5565:46:20", + "src": "5630:46:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 4288, + "id": 5227, "nodeType": "ExpressionStatement", - "src": "5565:46:20" + "src": "5630:46:24" } ] }, "documentation": "@notice allows the creator to set minimum balance a user must have in order to create MarketContracts\n @param minBalance balance to enable contract creation", - "id": 4290, + "id": 5229, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [ { "arguments": null, - "id": 4283, + "id": 5222, "modifierName": { "argumentTypes": null, - "id": 4282, + "id": 5221, "name": "onlyOwner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4602, - "src": "5545:9:20", + "referencedDeclaration": 7057, + "src": "5610:9:24", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", - "src": "5545:9:20" + "src": "5610:9:24" } ], "name": "setMinBalanceForContractCreation", "nodeType": "FunctionDefinition", "parameters": { - "id": 4281, + "id": 5220, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 4280, + "id": 5219, "name": "minBalance", "nodeType": "VariableDeclaration", - "scope": 4290, - "src": "5519:15:20", + "scope": 5229, + "src": "5584:15:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -6714,10 +6714,10 @@ "typeString": "uint256" }, "typeName": { - "id": 4279, + "id": 5218, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "5519:4:20", + "src": "5584:4:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6727,31 +6727,31 @@ "visibility": "internal" } ], - "src": "5518:17:20" + "src": "5583:17:24" }, "payable": false, "returnParameters": { - "id": 4284, + "id": 5223, "nodeType": "ParameterList", "parameters": [], - "src": "5555:0:20" + "src": "5620:0:24" }, - "scope": 4328, - "src": "5477:141:20", + "scope": 5267, + "src": "5542:141:24", "stateMutability": "nonpayable", "superFunction": null, "visibility": "external" }, { "body": { - "id": 4326, + "id": 5265, "nodeType": "Block", - "src": "5864:189:20", + "src": "5929:189:24", "statements": [ { "expression": { "argumentTypes": null, - "id": 4304, + "id": 5243, "isConstant": false, "isLValue": false, "isPure": false, @@ -6760,28 +6760,28 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 4295, + "id": 5234, "name": "balances", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4641, - "src": "5874:8:20", + "referencedDeclaration": 7096, + "src": "5939:8:24", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, - "id": 4297, + "id": 5236, "indexExpression": { "argumentTypes": null, - "id": 4296, + "id": 5235, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 5230, - "src": "5883:4:20", + "referencedDeclaration": 8232, + "src": "5948:4:24", "typeDescriptions": { - "typeIdentifier": "t_contract$_MarketToken_$4328", + "typeIdentifier": "t_contract$_MarketToken_$5267", "typeString": "contract MarketToken" } }, @@ -6790,7 +6790,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "5874:14:20", + "src": "5939:14:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6803,12 +6803,12 @@ "arguments": [ { "argumentTypes": null, - "id": 4302, + "id": 5241, "name": "qtyToUnlock", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4292, - "src": "5910:11:20", + "referencedDeclaration": 5231, + "src": "5975:11:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6826,28 +6826,28 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 4298, + "id": 5237, "name": "balances", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4641, - "src": "5891:8:20", + "referencedDeclaration": 7096, + "src": "5956:8:24", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, - "id": 4300, + "id": 5239, "indexExpression": { "argumentTypes": null, - "id": 4299, + "id": 5238, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 5230, - "src": "5900:4:20", + "referencedDeclaration": 8232, + "src": "5965:4:24", "typeDescriptions": { - "typeIdentifier": "t_contract$_MarketToken_$4328", + "typeIdentifier": "t_contract$_MarketToken_$5267", "typeString": "contract MarketToken" } }, @@ -6856,27 +6856,27 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "5891:14:20", + "src": "5956:14:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 4301, + "id": 5240, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sub", "nodeType": "MemberAccess", - "referencedDeclaration": 4547, - "src": "5891:18:20", + "referencedDeclaration": 7002, + "src": "5956:18:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, - "id": 4303, + "id": 5242, "isConstant": false, "isLValue": false, "isPure": false, @@ -6884,26 +6884,26 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "5891:31:20", + "src": "5956:31:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "5874:48:20", + "src": "5939:48:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 4305, + "id": 5244, "nodeType": "ExpressionStatement", - "src": "5874:48:20" + "src": "5939:48:24" }, { "expression": { "argumentTypes": null, - "id": 4317, + "id": 5256, "isConstant": false, "isLValue": false, "isPure": false, @@ -6912,34 +6912,34 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 4306, + "id": 5245, "name": "balances", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4641, - "src": "5932:8:20", + "referencedDeclaration": 7096, + "src": "5997:8:24", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, - "id": 4309, + "id": 5248, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 4307, + "id": 5246, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 5193, - "src": "5941:3:20", + "referencedDeclaration": 8183, + "src": "6006:3:24", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 4308, + "id": 5247, "isConstant": false, "isLValue": false, "isPure": false, @@ -6947,7 +6947,7 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "5941:10:20", + "src": "6006:10:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -6958,7 +6958,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "5932:20:20", + "src": "5997:20:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6971,12 +6971,12 @@ "arguments": [ { "argumentTypes": null, - "id": 4315, + "id": 5254, "name": "qtyToUnlock", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4292, - "src": "5980:11:20", + "referencedDeclaration": 5231, + "src": "6045:11:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6994,34 +6994,34 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 4310, + "id": 5249, "name": "balances", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4641, - "src": "5955:8:20", + "referencedDeclaration": 7096, + "src": "6020:8:24", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, - "id": 4313, + "id": 5252, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 4311, + "id": 5250, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 5193, - "src": "5964:3:20", + "referencedDeclaration": 8183, + "src": "6029:3:24", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 4312, + "id": 5251, "isConstant": false, "isLValue": false, "isPure": false, @@ -7029,7 +7029,7 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "5964:10:20", + "src": "6029:10:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -7040,27 +7040,27 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "5955:20:20", + "src": "6020:20:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 4314, + "id": 5253, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "add", "nodeType": "MemberAccess", - "referencedDeclaration": 4571, - "src": "5955:24:20", + "referencedDeclaration": 7026, + "src": "6020:24:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, - "id": 4316, + "id": 5255, "isConstant": false, "isLValue": false, "isPure": false, @@ -7068,21 +7068,21 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "5955:37:20", + "src": "6020:37:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "5932:60:20", + "src": "5997:60:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 4318, + "id": 5257, "nodeType": "ExpressionStatement", - "src": "5932:60:20" + "src": "5997:60:24" }, { "eventCall": { @@ -7090,14 +7090,14 @@ "arguments": [ { "argumentTypes": null, - "id": 4320, + "id": 5259, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 5230, - "src": "6016:4:20", + "referencedDeclaration": 8232, + "src": "6081:4:24", "typeDescriptions": { - "typeIdentifier": "t_contract$_MarketToken_$4328", + "typeIdentifier": "t_contract$_MarketToken_$5267", "typeString": "contract MarketToken" } }, @@ -7105,18 +7105,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 4321, + "id": 5260, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 5193, - "src": "6022:3:20", + "referencedDeclaration": 8183, + "src": "6087:3:24", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 4322, + "id": 5261, "isConstant": false, "isLValue": false, "isPure": false, @@ -7124,7 +7124,7 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "6022:10:20", + "src": "6087:10:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -7132,12 +7132,12 @@ }, { "argumentTypes": null, - "id": 4323, + "id": 5262, "name": "qtyToUnlock", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4292, - "src": "6034:11:20", + "referencedDeclaration": 5231, + "src": "6099:11:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -7147,7 +7147,7 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_contract$_MarketToken_$4328", + "typeIdentifier": "t_contract$_MarketToken_$5267", "typeString": "contract MarketToken" }, { @@ -7159,18 +7159,18 @@ "typeString": "uint256" } ], - "id": 4319, + "id": 5258, "name": "Transfer", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4869, - "src": "6007:8:20", + "referencedDeclaration": 7324, + "src": "6072:8:24", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,address,uint256)" } }, - "id": 4324, + "id": 5263, "isConstant": false, "isLValue": false, "isPure": false, @@ -7178,20 +7178,20 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "6007:39:20", + "src": "6072:39:24", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 4325, + "id": 5264, "nodeType": "EmitStatement", - "src": "6002:44:20" + "src": "6067:44:24" } ] }, "documentation": "@dev returns locked balance from this contract to the user's balance\n @param qtyToUnlock qty to return to user's balance", - "id": 4327, + "id": 5266, "implemented": true, "isConstructor": false, "isDeclaredConst": false, @@ -7199,16 +7199,16 @@ "name": "transferLockedTokensBackToUser", "nodeType": "FunctionDefinition", "parameters": { - "id": 4293, + "id": 5232, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 4292, + "id": 5231, "name": "qtyToUnlock", "nodeType": "VariableDeclaration", - "scope": 4327, - "src": "5838:16:20", + "scope": 5266, + "src": "5903:16:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -7216,10 +7216,10 @@ "typeString": "uint256" }, "typeName": { - "id": 4291, + "id": 5230, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "5838:4:20", + "src": "5903:4:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -7229,27 +7229,27 @@ "visibility": "internal" } ], - "src": "5837:18:20" + "src": "5902:18:24" }, "payable": false, "returnParameters": { - "id": 4294, + "id": 5233, "nodeType": "ParameterList", "parameters": [], - "src": "5864:0:20" + "src": "5929:0:24" }, - "scope": 4328, - "src": "5798:255:20", + "scope": 5267, + "src": "5863:255:24", "stateMutability": "nonpayable", "superFunction": null, "visibility": "private" } ], - "scope": 4329, - "src": "927:5128:20" + "scope": 5268, + "src": "927:5193:24" } ], - "src": "608:5448:20" + "src": "608:5513:24" }, "compiler": { "name": "solc", @@ -7259,10 +7259,10 @@ "4": { "events": {}, "links": {}, - "address": "0x489715c46bb5567e548d8d3da1b45743b63898a1", - "transactionHash": "0x57420eeacd88738568b42097cdbd6dcc9b1a63ff4cbf1feef66e1af8df628626" + "address": "0x400e67b66549638554db3b5f2c53c98bb0be3845", + "transactionHash": "0x16dfde99b50f4ecf8027e6c9dedef20ee4bf98da810657962fd741e803bcbf44" } }, "schemaVersion": "2.0.1", - "updatedAt": "2018-10-05T14:03:26.635Z" + "updatedAt": "2018-10-16T03:15:00.653Z" } \ No newline at end of file diff --git a/build/contracts/MarketTradingHub.json b/build/contracts/MarketTradingHub.json new file mode 100644 index 0000000..3da873b --- /dev/null +++ b/build/contracts/MarketTradingHub.json @@ -0,0 +1,15560 @@ +{ + "contractName": "MarketTradingHub", + "abi": [ + { + "constant": true, + "inputs": [], + "name": "MKT_TOKEN_ADDRESS", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MARKET_COLLATERAL_POOL_ADDRESS", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "name": "mktTokenAddress", + "type": "address" + }, + { + "name": "collateralPoolAddress", + "type": "address" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "errorCode", + "type": "uint8" + }, + { + "indexed": true, + "name": "orderHash", + "type": "bytes32" + } + ], + "name": "Error", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "marketContractAddress", + "type": "address" + }, + { + "indexed": true, + "name": "maker", + "type": "address" + }, + { + "indexed": true, + "name": "taker", + "type": "address" + }, + { + "indexed": false, + "name": "feeRecipient", + "type": "address" + }, + { + "indexed": false, + "name": "filledQty", + "type": "int256" + }, + { + "indexed": false, + "name": "paidMakerFee", + "type": "uint256" + }, + { + "indexed": false, + "name": "paidTakerFee", + "type": "uint256" + }, + { + "indexed": false, + "name": "price", + "type": "uint256" + }, + { + "indexed": false, + "name": "orderHash", + "type": "bytes32" + } + ], + "name": "OrderFilled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "marketContractAddress", + "type": "address" + }, + { + "indexed": true, + "name": "maker", + "type": "address" + }, + { + "indexed": true, + "name": "feeRecipient", + "type": "address" + }, + { + "indexed": false, + "name": "cancelledQty", + "type": "int256" + }, + { + "indexed": false, + "name": "orderHash", + "type": "bytes32" + } + ], + "name": "OrderCancelled", + "type": "event" + }, + { + "constant": false, + "inputs": [ + { + "name": "orderAddresses", + "type": "address[4]" + }, + { + "name": "unsignedOrderValues", + "type": "uint256[5]" + }, + { + "name": "orderQty", + "type": "int256" + }, + { + "name": "qtyToFill", + "type": "int256" + }, + { + "name": "v", + "type": "uint8" + }, + { + "name": "r", + "type": "bytes32" + }, + { + "name": "s", + "type": "bytes32" + } + ], + "name": "tradeOrder", + "outputs": [ + { + "name": "filledQty", + "type": "int256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "orderAddresses", + "type": "address[4]" + }, + { + "name": "unsignedOrderValues", + "type": "uint256[5]" + }, + { + "name": "orderQty", + "type": "int256" + }, + { + "name": "qtyToCancel", + "type": "int256" + } + ], + "name": "cancelOrder", + "outputs": [ + { + "name": "qtyCancelled", + "type": "int256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "orderHash", + "type": "bytes32" + } + ], + "name": "getQtyFilledOrCancelledFromOrder", + "outputs": [ + { + "name": "", + "type": "int256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x608060405234801561001057600080fd5b50604051604080611d27833981018060405281019080805190602001909291908051906020019092919050505080600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050611b93806101946000396000f30060806040526004361061006d576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806327ffb2cb146100725780634c258eb1146100d1578063798ddbc814610116578063a8e77c9a1461016d578063f089a215146101c4575b600080fd5b34801561007e57600080fd5b506100bb600480360381019080806080019091929192908060a001909192919290803590602001909291908035906020019092919050505061024c565b6040518082815260200191505060405180910390f35b3480156100dd57600080fd5b506101006004803603810190808035600019169060200190929190505050610591565b6040518082815260200191505060405180910390f35b34801561012257600080fd5b5061012b6105ae565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561017957600080fd5b506101826105d3565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101d057600080fd5b50610236600480360381019080806080019091929192908060a0019091929192908035906020019092919080359060200190929190803560ff169060200190929190803560001916906020019092919080356000191690602001909291905050506105f9565b6040518082815260200191505060405180910390f35b600080610257611ab8565b60008085141580156102785750610277868661131a90919063ffffffff16565b5b151561028357600080fd5b87600060048110151561029257fe5b602002013573ffffffffffffffffffffffffffffffffffffffff1692508273ffffffffffffffffffffffffffffffffffffffff16633270bb5b6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561031357600080fd5b505af1158015610327573d6000803e3d6000fd5b505050506040513d602081101561033d57600080fd5b810190808051906020019092919050505015151561035a57600080fd5b6103af8860048060200260405190810160405280929190826004602002808284378201915050505050886005806020026040519081016040528092919082600560200280828437820191505050505088611334565b91503373ffffffffffffffffffffffffffffffffffffffff16826020015173ffffffffffffffffffffffffffffffffffffffff161415156103ef57600080fd5b8160e001514210151561044857816101200151600019166000600181111561041357fe5b7fe6104340582083fe7674a149f8da127b9d3d7f74a88ccd7610562eb5b61b919360405160405180910390a360009350610586565b610468610459836101200151610591565b8761151090919063ffffffff16565b905060008114156104be578161012001516000191660018081111561048957fe5b7fe6104340582083fe7674a149f8da127b9d3d7f74a88ccd7610562eb5b61b919360405160405180910390a360009350610586565b6104c88582611527565b93506104e58261012001518560046115509092919063ffffffff16565b816060015173ffffffffffffffffffffffffffffffffffffffff16826020015173ffffffffffffffffffffffffffffffffffffffff16836000015173ffffffffffffffffffffffffffffffffffffffff167fd224c691cf3934e363a53a617f04a43bb61716374a6bb5c3b388c98d82c634cf878661012001516040518083815260200182600019166000191681526020019250505060405180910390a48393505b505050949350505050565b60006105a78260046115a690919063ffffffff16565b9050919050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080610604611ab8565b60008060008060008e600060048110151561061b57fe5b602002013573ffffffffffffffffffffffffffffffffffffffff1696508673ffffffffffffffffffffffffffffffffffffffff16633270bb5b6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561069c57600080fd5b505af11580156106b0573d6000803e3d6000fd5b505050506040513d60208110156106c657600080fd5b810190808051906020019092919050505015151561074c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f436f6e74726163742068617320616c726561647920736574746c65640000000081525060200191505060405180910390fd5b60008d1415801561075e575060008c14155b801561077957506107788c8e61131a90919063ffffffff16565b5b15156107ed576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260098152602001807f717479204572726f72000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663cfab472f30336040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b1580156108de57600080fd5b505af11580156108f2573d6000803e3d6000fd5b505050506040513d602081101561090857600080fd5b8101908080519060200190929190505050151561098d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f74616b6572206e6f7420656e61626c656400000000000000000000000000000081525060200191505060405180910390fd5b6109e28f600480602002604051908101604052809291908260046020028082843782019150505050508f600580602002604051908101604052809291908260056020028082843782019150505050508f611334565b9550600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663cfab472f3088602001516040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b158015610ad957600080fd5b505af1158015610aed573d6000803e3d6000fd5b505050506040513d6020811015610b0357600080fd5b81019080805190602001909291905050501515610b88576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f6d616b6572206e6f7420656e61626c656400000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16866040015173ffffffffffffffffffffffffffffffffffffffff161480610bf657503373ffffffffffffffffffffffffffffffffffffffff16866040015173ffffffffffffffffffffffffffffffffffffffff16145b1515610c6a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f696e76616c69642074616b65720000000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16866020015173ffffffffffffffffffffffffffffffffffffffff1614158015610cdb57503373ffffffffffffffffffffffffffffffffffffffff16866020015173ffffffffffffffffffffffffffffffffffffffff1614155b1515610d4f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f696e76616c69642077617368207472616465000000000000000000000000000081525060200191505060405180910390fd5b73__OrderLib______________________________638163681e87602001518861012001518e8e8e6040518663ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200185600019166000191681526020018460ff1660ff168152602001836000191660001916815260200182600019166000191681526020019550505050505060206040518083038186803b158015610e2d57600080fd5b505af4158015610e41573d6000803e3d6000fd5b505050506040513d6020811015610e5757600080fd5b81019080805190602001909291905050501515610e7357600080fd5b8560e0015142101515610ecc578561012001516000191660006001811115610e9757fe5b7fe6104340582083fe7674a149f8da127b9d3d7f74a88ccd7610562eb5b61b919360405160405180910390a360009750611308565b610eec610edd876101200151610591565b8e61151090919063ffffffff16565b94506000851415610f425785610120015160001916600180811115610f0d57fe5b7fe6104340582083fe7674a149f8da127b9d3d7f74a88ccd7610562eb5b61b919360405160405180910390a360009750611308565b610f4c858d611527565b9750600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166326fca2e287600001518860200151338c8b60c001516040518663ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200182815260200195505050505050600060405180830381600087803b15801561108f57600080fd5b505af11580156110a3573d6000803e3d6000fd5b505050506110c28661012001518960046115fd9092919063ffffffff16565b6000935060009250600073ffffffffffffffffffffffffffffffffffffffff16866060015173ffffffffffffffffffffffffffffffffffffffff161415156112175761110d88611653565b915061111888611653565b905060008660800151111561119a57611140828288608001516116719092919063ffffffff16565b93506111998660200151876060015186600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611691909392919063ffffffff16565b5b60008660a001511115611216576111c082828860a001516116719092919063ffffffff16565b925061121533876060015185600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611691909392919063ffffffff16565b5b5b3373ffffffffffffffffffffffffffffffffffffffff16866020015173ffffffffffffffffffffffffffffffffffffffff16876000015173ffffffffffffffffffffffffffffffffffffffff167fa5239e81939fd083c7e4cce9becd6d8f6991f6adf93b2354a1975197dc793d9489606001518c89898d60c001518e6101200151604051808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018381526020018260001916600019168152602001965050505050505060405180910390a48797505b50505050505050979650505050505050565b60008183148061132c57506000828402135b905092915050565b61133c611ab8565b83600060048110151561134b57fe5b6020020151816000019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505083600160048110151561139657fe5b6020020151816020019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508360026004811015156113e157fe5b6020020151816040019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505083600360048110151561142c57fe5b6020020151816060019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505082600060058110151561147757fe5b602002015181608001818152505082600160058110151561149457fe5b60200201518160a00181815250508260026005811015156114b157fe5b60200201518160c00181815250508260036005811015156114ce57fe5b60200201518160e001818152505081816101000181815250506114f28484846117b1565b81610120019060001916908160001916815250508090509392505050565b600061151f8383600003611a1d565b905092915050565b600061153282611653565b61153b84611653565b106115465781611548565b825b905092915050565b61158081846001016000856000191660001916815260200190815260200160002054611a1d90919063ffffffff16565b836001016000846000191660001916815260200190815260200160002081905550505050565b60006115f5836001016000846000191660001916815260200190815260200160002054846000016000856000191660001916815260200190815260200160002054611a1d90919063ffffffff16565b905092915050565b61162d81846000016000856000191660001916815260200190815260200160002054611a1d90919063ffffffff16565b836000016000846000191660001916815260200190815260200160002081905550505050565b6000808212156116685781600003905061166c565b8190505b919050565b60008161167e8585611a85565b81151561168757fe5b0490509392505050565b8373ffffffffffffffffffffffffffffffffffffffff166323b872dd8484846040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b15801561176857600080fd5b505af115801561177c573d6000803e3d6000fd5b505050506040513d602081101561179257600080fd5b810190808051906020019092919050505015156117ab57fe5b50505050565b60008360006004811015156117c257fe5b60200201518460016004811015156117d657fe5b60200201518560026004811015156117ea57fe5b60200201518660036004811015156117fe57fe5b602002015186600060058110151561181257fe5b602002015187600160058110151561182657fe5b602002015188600260058110151561183a57fe5b602002015189600360058110151561184e57fe5b60200201518a600460058110151561186257fe5b60200201518a604051602001808b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018781526020018681526020018581526020018481526020018381526020018281526020019a50505050505050505050506040516020818303038152906040526040518082805190602001908083835b6020831015156119e757805182526020820191506020810190506020830392506119c2565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051809103902090509392505050565b6000808284019050611a2f848461131a565b1515611a3d57809150611a7e565b600084121515611a63578360ff60019060020a0219038313151515611a5e57fe5b611a7a565b8360ff60019060020a02038312151515611a7957fe5b5b8091505b5092915050565b60008082840290506000841480611aa65750828482811515611aa357fe5b04145b1515611aae57fe5b8091505092915050565b61014060405190810160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff16815260200160008152602001600081526020016000815260200160008152602001600081526020016000801916815250905600a165627a7a72305820ca9ee397ef2c208934a2868d312d368de2990df043265046f6b76b2f688e235d0029", + "deployedBytecode": "0x60806040526004361061006d576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806327ffb2cb146100725780634c258eb1146100d1578063798ddbc814610116578063a8e77c9a1461016d578063f089a215146101c4575b600080fd5b34801561007e57600080fd5b506100bb600480360381019080806080019091929192908060a001909192919290803590602001909291908035906020019092919050505061024c565b6040518082815260200191505060405180910390f35b3480156100dd57600080fd5b506101006004803603810190808035600019169060200190929190505050610591565b6040518082815260200191505060405180910390f35b34801561012257600080fd5b5061012b6105ae565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561017957600080fd5b506101826105d3565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101d057600080fd5b50610236600480360381019080806080019091929192908060a0019091929192908035906020019092919080359060200190929190803560ff169060200190929190803560001916906020019092919080356000191690602001909291905050506105f9565b6040518082815260200191505060405180910390f35b600080610257611ab8565b60008085141580156102785750610277868661131a90919063ffffffff16565b5b151561028357600080fd5b87600060048110151561029257fe5b602002013573ffffffffffffffffffffffffffffffffffffffff1692508273ffffffffffffffffffffffffffffffffffffffff16633270bb5b6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561031357600080fd5b505af1158015610327573d6000803e3d6000fd5b505050506040513d602081101561033d57600080fd5b810190808051906020019092919050505015151561035a57600080fd5b6103af8860048060200260405190810160405280929190826004602002808284378201915050505050886005806020026040519081016040528092919082600560200280828437820191505050505088611334565b91503373ffffffffffffffffffffffffffffffffffffffff16826020015173ffffffffffffffffffffffffffffffffffffffff161415156103ef57600080fd5b8160e001514210151561044857816101200151600019166000600181111561041357fe5b7fe6104340582083fe7674a149f8da127b9d3d7f74a88ccd7610562eb5b61b919360405160405180910390a360009350610586565b610468610459836101200151610591565b8761151090919063ffffffff16565b905060008114156104be578161012001516000191660018081111561048957fe5b7fe6104340582083fe7674a149f8da127b9d3d7f74a88ccd7610562eb5b61b919360405160405180910390a360009350610586565b6104c88582611527565b93506104e58261012001518560046115509092919063ffffffff16565b816060015173ffffffffffffffffffffffffffffffffffffffff16826020015173ffffffffffffffffffffffffffffffffffffffff16836000015173ffffffffffffffffffffffffffffffffffffffff167fd224c691cf3934e363a53a617f04a43bb61716374a6bb5c3b388c98d82c634cf878661012001516040518083815260200182600019166000191681526020019250505060405180910390a48393505b505050949350505050565b60006105a78260046115a690919063ffffffff16565b9050919050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080610604611ab8565b60008060008060008e600060048110151561061b57fe5b602002013573ffffffffffffffffffffffffffffffffffffffff1696508673ffffffffffffffffffffffffffffffffffffffff16633270bb5b6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561069c57600080fd5b505af11580156106b0573d6000803e3d6000fd5b505050506040513d60208110156106c657600080fd5b810190808051906020019092919050505015151561074c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f436f6e74726163742068617320616c726561647920736574746c65640000000081525060200191505060405180910390fd5b60008d1415801561075e575060008c14155b801561077957506107788c8e61131a90919063ffffffff16565b5b15156107ed576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260098152602001807f717479204572726f72000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663cfab472f30336040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b1580156108de57600080fd5b505af11580156108f2573d6000803e3d6000fd5b505050506040513d602081101561090857600080fd5b8101908080519060200190929190505050151561098d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f74616b6572206e6f7420656e61626c656400000000000000000000000000000081525060200191505060405180910390fd5b6109e28f600480602002604051908101604052809291908260046020028082843782019150505050508f600580602002604051908101604052809291908260056020028082843782019150505050508f611334565b9550600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663cfab472f3088602001516040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b158015610ad957600080fd5b505af1158015610aed573d6000803e3d6000fd5b505050506040513d6020811015610b0357600080fd5b81019080805190602001909291905050501515610b88576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f6d616b6572206e6f7420656e61626c656400000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16866040015173ffffffffffffffffffffffffffffffffffffffff161480610bf657503373ffffffffffffffffffffffffffffffffffffffff16866040015173ffffffffffffffffffffffffffffffffffffffff16145b1515610c6a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f696e76616c69642074616b65720000000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16866020015173ffffffffffffffffffffffffffffffffffffffff1614158015610cdb57503373ffffffffffffffffffffffffffffffffffffffff16866020015173ffffffffffffffffffffffffffffffffffffffff1614155b1515610d4f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f696e76616c69642077617368207472616465000000000000000000000000000081525060200191505060405180910390fd5b73__OrderLib______________________________638163681e87602001518861012001518e8e8e6040518663ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200185600019166000191681526020018460ff1660ff168152602001836000191660001916815260200182600019166000191681526020019550505050505060206040518083038186803b158015610e2d57600080fd5b505af4158015610e41573d6000803e3d6000fd5b505050506040513d6020811015610e5757600080fd5b81019080805190602001909291905050501515610e7357600080fd5b8560e0015142101515610ecc578561012001516000191660006001811115610e9757fe5b7fe6104340582083fe7674a149f8da127b9d3d7f74a88ccd7610562eb5b61b919360405160405180910390a360009750611308565b610eec610edd876101200151610591565b8e61151090919063ffffffff16565b94506000851415610f425785610120015160001916600180811115610f0d57fe5b7fe6104340582083fe7674a149f8da127b9d3d7f74a88ccd7610562eb5b61b919360405160405180910390a360009750611308565b610f4c858d611527565b9750600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166326fca2e287600001518860200151338c8b60c001516040518663ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200182815260200195505050505050600060405180830381600087803b15801561108f57600080fd5b505af11580156110a3573d6000803e3d6000fd5b505050506110c28661012001518960046115fd9092919063ffffffff16565b6000935060009250600073ffffffffffffffffffffffffffffffffffffffff16866060015173ffffffffffffffffffffffffffffffffffffffff161415156112175761110d88611653565b915061111888611653565b905060008660800151111561119a57611140828288608001516116719092919063ffffffff16565b93506111998660200151876060015186600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611691909392919063ffffffff16565b5b60008660a001511115611216576111c082828860a001516116719092919063ffffffff16565b925061121533876060015185600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611691909392919063ffffffff16565b5b5b3373ffffffffffffffffffffffffffffffffffffffff16866020015173ffffffffffffffffffffffffffffffffffffffff16876000015173ffffffffffffffffffffffffffffffffffffffff167fa5239e81939fd083c7e4cce9becd6d8f6991f6adf93b2354a1975197dc793d9489606001518c89898d60c001518e6101200151604051808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018381526020018260001916600019168152602001965050505050505060405180910390a48797505b50505050505050979650505050505050565b60008183148061132c57506000828402135b905092915050565b61133c611ab8565b83600060048110151561134b57fe5b6020020151816000019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505083600160048110151561139657fe5b6020020151816020019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508360026004811015156113e157fe5b6020020151816040019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505083600360048110151561142c57fe5b6020020151816060019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505082600060058110151561147757fe5b602002015181608001818152505082600160058110151561149457fe5b60200201518160a00181815250508260026005811015156114b157fe5b60200201518160c00181815250508260036005811015156114ce57fe5b60200201518160e001818152505081816101000181815250506114f28484846117b1565b81610120019060001916908160001916815250508090509392505050565b600061151f8383600003611a1d565b905092915050565b600061153282611653565b61153b84611653565b106115465781611548565b825b905092915050565b61158081846001016000856000191660001916815260200190815260200160002054611a1d90919063ffffffff16565b836001016000846000191660001916815260200190815260200160002081905550505050565b60006115f5836001016000846000191660001916815260200190815260200160002054846000016000856000191660001916815260200190815260200160002054611a1d90919063ffffffff16565b905092915050565b61162d81846000016000856000191660001916815260200190815260200160002054611a1d90919063ffffffff16565b836000016000846000191660001916815260200190815260200160002081905550505050565b6000808212156116685781600003905061166c565b8190505b919050565b60008161167e8585611a85565b81151561168757fe5b0490509392505050565b8373ffffffffffffffffffffffffffffffffffffffff166323b872dd8484846040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b15801561176857600080fd5b505af115801561177c573d6000803e3d6000fd5b505050506040513d602081101561179257600080fd5b810190808051906020019092919050505015156117ab57fe5b50505050565b60008360006004811015156117c257fe5b60200201518460016004811015156117d657fe5b60200201518560026004811015156117ea57fe5b60200201518660036004811015156117fe57fe5b602002015186600060058110151561181257fe5b602002015187600160058110151561182657fe5b602002015188600260058110151561183a57fe5b602002015189600360058110151561184e57fe5b60200201518a600460058110151561186257fe5b60200201518a604051602001808b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018781526020018681526020018581526020018481526020018381526020018281526020019a50505050505050505050506040516020818303038152906040526040518082805190602001908083835b6020831015156119e757805182526020820191506020810190506020830392506119c2565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051809103902090509392505050565b6000808284019050611a2f848461131a565b1515611a3d57809150611a7e565b600084121515611a63578360ff60019060020a0219038313151515611a5e57fe5b611a7a565b8360ff60019060020a02038312151515611a7957fe5b5b8091505b5092915050565b60008082840290506000841480611aa65750828482811515611aa357fe5b04145b1515611aae57fe5b8091505092915050565b61014060405190810160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff16815260200160008152602001600081526020016000815260200160008152602001600081526020016000801916815250905600a165627a7a72305820ca9ee397ef2c208934a2868d312d368de2990df043265046f6b76b2f688e235d0029", + "sourceMap": "941:8041:6:-;;;2349:356;8:9:-1;5:2;;;30:1;27;20:12;5:2;2349:356:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2493:21;2460:30;;:54;;;;;;;;;;;;;;;;;;2570:30;;;;;;;;;;;2524:22;;:77;;;;;;;;;;;;;;;;;;2631:15;2611:17;;:35;;;;;;;;;;;;;;;;;;2680:17;;;;;;;;;;;2656:9;;:42;;;;;;;;;;;;;;;;;;2349:356;;941:8041;;;;;;", + "deployedSourceMap": "941:8041:6:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7035:1483;;8:9:-1;5:2;;;30:1;27;20:12;5:2;7035:1483:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8811:168;;8:9:-1;5:2;;;30:1;27;20:12;5:2;8811:168:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1374:32;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1374:32:6;;;;;;;;;;;;;;;;;;;;;;;;;;;1458:45;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1458:45:6;;;;;;;;;;;;;;;;;;;;;;;;;;;3252:3289;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3252:3289:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7035:1483;7199:16;7347:29;7469:27;;:::i;:::-;7839:16;7254:1;7239:11;:16;;:52;;;;;7259:32;7282:8;7259:11;:22;;:32;;;;:::i;:::-;7239:52;7231:61;;;;;;;;7394:14;7409:1;7394:17;;;;;;;;;;;;;;;7347:65;;7431:14;:24;;;:26;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;7431:26:6;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;7431:26:6;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;7431:26:6;;;;;;;;;;;;;;;;7430:27;7422:36;;;;;;;;7499:67;7520:14;7499:67;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7536:19;7499:67;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7557:8;7499:20;:67::i;:::-;7469:97;;7599:10;7584:25;;:5;:11;;;:25;;;7576:34;;;;;;;;7702:5;:25;;;7695:3;:32;;7691:138;;;7780:5;:15;;;7748:48;;;7754:24;7748:48;;;;;;;;;;;;;;;;;;7817:1;7810:8;;;;7691:138;7858:68;7876:49;7909:5;:15;;;7876:32;:49::i;:::-;7858:8;:17;;:68;;;;:::i;:::-;7839:87;;7956:1;7940:12;:17;7936:173;;;8060:5;:15;;;8031:45;;;8037:21;8031:45;;;;;;;;;;;;;;;;;;8097:1;8090:8;;;;7936:173;8134:41;8149:11;8162:12;8134:14;:41::i;:::-;8119:56;;8222:67;8259:5;:15;;;8276:12;8222:13;:36;;:67;;;;;:::i;:::-;8398:5;:18;;;8304:177;;8373:5;:11;;;8304:177;;8332:5;:27;;;8304:177;;;8430:12;8456:5;:15;;;8304:177;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8499:12;8492:19;;7035:1483;;;;;;;;;;:::o;8811:168::-;8893:3;8915:57;8962:9;8915:13;:46;;:57;;;;:::i;:::-;8908:64;;8811:168;;;:::o;1374:32::-;;;;;;;;;;;;;:::o;1458:45::-;;;;;;;;;;;;;:::o;3252:3289::-;3468:13;3497:29;3902:27;;:::i;:::-;4733:16;5334:17;5365;5502;5551:16;3544:14;3559:1;3544:17;;;;;;;;;;;;;;;3497:65;;3581:14;:24;;;:26;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3581:26:6;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3581:26:6;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;3581:26:6;;;;;;;;;;;;;;;;3580:27;3572:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3700:1;3688:8;:13;;:31;;;;;3718:1;3705:9;:14;;3688:31;:65;;;;;3723:30;3743:9;3723:8;:19;;:30;;;;:::i;:::-;3688:65;3680:87;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3818:9;;;;;;;;;;;:34;;;3853:4;3859:10;3818:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3818:52:6;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3818:52:6;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;3818:52:6;;;;;;;;;;;;;;;;3810:82;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3932:67;3953:14;3932:67;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3969:19;3932:67;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3990:8;3932:20;:67::i;:::-;3902:97;;4017:9;;;;;;;;;;;:34;;;4052:4;4058:5;:11;;;4017:53;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4017:53:6;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;4017:53:6;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;4017:53:6;;;;;;;;;;;;;;;;4009:83;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4194:1;4171:25;;:5;:11;;;:25;;;:54;;;;4215:10;4200:25;;:5;:11;;;:25;;;4171:54;4163:80;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4319:1;4296:25;;:5;:11;;;:25;;;;:54;;;;;4340:10;4325:25;;:5;:11;;;:25;;;;4296:54;4288:85;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4405:8;:25;4448:5;:11;;;4477:5;:15;;;4510:1;4529;4548;4405:158;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4405:158:6;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;4405:158:6;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;4405:158:6;;;;;;;;;;;;;;;;4384:189;;;;;;;;4596:5;:25;;;4589:3;:32;;4585:138;;;4674:5;:15;;;4642:48;;;4648:24;4642:48;;;;;;;;;;;;;;;;;;4711:1;4704:8;;;;4585:138;4752:68;4770:49;4803:5;:15;;;4770:32;:49::i;:::-;4752:8;:17;;:68;;;;:::i;:::-;4733:87;;4850:1;4834:12;:17;4830:165;;;4946:5;:15;;;4917:45;;;4923:21;4917:45;;;;;;;;;;;;;;;;;;4983:1;4976:8;;;;4830:165;5017:39;5032:12;5046:9;5017:14;:39::i;:::-;5005:51;;5066:22;;;;;;;;;;;:38;;;5118:5;:27;;;5159:5;:11;;;5184:10;5208:9;5231:5;:11;;;5066:186;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;5066:186:6;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;5066:186:6;;;;5262:61;5296:5;:15;;;5313:9;5262:13;:33;;:61;;;;;:::i;:::-;5354:1;5334:21;;5385:1;5365:21;;5431:1;5401:32;;:5;:18;;;:32;;;;5397:823;;;5522:15;:9;:13;:15::i;:::-;5502:35;;5570:15;:9;:13;:15::i;:::-;5551:34;;5620:1;5603:5;:14;;;:18;5599:299;;;5656:58;5688:12;5702:11;5656:5;:14;;;:31;;:58;;;;;:::i;:::-;5641:73;;5732:151;5780:5;:11;;;5813:5;:18;;;5853:12;5732:9;;;;;;;;;;;:26;;;;:151;;;;;;:::i;:::-;5599:299;5933:1;5916:5;:14;;;:18;5912:298;;;5969:58;6001:12;6015:11;5969:5;:14;;;:31;;:58;;;;;:::i;:::-;5954:73;;6045:150;6093:10;6125:5;:18;;;6165:12;6045:9;;;;;;;;;;;:26;;;;:150;;;;;;:::i;:::-;5912:298;5397:823;6326:10;6235:272;;6301:5;:11;;;6235:272;;6260:5;:27;;;6235:272;;;6350:5;:18;;;6382:9;6405:12;6431;6457:5;:11;;;6482:5;:15;;;6235:272;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6525:9;6518:16;;3252:3289;;;;;;;;;;;;;;;;;:::o;2916:109:12:-;2973:4;3003:1;2998;:6;:19;;;;3016:1;3012;3008;:5;:9;2998:19;2989:29;;2916:109;;;;:::o;3700:747:13:-;3844:11;;:::i;:::-;3901:14;3916:1;3901:17;;;;;;;;;;;;;3871:5;:27;;:47;;;;;;;;;;;3942:14;3957:1;3942:17;;;;;;;;;;;;;3928:5;:11;;:31;;;;;;;;;;;3983:14;3998:1;3983:17;;;;;;;;;;;;;3969:5;:11;;:31;;;;;;;;;;;4031:14;4046:1;4031:17;;;;;;;;;;;;;4010:5;:18;;:38;;;;;;;;;;;4075:19;4095:1;4075:22;;;;;;;;;;;;;4058:5;:14;;:39;;;;;4124:19;4144:1;4124:22;;;;;;;;;;;;;4107:5;:14;;:39;;;;;4170:19;4190:1;4170:22;;;;;;;;;;;;;4156:5;:11;;:36;;;;;4230:19;4250:1;4230:22;;;;;;;;;;;;;4202:5;:25;;:50;;;;;4274:8;4262:5;:9;;:20;;;;;4310:108;4339:14;4367:19;4400:8;4310:15;:108::i;:::-;4292:5;:15;;:126;;;;;;;;;;;;;4435:5;4428:12;;3700:747;;;;;:::o;2354:122:12:-;2415:6;2440:10;2444:1;2448;2447:2;;2440:3;:10::i;:::-;2433:17;;2354:122;;;;:::o;3537:115::-;3596:6;3630;3634:1;3630:3;:6::i;:::-;3621;3625:1;3621:3;:6::i;:::-;:15;:24;;3644:1;3621:24;;;3640:1;3621:24;3614:31;;3537:115;;;;:::o;5042:210:13:-;5194:51;5232:12;5194:4;:22;;:33;5217:9;5194:33;;;;;;;;;;;;;;;;;;:37;;:51;;;;:::i;:::-;5158:4;:22;;:33;5181:9;5158:33;;;;;;;;;;;;;;;;;:87;;;;5042:210;;;:::o;1488:236::-;1622:3;1648:69;1683:4;:22;;:33;1706:9;1683:33;;;;;;;;;;;;;;;;;;1648:4;:19;;:30;1668:9;1648:30;;;;;;;;;;;;;;;;;;:34;;:69;;;;:::i;:::-;1641:76;;1488:236;;;;:::o;4653:195::-;4796:45;4831:9;4796:4;:19;;:30;4816:9;4796:30;;;;;;;;;;;;;;;;;;:34;;:45;;;;:::i;:::-;4763:4;:19;;:30;4783:9;4763:30;;;;;;;;;;;;;;;;;:78;;;;4653:195;;;:::o;3139:167:12:-;3185:7;3212:1;3208;:5;3204:96;;;3242:1;3241:2;;3229:15;;;;3204:96;3287:1;3275:14;;3139:167;;;;:::o;1037:203::-;1167:7;1222:11;1197:22;1206:1;1209:9;1197:8;:22::i;:::-;:36;;;;;;;;1190:43;;1037:203;;;;;:::o;492:169:46:-;620:5;:18;;;639:4;645:2;649:5;620:35;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;620:35:46;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;620:35:46;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;620:35:46;;;;;;;;;;;;;;;;613:43;;;;;;492:169;;;;:::o;2078:612:13:-;2224:7;2311:14;2326:1;2311:17;;;;;;;;;;;;;2346:14;2361:1;2346:17;;;;;;;;;;;;;2381:14;2396:1;2381:17;;;;;;;;;;;;;2416:14;2431:1;2416:17;;;;;;;;;;;;;2451:19;2471:1;2451:22;;;;;;;;;;;;;2491:19;2511:1;2491:22;;;;;;;;;;;;;2531:19;2551:1;2531:22;;;;;;;;;;;;;2571:19;2591:1;2571:22;;;;;;;;;;;;;2611:19;2631:1;2611:22;;;;;;;;;;;;;2651:8;2277:396;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;2277:396:13;;;2254:429;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;51:19;36:153;;;182:3;176:10;171:3;164:23;98:2;93:3;89:12;82:19;;123:2;118:3;114:12;107:19;;148:2;143:3;139:12;132:19;;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;2254:429:13;;;;;;;;;;;;;;;;2247:436;;2078:612;;;;;:::o;1673:509:12:-;1729:6;1747:8;1762:1;1758;:5;1747:16;;1778;1789:1;1792;1778:10;:16::i;:::-;1777:17;1773:126;;;1887:1;1880:8;;;;1773:126;1918:1;1913;:6;;1909:249;;;2022:1;856:3;850:1;842:17;;;;839:22;2009:14;2004:1;:19;;1997:27;;;;;;1909:249;;;2145:1;792:3;786:1;778:17;;;;2132:14;2127:1;:19;;2120:27;;;;;;1909:249;2174:1;2167:8;;1673:509;;;;;;:::o;869:162::-;932:7;951:9;967:1;963;:5;951:17;;990:1;985;:6;:20;;;;1004:1;999;995;:5;;;;;;;;:10;985:20;978:28;;;;;;1023:1;1016:8;;869:162;;;;;:::o;941:8041:6:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o", + "source": "/*\n Copyright 2017-2018 Phillip A. Elsasser\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n*/\n\npragma solidity ^0.4.24;\n\nimport \"./MarketCollateralPool.sol\";\nimport \"./MarketContract.sol\";\nimport \"./libraries/OrderLib.sol\";\nimport \"./libraries/MathLib.sol\";\nimport \"./tokens/MarketToken.sol\";\n\nimport \"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol\";\nimport \"openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol\";\n\n\ncontract MarketTradingHub {\n using OrderLib for OrderLib.Order;\n using OrderLib for OrderLib.OrderMappings;\n using MathLib for int;\n using MathLib for uint;\n using SafeERC20 for ERC20;\n using SafeERC20 for MarketToken;\n\n enum ErrorCodes {\n ORDER_EXPIRED, // past designated timestamp\n ORDER_DEAD // order if fully filled or fully cancelled\n }\n\n // constants\n address public MKT_TOKEN_ADDRESS;\n MarketToken MKT_TOKEN;\n\n // accounting\n address public MARKET_COLLATERAL_POOL_ADDRESS;\n MarketCollateralPool MARKET_COLLATERAL_POOL;\n OrderLib.OrderMappings orderMappings;\n\n // events\n event Error(ErrorCodes indexed errorCode, bytes32 indexed orderHash);\n\n // order events\n event OrderFilled(\n address indexed marketContractAddress,\n address indexed maker,\n address indexed taker,\n address feeRecipient,\n int filledQty,\n uint paidMakerFee,\n uint paidTakerFee,\n uint price,\n bytes32 orderHash\n );\n\n event OrderCancelled(\n address indexed marketContractAddress,\n address indexed maker,\n address indexed feeRecipient,\n int cancelledQty,\n bytes32 orderHash\n );\n\n /// @param mktTokenAddress the address of the MKT ERC20 token\n /// @param collateralPoolAddress the address of the MarketCollateralPool\n constructor(\n address mktTokenAddress,\n address collateralPoolAddress\n ) public\n {\n MARKET_COLLATERAL_POOL_ADDRESS = collateralPoolAddress;\n MARKET_COLLATERAL_POOL = MarketCollateralPool(MARKET_COLLATERAL_POOL_ADDRESS);\n MKT_TOKEN_ADDRESS = mktTokenAddress;\n MKT_TOKEN = MarketToken(MKT_TOKEN_ADDRESS);\n }\n\n /*\n // EXTERNAL METHODS\n */\n\n // @notice called by a participant wanting to trade a specific order\n /// @param orderAddresses - marketContractAddress, maker, taker and feeRecipient addresses\n /// @param unsignedOrderValues makerFee, takerFree, price, expirationTimeStamp, and salt (for hashing)\n /// @param orderQty quantity of the order\n /// @param qtyToFill quantity taker is willing to fill of original order(max)\n /// @param v order signature\n /// @param r order signature\n /// @param s order signature\n function tradeOrder(\n address[4] orderAddresses,\n uint[5] unsignedOrderValues,\n int orderQty,\n int qtyToFill,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external returns (int filledQty)\n {\n MarketContract marketContract = MarketContract(orderAddresses[0]);\n require(!marketContract.isSettled(), \"Contract has already settled\"); // no trading past settlement\n require(orderQty != 0 && qtyToFill != 0 && orderQty.isSameSign(qtyToFill), \"qty Error\"); // no zero trades, sings match\n require(MKT_TOKEN.isUserEnabledForContract(this, msg.sender), \"taker not enabled\");\n OrderLib.Order memory order = OrderLib.createOrder(orderAddresses, unsignedOrderValues, orderQty);\n require(MKT_TOKEN.isUserEnabledForContract(this, order.maker), \"maker not enabled\");\n\n // taker can be anyone, or specifically the caller!\n require(order.taker == address(0) || order.taker == msg.sender, \"invalid taker\");\n // do not allow self trade\n require(order.maker != address(0) && order.maker != msg.sender, \"invalid wash trade\");\n\n require(\n OrderLib.isValidSignature(\n order.maker,\n order.orderHash,\n v,\n r,\n s\n )\n );\n\n\n if (now >= order.expirationTimeStamp) {\n emit Error(ErrorCodes.ORDER_EXPIRED, order.orderHash);\n return 0;\n }\n\n int remainingQty = orderQty.subtract(getQtyFilledOrCancelledFromOrder(order.orderHash));\n if (remainingQty == 0) { // there is no qty remaining - cannot fill!\n emit Error(ErrorCodes.ORDER_DEAD, order.orderHash);\n return 0;\n }\n\n filledQty = MathLib.absMin(remainingQty, qtyToFill);\n MARKET_COLLATERAL_POOL.updatePositions(\n order.marketContractAddress,\n order.maker,\n msg.sender,\n filledQty,\n order.price\n );\n orderMappings.addFilledQtyToOrder(order.orderHash, filledQty);\n\n uint paidMakerFee = 0;\n uint paidTakerFee = 0;\n\n if (order.feeRecipient != address(0)) {\n // we need to transfer fees to recipient\n uint filledAbsQty = filledQty.abs();\n uint orderAbsQty = filledQty.abs();\n if (order.makerFee > 0) {\n paidMakerFee = order.makerFee.divideFractional(filledAbsQty, orderAbsQty);\n MKT_TOKEN.safeTransferFrom(\n order.maker,\n order.feeRecipient,\n paidMakerFee\n );\n }\n\n if (order.takerFee > 0) {\n paidTakerFee = order.takerFee.divideFractional(filledAbsQty, orderAbsQty);\n MKT_TOKEN.safeTransferFrom(\n msg.sender,\n order.feeRecipient,\n paidTakerFee\n );\n }\n }\n\n emit OrderFilled(\n order.marketContractAddress,\n order.maker,\n msg.sender,\n order.feeRecipient,\n filledQty,\n paidMakerFee,\n paidTakerFee,\n order.price,\n order.orderHash\n );\n\n return filledQty;\n }\n\n /// @notice called by the maker of an order to attempt to cancel the order before its expiration time stamp\n /// @param orderAddresses - marketContractAddress, maker, taker and feeRecipient addresses\n /// @param unsignedOrderValues makerFee, takerFree, price, expirationTimeStamp, and salt (for hashing)\n /// @param orderQty quantity of the order\n /// @param qtyToCancel quantity maker is attempting to cancel\n /// @return qty that was successfully cancelled of order.\n function cancelOrder(\n address[4] orderAddresses,\n uint[5] unsignedOrderValues,\n int orderQty,\n int qtyToCancel\n ) external returns (int qtyCancelled)\n {\n require(qtyToCancel != 0 && qtyToCancel.isSameSign(orderQty)); // cannot cancel 0 and signs must match\n MarketContract marketContract = MarketContract(orderAddresses[0]);\n require(!marketContract.isSettled());\n\n OrderLib.Order memory order = OrderLib.createOrder(orderAddresses, unsignedOrderValues, orderQty);\n require(order.maker == msg.sender); // only maker can cancel standing order\n if (now >= order.expirationTimeStamp) {\n emit Error(ErrorCodes.ORDER_EXPIRED, order.orderHash);\n return 0;\n }\n\n int remainingQty = orderQty.subtract(getQtyFilledOrCancelledFromOrder(order.orderHash));\n if (remainingQty == 0) { // there is no qty remaining to cancel order is dead\n emit Error(ErrorCodes.ORDER_DEAD, order.orderHash);\n return 0;\n }\n\n qtyCancelled = MathLib.absMin(qtyToCancel, remainingQty); // we can only cancel what remains\n orderMappings.addCancelledQtyToOrder(order.orderHash, qtyCancelled);\n emit OrderCancelled(\n order.marketContractAddress,\n order.maker,\n order.feeRecipient,\n qtyCancelled,\n order.orderHash\n );\n\n return qtyCancelled;\n }\n\n /*\n // PUBLIC METHODS\n */\n\n /// @notice returns the qty that is no longer available to trade for a given order\n /// @param orderHash hash of order to find filled and cancelled qty\n /// @return int quantity that is no longer able to filled from the supplied order hash\n function getQtyFilledOrCancelledFromOrder(bytes32 orderHash) public view returns (int) {\n return orderMappings.getQtyFilledOrCancelledFromOrder(orderHash);\n }\n\n}\n", + "sourcePath": "/home/travis/build/MARKETProtocol/MARKETProtocol/contracts/MarketTradingHub.sol", + "ast": { + "absolutePath": "/home/travis/build/MARKETProtocol/MARKETProtocol/contracts/MarketTradingHub.sol", + "exportedSymbols": { + "MarketTradingHub": [ + 1786 + ] + }, + "id": 1787, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1237, + "literals": [ + "solidity", + "^", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "608:24:6" + }, + { + "absolutePath": "/home/travis/build/MARKETProtocol/MARKETProtocol/contracts/MarketCollateralPool.sol", + "file": "./MarketCollateralPool.sol", + "id": 1238, + "nodeType": "ImportDirective", + "scope": 1787, + "sourceUnit": 842, + "src": "634:36:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/travis/build/MARKETProtocol/MARKETProtocol/contracts/MarketContract.sol", + "file": "./MarketContract.sol", + "id": 1239, + "nodeType": "ImportDirective", + "scope": 1787, + "sourceUnit": 1019, + "src": "671:30:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/travis/build/MARKETProtocol/MARKETProtocol/contracts/libraries/OrderLib.sol", + "file": "./libraries/OrderLib.sol", + "id": 1240, + "nodeType": "ImportDirective", + "scope": 1787, + "sourceUnit": 3084, + "src": "702:34:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/travis/build/MARKETProtocol/MARKETProtocol/contracts/libraries/MathLib.sol", + "file": "./libraries/MathLib.sol", + "id": 1241, + "nodeType": "ImportDirective", + "scope": 1787, + "sourceUnit": 2799, + "src": "737:33:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/travis/build/MARKETProtocol/MARKETProtocol/contracts/tokens/MarketToken.sol", + "file": "./tokens/MarketToken.sol", + "id": 1242, + "nodeType": "ImportDirective", + "scope": 1787, + "sourceUnit": 5268, + "src": "771:34:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol", + "file": "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol", + "id": 1243, + "nodeType": "ImportDirective", + "scope": 1787, + "sourceUnit": 7294, + "src": "807:63:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol", + "file": "openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol", + "id": 1244, + "nodeType": "ImportDirective", + "scope": 1787, + "sourceUnit": 7388, + "src": "871:67:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 1786, + "linearizedBaseContracts": [ + 1786 + ], + "name": "MarketTradingHub", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 1247, + "libraryName": { + "contractScope": null, + "id": 1245, + "name": "OrderLib", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 3083, + "src": "979:8:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OrderLib_$3083", + "typeString": "library OrderLib" + } + }, + "nodeType": "UsingForDirective", + "src": "973:34:6", + "typeName": { + "contractScope": null, + "id": 1246, + "name": "OrderLib.Order", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2834, + "src": "992:14:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_storage_ptr", + "typeString": "struct OrderLib.Order" + } + } + }, + { + "id": 1250, + "libraryName": { + "contractScope": null, + "id": 1248, + "name": "OrderLib", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 3083, + "src": "1018:8:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OrderLib_$3083", + "typeString": "library OrderLib" + } + }, + "nodeType": "UsingForDirective", + "src": "1012:42:6", + "typeName": { + "contractScope": null, + "id": 1249, + "name": "OrderLib.OrderMappings", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2813, + "src": "1031:22:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_OrderMappings_$2813_storage_ptr", + "typeString": "struct OrderLib.OrderMappings" + } + } + }, + { + "id": 1253, + "libraryName": { + "contractScope": null, + "id": 1251, + "name": "MathLib", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2798, + "src": "1065:7:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MathLib_$2798", + "typeString": "library MathLib" + } + }, + "nodeType": "UsingForDirective", + "src": "1059:22:6", + "typeName": { + "id": 1252, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "1077:3:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + }, + { + "id": 1256, + "libraryName": { + "contractScope": null, + "id": 1254, + "name": "MathLib", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2798, + "src": "1092:7:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MathLib_$2798", + "typeString": "library MathLib" + } + }, + "nodeType": "UsingForDirective", + "src": "1086:23:6", + "typeName": { + "id": 1255, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1104:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "id": 1259, + "libraryName": { + "contractScope": null, + "id": 1257, + "name": "SafeERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 7387, + "src": "1120:9:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeERC20_$7387", + "typeString": "library SafeERC20" + } + }, + "nodeType": "UsingForDirective", + "src": "1114:26:6", + "typeName": { + "contractScope": null, + "id": 1258, + "name": "ERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 7293, + "src": "1134:5:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20_$7293", + "typeString": "contract ERC20" + } + } + }, + { + "id": 1262, + "libraryName": { + "contractScope": null, + "id": 1260, + "name": "SafeERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 7387, + "src": "1151:9:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeERC20_$7387", + "typeString": "library SafeERC20" + } + }, + "nodeType": "UsingForDirective", + "src": "1145:32:6", + "typeName": { + "contractScope": null, + "id": 1261, + "name": "MarketToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 5267, + "src": "1165:11:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketToken_$5267", + "typeString": "contract MarketToken" + } + } + }, + { + "canonicalName": "MarketTradingHub.ErrorCodes", + "id": 1265, + "members": [ + { + "id": 1263, + "name": "ORDER_EXPIRED", + "nodeType": "EnumValue", + "src": "1209:13:6" + }, + { + "id": 1264, + "name": "ORDER_DEAD", + "nodeType": "EnumValue", + "src": "1274:10:6" + } + ], + "name": "ErrorCodes", + "nodeType": "EnumDefinition", + "src": "1183:168:6" + }, + { + "constant": false, + "id": 1267, + "name": "MKT_TOKEN_ADDRESS", + "nodeType": "VariableDeclaration", + "scope": 1786, + "src": "1374:32:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1266, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1374:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 1269, + "name": "MKT_TOKEN", + "nodeType": "VariableDeclaration", + "scope": 1786, + "src": "1412:21:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketToken_$5267", + "typeString": "contract MarketToken" + }, + "typeName": { + "contractScope": null, + "id": 1268, + "name": "MarketToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 5267, + "src": "1412:11:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketToken_$5267", + "typeString": "contract MarketToken" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1271, + "name": "MARKET_COLLATERAL_POOL_ADDRESS", + "nodeType": "VariableDeclaration", + "scope": 1786, + "src": "1458:45:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1270, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1458:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 1273, + "name": "MARKET_COLLATERAL_POOL", + "nodeType": "VariableDeclaration", + "scope": 1786, + "src": "1509:43:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketCollateralPool_$841", + "typeString": "contract MarketCollateralPool" + }, + "typeName": { + "contractScope": null, + "id": 1272, + "name": "MarketCollateralPool", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 841, + "src": "1509:20:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketCollateralPool_$841", + "typeString": "contract MarketCollateralPool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1275, + "name": "orderMappings", + "nodeType": "VariableDeclaration", + "scope": 1786, + "src": "1558:36:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_OrderMappings_$2813_storage", + "typeString": "struct OrderLib.OrderMappings" + }, + "typeName": { + "contractScope": null, + "id": 1274, + "name": "OrderLib.OrderMappings", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2813, + "src": "1558:22:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_OrderMappings_$2813_storage_ptr", + "typeString": "struct OrderLib.OrderMappings" + } + }, + "value": null, + "visibility": "internal" + }, + { + "anonymous": false, + "documentation": null, + "id": 1281, + "name": "Error", + "nodeType": "EventDefinition", + "parameters": { + "id": 1280, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1277, + "indexed": true, + "name": "errorCode", + "nodeType": "VariableDeclaration", + "scope": 1281, + "src": "1627:28:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ErrorCodes_$1265", + "typeString": "enum MarketTradingHub.ErrorCodes" + }, + "typeName": { + "contractScope": null, + "id": 1276, + "name": "ErrorCodes", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1265, + "src": "1627:10:6", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ErrorCodes_$1265", + "typeString": "enum MarketTradingHub.ErrorCodes" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1279, + "indexed": true, + "name": "orderHash", + "nodeType": "VariableDeclaration", + "scope": 1281, + "src": "1657:25:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1278, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1657:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1626:57:6" + }, + "src": "1615:69:6" + }, + { + "anonymous": false, + "documentation": null, + "id": 1301, + "name": "OrderFilled", + "nodeType": "EventDefinition", + "parameters": { + "id": 1300, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1283, + "indexed": true, + "name": "marketContractAddress", + "nodeType": "VariableDeclaration", + "scope": 1301, + "src": "1737:37:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1282, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1737:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1285, + "indexed": true, + "name": "maker", + "nodeType": "VariableDeclaration", + "scope": 1301, + "src": "1784:21:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1284, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1784:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1287, + "indexed": true, + "name": "taker", + "nodeType": "VariableDeclaration", + "scope": 1301, + "src": "1815:21:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1286, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1815:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1289, + "indexed": false, + "name": "feeRecipient", + "nodeType": "VariableDeclaration", + "scope": 1301, + "src": "1846:20:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1288, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1846:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1291, + "indexed": false, + "name": "filledQty", + "nodeType": "VariableDeclaration", + "scope": 1301, + "src": "1876:13:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1290, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "1876:3:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1293, + "indexed": false, + "name": "paidMakerFee", + "nodeType": "VariableDeclaration", + "scope": 1301, + "src": "1899:17:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1292, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1899:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1295, + "indexed": false, + "name": "paidTakerFee", + "nodeType": "VariableDeclaration", + "scope": 1301, + "src": "1926:17:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1294, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1926:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1297, + "indexed": false, + "name": "price", + "nodeType": "VariableDeclaration", + "scope": 1301, + "src": "1953:10:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1296, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1953:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1299, + "indexed": false, + "name": "orderHash", + "nodeType": "VariableDeclaration", + "scope": 1301, + "src": "1973:17:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1298, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1973:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1727:269:6" + }, + "src": "1710:287:6" + }, + { + "anonymous": false, + "documentation": null, + "id": 1313, + "name": "OrderCancelled", + "nodeType": "EventDefinition", + "parameters": { + "id": 1312, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1303, + "indexed": true, + "name": "marketContractAddress", + "nodeType": "VariableDeclaration", + "scope": 1313, + "src": "2033:37:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1302, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2033:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1305, + "indexed": true, + "name": "maker", + "nodeType": "VariableDeclaration", + "scope": 1313, + "src": "2080:21:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1304, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2080:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1307, + "indexed": true, + "name": "feeRecipient", + "nodeType": "VariableDeclaration", + "scope": 1313, + "src": "2111:28:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1306, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2111:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1309, + "indexed": false, + "name": "cancelledQty", + "nodeType": "VariableDeclaration", + "scope": 1313, + "src": "2149:16:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1308, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "2149:3:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1311, + "indexed": false, + "name": "orderHash", + "nodeType": "VariableDeclaration", + "scope": 1313, + "src": "2175:17:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1310, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2175:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2023:175:6" + }, + "src": "2003:196:6" + }, + { + "body": { + "id": 1340, + "nodeType": "Block", + "src": "2450:255:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 1322, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1320, + "name": "MARKET_COLLATERAL_POOL_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1271, + "src": "2460:30:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1321, + "name": "collateralPoolAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1317, + "src": "2493:21:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "2460:54:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1323, + "nodeType": "ExpressionStatement", + "src": "2460:54:6" + }, + { + "expression": { + "argumentTypes": null, + "id": 1328, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1324, + "name": "MARKET_COLLATERAL_POOL", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1273, + "src": "2524:22:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketCollateralPool_$841", + "typeString": "contract MarketCollateralPool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1326, + "name": "MARKET_COLLATERAL_POOL_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1271, + "src": "2570:30:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1325, + "name": "MarketCollateralPool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 841, + "src": "2549:20:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_MarketCollateralPool_$841_$", + "typeString": "type(contract MarketCollateralPool)" + } + }, + "id": 1327, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2549:52:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketCollateralPool_$841", + "typeString": "contract MarketCollateralPool" + } + }, + "src": "2524:77:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketCollateralPool_$841", + "typeString": "contract MarketCollateralPool" + } + }, + "id": 1329, + "nodeType": "ExpressionStatement", + "src": "2524:77:6" + }, + { + "expression": { + "argumentTypes": null, + "id": 1332, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1330, + "name": "MKT_TOKEN_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1267, + "src": "2611:17:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1331, + "name": "mktTokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1315, + "src": "2631:15:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "2611:35:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1333, + "nodeType": "ExpressionStatement", + "src": "2611:35:6" + }, + { + "expression": { + "argumentTypes": null, + "id": 1338, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1334, + "name": "MKT_TOKEN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1269, + "src": "2656:9:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketToken_$5267", + "typeString": "contract MarketToken" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1336, + "name": "MKT_TOKEN_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1267, + "src": "2680:17:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1335, + "name": "MarketToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5267, + "src": "2668:11:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_MarketToken_$5267_$", + "typeString": "type(contract MarketToken)" + } + }, + "id": 1337, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2668:30:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketToken_$5267", + "typeString": "contract MarketToken" + } + }, + "src": "2656:42:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketToken_$5267", + "typeString": "contract MarketToken" + } + }, + "id": 1339, + "nodeType": "ExpressionStatement", + "src": "2656:42:6" + } + ] + }, + "documentation": "@param mktTokenAddress the address of the MKT ERC20 token\n @param collateralPoolAddress the address of the MarketCollateralPool", + "id": 1341, + "implemented": true, + "isConstructor": true, + "isDeclaredConst": false, + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1318, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1315, + "name": "mktTokenAddress", + "nodeType": "VariableDeclaration", + "scope": 1341, + "src": "2370:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1314, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2370:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1317, + "name": "collateralPoolAddress", + "nodeType": "VariableDeclaration", + "scope": 1341, + "src": "2403:29:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1316, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2403:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2360:78:6" + }, + "payable": false, + "returnParameters": { + "id": 1319, + "nodeType": "ParameterList", + "parameters": [], + "src": "2450:0:6" + }, + "scope": 1786, + "src": "2349:356:6", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1639, + "nodeType": "Block", + "src": "3487:3054:6", + "statements": [ + { + "assignments": [ + 1365 + ], + "declarations": [ + { + "constant": false, + "id": 1365, + "name": "marketContract", + "nodeType": "VariableDeclaration", + "scope": 1640, + "src": "3497:29:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + }, + "typeName": { + "contractScope": null, + "id": 1364, + "name": "MarketContract", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1018, + "src": "3497:14:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1371, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1367, + "name": "orderAddresses", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1345, + "src": "3544:14:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$4_calldata_ptr", + "typeString": "address[4] calldata" + } + }, + "id": 1369, + "indexExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1368, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3559:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3544:17:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1366, + "name": "MarketContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1018, + "src": "3529:14:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_MarketContract_$1018_$", + "typeString": "type(contract MarketContract)" + } + }, + "id": 1370, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3529:33:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3497:65:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1376, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "3580:27:6", + "subExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 1373, + "name": "marketContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1365, + "src": "3581:14:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + "id": 1374, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isSettled", + "nodeType": "MemberAccess", + "referencedDeclaration": 867, + "src": "3581:24:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_bool_$", + "typeString": "function () view external returns (bool)" + } + }, + "id": 1375, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3581:26:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "436f6e74726163742068617320616c726561647920736574746c6564", + "id": 1377, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3609:30:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3d915d08f4a9540343346fba3c9440905d9d48eac74266030583e122147642d4", + "typeString": "literal_string \"Contract has already settled\"" + }, + "value": "Contract has already settled" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3d915d08f4a9540343346fba3c9440905d9d48eac74266030583e122147642d4", + "typeString": "literal_string \"Contract has already settled\"" + } + ], + "id": 1372, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 8186, + 8187 + ], + "referencedDeclaration": 8187, + "src": "3572:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1378, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3572:68:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1379, + "nodeType": "ExpressionStatement", + "src": "3572:68:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1392, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1387, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1383, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1381, + "name": "orderQty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1351, + "src": "3688:8:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1382, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3700:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "3688:13:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1386, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1384, + "name": "qtyToFill", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1353, + "src": "3705:9:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1385, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3718:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "3705:14:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "3688:31:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1390, + "name": "qtyToFill", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1353, + "src": "3743:9:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1388, + "name": "orderQty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1351, + "src": "3723:8:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 1389, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isSameSign", + "nodeType": "MemberAccess", + "referencedDeclaration": 2663, + "src": "3723:19:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_bool_$bound_to$_t_int256_$", + "typeString": "function (int256,int256) pure returns (bool)" + } + }, + "id": 1391, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3723:30:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "3688:65:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "717479204572726f72", + "id": 1393, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3755:11:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6e9dd3a0b9a3acdef4d37979495fe73c5947b7b79b0332faf9b922b9c7f6e8bd", + "typeString": "literal_string \"qty Error\"" + }, + "value": "qty Error" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_6e9dd3a0b9a3acdef4d37979495fe73c5947b7b79b0332faf9b922b9c7f6e8bd", + "typeString": "literal_string \"qty Error\"" + } + ], + "id": 1380, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 8186, + 8187 + ], + "referencedDeclaration": 8187, + "src": "3680:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1394, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3680:87:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1395, + "nodeType": "ExpressionStatement", + "src": "3680:87:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1399, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8234, + "src": "3853:4:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketTradingHub_$1786", + "typeString": "contract MarketTradingHub" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1400, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8183, + "src": "3859:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1401, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3859:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_MarketTradingHub_$1786", + "typeString": "contract MarketTradingHub" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1397, + "name": "MKT_TOKEN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1269, + "src": "3818:9:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketToken_$5267", + "typeString": "contract MarketToken" + } + }, + "id": 1398, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isUserEnabledForContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 5094, + "src": "3818:34:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_bool_$", + "typeString": "function (address,address) view external returns (bool)" + } + }, + "id": 1402, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3818:52:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "74616b6572206e6f7420656e61626c6564", + "id": 1403, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3872:19:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3ec0fae02e4c4ad1f6de0ac4409f4896f9b53d0d8c4d8c3325c5a343fb372da1", + "typeString": "literal_string \"taker not enabled\"" + }, + "value": "taker not enabled" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3ec0fae02e4c4ad1f6de0ac4409f4896f9b53d0d8c4d8c3325c5a343fb372da1", + "typeString": "literal_string \"taker not enabled\"" + } + ], + "id": 1396, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 8186, + 8187 + ], + "referencedDeclaration": 8187, + "src": "3810:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1404, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3810:82:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1405, + "nodeType": "ExpressionStatement", + "src": "3810:82:6" + }, + { + "assignments": [ + 1409 + ], + "declarations": [ + { + "constant": false, + "id": 1409, + "name": "order", + "nodeType": "VariableDeclaration", + "scope": 1640, + "src": "3902:27:6", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order" + }, + "typeName": { + "contractScope": null, + "id": 1408, + "name": "OrderLib.Order", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2834, + "src": "3902:14:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_storage_ptr", + "typeString": "struct OrderLib.Order" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1416, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1412, + "name": "orderAddresses", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1345, + "src": "3953:14:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$4_calldata_ptr", + "typeString": "address[4] calldata" + } + }, + { + "argumentTypes": null, + "id": 1413, + "name": "unsignedOrderValues", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1349, + "src": "3969:19:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$5_calldata_ptr", + "typeString": "uint256[5] calldata" + } + }, + { + "argumentTypes": null, + "id": 1414, + "name": "orderQty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1351, + "src": "3990:8:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$4_calldata_ptr", + "typeString": "address[4] calldata" + }, + { + "typeIdentifier": "t_array$_t_uint256_$5_calldata_ptr", + "typeString": "uint256[5] calldata" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1410, + "name": "OrderLib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3083, + "src": "3932:8:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_OrderLib_$3083_$", + "typeString": "type(library OrderLib)" + } + }, + "id": 1411, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "createOrder", + "nodeType": "MemberAccess", + "referencedDeclaration": 3034, + "src": "3932:20:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_array$_t_address_$4_memory_ptr_$_t_array$_t_uint256_$5_memory_ptr_$_t_int256_$returns$_t_struct$_Order_$2834_memory_ptr_$", + "typeString": "function (address[4] memory,uint256[5] memory,int256) pure returns (struct OrderLib.Order memory)" + } + }, + "id": 1415, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3932:67:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3902:97:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1420, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8234, + "src": "4052:4:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketTradingHub_$1786", + "typeString": "contract MarketTradingHub" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1421, + "name": "order", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1409, + "src": "4058:5:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "id": 1422, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "maker", + "nodeType": "MemberAccess", + "referencedDeclaration": 2817, + "src": "4058:11:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_MarketTradingHub_$1786", + "typeString": "contract MarketTradingHub" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1418, + "name": "MKT_TOKEN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1269, + "src": "4017:9:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketToken_$5267", + "typeString": "contract MarketToken" + } + }, + "id": 1419, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isUserEnabledForContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 5094, + "src": "4017:34:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_bool_$", + "typeString": "function (address,address) view external returns (bool)" + } + }, + "id": 1423, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4017:53:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6d616b6572206e6f7420656e61626c6564", + "id": 1424, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4072:19:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f591c04c85556729a214fec06a9010d45a222109f1012a11d623e4264f094fa7", + "typeString": "literal_string \"maker not enabled\"" + }, + "value": "maker not enabled" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f591c04c85556729a214fec06a9010d45a222109f1012a11d623e4264f094fa7", + "typeString": "literal_string \"maker not enabled\"" + } + ], + "id": 1417, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 8186, + 8187 + ], + "referencedDeclaration": 8187, + "src": "4009:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1425, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4009:83:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1426, + "nodeType": "ExpressionStatement", + "src": "4009:83:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1439, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1433, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1428, + "name": "order", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1409, + "src": "4171:5:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "id": 1429, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "taker", + "nodeType": "MemberAccess", + "referencedDeclaration": 2819, + "src": "4171:11:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 1431, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4194:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 1430, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4186:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1432, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4186:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "4171:25:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1438, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1434, + "name": "order", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1409, + "src": "4200:5:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "id": 1435, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "taker", + "nodeType": "MemberAccess", + "referencedDeclaration": 2819, + "src": "4200:11:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1436, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8183, + "src": "4215:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1437, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4215:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "4200:25:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "4171:54:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "696e76616c69642074616b6572", + "id": 1440, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4227:15:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_9b8f39c55e1fac8d08f4136461b1cc109e6efdbdef6ed7f762e9d6312aee7316", + "typeString": "literal_string \"invalid taker\"" + }, + "value": "invalid taker" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_9b8f39c55e1fac8d08f4136461b1cc109e6efdbdef6ed7f762e9d6312aee7316", + "typeString": "literal_string \"invalid taker\"" + } + ], + "id": 1427, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 8186, + 8187 + ], + "referencedDeclaration": 8187, + "src": "4163:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1441, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4163:80:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1442, + "nodeType": "ExpressionStatement", + "src": "4163:80:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1455, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1449, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1444, + "name": "order", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1409, + "src": "4296:5:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "id": 1445, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "maker", + "nodeType": "MemberAccess", + "referencedDeclaration": 2817, + "src": "4296:11:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 1447, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4319:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 1446, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4311:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1448, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4311:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "4296:25:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1454, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1450, + "name": "order", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1409, + "src": "4325:5:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "id": 1451, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "maker", + "nodeType": "MemberAccess", + "referencedDeclaration": 2817, + "src": "4325:11:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1452, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8183, + "src": "4340:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1453, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4340:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "4325:25:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "4296:54:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "696e76616c69642077617368207472616465", + "id": 1456, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4352:20:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_68e4475e073cab100f6ecf40423380c9bab7d9880083bd9a5e4bc42821ac484b", + "typeString": "literal_string \"invalid wash trade\"" + }, + "value": "invalid wash trade" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_68e4475e073cab100f6ecf40423380c9bab7d9880083bd9a5e4bc42821ac484b", + "typeString": "literal_string \"invalid wash trade\"" + } + ], + "id": 1443, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 8186, + 8187 + ], + "referencedDeclaration": 8187, + "src": "4288:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1457, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4288:85:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1458, + "nodeType": "ExpressionStatement", + "src": "4288:85:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1462, + "name": "order", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1409, + "src": "4448:5:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "id": 1463, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "maker", + "nodeType": "MemberAccess", + "referencedDeclaration": 2817, + "src": "4448:11:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1464, + "name": "order", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1409, + "src": "4477:5:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "id": 1465, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "orderHash", + "nodeType": "MemberAccess", + "referencedDeclaration": 2833, + "src": "4477:15:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 1466, + "name": "v", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1355, + "src": "4510:1:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "argumentTypes": null, + "id": 1467, + "name": "r", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1357, + "src": "4529:1:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 1468, + "name": "s", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1359, + "src": "4548:1:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "id": 1460, + "name": "OrderLib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3083, + "src": "4405:8:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_OrderLib_$3083_$", + "typeString": "type(library OrderLib)" + } + }, + "id": 1461, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isValidSignature", + "nodeType": "MemberAccess", + "referencedDeclaration": 2936, + "src": "4405:25:6", + "typeDescriptions": { + "typeIdentifier": "t_function_delegatecall_pure$_t_address_$_t_bytes32_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$_t_bool_$", + "typeString": "function (address,bytes32,uint8,bytes32,bytes32) pure returns (bool)" + } + }, + "id": 1469, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4405:158:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1459, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 8186, + 8187 + ], + "referencedDeclaration": 8186, + "src": "4384:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1470, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4384:189:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1471, + "nodeType": "ExpressionStatement", + "src": "4384:189:6" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1475, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1472, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8185, + "src": "4589:3:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1473, + "name": "order", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1409, + "src": "4596:5:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "id": 1474, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "expirationTimeStamp", + "nodeType": "MemberAccess", + "referencedDeclaration": 2829, + "src": "4596:25:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4589:32:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1486, + "nodeType": "IfStatement", + "src": "4585:138:6", + "trueBody": { + "id": 1485, + "nodeType": "Block", + "src": "4623:100:6", + "statements": [ + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1477, + "name": "ErrorCodes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1265, + "src": "4648:10:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ErrorCodes_$1265_$", + "typeString": "type(enum MarketTradingHub.ErrorCodes)" + } + }, + "id": 1478, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "ORDER_EXPIRED", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4648:24:6", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ErrorCodes_$1265", + "typeString": "enum MarketTradingHub.ErrorCodes" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1479, + "name": "order", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1409, + "src": "4674:5:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "id": 1480, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "orderHash", + "nodeType": "MemberAccess", + "referencedDeclaration": 2833, + "src": "4674:15:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_enum$_ErrorCodes_$1265", + "typeString": "enum MarketTradingHub.ErrorCodes" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 1476, + "name": "Error", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1281, + "src": "4642:5:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_enum$_ErrorCodes_$1265_$_t_bytes32_$returns$__$", + "typeString": "function (enum MarketTradingHub.ErrorCodes,bytes32)" + } + }, + "id": 1481, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4642:48:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1482, + "nodeType": "EmitStatement", + "src": "4637:53:6" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1483, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4711:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "functionReturnParameters": 1363, + "id": 1484, + "nodeType": "Return", + "src": "4704:8:6" + } + ] + } + }, + { + "assignments": [ + 1488 + ], + "declarations": [ + { + "constant": false, + "id": 1488, + "name": "remainingQty", + "nodeType": "VariableDeclaration", + "scope": 1640, + "src": "4733:16:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1487, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "4733:3:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1496, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1492, + "name": "order", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1409, + "src": "4803:5:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "id": 1493, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "orderHash", + "nodeType": "MemberAccess", + "referencedDeclaration": 2833, + "src": "4803:15:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 1491, + "name": "getQtyFilledOrCancelledFromOrder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1785, + "src": "4770:32:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_int256_$", + "typeString": "function (bytes32) view returns (int256)" + } + }, + "id": 1494, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4770:49:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1489, + "name": "orderQty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1351, + "src": "4752:8:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 1490, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "subtract", + "nodeType": "MemberAccess", + "referencedDeclaration": 2617, + "src": "4752:17:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_int256_$bound_to$_t_int256_$", + "typeString": "function (int256,int256) pure returns (int256)" + } + }, + "id": 1495, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4752:68:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4733:87:6" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1499, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1497, + "name": "remainingQty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1488, + "src": "4834:12:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1498, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4850:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "4834:17:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1510, + "nodeType": "IfStatement", + "src": "4830:165:6", + "trueBody": { + "id": 1509, + "nodeType": "Block", + "src": "4853:142:6", + "statements": [ + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1501, + "name": "ErrorCodes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1265, + "src": "4923:10:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ErrorCodes_$1265_$", + "typeString": "type(enum MarketTradingHub.ErrorCodes)" + } + }, + "id": 1502, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "ORDER_DEAD", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4923:21:6", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ErrorCodes_$1265", + "typeString": "enum MarketTradingHub.ErrorCodes" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1503, + "name": "order", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1409, + "src": "4946:5:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "id": 1504, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "orderHash", + "nodeType": "MemberAccess", + "referencedDeclaration": 2833, + "src": "4946:15:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_enum$_ErrorCodes_$1265", + "typeString": "enum MarketTradingHub.ErrorCodes" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 1500, + "name": "Error", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1281, + "src": "4917:5:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_enum$_ErrorCodes_$1265_$_t_bytes32_$returns$__$", + "typeString": "function (enum MarketTradingHub.ErrorCodes,bytes32)" + } + }, + "id": 1505, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4917:45:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1506, + "nodeType": "EmitStatement", + "src": "4912:50:6" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1507, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4983:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "functionReturnParameters": 1363, + "id": 1508, + "nodeType": "Return", + "src": "4976:8:6" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "id": 1517, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1511, + "name": "filledQty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1362, + "src": "5005:9:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1514, + "name": "remainingQty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1488, + "src": "5032:12:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + { + "argumentTypes": null, + "id": 1515, + "name": "qtyToFill", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1353, + "src": "5046:9:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1512, + "name": "MathLib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2798, + "src": "5017:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_MathLib_$2798_$", + "typeString": "type(library MathLib)" + } + }, + "id": 1513, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "absMin", + "nodeType": "MemberAccess", + "referencedDeclaration": 2707, + "src": "5017:14:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_int256_$", + "typeString": "function (int256,int256) pure returns (int256)" + } + }, + "id": 1516, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5017:39:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "5005:51:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 1518, + "nodeType": "ExpressionStatement", + "src": "5005:51:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1522, + "name": "order", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1409, + "src": "5118:5:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "id": 1523, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "marketContractAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 2815, + "src": "5118:27:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1524, + "name": "order", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1409, + "src": "5159:5:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "id": 1525, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "maker", + "nodeType": "MemberAccess", + "referencedDeclaration": 2817, + "src": "5159:11:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1526, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8183, + "src": "5184:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1527, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5184:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1528, + "name": "filledQty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1362, + "src": "5208:9:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1529, + "name": "order", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1409, + "src": "5231:5:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "id": 1530, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "price", + "nodeType": "MemberAccess", + "referencedDeclaration": 2827, + "src": "5231:11:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1519, + "name": "MARKET_COLLATERAL_POOL", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1273, + "src": "5066:22:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketCollateralPool_$841", + "typeString": "contract MarketCollateralPool" + } + }, + "id": 1521, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "updatePositions", + "nodeType": "MemberAccess", + "referencedDeclaration": 384, + "src": "5066:38:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_address_$_t_int256_$_t_uint256_$returns$__$", + "typeString": "function (address,address,address,int256,uint256) external" + } + }, + "id": 1531, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5066:186:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1532, + "nodeType": "ExpressionStatement", + "src": "5066:186:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1536, + "name": "order", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1409, + "src": "5296:5:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "id": 1537, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "orderHash", + "nodeType": "MemberAccess", + "referencedDeclaration": 2833, + "src": "5296:15:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 1538, + "name": "filledQty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1362, + "src": "5313:9:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1533, + "name": "orderMappings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1275, + "src": "5262:13:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_OrderMappings_$2813_storage", + "typeString": "struct OrderLib.OrderMappings storage ref" + } + }, + "id": 1535, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "addFilledQtyToOrder", + "nodeType": "MemberAccess", + "referencedDeclaration": 3058, + "src": "5262:33:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_OrderMappings_$2813_storage_ptr_$_t_bytes32_$_t_int256_$returns$__$bound_to$_t_struct$_OrderMappings_$2813_storage_ptr_$", + "typeString": "function (struct OrderLib.OrderMappings storage pointer,bytes32,int256)" + } + }, + "id": 1539, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5262:61:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1540, + "nodeType": "ExpressionStatement", + "src": "5262:61:6" + }, + { + "assignments": [ + 1542 + ], + "declarations": [ + { + "constant": false, + "id": 1542, + "name": "paidMakerFee", + "nodeType": "VariableDeclaration", + "scope": 1640, + "src": "5334:17:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1541, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "5334:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1544, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 1543, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5354:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "5334:21:6" + }, + { + "assignments": [ + 1546 + ], + "declarations": [ + { + "constant": false, + "id": 1546, + "name": "paidTakerFee", + "nodeType": "VariableDeclaration", + "scope": 1640, + "src": "5365:17:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1545, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "5365:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1548, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 1547, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5385:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "5365:21:6" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1554, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1549, + "name": "order", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1409, + "src": "5401:5:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "id": 1550, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "feeRecipient", + "nodeType": "MemberAccess", + "referencedDeclaration": 2821, + "src": "5401:18:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 1552, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5431:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 1551, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5423:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1553, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5423:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "5401:32:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1618, + "nodeType": "IfStatement", + "src": "5397:823:6", + "trueBody": { + "id": 1617, + "nodeType": "Block", + "src": "5435:785:6", + "statements": [ + { + "assignments": [ + 1556 + ], + "declarations": [ + { + "constant": false, + "id": 1556, + "name": "filledAbsQty", + "nodeType": "VariableDeclaration", + "scope": 1640, + "src": "5502:17:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1555, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "5502:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1560, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 1557, + "name": "filledQty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1362, + "src": "5522:9:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 1558, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "abs", + "nodeType": "MemberAccess", + "referencedDeclaration": 2686, + "src": "5522:13:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_uint256_$bound_to$_t_int256_$", + "typeString": "function (int256) pure returns (uint256)" + } + }, + "id": 1559, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5522:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5502:35:6" + }, + { + "assignments": [ + 1562 + ], + "declarations": [ + { + "constant": false, + "id": 1562, + "name": "orderAbsQty", + "nodeType": "VariableDeclaration", + "scope": 1640, + "src": "5551:16:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1561, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "5551:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1566, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 1563, + "name": "filledQty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1362, + "src": "5570:9:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 1564, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "abs", + "nodeType": "MemberAccess", + "referencedDeclaration": 2686, + "src": "5570:13:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_uint256_$bound_to$_t_int256_$", + "typeString": "function (int256) pure returns (uint256)" + } + }, + "id": 1565, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5570:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5551:34:6" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1570, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1567, + "name": "order", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1409, + "src": "5603:5:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "id": 1568, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "makerFee", + "nodeType": "MemberAccess", + "referencedDeclaration": 2823, + "src": "5603:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1569, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5620:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "5603:18:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1591, + "nodeType": "IfStatement", + "src": "5599:299:6", + "trueBody": { + "id": 1590, + "nodeType": "Block", + "src": "5623:275:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 1578, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1571, + "name": "paidMakerFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1542, + "src": "5641:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1575, + "name": "filledAbsQty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1556, + "src": "5688:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1576, + "name": "orderAbsQty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1562, + "src": "5702:11:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1572, + "name": "order", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1409, + "src": "5656:5:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "id": 1573, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "makerFee", + "nodeType": "MemberAccess", + "referencedDeclaration": 2823, + "src": "5656:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1574, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "divideFractional", + "nodeType": "MemberAccess", + "referencedDeclaration": 2508, + "src": "5656:31:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256,uint256) pure returns (uint256)" + } + }, + "id": 1577, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5656:58:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5641:73:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1579, + "nodeType": "ExpressionStatement", + "src": "5641:73:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1583, + "name": "order", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1409, + "src": "5780:5:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "id": 1584, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "maker", + "nodeType": "MemberAccess", + "referencedDeclaration": 2817, + "src": "5780:11:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1585, + "name": "order", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1409, + "src": "5813:5:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "id": 1586, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "feeRecipient", + "nodeType": "MemberAccess", + "referencedDeclaration": 2821, + "src": "5813:18:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1587, + "name": "paidMakerFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1542, + "src": "5853:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1580, + "name": "MKT_TOKEN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1269, + "src": "5732:9:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketToken_$5267", + "typeString": "contract MarketToken" + } + }, + "id": 1582, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "safeTransferFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 7368, + "src": "5732:26:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_ERC20_$7293_$_t_address_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_ERC20_$7293_$", + "typeString": "function (contract ERC20,address,address,uint256)" + } + }, + "id": 1588, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5732:151:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1589, + "nodeType": "ExpressionStatement", + "src": "5732:151:6" + } + ] + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1595, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1592, + "name": "order", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1409, + "src": "5916:5:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "id": 1593, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "takerFee", + "nodeType": "MemberAccess", + "referencedDeclaration": 2825, + "src": "5916:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1594, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5933:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "5916:18:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1616, + "nodeType": "IfStatement", + "src": "5912:298:6", + "trueBody": { + "id": 1615, + "nodeType": "Block", + "src": "5936:274:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 1603, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1596, + "name": "paidTakerFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1546, + "src": "5954:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1600, + "name": "filledAbsQty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1556, + "src": "6001:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1601, + "name": "orderAbsQty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1562, + "src": "6015:11:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1597, + "name": "order", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1409, + "src": "5969:5:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "id": 1598, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "takerFee", + "nodeType": "MemberAccess", + "referencedDeclaration": 2825, + "src": "5969:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1599, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "divideFractional", + "nodeType": "MemberAccess", + "referencedDeclaration": 2508, + "src": "5969:31:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256,uint256) pure returns (uint256)" + } + }, + "id": 1602, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5969:58:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5954:73:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1604, + "nodeType": "ExpressionStatement", + "src": "5954:73:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1608, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8183, + "src": "6093:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1609, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6093:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1610, + "name": "order", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1409, + "src": "6125:5:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "id": 1611, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "feeRecipient", + "nodeType": "MemberAccess", + "referencedDeclaration": 2821, + "src": "6125:18:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1612, + "name": "paidTakerFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1546, + "src": "6165:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1605, + "name": "MKT_TOKEN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1269, + "src": "6045:9:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketToken_$5267", + "typeString": "contract MarketToken" + } + }, + "id": 1607, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "safeTransferFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 7368, + "src": "6045:26:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_ERC20_$7293_$_t_address_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_ERC20_$7293_$", + "typeString": "function (contract ERC20,address,address,uint256)" + } + }, + "id": 1613, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6045:150:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1614, + "nodeType": "ExpressionStatement", + "src": "6045:150:6" + } + ] + } + } + ] + } + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1620, + "name": "order", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1409, + "src": "6260:5:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "id": 1621, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "marketContractAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 2815, + "src": "6260:27:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1622, + "name": "order", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1409, + "src": "6301:5:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "id": 1623, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "maker", + "nodeType": "MemberAccess", + "referencedDeclaration": 2817, + "src": "6301:11:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1624, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8183, + "src": "6326:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1625, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6326:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1626, + "name": "order", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1409, + "src": "6350:5:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "id": 1627, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "feeRecipient", + "nodeType": "MemberAccess", + "referencedDeclaration": 2821, + "src": "6350:18:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1628, + "name": "filledQty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1362, + "src": "6382:9:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + { + "argumentTypes": null, + "id": 1629, + "name": "paidMakerFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1542, + "src": "6405:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1630, + "name": "paidTakerFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1546, + "src": "6431:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1631, + "name": "order", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1409, + "src": "6457:5:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "id": 1632, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "price", + "nodeType": "MemberAccess", + "referencedDeclaration": 2827, + "src": "6457:11:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1633, + "name": "order", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1409, + "src": "6482:5:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "id": 1634, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "orderHash", + "nodeType": "MemberAccess", + "referencedDeclaration": 2833, + "src": "6482:15:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 1619, + "name": "OrderFilled", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1301, + "src": "6235:11:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_address_$_t_address_$_t_int256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_bytes32_$returns$__$", + "typeString": "function (address,address,address,address,int256,uint256,uint256,uint256,bytes32)" + } + }, + "id": 1635, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6235:272:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1636, + "nodeType": "EmitStatement", + "src": "6230:277:6" + }, + { + "expression": { + "argumentTypes": null, + "id": 1637, + "name": "filledQty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1362, + "src": "6525:9:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "functionReturnParameters": 1363, + "id": 1638, + "nodeType": "Return", + "src": "6518:16:6" + } + ] + }, + "documentation": "@param orderAddresses - marketContractAddress, maker, taker and feeRecipient addresses\n @param unsignedOrderValues makerFee, takerFree, price, expirationTimeStamp, and salt (for hashing)\n @param orderQty quantity of the order\n @param qtyToFill quantity taker is willing to fill of original order(max)\n @param v order signature\n @param r order signature\n @param s order signature", + "id": 1640, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "tradeOrder", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1360, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1345, + "name": "orderAddresses", + "nodeType": "VariableDeclaration", + "scope": 1640, + "src": "3281:25:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$4_calldata_ptr", + "typeString": "address[4]" + }, + "typeName": { + "baseType": { + "id": 1342, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3281:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1344, + "length": { + "argumentTypes": null, + "hexValue": "34", + "id": 1343, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3289:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + }, + "value": "4" + }, + "nodeType": "ArrayTypeName", + "src": "3281:10:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$4_storage_ptr", + "typeString": "address[4]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1349, + "name": "unsignedOrderValues", + "nodeType": "VariableDeclaration", + "scope": 1640, + "src": "3316:27:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$5_calldata_ptr", + "typeString": "uint256[5]" + }, + "typeName": { + "baseType": { + "id": 1346, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3316:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1348, + "length": { + "argumentTypes": null, + "hexValue": "35", + "id": 1347, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3321:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + }, + "value": "5" + }, + "nodeType": "ArrayTypeName", + "src": "3316:7:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$5_storage_ptr", + "typeString": "uint256[5]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1351, + "name": "orderQty", + "nodeType": "VariableDeclaration", + "scope": 1640, + "src": "3353:12:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1350, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "3353:3:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1353, + "name": "qtyToFill", + "nodeType": "VariableDeclaration", + "scope": 1640, + "src": "3375:13:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1352, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "3375:3:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1355, + "name": "v", + "nodeType": "VariableDeclaration", + "scope": 1640, + "src": "3398:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 1354, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "3398:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1357, + "name": "r", + "nodeType": "VariableDeclaration", + "scope": 1640, + "src": "3415:9:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1356, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3415:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1359, + "name": "s", + "nodeType": "VariableDeclaration", + "scope": 1640, + "src": "3434:9:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1358, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3434:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3271:178:6" + }, + "payable": false, + "returnParameters": { + "id": 1363, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1362, + "name": "filledQty", + "nodeType": "VariableDeclaration", + "scope": 1640, + "src": "3468:13:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1361, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "3468:3:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3467:15:6" + }, + "scope": 1786, + "src": "3252:3289:6", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 1771, + "nodeType": "Block", + "src": "7221:1297:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1665, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1660, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1658, + "name": "qtyToCancel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1652, + "src": "7239:11:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1659, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7254:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "7239:16:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1663, + "name": "orderQty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1650, + "src": "7282:8:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1661, + "name": "qtyToCancel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1652, + "src": "7259:11:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 1662, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isSameSign", + "nodeType": "MemberAccess", + "referencedDeclaration": 2663, + "src": "7259:22:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_bool_$bound_to$_t_int256_$", + "typeString": "function (int256,int256) pure returns (bool)" + } + }, + "id": 1664, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7259:32:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "7239:52:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1657, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 8186, + 8187 + ], + "referencedDeclaration": 8186, + "src": "7231:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1666, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7231:61:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1667, + "nodeType": "ExpressionStatement", + "src": "7231:61:6" + }, + { + "assignments": [ + 1669 + ], + "declarations": [ + { + "constant": false, + "id": 1669, + "name": "marketContract", + "nodeType": "VariableDeclaration", + "scope": 1772, + "src": "7347:29:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + }, + "typeName": { + "contractScope": null, + "id": 1668, + "name": "MarketContract", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1018, + "src": "7347:14:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1675, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1671, + "name": "orderAddresses", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1644, + "src": "7394:14:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$4_calldata_ptr", + "typeString": "address[4] calldata" + } + }, + "id": 1673, + "indexExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1672, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7409:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7394:17:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1670, + "name": "MarketContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1018, + "src": "7379:14:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_MarketContract_$1018_$", + "typeString": "type(contract MarketContract)" + } + }, + "id": 1674, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7379:33:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7347:65:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1680, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "7430:27:6", + "subExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 1677, + "name": "marketContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1669, + "src": "7431:14:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + "id": 1678, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isSettled", + "nodeType": "MemberAccess", + "referencedDeclaration": 867, + "src": "7431:24:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_bool_$", + "typeString": "function () view external returns (bool)" + } + }, + "id": 1679, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7431:26:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1676, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 8186, + 8187 + ], + "referencedDeclaration": 8186, + "src": "7422:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1681, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7422:36:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1682, + "nodeType": "ExpressionStatement", + "src": "7422:36:6" + }, + { + "assignments": [ + 1686 + ], + "declarations": [ + { + "constant": false, + "id": 1686, + "name": "order", + "nodeType": "VariableDeclaration", + "scope": 1772, + "src": "7469:27:6", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order" + }, + "typeName": { + "contractScope": null, + "id": 1685, + "name": "OrderLib.Order", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2834, + "src": "7469:14:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_storage_ptr", + "typeString": "struct OrderLib.Order" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1693, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1689, + "name": "orderAddresses", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1644, + "src": "7520:14:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$4_calldata_ptr", + "typeString": "address[4] calldata" + } + }, + { + "argumentTypes": null, + "id": 1690, + "name": "unsignedOrderValues", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1648, + "src": "7536:19:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$5_calldata_ptr", + "typeString": "uint256[5] calldata" + } + }, + { + "argumentTypes": null, + "id": 1691, + "name": "orderQty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1650, + "src": "7557:8:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$4_calldata_ptr", + "typeString": "address[4] calldata" + }, + { + "typeIdentifier": "t_array$_t_uint256_$5_calldata_ptr", + "typeString": "uint256[5] calldata" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1687, + "name": "OrderLib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3083, + "src": "7499:8:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_OrderLib_$3083_$", + "typeString": "type(library OrderLib)" + } + }, + "id": 1688, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "createOrder", + "nodeType": "MemberAccess", + "referencedDeclaration": 3034, + "src": "7499:20:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_array$_t_address_$4_memory_ptr_$_t_array$_t_uint256_$5_memory_ptr_$_t_int256_$returns$_t_struct$_Order_$2834_memory_ptr_$", + "typeString": "function (address[4] memory,uint256[5] memory,int256) pure returns (struct OrderLib.Order memory)" + } + }, + "id": 1692, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7499:67:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7469:97:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1699, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1695, + "name": "order", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1686, + "src": "7584:5:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "id": 1696, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "maker", + "nodeType": "MemberAccess", + "referencedDeclaration": 2817, + "src": "7584:11:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1697, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8183, + "src": "7599:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1698, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "7599:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "7584:25:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1694, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 8186, + 8187 + ], + "referencedDeclaration": 8186, + "src": "7576:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1700, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7576:34:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1701, + "nodeType": "ExpressionStatement", + "src": "7576:34:6" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1705, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1702, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8185, + "src": "7695:3:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1703, + "name": "order", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1686, + "src": "7702:5:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "id": 1704, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "expirationTimeStamp", + "nodeType": "MemberAccess", + "referencedDeclaration": 2829, + "src": "7702:25:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7695:32:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1716, + "nodeType": "IfStatement", + "src": "7691:138:6", + "trueBody": { + "id": 1715, + "nodeType": "Block", + "src": "7729:100:6", + "statements": [ + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1707, + "name": "ErrorCodes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1265, + "src": "7754:10:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ErrorCodes_$1265_$", + "typeString": "type(enum MarketTradingHub.ErrorCodes)" + } + }, + "id": 1708, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "ORDER_EXPIRED", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "7754:24:6", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ErrorCodes_$1265", + "typeString": "enum MarketTradingHub.ErrorCodes" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1709, + "name": "order", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1686, + "src": "7780:5:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "id": 1710, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "orderHash", + "nodeType": "MemberAccess", + "referencedDeclaration": 2833, + "src": "7780:15:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_enum$_ErrorCodes_$1265", + "typeString": "enum MarketTradingHub.ErrorCodes" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 1706, + "name": "Error", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1281, + "src": "7748:5:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_enum$_ErrorCodes_$1265_$_t_bytes32_$returns$__$", + "typeString": "function (enum MarketTradingHub.ErrorCodes,bytes32)" + } + }, + "id": 1711, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7748:48:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1712, + "nodeType": "EmitStatement", + "src": "7743:53:6" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1713, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7817:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "functionReturnParameters": 1656, + "id": 1714, + "nodeType": "Return", + "src": "7810:8:6" + } + ] + } + }, + { + "assignments": [ + 1718 + ], + "declarations": [ + { + "constant": false, + "id": 1718, + "name": "remainingQty", + "nodeType": "VariableDeclaration", + "scope": 1772, + "src": "7839:16:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1717, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "7839:3:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1726, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1722, + "name": "order", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1686, + "src": "7909:5:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "id": 1723, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "orderHash", + "nodeType": "MemberAccess", + "referencedDeclaration": 2833, + "src": "7909:15:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 1721, + "name": "getQtyFilledOrCancelledFromOrder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1785, + "src": "7876:32:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_int256_$", + "typeString": "function (bytes32) view returns (int256)" + } + }, + "id": 1724, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7876:49:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1719, + "name": "orderQty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1650, + "src": "7858:8:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 1720, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "subtract", + "nodeType": "MemberAccess", + "referencedDeclaration": 2617, + "src": "7858:17:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_int256_$bound_to$_t_int256_$", + "typeString": "function (int256,int256) pure returns (int256)" + } + }, + "id": 1725, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7858:68:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7839:87:6" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1729, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1727, + "name": "remainingQty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1718, + "src": "7940:12:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1728, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7956:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "7940:17:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1740, + "nodeType": "IfStatement", + "src": "7936:173:6", + "trueBody": { + "id": 1739, + "nodeType": "Block", + "src": "7959:150:6", + "statements": [ + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1731, + "name": "ErrorCodes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1265, + "src": "8037:10:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ErrorCodes_$1265_$", + "typeString": "type(enum MarketTradingHub.ErrorCodes)" + } + }, + "id": 1732, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "ORDER_DEAD", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "8037:21:6", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ErrorCodes_$1265", + "typeString": "enum MarketTradingHub.ErrorCodes" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1733, + "name": "order", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1686, + "src": "8060:5:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "id": 1734, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "orderHash", + "nodeType": "MemberAccess", + "referencedDeclaration": 2833, + "src": "8060:15:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_enum$_ErrorCodes_$1265", + "typeString": "enum MarketTradingHub.ErrorCodes" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 1730, + "name": "Error", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1281, + "src": "8031:5:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_enum$_ErrorCodes_$1265_$_t_bytes32_$returns$__$", + "typeString": "function (enum MarketTradingHub.ErrorCodes,bytes32)" + } + }, + "id": 1735, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8031:45:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1736, + "nodeType": "EmitStatement", + "src": "8026:50:6" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1737, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8097:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "functionReturnParameters": 1656, + "id": 1738, + "nodeType": "Return", + "src": "8090:8:6" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "id": 1747, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1741, + "name": "qtyCancelled", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1655, + "src": "8119:12:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1744, + "name": "qtyToCancel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1652, + "src": "8149:11:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + { + "argumentTypes": null, + "id": 1745, + "name": "remainingQty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1718, + "src": "8162:12:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1742, + "name": "MathLib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2798, + "src": "8134:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_MathLib_$2798_$", + "typeString": "type(library MathLib)" + } + }, + "id": 1743, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "absMin", + "nodeType": "MemberAccess", + "referencedDeclaration": 2707, + "src": "8134:14:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_int256_$", + "typeString": "function (int256,int256) pure returns (int256)" + } + }, + "id": 1746, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8134:41:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "8119:56:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 1748, + "nodeType": "ExpressionStatement", + "src": "8119:56:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1752, + "name": "order", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1686, + "src": "8259:5:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "id": 1753, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "orderHash", + "nodeType": "MemberAccess", + "referencedDeclaration": 2833, + "src": "8259:15:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 1754, + "name": "qtyCancelled", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1655, + "src": "8276:12:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1749, + "name": "orderMappings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1275, + "src": "8222:13:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_OrderMappings_$2813_storage", + "typeString": "struct OrderLib.OrderMappings storage ref" + } + }, + "id": 1751, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "addCancelledQtyToOrder", + "nodeType": "MemberAccess", + "referencedDeclaration": 3082, + "src": "8222:36:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_OrderMappings_$2813_storage_ptr_$_t_bytes32_$_t_int256_$returns$__$bound_to$_t_struct$_OrderMappings_$2813_storage_ptr_$", + "typeString": "function (struct OrderLib.OrderMappings storage pointer,bytes32,int256)" + } + }, + "id": 1755, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8222:67:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1756, + "nodeType": "ExpressionStatement", + "src": "8222:67:6" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1758, + "name": "order", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1686, + "src": "8332:5:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "id": 1759, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "marketContractAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 2815, + "src": "8332:27:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1760, + "name": "order", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1686, + "src": "8373:5:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "id": 1761, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "maker", + "nodeType": "MemberAccess", + "referencedDeclaration": 2817, + "src": "8373:11:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1762, + "name": "order", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1686, + "src": "8398:5:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "id": 1763, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "feeRecipient", + "nodeType": "MemberAccess", + "referencedDeclaration": 2821, + "src": "8398:18:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1764, + "name": "qtyCancelled", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1655, + "src": "8430:12:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1765, + "name": "order", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1686, + "src": "8456:5:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "id": 1766, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "orderHash", + "nodeType": "MemberAccess", + "referencedDeclaration": 2833, + "src": "8456:15:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 1757, + "name": "OrderCancelled", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1313, + "src": "8304:14:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_address_$_t_int256_$_t_bytes32_$returns$__$", + "typeString": "function (address,address,address,int256,bytes32)" + } + }, + "id": 1767, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8304:177:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1768, + "nodeType": "EmitStatement", + "src": "8299:182:6" + }, + { + "expression": { + "argumentTypes": null, + "id": 1769, + "name": "qtyCancelled", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1655, + "src": "8499:12:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "functionReturnParameters": 1656, + "id": 1770, + "nodeType": "Return", + "src": "8492:19:6" + } + ] + }, + "documentation": "@notice called by the maker of an order to attempt to cancel the order before its expiration time stamp\n @param orderAddresses - marketContractAddress, maker, taker and feeRecipient addresses\n @param unsignedOrderValues makerFee, takerFree, price, expirationTimeStamp, and salt (for hashing)\n @param orderQty quantity of the order\n @param qtyToCancel quantity maker is attempting to cancel\n @return qty that was successfully cancelled of order.", + "id": 1772, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "cancelOrder", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1653, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1644, + "name": "orderAddresses", + "nodeType": "VariableDeclaration", + "scope": 1772, + "src": "7065:25:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$4_calldata_ptr", + "typeString": "address[4]" + }, + "typeName": { + "baseType": { + "id": 1641, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7065:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1643, + "length": { + "argumentTypes": null, + "hexValue": "34", + "id": 1642, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7073:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + }, + "value": "4" + }, + "nodeType": "ArrayTypeName", + "src": "7065:10:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$4_storage_ptr", + "typeString": "address[4]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1648, + "name": "unsignedOrderValues", + "nodeType": "VariableDeclaration", + "scope": 1772, + "src": "7100:27:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$5_calldata_ptr", + "typeString": "uint256[5]" + }, + "typeName": { + "baseType": { + "id": 1645, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "7100:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1647, + "length": { + "argumentTypes": null, + "hexValue": "35", + "id": 1646, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7105:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + }, + "value": "5" + }, + "nodeType": "ArrayTypeName", + "src": "7100:7:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$5_storage_ptr", + "typeString": "uint256[5]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1650, + "name": "orderQty", + "nodeType": "VariableDeclaration", + "scope": 1772, + "src": "7137:12:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1649, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "7137:3:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1652, + "name": "qtyToCancel", + "nodeType": "VariableDeclaration", + "scope": 1772, + "src": "7159:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1651, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "7159:3:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7055:125:6" + }, + "payable": false, + "returnParameters": { + "id": 1656, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1655, + "name": "qtyCancelled", + "nodeType": "VariableDeclaration", + "scope": 1772, + "src": "7199:16:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1654, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "7199:3:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7198:18:6" + }, + "scope": 1786, + "src": "7035:1483:6", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 1784, + "nodeType": "Block", + "src": "8898:81:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1781, + "name": "orderHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1774, + "src": "8962:9:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "id": 1779, + "name": "orderMappings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1275, + "src": "8915:13:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_OrderMappings_$2813_storage", + "typeString": "struct OrderLib.OrderMappings storage ref" + } + }, + "id": 1780, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getQtyFilledOrCancelledFromOrder", + "nodeType": "MemberAccess", + "referencedDeclaration": 2855, + "src": "8915:46:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_OrderMappings_$2813_storage_ptr_$_t_bytes32_$returns$_t_int256_$bound_to$_t_struct$_OrderMappings_$2813_storage_ptr_$", + "typeString": "function (struct OrderLib.OrderMappings storage pointer,bytes32) view returns (int256)" + } + }, + "id": 1782, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8915:57:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "functionReturnParameters": 1778, + "id": 1783, + "nodeType": "Return", + "src": "8908:64:6" + } + ] + }, + "documentation": "@notice returns the qty that is no longer available to trade for a given order\n @param orderHash hash of order to find filled and cancelled qty\n @return int quantity that is no longer able to filled from the supplied order hash", + "id": 1785, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getQtyFilledOrCancelledFromOrder", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1775, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1774, + "name": "orderHash", + "nodeType": "VariableDeclaration", + "scope": 1785, + "src": "8853:17:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1773, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "8853:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8852:19:6" + }, + "payable": false, + "returnParameters": { + "id": 1778, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1777, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1785, + "src": "8893:3:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1776, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "8893:3:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8892:5:6" + }, + "scope": 1786, + "src": "8811:168:6", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 1787, + "src": "941:8041:6" + } + ], + "src": "608:8375:6" + }, + "legacyAST": { + "absolutePath": "/home/travis/build/MARKETProtocol/MARKETProtocol/contracts/MarketTradingHub.sol", + "exportedSymbols": { + "MarketTradingHub": [ + 1786 + ] + }, + "id": 1787, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1237, + "literals": [ + "solidity", + "^", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "608:24:6" + }, + { + "absolutePath": "/home/travis/build/MARKETProtocol/MARKETProtocol/contracts/MarketCollateralPool.sol", + "file": "./MarketCollateralPool.sol", + "id": 1238, + "nodeType": "ImportDirective", + "scope": 1787, + "sourceUnit": 842, + "src": "634:36:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/travis/build/MARKETProtocol/MARKETProtocol/contracts/MarketContract.sol", + "file": "./MarketContract.sol", + "id": 1239, + "nodeType": "ImportDirective", + "scope": 1787, + "sourceUnit": 1019, + "src": "671:30:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/travis/build/MARKETProtocol/MARKETProtocol/contracts/libraries/OrderLib.sol", + "file": "./libraries/OrderLib.sol", + "id": 1240, + "nodeType": "ImportDirective", + "scope": 1787, + "sourceUnit": 3084, + "src": "702:34:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/travis/build/MARKETProtocol/MARKETProtocol/contracts/libraries/MathLib.sol", + "file": "./libraries/MathLib.sol", + "id": 1241, + "nodeType": "ImportDirective", + "scope": 1787, + "sourceUnit": 2799, + "src": "737:33:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/travis/build/MARKETProtocol/MARKETProtocol/contracts/tokens/MarketToken.sol", + "file": "./tokens/MarketToken.sol", + "id": 1242, + "nodeType": "ImportDirective", + "scope": 1787, + "sourceUnit": 5268, + "src": "771:34:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol", + "file": "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol", + "id": 1243, + "nodeType": "ImportDirective", + "scope": 1787, + "sourceUnit": 7294, + "src": "807:63:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol", + "file": "openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol", + "id": 1244, + "nodeType": "ImportDirective", + "scope": 1787, + "sourceUnit": 7388, + "src": "871:67:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 1786, + "linearizedBaseContracts": [ + 1786 + ], + "name": "MarketTradingHub", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 1247, + "libraryName": { + "contractScope": null, + "id": 1245, + "name": "OrderLib", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 3083, + "src": "979:8:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OrderLib_$3083", + "typeString": "library OrderLib" + } + }, + "nodeType": "UsingForDirective", + "src": "973:34:6", + "typeName": { + "contractScope": null, + "id": 1246, + "name": "OrderLib.Order", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2834, + "src": "992:14:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_storage_ptr", + "typeString": "struct OrderLib.Order" + } + } + }, + { + "id": 1250, + "libraryName": { + "contractScope": null, + "id": 1248, + "name": "OrderLib", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 3083, + "src": "1018:8:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OrderLib_$3083", + "typeString": "library OrderLib" + } + }, + "nodeType": "UsingForDirective", + "src": "1012:42:6", + "typeName": { + "contractScope": null, + "id": 1249, + "name": "OrderLib.OrderMappings", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2813, + "src": "1031:22:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_OrderMappings_$2813_storage_ptr", + "typeString": "struct OrderLib.OrderMappings" + } + } + }, + { + "id": 1253, + "libraryName": { + "contractScope": null, + "id": 1251, + "name": "MathLib", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2798, + "src": "1065:7:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MathLib_$2798", + "typeString": "library MathLib" + } + }, + "nodeType": "UsingForDirective", + "src": "1059:22:6", + "typeName": { + "id": 1252, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "1077:3:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + }, + { + "id": 1256, + "libraryName": { + "contractScope": null, + "id": 1254, + "name": "MathLib", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2798, + "src": "1092:7:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MathLib_$2798", + "typeString": "library MathLib" + } + }, + "nodeType": "UsingForDirective", + "src": "1086:23:6", + "typeName": { + "id": 1255, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1104:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "id": 1259, + "libraryName": { + "contractScope": null, + "id": 1257, + "name": "SafeERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 7387, + "src": "1120:9:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeERC20_$7387", + "typeString": "library SafeERC20" + } + }, + "nodeType": "UsingForDirective", + "src": "1114:26:6", + "typeName": { + "contractScope": null, + "id": 1258, + "name": "ERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 7293, + "src": "1134:5:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20_$7293", + "typeString": "contract ERC20" + } + } + }, + { + "id": 1262, + "libraryName": { + "contractScope": null, + "id": 1260, + "name": "SafeERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 7387, + "src": "1151:9:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeERC20_$7387", + "typeString": "library SafeERC20" + } + }, + "nodeType": "UsingForDirective", + "src": "1145:32:6", + "typeName": { + "contractScope": null, + "id": 1261, + "name": "MarketToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 5267, + "src": "1165:11:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketToken_$5267", + "typeString": "contract MarketToken" + } + } + }, + { + "canonicalName": "MarketTradingHub.ErrorCodes", + "id": 1265, + "members": [ + { + "id": 1263, + "name": "ORDER_EXPIRED", + "nodeType": "EnumValue", + "src": "1209:13:6" + }, + { + "id": 1264, + "name": "ORDER_DEAD", + "nodeType": "EnumValue", + "src": "1274:10:6" + } + ], + "name": "ErrorCodes", + "nodeType": "EnumDefinition", + "src": "1183:168:6" + }, + { + "constant": false, + "id": 1267, + "name": "MKT_TOKEN_ADDRESS", + "nodeType": "VariableDeclaration", + "scope": 1786, + "src": "1374:32:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1266, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1374:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 1269, + "name": "MKT_TOKEN", + "nodeType": "VariableDeclaration", + "scope": 1786, + "src": "1412:21:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketToken_$5267", + "typeString": "contract MarketToken" + }, + "typeName": { + "contractScope": null, + "id": 1268, + "name": "MarketToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 5267, + "src": "1412:11:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketToken_$5267", + "typeString": "contract MarketToken" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1271, + "name": "MARKET_COLLATERAL_POOL_ADDRESS", + "nodeType": "VariableDeclaration", + "scope": 1786, + "src": "1458:45:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1270, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1458:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 1273, + "name": "MARKET_COLLATERAL_POOL", + "nodeType": "VariableDeclaration", + "scope": 1786, + "src": "1509:43:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketCollateralPool_$841", + "typeString": "contract MarketCollateralPool" + }, + "typeName": { + "contractScope": null, + "id": 1272, + "name": "MarketCollateralPool", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 841, + "src": "1509:20:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketCollateralPool_$841", + "typeString": "contract MarketCollateralPool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1275, + "name": "orderMappings", + "nodeType": "VariableDeclaration", + "scope": 1786, + "src": "1558:36:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_OrderMappings_$2813_storage", + "typeString": "struct OrderLib.OrderMappings" + }, + "typeName": { + "contractScope": null, + "id": 1274, + "name": "OrderLib.OrderMappings", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2813, + "src": "1558:22:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_OrderMappings_$2813_storage_ptr", + "typeString": "struct OrderLib.OrderMappings" + } + }, + "value": null, + "visibility": "internal" + }, + { + "anonymous": false, + "documentation": null, + "id": 1281, + "name": "Error", + "nodeType": "EventDefinition", + "parameters": { + "id": 1280, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1277, + "indexed": true, + "name": "errorCode", + "nodeType": "VariableDeclaration", + "scope": 1281, + "src": "1627:28:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ErrorCodes_$1265", + "typeString": "enum MarketTradingHub.ErrorCodes" + }, + "typeName": { + "contractScope": null, + "id": 1276, + "name": "ErrorCodes", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1265, + "src": "1627:10:6", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ErrorCodes_$1265", + "typeString": "enum MarketTradingHub.ErrorCodes" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1279, + "indexed": true, + "name": "orderHash", + "nodeType": "VariableDeclaration", + "scope": 1281, + "src": "1657:25:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1278, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1657:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1626:57:6" + }, + "src": "1615:69:6" + }, + { + "anonymous": false, + "documentation": null, + "id": 1301, + "name": "OrderFilled", + "nodeType": "EventDefinition", + "parameters": { + "id": 1300, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1283, + "indexed": true, + "name": "marketContractAddress", + "nodeType": "VariableDeclaration", + "scope": 1301, + "src": "1737:37:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1282, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1737:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1285, + "indexed": true, + "name": "maker", + "nodeType": "VariableDeclaration", + "scope": 1301, + "src": "1784:21:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1284, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1784:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1287, + "indexed": true, + "name": "taker", + "nodeType": "VariableDeclaration", + "scope": 1301, + "src": "1815:21:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1286, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1815:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1289, + "indexed": false, + "name": "feeRecipient", + "nodeType": "VariableDeclaration", + "scope": 1301, + "src": "1846:20:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1288, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1846:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1291, + "indexed": false, + "name": "filledQty", + "nodeType": "VariableDeclaration", + "scope": 1301, + "src": "1876:13:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1290, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "1876:3:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1293, + "indexed": false, + "name": "paidMakerFee", + "nodeType": "VariableDeclaration", + "scope": 1301, + "src": "1899:17:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1292, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1899:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1295, + "indexed": false, + "name": "paidTakerFee", + "nodeType": "VariableDeclaration", + "scope": 1301, + "src": "1926:17:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1294, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1926:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1297, + "indexed": false, + "name": "price", + "nodeType": "VariableDeclaration", + "scope": 1301, + "src": "1953:10:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1296, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1953:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1299, + "indexed": false, + "name": "orderHash", + "nodeType": "VariableDeclaration", + "scope": 1301, + "src": "1973:17:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1298, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1973:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1727:269:6" + }, + "src": "1710:287:6" + }, + { + "anonymous": false, + "documentation": null, + "id": 1313, + "name": "OrderCancelled", + "nodeType": "EventDefinition", + "parameters": { + "id": 1312, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1303, + "indexed": true, + "name": "marketContractAddress", + "nodeType": "VariableDeclaration", + "scope": 1313, + "src": "2033:37:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1302, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2033:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1305, + "indexed": true, + "name": "maker", + "nodeType": "VariableDeclaration", + "scope": 1313, + "src": "2080:21:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1304, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2080:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1307, + "indexed": true, + "name": "feeRecipient", + "nodeType": "VariableDeclaration", + "scope": 1313, + "src": "2111:28:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1306, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2111:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1309, + "indexed": false, + "name": "cancelledQty", + "nodeType": "VariableDeclaration", + "scope": 1313, + "src": "2149:16:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1308, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "2149:3:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1311, + "indexed": false, + "name": "orderHash", + "nodeType": "VariableDeclaration", + "scope": 1313, + "src": "2175:17:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1310, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2175:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2023:175:6" + }, + "src": "2003:196:6" + }, + { + "body": { + "id": 1340, + "nodeType": "Block", + "src": "2450:255:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 1322, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1320, + "name": "MARKET_COLLATERAL_POOL_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1271, + "src": "2460:30:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1321, + "name": "collateralPoolAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1317, + "src": "2493:21:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "2460:54:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1323, + "nodeType": "ExpressionStatement", + "src": "2460:54:6" + }, + { + "expression": { + "argumentTypes": null, + "id": 1328, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1324, + "name": "MARKET_COLLATERAL_POOL", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1273, + "src": "2524:22:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketCollateralPool_$841", + "typeString": "contract MarketCollateralPool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1326, + "name": "MARKET_COLLATERAL_POOL_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1271, + "src": "2570:30:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1325, + "name": "MarketCollateralPool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 841, + "src": "2549:20:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_MarketCollateralPool_$841_$", + "typeString": "type(contract MarketCollateralPool)" + } + }, + "id": 1327, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2549:52:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketCollateralPool_$841", + "typeString": "contract MarketCollateralPool" + } + }, + "src": "2524:77:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketCollateralPool_$841", + "typeString": "contract MarketCollateralPool" + } + }, + "id": 1329, + "nodeType": "ExpressionStatement", + "src": "2524:77:6" + }, + { + "expression": { + "argumentTypes": null, + "id": 1332, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1330, + "name": "MKT_TOKEN_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1267, + "src": "2611:17:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1331, + "name": "mktTokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1315, + "src": "2631:15:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "2611:35:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1333, + "nodeType": "ExpressionStatement", + "src": "2611:35:6" + }, + { + "expression": { + "argumentTypes": null, + "id": 1338, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1334, + "name": "MKT_TOKEN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1269, + "src": "2656:9:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketToken_$5267", + "typeString": "contract MarketToken" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1336, + "name": "MKT_TOKEN_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1267, + "src": "2680:17:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1335, + "name": "MarketToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5267, + "src": "2668:11:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_MarketToken_$5267_$", + "typeString": "type(contract MarketToken)" + } + }, + "id": 1337, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2668:30:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketToken_$5267", + "typeString": "contract MarketToken" + } + }, + "src": "2656:42:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketToken_$5267", + "typeString": "contract MarketToken" + } + }, + "id": 1339, + "nodeType": "ExpressionStatement", + "src": "2656:42:6" + } + ] + }, + "documentation": "@param mktTokenAddress the address of the MKT ERC20 token\n @param collateralPoolAddress the address of the MarketCollateralPool", + "id": 1341, + "implemented": true, + "isConstructor": true, + "isDeclaredConst": false, + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1318, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1315, + "name": "mktTokenAddress", + "nodeType": "VariableDeclaration", + "scope": 1341, + "src": "2370:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1314, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2370:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1317, + "name": "collateralPoolAddress", + "nodeType": "VariableDeclaration", + "scope": 1341, + "src": "2403:29:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1316, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2403:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2360:78:6" + }, + "payable": false, + "returnParameters": { + "id": 1319, + "nodeType": "ParameterList", + "parameters": [], + "src": "2450:0:6" + }, + "scope": 1786, + "src": "2349:356:6", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1639, + "nodeType": "Block", + "src": "3487:3054:6", + "statements": [ + { + "assignments": [ + 1365 + ], + "declarations": [ + { + "constant": false, + "id": 1365, + "name": "marketContract", + "nodeType": "VariableDeclaration", + "scope": 1640, + "src": "3497:29:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + }, + "typeName": { + "contractScope": null, + "id": 1364, + "name": "MarketContract", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1018, + "src": "3497:14:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1371, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1367, + "name": "orderAddresses", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1345, + "src": "3544:14:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$4_calldata_ptr", + "typeString": "address[4] calldata" + } + }, + "id": 1369, + "indexExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1368, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3559:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3544:17:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1366, + "name": "MarketContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1018, + "src": "3529:14:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_MarketContract_$1018_$", + "typeString": "type(contract MarketContract)" + } + }, + "id": 1370, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3529:33:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3497:65:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1376, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "3580:27:6", + "subExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 1373, + "name": "marketContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1365, + "src": "3581:14:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + "id": 1374, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isSettled", + "nodeType": "MemberAccess", + "referencedDeclaration": 867, + "src": "3581:24:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_bool_$", + "typeString": "function () view external returns (bool)" + } + }, + "id": 1375, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3581:26:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "436f6e74726163742068617320616c726561647920736574746c6564", + "id": 1377, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3609:30:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3d915d08f4a9540343346fba3c9440905d9d48eac74266030583e122147642d4", + "typeString": "literal_string \"Contract has already settled\"" + }, + "value": "Contract has already settled" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3d915d08f4a9540343346fba3c9440905d9d48eac74266030583e122147642d4", + "typeString": "literal_string \"Contract has already settled\"" + } + ], + "id": 1372, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 8186, + 8187 + ], + "referencedDeclaration": 8187, + "src": "3572:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1378, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3572:68:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1379, + "nodeType": "ExpressionStatement", + "src": "3572:68:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1392, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1387, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1383, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1381, + "name": "orderQty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1351, + "src": "3688:8:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1382, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3700:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "3688:13:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1386, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1384, + "name": "qtyToFill", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1353, + "src": "3705:9:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1385, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3718:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "3705:14:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "3688:31:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1390, + "name": "qtyToFill", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1353, + "src": "3743:9:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1388, + "name": "orderQty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1351, + "src": "3723:8:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 1389, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isSameSign", + "nodeType": "MemberAccess", + "referencedDeclaration": 2663, + "src": "3723:19:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_bool_$bound_to$_t_int256_$", + "typeString": "function (int256,int256) pure returns (bool)" + } + }, + "id": 1391, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3723:30:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "3688:65:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "717479204572726f72", + "id": 1393, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3755:11:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6e9dd3a0b9a3acdef4d37979495fe73c5947b7b79b0332faf9b922b9c7f6e8bd", + "typeString": "literal_string \"qty Error\"" + }, + "value": "qty Error" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_6e9dd3a0b9a3acdef4d37979495fe73c5947b7b79b0332faf9b922b9c7f6e8bd", + "typeString": "literal_string \"qty Error\"" + } + ], + "id": 1380, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 8186, + 8187 + ], + "referencedDeclaration": 8187, + "src": "3680:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1394, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3680:87:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1395, + "nodeType": "ExpressionStatement", + "src": "3680:87:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1399, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8234, + "src": "3853:4:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketTradingHub_$1786", + "typeString": "contract MarketTradingHub" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1400, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8183, + "src": "3859:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1401, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3859:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_MarketTradingHub_$1786", + "typeString": "contract MarketTradingHub" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1397, + "name": "MKT_TOKEN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1269, + "src": "3818:9:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketToken_$5267", + "typeString": "contract MarketToken" + } + }, + "id": 1398, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isUserEnabledForContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 5094, + "src": "3818:34:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_bool_$", + "typeString": "function (address,address) view external returns (bool)" + } + }, + "id": 1402, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3818:52:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "74616b6572206e6f7420656e61626c6564", + "id": 1403, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3872:19:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3ec0fae02e4c4ad1f6de0ac4409f4896f9b53d0d8c4d8c3325c5a343fb372da1", + "typeString": "literal_string \"taker not enabled\"" + }, + "value": "taker not enabled" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3ec0fae02e4c4ad1f6de0ac4409f4896f9b53d0d8c4d8c3325c5a343fb372da1", + "typeString": "literal_string \"taker not enabled\"" + } + ], + "id": 1396, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 8186, + 8187 + ], + "referencedDeclaration": 8187, + "src": "3810:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1404, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3810:82:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1405, + "nodeType": "ExpressionStatement", + "src": "3810:82:6" + }, + { + "assignments": [ + 1409 + ], + "declarations": [ + { + "constant": false, + "id": 1409, + "name": "order", + "nodeType": "VariableDeclaration", + "scope": 1640, + "src": "3902:27:6", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order" + }, + "typeName": { + "contractScope": null, + "id": 1408, + "name": "OrderLib.Order", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2834, + "src": "3902:14:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_storage_ptr", + "typeString": "struct OrderLib.Order" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1416, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1412, + "name": "orderAddresses", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1345, + "src": "3953:14:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$4_calldata_ptr", + "typeString": "address[4] calldata" + } + }, + { + "argumentTypes": null, + "id": 1413, + "name": "unsignedOrderValues", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1349, + "src": "3969:19:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$5_calldata_ptr", + "typeString": "uint256[5] calldata" + } + }, + { + "argumentTypes": null, + "id": 1414, + "name": "orderQty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1351, + "src": "3990:8:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$4_calldata_ptr", + "typeString": "address[4] calldata" + }, + { + "typeIdentifier": "t_array$_t_uint256_$5_calldata_ptr", + "typeString": "uint256[5] calldata" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1410, + "name": "OrderLib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3083, + "src": "3932:8:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_OrderLib_$3083_$", + "typeString": "type(library OrderLib)" + } + }, + "id": 1411, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "createOrder", + "nodeType": "MemberAccess", + "referencedDeclaration": 3034, + "src": "3932:20:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_array$_t_address_$4_memory_ptr_$_t_array$_t_uint256_$5_memory_ptr_$_t_int256_$returns$_t_struct$_Order_$2834_memory_ptr_$", + "typeString": "function (address[4] memory,uint256[5] memory,int256) pure returns (struct OrderLib.Order memory)" + } + }, + "id": 1415, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3932:67:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3902:97:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1420, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8234, + "src": "4052:4:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketTradingHub_$1786", + "typeString": "contract MarketTradingHub" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1421, + "name": "order", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1409, + "src": "4058:5:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "id": 1422, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "maker", + "nodeType": "MemberAccess", + "referencedDeclaration": 2817, + "src": "4058:11:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_MarketTradingHub_$1786", + "typeString": "contract MarketTradingHub" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1418, + "name": "MKT_TOKEN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1269, + "src": "4017:9:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketToken_$5267", + "typeString": "contract MarketToken" + } + }, + "id": 1419, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isUserEnabledForContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 5094, + "src": "4017:34:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_bool_$", + "typeString": "function (address,address) view external returns (bool)" + } + }, + "id": 1423, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4017:53:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6d616b6572206e6f7420656e61626c6564", + "id": 1424, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4072:19:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f591c04c85556729a214fec06a9010d45a222109f1012a11d623e4264f094fa7", + "typeString": "literal_string \"maker not enabled\"" + }, + "value": "maker not enabled" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f591c04c85556729a214fec06a9010d45a222109f1012a11d623e4264f094fa7", + "typeString": "literal_string \"maker not enabled\"" + } + ], + "id": 1417, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 8186, + 8187 + ], + "referencedDeclaration": 8187, + "src": "4009:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1425, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4009:83:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1426, + "nodeType": "ExpressionStatement", + "src": "4009:83:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1439, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1433, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1428, + "name": "order", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1409, + "src": "4171:5:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "id": 1429, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "taker", + "nodeType": "MemberAccess", + "referencedDeclaration": 2819, + "src": "4171:11:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 1431, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4194:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 1430, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4186:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1432, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4186:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "4171:25:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1438, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1434, + "name": "order", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1409, + "src": "4200:5:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "id": 1435, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "taker", + "nodeType": "MemberAccess", + "referencedDeclaration": 2819, + "src": "4200:11:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1436, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8183, + "src": "4215:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1437, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4215:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "4200:25:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "4171:54:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "696e76616c69642074616b6572", + "id": 1440, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4227:15:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_9b8f39c55e1fac8d08f4136461b1cc109e6efdbdef6ed7f762e9d6312aee7316", + "typeString": "literal_string \"invalid taker\"" + }, + "value": "invalid taker" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_9b8f39c55e1fac8d08f4136461b1cc109e6efdbdef6ed7f762e9d6312aee7316", + "typeString": "literal_string \"invalid taker\"" + } + ], + "id": 1427, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 8186, + 8187 + ], + "referencedDeclaration": 8187, + "src": "4163:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1441, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4163:80:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1442, + "nodeType": "ExpressionStatement", + "src": "4163:80:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1455, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1449, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1444, + "name": "order", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1409, + "src": "4296:5:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "id": 1445, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "maker", + "nodeType": "MemberAccess", + "referencedDeclaration": 2817, + "src": "4296:11:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 1447, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4319:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 1446, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4311:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1448, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4311:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "4296:25:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1454, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1450, + "name": "order", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1409, + "src": "4325:5:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "id": 1451, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "maker", + "nodeType": "MemberAccess", + "referencedDeclaration": 2817, + "src": "4325:11:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1452, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8183, + "src": "4340:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1453, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4340:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "4325:25:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "4296:54:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "696e76616c69642077617368207472616465", + "id": 1456, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4352:20:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_68e4475e073cab100f6ecf40423380c9bab7d9880083bd9a5e4bc42821ac484b", + "typeString": "literal_string \"invalid wash trade\"" + }, + "value": "invalid wash trade" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_68e4475e073cab100f6ecf40423380c9bab7d9880083bd9a5e4bc42821ac484b", + "typeString": "literal_string \"invalid wash trade\"" + } + ], + "id": 1443, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 8186, + 8187 + ], + "referencedDeclaration": 8187, + "src": "4288:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1457, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4288:85:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1458, + "nodeType": "ExpressionStatement", + "src": "4288:85:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1462, + "name": "order", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1409, + "src": "4448:5:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "id": 1463, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "maker", + "nodeType": "MemberAccess", + "referencedDeclaration": 2817, + "src": "4448:11:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1464, + "name": "order", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1409, + "src": "4477:5:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "id": 1465, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "orderHash", + "nodeType": "MemberAccess", + "referencedDeclaration": 2833, + "src": "4477:15:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 1466, + "name": "v", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1355, + "src": "4510:1:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "argumentTypes": null, + "id": 1467, + "name": "r", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1357, + "src": "4529:1:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 1468, + "name": "s", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1359, + "src": "4548:1:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "id": 1460, + "name": "OrderLib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3083, + "src": "4405:8:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_OrderLib_$3083_$", + "typeString": "type(library OrderLib)" + } + }, + "id": 1461, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isValidSignature", + "nodeType": "MemberAccess", + "referencedDeclaration": 2936, + "src": "4405:25:6", + "typeDescriptions": { + "typeIdentifier": "t_function_delegatecall_pure$_t_address_$_t_bytes32_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$_t_bool_$", + "typeString": "function (address,bytes32,uint8,bytes32,bytes32) pure returns (bool)" + } + }, + "id": 1469, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4405:158:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1459, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 8186, + 8187 + ], + "referencedDeclaration": 8186, + "src": "4384:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1470, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4384:189:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1471, + "nodeType": "ExpressionStatement", + "src": "4384:189:6" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1475, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1472, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8185, + "src": "4589:3:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1473, + "name": "order", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1409, + "src": "4596:5:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "id": 1474, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "expirationTimeStamp", + "nodeType": "MemberAccess", + "referencedDeclaration": 2829, + "src": "4596:25:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4589:32:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1486, + "nodeType": "IfStatement", + "src": "4585:138:6", + "trueBody": { + "id": 1485, + "nodeType": "Block", + "src": "4623:100:6", + "statements": [ + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1477, + "name": "ErrorCodes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1265, + "src": "4648:10:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ErrorCodes_$1265_$", + "typeString": "type(enum MarketTradingHub.ErrorCodes)" + } + }, + "id": 1478, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "ORDER_EXPIRED", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4648:24:6", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ErrorCodes_$1265", + "typeString": "enum MarketTradingHub.ErrorCodes" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1479, + "name": "order", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1409, + "src": "4674:5:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "id": 1480, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "orderHash", + "nodeType": "MemberAccess", + "referencedDeclaration": 2833, + "src": "4674:15:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_enum$_ErrorCodes_$1265", + "typeString": "enum MarketTradingHub.ErrorCodes" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 1476, + "name": "Error", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1281, + "src": "4642:5:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_enum$_ErrorCodes_$1265_$_t_bytes32_$returns$__$", + "typeString": "function (enum MarketTradingHub.ErrorCodes,bytes32)" + } + }, + "id": 1481, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4642:48:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1482, + "nodeType": "EmitStatement", + "src": "4637:53:6" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1483, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4711:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "functionReturnParameters": 1363, + "id": 1484, + "nodeType": "Return", + "src": "4704:8:6" + } + ] + } + }, + { + "assignments": [ + 1488 + ], + "declarations": [ + { + "constant": false, + "id": 1488, + "name": "remainingQty", + "nodeType": "VariableDeclaration", + "scope": 1640, + "src": "4733:16:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1487, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "4733:3:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1496, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1492, + "name": "order", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1409, + "src": "4803:5:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "id": 1493, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "orderHash", + "nodeType": "MemberAccess", + "referencedDeclaration": 2833, + "src": "4803:15:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 1491, + "name": "getQtyFilledOrCancelledFromOrder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1785, + "src": "4770:32:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_int256_$", + "typeString": "function (bytes32) view returns (int256)" + } + }, + "id": 1494, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4770:49:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1489, + "name": "orderQty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1351, + "src": "4752:8:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 1490, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "subtract", + "nodeType": "MemberAccess", + "referencedDeclaration": 2617, + "src": "4752:17:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_int256_$bound_to$_t_int256_$", + "typeString": "function (int256,int256) pure returns (int256)" + } + }, + "id": 1495, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4752:68:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4733:87:6" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1499, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1497, + "name": "remainingQty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1488, + "src": "4834:12:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1498, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4850:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "4834:17:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1510, + "nodeType": "IfStatement", + "src": "4830:165:6", + "trueBody": { + "id": 1509, + "nodeType": "Block", + "src": "4853:142:6", + "statements": [ + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1501, + "name": "ErrorCodes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1265, + "src": "4923:10:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ErrorCodes_$1265_$", + "typeString": "type(enum MarketTradingHub.ErrorCodes)" + } + }, + "id": 1502, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "ORDER_DEAD", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4923:21:6", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ErrorCodes_$1265", + "typeString": "enum MarketTradingHub.ErrorCodes" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1503, + "name": "order", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1409, + "src": "4946:5:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "id": 1504, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "orderHash", + "nodeType": "MemberAccess", + "referencedDeclaration": 2833, + "src": "4946:15:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_enum$_ErrorCodes_$1265", + "typeString": "enum MarketTradingHub.ErrorCodes" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 1500, + "name": "Error", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1281, + "src": "4917:5:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_enum$_ErrorCodes_$1265_$_t_bytes32_$returns$__$", + "typeString": "function (enum MarketTradingHub.ErrorCodes,bytes32)" + } + }, + "id": 1505, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4917:45:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1506, + "nodeType": "EmitStatement", + "src": "4912:50:6" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1507, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4983:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "functionReturnParameters": 1363, + "id": 1508, + "nodeType": "Return", + "src": "4976:8:6" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "id": 1517, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1511, + "name": "filledQty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1362, + "src": "5005:9:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1514, + "name": "remainingQty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1488, + "src": "5032:12:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + { + "argumentTypes": null, + "id": 1515, + "name": "qtyToFill", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1353, + "src": "5046:9:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1512, + "name": "MathLib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2798, + "src": "5017:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_MathLib_$2798_$", + "typeString": "type(library MathLib)" + } + }, + "id": 1513, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "absMin", + "nodeType": "MemberAccess", + "referencedDeclaration": 2707, + "src": "5017:14:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_int256_$", + "typeString": "function (int256,int256) pure returns (int256)" + } + }, + "id": 1516, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5017:39:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "5005:51:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 1518, + "nodeType": "ExpressionStatement", + "src": "5005:51:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1522, + "name": "order", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1409, + "src": "5118:5:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "id": 1523, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "marketContractAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 2815, + "src": "5118:27:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1524, + "name": "order", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1409, + "src": "5159:5:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "id": 1525, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "maker", + "nodeType": "MemberAccess", + "referencedDeclaration": 2817, + "src": "5159:11:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1526, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8183, + "src": "5184:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1527, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5184:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1528, + "name": "filledQty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1362, + "src": "5208:9:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1529, + "name": "order", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1409, + "src": "5231:5:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "id": 1530, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "price", + "nodeType": "MemberAccess", + "referencedDeclaration": 2827, + "src": "5231:11:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1519, + "name": "MARKET_COLLATERAL_POOL", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1273, + "src": "5066:22:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketCollateralPool_$841", + "typeString": "contract MarketCollateralPool" + } + }, + "id": 1521, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "updatePositions", + "nodeType": "MemberAccess", + "referencedDeclaration": 384, + "src": "5066:38:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_address_$_t_int256_$_t_uint256_$returns$__$", + "typeString": "function (address,address,address,int256,uint256) external" + } + }, + "id": 1531, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5066:186:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1532, + "nodeType": "ExpressionStatement", + "src": "5066:186:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1536, + "name": "order", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1409, + "src": "5296:5:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "id": 1537, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "orderHash", + "nodeType": "MemberAccess", + "referencedDeclaration": 2833, + "src": "5296:15:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 1538, + "name": "filledQty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1362, + "src": "5313:9:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1533, + "name": "orderMappings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1275, + "src": "5262:13:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_OrderMappings_$2813_storage", + "typeString": "struct OrderLib.OrderMappings storage ref" + } + }, + "id": 1535, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "addFilledQtyToOrder", + "nodeType": "MemberAccess", + "referencedDeclaration": 3058, + "src": "5262:33:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_OrderMappings_$2813_storage_ptr_$_t_bytes32_$_t_int256_$returns$__$bound_to$_t_struct$_OrderMappings_$2813_storage_ptr_$", + "typeString": "function (struct OrderLib.OrderMappings storage pointer,bytes32,int256)" + } + }, + "id": 1539, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5262:61:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1540, + "nodeType": "ExpressionStatement", + "src": "5262:61:6" + }, + { + "assignments": [ + 1542 + ], + "declarations": [ + { + "constant": false, + "id": 1542, + "name": "paidMakerFee", + "nodeType": "VariableDeclaration", + "scope": 1640, + "src": "5334:17:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1541, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "5334:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1544, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 1543, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5354:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "5334:21:6" + }, + { + "assignments": [ + 1546 + ], + "declarations": [ + { + "constant": false, + "id": 1546, + "name": "paidTakerFee", + "nodeType": "VariableDeclaration", + "scope": 1640, + "src": "5365:17:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1545, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "5365:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1548, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 1547, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5385:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "5365:21:6" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1554, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1549, + "name": "order", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1409, + "src": "5401:5:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "id": 1550, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "feeRecipient", + "nodeType": "MemberAccess", + "referencedDeclaration": 2821, + "src": "5401:18:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 1552, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5431:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 1551, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5423:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1553, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5423:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "5401:32:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1618, + "nodeType": "IfStatement", + "src": "5397:823:6", + "trueBody": { + "id": 1617, + "nodeType": "Block", + "src": "5435:785:6", + "statements": [ + { + "assignments": [ + 1556 + ], + "declarations": [ + { + "constant": false, + "id": 1556, + "name": "filledAbsQty", + "nodeType": "VariableDeclaration", + "scope": 1640, + "src": "5502:17:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1555, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "5502:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1560, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 1557, + "name": "filledQty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1362, + "src": "5522:9:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 1558, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "abs", + "nodeType": "MemberAccess", + "referencedDeclaration": 2686, + "src": "5522:13:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_uint256_$bound_to$_t_int256_$", + "typeString": "function (int256) pure returns (uint256)" + } + }, + "id": 1559, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5522:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5502:35:6" + }, + { + "assignments": [ + 1562 + ], + "declarations": [ + { + "constant": false, + "id": 1562, + "name": "orderAbsQty", + "nodeType": "VariableDeclaration", + "scope": 1640, + "src": "5551:16:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1561, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "5551:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1566, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 1563, + "name": "filledQty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1362, + "src": "5570:9:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 1564, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "abs", + "nodeType": "MemberAccess", + "referencedDeclaration": 2686, + "src": "5570:13:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_uint256_$bound_to$_t_int256_$", + "typeString": "function (int256) pure returns (uint256)" + } + }, + "id": 1565, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5570:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5551:34:6" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1570, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1567, + "name": "order", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1409, + "src": "5603:5:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "id": 1568, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "makerFee", + "nodeType": "MemberAccess", + "referencedDeclaration": 2823, + "src": "5603:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1569, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5620:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "5603:18:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1591, + "nodeType": "IfStatement", + "src": "5599:299:6", + "trueBody": { + "id": 1590, + "nodeType": "Block", + "src": "5623:275:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 1578, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1571, + "name": "paidMakerFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1542, + "src": "5641:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1575, + "name": "filledAbsQty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1556, + "src": "5688:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1576, + "name": "orderAbsQty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1562, + "src": "5702:11:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1572, + "name": "order", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1409, + "src": "5656:5:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "id": 1573, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "makerFee", + "nodeType": "MemberAccess", + "referencedDeclaration": 2823, + "src": "5656:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1574, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "divideFractional", + "nodeType": "MemberAccess", + "referencedDeclaration": 2508, + "src": "5656:31:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256,uint256) pure returns (uint256)" + } + }, + "id": 1577, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5656:58:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5641:73:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1579, + "nodeType": "ExpressionStatement", + "src": "5641:73:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1583, + "name": "order", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1409, + "src": "5780:5:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "id": 1584, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "maker", + "nodeType": "MemberAccess", + "referencedDeclaration": 2817, + "src": "5780:11:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1585, + "name": "order", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1409, + "src": "5813:5:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "id": 1586, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "feeRecipient", + "nodeType": "MemberAccess", + "referencedDeclaration": 2821, + "src": "5813:18:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1587, + "name": "paidMakerFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1542, + "src": "5853:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1580, + "name": "MKT_TOKEN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1269, + "src": "5732:9:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketToken_$5267", + "typeString": "contract MarketToken" + } + }, + "id": 1582, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "safeTransferFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 7368, + "src": "5732:26:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_ERC20_$7293_$_t_address_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_ERC20_$7293_$", + "typeString": "function (contract ERC20,address,address,uint256)" + } + }, + "id": 1588, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5732:151:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1589, + "nodeType": "ExpressionStatement", + "src": "5732:151:6" + } + ] + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1595, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1592, + "name": "order", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1409, + "src": "5916:5:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "id": 1593, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "takerFee", + "nodeType": "MemberAccess", + "referencedDeclaration": 2825, + "src": "5916:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1594, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5933:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "5916:18:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1616, + "nodeType": "IfStatement", + "src": "5912:298:6", + "trueBody": { + "id": 1615, + "nodeType": "Block", + "src": "5936:274:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 1603, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1596, + "name": "paidTakerFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1546, + "src": "5954:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1600, + "name": "filledAbsQty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1556, + "src": "6001:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1601, + "name": "orderAbsQty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1562, + "src": "6015:11:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1597, + "name": "order", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1409, + "src": "5969:5:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "id": 1598, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "takerFee", + "nodeType": "MemberAccess", + "referencedDeclaration": 2825, + "src": "5969:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1599, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "divideFractional", + "nodeType": "MemberAccess", + "referencedDeclaration": 2508, + "src": "5969:31:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256,uint256) pure returns (uint256)" + } + }, + "id": 1602, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5969:58:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5954:73:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1604, + "nodeType": "ExpressionStatement", + "src": "5954:73:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1608, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8183, + "src": "6093:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1609, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6093:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1610, + "name": "order", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1409, + "src": "6125:5:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "id": 1611, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "feeRecipient", + "nodeType": "MemberAccess", + "referencedDeclaration": 2821, + "src": "6125:18:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1612, + "name": "paidTakerFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1546, + "src": "6165:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1605, + "name": "MKT_TOKEN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1269, + "src": "6045:9:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketToken_$5267", + "typeString": "contract MarketToken" + } + }, + "id": 1607, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "safeTransferFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 7368, + "src": "6045:26:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_ERC20_$7293_$_t_address_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_ERC20_$7293_$", + "typeString": "function (contract ERC20,address,address,uint256)" + } + }, + "id": 1613, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6045:150:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1614, + "nodeType": "ExpressionStatement", + "src": "6045:150:6" + } + ] + } + } + ] + } + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1620, + "name": "order", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1409, + "src": "6260:5:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "id": 1621, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "marketContractAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 2815, + "src": "6260:27:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1622, + "name": "order", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1409, + "src": "6301:5:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "id": 1623, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "maker", + "nodeType": "MemberAccess", + "referencedDeclaration": 2817, + "src": "6301:11:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1624, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8183, + "src": "6326:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1625, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6326:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1626, + "name": "order", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1409, + "src": "6350:5:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "id": 1627, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "feeRecipient", + "nodeType": "MemberAccess", + "referencedDeclaration": 2821, + "src": "6350:18:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1628, + "name": "filledQty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1362, + "src": "6382:9:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + { + "argumentTypes": null, + "id": 1629, + "name": "paidMakerFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1542, + "src": "6405:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1630, + "name": "paidTakerFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1546, + "src": "6431:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1631, + "name": "order", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1409, + "src": "6457:5:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "id": 1632, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "price", + "nodeType": "MemberAccess", + "referencedDeclaration": 2827, + "src": "6457:11:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1633, + "name": "order", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1409, + "src": "6482:5:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "id": 1634, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "orderHash", + "nodeType": "MemberAccess", + "referencedDeclaration": 2833, + "src": "6482:15:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 1619, + "name": "OrderFilled", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1301, + "src": "6235:11:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_address_$_t_address_$_t_int256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_bytes32_$returns$__$", + "typeString": "function (address,address,address,address,int256,uint256,uint256,uint256,bytes32)" + } + }, + "id": 1635, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6235:272:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1636, + "nodeType": "EmitStatement", + "src": "6230:277:6" + }, + { + "expression": { + "argumentTypes": null, + "id": 1637, + "name": "filledQty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1362, + "src": "6525:9:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "functionReturnParameters": 1363, + "id": 1638, + "nodeType": "Return", + "src": "6518:16:6" + } + ] + }, + "documentation": "@param orderAddresses - marketContractAddress, maker, taker and feeRecipient addresses\n @param unsignedOrderValues makerFee, takerFree, price, expirationTimeStamp, and salt (for hashing)\n @param orderQty quantity of the order\n @param qtyToFill quantity taker is willing to fill of original order(max)\n @param v order signature\n @param r order signature\n @param s order signature", + "id": 1640, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "tradeOrder", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1360, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1345, + "name": "orderAddresses", + "nodeType": "VariableDeclaration", + "scope": 1640, + "src": "3281:25:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$4_calldata_ptr", + "typeString": "address[4]" + }, + "typeName": { + "baseType": { + "id": 1342, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3281:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1344, + "length": { + "argumentTypes": null, + "hexValue": "34", + "id": 1343, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3289:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + }, + "value": "4" + }, + "nodeType": "ArrayTypeName", + "src": "3281:10:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$4_storage_ptr", + "typeString": "address[4]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1349, + "name": "unsignedOrderValues", + "nodeType": "VariableDeclaration", + "scope": 1640, + "src": "3316:27:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$5_calldata_ptr", + "typeString": "uint256[5]" + }, + "typeName": { + "baseType": { + "id": 1346, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3316:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1348, + "length": { + "argumentTypes": null, + "hexValue": "35", + "id": 1347, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3321:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + }, + "value": "5" + }, + "nodeType": "ArrayTypeName", + "src": "3316:7:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$5_storage_ptr", + "typeString": "uint256[5]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1351, + "name": "orderQty", + "nodeType": "VariableDeclaration", + "scope": 1640, + "src": "3353:12:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1350, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "3353:3:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1353, + "name": "qtyToFill", + "nodeType": "VariableDeclaration", + "scope": 1640, + "src": "3375:13:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1352, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "3375:3:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1355, + "name": "v", + "nodeType": "VariableDeclaration", + "scope": 1640, + "src": "3398:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 1354, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "3398:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1357, + "name": "r", + "nodeType": "VariableDeclaration", + "scope": 1640, + "src": "3415:9:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1356, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3415:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1359, + "name": "s", + "nodeType": "VariableDeclaration", + "scope": 1640, + "src": "3434:9:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1358, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3434:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3271:178:6" + }, + "payable": false, + "returnParameters": { + "id": 1363, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1362, + "name": "filledQty", + "nodeType": "VariableDeclaration", + "scope": 1640, + "src": "3468:13:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1361, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "3468:3:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3467:15:6" + }, + "scope": 1786, + "src": "3252:3289:6", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 1771, + "nodeType": "Block", + "src": "7221:1297:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1665, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1660, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1658, + "name": "qtyToCancel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1652, + "src": "7239:11:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1659, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7254:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "7239:16:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1663, + "name": "orderQty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1650, + "src": "7282:8:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1661, + "name": "qtyToCancel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1652, + "src": "7259:11:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 1662, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isSameSign", + "nodeType": "MemberAccess", + "referencedDeclaration": 2663, + "src": "7259:22:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_bool_$bound_to$_t_int256_$", + "typeString": "function (int256,int256) pure returns (bool)" + } + }, + "id": 1664, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7259:32:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "7239:52:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1657, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 8186, + 8187 + ], + "referencedDeclaration": 8186, + "src": "7231:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1666, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7231:61:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1667, + "nodeType": "ExpressionStatement", + "src": "7231:61:6" + }, + { + "assignments": [ + 1669 + ], + "declarations": [ + { + "constant": false, + "id": 1669, + "name": "marketContract", + "nodeType": "VariableDeclaration", + "scope": 1772, + "src": "7347:29:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + }, + "typeName": { + "contractScope": null, + "id": 1668, + "name": "MarketContract", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1018, + "src": "7347:14:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1675, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1671, + "name": "orderAddresses", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1644, + "src": "7394:14:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$4_calldata_ptr", + "typeString": "address[4] calldata" + } + }, + "id": 1673, + "indexExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1672, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7409:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7394:17:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1670, + "name": "MarketContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1018, + "src": "7379:14:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_MarketContract_$1018_$", + "typeString": "type(contract MarketContract)" + } + }, + "id": 1674, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7379:33:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7347:65:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1680, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "7430:27:6", + "subExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 1677, + "name": "marketContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1669, + "src": "7431:14:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MarketContract_$1018", + "typeString": "contract MarketContract" + } + }, + "id": 1678, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isSettled", + "nodeType": "MemberAccess", + "referencedDeclaration": 867, + "src": "7431:24:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_bool_$", + "typeString": "function () view external returns (bool)" + } + }, + "id": 1679, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7431:26:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1676, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 8186, + 8187 + ], + "referencedDeclaration": 8186, + "src": "7422:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1681, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7422:36:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1682, + "nodeType": "ExpressionStatement", + "src": "7422:36:6" + }, + { + "assignments": [ + 1686 + ], + "declarations": [ + { + "constant": false, + "id": 1686, + "name": "order", + "nodeType": "VariableDeclaration", + "scope": 1772, + "src": "7469:27:6", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order" + }, + "typeName": { + "contractScope": null, + "id": 1685, + "name": "OrderLib.Order", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2834, + "src": "7469:14:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_storage_ptr", + "typeString": "struct OrderLib.Order" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1693, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1689, + "name": "orderAddresses", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1644, + "src": "7520:14:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$4_calldata_ptr", + "typeString": "address[4] calldata" + } + }, + { + "argumentTypes": null, + "id": 1690, + "name": "unsignedOrderValues", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1648, + "src": "7536:19:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$5_calldata_ptr", + "typeString": "uint256[5] calldata" + } + }, + { + "argumentTypes": null, + "id": 1691, + "name": "orderQty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1650, + "src": "7557:8:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$4_calldata_ptr", + "typeString": "address[4] calldata" + }, + { + "typeIdentifier": "t_array$_t_uint256_$5_calldata_ptr", + "typeString": "uint256[5] calldata" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1687, + "name": "OrderLib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3083, + "src": "7499:8:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_OrderLib_$3083_$", + "typeString": "type(library OrderLib)" + } + }, + "id": 1688, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "createOrder", + "nodeType": "MemberAccess", + "referencedDeclaration": 3034, + "src": "7499:20:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_array$_t_address_$4_memory_ptr_$_t_array$_t_uint256_$5_memory_ptr_$_t_int256_$returns$_t_struct$_Order_$2834_memory_ptr_$", + "typeString": "function (address[4] memory,uint256[5] memory,int256) pure returns (struct OrderLib.Order memory)" + } + }, + "id": 1692, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7499:67:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7469:97:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1699, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1695, + "name": "order", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1686, + "src": "7584:5:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "id": 1696, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "maker", + "nodeType": "MemberAccess", + "referencedDeclaration": 2817, + "src": "7584:11:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1697, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8183, + "src": "7599:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1698, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "7599:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "7584:25:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1694, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 8186, + 8187 + ], + "referencedDeclaration": 8186, + "src": "7576:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1700, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7576:34:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1701, + "nodeType": "ExpressionStatement", + "src": "7576:34:6" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1705, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1702, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8185, + "src": "7695:3:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1703, + "name": "order", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1686, + "src": "7702:5:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "id": 1704, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "expirationTimeStamp", + "nodeType": "MemberAccess", + "referencedDeclaration": 2829, + "src": "7702:25:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7695:32:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1716, + "nodeType": "IfStatement", + "src": "7691:138:6", + "trueBody": { + "id": 1715, + "nodeType": "Block", + "src": "7729:100:6", + "statements": [ + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1707, + "name": "ErrorCodes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1265, + "src": "7754:10:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ErrorCodes_$1265_$", + "typeString": "type(enum MarketTradingHub.ErrorCodes)" + } + }, + "id": 1708, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "ORDER_EXPIRED", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "7754:24:6", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ErrorCodes_$1265", + "typeString": "enum MarketTradingHub.ErrorCodes" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1709, + "name": "order", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1686, + "src": "7780:5:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "id": 1710, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "orderHash", + "nodeType": "MemberAccess", + "referencedDeclaration": 2833, + "src": "7780:15:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_enum$_ErrorCodes_$1265", + "typeString": "enum MarketTradingHub.ErrorCodes" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 1706, + "name": "Error", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1281, + "src": "7748:5:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_enum$_ErrorCodes_$1265_$_t_bytes32_$returns$__$", + "typeString": "function (enum MarketTradingHub.ErrorCodes,bytes32)" + } + }, + "id": 1711, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7748:48:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1712, + "nodeType": "EmitStatement", + "src": "7743:53:6" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1713, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7817:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "functionReturnParameters": 1656, + "id": 1714, + "nodeType": "Return", + "src": "7810:8:6" + } + ] + } + }, + { + "assignments": [ + 1718 + ], + "declarations": [ + { + "constant": false, + "id": 1718, + "name": "remainingQty", + "nodeType": "VariableDeclaration", + "scope": 1772, + "src": "7839:16:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1717, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "7839:3:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1726, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1722, + "name": "order", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1686, + "src": "7909:5:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "id": 1723, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "orderHash", + "nodeType": "MemberAccess", + "referencedDeclaration": 2833, + "src": "7909:15:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 1721, + "name": "getQtyFilledOrCancelledFromOrder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1785, + "src": "7876:32:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_int256_$", + "typeString": "function (bytes32) view returns (int256)" + } + }, + "id": 1724, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7876:49:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1719, + "name": "orderQty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1650, + "src": "7858:8:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 1720, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "subtract", + "nodeType": "MemberAccess", + "referencedDeclaration": 2617, + "src": "7858:17:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_int256_$bound_to$_t_int256_$", + "typeString": "function (int256,int256) pure returns (int256)" + } + }, + "id": 1725, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7858:68:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7839:87:6" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1729, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1727, + "name": "remainingQty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1718, + "src": "7940:12:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1728, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7956:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "7940:17:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1740, + "nodeType": "IfStatement", + "src": "7936:173:6", + "trueBody": { + "id": 1739, + "nodeType": "Block", + "src": "7959:150:6", + "statements": [ + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1731, + "name": "ErrorCodes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1265, + "src": "8037:10:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ErrorCodes_$1265_$", + "typeString": "type(enum MarketTradingHub.ErrorCodes)" + } + }, + "id": 1732, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "ORDER_DEAD", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "8037:21:6", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ErrorCodes_$1265", + "typeString": "enum MarketTradingHub.ErrorCodes" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1733, + "name": "order", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1686, + "src": "8060:5:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "id": 1734, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "orderHash", + "nodeType": "MemberAccess", + "referencedDeclaration": 2833, + "src": "8060:15:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_enum$_ErrorCodes_$1265", + "typeString": "enum MarketTradingHub.ErrorCodes" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 1730, + "name": "Error", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1281, + "src": "8031:5:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_enum$_ErrorCodes_$1265_$_t_bytes32_$returns$__$", + "typeString": "function (enum MarketTradingHub.ErrorCodes,bytes32)" + } + }, + "id": 1735, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8031:45:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1736, + "nodeType": "EmitStatement", + "src": "8026:50:6" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1737, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8097:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "functionReturnParameters": 1656, + "id": 1738, + "nodeType": "Return", + "src": "8090:8:6" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "id": 1747, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1741, + "name": "qtyCancelled", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1655, + "src": "8119:12:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1744, + "name": "qtyToCancel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1652, + "src": "8149:11:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + { + "argumentTypes": null, + "id": 1745, + "name": "remainingQty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1718, + "src": "8162:12:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1742, + "name": "MathLib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2798, + "src": "8134:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_MathLib_$2798_$", + "typeString": "type(library MathLib)" + } + }, + "id": 1743, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "absMin", + "nodeType": "MemberAccess", + "referencedDeclaration": 2707, + "src": "8134:14:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_int256_$", + "typeString": "function (int256,int256) pure returns (int256)" + } + }, + "id": 1746, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8134:41:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "8119:56:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 1748, + "nodeType": "ExpressionStatement", + "src": "8119:56:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1752, + "name": "order", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1686, + "src": "8259:5:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "id": 1753, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "orderHash", + "nodeType": "MemberAccess", + "referencedDeclaration": 2833, + "src": "8259:15:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 1754, + "name": "qtyCancelled", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1655, + "src": "8276:12:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1749, + "name": "orderMappings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1275, + "src": "8222:13:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_OrderMappings_$2813_storage", + "typeString": "struct OrderLib.OrderMappings storage ref" + } + }, + "id": 1751, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "addCancelledQtyToOrder", + "nodeType": "MemberAccess", + "referencedDeclaration": 3082, + "src": "8222:36:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_OrderMappings_$2813_storage_ptr_$_t_bytes32_$_t_int256_$returns$__$bound_to$_t_struct$_OrderMappings_$2813_storage_ptr_$", + "typeString": "function (struct OrderLib.OrderMappings storage pointer,bytes32,int256)" + } + }, + "id": 1755, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8222:67:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1756, + "nodeType": "ExpressionStatement", + "src": "8222:67:6" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1758, + "name": "order", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1686, + "src": "8332:5:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "id": 1759, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "marketContractAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 2815, + "src": "8332:27:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1760, + "name": "order", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1686, + "src": "8373:5:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "id": 1761, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "maker", + "nodeType": "MemberAccess", + "referencedDeclaration": 2817, + "src": "8373:11:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1762, + "name": "order", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1686, + "src": "8398:5:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "id": 1763, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "feeRecipient", + "nodeType": "MemberAccess", + "referencedDeclaration": 2821, + "src": "8398:18:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1764, + "name": "qtyCancelled", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1655, + "src": "8430:12:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1765, + "name": "order", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1686, + "src": "8456:5:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "id": 1766, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "orderHash", + "nodeType": "MemberAccess", + "referencedDeclaration": 2833, + "src": "8456:15:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 1757, + "name": "OrderCancelled", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1313, + "src": "8304:14:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_address_$_t_int256_$_t_bytes32_$returns$__$", + "typeString": "function (address,address,address,int256,bytes32)" + } + }, + "id": 1767, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8304:177:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1768, + "nodeType": "EmitStatement", + "src": "8299:182:6" + }, + { + "expression": { + "argumentTypes": null, + "id": 1769, + "name": "qtyCancelled", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1655, + "src": "8499:12:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "functionReturnParameters": 1656, + "id": 1770, + "nodeType": "Return", + "src": "8492:19:6" + } + ] + }, + "documentation": "@notice called by the maker of an order to attempt to cancel the order before its expiration time stamp\n @param orderAddresses - marketContractAddress, maker, taker and feeRecipient addresses\n @param unsignedOrderValues makerFee, takerFree, price, expirationTimeStamp, and salt (for hashing)\n @param orderQty quantity of the order\n @param qtyToCancel quantity maker is attempting to cancel\n @return qty that was successfully cancelled of order.", + "id": 1772, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "cancelOrder", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1653, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1644, + "name": "orderAddresses", + "nodeType": "VariableDeclaration", + "scope": 1772, + "src": "7065:25:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$4_calldata_ptr", + "typeString": "address[4]" + }, + "typeName": { + "baseType": { + "id": 1641, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7065:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1643, + "length": { + "argumentTypes": null, + "hexValue": "34", + "id": 1642, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7073:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + }, + "value": "4" + }, + "nodeType": "ArrayTypeName", + "src": "7065:10:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$4_storage_ptr", + "typeString": "address[4]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1648, + "name": "unsignedOrderValues", + "nodeType": "VariableDeclaration", + "scope": 1772, + "src": "7100:27:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$5_calldata_ptr", + "typeString": "uint256[5]" + }, + "typeName": { + "baseType": { + "id": 1645, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "7100:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1647, + "length": { + "argumentTypes": null, + "hexValue": "35", + "id": 1646, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7105:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + }, + "value": "5" + }, + "nodeType": "ArrayTypeName", + "src": "7100:7:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$5_storage_ptr", + "typeString": "uint256[5]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1650, + "name": "orderQty", + "nodeType": "VariableDeclaration", + "scope": 1772, + "src": "7137:12:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1649, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "7137:3:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1652, + "name": "qtyToCancel", + "nodeType": "VariableDeclaration", + "scope": 1772, + "src": "7159:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1651, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "7159:3:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7055:125:6" + }, + "payable": false, + "returnParameters": { + "id": 1656, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1655, + "name": "qtyCancelled", + "nodeType": "VariableDeclaration", + "scope": 1772, + "src": "7199:16:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1654, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "7199:3:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7198:18:6" + }, + "scope": 1786, + "src": "7035:1483:6", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 1784, + "nodeType": "Block", + "src": "8898:81:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1781, + "name": "orderHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1774, + "src": "8962:9:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "id": 1779, + "name": "orderMappings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1275, + "src": "8915:13:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_OrderMappings_$2813_storage", + "typeString": "struct OrderLib.OrderMappings storage ref" + } + }, + "id": 1780, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "getQtyFilledOrCancelledFromOrder", + "nodeType": "MemberAccess", + "referencedDeclaration": 2855, + "src": "8915:46:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_OrderMappings_$2813_storage_ptr_$_t_bytes32_$returns$_t_int256_$bound_to$_t_struct$_OrderMappings_$2813_storage_ptr_$", + "typeString": "function (struct OrderLib.OrderMappings storage pointer,bytes32) view returns (int256)" + } + }, + "id": 1782, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8915:57:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "functionReturnParameters": 1778, + "id": 1783, + "nodeType": "Return", + "src": "8908:64:6" + } + ] + }, + "documentation": "@notice returns the qty that is no longer available to trade for a given order\n @param orderHash hash of order to find filled and cancelled qty\n @return int quantity that is no longer able to filled from the supplied order hash", + "id": 1785, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getQtyFilledOrCancelledFromOrder", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1775, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1774, + "name": "orderHash", + "nodeType": "VariableDeclaration", + "scope": 1785, + "src": "8853:17:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1773, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "8853:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8852:19:6" + }, + "payable": false, + "returnParameters": { + "id": 1778, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1777, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1785, + "src": "8893:3:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1776, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "8893:3:6", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8892:5:6" + }, + "scope": 1786, + "src": "8811:168:6", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 1787, + "src": "941:8041:6" + } + ], + "src": "608:8375:6" + }, + "compiler": { + "name": "solc", + "version": "0.4.24+commit.e67f0147.Emscripten.clang" + }, + "networks": { + "4": { + "events": {}, + "links": { + "OrderLib": "0x0bcda746989ee743560712e4e8e48be30ce81852" + }, + "address": "0xca0cb1407473d9e552b861d6da1aeac3c60fa4b9", + "transactionHash": "0x4077f258a30a2c7a3173a0e4da6560da9fd344112f1dff128c7750a2d6f628d8" + } + }, + "schemaVersion": "2.0.1", + "updatedAt": "2018-10-16T03:15:00.566Z" +} \ No newline at end of file diff --git a/build/contracts/MathLib.json b/build/contracts/MathLib.json index 6c0e36b..2326fd6 100644 --- a/build/contracts/MathLib.json +++ b/build/contracts/MathLib.json @@ -37,24 +37,24 @@ "type": "function" } ], - "bytecode": "0x610185610030600b82828239805160001a6073146000811461002057610022565bfe5b5030600052607381538281f3007300000000000000000000000000000000000000003014608060405260043610610058576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063ed981d4f1461005d575b600080fd5b6100a360048036038101908080359060200190929190803590602001909291908035906020019092919080359060200190929190803590602001909291905050506100b9565b6040518082815260200191505060405180910390f35b60008060008413156100e95786831115156100d757600090506100e4565b6100e18388610122565b90505b610109565b85831015156100fb5760009050610108565b6101058684610122565b90505b5b846101138561013b565b82020291505095945050505050565b600082821115151561013057fe5b818303905092915050565b60008082121561015057816000039050610154565b8190505b9190505600a165627a7a7230582039378c0ad36e59a0569b24747c874608db7653b8b9abf9aae0b7b030b4b5d9f30029", - "deployedBytecode": "0x7300000000000000000000000000000000000000003014608060405260043610610058576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063ed981d4f1461005d575b600080fd5b6100a360048036038101908080359060200190929190803590602001909291908035906020019092919080359060200190929190803590602001909291905050506100b9565b6040518082815260200191505060405180910390f35b60008060008413156100e95786831115156100d757600090506100e4565b6100e18388610122565b90505b610109565b85831015156100fb5760009050610108565b6101058684610122565b90505b5b846101138561013b565b82020291505095945050505050565b600082821115151561013057fe5b818303905092915050565b60008082121561015057816000039050610154565b8190505b9190505600a165627a7a7230582039378c0ad36e59a0569b24747c874608db7653b8b9abf9aae0b7b030b4b5d9f30029", - "sourceMap": "718:4531:9:-;;132:2:-1;166:7;155:9;146:7;137:37;252:7;246:14;243:1;238:23;232:4;229:33;270:1;265:20;;;;222:63;;265:20;274:9;222:63;;298:9;295:1;288:20;328:4;319:7;311:22;352:7;343;336:24", - "deployedSourceMap": "718:4531:9:-;;;;;;;;;;;;;;;;;;;;;;;;;;;4453:794;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4628:21;4665:12;4697:1;4691:3;:7;4687:491;;;4795:10;4786:5;:19;;4782:145;;;4835:1;4825:11;;4782:145;;;4885:27;4894:5;4901:10;4885:8;:27::i;:::-;4875:37;;4782:145;4687:491;;;5040:8;5031:5;:17;;5027:141;;;5078:1;5068:11;;5027:141;;;5128:25;5137:8;5147:5;5128:8;:25::i;:::-;5118:35;;5027:141;4687:491;5227:13;5216:8;5220:3;5216;:8::i;:::-;5206:7;:18;:34;5187:53;;4453:794;;;;;;;;:::o;1246:125::-;1309:7;1340:1;1335;:6;;1328:14;;;;;;1363:1;1359;:5;1352:12;;1246:125;;;;:::o;3139:167::-;3185:7;3212:1;3208;:5;3204:96;;;3242:1;3241:2;;3229:15;;;;3204:96;3287:1;3275:14;;3139:167;;;;:::o", + "bytecode": "0x610185610030600b82828239805160001a6073146000811461002057610022565bfe5b5030600052607381538281f3007300000000000000000000000000000000000000003014608060405260043610610058576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063ed981d4f1461005d575b600080fd5b6100a360048036038101908080359060200190929190803590602001909291908035906020019092919080359060200190929190803590602001909291905050506100b9565b6040518082815260200191505060405180910390f35b60008060008413156100e95786831115156100d757600090506100e4565b6100e18388610122565b90505b610109565b85831015156100fb5760009050610108565b6101058684610122565b90505b5b846101138561013b565b82020291505095945050505050565b600082821115151561013057fe5b818303905092915050565b60008082121561015057816000039050610154565b8190505b9190505600a165627a7a7230582011ab5956e043dbf172f888bd5b87e10c1271f3be0cbd83ef9a58e605b150724a0029", + "deployedBytecode": "0x7300000000000000000000000000000000000000003014608060405260043610610058576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063ed981d4f1461005d575b600080fd5b6100a360048036038101908080359060200190929190803590602001909291908035906020019092919080359060200190929190803590602001909291905050506100b9565b6040518082815260200191505060405180910390f35b60008060008413156100e95786831115156100d757600090506100e4565b6100e18388610122565b90505b610109565b85831015156100fb5760009050610108565b6101058684610122565b90505b5b846101138561013b565b82020291505095945050505050565b600082821115151561013057fe5b818303905092915050565b60008082121561015057816000039050610154565b8190505b9190505600a165627a7a7230582011ab5956e043dbf172f888bd5b87e10c1271f3be0cbd83ef9a58e605b150724a0029", + "sourceMap": "718:4531:12:-;;132:2:-1;166:7;155:9;146:7;137:37;252:7;246:14;243:1;238:23;232:4;229:33;270:1;265:20;;;;222:63;;265:20;274:9;222:63;;298:9;295:1;288:20;328:4;319:7;311:22;352:7;343;336:24", + "deployedSourceMap": "718:4531:12:-;;;;;;;;;;;;;;;;;;;;;;;;;;;4453:794;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4628:21;4665:12;4697:1;4691:3;:7;4687:491;;;4795:10;4786:5;:19;;4782:145;;;4835:1;4825:11;;4782:145;;;4885:27;4894:5;4901:10;4885:8;:27::i;:::-;4875:37;;4782:145;4687:491;;;5040:8;5031:5;:17;;5027:141;;;5078:1;5068:11;;5027:141;;;5128:25;5137:8;5147:5;5128:8;:25::i;:::-;5118:35;;5027:141;4687:491;5227:13;5216:8;5220:3;5216;:8::i;:::-;5206:7;:18;:34;5187:53;;4453:794;;;;;;;;:::o;1246:125::-;1309:7;1340:1;1335;:6;;1328:14;;;;;;1363:1;1359;:5;1352:12;;1246:125;;;;:::o;3139:167::-;3185:7;3212:1;3208;:5;3204:96;;;3242:1;3241:2;;3229:15;;;;3204:96;3287:1;3275:14;;3139:167;;;;:::o", "source": "/*\n Copyright 2017-2018 Phillip A. Elsasser\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n*/\npragma solidity ^0.4.24;\n\n\n/// @title Math function library with overflow protection inspired by Open Zeppelin\nlibrary MathLib {\n\n int256 constant INT256_MIN = int256((uint256(1) << 255));\n int256 constant INT256_MAX = int256(~((uint256(1) << 255)));\n\n function multiply(uint256 a, uint256 b) pure internal returns (uint256) {\n uint256 c = a * b;\n assert(a == 0 || c / a == b);\n return c;\n }\n\n function divideFractional(\n uint256 a,\n uint256 numerator,\n uint256 denominator\n ) pure internal returns (uint256)\n {\n return multiply(a, numerator) / denominator;\n }\n\n function subtract(uint256 a, uint256 b) pure internal returns (uint256) {\n assert(b <= a);\n return a - b;\n }\n\n function add(uint256 a, uint256 b) pure internal returns (uint256) {\n uint256 c = a + b;\n assert(c >= a);\n return c;\n }\n\n /// @notice safely adds two signed integers ensuring that no wrap occurs\n /// @param a value to add b to\n /// @param b value to add to a\n function add(int256 a, int256 b) pure internal returns (int256) {\n int256 c = a + b;\n if (!isSameSign(a, b)) { // result will always be smaller than current value, no wrap possible\n return c;\n }\n\n if (a >= 0) { // a is positive, b must be less than MAX - a to prevent wrap\n assert(b <= INT256_MAX - a);\n } else { // a is negative, b must be greater than MIN - a to prevent wrap\n assert(b >= INT256_MIN - a);\n }\n return c;\n }\n\n /// @notice safely subtracts two signed integers ensuring that no wrap occurs\n /// @param a value to subtract b from\n /// @param b value to subtract from a\n function subtract(int256 a, int256 b) pure internal returns (int256) {\n return add(a, -b); // use inverse add\n }\n\n /// @param a integer to determine sign of\n /// @return int8 sign of original value, either +1,0,-1\n function sign(int a) pure internal returns (int8) {\n if (a > 0) {\n return 1;\n } else if (a < 0) {\n return -1;\n }\n return 0;\n }\n\n /// @param a integer to compare to b\n /// @param b integer to compare to a\n /// @return bool true if a and b are the same sign (+/-)\n function isSameSign(int a, int b) pure internal returns (bool) {\n return ( a == b || a * b > 0);\n }\n\n /// @param a integer to determine absolute value of\n /// @return uint non signed representation of a\n function abs(int256 a) pure internal returns (uint256) {\n if (a < 0) {\n return uint(-a);\n } else {\n return uint(a);\n }\n }\n\n /// @notice finds the value closer to zero regardless of sign\n /// @param a integer to compare to b\n /// @param b integer to compare to a\n /// @return a if a is closer to zero than b - does not return abs value!\n function absMin(int256 a, int256 b) pure internal returns (int256) {\n return abs(a) < abs(b) ? a : b;\n }\n\n /// @notice finds the value further from zero regardless of sign\n /// @param a integer to compare to b\n /// @param b integer to compare to a\n /// @return a if a is further to zero than b - does not return abs value!\n function absMax(int256 a, int256 b) pure internal returns (int256) {\n return abs(a) >= abs(b) ? a : b;\n }\n\n /// @notice determines the amount of needed collateral for a given position (qty and price)\n /// @param priceFloor lowest price the contract is allowed to trade before expiration\n /// @param priceCap highest price the contract is allowed to trade before expiration\n /// @param qtyMultiplier multiplier for qty from base units\n /// @param qty signed integer corresponding to the traded quantity\n /// @param price of the trade\n function calculateNeededCollateral(\n uint priceFloor,\n uint priceCap,\n uint qtyMultiplier,\n int qty,\n uint price\n ) pure public returns (uint neededCollateral)\n {\n uint maxLoss;\n if (qty > 0) { // this qty is long, calculate max loss from entry price to floor\n if (price <= priceFloor) {\n maxLoss = 0;\n } else {\n maxLoss = subtract(price, priceFloor);\n }\n } else { // this qty is short, calculate max loss from entry price to ceiling;\n if (price >= priceCap) {\n maxLoss = 0;\n } else {\n maxLoss = subtract(priceCap, price);\n }\n }\n neededCollateral = maxLoss * abs(qty) * qtyMultiplier;\n }\n}\n", - "sourcePath": "/home/pelsasser/MARKETProtocol/contracts/libraries/MathLib.sol", + "sourcePath": "/home/travis/build/MARKETProtocol/MARKETProtocol/contracts/libraries/MathLib.sol", "ast": { - "absolutePath": "/home/pelsasser/MARKETProtocol/contracts/libraries/MathLib.sol", + "absolutePath": "/home/travis/build/MARKETProtocol/MARKETProtocol/contracts/libraries/MathLib.sol", "exportedSymbols": { "MathLib": [ - 2233 + 2798 ] }, - "id": 2234, + "id": 2799, "nodeType": "SourceUnit", "nodes": [ { - "id": 1872, + "id": 2437, "literals": [ "solidity", "^", @@ -62,7 +62,7 @@ ".24" ], "nodeType": "PragmaDirective", - "src": "607:24:9" + "src": "607:24:12" }, { "baseContracts": [], @@ -70,20 +70,20 @@ "contractKind": "library", "documentation": "@title Math function library with overflow protection inspired by Open Zeppelin", "fullyImplemented": true, - "id": 2233, + "id": 2798, "linearizedBaseContracts": [ - 2233 + 2798 ], "name": "MathLib", "nodeType": "ContractDefinition", "nodes": [ { "constant": true, - "id": 1882, + "id": 2447, "name": "INT256_MIN", "nodeType": "VariableDeclaration", - "scope": 2233, - "src": "741:56:9", + "scope": 2798, + "src": "741:56:12", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -91,10 +91,10 @@ "typeString": "int256" }, "typeName": { - "id": 1873, + "id": 2438, "name": "int256", "nodeType": "ElementaryTypeName", - "src": "741:6:9", + "src": "741:6:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -112,7 +112,7 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 1879, + "id": 2444, "isConstant": false, "isLValue": false, "isPure": true, @@ -123,14 +123,14 @@ { "argumentTypes": null, "hexValue": "31", - "id": 1876, + "id": 2441, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "786:1:9", + "src": "786:1:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", @@ -146,20 +146,20 @@ "typeString": "int_const 1" } ], - "id": 1875, + "id": 2440, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "778:7:9", + "src": "778:7:12", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)" }, "typeName": "uint256" }, - "id": 1877, + "id": 2442, "isConstant": false, "isLValue": false, "isPure": true, @@ -167,7 +167,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "778:10:9", + "src": "778:10:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -178,14 +178,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "323535", - "id": 1878, + "id": 2443, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "792:3:9", + "src": "792:3:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_255_by_1", @@ -193,21 +193,21 @@ }, "value": "255" }, - "src": "778:17:9", + "src": "778:17:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], - "id": 1880, + "id": 2445, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "TupleExpression", - "src": "777:19:9", + "src": "777:19:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -221,20 +221,20 @@ "typeString": "uint256" } ], - "id": 1874, + "id": 2439, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "770:6:9", + "src": "770:6:12", "typeDescriptions": { "typeIdentifier": "t_type$_t_int256_$", "typeString": "type(int256)" }, "typeName": "int256" }, - "id": 1881, + "id": 2446, "isConstant": false, "isLValue": false, "isPure": true, @@ -242,7 +242,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "770:27:9", + "src": "770:27:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -252,11 +252,11 @@ }, { "constant": true, - "id": 1894, + "id": 2459, "name": "INT256_MAX", "nodeType": "VariableDeclaration", - "scope": 2233, - "src": "803:59:9", + "scope": 2798, + "src": "803:59:12", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -264,10 +264,10 @@ "typeString": "int256" }, "typeName": { - "id": 1883, + "id": 2448, "name": "int256", "nodeType": "ElementaryTypeName", - "src": "803:6:9", + "src": "803:6:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -278,7 +278,7 @@ "arguments": [ { "argumentTypes": null, - "id": 1892, + "id": 2457, "isConstant": false, "isLValue": false, "isPure": true, @@ -286,7 +286,7 @@ "nodeType": "UnaryOperation", "operator": "~", "prefix": true, - "src": "839:22:9", + "src": "839:22:12", "subExpression": { "argumentTypes": null, "components": [ @@ -299,7 +299,7 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 1889, + "id": 2454, "isConstant": false, "isLValue": false, "isPure": true, @@ -310,14 +310,14 @@ { "argumentTypes": null, "hexValue": "31", - "id": 1886, + "id": 2451, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "850:1:9", + "src": "850:1:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", @@ -333,20 +333,20 @@ "typeString": "int_const 1" } ], - "id": 1885, + "id": 2450, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "842:7:9", + "src": "842:7:12", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)" }, "typeName": "uint256" }, - "id": 1887, + "id": 2452, "isConstant": false, "isLValue": false, "isPure": true, @@ -354,7 +354,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "842:10:9", + "src": "842:10:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -365,14 +365,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "323535", - "id": 1888, + "id": 2453, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "856:3:9", + "src": "856:3:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_255_by_1", @@ -380,35 +380,35 @@ }, "value": "255" }, - "src": "842:17:9", + "src": "842:17:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], - "id": 1890, + "id": 2455, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "TupleExpression", - "src": "841:19:9", + "src": "841:19:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], - "id": 1891, + "id": 2456, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "TupleExpression", - "src": "840:21:9", + "src": "840:21:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -427,20 +427,20 @@ "typeString": "uint256" } ], - "id": 1884, + "id": 2449, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "832:6:9", + "src": "832:6:12", "typeDescriptions": { "typeIdentifier": "t_type$_t_int256_$", "typeString": "type(int256)" }, "typeName": "int256" }, - "id": 1893, + "id": 2458, "isConstant": false, "isLValue": false, "isPure": true, @@ -448,7 +448,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "832:30:9", + "src": "832:30:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -458,22 +458,22 @@ }, { "body": { - "id": 1923, + "id": 2488, "nodeType": "Block", - "src": "941:90:9", + "src": "941:90:12", "statements": [ { "assignments": [ - 1904 + 2469 ], "declarations": [ { "constant": false, - "id": 1904, + "id": 2469, "name": "c", "nodeType": "VariableDeclaration", - "scope": 1924, - "src": "951:9:9", + "scope": 2489, + "src": "951:9:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -481,10 +481,10 @@ "typeString": "uint256" }, "typeName": { - "id": 1903, + "id": 2468, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "951:7:9", + "src": "951:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -494,26 +494,26 @@ "visibility": "internal" } ], - "id": 1908, + "id": 2473, "initialValue": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 1907, + "id": 2472, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 1905, + "id": 2470, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1896, - "src": "963:1:9", + "referencedDeclaration": 2461, + "src": "963:1:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -523,25 +523,25 @@ "operator": "*", "rightExpression": { "argumentTypes": null, - "id": 1906, + "id": 2471, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1898, - "src": "967:1:9", + "referencedDeclaration": 2463, + "src": "967:1:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "963:5:9", + "src": "963:5:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", - "src": "951:17:9" + "src": "951:17:12" }, { "expression": { @@ -553,7 +553,7 @@ "typeIdentifier": "t_bool", "typeString": "bool" }, - "id": 1918, + "id": 2483, "isConstant": false, "isLValue": false, "isPure": false, @@ -564,19 +564,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 1912, + "id": 2477, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 1910, + "id": 2475, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1896, - "src": "985:1:9", + "referencedDeclaration": 2461, + "src": "985:1:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -587,14 +587,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "30", - "id": 1911, + "id": 2476, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "990:1:9", + "src": "990:1:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -602,7 +602,7 @@ }, "value": "0" }, - "src": "985:6:9", + "src": "985:6:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -616,7 +616,7 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 1917, + "id": 2482, "isConstant": false, "isLValue": false, "isPure": false, @@ -627,19 +627,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 1915, + "id": 2480, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 1913, + "id": 2478, "name": "c", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1904, - "src": "995:1:9", + "referencedDeclaration": 2469, + "src": "995:1:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -649,18 +649,18 @@ "operator": "/", "rightExpression": { "argumentTypes": null, - "id": 1914, + "id": 2479, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1896, - "src": "999:1:9", + "referencedDeclaration": 2461, + "src": "999:1:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "995:5:9", + "src": "995:5:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -670,24 +670,24 @@ "operator": "==", "rightExpression": { "argumentTypes": null, - "id": 1916, + "id": 2481, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1898, - "src": "1004:1:9", + "referencedDeclaration": 2463, + "src": "1004:1:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "995:10:9", + "src": "995:10:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "src": "985:20:9", + "src": "985:20:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -701,18 +701,18 @@ "typeString": "bool" } ], - "id": 1909, + "id": 2474, "name": "assert", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 5182, - "src": "978:6:9", + "referencedDeclaration": 8172, + "src": "978:6:12", "typeDescriptions": { "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, - "id": 1919, + "id": 2484, "isConstant": false, "isLValue": false, "isPure": false, @@ -720,39 +720,39 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "978:28:9", + "src": "978:28:12", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 1920, + "id": 2485, "nodeType": "ExpressionStatement", - "src": "978:28:9" + "src": "978:28:12" }, { "expression": { "argumentTypes": null, - "id": 1921, + "id": 2486, "name": "c", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1904, - "src": "1023:1:9", + "referencedDeclaration": 2469, + "src": "1023:1:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "functionReturnParameters": 1902, - "id": 1922, + "functionReturnParameters": 2467, + "id": 2487, "nodeType": "Return", - "src": "1016:8:9" + "src": "1016:8:12" } ] }, "documentation": null, - "id": 1924, + "id": 2489, "implemented": true, "isConstructor": false, "isDeclaredConst": true, @@ -760,16 +760,16 @@ "name": "multiply", "nodeType": "FunctionDefinition", "parameters": { - "id": 1899, + "id": 2464, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1896, + "id": 2461, "name": "a", "nodeType": "VariableDeclaration", - "scope": 1924, - "src": "887:9:9", + "scope": 2489, + "src": "887:9:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -777,10 +777,10 @@ "typeString": "uint256" }, "typeName": { - "id": 1895, + "id": 2460, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "887:7:9", + "src": "887:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -791,11 +791,11 @@ }, { "constant": false, - "id": 1898, + "id": 2463, "name": "b", "nodeType": "VariableDeclaration", - "scope": 1924, - "src": "898:9:9", + "scope": 2489, + "src": "898:9:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -803,10 +803,10 @@ "typeString": "uint256" }, "typeName": { - "id": 1897, + "id": 2462, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "898:7:9", + "src": "898:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -816,20 +816,20 @@ "visibility": "internal" } ], - "src": "886:22:9" + "src": "886:22:12" }, "payable": false, "returnParameters": { - "id": 1902, + "id": 2467, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1901, + "id": 2466, "name": "", "nodeType": "VariableDeclaration", - "scope": 1924, - "src": "932:7:9", + "scope": 2489, + "src": "932:7:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -837,10 +837,10 @@ "typeString": "uint256" }, "typeName": { - "id": 1900, + "id": 2465, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "932:7:9", + "src": "932:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -850,19 +850,19 @@ "visibility": "internal" } ], - "src": "931:9:9" + "src": "931:9:12" }, - "scope": 2233, - "src": "869:162:9", + "scope": 2798, + "src": "869:162:12", "stateMutability": "pure", "superFunction": null, "visibility": "internal" }, { "body": { - "id": 1942, + "id": 2507, "nodeType": "Block", - "src": "1180:60:9", + "src": "1180:60:12", "statements": [ { "expression": { @@ -871,7 +871,7 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 1940, + "id": 2505, "isConstant": false, "isLValue": false, "isPure": false, @@ -881,12 +881,12 @@ "arguments": [ { "argumentTypes": null, - "id": 1936, + "id": 2501, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1926, - "src": "1206:1:9", + "referencedDeclaration": 2491, + "src": "1206:1:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -894,12 +894,12 @@ }, { "argumentTypes": null, - "id": 1937, + "id": 2502, "name": "numerator", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1928, - "src": "1209:9:9", + "referencedDeclaration": 2493, + "src": "1209:9:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -917,18 +917,18 @@ "typeString": "uint256" } ], - "id": 1935, + "id": 2500, "name": "multiply", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1924, - "src": "1197:8:9", + "referencedDeclaration": 2489, + "src": "1197:8:12", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, - "id": 1938, + "id": 2503, "isConstant": false, "isLValue": false, "isPure": false, @@ -936,7 +936,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "1197:22:9", + "src": "1197:22:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -946,32 +946,32 @@ "operator": "/", "rightExpression": { "argumentTypes": null, - "id": 1939, + "id": 2504, "name": "denominator", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1930, - "src": "1222:11:9", + "referencedDeclaration": 2495, + "src": "1222:11:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "1197:36:9", + "src": "1197:36:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "functionReturnParameters": 1934, - "id": 1941, + "functionReturnParameters": 2499, + "id": 2506, "nodeType": "Return", - "src": "1190:43:9" + "src": "1190:43:12" } ] }, "documentation": null, - "id": 1943, + "id": 2508, "implemented": true, "isConstructor": false, "isDeclaredConst": true, @@ -979,16 +979,16 @@ "name": "divideFractional", "nodeType": "FunctionDefinition", "parameters": { - "id": 1931, + "id": 2496, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1926, + "id": 2491, "name": "a", "nodeType": "VariableDeclaration", - "scope": 1943, - "src": "1072:9:9", + "scope": 2508, + "src": "1072:9:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -996,10 +996,10 @@ "typeString": "uint256" }, "typeName": { - "id": 1925, + "id": 2490, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1072:7:9", + "src": "1072:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1010,11 +1010,11 @@ }, { "constant": false, - "id": 1928, + "id": 2493, "name": "numerator", "nodeType": "VariableDeclaration", - "scope": 1943, - "src": "1091:17:9", + "scope": 2508, + "src": "1091:17:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1022,10 +1022,10 @@ "typeString": "uint256" }, "typeName": { - "id": 1927, + "id": 2492, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1091:7:9", + "src": "1091:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1036,11 +1036,11 @@ }, { "constant": false, - "id": 1930, + "id": 2495, "name": "denominator", "nodeType": "VariableDeclaration", - "scope": 1943, - "src": "1118:19:9", + "scope": 2508, + "src": "1118:19:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1048,10 +1048,10 @@ "typeString": "uint256" }, "typeName": { - "id": 1929, + "id": 2494, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1118:7:9", + "src": "1118:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1061,20 +1061,20 @@ "visibility": "internal" } ], - "src": "1062:81:9" + "src": "1062:81:12" }, "payable": false, "returnParameters": { - "id": 1934, + "id": 2499, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1933, + "id": 2498, "name": "", "nodeType": "VariableDeclaration", - "scope": 1943, - "src": "1167:7:9", + "scope": 2508, + "src": "1167:7:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1082,10 +1082,10 @@ "typeString": "uint256" }, "typeName": { - "id": 1932, + "id": 2497, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1167:7:9", + "src": "1167:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1095,19 +1095,19 @@ "visibility": "internal" } ], - "src": "1166:9:9" + "src": "1166:9:12" }, - "scope": 2233, - "src": "1037:203:9", + "scope": 2798, + "src": "1037:203:12", "stateMutability": "pure", "superFunction": null, "visibility": "internal" }, { "body": { - "id": 1962, + "id": 2527, "nodeType": "Block", - "src": "1318:53:9", + "src": "1318:53:12", "statements": [ { "expression": { @@ -1119,19 +1119,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 1955, + "id": 2520, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 1953, + "id": 2518, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1947, - "src": "1335:1:9", + "referencedDeclaration": 2512, + "src": "1335:1:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1141,18 +1141,18 @@ "operator": "<=", "rightExpression": { "argumentTypes": null, - "id": 1954, + "id": 2519, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1945, - "src": "1340:1:9", + "referencedDeclaration": 2510, + "src": "1340:1:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "1335:6:9", + "src": "1335:6:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -1166,18 +1166,18 @@ "typeString": "bool" } ], - "id": 1952, + "id": 2517, "name": "assert", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 5182, - "src": "1328:6:9", + "referencedDeclaration": 8172, + "src": "1328:6:12", "typeDescriptions": { "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, - "id": 1956, + "id": 2521, "isConstant": false, "isLValue": false, "isPure": false, @@ -1185,15 +1185,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "1328:14:9", + "src": "1328:14:12", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 1957, + "id": 2522, "nodeType": "ExpressionStatement", - "src": "1328:14:9" + "src": "1328:14:12" }, { "expression": { @@ -1202,19 +1202,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 1960, + "id": 2525, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 1958, + "id": 2523, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1945, - "src": "1359:1:9", + "referencedDeclaration": 2510, + "src": "1359:1:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1224,32 +1224,32 @@ "operator": "-", "rightExpression": { "argumentTypes": null, - "id": 1959, + "id": 2524, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1947, - "src": "1363:1:9", + "referencedDeclaration": 2512, + "src": "1363:1:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "1359:5:9", + "src": "1359:5:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "functionReturnParameters": 1951, - "id": 1961, + "functionReturnParameters": 2516, + "id": 2526, "nodeType": "Return", - "src": "1352:12:9" + "src": "1352:12:12" } ] }, "documentation": null, - "id": 1963, + "id": 2528, "implemented": true, "isConstructor": false, "isDeclaredConst": true, @@ -1257,16 +1257,16 @@ "name": "subtract", "nodeType": "FunctionDefinition", "parameters": { - "id": 1948, + "id": 2513, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1945, + "id": 2510, "name": "a", "nodeType": "VariableDeclaration", - "scope": 1963, - "src": "1264:9:9", + "scope": 2528, + "src": "1264:9:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1274,10 +1274,10 @@ "typeString": "uint256" }, "typeName": { - "id": 1944, + "id": 2509, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1264:7:9", + "src": "1264:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1288,11 +1288,11 @@ }, { "constant": false, - "id": 1947, + "id": 2512, "name": "b", "nodeType": "VariableDeclaration", - "scope": 1963, - "src": "1275:9:9", + "scope": 2528, + "src": "1275:9:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1300,10 +1300,10 @@ "typeString": "uint256" }, "typeName": { - "id": 1946, + "id": 2511, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1275:7:9", + "src": "1275:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1313,20 +1313,20 @@ "visibility": "internal" } ], - "src": "1263:22:9" + "src": "1263:22:12" }, "payable": false, "returnParameters": { - "id": 1951, + "id": 2516, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1950, + "id": 2515, "name": "", "nodeType": "VariableDeclaration", - "scope": 1963, - "src": "1309:7:9", + "scope": 2528, + "src": "1309:7:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1334,10 +1334,10 @@ "typeString": "uint256" }, "typeName": { - "id": 1949, + "id": 2514, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1309:7:9", + "src": "1309:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1347,32 +1347,32 @@ "visibility": "internal" } ], - "src": "1308:9:9" + "src": "1308:9:12" }, - "scope": 2233, - "src": "1246:125:9", + "scope": 2798, + "src": "1246:125:12", "stateMutability": "pure", "superFunction": null, "visibility": "internal" }, { "body": { - "id": 1986, + "id": 2551, "nodeType": "Block", - "src": "1444:76:9", + "src": "1444:76:12", "statements": [ { "assignments": [ - 1973 + 2538 ], "declarations": [ { "constant": false, - "id": 1973, + "id": 2538, "name": "c", "nodeType": "VariableDeclaration", - "scope": 1987, - "src": "1454:9:9", + "scope": 2552, + "src": "1454:9:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1380,10 +1380,10 @@ "typeString": "uint256" }, "typeName": { - "id": 1972, + "id": 2537, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1454:7:9", + "src": "1454:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1393,26 +1393,26 @@ "visibility": "internal" } ], - "id": 1977, + "id": 2542, "initialValue": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 1976, + "id": 2541, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 1974, + "id": 2539, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1965, - "src": "1466:1:9", + "referencedDeclaration": 2530, + "src": "1466:1:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1422,25 +1422,25 @@ "operator": "+", "rightExpression": { "argumentTypes": null, - "id": 1975, + "id": 2540, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1967, - "src": "1470:1:9", + "referencedDeclaration": 2532, + "src": "1470:1:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "1466:5:9", + "src": "1466:5:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", - "src": "1454:17:9" + "src": "1454:17:12" }, { "expression": { @@ -1452,19 +1452,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 1981, + "id": 2546, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 1979, + "id": 2544, "name": "c", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1973, - "src": "1488:1:9", + "referencedDeclaration": 2538, + "src": "1488:1:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1474,18 +1474,18 @@ "operator": ">=", "rightExpression": { "argumentTypes": null, - "id": 1980, + "id": 2545, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1965, - "src": "1493:1:9", + "referencedDeclaration": 2530, + "src": "1493:1:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "1488:6:9", + "src": "1488:6:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -1499,18 +1499,18 @@ "typeString": "bool" } ], - "id": 1978, + "id": 2543, "name": "assert", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 5182, - "src": "1481:6:9", + "referencedDeclaration": 8172, + "src": "1481:6:12", "typeDescriptions": { "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, - "id": 1982, + "id": 2547, "isConstant": false, "isLValue": false, "isPure": false, @@ -1518,39 +1518,39 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "1481:14:9", + "src": "1481:14:12", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 1983, + "id": 2548, "nodeType": "ExpressionStatement", - "src": "1481:14:9" + "src": "1481:14:12" }, { "expression": { "argumentTypes": null, - "id": 1984, + "id": 2549, "name": "c", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1973, - "src": "1512:1:9", + "referencedDeclaration": 2538, + "src": "1512:1:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "functionReturnParameters": 1971, - "id": 1985, + "functionReturnParameters": 2536, + "id": 2550, "nodeType": "Return", - "src": "1505:8:9" + "src": "1505:8:12" } ] }, "documentation": null, - "id": 1987, + "id": 2552, "implemented": true, "isConstructor": false, "isDeclaredConst": true, @@ -1558,16 +1558,16 @@ "name": "add", "nodeType": "FunctionDefinition", "parameters": { - "id": 1968, + "id": 2533, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1965, + "id": 2530, "name": "a", "nodeType": "VariableDeclaration", - "scope": 1987, - "src": "1390:9:9", + "scope": 2552, + "src": "1390:9:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1575,10 +1575,10 @@ "typeString": "uint256" }, "typeName": { - "id": 1964, + "id": 2529, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1390:7:9", + "src": "1390:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1589,11 +1589,11 @@ }, { "constant": false, - "id": 1967, + "id": 2532, "name": "b", "nodeType": "VariableDeclaration", - "scope": 1987, - "src": "1401:9:9", + "scope": 2552, + "src": "1401:9:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1601,10 +1601,10 @@ "typeString": "uint256" }, "typeName": { - "id": 1966, + "id": 2531, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1401:7:9", + "src": "1401:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1614,20 +1614,20 @@ "visibility": "internal" } ], - "src": "1389:22:9" + "src": "1389:22:12" }, "payable": false, "returnParameters": { - "id": 1971, + "id": 2536, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1970, + "id": 2535, "name": "", "nodeType": "VariableDeclaration", - "scope": 1987, - "src": "1435:7:9", + "scope": 2552, + "src": "1435:7:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1635,10 +1635,10 @@ "typeString": "uint256" }, "typeName": { - "id": 1969, + "id": 2534, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1435:7:9", + "src": "1435:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1648,32 +1648,32 @@ "visibility": "internal" } ], - "src": "1434:9:9" + "src": "1434:9:12" }, - "scope": 2233, - "src": "1377:143:9", + "scope": 2798, + "src": "1377:143:12", "stateMutability": "pure", "superFunction": null, "visibility": "internal" }, { "body": { - "id": 2035, + "id": 2600, "nodeType": "Block", - "src": "1737:445:9", + "src": "1737:445:12", "statements": [ { "assignments": [ - 1997 + 2562 ], "declarations": [ { "constant": false, - "id": 1997, + "id": 2562, "name": "c", "nodeType": "VariableDeclaration", - "scope": 2036, - "src": "1747:8:9", + "scope": 2601, + "src": "1747:8:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1681,10 +1681,10 @@ "typeString": "int256" }, "typeName": { - "id": 1996, + "id": 2561, "name": "int256", "nodeType": "ElementaryTypeName", - "src": "1747:6:9", + "src": "1747:6:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -1694,26 +1694,26 @@ "visibility": "internal" } ], - "id": 2001, + "id": 2566, "initialValue": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_int256", "typeString": "int256" }, - "id": 2000, + "id": 2565, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 1998, + "id": 2563, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1989, - "src": "1758:1:9", + "referencedDeclaration": 2554, + "src": "1758:1:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -1723,30 +1723,30 @@ "operator": "+", "rightExpression": { "argumentTypes": null, - "id": 1999, + "id": 2564, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1991, - "src": "1762:1:9", + "referencedDeclaration": 2556, + "src": "1762:1:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, - "src": "1758:5:9", + "src": "1758:5:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, "nodeType": "VariableDeclarationStatement", - "src": "1747:16:9" + "src": "1747:16:12" }, { "condition": { "argumentTypes": null, - "id": 2006, + "id": 2571, "isConstant": false, "isLValue": false, "isPure": false, @@ -1754,18 +1754,18 @@ "nodeType": "UnaryOperation", "operator": "!", "prefix": true, - "src": "1777:17:9", + "src": "1777:17:12", "subExpression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, - "id": 2003, + "id": 2568, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1989, - "src": "1789:1:9", + "referencedDeclaration": 2554, + "src": "1789:1:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -1773,12 +1773,12 @@ }, { "argumentTypes": null, - "id": 2004, + "id": 2569, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1991, - "src": "1792:1:9", + "referencedDeclaration": 2556, + "src": "1792:1:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -1796,18 +1796,18 @@ "typeString": "int256" } ], - "id": 2002, + "id": 2567, "name": "isSameSign", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2098, - "src": "1778:10:9", + "referencedDeclaration": 2663, + "src": "1778:10:12", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_bool_$", "typeString": "function (int256,int256) pure returns (bool)" } }, - "id": 2005, + "id": 2570, "isConstant": false, "isLValue": false, "isPure": false, @@ -1815,7 +1815,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "1778:16:9", + "src": "1778:16:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -1827,32 +1827,32 @@ } }, "falseBody": null, - "id": 2010, + "id": 2575, "nodeType": "IfStatement", - "src": "1773:126:9", + "src": "1773:126:12", "trueBody": { - "id": 2009, + "id": 2574, "nodeType": "Block", - "src": "1796:103:9", + "src": "1796:103:12", "statements": [ { "expression": { "argumentTypes": null, - "id": 2007, + "id": 2572, "name": "c", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1997, - "src": "1887:1:9", + "referencedDeclaration": 2562, + "src": "1887:1:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, - "functionReturnParameters": 1995, - "id": 2008, + "functionReturnParameters": 2560, + "id": 2573, "nodeType": "Return", - "src": "1880:8:9" + "src": "1880:8:12" } ] } @@ -1864,19 +1864,19 @@ "typeIdentifier": "t_int256", "typeString": "int256" }, - "id": 2013, + "id": 2578, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 2011, + "id": 2576, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1989, - "src": "1913:1:9", + "referencedDeclaration": 2554, + "src": "1913:1:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -1887,14 +1887,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "30", - "id": 2012, + "id": 2577, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "1918:1:9", + "src": "1918:1:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -1902,16 +1902,16 @@ }, "value": "0" }, - "src": "1913:6:9", + "src": "1913:6:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": { - "id": 2031, + "id": 2596, "nodeType": "Block", - "src": "2041:117:9", + "src": "2041:117:12", "statements": [ { "expression": { @@ -1923,19 +1923,19 @@ "typeIdentifier": "t_int256", "typeString": "int256" }, - "id": 2028, + "id": 2593, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 2024, + "id": 2589, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1991, - "src": "2127:1:9", + "referencedDeclaration": 2556, + "src": "2127:1:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -1949,19 +1949,19 @@ "typeIdentifier": "t_int256", "typeString": "int256" }, - "id": 2027, + "id": 2592, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 2025, + "id": 2590, "name": "INT256_MIN", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1882, - "src": "2132:10:9", + "referencedDeclaration": 2447, + "src": "2132:10:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -1971,24 +1971,24 @@ "operator": "-", "rightExpression": { "argumentTypes": null, - "id": 2026, + "id": 2591, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1989, - "src": "2145:1:9", + "referencedDeclaration": 2554, + "src": "2145:1:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, - "src": "2132:14:9", + "src": "2132:14:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, - "src": "2127:19:9", + "src": "2127:19:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -2002,18 +2002,18 @@ "typeString": "bool" } ], - "id": 2023, + "id": 2588, "name": "assert", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 5182, - "src": "2120:6:9", + "referencedDeclaration": 8172, + "src": "2120:6:12", "typeDescriptions": { "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, - "id": 2029, + "id": 2594, "isConstant": false, "isLValue": false, "isPure": false, @@ -2021,25 +2021,25 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "2120:27:9", + "src": "2120:27:12", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 2030, + "id": 2595, "nodeType": "ExpressionStatement", - "src": "2120:27:9" + "src": "2120:27:12" } ] }, - "id": 2032, + "id": 2597, "nodeType": "IfStatement", - "src": "1909:249:9", + "src": "1909:249:12", "trueBody": { - "id": 2022, + "id": 2587, "nodeType": "Block", - "src": "1921:114:9", + "src": "1921:114:12", "statements": [ { "expression": { @@ -2051,19 +2051,19 @@ "typeIdentifier": "t_int256", "typeString": "int256" }, - "id": 2019, + "id": 2584, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 2015, + "id": 2580, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1991, - "src": "2004:1:9", + "referencedDeclaration": 2556, + "src": "2004:1:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -2077,19 +2077,19 @@ "typeIdentifier": "t_int256", "typeString": "int256" }, - "id": 2018, + "id": 2583, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 2016, + "id": 2581, "name": "INT256_MAX", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1894, - "src": "2009:10:9", + "referencedDeclaration": 2459, + "src": "2009:10:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -2099,24 +2099,24 @@ "operator": "-", "rightExpression": { "argumentTypes": null, - "id": 2017, + "id": 2582, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1989, - "src": "2022:1:9", + "referencedDeclaration": 2554, + "src": "2022:1:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, - "src": "2009:14:9", + "src": "2009:14:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, - "src": "2004:19:9", + "src": "2004:19:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -2130,18 +2130,18 @@ "typeString": "bool" } ], - "id": 2014, + "id": 2579, "name": "assert", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 5182, - "src": "1997:6:9", + "referencedDeclaration": 8172, + "src": "1997:6:12", "typeDescriptions": { "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, - "id": 2020, + "id": 2585, "isConstant": false, "isLValue": false, "isPure": false, @@ -2149,15 +2149,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "1997:27:9", + "src": "1997:27:12", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 2021, + "id": 2586, "nodeType": "ExpressionStatement", - "src": "1997:27:9" + "src": "1997:27:12" } ] } @@ -2165,26 +2165,26 @@ { "expression": { "argumentTypes": null, - "id": 2033, + "id": 2598, "name": "c", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1997, - "src": "2174:1:9", + "referencedDeclaration": 2562, + "src": "2174:1:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, - "functionReturnParameters": 1995, - "id": 2034, + "functionReturnParameters": 2560, + "id": 2599, "nodeType": "Return", - "src": "2167:8:9" + "src": "2167:8:12" } ] }, "documentation": "@notice safely adds two signed integers ensuring that no wrap occurs\n @param a value to add b to\n @param b value to add to a", - "id": 2036, + "id": 2601, "implemented": true, "isConstructor": false, "isDeclaredConst": true, @@ -2192,16 +2192,16 @@ "name": "add", "nodeType": "FunctionDefinition", "parameters": { - "id": 1992, + "id": 2557, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1989, + "id": 2554, "name": "a", "nodeType": "VariableDeclaration", - "scope": 2036, - "src": "1686:8:9", + "scope": 2601, + "src": "1686:8:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2209,10 +2209,10 @@ "typeString": "int256" }, "typeName": { - "id": 1988, + "id": 2553, "name": "int256", "nodeType": "ElementaryTypeName", - "src": "1686:6:9", + "src": "1686:6:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -2223,11 +2223,11 @@ }, { "constant": false, - "id": 1991, + "id": 2556, "name": "b", "nodeType": "VariableDeclaration", - "scope": 2036, - "src": "1696:8:9", + "scope": 2601, + "src": "1696:8:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2235,10 +2235,10 @@ "typeString": "int256" }, "typeName": { - "id": 1990, + "id": 2555, "name": "int256", "nodeType": "ElementaryTypeName", - "src": "1696:6:9", + "src": "1696:6:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -2248,20 +2248,20 @@ "visibility": "internal" } ], - "src": "1685:20:9" + "src": "1685:20:12" }, "payable": false, "returnParameters": { - "id": 1995, + "id": 2560, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1994, + "id": 2559, "name": "", "nodeType": "VariableDeclaration", - "scope": 2036, - "src": "1729:6:9", + "scope": 2601, + "src": "1729:6:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2269,10 +2269,10 @@ "typeString": "int256" }, "typeName": { - "id": 1993, + "id": 2558, "name": "int256", "nodeType": "ElementaryTypeName", - "src": "1729:6:9", + "src": "1729:6:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -2282,19 +2282,19 @@ "visibility": "internal" } ], - "src": "1728:8:9" + "src": "1728:8:12" }, - "scope": 2233, - "src": "1673:509:9", + "scope": 2798, + "src": "1673:509:12", "stateMutability": "pure", "superFunction": null, "visibility": "internal" }, { "body": { - "id": 2051, + "id": 2616, "nodeType": "Block", - "src": "2423:53:9", + "src": "2423:53:12", "statements": [ { "expression": { @@ -2302,12 +2302,12 @@ "arguments": [ { "argumentTypes": null, - "id": 2046, + "id": 2611, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2038, - "src": "2444:1:9", + "referencedDeclaration": 2603, + "src": "2444:1:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -2315,7 +2315,7 @@ }, { "argumentTypes": null, - "id": 2048, + "id": 2613, "isConstant": false, "isLValue": false, "isPure": false, @@ -2323,15 +2323,15 @@ "nodeType": "UnaryOperation", "operator": "-", "prefix": true, - "src": "2447:2:9", + "src": "2447:2:12", "subExpression": { "argumentTypes": null, - "id": 2047, + "id": 2612, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2040, - "src": "2448:1:9", + "referencedDeclaration": 2605, + "src": "2448:1:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -2354,21 +2354,21 @@ "typeString": "int256" } ], - "id": 2045, + "id": 2610, "name": "add", "nodeType": "Identifier", "overloadedDeclarations": [ - 1987, - 2036 + 2552, + 2601 ], - "referencedDeclaration": 2036, - "src": "2440:3:9", + "referencedDeclaration": 2601, + "src": "2440:3:12", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_int256_$", "typeString": "function (int256,int256) pure returns (int256)" } }, - "id": 2049, + "id": 2614, "isConstant": false, "isLValue": false, "isPure": false, @@ -2376,21 +2376,21 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "2440:10:9", + "src": "2440:10:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, - "functionReturnParameters": 2044, - "id": 2050, + "functionReturnParameters": 2609, + "id": 2615, "nodeType": "Return", - "src": "2433:17:9" + "src": "2433:17:12" } ] }, "documentation": "@notice safely subtracts two signed integers ensuring that no wrap occurs\n @param a value to subtract b from\n @param b value to subtract from a", - "id": 2052, + "id": 2617, "implemented": true, "isConstructor": false, "isDeclaredConst": true, @@ -2398,16 +2398,16 @@ "name": "subtract", "nodeType": "FunctionDefinition", "parameters": { - "id": 2041, + "id": 2606, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2038, + "id": 2603, "name": "a", "nodeType": "VariableDeclaration", - "scope": 2052, - "src": "2372:8:9", + "scope": 2617, + "src": "2372:8:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2415,10 +2415,10 @@ "typeString": "int256" }, "typeName": { - "id": 2037, + "id": 2602, "name": "int256", "nodeType": "ElementaryTypeName", - "src": "2372:6:9", + "src": "2372:6:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -2429,11 +2429,11 @@ }, { "constant": false, - "id": 2040, + "id": 2605, "name": "b", "nodeType": "VariableDeclaration", - "scope": 2052, - "src": "2382:8:9", + "scope": 2617, + "src": "2382:8:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2441,10 +2441,10 @@ "typeString": "int256" }, "typeName": { - "id": 2039, + "id": 2604, "name": "int256", "nodeType": "ElementaryTypeName", - "src": "2382:6:9", + "src": "2382:6:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -2454,20 +2454,20 @@ "visibility": "internal" } ], - "src": "2371:20:9" + "src": "2371:20:12" }, "payable": false, "returnParameters": { - "id": 2044, + "id": 2609, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2043, + "id": 2608, "name": "", "nodeType": "VariableDeclaration", - "scope": 2052, - "src": "2415:6:9", + "scope": 2617, + "src": "2415:6:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2475,10 +2475,10 @@ "typeString": "int256" }, "typeName": { - "id": 2042, + "id": 2607, "name": "int256", "nodeType": "ElementaryTypeName", - "src": "2415:6:9", + "src": "2415:6:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -2488,19 +2488,19 @@ "visibility": "internal" } ], - "src": "2414:8:9" + "src": "2414:8:12" }, - "scope": 2233, - "src": "2354:122:9", + "scope": 2798, + "src": "2354:122:12", "stateMutability": "pure", "superFunction": null, "visibility": "internal" }, { "body": { - "id": 2076, + "id": 2641, "nodeType": "Block", - "src": "2638:129:9", + "src": "2638:129:12", "statements": [ { "condition": { @@ -2509,19 +2509,19 @@ "typeIdentifier": "t_int256", "typeString": "int256" }, - "id": 2061, + "id": 2626, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 2059, + "id": 2624, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2054, - "src": "2652:1:9", + "referencedDeclaration": 2619, + "src": "2652:1:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -2532,14 +2532,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "30", - "id": 2060, + "id": 2625, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "2656:1:9", + "src": "2656:1:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -2547,7 +2547,7 @@ }, "value": "0" }, - "src": "2652:5:9", + "src": "2652:5:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -2560,19 +2560,19 @@ "typeIdentifier": "t_int256", "typeString": "int256" }, - "id": 2067, + "id": 2632, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 2065, + "id": 2630, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2054, - "src": "2702:1:9", + "referencedDeclaration": 2619, + "src": "2702:1:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -2583,14 +2583,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "30", - "id": 2066, + "id": 2631, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "2706:1:9", + "src": "2706:1:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -2598,25 +2598,25 @@ }, "value": "0" }, - "src": "2702:5:9", + "src": "2702:5:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, - "id": 2072, + "id": 2637, "nodeType": "IfStatement", - "src": "2698:45:9", + "src": "2698:45:12", "trueBody": { - "id": 2071, + "id": 2636, "nodeType": "Block", - "src": "2709:34:9", + "src": "2709:34:12", "statements": [ { "expression": { "argumentTypes": null, - "id": 2069, + "id": 2634, "isConstant": false, "isLValue": false, "isPure": true, @@ -2624,18 +2624,18 @@ "nodeType": "UnaryOperation", "operator": "-", "prefix": true, - "src": "2730:2:9", + "src": "2730:2:12", "subExpression": { "argumentTypes": null, "hexValue": "31", - "id": 2068, + "id": 2633, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "2731:1:9", + "src": "2731:1:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", @@ -2648,34 +2648,34 @@ "typeString": "int_const -1" } }, - "functionReturnParameters": 2058, - "id": 2070, + "functionReturnParameters": 2623, + "id": 2635, "nodeType": "Return", - "src": "2723:9:9" + "src": "2723:9:12" } ] } }, - "id": 2073, + "id": 2638, "nodeType": "IfStatement", - "src": "2648:95:9", + "src": "2648:95:12", "trueBody": { - "id": 2064, + "id": 2629, "nodeType": "Block", - "src": "2659:33:9", + "src": "2659:33:12", "statements": [ { "expression": { "argumentTypes": null, "hexValue": "31", - "id": 2062, + "id": 2627, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "2680:1:9", + "src": "2680:1:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", @@ -2683,10 +2683,10 @@ }, "value": "1" }, - "functionReturnParameters": 2058, - "id": 2063, + "functionReturnParameters": 2623, + "id": 2628, "nodeType": "Return", - "src": "2673:8:9" + "src": "2673:8:12" } ] } @@ -2695,14 +2695,14 @@ "expression": { "argumentTypes": null, "hexValue": "30", - "id": 2074, + "id": 2639, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "2759:1:9", + "src": "2759:1:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -2710,15 +2710,15 @@ }, "value": "0" }, - "functionReturnParameters": 2058, - "id": 2075, + "functionReturnParameters": 2623, + "id": 2640, "nodeType": "Return", - "src": "2752:8:9" + "src": "2752:8:12" } ] }, "documentation": "@param a integer to determine sign of\n @return int8 sign of original value, either +1,0,-1", - "id": 2077, + "id": 2642, "implemented": true, "isConstructor": false, "isDeclaredConst": true, @@ -2726,16 +2726,16 @@ "name": "sign", "nodeType": "FunctionDefinition", "parameters": { - "id": 2055, + "id": 2620, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2054, + "id": 2619, "name": "a", "nodeType": "VariableDeclaration", - "scope": 2077, - "src": "2602:5:9", + "scope": 2642, + "src": "2602:5:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2743,10 +2743,10 @@ "typeString": "int256" }, "typeName": { - "id": 2053, + "id": 2618, "name": "int", "nodeType": "ElementaryTypeName", - "src": "2602:3:9", + "src": "2602:3:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -2756,20 +2756,20 @@ "visibility": "internal" } ], - "src": "2601:7:9" + "src": "2601:7:12" }, "payable": false, "returnParameters": { - "id": 2058, + "id": 2623, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2057, + "id": 2622, "name": "", "nodeType": "VariableDeclaration", - "scope": 2077, - "src": "2632:4:9", + "scope": 2642, + "src": "2632:4:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2777,10 +2777,10 @@ "typeString": "int8" }, "typeName": { - "id": 2056, + "id": 2621, "name": "int8", "nodeType": "ElementaryTypeName", - "src": "2632:4:9", + "src": "2632:4:12", "typeDescriptions": { "typeIdentifier": "t_int8", "typeString": "int8" @@ -2790,19 +2790,19 @@ "visibility": "internal" } ], - "src": "2631:6:9" + "src": "2631:6:12" }, - "scope": 2233, - "src": "2588:179:9", + "scope": 2798, + "src": "2588:179:12", "stateMutability": "pure", "superFunction": null, "visibility": "internal" }, { "body": { - "id": 2097, + "id": 2662, "nodeType": "Block", - "src": "2979:46:9", + "src": "2979:46:12", "statements": [ { "expression": { @@ -2814,7 +2814,7 @@ "typeIdentifier": "t_bool", "typeString": "bool" }, - "id": 2094, + "id": 2659, "isConstant": false, "isLValue": false, "isPure": false, @@ -2825,19 +2825,19 @@ "typeIdentifier": "t_int256", "typeString": "int256" }, - "id": 2088, + "id": 2653, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 2086, + "id": 2651, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2079, - "src": "2998:1:9", + "referencedDeclaration": 2644, + "src": "2998:1:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -2847,18 +2847,18 @@ "operator": "==", "rightExpression": { "argumentTypes": null, - "id": 2087, + "id": 2652, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2081, - "src": "3003:1:9", + "referencedDeclaration": 2646, + "src": "3003:1:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, - "src": "2998:6:9", + "src": "2998:6:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -2872,7 +2872,7 @@ "typeIdentifier": "t_int256", "typeString": "int256" }, - "id": 2093, + "id": 2658, "isConstant": false, "isLValue": false, "isPure": false, @@ -2883,19 +2883,19 @@ "typeIdentifier": "t_int256", "typeString": "int256" }, - "id": 2091, + "id": 2656, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 2089, + "id": 2654, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2079, - "src": "3008:1:9", + "referencedDeclaration": 2644, + "src": "3008:1:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -2905,18 +2905,18 @@ "operator": "*", "rightExpression": { "argumentTypes": null, - "id": 2090, + "id": 2655, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2081, - "src": "3012:1:9", + "referencedDeclaration": 2646, + "src": "3012:1:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, - "src": "3008:5:9", + "src": "3008:5:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -2927,14 +2927,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "30", - "id": 2092, + "id": 2657, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "3016:1:9", + "src": "3016:1:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -2942,41 +2942,41 @@ }, "value": "0" }, - "src": "3008:9:9", + "src": "3008:9:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "src": "2998:19:9", + "src": "2998:19:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } ], - "id": 2095, + "id": 2660, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", - "src": "2996:22:9", + "src": "2996:22:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "functionReturnParameters": 2085, - "id": 2096, + "functionReturnParameters": 2650, + "id": 2661, "nodeType": "Return", - "src": "2989:29:9" + "src": "2989:29:12" } ] }, "documentation": "@param a integer to compare to b\n @param b integer to compare to a\n @return bool true if a and b are the same sign (+/-)", - "id": 2098, + "id": 2663, "implemented": true, "isConstructor": false, "isDeclaredConst": true, @@ -2984,16 +2984,16 @@ "name": "isSameSign", "nodeType": "FunctionDefinition", "parameters": { - "id": 2082, + "id": 2647, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2079, + "id": 2644, "name": "a", "nodeType": "VariableDeclaration", - "scope": 2098, - "src": "2936:5:9", + "scope": 2663, + "src": "2936:5:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3001,10 +3001,10 @@ "typeString": "int256" }, "typeName": { - "id": 2078, + "id": 2643, "name": "int", "nodeType": "ElementaryTypeName", - "src": "2936:3:9", + "src": "2936:3:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -3015,11 +3015,11 @@ }, { "constant": false, - "id": 2081, + "id": 2646, "name": "b", "nodeType": "VariableDeclaration", - "scope": 2098, - "src": "2943:5:9", + "scope": 2663, + "src": "2943:5:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3027,10 +3027,10 @@ "typeString": "int256" }, "typeName": { - "id": 2080, + "id": 2645, "name": "int", "nodeType": "ElementaryTypeName", - "src": "2943:3:9", + "src": "2943:3:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -3040,20 +3040,20 @@ "visibility": "internal" } ], - "src": "2935:14:9" + "src": "2935:14:12" }, "payable": false, "returnParameters": { - "id": 2085, + "id": 2650, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2084, + "id": 2649, "name": "", "nodeType": "VariableDeclaration", - "scope": 2098, - "src": "2973:4:9", + "scope": 2663, + "src": "2973:4:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3061,10 +3061,10 @@ "typeString": "bool" }, "typeName": { - "id": 2083, + "id": 2648, "name": "bool", "nodeType": "ElementaryTypeName", - "src": "2973:4:9", + "src": "2973:4:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -3074,19 +3074,19 @@ "visibility": "internal" } ], - "src": "2972:6:9" + "src": "2972:6:12" }, - "scope": 2233, - "src": "2916:109:9", + "scope": 2798, + "src": "2916:109:12", "stateMutability": "pure", "superFunction": null, "visibility": "internal" }, { "body": { - "id": 2120, + "id": 2685, "nodeType": "Block", - "src": "3194:112:9", + "src": "3194:112:12", "statements": [ { "condition": { @@ -3095,19 +3095,19 @@ "typeIdentifier": "t_int256", "typeString": "int256" }, - "id": 2107, + "id": 2672, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 2105, + "id": 2670, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2100, - "src": "3208:1:9", + "referencedDeclaration": 2665, + "src": "3208:1:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -3118,14 +3118,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "30", - "id": 2106, + "id": 2671, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "3212:1:9", + "src": "3212:1:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -3133,16 +3133,16 @@ }, "value": "0" }, - "src": "3208:5:9", + "src": "3208:5:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": { - "id": 2118, + "id": 2683, "nodeType": "Block", - "src": "3261:39:9", + "src": "3261:39:12", "statements": [ { "expression": { @@ -3150,12 +3150,12 @@ "arguments": [ { "argumentTypes": null, - "id": 2115, + "id": 2680, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2100, - "src": "3287:1:9", + "referencedDeclaration": 2665, + "src": "3287:1:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -3169,20 +3169,20 @@ "typeString": "int256" } ], - "id": 2114, + "id": 2679, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "3282:4:9", + "src": "3282:4:12", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)" }, "typeName": "uint" }, - "id": 2116, + "id": 2681, "isConstant": false, "isLValue": false, "isPure": false, @@ -3190,26 +3190,26 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3282:7:9", + "src": "3282:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "functionReturnParameters": 2104, - "id": 2117, + "functionReturnParameters": 2669, + "id": 2682, "nodeType": "Return", - "src": "3275:14:9" + "src": "3275:14:12" } ] }, - "id": 2119, + "id": 2684, "nodeType": "IfStatement", - "src": "3204:96:9", + "src": "3204:96:12", "trueBody": { - "id": 2113, + "id": 2678, "nodeType": "Block", - "src": "3215:40:9", + "src": "3215:40:12", "statements": [ { "expression": { @@ -3217,7 +3217,7 @@ "arguments": [ { "argumentTypes": null, - "id": 2110, + "id": 2675, "isConstant": false, "isLValue": false, "isPure": false, @@ -3225,15 +3225,15 @@ "nodeType": "UnaryOperation", "operator": "-", "prefix": true, - "src": "3241:2:9", + "src": "3241:2:12", "subExpression": { "argumentTypes": null, - "id": 2109, + "id": 2674, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2100, - "src": "3242:1:9", + "referencedDeclaration": 2665, + "src": "3242:1:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -3252,20 +3252,20 @@ "typeString": "int256" } ], - "id": 2108, + "id": 2673, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "3236:4:9", + "src": "3236:4:12", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)" }, "typeName": "uint" }, - "id": 2111, + "id": 2676, "isConstant": false, "isLValue": false, "isPure": false, @@ -3273,16 +3273,16 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3236:8:9", + "src": "3236:8:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "functionReturnParameters": 2104, - "id": 2112, + "functionReturnParameters": 2669, + "id": 2677, "nodeType": "Return", - "src": "3229:15:9" + "src": "3229:15:12" } ] } @@ -3290,7 +3290,7 @@ ] }, "documentation": "@param a integer to determine absolute value of\n @return uint non signed representation of a", - "id": 2121, + "id": 2686, "implemented": true, "isConstructor": false, "isDeclaredConst": true, @@ -3298,16 +3298,16 @@ "name": "abs", "nodeType": "FunctionDefinition", "parameters": { - "id": 2101, + "id": 2666, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2100, + "id": 2665, "name": "a", "nodeType": "VariableDeclaration", - "scope": 2121, - "src": "3152:8:9", + "scope": 2686, + "src": "3152:8:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3315,10 +3315,10 @@ "typeString": "int256" }, "typeName": { - "id": 2099, + "id": 2664, "name": "int256", "nodeType": "ElementaryTypeName", - "src": "3152:6:9", + "src": "3152:6:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -3328,20 +3328,20 @@ "visibility": "internal" } ], - "src": "3151:10:9" + "src": "3151:10:12" }, "payable": false, "returnParameters": { - "id": 2104, + "id": 2669, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2103, + "id": 2668, "name": "", "nodeType": "VariableDeclaration", - "scope": 2121, - "src": "3185:7:9", + "scope": 2686, + "src": "3185:7:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3349,10 +3349,10 @@ "typeString": "uint256" }, "typeName": { - "id": 2102, + "id": 2667, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "3185:7:9", + "src": "3185:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3362,19 +3362,19 @@ "visibility": "internal" } ], - "src": "3184:9:9" + "src": "3184:9:12" }, - "scope": 2233, - "src": "3139:167:9", + "scope": 2798, + "src": "3139:167:12", "stateMutability": "pure", "superFunction": null, "visibility": "internal" }, { "body": { - "id": 2141, + "id": 2706, "nodeType": "Block", - "src": "3604:48:9", + "src": "3604:48:12", "statements": [ { "expression": { @@ -3385,7 +3385,7 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 2136, + "id": 2701, "isConstant": false, "isLValue": false, "isPure": false, @@ -3395,12 +3395,12 @@ "arguments": [ { "argumentTypes": null, - "id": 2131, + "id": 2696, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2123, - "src": "3625:1:9", + "referencedDeclaration": 2688, + "src": "3625:1:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -3414,18 +3414,18 @@ "typeString": "int256" } ], - "id": 2130, + "id": 2695, "name": "abs", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2121, - "src": "3621:3:9", + "referencedDeclaration": 2686, + "src": "3621:3:12", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_uint256_$", "typeString": "function (int256) pure returns (uint256)" } }, - "id": 2132, + "id": 2697, "isConstant": false, "isLValue": false, "isPure": false, @@ -3433,7 +3433,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3621:6:9", + "src": "3621:6:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3446,12 +3446,12 @@ "arguments": [ { "argumentTypes": null, - "id": 2134, + "id": 2699, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2125, - "src": "3634:1:9", + "referencedDeclaration": 2690, + "src": "3634:1:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -3465,18 +3465,18 @@ "typeString": "int256" } ], - "id": 2133, + "id": 2698, "name": "abs", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2121, - "src": "3630:3:9", + "referencedDeclaration": 2686, + "src": "3630:3:12", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_uint256_$", "typeString": "function (int256) pure returns (uint256)" } }, - "id": 2135, + "id": 2700, "isConstant": false, "isLValue": false, "isPure": false, @@ -3484,13 +3484,13 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3630:6:9", + "src": "3630:6:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "3621:15:9", + "src": "3621:15:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -3498,32 +3498,32 @@ }, "falseExpression": { "argumentTypes": null, - "id": 2138, + "id": 2703, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2125, - "src": "3644:1:9", + "referencedDeclaration": 2690, + "src": "3644:1:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, - "id": 2139, + "id": 2704, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "Conditional", - "src": "3621:24:9", + "src": "3621:24:12", "trueExpression": { "argumentTypes": null, - "id": 2137, + "id": 2702, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2123, - "src": "3640:1:9", + "referencedDeclaration": 2688, + "src": "3640:1:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -3534,15 +3534,15 @@ "typeString": "int256" } }, - "functionReturnParameters": 2129, - "id": 2140, + "functionReturnParameters": 2694, + "id": 2705, "nodeType": "Return", - "src": "3614:31:9" + "src": "3614:31:12" } ] }, "documentation": "@notice finds the value closer to zero regardless of sign\n @param a integer to compare to b\n @param b integer to compare to a\n @return a if a is closer to zero than b - does not return abs value!", - "id": 2142, + "id": 2707, "implemented": true, "isConstructor": false, "isDeclaredConst": true, @@ -3550,16 +3550,16 @@ "name": "absMin", "nodeType": "FunctionDefinition", "parameters": { - "id": 2126, + "id": 2691, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2123, + "id": 2688, "name": "a", "nodeType": "VariableDeclaration", - "scope": 2142, - "src": "3553:8:9", + "scope": 2707, + "src": "3553:8:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3567,10 +3567,10 @@ "typeString": "int256" }, "typeName": { - "id": 2122, + "id": 2687, "name": "int256", "nodeType": "ElementaryTypeName", - "src": "3553:6:9", + "src": "3553:6:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -3581,11 +3581,11 @@ }, { "constant": false, - "id": 2125, + "id": 2690, "name": "b", "nodeType": "VariableDeclaration", - "scope": 2142, - "src": "3563:8:9", + "scope": 2707, + "src": "3563:8:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3593,10 +3593,10 @@ "typeString": "int256" }, "typeName": { - "id": 2124, + "id": 2689, "name": "int256", "nodeType": "ElementaryTypeName", - "src": "3563:6:9", + "src": "3563:6:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -3606,20 +3606,20 @@ "visibility": "internal" } ], - "src": "3552:20:9" + "src": "3552:20:12" }, "payable": false, "returnParameters": { - "id": 2129, + "id": 2694, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2128, + "id": 2693, "name": "", "nodeType": "VariableDeclaration", - "scope": 2142, - "src": "3596:6:9", + "scope": 2707, + "src": "3596:6:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3627,10 +3627,10 @@ "typeString": "int256" }, "typeName": { - "id": 2127, + "id": 2692, "name": "int256", "nodeType": "ElementaryTypeName", - "src": "3596:6:9", + "src": "3596:6:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -3640,19 +3640,19 @@ "visibility": "internal" } ], - "src": "3595:8:9" + "src": "3595:8:12" }, - "scope": 2233, - "src": "3537:115:9", + "scope": 2798, + "src": "3537:115:12", "stateMutability": "pure", "superFunction": null, "visibility": "internal" }, { "body": { - "id": 2162, + "id": 2727, "nodeType": "Block", - "src": "3954:49:9", + "src": "3954:49:12", "statements": [ { "expression": { @@ -3663,7 +3663,7 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 2157, + "id": 2722, "isConstant": false, "isLValue": false, "isPure": false, @@ -3673,12 +3673,12 @@ "arguments": [ { "argumentTypes": null, - "id": 2152, + "id": 2717, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2144, - "src": "3975:1:9", + "referencedDeclaration": 2709, + "src": "3975:1:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -3692,18 +3692,18 @@ "typeString": "int256" } ], - "id": 2151, + "id": 2716, "name": "abs", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2121, - "src": "3971:3:9", + "referencedDeclaration": 2686, + "src": "3971:3:12", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_uint256_$", "typeString": "function (int256) pure returns (uint256)" } }, - "id": 2153, + "id": 2718, "isConstant": false, "isLValue": false, "isPure": false, @@ -3711,7 +3711,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3971:6:9", + "src": "3971:6:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3724,12 +3724,12 @@ "arguments": [ { "argumentTypes": null, - "id": 2155, + "id": 2720, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2146, - "src": "3985:1:9", + "referencedDeclaration": 2711, + "src": "3985:1:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -3743,18 +3743,18 @@ "typeString": "int256" } ], - "id": 2154, + "id": 2719, "name": "abs", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2121, - "src": "3981:3:9", + "referencedDeclaration": 2686, + "src": "3981:3:12", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_uint256_$", "typeString": "function (int256) pure returns (uint256)" } }, - "id": 2156, + "id": 2721, "isConstant": false, "isLValue": false, "isPure": false, @@ -3762,13 +3762,13 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3981:6:9", + "src": "3981:6:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "3971:16:9", + "src": "3971:16:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -3776,32 +3776,32 @@ }, "falseExpression": { "argumentTypes": null, - "id": 2159, + "id": 2724, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2146, - "src": "3995:1:9", + "referencedDeclaration": 2711, + "src": "3995:1:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, - "id": 2160, + "id": 2725, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "Conditional", - "src": "3971:25:9", + "src": "3971:25:12", "trueExpression": { "argumentTypes": null, - "id": 2158, + "id": 2723, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2144, - "src": "3991:1:9", + "referencedDeclaration": 2709, + "src": "3991:1:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -3812,15 +3812,15 @@ "typeString": "int256" } }, - "functionReturnParameters": 2150, - "id": 2161, + "functionReturnParameters": 2715, + "id": 2726, "nodeType": "Return", - "src": "3964:32:9" + "src": "3964:32:12" } ] }, "documentation": "@notice finds the value further from zero regardless of sign\n @param a integer to compare to b\n @param b integer to compare to a\n @return a if a is further to zero than b - does not return abs value!", - "id": 2163, + "id": 2728, "implemented": true, "isConstructor": false, "isDeclaredConst": true, @@ -3828,16 +3828,16 @@ "name": "absMax", "nodeType": "FunctionDefinition", "parameters": { - "id": 2147, + "id": 2712, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2144, + "id": 2709, "name": "a", "nodeType": "VariableDeclaration", - "scope": 2163, - "src": "3903:8:9", + "scope": 2728, + "src": "3903:8:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3845,10 +3845,10 @@ "typeString": "int256" }, "typeName": { - "id": 2143, + "id": 2708, "name": "int256", "nodeType": "ElementaryTypeName", - "src": "3903:6:9", + "src": "3903:6:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -3859,11 +3859,11 @@ }, { "constant": false, - "id": 2146, + "id": 2711, "name": "b", "nodeType": "VariableDeclaration", - "scope": 2163, - "src": "3913:8:9", + "scope": 2728, + "src": "3913:8:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3871,10 +3871,10 @@ "typeString": "int256" }, "typeName": { - "id": 2145, + "id": 2710, "name": "int256", "nodeType": "ElementaryTypeName", - "src": "3913:6:9", + "src": "3913:6:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -3884,20 +3884,20 @@ "visibility": "internal" } ], - "src": "3902:20:9" + "src": "3902:20:12" }, "payable": false, "returnParameters": { - "id": 2150, + "id": 2715, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2149, + "id": 2714, "name": "", "nodeType": "VariableDeclaration", - "scope": 2163, - "src": "3946:6:9", + "scope": 2728, + "src": "3946:6:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3905,10 +3905,10 @@ "typeString": "int256" }, "typeName": { - "id": 2148, + "id": 2713, "name": "int256", "nodeType": "ElementaryTypeName", - "src": "3946:6:9", + "src": "3946:6:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -3918,30 +3918,30 @@ "visibility": "internal" } ], - "src": "3945:8:9" + "src": "3945:8:12" }, - "scope": 2233, - "src": "3887:116:9", + "scope": 2798, + "src": "3887:116:12", "stateMutability": "pure", "superFunction": null, "visibility": "internal" }, { "body": { - "id": 2231, + "id": 2796, "nodeType": "Block", - "src": "4655:592:9", + "src": "4655:592:12", "statements": [ { "assignments": [], "declarations": [ { "constant": false, - "id": 2179, + "id": 2744, "name": "maxLoss", "nodeType": "VariableDeclaration", - "scope": 2232, - "src": "4665:12:9", + "scope": 2797, + "src": "4665:12:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3949,10 +3949,10 @@ "typeString": "uint256" }, "typeName": { - "id": 2178, + "id": 2743, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "4665:4:9", + "src": "4665:4:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3962,10 +3962,10 @@ "visibility": "internal" } ], - "id": 2180, + "id": 2745, "initialValue": null, "nodeType": "VariableDeclarationStatement", - "src": "4665:12:9" + "src": "4665:12:12" }, { "condition": { @@ -3974,19 +3974,19 @@ "typeIdentifier": "t_int256", "typeString": "int256" }, - "id": 2183, + "id": 2748, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 2181, + "id": 2746, "name": "qty", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2171, - "src": "4691:3:9", + "referencedDeclaration": 2736, + "src": "4691:3:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -3997,14 +3997,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "30", - "id": 2182, + "id": 2747, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "4697:1:9", + "src": "4697:1:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -4012,16 +4012,16 @@ }, "value": "0" }, - "src": "4691:7:9", + "src": "4691:7:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": { - "id": 2219, + "id": 2784, "nodeType": "Block", - "src": "4943:235:9", + "src": "4943:235:12", "statements": [ { "condition": { @@ -4030,19 +4030,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 2204, + "id": 2769, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 2202, + "id": 2767, "name": "price", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2173, - "src": "5031:5:9", + "referencedDeclaration": 2738, + "src": "5031:5:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4052,44 +4052,44 @@ "operator": ">=", "rightExpression": { "argumentTypes": null, - "id": 2203, + "id": 2768, "name": "priceCap", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2167, - "src": "5040:8:9", + "referencedDeclaration": 2732, + "src": "5040:8:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "5031:17:9", + "src": "5031:17:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": { - "id": 2217, + "id": 2782, "nodeType": "Block", - "src": "5100:68:9", + "src": "5100:68:12", "statements": [ { "expression": { "argumentTypes": null, - "id": 2215, + "id": 2780, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 2210, + "id": 2775, "name": "maxLoss", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2179, - "src": "5118:7:9", + "referencedDeclaration": 2744, + "src": "5118:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4102,12 +4102,12 @@ "arguments": [ { "argumentTypes": null, - "id": 2212, + "id": 2777, "name": "priceCap", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2167, - "src": "5137:8:9", + "referencedDeclaration": 2732, + "src": "5137:8:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4115,12 +4115,12 @@ }, { "argumentTypes": null, - "id": 2213, + "id": 2778, "name": "price", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2173, - "src": "5147:5:9", + "referencedDeclaration": 2738, + "src": "5147:5:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4138,21 +4138,21 @@ "typeString": "uint256" } ], - "id": 2211, + "id": 2776, "name": "subtract", "nodeType": "Identifier", "overloadedDeclarations": [ - 1963, - 2052 + 2528, + 2617 ], - "referencedDeclaration": 1963, - "src": "5128:8:9", + "referencedDeclaration": 2528, + "src": "5128:8:12", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, - "id": 2214, + "id": 2779, "isConstant": false, "isLValue": false, "isPure": false, @@ -4160,48 +4160,48 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "5128:25:9", + "src": "5128:25:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "5118:35:9", + "src": "5118:35:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 2216, + "id": 2781, "nodeType": "ExpressionStatement", - "src": "5118:35:9" + "src": "5118:35:12" } ] }, - "id": 2218, + "id": 2783, "nodeType": "IfStatement", - "src": "5027:141:9", + "src": "5027:141:12", "trueBody": { - "id": 2209, + "id": 2774, "nodeType": "Block", - "src": "5050:44:9", + "src": "5050:44:12", "statements": [ { "expression": { "argumentTypes": null, - "id": 2207, + "id": 2772, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 2205, + "id": 2770, "name": "maxLoss", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2179, - "src": "5068:7:9", + "referencedDeclaration": 2744, + "src": "5068:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4212,14 +4212,14 @@ "rightHandSide": { "argumentTypes": null, "hexValue": "30", - "id": 2206, + "id": 2771, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "5078:1:9", + "src": "5078:1:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -4227,28 +4227,28 @@ }, "value": "0" }, - "src": "5068:11:9", + "src": "5068:11:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 2208, + "id": 2773, "nodeType": "ExpressionStatement", - "src": "5068:11:9" + "src": "5068:11:12" } ] } } ] }, - "id": 2220, + "id": 2785, "nodeType": "IfStatement", - "src": "4687:491:9", + "src": "4687:491:12", "trueBody": { - "id": 2201, + "id": 2766, "nodeType": "Block", - "src": "4700:237:9", + "src": "4700:237:12", "statements": [ { "condition": { @@ -4257,19 +4257,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 2186, + "id": 2751, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 2184, + "id": 2749, "name": "price", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2173, - "src": "4786:5:9", + "referencedDeclaration": 2738, + "src": "4786:5:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4279,44 +4279,44 @@ "operator": "<=", "rightExpression": { "argumentTypes": null, - "id": 2185, + "id": 2750, "name": "priceFloor", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2165, - "src": "4795:10:9", + "referencedDeclaration": 2730, + "src": "4795:10:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "4786:19:9", + "src": "4786:19:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": { - "id": 2199, + "id": 2764, "nodeType": "Block", - "src": "4857:70:9", + "src": "4857:70:12", "statements": [ { "expression": { "argumentTypes": null, - "id": 2197, + "id": 2762, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 2192, + "id": 2757, "name": "maxLoss", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2179, - "src": "4875:7:9", + "referencedDeclaration": 2744, + "src": "4875:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4329,12 +4329,12 @@ "arguments": [ { "argumentTypes": null, - "id": 2194, + "id": 2759, "name": "price", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2173, - "src": "4894:5:9", + "referencedDeclaration": 2738, + "src": "4894:5:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4342,12 +4342,12 @@ }, { "argumentTypes": null, - "id": 2195, + "id": 2760, "name": "priceFloor", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2165, - "src": "4901:10:9", + "referencedDeclaration": 2730, + "src": "4901:10:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4365,21 +4365,21 @@ "typeString": "uint256" } ], - "id": 2193, + "id": 2758, "name": "subtract", "nodeType": "Identifier", "overloadedDeclarations": [ - 1963, - 2052 + 2528, + 2617 ], - "referencedDeclaration": 1963, - "src": "4885:8:9", + "referencedDeclaration": 2528, + "src": "4885:8:12", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, - "id": 2196, + "id": 2761, "isConstant": false, "isLValue": false, "isPure": false, @@ -4387,48 +4387,48 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "4885:27:9", + "src": "4885:27:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "4875:37:9", + "src": "4875:37:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 2198, + "id": 2763, "nodeType": "ExpressionStatement", - "src": "4875:37:9" + "src": "4875:37:12" } ] }, - "id": 2200, + "id": 2765, "nodeType": "IfStatement", - "src": "4782:145:9", + "src": "4782:145:12", "trueBody": { - "id": 2191, + "id": 2756, "nodeType": "Block", - "src": "4807:44:9", + "src": "4807:44:12", "statements": [ { "expression": { "argumentTypes": null, - "id": 2189, + "id": 2754, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 2187, + "id": 2752, "name": "maxLoss", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2179, - "src": "4825:7:9", + "referencedDeclaration": 2744, + "src": "4825:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4439,14 +4439,14 @@ "rightHandSide": { "argumentTypes": null, "hexValue": "30", - "id": 2188, + "id": 2753, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "4835:1:9", + "src": "4835:1:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -4454,15 +4454,15 @@ }, "value": "0" }, - "src": "4825:11:9", + "src": "4825:11:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 2190, + "id": 2755, "nodeType": "ExpressionStatement", - "src": "4825:11:9" + "src": "4825:11:12" } ] } @@ -4473,19 +4473,19 @@ { "expression": { "argumentTypes": null, - "id": 2229, + "id": 2794, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 2221, + "id": 2786, "name": "neededCollateral", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2176, - "src": "5187:16:9", + "referencedDeclaration": 2741, + "src": "5187:16:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4499,7 +4499,7 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 2228, + "id": 2793, "isConstant": false, "isLValue": false, "isPure": false, @@ -4510,19 +4510,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 2226, + "id": 2791, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 2222, + "id": 2787, "name": "maxLoss", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2179, - "src": "5206:7:9", + "referencedDeclaration": 2744, + "src": "5206:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4535,12 +4535,12 @@ "arguments": [ { "argumentTypes": null, - "id": 2224, + "id": 2789, "name": "qty", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2171, - "src": "5220:3:9", + "referencedDeclaration": 2736, + "src": "5220:3:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -4554,18 +4554,18 @@ "typeString": "int256" } ], - "id": 2223, + "id": 2788, "name": "abs", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2121, - "src": "5216:3:9", + "referencedDeclaration": 2686, + "src": "5216:3:12", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_uint256_$", "typeString": "function (int256) pure returns (uint256)" } }, - "id": 2225, + "id": 2790, "isConstant": false, "isLValue": false, "isPure": false, @@ -4573,13 +4573,13 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "5216:8:9", + "src": "5216:8:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "5206:18:9", + "src": "5206:18:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4589,37 +4589,37 @@ "operator": "*", "rightExpression": { "argumentTypes": null, - "id": 2227, + "id": 2792, "name": "qtyMultiplier", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2169, - "src": "5227:13:9", + "referencedDeclaration": 2734, + "src": "5227:13:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "5206:34:9", + "src": "5206:34:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "5187:53:9", + "src": "5187:53:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 2230, + "id": 2795, "nodeType": "ExpressionStatement", - "src": "5187:53:9" + "src": "5187:53:12" } ] }, "documentation": "@notice determines the amount of needed collateral for a given position (qty and price)\n @param priceFloor lowest price the contract is allowed to trade before expiration\n @param priceCap highest price the contract is allowed to trade before expiration\n @param qtyMultiplier multiplier for qty from base units\n @param qty signed integer corresponding to the traded quantity\n @param price of the trade", - "id": 2232, + "id": 2797, "implemented": true, "isConstructor": false, "isDeclaredConst": true, @@ -4627,16 +4627,16 @@ "name": "calculateNeededCollateral", "nodeType": "FunctionDefinition", "parameters": { - "id": 2174, + "id": 2739, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2165, + "id": 2730, "name": "priceFloor", "nodeType": "VariableDeclaration", - "scope": 2232, - "src": "4497:15:9", + "scope": 2797, + "src": "4497:15:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4644,10 +4644,10 @@ "typeString": "uint256" }, "typeName": { - "id": 2164, + "id": 2729, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "4497:4:9", + "src": "4497:4:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4658,11 +4658,11 @@ }, { "constant": false, - "id": 2167, + "id": 2732, "name": "priceCap", "nodeType": "VariableDeclaration", - "scope": 2232, - "src": "4522:13:9", + "scope": 2797, + "src": "4522:13:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4670,10 +4670,10 @@ "typeString": "uint256" }, "typeName": { - "id": 2166, + "id": 2731, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "4522:4:9", + "src": "4522:4:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4684,11 +4684,11 @@ }, { "constant": false, - "id": 2169, + "id": 2734, "name": "qtyMultiplier", "nodeType": "VariableDeclaration", - "scope": 2232, - "src": "4545:18:9", + "scope": 2797, + "src": "4545:18:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4696,10 +4696,10 @@ "typeString": "uint256" }, "typeName": { - "id": 2168, + "id": 2733, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "4545:4:9", + "src": "4545:4:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4710,11 +4710,11 @@ }, { "constant": false, - "id": 2171, + "id": 2736, "name": "qty", "nodeType": "VariableDeclaration", - "scope": 2232, - "src": "4573:7:9", + "scope": 2797, + "src": "4573:7:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4722,10 +4722,10 @@ "typeString": "int256" }, "typeName": { - "id": 2170, + "id": 2735, "name": "int", "nodeType": "ElementaryTypeName", - "src": "4573:3:9", + "src": "4573:3:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -4736,11 +4736,11 @@ }, { "constant": false, - "id": 2173, + "id": 2738, "name": "price", "nodeType": "VariableDeclaration", - "scope": 2232, - "src": "4590:10:9", + "scope": 2797, + "src": "4590:10:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4748,10 +4748,10 @@ "typeString": "uint256" }, "typeName": { - "id": 2172, + "id": 2737, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "4590:4:9", + "src": "4590:4:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4761,20 +4761,20 @@ "visibility": "internal" } ], - "src": "4487:119:9" + "src": "4487:119:12" }, "payable": false, "returnParameters": { - "id": 2177, + "id": 2742, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2176, + "id": 2741, "name": "neededCollateral", "nodeType": "VariableDeclaration", - "scope": 2232, - "src": "4628:21:9", + "scope": 2797, + "src": "4628:21:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4782,10 +4782,10 @@ "typeString": "uint256" }, "typeName": { - "id": 2175, + "id": 2740, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "4628:4:9", + "src": "4628:4:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4795,33 +4795,33 @@ "visibility": "internal" } ], - "src": "4627:23:9" + "src": "4627:23:12" }, - "scope": 2233, - "src": "4453:794:9", + "scope": 2798, + "src": "4453:794:12", "stateMutability": "pure", "superFunction": null, "visibility": "public" } ], - "scope": 2234, - "src": "718:4531:9" + "scope": 2799, + "src": "718:4531:12" } ], - "src": "607:4643:9" + "src": "607:4643:12" }, "legacyAST": { - "absolutePath": "/home/pelsasser/MARKETProtocol/contracts/libraries/MathLib.sol", + "absolutePath": "/home/travis/build/MARKETProtocol/MARKETProtocol/contracts/libraries/MathLib.sol", "exportedSymbols": { "MathLib": [ - 2233 + 2798 ] }, - "id": 2234, + "id": 2799, "nodeType": "SourceUnit", "nodes": [ { - "id": 1872, + "id": 2437, "literals": [ "solidity", "^", @@ -4829,7 +4829,7 @@ ".24" ], "nodeType": "PragmaDirective", - "src": "607:24:9" + "src": "607:24:12" }, { "baseContracts": [], @@ -4837,20 +4837,20 @@ "contractKind": "library", "documentation": "@title Math function library with overflow protection inspired by Open Zeppelin", "fullyImplemented": true, - "id": 2233, + "id": 2798, "linearizedBaseContracts": [ - 2233 + 2798 ], "name": "MathLib", "nodeType": "ContractDefinition", "nodes": [ { "constant": true, - "id": 1882, + "id": 2447, "name": "INT256_MIN", "nodeType": "VariableDeclaration", - "scope": 2233, - "src": "741:56:9", + "scope": 2798, + "src": "741:56:12", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -4858,10 +4858,10 @@ "typeString": "int256" }, "typeName": { - "id": 1873, + "id": 2438, "name": "int256", "nodeType": "ElementaryTypeName", - "src": "741:6:9", + "src": "741:6:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -4879,7 +4879,7 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 1879, + "id": 2444, "isConstant": false, "isLValue": false, "isPure": true, @@ -4890,14 +4890,14 @@ { "argumentTypes": null, "hexValue": "31", - "id": 1876, + "id": 2441, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "786:1:9", + "src": "786:1:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", @@ -4913,20 +4913,20 @@ "typeString": "int_const 1" } ], - "id": 1875, + "id": 2440, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "778:7:9", + "src": "778:7:12", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)" }, "typeName": "uint256" }, - "id": 1877, + "id": 2442, "isConstant": false, "isLValue": false, "isPure": true, @@ -4934,7 +4934,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "778:10:9", + "src": "778:10:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4945,14 +4945,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "323535", - "id": 1878, + "id": 2443, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "792:3:9", + "src": "792:3:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_255_by_1", @@ -4960,21 +4960,21 @@ }, "value": "255" }, - "src": "778:17:9", + "src": "778:17:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], - "id": 1880, + "id": 2445, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "TupleExpression", - "src": "777:19:9", + "src": "777:19:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4988,20 +4988,20 @@ "typeString": "uint256" } ], - "id": 1874, + "id": 2439, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "770:6:9", + "src": "770:6:12", "typeDescriptions": { "typeIdentifier": "t_type$_t_int256_$", "typeString": "type(int256)" }, "typeName": "int256" }, - "id": 1881, + "id": 2446, "isConstant": false, "isLValue": false, "isPure": true, @@ -5009,7 +5009,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "770:27:9", + "src": "770:27:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -5019,11 +5019,11 @@ }, { "constant": true, - "id": 1894, + "id": 2459, "name": "INT256_MAX", "nodeType": "VariableDeclaration", - "scope": 2233, - "src": "803:59:9", + "scope": 2798, + "src": "803:59:12", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -5031,10 +5031,10 @@ "typeString": "int256" }, "typeName": { - "id": 1883, + "id": 2448, "name": "int256", "nodeType": "ElementaryTypeName", - "src": "803:6:9", + "src": "803:6:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -5045,7 +5045,7 @@ "arguments": [ { "argumentTypes": null, - "id": 1892, + "id": 2457, "isConstant": false, "isLValue": false, "isPure": true, @@ -5053,7 +5053,7 @@ "nodeType": "UnaryOperation", "operator": "~", "prefix": true, - "src": "839:22:9", + "src": "839:22:12", "subExpression": { "argumentTypes": null, "components": [ @@ -5066,7 +5066,7 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 1889, + "id": 2454, "isConstant": false, "isLValue": false, "isPure": true, @@ -5077,14 +5077,14 @@ { "argumentTypes": null, "hexValue": "31", - "id": 1886, + "id": 2451, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "850:1:9", + "src": "850:1:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", @@ -5100,20 +5100,20 @@ "typeString": "int_const 1" } ], - "id": 1885, + "id": 2450, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "842:7:9", + "src": "842:7:12", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)" }, "typeName": "uint256" }, - "id": 1887, + "id": 2452, "isConstant": false, "isLValue": false, "isPure": true, @@ -5121,7 +5121,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "842:10:9", + "src": "842:10:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5132,14 +5132,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "323535", - "id": 1888, + "id": 2453, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "856:3:9", + "src": "856:3:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_255_by_1", @@ -5147,35 +5147,35 @@ }, "value": "255" }, - "src": "842:17:9", + "src": "842:17:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], - "id": 1890, + "id": 2455, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "TupleExpression", - "src": "841:19:9", + "src": "841:19:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], - "id": 1891, + "id": 2456, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "TupleExpression", - "src": "840:21:9", + "src": "840:21:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5194,20 +5194,20 @@ "typeString": "uint256" } ], - "id": 1884, + "id": 2449, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "832:6:9", + "src": "832:6:12", "typeDescriptions": { "typeIdentifier": "t_type$_t_int256_$", "typeString": "type(int256)" }, "typeName": "int256" }, - "id": 1893, + "id": 2458, "isConstant": false, "isLValue": false, "isPure": true, @@ -5215,7 +5215,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "832:30:9", + "src": "832:30:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -5225,22 +5225,22 @@ }, { "body": { - "id": 1923, + "id": 2488, "nodeType": "Block", - "src": "941:90:9", + "src": "941:90:12", "statements": [ { "assignments": [ - 1904 + 2469 ], "declarations": [ { "constant": false, - "id": 1904, + "id": 2469, "name": "c", "nodeType": "VariableDeclaration", - "scope": 1924, - "src": "951:9:9", + "scope": 2489, + "src": "951:9:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5248,10 +5248,10 @@ "typeString": "uint256" }, "typeName": { - "id": 1903, + "id": 2468, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "951:7:9", + "src": "951:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5261,26 +5261,26 @@ "visibility": "internal" } ], - "id": 1908, + "id": 2473, "initialValue": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 1907, + "id": 2472, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 1905, + "id": 2470, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1896, - "src": "963:1:9", + "referencedDeclaration": 2461, + "src": "963:1:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5290,25 +5290,25 @@ "operator": "*", "rightExpression": { "argumentTypes": null, - "id": 1906, + "id": 2471, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1898, - "src": "967:1:9", + "referencedDeclaration": 2463, + "src": "967:1:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "963:5:9", + "src": "963:5:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", - "src": "951:17:9" + "src": "951:17:12" }, { "expression": { @@ -5320,7 +5320,7 @@ "typeIdentifier": "t_bool", "typeString": "bool" }, - "id": 1918, + "id": 2483, "isConstant": false, "isLValue": false, "isPure": false, @@ -5331,19 +5331,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 1912, + "id": 2477, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 1910, + "id": 2475, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1896, - "src": "985:1:9", + "referencedDeclaration": 2461, + "src": "985:1:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5354,14 +5354,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "30", - "id": 1911, + "id": 2476, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "990:1:9", + "src": "990:1:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -5369,7 +5369,7 @@ }, "value": "0" }, - "src": "985:6:9", + "src": "985:6:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -5383,7 +5383,7 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 1917, + "id": 2482, "isConstant": false, "isLValue": false, "isPure": false, @@ -5394,19 +5394,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 1915, + "id": 2480, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 1913, + "id": 2478, "name": "c", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1904, - "src": "995:1:9", + "referencedDeclaration": 2469, + "src": "995:1:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5416,18 +5416,18 @@ "operator": "/", "rightExpression": { "argumentTypes": null, - "id": 1914, + "id": 2479, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1896, - "src": "999:1:9", + "referencedDeclaration": 2461, + "src": "999:1:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "995:5:9", + "src": "995:5:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5437,24 +5437,24 @@ "operator": "==", "rightExpression": { "argumentTypes": null, - "id": 1916, + "id": 2481, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1898, - "src": "1004:1:9", + "referencedDeclaration": 2463, + "src": "1004:1:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "995:10:9", + "src": "995:10:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "src": "985:20:9", + "src": "985:20:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -5468,18 +5468,18 @@ "typeString": "bool" } ], - "id": 1909, + "id": 2474, "name": "assert", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 5182, - "src": "978:6:9", + "referencedDeclaration": 8172, + "src": "978:6:12", "typeDescriptions": { "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, - "id": 1919, + "id": 2484, "isConstant": false, "isLValue": false, "isPure": false, @@ -5487,39 +5487,39 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "978:28:9", + "src": "978:28:12", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 1920, + "id": 2485, "nodeType": "ExpressionStatement", - "src": "978:28:9" + "src": "978:28:12" }, { "expression": { "argumentTypes": null, - "id": 1921, + "id": 2486, "name": "c", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1904, - "src": "1023:1:9", + "referencedDeclaration": 2469, + "src": "1023:1:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "functionReturnParameters": 1902, - "id": 1922, + "functionReturnParameters": 2467, + "id": 2487, "nodeType": "Return", - "src": "1016:8:9" + "src": "1016:8:12" } ] }, "documentation": null, - "id": 1924, + "id": 2489, "implemented": true, "isConstructor": false, "isDeclaredConst": true, @@ -5527,16 +5527,16 @@ "name": "multiply", "nodeType": "FunctionDefinition", "parameters": { - "id": 1899, + "id": 2464, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1896, + "id": 2461, "name": "a", "nodeType": "VariableDeclaration", - "scope": 1924, - "src": "887:9:9", + "scope": 2489, + "src": "887:9:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5544,10 +5544,10 @@ "typeString": "uint256" }, "typeName": { - "id": 1895, + "id": 2460, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "887:7:9", + "src": "887:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5558,11 +5558,11 @@ }, { "constant": false, - "id": 1898, + "id": 2463, "name": "b", "nodeType": "VariableDeclaration", - "scope": 1924, - "src": "898:9:9", + "scope": 2489, + "src": "898:9:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5570,10 +5570,10 @@ "typeString": "uint256" }, "typeName": { - "id": 1897, + "id": 2462, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "898:7:9", + "src": "898:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5583,20 +5583,20 @@ "visibility": "internal" } ], - "src": "886:22:9" + "src": "886:22:12" }, "payable": false, "returnParameters": { - "id": 1902, + "id": 2467, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1901, + "id": 2466, "name": "", "nodeType": "VariableDeclaration", - "scope": 1924, - "src": "932:7:9", + "scope": 2489, + "src": "932:7:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5604,10 +5604,10 @@ "typeString": "uint256" }, "typeName": { - "id": 1900, + "id": 2465, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "932:7:9", + "src": "932:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5617,19 +5617,19 @@ "visibility": "internal" } ], - "src": "931:9:9" + "src": "931:9:12" }, - "scope": 2233, - "src": "869:162:9", + "scope": 2798, + "src": "869:162:12", "stateMutability": "pure", "superFunction": null, "visibility": "internal" }, { "body": { - "id": 1942, + "id": 2507, "nodeType": "Block", - "src": "1180:60:9", + "src": "1180:60:12", "statements": [ { "expression": { @@ -5638,7 +5638,7 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 1940, + "id": 2505, "isConstant": false, "isLValue": false, "isPure": false, @@ -5648,12 +5648,12 @@ "arguments": [ { "argumentTypes": null, - "id": 1936, + "id": 2501, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1926, - "src": "1206:1:9", + "referencedDeclaration": 2491, + "src": "1206:1:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5661,12 +5661,12 @@ }, { "argumentTypes": null, - "id": 1937, + "id": 2502, "name": "numerator", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1928, - "src": "1209:9:9", + "referencedDeclaration": 2493, + "src": "1209:9:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5684,18 +5684,18 @@ "typeString": "uint256" } ], - "id": 1935, + "id": 2500, "name": "multiply", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1924, - "src": "1197:8:9", + "referencedDeclaration": 2489, + "src": "1197:8:12", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, - "id": 1938, + "id": 2503, "isConstant": false, "isLValue": false, "isPure": false, @@ -5703,7 +5703,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "1197:22:9", + "src": "1197:22:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5713,32 +5713,32 @@ "operator": "/", "rightExpression": { "argumentTypes": null, - "id": 1939, + "id": 2504, "name": "denominator", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1930, - "src": "1222:11:9", + "referencedDeclaration": 2495, + "src": "1222:11:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "1197:36:9", + "src": "1197:36:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "functionReturnParameters": 1934, - "id": 1941, + "functionReturnParameters": 2499, + "id": 2506, "nodeType": "Return", - "src": "1190:43:9" + "src": "1190:43:12" } ] }, "documentation": null, - "id": 1943, + "id": 2508, "implemented": true, "isConstructor": false, "isDeclaredConst": true, @@ -5746,16 +5746,16 @@ "name": "divideFractional", "nodeType": "FunctionDefinition", "parameters": { - "id": 1931, + "id": 2496, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1926, + "id": 2491, "name": "a", "nodeType": "VariableDeclaration", - "scope": 1943, - "src": "1072:9:9", + "scope": 2508, + "src": "1072:9:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5763,10 +5763,10 @@ "typeString": "uint256" }, "typeName": { - "id": 1925, + "id": 2490, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1072:7:9", + "src": "1072:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5777,11 +5777,11 @@ }, { "constant": false, - "id": 1928, + "id": 2493, "name": "numerator", "nodeType": "VariableDeclaration", - "scope": 1943, - "src": "1091:17:9", + "scope": 2508, + "src": "1091:17:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5789,10 +5789,10 @@ "typeString": "uint256" }, "typeName": { - "id": 1927, + "id": 2492, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1091:7:9", + "src": "1091:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5803,11 +5803,11 @@ }, { "constant": false, - "id": 1930, + "id": 2495, "name": "denominator", "nodeType": "VariableDeclaration", - "scope": 1943, - "src": "1118:19:9", + "scope": 2508, + "src": "1118:19:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5815,10 +5815,10 @@ "typeString": "uint256" }, "typeName": { - "id": 1929, + "id": 2494, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1118:7:9", + "src": "1118:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5828,20 +5828,20 @@ "visibility": "internal" } ], - "src": "1062:81:9" + "src": "1062:81:12" }, "payable": false, "returnParameters": { - "id": 1934, + "id": 2499, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1933, + "id": 2498, "name": "", "nodeType": "VariableDeclaration", - "scope": 1943, - "src": "1167:7:9", + "scope": 2508, + "src": "1167:7:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5849,10 +5849,10 @@ "typeString": "uint256" }, "typeName": { - "id": 1932, + "id": 2497, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1167:7:9", + "src": "1167:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5862,19 +5862,19 @@ "visibility": "internal" } ], - "src": "1166:9:9" + "src": "1166:9:12" }, - "scope": 2233, - "src": "1037:203:9", + "scope": 2798, + "src": "1037:203:12", "stateMutability": "pure", "superFunction": null, "visibility": "internal" }, { "body": { - "id": 1962, + "id": 2527, "nodeType": "Block", - "src": "1318:53:9", + "src": "1318:53:12", "statements": [ { "expression": { @@ -5886,19 +5886,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 1955, + "id": 2520, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 1953, + "id": 2518, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1947, - "src": "1335:1:9", + "referencedDeclaration": 2512, + "src": "1335:1:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5908,18 +5908,18 @@ "operator": "<=", "rightExpression": { "argumentTypes": null, - "id": 1954, + "id": 2519, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1945, - "src": "1340:1:9", + "referencedDeclaration": 2510, + "src": "1340:1:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "1335:6:9", + "src": "1335:6:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -5933,18 +5933,18 @@ "typeString": "bool" } ], - "id": 1952, + "id": 2517, "name": "assert", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 5182, - "src": "1328:6:9", + "referencedDeclaration": 8172, + "src": "1328:6:12", "typeDescriptions": { "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, - "id": 1956, + "id": 2521, "isConstant": false, "isLValue": false, "isPure": false, @@ -5952,15 +5952,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "1328:14:9", + "src": "1328:14:12", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 1957, + "id": 2522, "nodeType": "ExpressionStatement", - "src": "1328:14:9" + "src": "1328:14:12" }, { "expression": { @@ -5969,19 +5969,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 1960, + "id": 2525, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 1958, + "id": 2523, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1945, - "src": "1359:1:9", + "referencedDeclaration": 2510, + "src": "1359:1:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5991,32 +5991,32 @@ "operator": "-", "rightExpression": { "argumentTypes": null, - "id": 1959, + "id": 2524, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1947, - "src": "1363:1:9", + "referencedDeclaration": 2512, + "src": "1363:1:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "1359:5:9", + "src": "1359:5:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "functionReturnParameters": 1951, - "id": 1961, + "functionReturnParameters": 2516, + "id": 2526, "nodeType": "Return", - "src": "1352:12:9" + "src": "1352:12:12" } ] }, "documentation": null, - "id": 1963, + "id": 2528, "implemented": true, "isConstructor": false, "isDeclaredConst": true, @@ -6024,16 +6024,16 @@ "name": "subtract", "nodeType": "FunctionDefinition", "parameters": { - "id": 1948, + "id": 2513, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1945, + "id": 2510, "name": "a", "nodeType": "VariableDeclaration", - "scope": 1963, - "src": "1264:9:9", + "scope": 2528, + "src": "1264:9:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -6041,10 +6041,10 @@ "typeString": "uint256" }, "typeName": { - "id": 1944, + "id": 2509, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1264:7:9", + "src": "1264:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6055,11 +6055,11 @@ }, { "constant": false, - "id": 1947, + "id": 2512, "name": "b", "nodeType": "VariableDeclaration", - "scope": 1963, - "src": "1275:9:9", + "scope": 2528, + "src": "1275:9:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -6067,10 +6067,10 @@ "typeString": "uint256" }, "typeName": { - "id": 1946, + "id": 2511, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1275:7:9", + "src": "1275:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6080,20 +6080,20 @@ "visibility": "internal" } ], - "src": "1263:22:9" + "src": "1263:22:12" }, "payable": false, "returnParameters": { - "id": 1951, + "id": 2516, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1950, + "id": 2515, "name": "", "nodeType": "VariableDeclaration", - "scope": 1963, - "src": "1309:7:9", + "scope": 2528, + "src": "1309:7:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -6101,10 +6101,10 @@ "typeString": "uint256" }, "typeName": { - "id": 1949, + "id": 2514, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1309:7:9", + "src": "1309:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6114,32 +6114,32 @@ "visibility": "internal" } ], - "src": "1308:9:9" + "src": "1308:9:12" }, - "scope": 2233, - "src": "1246:125:9", + "scope": 2798, + "src": "1246:125:12", "stateMutability": "pure", "superFunction": null, "visibility": "internal" }, { "body": { - "id": 1986, + "id": 2551, "nodeType": "Block", - "src": "1444:76:9", + "src": "1444:76:12", "statements": [ { "assignments": [ - 1973 + 2538 ], "declarations": [ { "constant": false, - "id": 1973, + "id": 2538, "name": "c", "nodeType": "VariableDeclaration", - "scope": 1987, - "src": "1454:9:9", + "scope": 2552, + "src": "1454:9:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -6147,10 +6147,10 @@ "typeString": "uint256" }, "typeName": { - "id": 1972, + "id": 2537, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1454:7:9", + "src": "1454:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6160,26 +6160,26 @@ "visibility": "internal" } ], - "id": 1977, + "id": 2542, "initialValue": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 1976, + "id": 2541, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 1974, + "id": 2539, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1965, - "src": "1466:1:9", + "referencedDeclaration": 2530, + "src": "1466:1:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6189,25 +6189,25 @@ "operator": "+", "rightExpression": { "argumentTypes": null, - "id": 1975, + "id": 2540, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1967, - "src": "1470:1:9", + "referencedDeclaration": 2532, + "src": "1470:1:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "1466:5:9", + "src": "1466:5:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", - "src": "1454:17:9" + "src": "1454:17:12" }, { "expression": { @@ -6219,19 +6219,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 1981, + "id": 2546, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 1979, + "id": 2544, "name": "c", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1973, - "src": "1488:1:9", + "referencedDeclaration": 2538, + "src": "1488:1:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6241,18 +6241,18 @@ "operator": ">=", "rightExpression": { "argumentTypes": null, - "id": 1980, + "id": 2545, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1965, - "src": "1493:1:9", + "referencedDeclaration": 2530, + "src": "1493:1:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "1488:6:9", + "src": "1488:6:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -6266,18 +6266,18 @@ "typeString": "bool" } ], - "id": 1978, + "id": 2543, "name": "assert", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 5182, - "src": "1481:6:9", + "referencedDeclaration": 8172, + "src": "1481:6:12", "typeDescriptions": { "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, - "id": 1982, + "id": 2547, "isConstant": false, "isLValue": false, "isPure": false, @@ -6285,39 +6285,39 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "1481:14:9", + "src": "1481:14:12", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 1983, + "id": 2548, "nodeType": "ExpressionStatement", - "src": "1481:14:9" + "src": "1481:14:12" }, { "expression": { "argumentTypes": null, - "id": 1984, + "id": 2549, "name": "c", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1973, - "src": "1512:1:9", + "referencedDeclaration": 2538, + "src": "1512:1:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "functionReturnParameters": 1971, - "id": 1985, + "functionReturnParameters": 2536, + "id": 2550, "nodeType": "Return", - "src": "1505:8:9" + "src": "1505:8:12" } ] }, "documentation": null, - "id": 1987, + "id": 2552, "implemented": true, "isConstructor": false, "isDeclaredConst": true, @@ -6325,16 +6325,16 @@ "name": "add", "nodeType": "FunctionDefinition", "parameters": { - "id": 1968, + "id": 2533, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1965, + "id": 2530, "name": "a", "nodeType": "VariableDeclaration", - "scope": 1987, - "src": "1390:9:9", + "scope": 2552, + "src": "1390:9:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -6342,10 +6342,10 @@ "typeString": "uint256" }, "typeName": { - "id": 1964, + "id": 2529, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1390:7:9", + "src": "1390:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6356,11 +6356,11 @@ }, { "constant": false, - "id": 1967, + "id": 2532, "name": "b", "nodeType": "VariableDeclaration", - "scope": 1987, - "src": "1401:9:9", + "scope": 2552, + "src": "1401:9:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -6368,10 +6368,10 @@ "typeString": "uint256" }, "typeName": { - "id": 1966, + "id": 2531, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1401:7:9", + "src": "1401:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6381,20 +6381,20 @@ "visibility": "internal" } ], - "src": "1389:22:9" + "src": "1389:22:12" }, "payable": false, "returnParameters": { - "id": 1971, + "id": 2536, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1970, + "id": 2535, "name": "", "nodeType": "VariableDeclaration", - "scope": 1987, - "src": "1435:7:9", + "scope": 2552, + "src": "1435:7:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -6402,10 +6402,10 @@ "typeString": "uint256" }, "typeName": { - "id": 1969, + "id": 2534, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1435:7:9", + "src": "1435:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6415,32 +6415,32 @@ "visibility": "internal" } ], - "src": "1434:9:9" + "src": "1434:9:12" }, - "scope": 2233, - "src": "1377:143:9", + "scope": 2798, + "src": "1377:143:12", "stateMutability": "pure", "superFunction": null, "visibility": "internal" }, { "body": { - "id": 2035, + "id": 2600, "nodeType": "Block", - "src": "1737:445:9", + "src": "1737:445:12", "statements": [ { "assignments": [ - 1997 + 2562 ], "declarations": [ { "constant": false, - "id": 1997, + "id": 2562, "name": "c", "nodeType": "VariableDeclaration", - "scope": 2036, - "src": "1747:8:9", + "scope": 2601, + "src": "1747:8:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -6448,10 +6448,10 @@ "typeString": "int256" }, "typeName": { - "id": 1996, + "id": 2561, "name": "int256", "nodeType": "ElementaryTypeName", - "src": "1747:6:9", + "src": "1747:6:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -6461,26 +6461,26 @@ "visibility": "internal" } ], - "id": 2001, + "id": 2566, "initialValue": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_int256", "typeString": "int256" }, - "id": 2000, + "id": 2565, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 1998, + "id": 2563, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1989, - "src": "1758:1:9", + "referencedDeclaration": 2554, + "src": "1758:1:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -6490,30 +6490,30 @@ "operator": "+", "rightExpression": { "argumentTypes": null, - "id": 1999, + "id": 2564, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1991, - "src": "1762:1:9", + "referencedDeclaration": 2556, + "src": "1762:1:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, - "src": "1758:5:9", + "src": "1758:5:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, "nodeType": "VariableDeclarationStatement", - "src": "1747:16:9" + "src": "1747:16:12" }, { "condition": { "argumentTypes": null, - "id": 2006, + "id": 2571, "isConstant": false, "isLValue": false, "isPure": false, @@ -6521,18 +6521,18 @@ "nodeType": "UnaryOperation", "operator": "!", "prefix": true, - "src": "1777:17:9", + "src": "1777:17:12", "subExpression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, - "id": 2003, + "id": 2568, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1989, - "src": "1789:1:9", + "referencedDeclaration": 2554, + "src": "1789:1:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -6540,12 +6540,12 @@ }, { "argumentTypes": null, - "id": 2004, + "id": 2569, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1991, - "src": "1792:1:9", + "referencedDeclaration": 2556, + "src": "1792:1:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -6563,18 +6563,18 @@ "typeString": "int256" } ], - "id": 2002, + "id": 2567, "name": "isSameSign", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2098, - "src": "1778:10:9", + "referencedDeclaration": 2663, + "src": "1778:10:12", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_bool_$", "typeString": "function (int256,int256) pure returns (bool)" } }, - "id": 2005, + "id": 2570, "isConstant": false, "isLValue": false, "isPure": false, @@ -6582,7 +6582,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "1778:16:9", + "src": "1778:16:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -6594,32 +6594,32 @@ } }, "falseBody": null, - "id": 2010, + "id": 2575, "nodeType": "IfStatement", - "src": "1773:126:9", + "src": "1773:126:12", "trueBody": { - "id": 2009, + "id": 2574, "nodeType": "Block", - "src": "1796:103:9", + "src": "1796:103:12", "statements": [ { "expression": { "argumentTypes": null, - "id": 2007, + "id": 2572, "name": "c", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1997, - "src": "1887:1:9", + "referencedDeclaration": 2562, + "src": "1887:1:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, - "functionReturnParameters": 1995, - "id": 2008, + "functionReturnParameters": 2560, + "id": 2573, "nodeType": "Return", - "src": "1880:8:9" + "src": "1880:8:12" } ] } @@ -6631,19 +6631,19 @@ "typeIdentifier": "t_int256", "typeString": "int256" }, - "id": 2013, + "id": 2578, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 2011, + "id": 2576, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1989, - "src": "1913:1:9", + "referencedDeclaration": 2554, + "src": "1913:1:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -6654,14 +6654,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "30", - "id": 2012, + "id": 2577, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "1918:1:9", + "src": "1918:1:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -6669,16 +6669,16 @@ }, "value": "0" }, - "src": "1913:6:9", + "src": "1913:6:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": { - "id": 2031, + "id": 2596, "nodeType": "Block", - "src": "2041:117:9", + "src": "2041:117:12", "statements": [ { "expression": { @@ -6690,19 +6690,19 @@ "typeIdentifier": "t_int256", "typeString": "int256" }, - "id": 2028, + "id": 2593, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 2024, + "id": 2589, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1991, - "src": "2127:1:9", + "referencedDeclaration": 2556, + "src": "2127:1:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -6716,19 +6716,19 @@ "typeIdentifier": "t_int256", "typeString": "int256" }, - "id": 2027, + "id": 2592, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 2025, + "id": 2590, "name": "INT256_MIN", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1882, - "src": "2132:10:9", + "referencedDeclaration": 2447, + "src": "2132:10:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -6738,24 +6738,24 @@ "operator": "-", "rightExpression": { "argumentTypes": null, - "id": 2026, + "id": 2591, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1989, - "src": "2145:1:9", + "referencedDeclaration": 2554, + "src": "2145:1:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, - "src": "2132:14:9", + "src": "2132:14:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, - "src": "2127:19:9", + "src": "2127:19:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -6769,18 +6769,18 @@ "typeString": "bool" } ], - "id": 2023, + "id": 2588, "name": "assert", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 5182, - "src": "2120:6:9", + "referencedDeclaration": 8172, + "src": "2120:6:12", "typeDescriptions": { "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, - "id": 2029, + "id": 2594, "isConstant": false, "isLValue": false, "isPure": false, @@ -6788,25 +6788,25 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "2120:27:9", + "src": "2120:27:12", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 2030, + "id": 2595, "nodeType": "ExpressionStatement", - "src": "2120:27:9" + "src": "2120:27:12" } ] }, - "id": 2032, + "id": 2597, "nodeType": "IfStatement", - "src": "1909:249:9", + "src": "1909:249:12", "trueBody": { - "id": 2022, + "id": 2587, "nodeType": "Block", - "src": "1921:114:9", + "src": "1921:114:12", "statements": [ { "expression": { @@ -6818,19 +6818,19 @@ "typeIdentifier": "t_int256", "typeString": "int256" }, - "id": 2019, + "id": 2584, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 2015, + "id": 2580, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1991, - "src": "2004:1:9", + "referencedDeclaration": 2556, + "src": "2004:1:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -6844,19 +6844,19 @@ "typeIdentifier": "t_int256", "typeString": "int256" }, - "id": 2018, + "id": 2583, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 2016, + "id": 2581, "name": "INT256_MAX", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1894, - "src": "2009:10:9", + "referencedDeclaration": 2459, + "src": "2009:10:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -6866,24 +6866,24 @@ "operator": "-", "rightExpression": { "argumentTypes": null, - "id": 2017, + "id": 2582, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1989, - "src": "2022:1:9", + "referencedDeclaration": 2554, + "src": "2022:1:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, - "src": "2009:14:9", + "src": "2009:14:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, - "src": "2004:19:9", + "src": "2004:19:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -6897,18 +6897,18 @@ "typeString": "bool" } ], - "id": 2014, + "id": 2579, "name": "assert", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 5182, - "src": "1997:6:9", + "referencedDeclaration": 8172, + "src": "1997:6:12", "typeDescriptions": { "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, - "id": 2020, + "id": 2585, "isConstant": false, "isLValue": false, "isPure": false, @@ -6916,15 +6916,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "1997:27:9", + "src": "1997:27:12", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 2021, + "id": 2586, "nodeType": "ExpressionStatement", - "src": "1997:27:9" + "src": "1997:27:12" } ] } @@ -6932,26 +6932,26 @@ { "expression": { "argumentTypes": null, - "id": 2033, + "id": 2598, "name": "c", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1997, - "src": "2174:1:9", + "referencedDeclaration": 2562, + "src": "2174:1:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, - "functionReturnParameters": 1995, - "id": 2034, + "functionReturnParameters": 2560, + "id": 2599, "nodeType": "Return", - "src": "2167:8:9" + "src": "2167:8:12" } ] }, "documentation": "@notice safely adds two signed integers ensuring that no wrap occurs\n @param a value to add b to\n @param b value to add to a", - "id": 2036, + "id": 2601, "implemented": true, "isConstructor": false, "isDeclaredConst": true, @@ -6959,16 +6959,16 @@ "name": "add", "nodeType": "FunctionDefinition", "parameters": { - "id": 1992, + "id": 2557, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1989, + "id": 2554, "name": "a", "nodeType": "VariableDeclaration", - "scope": 2036, - "src": "1686:8:9", + "scope": 2601, + "src": "1686:8:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -6976,10 +6976,10 @@ "typeString": "int256" }, "typeName": { - "id": 1988, + "id": 2553, "name": "int256", "nodeType": "ElementaryTypeName", - "src": "1686:6:9", + "src": "1686:6:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -6990,11 +6990,11 @@ }, { "constant": false, - "id": 1991, + "id": 2556, "name": "b", "nodeType": "VariableDeclaration", - "scope": 2036, - "src": "1696:8:9", + "scope": 2601, + "src": "1696:8:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -7002,10 +7002,10 @@ "typeString": "int256" }, "typeName": { - "id": 1990, + "id": 2555, "name": "int256", "nodeType": "ElementaryTypeName", - "src": "1696:6:9", + "src": "1696:6:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -7015,20 +7015,20 @@ "visibility": "internal" } ], - "src": "1685:20:9" + "src": "1685:20:12" }, "payable": false, "returnParameters": { - "id": 1995, + "id": 2560, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1994, + "id": 2559, "name": "", "nodeType": "VariableDeclaration", - "scope": 2036, - "src": "1729:6:9", + "scope": 2601, + "src": "1729:6:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -7036,10 +7036,10 @@ "typeString": "int256" }, "typeName": { - "id": 1993, + "id": 2558, "name": "int256", "nodeType": "ElementaryTypeName", - "src": "1729:6:9", + "src": "1729:6:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -7049,19 +7049,19 @@ "visibility": "internal" } ], - "src": "1728:8:9" + "src": "1728:8:12" }, - "scope": 2233, - "src": "1673:509:9", + "scope": 2798, + "src": "1673:509:12", "stateMutability": "pure", "superFunction": null, "visibility": "internal" }, { "body": { - "id": 2051, + "id": 2616, "nodeType": "Block", - "src": "2423:53:9", + "src": "2423:53:12", "statements": [ { "expression": { @@ -7069,12 +7069,12 @@ "arguments": [ { "argumentTypes": null, - "id": 2046, + "id": 2611, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2038, - "src": "2444:1:9", + "referencedDeclaration": 2603, + "src": "2444:1:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -7082,7 +7082,7 @@ }, { "argumentTypes": null, - "id": 2048, + "id": 2613, "isConstant": false, "isLValue": false, "isPure": false, @@ -7090,15 +7090,15 @@ "nodeType": "UnaryOperation", "operator": "-", "prefix": true, - "src": "2447:2:9", + "src": "2447:2:12", "subExpression": { "argumentTypes": null, - "id": 2047, + "id": 2612, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2040, - "src": "2448:1:9", + "referencedDeclaration": 2605, + "src": "2448:1:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -7121,21 +7121,21 @@ "typeString": "int256" } ], - "id": 2045, + "id": 2610, "name": "add", "nodeType": "Identifier", "overloadedDeclarations": [ - 1987, - 2036 + 2552, + 2601 ], - "referencedDeclaration": 2036, - "src": "2440:3:9", + "referencedDeclaration": 2601, + "src": "2440:3:12", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_int256_$", "typeString": "function (int256,int256) pure returns (int256)" } }, - "id": 2049, + "id": 2614, "isConstant": false, "isLValue": false, "isPure": false, @@ -7143,21 +7143,21 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "2440:10:9", + "src": "2440:10:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, - "functionReturnParameters": 2044, - "id": 2050, + "functionReturnParameters": 2609, + "id": 2615, "nodeType": "Return", - "src": "2433:17:9" + "src": "2433:17:12" } ] }, "documentation": "@notice safely subtracts two signed integers ensuring that no wrap occurs\n @param a value to subtract b from\n @param b value to subtract from a", - "id": 2052, + "id": 2617, "implemented": true, "isConstructor": false, "isDeclaredConst": true, @@ -7165,16 +7165,16 @@ "name": "subtract", "nodeType": "FunctionDefinition", "parameters": { - "id": 2041, + "id": 2606, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2038, + "id": 2603, "name": "a", "nodeType": "VariableDeclaration", - "scope": 2052, - "src": "2372:8:9", + "scope": 2617, + "src": "2372:8:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -7182,10 +7182,10 @@ "typeString": "int256" }, "typeName": { - "id": 2037, + "id": 2602, "name": "int256", "nodeType": "ElementaryTypeName", - "src": "2372:6:9", + "src": "2372:6:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -7196,11 +7196,11 @@ }, { "constant": false, - "id": 2040, + "id": 2605, "name": "b", "nodeType": "VariableDeclaration", - "scope": 2052, - "src": "2382:8:9", + "scope": 2617, + "src": "2382:8:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -7208,10 +7208,10 @@ "typeString": "int256" }, "typeName": { - "id": 2039, + "id": 2604, "name": "int256", "nodeType": "ElementaryTypeName", - "src": "2382:6:9", + "src": "2382:6:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -7221,20 +7221,20 @@ "visibility": "internal" } ], - "src": "2371:20:9" + "src": "2371:20:12" }, "payable": false, "returnParameters": { - "id": 2044, + "id": 2609, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2043, + "id": 2608, "name": "", "nodeType": "VariableDeclaration", - "scope": 2052, - "src": "2415:6:9", + "scope": 2617, + "src": "2415:6:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -7242,10 +7242,10 @@ "typeString": "int256" }, "typeName": { - "id": 2042, + "id": 2607, "name": "int256", "nodeType": "ElementaryTypeName", - "src": "2415:6:9", + "src": "2415:6:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -7255,19 +7255,19 @@ "visibility": "internal" } ], - "src": "2414:8:9" + "src": "2414:8:12" }, - "scope": 2233, - "src": "2354:122:9", + "scope": 2798, + "src": "2354:122:12", "stateMutability": "pure", "superFunction": null, "visibility": "internal" }, { "body": { - "id": 2076, + "id": 2641, "nodeType": "Block", - "src": "2638:129:9", + "src": "2638:129:12", "statements": [ { "condition": { @@ -7276,19 +7276,19 @@ "typeIdentifier": "t_int256", "typeString": "int256" }, - "id": 2061, + "id": 2626, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 2059, + "id": 2624, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2054, - "src": "2652:1:9", + "referencedDeclaration": 2619, + "src": "2652:1:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -7299,14 +7299,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "30", - "id": 2060, + "id": 2625, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "2656:1:9", + "src": "2656:1:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -7314,7 +7314,7 @@ }, "value": "0" }, - "src": "2652:5:9", + "src": "2652:5:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -7327,19 +7327,19 @@ "typeIdentifier": "t_int256", "typeString": "int256" }, - "id": 2067, + "id": 2632, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 2065, + "id": 2630, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2054, - "src": "2702:1:9", + "referencedDeclaration": 2619, + "src": "2702:1:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -7350,14 +7350,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "30", - "id": 2066, + "id": 2631, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "2706:1:9", + "src": "2706:1:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -7365,25 +7365,25 @@ }, "value": "0" }, - "src": "2702:5:9", + "src": "2702:5:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, - "id": 2072, + "id": 2637, "nodeType": "IfStatement", - "src": "2698:45:9", + "src": "2698:45:12", "trueBody": { - "id": 2071, + "id": 2636, "nodeType": "Block", - "src": "2709:34:9", + "src": "2709:34:12", "statements": [ { "expression": { "argumentTypes": null, - "id": 2069, + "id": 2634, "isConstant": false, "isLValue": false, "isPure": true, @@ -7391,18 +7391,18 @@ "nodeType": "UnaryOperation", "operator": "-", "prefix": true, - "src": "2730:2:9", + "src": "2730:2:12", "subExpression": { "argumentTypes": null, "hexValue": "31", - "id": 2068, + "id": 2633, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "2731:1:9", + "src": "2731:1:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", @@ -7415,34 +7415,34 @@ "typeString": "int_const -1" } }, - "functionReturnParameters": 2058, - "id": 2070, + "functionReturnParameters": 2623, + "id": 2635, "nodeType": "Return", - "src": "2723:9:9" + "src": "2723:9:12" } ] } }, - "id": 2073, + "id": 2638, "nodeType": "IfStatement", - "src": "2648:95:9", + "src": "2648:95:12", "trueBody": { - "id": 2064, + "id": 2629, "nodeType": "Block", - "src": "2659:33:9", + "src": "2659:33:12", "statements": [ { "expression": { "argumentTypes": null, "hexValue": "31", - "id": 2062, + "id": 2627, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "2680:1:9", + "src": "2680:1:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", @@ -7450,10 +7450,10 @@ }, "value": "1" }, - "functionReturnParameters": 2058, - "id": 2063, + "functionReturnParameters": 2623, + "id": 2628, "nodeType": "Return", - "src": "2673:8:9" + "src": "2673:8:12" } ] } @@ -7462,14 +7462,14 @@ "expression": { "argumentTypes": null, "hexValue": "30", - "id": 2074, + "id": 2639, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "2759:1:9", + "src": "2759:1:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -7477,15 +7477,15 @@ }, "value": "0" }, - "functionReturnParameters": 2058, - "id": 2075, + "functionReturnParameters": 2623, + "id": 2640, "nodeType": "Return", - "src": "2752:8:9" + "src": "2752:8:12" } ] }, "documentation": "@param a integer to determine sign of\n @return int8 sign of original value, either +1,0,-1", - "id": 2077, + "id": 2642, "implemented": true, "isConstructor": false, "isDeclaredConst": true, @@ -7493,16 +7493,16 @@ "name": "sign", "nodeType": "FunctionDefinition", "parameters": { - "id": 2055, + "id": 2620, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2054, + "id": 2619, "name": "a", "nodeType": "VariableDeclaration", - "scope": 2077, - "src": "2602:5:9", + "scope": 2642, + "src": "2602:5:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -7510,10 +7510,10 @@ "typeString": "int256" }, "typeName": { - "id": 2053, + "id": 2618, "name": "int", "nodeType": "ElementaryTypeName", - "src": "2602:3:9", + "src": "2602:3:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -7523,20 +7523,20 @@ "visibility": "internal" } ], - "src": "2601:7:9" + "src": "2601:7:12" }, "payable": false, "returnParameters": { - "id": 2058, + "id": 2623, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2057, + "id": 2622, "name": "", "nodeType": "VariableDeclaration", - "scope": 2077, - "src": "2632:4:9", + "scope": 2642, + "src": "2632:4:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -7544,10 +7544,10 @@ "typeString": "int8" }, "typeName": { - "id": 2056, + "id": 2621, "name": "int8", "nodeType": "ElementaryTypeName", - "src": "2632:4:9", + "src": "2632:4:12", "typeDescriptions": { "typeIdentifier": "t_int8", "typeString": "int8" @@ -7557,19 +7557,19 @@ "visibility": "internal" } ], - "src": "2631:6:9" + "src": "2631:6:12" }, - "scope": 2233, - "src": "2588:179:9", + "scope": 2798, + "src": "2588:179:12", "stateMutability": "pure", "superFunction": null, "visibility": "internal" }, { "body": { - "id": 2097, + "id": 2662, "nodeType": "Block", - "src": "2979:46:9", + "src": "2979:46:12", "statements": [ { "expression": { @@ -7581,7 +7581,7 @@ "typeIdentifier": "t_bool", "typeString": "bool" }, - "id": 2094, + "id": 2659, "isConstant": false, "isLValue": false, "isPure": false, @@ -7592,19 +7592,19 @@ "typeIdentifier": "t_int256", "typeString": "int256" }, - "id": 2088, + "id": 2653, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 2086, + "id": 2651, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2079, - "src": "2998:1:9", + "referencedDeclaration": 2644, + "src": "2998:1:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -7614,18 +7614,18 @@ "operator": "==", "rightExpression": { "argumentTypes": null, - "id": 2087, + "id": 2652, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2081, - "src": "3003:1:9", + "referencedDeclaration": 2646, + "src": "3003:1:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, - "src": "2998:6:9", + "src": "2998:6:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -7639,7 +7639,7 @@ "typeIdentifier": "t_int256", "typeString": "int256" }, - "id": 2093, + "id": 2658, "isConstant": false, "isLValue": false, "isPure": false, @@ -7650,19 +7650,19 @@ "typeIdentifier": "t_int256", "typeString": "int256" }, - "id": 2091, + "id": 2656, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 2089, + "id": 2654, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2079, - "src": "3008:1:9", + "referencedDeclaration": 2644, + "src": "3008:1:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -7672,18 +7672,18 @@ "operator": "*", "rightExpression": { "argumentTypes": null, - "id": 2090, + "id": 2655, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2081, - "src": "3012:1:9", + "referencedDeclaration": 2646, + "src": "3012:1:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, - "src": "3008:5:9", + "src": "3008:5:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -7694,14 +7694,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "30", - "id": 2092, + "id": 2657, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "3016:1:9", + "src": "3016:1:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -7709,41 +7709,41 @@ }, "value": "0" }, - "src": "3008:9:9", + "src": "3008:9:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "src": "2998:19:9", + "src": "2998:19:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } ], - "id": 2095, + "id": 2660, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", - "src": "2996:22:9", + "src": "2996:22:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "functionReturnParameters": 2085, - "id": 2096, + "functionReturnParameters": 2650, + "id": 2661, "nodeType": "Return", - "src": "2989:29:9" + "src": "2989:29:12" } ] }, "documentation": "@param a integer to compare to b\n @param b integer to compare to a\n @return bool true if a and b are the same sign (+/-)", - "id": 2098, + "id": 2663, "implemented": true, "isConstructor": false, "isDeclaredConst": true, @@ -7751,16 +7751,16 @@ "name": "isSameSign", "nodeType": "FunctionDefinition", "parameters": { - "id": 2082, + "id": 2647, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2079, + "id": 2644, "name": "a", "nodeType": "VariableDeclaration", - "scope": 2098, - "src": "2936:5:9", + "scope": 2663, + "src": "2936:5:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -7768,10 +7768,10 @@ "typeString": "int256" }, "typeName": { - "id": 2078, + "id": 2643, "name": "int", "nodeType": "ElementaryTypeName", - "src": "2936:3:9", + "src": "2936:3:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -7782,11 +7782,11 @@ }, { "constant": false, - "id": 2081, + "id": 2646, "name": "b", "nodeType": "VariableDeclaration", - "scope": 2098, - "src": "2943:5:9", + "scope": 2663, + "src": "2943:5:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -7794,10 +7794,10 @@ "typeString": "int256" }, "typeName": { - "id": 2080, + "id": 2645, "name": "int", "nodeType": "ElementaryTypeName", - "src": "2943:3:9", + "src": "2943:3:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -7807,20 +7807,20 @@ "visibility": "internal" } ], - "src": "2935:14:9" + "src": "2935:14:12" }, "payable": false, "returnParameters": { - "id": 2085, + "id": 2650, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2084, + "id": 2649, "name": "", "nodeType": "VariableDeclaration", - "scope": 2098, - "src": "2973:4:9", + "scope": 2663, + "src": "2973:4:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -7828,10 +7828,10 @@ "typeString": "bool" }, "typeName": { - "id": 2083, + "id": 2648, "name": "bool", "nodeType": "ElementaryTypeName", - "src": "2973:4:9", + "src": "2973:4:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -7841,19 +7841,19 @@ "visibility": "internal" } ], - "src": "2972:6:9" + "src": "2972:6:12" }, - "scope": 2233, - "src": "2916:109:9", + "scope": 2798, + "src": "2916:109:12", "stateMutability": "pure", "superFunction": null, "visibility": "internal" }, { "body": { - "id": 2120, + "id": 2685, "nodeType": "Block", - "src": "3194:112:9", + "src": "3194:112:12", "statements": [ { "condition": { @@ -7862,19 +7862,19 @@ "typeIdentifier": "t_int256", "typeString": "int256" }, - "id": 2107, + "id": 2672, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 2105, + "id": 2670, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2100, - "src": "3208:1:9", + "referencedDeclaration": 2665, + "src": "3208:1:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -7885,14 +7885,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "30", - "id": 2106, + "id": 2671, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "3212:1:9", + "src": "3212:1:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -7900,16 +7900,16 @@ }, "value": "0" }, - "src": "3208:5:9", + "src": "3208:5:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": { - "id": 2118, + "id": 2683, "nodeType": "Block", - "src": "3261:39:9", + "src": "3261:39:12", "statements": [ { "expression": { @@ -7917,12 +7917,12 @@ "arguments": [ { "argumentTypes": null, - "id": 2115, + "id": 2680, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2100, - "src": "3287:1:9", + "referencedDeclaration": 2665, + "src": "3287:1:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -7936,20 +7936,20 @@ "typeString": "int256" } ], - "id": 2114, + "id": 2679, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "3282:4:9", + "src": "3282:4:12", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)" }, "typeName": "uint" }, - "id": 2116, + "id": 2681, "isConstant": false, "isLValue": false, "isPure": false, @@ -7957,26 +7957,26 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3282:7:9", + "src": "3282:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "functionReturnParameters": 2104, - "id": 2117, + "functionReturnParameters": 2669, + "id": 2682, "nodeType": "Return", - "src": "3275:14:9" + "src": "3275:14:12" } ] }, - "id": 2119, + "id": 2684, "nodeType": "IfStatement", - "src": "3204:96:9", + "src": "3204:96:12", "trueBody": { - "id": 2113, + "id": 2678, "nodeType": "Block", - "src": "3215:40:9", + "src": "3215:40:12", "statements": [ { "expression": { @@ -7984,7 +7984,7 @@ "arguments": [ { "argumentTypes": null, - "id": 2110, + "id": 2675, "isConstant": false, "isLValue": false, "isPure": false, @@ -7992,15 +7992,15 @@ "nodeType": "UnaryOperation", "operator": "-", "prefix": true, - "src": "3241:2:9", + "src": "3241:2:12", "subExpression": { "argumentTypes": null, - "id": 2109, + "id": 2674, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2100, - "src": "3242:1:9", + "referencedDeclaration": 2665, + "src": "3242:1:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -8019,20 +8019,20 @@ "typeString": "int256" } ], - "id": 2108, + "id": 2673, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "3236:4:9", + "src": "3236:4:12", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)" }, "typeName": "uint" }, - "id": 2111, + "id": 2676, "isConstant": false, "isLValue": false, "isPure": false, @@ -8040,16 +8040,16 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3236:8:9", + "src": "3236:8:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "functionReturnParameters": 2104, - "id": 2112, + "functionReturnParameters": 2669, + "id": 2677, "nodeType": "Return", - "src": "3229:15:9" + "src": "3229:15:12" } ] } @@ -8057,7 +8057,7 @@ ] }, "documentation": "@param a integer to determine absolute value of\n @return uint non signed representation of a", - "id": 2121, + "id": 2686, "implemented": true, "isConstructor": false, "isDeclaredConst": true, @@ -8065,16 +8065,16 @@ "name": "abs", "nodeType": "FunctionDefinition", "parameters": { - "id": 2101, + "id": 2666, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2100, + "id": 2665, "name": "a", "nodeType": "VariableDeclaration", - "scope": 2121, - "src": "3152:8:9", + "scope": 2686, + "src": "3152:8:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -8082,10 +8082,10 @@ "typeString": "int256" }, "typeName": { - "id": 2099, + "id": 2664, "name": "int256", "nodeType": "ElementaryTypeName", - "src": "3152:6:9", + "src": "3152:6:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -8095,20 +8095,20 @@ "visibility": "internal" } ], - "src": "3151:10:9" + "src": "3151:10:12" }, "payable": false, "returnParameters": { - "id": 2104, + "id": 2669, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2103, + "id": 2668, "name": "", "nodeType": "VariableDeclaration", - "scope": 2121, - "src": "3185:7:9", + "scope": 2686, + "src": "3185:7:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -8116,10 +8116,10 @@ "typeString": "uint256" }, "typeName": { - "id": 2102, + "id": 2667, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "3185:7:9", + "src": "3185:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -8129,19 +8129,19 @@ "visibility": "internal" } ], - "src": "3184:9:9" + "src": "3184:9:12" }, - "scope": 2233, - "src": "3139:167:9", + "scope": 2798, + "src": "3139:167:12", "stateMutability": "pure", "superFunction": null, "visibility": "internal" }, { "body": { - "id": 2141, + "id": 2706, "nodeType": "Block", - "src": "3604:48:9", + "src": "3604:48:12", "statements": [ { "expression": { @@ -8152,7 +8152,7 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 2136, + "id": 2701, "isConstant": false, "isLValue": false, "isPure": false, @@ -8162,12 +8162,12 @@ "arguments": [ { "argumentTypes": null, - "id": 2131, + "id": 2696, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2123, - "src": "3625:1:9", + "referencedDeclaration": 2688, + "src": "3625:1:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -8181,18 +8181,18 @@ "typeString": "int256" } ], - "id": 2130, + "id": 2695, "name": "abs", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2121, - "src": "3621:3:9", + "referencedDeclaration": 2686, + "src": "3621:3:12", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_uint256_$", "typeString": "function (int256) pure returns (uint256)" } }, - "id": 2132, + "id": 2697, "isConstant": false, "isLValue": false, "isPure": false, @@ -8200,7 +8200,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3621:6:9", + "src": "3621:6:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -8213,12 +8213,12 @@ "arguments": [ { "argumentTypes": null, - "id": 2134, + "id": 2699, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2125, - "src": "3634:1:9", + "referencedDeclaration": 2690, + "src": "3634:1:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -8232,18 +8232,18 @@ "typeString": "int256" } ], - "id": 2133, + "id": 2698, "name": "abs", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2121, - "src": "3630:3:9", + "referencedDeclaration": 2686, + "src": "3630:3:12", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_uint256_$", "typeString": "function (int256) pure returns (uint256)" } }, - "id": 2135, + "id": 2700, "isConstant": false, "isLValue": false, "isPure": false, @@ -8251,13 +8251,13 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3630:6:9", + "src": "3630:6:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "3621:15:9", + "src": "3621:15:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -8265,32 +8265,32 @@ }, "falseExpression": { "argumentTypes": null, - "id": 2138, + "id": 2703, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2125, - "src": "3644:1:9", + "referencedDeclaration": 2690, + "src": "3644:1:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, - "id": 2139, + "id": 2704, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "Conditional", - "src": "3621:24:9", + "src": "3621:24:12", "trueExpression": { "argumentTypes": null, - "id": 2137, + "id": 2702, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2123, - "src": "3640:1:9", + "referencedDeclaration": 2688, + "src": "3640:1:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -8301,15 +8301,15 @@ "typeString": "int256" } }, - "functionReturnParameters": 2129, - "id": 2140, + "functionReturnParameters": 2694, + "id": 2705, "nodeType": "Return", - "src": "3614:31:9" + "src": "3614:31:12" } ] }, "documentation": "@notice finds the value closer to zero regardless of sign\n @param a integer to compare to b\n @param b integer to compare to a\n @return a if a is closer to zero than b - does not return abs value!", - "id": 2142, + "id": 2707, "implemented": true, "isConstructor": false, "isDeclaredConst": true, @@ -8317,16 +8317,16 @@ "name": "absMin", "nodeType": "FunctionDefinition", "parameters": { - "id": 2126, + "id": 2691, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2123, + "id": 2688, "name": "a", "nodeType": "VariableDeclaration", - "scope": 2142, - "src": "3553:8:9", + "scope": 2707, + "src": "3553:8:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -8334,10 +8334,10 @@ "typeString": "int256" }, "typeName": { - "id": 2122, + "id": 2687, "name": "int256", "nodeType": "ElementaryTypeName", - "src": "3553:6:9", + "src": "3553:6:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -8348,11 +8348,11 @@ }, { "constant": false, - "id": 2125, + "id": 2690, "name": "b", "nodeType": "VariableDeclaration", - "scope": 2142, - "src": "3563:8:9", + "scope": 2707, + "src": "3563:8:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -8360,10 +8360,10 @@ "typeString": "int256" }, "typeName": { - "id": 2124, + "id": 2689, "name": "int256", "nodeType": "ElementaryTypeName", - "src": "3563:6:9", + "src": "3563:6:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -8373,20 +8373,20 @@ "visibility": "internal" } ], - "src": "3552:20:9" + "src": "3552:20:12" }, "payable": false, "returnParameters": { - "id": 2129, + "id": 2694, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2128, + "id": 2693, "name": "", "nodeType": "VariableDeclaration", - "scope": 2142, - "src": "3596:6:9", + "scope": 2707, + "src": "3596:6:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -8394,10 +8394,10 @@ "typeString": "int256" }, "typeName": { - "id": 2127, + "id": 2692, "name": "int256", "nodeType": "ElementaryTypeName", - "src": "3596:6:9", + "src": "3596:6:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -8407,19 +8407,19 @@ "visibility": "internal" } ], - "src": "3595:8:9" + "src": "3595:8:12" }, - "scope": 2233, - "src": "3537:115:9", + "scope": 2798, + "src": "3537:115:12", "stateMutability": "pure", "superFunction": null, "visibility": "internal" }, { "body": { - "id": 2162, + "id": 2727, "nodeType": "Block", - "src": "3954:49:9", + "src": "3954:49:12", "statements": [ { "expression": { @@ -8430,7 +8430,7 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 2157, + "id": 2722, "isConstant": false, "isLValue": false, "isPure": false, @@ -8440,12 +8440,12 @@ "arguments": [ { "argumentTypes": null, - "id": 2152, + "id": 2717, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2144, - "src": "3975:1:9", + "referencedDeclaration": 2709, + "src": "3975:1:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -8459,18 +8459,18 @@ "typeString": "int256" } ], - "id": 2151, + "id": 2716, "name": "abs", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2121, - "src": "3971:3:9", + "referencedDeclaration": 2686, + "src": "3971:3:12", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_uint256_$", "typeString": "function (int256) pure returns (uint256)" } }, - "id": 2153, + "id": 2718, "isConstant": false, "isLValue": false, "isPure": false, @@ -8478,7 +8478,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3971:6:9", + "src": "3971:6:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -8491,12 +8491,12 @@ "arguments": [ { "argumentTypes": null, - "id": 2155, + "id": 2720, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2146, - "src": "3985:1:9", + "referencedDeclaration": 2711, + "src": "3985:1:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -8510,18 +8510,18 @@ "typeString": "int256" } ], - "id": 2154, + "id": 2719, "name": "abs", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2121, - "src": "3981:3:9", + "referencedDeclaration": 2686, + "src": "3981:3:12", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_uint256_$", "typeString": "function (int256) pure returns (uint256)" } }, - "id": 2156, + "id": 2721, "isConstant": false, "isLValue": false, "isPure": false, @@ -8529,13 +8529,13 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3981:6:9", + "src": "3981:6:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "3971:16:9", + "src": "3971:16:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -8543,32 +8543,32 @@ }, "falseExpression": { "argumentTypes": null, - "id": 2159, + "id": 2724, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2146, - "src": "3995:1:9", + "referencedDeclaration": 2711, + "src": "3995:1:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, - "id": 2160, + "id": 2725, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "Conditional", - "src": "3971:25:9", + "src": "3971:25:12", "trueExpression": { "argumentTypes": null, - "id": 2158, + "id": 2723, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2144, - "src": "3991:1:9", + "referencedDeclaration": 2709, + "src": "3991:1:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -8579,15 +8579,15 @@ "typeString": "int256" } }, - "functionReturnParameters": 2150, - "id": 2161, + "functionReturnParameters": 2715, + "id": 2726, "nodeType": "Return", - "src": "3964:32:9" + "src": "3964:32:12" } ] }, "documentation": "@notice finds the value further from zero regardless of sign\n @param a integer to compare to b\n @param b integer to compare to a\n @return a if a is further to zero than b - does not return abs value!", - "id": 2163, + "id": 2728, "implemented": true, "isConstructor": false, "isDeclaredConst": true, @@ -8595,16 +8595,16 @@ "name": "absMax", "nodeType": "FunctionDefinition", "parameters": { - "id": 2147, + "id": 2712, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2144, + "id": 2709, "name": "a", "nodeType": "VariableDeclaration", - "scope": 2163, - "src": "3903:8:9", + "scope": 2728, + "src": "3903:8:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -8612,10 +8612,10 @@ "typeString": "int256" }, "typeName": { - "id": 2143, + "id": 2708, "name": "int256", "nodeType": "ElementaryTypeName", - "src": "3903:6:9", + "src": "3903:6:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -8626,11 +8626,11 @@ }, { "constant": false, - "id": 2146, + "id": 2711, "name": "b", "nodeType": "VariableDeclaration", - "scope": 2163, - "src": "3913:8:9", + "scope": 2728, + "src": "3913:8:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -8638,10 +8638,10 @@ "typeString": "int256" }, "typeName": { - "id": 2145, + "id": 2710, "name": "int256", "nodeType": "ElementaryTypeName", - "src": "3913:6:9", + "src": "3913:6:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -8651,20 +8651,20 @@ "visibility": "internal" } ], - "src": "3902:20:9" + "src": "3902:20:12" }, "payable": false, "returnParameters": { - "id": 2150, + "id": 2715, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2149, + "id": 2714, "name": "", "nodeType": "VariableDeclaration", - "scope": 2163, - "src": "3946:6:9", + "scope": 2728, + "src": "3946:6:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -8672,10 +8672,10 @@ "typeString": "int256" }, "typeName": { - "id": 2148, + "id": 2713, "name": "int256", "nodeType": "ElementaryTypeName", - "src": "3946:6:9", + "src": "3946:6:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -8685,30 +8685,30 @@ "visibility": "internal" } ], - "src": "3945:8:9" + "src": "3945:8:12" }, - "scope": 2233, - "src": "3887:116:9", + "scope": 2798, + "src": "3887:116:12", "stateMutability": "pure", "superFunction": null, "visibility": "internal" }, { "body": { - "id": 2231, + "id": 2796, "nodeType": "Block", - "src": "4655:592:9", + "src": "4655:592:12", "statements": [ { "assignments": [], "declarations": [ { "constant": false, - "id": 2179, + "id": 2744, "name": "maxLoss", "nodeType": "VariableDeclaration", - "scope": 2232, - "src": "4665:12:9", + "scope": 2797, + "src": "4665:12:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -8716,10 +8716,10 @@ "typeString": "uint256" }, "typeName": { - "id": 2178, + "id": 2743, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "4665:4:9", + "src": "4665:4:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -8729,10 +8729,10 @@ "visibility": "internal" } ], - "id": 2180, + "id": 2745, "initialValue": null, "nodeType": "VariableDeclarationStatement", - "src": "4665:12:9" + "src": "4665:12:12" }, { "condition": { @@ -8741,19 +8741,19 @@ "typeIdentifier": "t_int256", "typeString": "int256" }, - "id": 2183, + "id": 2748, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 2181, + "id": 2746, "name": "qty", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2171, - "src": "4691:3:9", + "referencedDeclaration": 2736, + "src": "4691:3:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -8764,14 +8764,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "30", - "id": 2182, + "id": 2747, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "4697:1:9", + "src": "4697:1:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -8779,16 +8779,16 @@ }, "value": "0" }, - "src": "4691:7:9", + "src": "4691:7:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": { - "id": 2219, + "id": 2784, "nodeType": "Block", - "src": "4943:235:9", + "src": "4943:235:12", "statements": [ { "condition": { @@ -8797,19 +8797,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 2204, + "id": 2769, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 2202, + "id": 2767, "name": "price", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2173, - "src": "5031:5:9", + "referencedDeclaration": 2738, + "src": "5031:5:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -8819,44 +8819,44 @@ "operator": ">=", "rightExpression": { "argumentTypes": null, - "id": 2203, + "id": 2768, "name": "priceCap", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2167, - "src": "5040:8:9", + "referencedDeclaration": 2732, + "src": "5040:8:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "5031:17:9", + "src": "5031:17:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": { - "id": 2217, + "id": 2782, "nodeType": "Block", - "src": "5100:68:9", + "src": "5100:68:12", "statements": [ { "expression": { "argumentTypes": null, - "id": 2215, + "id": 2780, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 2210, + "id": 2775, "name": "maxLoss", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2179, - "src": "5118:7:9", + "referencedDeclaration": 2744, + "src": "5118:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -8869,12 +8869,12 @@ "arguments": [ { "argumentTypes": null, - "id": 2212, + "id": 2777, "name": "priceCap", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2167, - "src": "5137:8:9", + "referencedDeclaration": 2732, + "src": "5137:8:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -8882,12 +8882,12 @@ }, { "argumentTypes": null, - "id": 2213, + "id": 2778, "name": "price", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2173, - "src": "5147:5:9", + "referencedDeclaration": 2738, + "src": "5147:5:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -8905,21 +8905,21 @@ "typeString": "uint256" } ], - "id": 2211, + "id": 2776, "name": "subtract", "nodeType": "Identifier", "overloadedDeclarations": [ - 1963, - 2052 + 2528, + 2617 ], - "referencedDeclaration": 1963, - "src": "5128:8:9", + "referencedDeclaration": 2528, + "src": "5128:8:12", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, - "id": 2214, + "id": 2779, "isConstant": false, "isLValue": false, "isPure": false, @@ -8927,48 +8927,48 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "5128:25:9", + "src": "5128:25:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "5118:35:9", + "src": "5118:35:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 2216, + "id": 2781, "nodeType": "ExpressionStatement", - "src": "5118:35:9" + "src": "5118:35:12" } ] }, - "id": 2218, + "id": 2783, "nodeType": "IfStatement", - "src": "5027:141:9", + "src": "5027:141:12", "trueBody": { - "id": 2209, + "id": 2774, "nodeType": "Block", - "src": "5050:44:9", + "src": "5050:44:12", "statements": [ { "expression": { "argumentTypes": null, - "id": 2207, + "id": 2772, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 2205, + "id": 2770, "name": "maxLoss", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2179, - "src": "5068:7:9", + "referencedDeclaration": 2744, + "src": "5068:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -8979,14 +8979,14 @@ "rightHandSide": { "argumentTypes": null, "hexValue": "30", - "id": 2206, + "id": 2771, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "5078:1:9", + "src": "5078:1:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -8994,28 +8994,28 @@ }, "value": "0" }, - "src": "5068:11:9", + "src": "5068:11:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 2208, + "id": 2773, "nodeType": "ExpressionStatement", - "src": "5068:11:9" + "src": "5068:11:12" } ] } } ] }, - "id": 2220, + "id": 2785, "nodeType": "IfStatement", - "src": "4687:491:9", + "src": "4687:491:12", "trueBody": { - "id": 2201, + "id": 2766, "nodeType": "Block", - "src": "4700:237:9", + "src": "4700:237:12", "statements": [ { "condition": { @@ -9024,19 +9024,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 2186, + "id": 2751, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 2184, + "id": 2749, "name": "price", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2173, - "src": "4786:5:9", + "referencedDeclaration": 2738, + "src": "4786:5:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -9046,44 +9046,44 @@ "operator": "<=", "rightExpression": { "argumentTypes": null, - "id": 2185, + "id": 2750, "name": "priceFloor", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2165, - "src": "4795:10:9", + "referencedDeclaration": 2730, + "src": "4795:10:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "4786:19:9", + "src": "4786:19:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": { - "id": 2199, + "id": 2764, "nodeType": "Block", - "src": "4857:70:9", + "src": "4857:70:12", "statements": [ { "expression": { "argumentTypes": null, - "id": 2197, + "id": 2762, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 2192, + "id": 2757, "name": "maxLoss", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2179, - "src": "4875:7:9", + "referencedDeclaration": 2744, + "src": "4875:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -9096,12 +9096,12 @@ "arguments": [ { "argumentTypes": null, - "id": 2194, + "id": 2759, "name": "price", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2173, - "src": "4894:5:9", + "referencedDeclaration": 2738, + "src": "4894:5:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -9109,12 +9109,12 @@ }, { "argumentTypes": null, - "id": 2195, + "id": 2760, "name": "priceFloor", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2165, - "src": "4901:10:9", + "referencedDeclaration": 2730, + "src": "4901:10:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -9132,21 +9132,21 @@ "typeString": "uint256" } ], - "id": 2193, + "id": 2758, "name": "subtract", "nodeType": "Identifier", "overloadedDeclarations": [ - 1963, - 2052 + 2528, + 2617 ], - "referencedDeclaration": 1963, - "src": "4885:8:9", + "referencedDeclaration": 2528, + "src": "4885:8:12", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, - "id": 2196, + "id": 2761, "isConstant": false, "isLValue": false, "isPure": false, @@ -9154,48 +9154,48 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "4885:27:9", + "src": "4885:27:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "4875:37:9", + "src": "4875:37:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 2198, + "id": 2763, "nodeType": "ExpressionStatement", - "src": "4875:37:9" + "src": "4875:37:12" } ] }, - "id": 2200, + "id": 2765, "nodeType": "IfStatement", - "src": "4782:145:9", + "src": "4782:145:12", "trueBody": { - "id": 2191, + "id": 2756, "nodeType": "Block", - "src": "4807:44:9", + "src": "4807:44:12", "statements": [ { "expression": { "argumentTypes": null, - "id": 2189, + "id": 2754, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 2187, + "id": 2752, "name": "maxLoss", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2179, - "src": "4825:7:9", + "referencedDeclaration": 2744, + "src": "4825:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -9206,14 +9206,14 @@ "rightHandSide": { "argumentTypes": null, "hexValue": "30", - "id": 2188, + "id": 2753, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "4835:1:9", + "src": "4835:1:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -9221,15 +9221,15 @@ }, "value": "0" }, - "src": "4825:11:9", + "src": "4825:11:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 2190, + "id": 2755, "nodeType": "ExpressionStatement", - "src": "4825:11:9" + "src": "4825:11:12" } ] } @@ -9240,19 +9240,19 @@ { "expression": { "argumentTypes": null, - "id": 2229, + "id": 2794, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 2221, + "id": 2786, "name": "neededCollateral", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2176, - "src": "5187:16:9", + "referencedDeclaration": 2741, + "src": "5187:16:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -9266,7 +9266,7 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 2228, + "id": 2793, "isConstant": false, "isLValue": false, "isPure": false, @@ -9277,19 +9277,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 2226, + "id": 2791, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 2222, + "id": 2787, "name": "maxLoss", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2179, - "src": "5206:7:9", + "referencedDeclaration": 2744, + "src": "5206:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -9302,12 +9302,12 @@ "arguments": [ { "argumentTypes": null, - "id": 2224, + "id": 2789, "name": "qty", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2171, - "src": "5220:3:9", + "referencedDeclaration": 2736, + "src": "5220:3:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -9321,18 +9321,18 @@ "typeString": "int256" } ], - "id": 2223, + "id": 2788, "name": "abs", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2121, - "src": "5216:3:9", + "referencedDeclaration": 2686, + "src": "5216:3:12", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_uint256_$", "typeString": "function (int256) pure returns (uint256)" } }, - "id": 2225, + "id": 2790, "isConstant": false, "isLValue": false, "isPure": false, @@ -9340,13 +9340,13 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "5216:8:9", + "src": "5216:8:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "5206:18:9", + "src": "5206:18:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -9356,37 +9356,37 @@ "operator": "*", "rightExpression": { "argumentTypes": null, - "id": 2227, + "id": 2792, "name": "qtyMultiplier", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2169, - "src": "5227:13:9", + "referencedDeclaration": 2734, + "src": "5227:13:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "5206:34:9", + "src": "5206:34:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "5187:53:9", + "src": "5187:53:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 2230, + "id": 2795, "nodeType": "ExpressionStatement", - "src": "5187:53:9" + "src": "5187:53:12" } ] }, "documentation": "@notice determines the amount of needed collateral for a given position (qty and price)\n @param priceFloor lowest price the contract is allowed to trade before expiration\n @param priceCap highest price the contract is allowed to trade before expiration\n @param qtyMultiplier multiplier for qty from base units\n @param qty signed integer corresponding to the traded quantity\n @param price of the trade", - "id": 2232, + "id": 2797, "implemented": true, "isConstructor": false, "isDeclaredConst": true, @@ -9394,16 +9394,16 @@ "name": "calculateNeededCollateral", "nodeType": "FunctionDefinition", "parameters": { - "id": 2174, + "id": 2739, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2165, + "id": 2730, "name": "priceFloor", "nodeType": "VariableDeclaration", - "scope": 2232, - "src": "4497:15:9", + "scope": 2797, + "src": "4497:15:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -9411,10 +9411,10 @@ "typeString": "uint256" }, "typeName": { - "id": 2164, + "id": 2729, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "4497:4:9", + "src": "4497:4:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -9425,11 +9425,11 @@ }, { "constant": false, - "id": 2167, + "id": 2732, "name": "priceCap", "nodeType": "VariableDeclaration", - "scope": 2232, - "src": "4522:13:9", + "scope": 2797, + "src": "4522:13:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -9437,10 +9437,10 @@ "typeString": "uint256" }, "typeName": { - "id": 2166, + "id": 2731, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "4522:4:9", + "src": "4522:4:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -9451,11 +9451,11 @@ }, { "constant": false, - "id": 2169, + "id": 2734, "name": "qtyMultiplier", "nodeType": "VariableDeclaration", - "scope": 2232, - "src": "4545:18:9", + "scope": 2797, + "src": "4545:18:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -9463,10 +9463,10 @@ "typeString": "uint256" }, "typeName": { - "id": 2168, + "id": 2733, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "4545:4:9", + "src": "4545:4:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -9477,11 +9477,11 @@ }, { "constant": false, - "id": 2171, + "id": 2736, "name": "qty", "nodeType": "VariableDeclaration", - "scope": 2232, - "src": "4573:7:9", + "scope": 2797, + "src": "4573:7:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -9489,10 +9489,10 @@ "typeString": "int256" }, "typeName": { - "id": 2170, + "id": 2735, "name": "int", "nodeType": "ElementaryTypeName", - "src": "4573:3:9", + "src": "4573:3:12", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -9503,11 +9503,11 @@ }, { "constant": false, - "id": 2173, + "id": 2738, "name": "price", "nodeType": "VariableDeclaration", - "scope": 2232, - "src": "4590:10:9", + "scope": 2797, + "src": "4590:10:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -9515,10 +9515,10 @@ "typeString": "uint256" }, "typeName": { - "id": 2172, + "id": 2737, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "4590:4:9", + "src": "4590:4:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -9528,20 +9528,20 @@ "visibility": "internal" } ], - "src": "4487:119:9" + "src": "4487:119:12" }, "payable": false, "returnParameters": { - "id": 2177, + "id": 2742, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2176, + "id": 2741, "name": "neededCollateral", "nodeType": "VariableDeclaration", - "scope": 2232, - "src": "4628:21:9", + "scope": 2797, + "src": "4628:21:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -9549,10 +9549,10 @@ "typeString": "uint256" }, "typeName": { - "id": 2175, + "id": 2740, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "4628:4:9", + "src": "4628:4:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -9562,20 +9562,20 @@ "visibility": "internal" } ], - "src": "4627:23:9" + "src": "4627:23:12" }, - "scope": 2233, - "src": "4453:794:9", + "scope": 2798, + "src": "4453:794:12", "stateMutability": "pure", "superFunction": null, "visibility": "public" } ], - "scope": 2234, - "src": "718:4531:9" + "scope": 2799, + "src": "718:4531:12" } ], - "src": "607:4643:9" + "src": "607:4643:12" }, "compiler": { "name": "solc", @@ -9585,10 +9585,10 @@ "4": { "events": {}, "links": {}, - "address": "0x584d7639dc6cb3a9ada67e8d7c7bbb8efa87909a", - "transactionHash": "0xff007982e17c807e3d479fe196ab2495c6f93cb06604a1ded686c81742db4aa3" + "address": "0x063574399f3f73d3b23006b1403a57cfbbabc10d", + "transactionHash": "0xd8a45ae7abba29ebbf2b38d12f36ac389119d86fc5129f82239fdba7047b0eb9" } }, "schemaVersion": "2.0.1", - "updatedAt": "2018-10-05T14:03:26.607Z" + "updatedAt": "2018-10-16T03:15:00.580Z" } \ No newline at end of file diff --git a/build/contracts/Migrations.json b/build/contracts/Migrations.json index 467ca77..8cc9041 100644 --- a/build/contracts/Migrations.json +++ b/build/contracts/Migrations.json @@ -1378,10 +1378,10 @@ "4": { "events": {}, "links": {}, - "address": "0x1e1485f7327183fccfc3138afd965c23c78f9050", - "transactionHash": "0xd3f5fa596159a60bbc043c7a3e02c22bfbd28067def6c92818585e9e905e099d" + "address": "0x70c7d18816575bb0a85d53dffec3f30749e0b65f", + "transactionHash": "0xa99f956eba07dbe95ec6661f56c18d52f43dff399ec71bad43f4b57190117360" } }, "schemaVersion": "2.0.1", - "updatedAt": "2018-10-05T14:03:26.626Z" + "updatedAt": "2018-10-16T03:15:00.647Z" } \ No newline at end of file diff --git a/build/contracts/OrderLib.json b/build/contracts/OrderLib.json index 3670b43..9412ebc 100644 --- a/build/contracts/OrderLib.json +++ b/build/contracts/OrderLib.json @@ -4,13 +4,9 @@ { "constant": true, "inputs": [ - { - "name": "contractAddress", - "type": "address" - }, { "name": "orderAddresses", - "type": "address[3]" + "type": "address[4]" }, { "name": "unsignedOrderValues", @@ -68,24 +64,24 @@ "type": "function" } ], - "bytecode": "0x61059a610030600b82828239805160001a6073146000811461002057610022565bfe5b5030600052607381538281f3007300000000000000000000000000000000000000003014608060405260043610610063576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806336a716da146100685780638163681e14610122575b600080fd5b610104600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080606001906003806020026040519081016040528092919082600360200280828437820191505050505091929192908060a00190600580602002604051908101604052809291908260056020028082843782019150505050509192919290803590602001909291905050506101a7565b60405180826000191660001916815260200191505060405180910390f35b61018d600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035600019169060200190929190803560ff16906020019092919080356000191690602001909291908035600019169060200190929190505050610401565b604051808215151515815260200191505060405180910390f35b6000848460006003811015156101b957fe5b60200201518560016003811015156101cd57fe5b60200201518660026003811015156101e157fe5b60200201518660006005811015156101f557fe5b602002015187600160058110151561020957fe5b602002015188600260058110151561021d57fe5b602002015189600360058110151561023157fe5b60200201518a600460058110151561024557fe5b60200201518a604051602001808b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018781526020018681526020018581526020018481526020018381526020018281526020019a50505050505050505050506040516020818303038152906040526040518082805190602001908083835b6020831015156103ca57805182526020820191506020810190506020830392506103a5565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390209050949350505050565b600060018560405160200180807f19457468657265756d205369676e6564204d6573736167653a0a333200000000815250601c0182600019166000191681526020019150506040516020818303038152906040526040518082805190602001908083835b60208310151561048a5780518252602082019150602081019050602083039250610465565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040518091039020858585604051600081526020016040526040518085600019166000191681526020018460ff1660ff1681526020018360001916600019168152602001826000191660001916815260200194505050505060206040516020810390808403906000865af115801561052b573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff16149050959450505050505600a165627a7a723058206bc9a005fbe3ceb4e0105315103fc4d6402a5543548c0d686a8141a21d330c210029", - "deployedBytecode": "0x7300000000000000000000000000000000000000003014608060405260043610610063576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806336a716da146100685780638163681e14610122575b600080fd5b610104600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080606001906003806020026040519081016040528092919082600360200280828437820191505050505091929192908060a00190600580602002604051908101604052809291908260056020028082843782019150505050509192919290803590602001909291905050506101a7565b60405180826000191660001916815260200191505060405180910390f35b61018d600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035600019169060200190929190803560ff16906020019092919080356000191690602001909291908035600019169060200190929190505050610401565b604051808215151515815260200191505060405180910390f35b6000848460006003811015156101b957fe5b60200201518560016003811015156101cd57fe5b60200201518660026003811015156101e157fe5b60200201518660006005811015156101f557fe5b602002015187600160058110151561020957fe5b602002015188600260058110151561021d57fe5b602002015189600360058110151561023157fe5b60200201518a600460058110151561024557fe5b60200201518a604051602001808b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018781526020018681526020018581526020018481526020018381526020018281526020019a50505050505050505050506040516020818303038152906040526040518082805190602001908083835b6020831015156103ca57805182526020820191506020810190506020830392506103a5565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390209050949350505050565b600060018560405160200180807f19457468657265756d205369676e6564204d6573736167653a0a333200000000815250601c0182600019166000191681526020019150506040516020818303038152906040526040518082805190602001908083835b60208310151561048a5780518252602082019150602081019050602083039250610465565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040518091039020858585604051600081526020016040526040518085600019166000191681526020018460ff1660ff1681526020018360001916600019168152602001826000191660001916815260200194505050505060206040516020810390808403906000865af115801561052b573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff16149050959450505050505600a165627a7a723058206bc9a005fbe3ceb4e0105315103fc4d6402a5543548c0d686a8141a21d330c210029", - "sourceMap": "730:4673:10:-;;132:2:-1;166:7;155:9;146:7;137:37;252:7;246:14;243:1;238:23;232:4;229:33;270:1;265:20;;;;222:63;;265:20;274:9;222:63;;298:9;295:1;288:20;328:4;319:7;311:22;352:7;343;336:24", - "deployedSourceMap": "730:4673:10:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2115:643;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3017:359;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2115:643;2294:7;2381:15;2414:14;2429:1;2414:17;;;;;;;;;;;;;2449:14;2464:1;2449:17;;;;;;;;;;;;;2484:14;2499:1;2484:17;;;;;;;;;;;;;2519:19;2539:1;2519:22;;;;;;;;;;;;;2559:19;2579:1;2559:22;;;;;;;;;;;;;2599:19;2619:1;2599:22;;;;;;;;;;;;;2639:19;2659:1;2639:22;;;;;;;;;;;;;2679:19;2699:1;2679:22;;;;;;;;;;;;;2719:8;2347:394;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;2347:394:10;;;2324:427;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;51:19;36:153;;;182:3;176:10;171:3;164:23;98:2;93:3;89:12;82:19;;123:2;118:3;114:12;107:19;;148:2;143:3;139:12;132:19;;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;2324:427:10;;;;;;;;;;;;;;;;2317:434;;2115:643;;;;;;:::o;3017:359::-;3178:4;3222:147;3308:4;3255:58;;;;;;;;;;;;;;;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;3255:58:10;;;3245:69;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;51:19;36:153;;;182:3;176:10;171:3;164:23;98:2;93:3;89:12;82:19;;123:2;118:3;114:12;107:19;;148:2;143:3;139:12;132:19;;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;3245:69:10;;;;;;;;;;;;;;;;3328:1;3343;3358;3222:147;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3222:147:10;;;;;;;;3205:164;;:13;:164;;;3198:171;;3017:359;;;;;;;:::o", - "source": "/*\n Copyright 2017-2018 Phillip A. Elsasser\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n*/\npragma solidity ^0.4.24;\n\nimport \"./MathLib.sol\";\n\n\n/// @title OrderLib\n/// @author Phil Elsasser \nlibrary OrderLib {\n using MathLib for int;\n\n struct OrderMappings {\n mapping (bytes32 => int) filledOrderQty;\n mapping (bytes32 => int) cancelledOrderQty;\n }\n\n struct Order {\n address maker;\n address taker;\n address feeRecipient;\n uint makerFee;\n uint takerFee;\n uint price;\n uint expirationTimeStamp;\n int qty;\n bytes32 orderHash;\n }\n\n /*\n // PUBLIC METHODS\n */\n\n /// @notice returns the qty that is no longer available to trade for a given order\n /// @param orderHash hash of order to find filled and cancelled qty\n /// @return int quantity that is no longer able to filled from the supplied order hash\n function getQtyFilledOrCancelledFromOrder(\n OrderMappings storage self,\n bytes32 orderHash\n ) internal view returns (int)\n {\n return self.filledOrderQty[orderHash].add(self.cancelledOrderQty[orderHash]);\n }\n\n /// @notice creates the hash for the given order parameters.\n /// @param contractAddress address of the calling contract, orders are unique to each contract\n /// @param orderAddresses array of 3 address. maker, taker, and feeRecipient\n /// @param unsignedOrderValues array of 5 unsigned integers. makerFee, takerFee, price, expirationTimeStamp and salt\n /// @param orderQty signed qty of the original order.\n function createOrderHash(\n address contractAddress,\n address[3] orderAddresses,\n uint[5] unsignedOrderValues,\n int orderQty\n ) public pure returns (bytes32)\n {\n return keccak256(\n abi.encodePacked(\n contractAddress,\n orderAddresses[0],\n orderAddresses[1],\n orderAddresses[2],\n unsignedOrderValues[0],\n unsignedOrderValues[1],\n unsignedOrderValues[2],\n unsignedOrderValues[3],\n unsignedOrderValues[4],\n orderQty\n )\n );\n }\n\n /// @notice confirms hash originated from signer\n /// @param signerAddress - address of order originator\n /// @param hash - original order hash\n /// @param v order signature\n /// @param r order signature\n /// @param s order signature\n function isValidSignature(\n address signerAddress,\n bytes32 hash,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) public pure returns (bool)\n {\n return signerAddress == ecrecover(\n keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n32\", hash)),\n v,\n r,\n s\n );\n }\n\n /*\n // INTERNAL METHODS\n */\n\n /// @dev factory for orders to be created with needed hash.\n /// @param contractAddress address of the calling contract, orders are unique to each contract\n /// @param orderAddresses array of 3 address. maker, taker, and feeRecipient\n /// @param unsignedOrderValues array of 5 unsigned integers. makerFee, takerFee, price, expirationTimeStamp and salt\n /// @param orderQty signed qty of the original order.\n function createOrder(\n address contractAddress,\n address[3] orderAddresses,\n uint[5] unsignedOrderValues,\n int orderQty\n ) internal pure returns (Order order)\n {\n order.maker = orderAddresses[0];\n order.taker = orderAddresses[1];\n order.feeRecipient = orderAddresses[2];\n order.makerFee = unsignedOrderValues[0];\n order.takerFee = unsignedOrderValues[1];\n order.price = unsignedOrderValues[2];\n order.expirationTimeStamp = unsignedOrderValues[3];\n order.qty = orderQty;\n order.orderHash = createOrderHash(\n contractAddress,\n orderAddresses,\n unsignedOrderValues,\n orderQty\n );\n return order;\n }\n\n // @dev increment our filled order mappings to avoid overfill\n // @param self storage struct\n // @param orderHash hashed value for order\n // @param filledQty amount to add to our mapping\n function addFilledQtyToOrder(OrderMappings storage self, bytes32 orderHash, int filledQty) internal {\n self.filledOrderQty[orderHash] = self.filledOrderQty[orderHash].add(filledQty);\n }\n\n // @dev increment our cancelled order mappings\n // @param self storage struct\n // @param orderHash hashed value for order\n // @param cancelledQty amount to add to our mapping\n function addCancelledQtyToOrder(OrderMappings storage self, bytes32 orderHash, int cancelledQty) internal {\n self.cancelledOrderQty[orderHash] = self.cancelledOrderQty[orderHash].add(cancelledQty);\n }\n}\n\n", - "sourcePath": "/home/pelsasser/MARKETProtocol/contracts/libraries/OrderLib.sol", + "bytecode": "0x61058c610030600b82828239805160001a6073146000811461002057610022565bfe5b5030600052607381538281f3007300000000000000000000000000000000000000003014608060405260043610610063576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806328ae33ee146100685780638163681e14610102575b600080fd5b6100e460048036038101908080608001906004806020026040519081016040528092919082600460200280828437820191505050505091929192908060a0019060058060200260405190810160405280929190826005602002808284378201915050505050919291929080359060200190929190505050610187565b60405180826000191660001916815260200191505060405180910390f35b61016d600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035600019169060200190929190803560ff169060200190929190803560001916906020019092919080356000191690602001909291905050506103f3565b604051808215151515815260200191505060405180910390f35b600083600060048110151561019857fe5b60200201518460016004811015156101ac57fe5b60200201518560026004811015156101c057fe5b60200201518660036004811015156101d457fe5b60200201518660006005811015156101e857fe5b60200201518760016005811015156101fc57fe5b602002015188600260058110151561021057fe5b602002015189600360058110151561022457fe5b60200201518a600460058110151561023857fe5b60200201518a604051602001808b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018781526020018681526020018581526020018481526020018381526020018281526020019a50505050505050505050506040516020818303038152906040526040518082805190602001908083835b6020831015156103bd5780518252602082019150602081019050602083039250610398565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051809103902090509392505050565b600060018560405160200180807f19457468657265756d205369676e6564204d6573736167653a0a333200000000815250601c0182600019166000191681526020019150506040516020818303038152906040526040518082805190602001908083835b60208310151561047c5780518252602082019150602081019050602083039250610457565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040518091039020858585604051600081526020016040526040518085600019166000191681526020018460ff1660ff1681526020018360001916600019168152602001826000191660001916815260200194505050505060206040516020810390808403906000865af115801561051d573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff16149050959450505050505600a165627a7a7230582036514760b597c6f49a4434dde4f084e3e82cb70fd7ef9aea419b7041fe3d124d0029", + "deployedBytecode": "0x7300000000000000000000000000000000000000003014608060405260043610610063576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806328ae33ee146100685780638163681e14610102575b600080fd5b6100e460048036038101908080608001906004806020026040519081016040528092919082600460200280828437820191505050505091929192908060a0019060058060200260405190810160405280929190826005602002808284378201915050505050919291929080359060200190929190505050610187565b60405180826000191660001916815260200191505060405180910390f35b61016d600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035600019169060200190929190803560ff169060200190929190803560001916906020019092919080356000191690602001909291905050506103f3565b604051808215151515815260200191505060405180910390f35b600083600060048110151561019857fe5b60200201518460016004811015156101ac57fe5b60200201518560026004811015156101c057fe5b60200201518660036004811015156101d457fe5b60200201518660006005811015156101e857fe5b60200201518760016005811015156101fc57fe5b602002015188600260058110151561021057fe5b602002015189600360058110151561022457fe5b60200201518a600460058110151561023857fe5b60200201518a604051602001808b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018781526020018681526020018581526020018481526020018381526020018281526020019a50505050505050505050506040516020818303038152906040526040518082805190602001908083835b6020831015156103bd5780518252602082019150602081019050602083039250610398565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051809103902090509392505050565b600060018560405160200180807f19457468657265756d205369676e6564204d6573736167653a0a333200000000815250601c0182600019166000191681526020019150506040516020818303038152906040526040518082805190602001908083835b60208310151561047c5780518252602082019150602081019050602083039250610457565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040518091039020858585604051600081526020016040526040518085600019166000191681526020018460ff1660ff1681526020018360001916600019168152602001826000191660001916815260200194505050505060206040516020810390808403906000865af115801561051d573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff16149050959450505050505600a165627a7a7230582036514760b597c6f49a4434dde4f084e3e82cb70fd7ef9aea419b7041fe3d124d0029", + "sourceMap": "730:4524:13:-;;132:2:-1;166:7;155:9;146:7;137:37;252:7;246:14;243:1;238:23;232:4;229:33;270:1;265:20;;;;222:63;;265:20;274:9;222:63;;298:9;295:1;288:20;328:4;319:7;311:22;352:7;343;336:24", + "deployedSourceMap": "730:4524:13:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2078:612;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2949:359;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2078:612;2224:7;2311:14;2326:1;2311:17;;;;;;;;;;;;;2346:14;2361:1;2346:17;;;;;;;;;;;;;2381:14;2396:1;2381:17;;;;;;;;;;;;;2416:14;2431:1;2416:17;;;;;;;;;;;;;2451:19;2471:1;2451:22;;;;;;;;;;;;;2491:19;2511:1;2491:22;;;;;;;;;;;;;2531:19;2551:1;2531:22;;;;;;;;;;;;;2571:19;2591:1;2571:22;;;;;;;;;;;;;2611:19;2631:1;2611:22;;;;;;;;;;;;;2651:8;2277:396;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;2277:396:13;;;2254:429;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;51:19;36:153;;;182:3;176:10;171:3;164:23;98:2;93:3;89:12;82:19;;123:2;118:3;114:12;107:19;;148:2;143:3;139:12;132:19;;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;2254:429:13;;;;;;;;;;;;;;;;2247:436;;2078:612;;;;;:::o;2949:359::-;3110:4;3154:147;3240:4;3187:58;;;;;;;;;;;;;;;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;3187:58:13;;;3177:69;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;51:19;36:153;;;182:3;176:10;171:3;164:23;98:2;93:3;89:12;82:19;;123:2;118:3;114:12;107:19;;148:2;143:3;139:12;132:19;;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;3177:69:13;;;;;;;;;;;;;;;;3260:1;3275;3290;3154:147;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3154:147:13;;;;;;;;3137:164;;:13;:164;;;3130:171;;2949:359;;;;;;;:::o", + "source": "/*\n Copyright 2017-2018 Phillip A. Elsasser\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n*/\npragma solidity ^0.4.24;\n\nimport \"./MathLib.sol\";\n\n\n/// @title OrderLib\n/// @author Phil Elsasser \nlibrary OrderLib {\n using MathLib for int;\n\n struct OrderMappings {\n mapping (bytes32 => int) filledOrderQty;\n mapping (bytes32 => int) cancelledOrderQty;\n }\n\n struct Order {\n address marketContractAddress;\n address maker;\n address taker;\n address feeRecipient;\n uint makerFee;\n uint takerFee;\n uint price;\n uint expirationTimeStamp;\n int qty;\n bytes32 orderHash;\n }\n\n /*\n // PUBLIC METHODS\n */\n\n /// @notice returns the qty that is no longer available to trade for a given order\n /// @param orderHash hash of order to find filled and cancelled qty\n /// @return int quantity that is no longer able to filled from the supplied order hash\n function getQtyFilledOrCancelledFromOrder(\n OrderMappings storage self,\n bytes32 orderHash\n ) internal view returns (int)\n {\n return self.filledOrderQty[orderHash].add(self.cancelledOrderQty[orderHash]);\n }\n\n /// @notice creates the hash for the given order parameters.\n /// @param orderAddresses array of 4 address. marketContractAddress, maker, taker, and feeRecipient\n /// @param unsignedOrderValues array of 5 unsigned integers. makerFee, takerFee, price, expirationTimeStamp and salt\n /// @param orderQty signed qty of the original order.\n function createOrderHash(\n address[4] orderAddresses,\n uint[5] unsignedOrderValues,\n int orderQty\n ) public pure returns (bytes32)\n {\n return keccak256(\n abi.encodePacked(\n orderAddresses[0],\n orderAddresses[1],\n orderAddresses[2],\n orderAddresses[3],\n unsignedOrderValues[0],\n unsignedOrderValues[1],\n unsignedOrderValues[2],\n unsignedOrderValues[3],\n unsignedOrderValues[4],\n orderQty\n )\n );\n }\n\n /// @notice confirms hash originated from signer\n /// @param signerAddress - address of order originator\n /// @param hash - original order hash\n /// @param v order signature\n /// @param r order signature\n /// @param s order signature\n function isValidSignature(\n address signerAddress,\n bytes32 hash,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) public pure returns (bool)\n {\n return signerAddress == ecrecover(\n keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n32\", hash)),\n v,\n r,\n s\n );\n }\n\n /*\n // INTERNAL METHODS\n */\n\n /// @dev factory for orders to be created with needed hash.\n /// @param orderAddresses array of 4 address. marketContractAddress, maker, taker, and feeRecipient\n /// @param unsignedOrderValues array of 5 unsigned integers. makerFee, takerFee, price, expirationTimeStamp and salt\n /// @param orderQty signed qty of the original order.\n function createOrder(\n address[4] orderAddresses,\n uint[5] unsignedOrderValues,\n int orderQty\n ) internal pure returns (Order order)\n {\n order.marketContractAddress = orderAddresses[0];\n order.maker = orderAddresses[1];\n order.taker = orderAddresses[2];\n order.feeRecipient = orderAddresses[3];\n order.makerFee = unsignedOrderValues[0];\n order.takerFee = unsignedOrderValues[1];\n order.price = unsignedOrderValues[2];\n order.expirationTimeStamp = unsignedOrderValues[3];\n order.qty = orderQty;\n order.orderHash = createOrderHash(\n orderAddresses,\n unsignedOrderValues,\n orderQty\n );\n return order;\n }\n\n // @dev increment our filled order mappings to avoid overfill\n // @param self storage struct\n // @param orderHash hashed value for order\n // @param filledQty amount to add to our mapping\n function addFilledQtyToOrder(OrderMappings storage self, bytes32 orderHash, int filledQty) internal {\n self.filledOrderQty[orderHash] = self.filledOrderQty[orderHash].add(filledQty);\n }\n\n // @dev increment our cancelled order mappings\n // @param self storage struct\n // @param orderHash hashed value for order\n // @param cancelledQty amount to add to our mapping\n function addCancelledQtyToOrder(OrderMappings storage self, bytes32 orderHash, int cancelledQty) internal {\n self.cancelledOrderQty[orderHash] = self.cancelledOrderQty[orderHash].add(cancelledQty);\n }\n}\n\n", + "sourcePath": "/home/travis/build/MARKETProtocol/MARKETProtocol/contracts/libraries/OrderLib.sol", "ast": { - "absolutePath": "/home/pelsasser/MARKETProtocol/contracts/libraries/OrderLib.sol", + "absolutePath": "/home/travis/build/MARKETProtocol/MARKETProtocol/contracts/libraries/OrderLib.sol", "exportedSymbols": { "OrderLib": [ - 2511 + 3083 ] }, - "id": 2512, + "id": 3084, "nodeType": "SourceUnit", "nodes": [ { - "id": 2235, + "id": 2800, "literals": [ "solidity", "^", @@ -93,16 +89,16 @@ ".24" ], "nodeType": "PragmaDirective", - "src": "607:24:10" + "src": "607:24:13" }, { - "absolutePath": "/home/pelsasser/MARKETProtocol/contracts/libraries/MathLib.sol", + "absolutePath": "/home/travis/build/MARKETProtocol/MARKETProtocol/contracts/libraries/MathLib.sol", "file": "./MathLib.sol", - "id": 2236, + "id": 2801, "nodeType": "ImportDirective", - "scope": 2512, - "sourceUnit": 2234, - "src": "633:23:10", + "scope": 3084, + "sourceUnit": 2799, + "src": "633:23:13", "symbolAliases": [], "unitAlias": "" }, @@ -112,34 +108,34 @@ "contractKind": "library", "documentation": "@title OrderLib\n @author Phil Elsasser ", "fullyImplemented": true, - "id": 2511, + "id": 3083, "linearizedBaseContracts": [ - 2511 + 3083 ], "name": "OrderLib", "nodeType": "ContractDefinition", "nodes": [ { - "id": 2239, + "id": 2804, "libraryName": { "contractScope": null, - "id": 2237, + "id": 2802, "name": "MathLib", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2233, - "src": "759:7:10", + "referencedDeclaration": 2798, + "src": "759:7:13", "typeDescriptions": { - "typeIdentifier": "t_contract$_MathLib_$2233", + "typeIdentifier": "t_contract$_MathLib_$2798", "typeString": "library MathLib" } }, "nodeType": "UsingForDirective", - "src": "753:22:10", + "src": "753:22:13", "typeName": { - "id": 2238, + "id": 2803, "name": "int", "nodeType": "ElementaryTypeName", - "src": "771:3:10", + "src": "771:3:13", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -148,15 +144,15 @@ }, { "canonicalName": "OrderLib.OrderMappings", - "id": 2248, + "id": 2813, "members": [ { "constant": false, - "id": 2243, + "id": 2808, "name": "filledOrderQty", "nodeType": "VariableDeclaration", - "scope": 2248, - "src": "812:39:10", + "scope": 2813, + "src": "812:39:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -164,28 +160,28 @@ "typeString": "mapping(bytes32 => int256)" }, "typeName": { - "id": 2242, + "id": 2807, "keyType": { - "id": 2240, + "id": 2805, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "821:7:10", + "src": "821:7:13", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "nodeType": "Mapping", - "src": "812:24:10", + "src": "812:24:13", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_int256_$", "typeString": "mapping(bytes32 => int256)" }, "valueType": { - "id": 2241, + "id": 2806, "name": "int", "nodeType": "ElementaryTypeName", - "src": "832:3:10", + "src": "832:3:13", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -197,11 +193,11 @@ }, { "constant": false, - "id": 2247, + "id": 2812, "name": "cancelledOrderQty", "nodeType": "VariableDeclaration", - "scope": 2248, - "src": "861:42:10", + "scope": 2813, + "src": "861:42:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -209,28 +205,28 @@ "typeString": "mapping(bytes32 => int256)" }, "typeName": { - "id": 2246, + "id": 2811, "keyType": { - "id": 2244, + "id": 2809, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "870:7:10", + "src": "870:7:13", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "nodeType": "Mapping", - "src": "861:24:10", + "src": "861:24:13", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_int256_$", "typeString": "mapping(bytes32 => int256)" }, "valueType": { - "id": 2245, + "id": 2810, "name": "int", "nodeType": "ElementaryTypeName", - "src": "881:3:10", + "src": "881:3:13", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -243,21 +239,47 @@ ], "name": "OrderMappings", "nodeType": "StructDefinition", - "scope": 2511, - "src": "781:129:10", + "scope": 3083, + "src": "781:129:13", "visibility": "public" }, { "canonicalName": "OrderLib.Order", - "id": 2267, + "id": 2834, "members": [ { "constant": false, - "id": 2250, + "id": 2815, + "name": "marketContractAddress", + "nodeType": "VariableDeclaration", + "scope": 2834, + "src": "939:29:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2814, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "939:7:13", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2817, "name": "maker", "nodeType": "VariableDeclaration", - "scope": 2267, - "src": "939:13:10", + "scope": 2834, + "src": "978:13:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -265,10 +287,10 @@ "typeString": "address" }, "typeName": { - "id": 2249, + "id": 2816, "name": "address", "nodeType": "ElementaryTypeName", - "src": "939:7:10", + "src": "978:7:13", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -279,11 +301,11 @@ }, { "constant": false, - "id": 2252, + "id": 2819, "name": "taker", "nodeType": "VariableDeclaration", - "scope": 2267, - "src": "962:13:10", + "scope": 2834, + "src": "1001:13:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -291,10 +313,10 @@ "typeString": "address" }, "typeName": { - "id": 2251, + "id": 2818, "name": "address", "nodeType": "ElementaryTypeName", - "src": "962:7:10", + "src": "1001:7:13", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -305,11 +327,11 @@ }, { "constant": false, - "id": 2254, + "id": 2821, "name": "feeRecipient", "nodeType": "VariableDeclaration", - "scope": 2267, - "src": "985:20:10", + "scope": 2834, + "src": "1024:20:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -317,10 +339,10 @@ "typeString": "address" }, "typeName": { - "id": 2253, + "id": 2820, "name": "address", "nodeType": "ElementaryTypeName", - "src": "985:7:10", + "src": "1024:7:13", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -331,11 +353,11 @@ }, { "constant": false, - "id": 2256, + "id": 2823, "name": "makerFee", "nodeType": "VariableDeclaration", - "scope": 2267, - "src": "1015:13:10", + "scope": 2834, + "src": "1054:13:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -343,10 +365,10 @@ "typeString": "uint256" }, "typeName": { - "id": 2255, + "id": 2822, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "1015:4:10", + "src": "1054:4:13", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -357,11 +379,11 @@ }, { "constant": false, - "id": 2258, + "id": 2825, "name": "takerFee", "nodeType": "VariableDeclaration", - "scope": 2267, - "src": "1038:13:10", + "scope": 2834, + "src": "1077:13:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -369,10 +391,10 @@ "typeString": "uint256" }, "typeName": { - "id": 2257, + "id": 2824, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "1038:4:10", + "src": "1077:4:13", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -383,11 +405,11 @@ }, { "constant": false, - "id": 2260, + "id": 2827, "name": "price", "nodeType": "VariableDeclaration", - "scope": 2267, - "src": "1061:10:10", + "scope": 2834, + "src": "1100:10:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -395,10 +417,10 @@ "typeString": "uint256" }, "typeName": { - "id": 2259, + "id": 2826, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "1061:4:10", + "src": "1100:4:13", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -409,11 +431,11 @@ }, { "constant": false, - "id": 2262, + "id": 2829, "name": "expirationTimeStamp", "nodeType": "VariableDeclaration", - "scope": 2267, - "src": "1081:24:10", + "scope": 2834, + "src": "1120:24:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -421,10 +443,10 @@ "typeString": "uint256" }, "typeName": { - "id": 2261, + "id": 2828, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "1081:4:10", + "src": "1120:4:13", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -435,11 +457,11 @@ }, { "constant": false, - "id": 2264, + "id": 2831, "name": "qty", "nodeType": "VariableDeclaration", - "scope": 2267, - "src": "1115:7:10", + "scope": 2834, + "src": "1154:7:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -447,10 +469,10 @@ "typeString": "int256" }, "typeName": { - "id": 2263, + "id": 2830, "name": "int", "nodeType": "ElementaryTypeName", - "src": "1115:3:10", + "src": "1154:3:13", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -461,11 +483,11 @@ }, { "constant": false, - "id": 2266, + "id": 2833, "name": "orderHash", "nodeType": "VariableDeclaration", - "scope": 2267, - "src": "1132:17:10", + "scope": 2834, + "src": "1171:17:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -473,10 +495,10 @@ "typeString": "bytes32" }, "typeName": { - "id": 2265, + "id": 2832, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "1132:7:10", + "src": "1171:7:13", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -488,15 +510,15 @@ ], "name": "Order", "nodeType": "StructDefinition", - "scope": 2511, - "src": "916:240:10", + "scope": 3083, + "src": "916:279:13", "visibility": "public" }, { "body": { - "id": 2287, + "id": 2854, "nodeType": "Block", - "src": "1592:93:10", + "src": "1631:93:13", "statements": [ { "expression": { @@ -508,40 +530,40 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 2281, + "id": 2848, "name": "self", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2269, - "src": "1644:4:10", + "referencedDeclaration": 2836, + "src": "1683:4:13", "typeDescriptions": { - "typeIdentifier": "t_struct$_OrderMappings_$2248_storage_ptr", + "typeIdentifier": "t_struct$_OrderMappings_$2813_storage_ptr", "typeString": "struct OrderLib.OrderMappings storage pointer" } }, - "id": 2282, + "id": 2849, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "cancelledOrderQty", "nodeType": "MemberAccess", - "referencedDeclaration": 2247, - "src": "1644:22:10", + "referencedDeclaration": 2812, + "src": "1683:22:13", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_int256_$", "typeString": "mapping(bytes32 => int256)" } }, - "id": 2284, + "id": 2851, "indexExpression": { "argumentTypes": null, - "id": 2283, + "id": 2850, "name": "orderHash", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2271, - "src": "1667:9:10", + "referencedDeclaration": 2838, + "src": "1706:9:13", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -552,7 +574,7 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "1644:33:10", + "src": "1683:33:13", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -572,40 +594,40 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 2276, + "id": 2843, "name": "self", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2269, - "src": "1609:4:10", + "referencedDeclaration": 2836, + "src": "1648:4:13", "typeDescriptions": { - "typeIdentifier": "t_struct$_OrderMappings_$2248_storage_ptr", + "typeIdentifier": "t_struct$_OrderMappings_$2813_storage_ptr", "typeString": "struct OrderLib.OrderMappings storage pointer" } }, - "id": 2277, + "id": 2844, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "filledOrderQty", "nodeType": "MemberAccess", - "referencedDeclaration": 2243, - "src": "1609:19:10", + "referencedDeclaration": 2808, + "src": "1648:19:13", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_int256_$", "typeString": "mapping(bytes32 => int256)" } }, - "id": 2279, + "id": 2846, "indexExpression": { "argumentTypes": null, - "id": 2278, + "id": 2845, "name": "orderHash", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2271, - "src": "1629:9:10", + "referencedDeclaration": 2838, + "src": "1668:9:13", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -616,27 +638,27 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "1609:30:10", + "src": "1648:30:13", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, - "id": 2280, + "id": 2847, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "add", "nodeType": "MemberAccess", - "referencedDeclaration": 2036, - "src": "1609:34:10", + "referencedDeclaration": 2601, + "src": "1648:34:13", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_int256_$bound_to$_t_int256_$", "typeString": "function (int256,int256) pure returns (int256)" } }, - "id": 2285, + "id": 2852, "isConstant": false, "isLValue": false, "isPure": false, @@ -644,21 +666,21 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "1609:69:10", + "src": "1648:69:13", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, - "functionReturnParameters": 2275, - "id": 2286, + "functionReturnParameters": 2842, + "id": 2853, "nodeType": "Return", - "src": "1602:76:10" + "src": "1641:76:13" } ] }, "documentation": "@notice returns the qty that is no longer available to trade for a given order\n @param orderHash hash of order to find filled and cancelled qty\n @return int quantity that is no longer able to filled from the supplied order hash", - "id": 2288, + "id": 2855, "implemented": true, "isConstructor": false, "isDeclaredConst": true, @@ -666,31 +688,31 @@ "name": "getQtyFilledOrCancelledFromOrder", "nodeType": "FunctionDefinition", "parameters": { - "id": 2272, + "id": 2839, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2269, + "id": 2836, "name": "self", "nodeType": "VariableDeclaration", - "scope": 2288, - "src": "1500:26:10", + "scope": 2855, + "src": "1539:26:13", "stateVariable": false, "storageLocation": "storage", "typeDescriptions": { - "typeIdentifier": "t_struct$_OrderMappings_$2248_storage_ptr", + "typeIdentifier": "t_struct$_OrderMappings_$2813_storage_ptr", "typeString": "struct OrderLib.OrderMappings" }, "typeName": { "contractScope": null, - "id": 2268, + "id": 2835, "name": "OrderMappings", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2248, - "src": "1500:13:10", + "referencedDeclaration": 2813, + "src": "1539:13:13", "typeDescriptions": { - "typeIdentifier": "t_struct$_OrderMappings_$2248_storage_ptr", + "typeIdentifier": "t_struct$_OrderMappings_$2813_storage_ptr", "typeString": "struct OrderLib.OrderMappings" } }, @@ -699,11 +721,11 @@ }, { "constant": false, - "id": 2271, + "id": 2838, "name": "orderHash", "nodeType": "VariableDeclaration", - "scope": 2288, - "src": "1536:17:10", + "scope": 2855, + "src": "1575:17:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -711,10 +733,10 @@ "typeString": "bytes32" }, "typeName": { - "id": 2270, + "id": 2837, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "1536:7:10", + "src": "1575:7:13", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -724,20 +746,20 @@ "visibility": "internal" } ], - "src": "1490:69:10" + "src": "1529:69:13" }, "payable": false, "returnParameters": { - "id": 2275, + "id": 2842, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2274, + "id": 2841, "name": "", "nodeType": "VariableDeclaration", - "scope": 2288, - "src": "1583:3:10", + "scope": 2855, + "src": "1622:3:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -745,10 +767,10 @@ "typeString": "int256" }, "typeName": { - "id": 2273, + "id": 2840, "name": "int", "nodeType": "ElementaryTypeName", - "src": "1583:3:10", + "src": "1622:3:13", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -758,19 +780,19 @@ "visibility": "internal" } ], - "src": "1582:5:10" + "src": "1621:5:13" }, - "scope": 2511, - "src": "1449:236:10", + "scope": 3083, + "src": "1488:236:13", "stateMutability": "view", "superFunction": null, "visibility": "internal" }, { "body": { - "id": 2337, + "id": 2904, "nodeType": "Block", - "src": "2307:451:10", + "src": "2237:453:13", "statements": [ { "expression": { @@ -779,46 +801,33 @@ { "argumentTypes": null, "arguments": [ - { - "argumentTypes": null, - "id": 2308, - "name": "contractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2290, - "src": "2381:15:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, { "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 2309, + "id": 2873, "name": "orderAddresses", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2294, - "src": "2414:14:10", + "referencedDeclaration": 2859, + "src": "2311:14:13", "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$3_memory_ptr", - "typeString": "address[3] memory" + "typeIdentifier": "t_array$_t_address_$4_memory_ptr", + "typeString": "address[4] memory" } }, - "id": 2311, + "id": 2875, "indexExpression": { "argumentTypes": null, "hexValue": "30", - "id": 2310, + "id": 2874, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "2429:1:10", + "src": "2326:1:13", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -831,7 +840,7 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "2414:17:10", + "src": "2311:17:13", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -841,29 +850,29 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 2312, + "id": 2876, "name": "orderAddresses", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2294, - "src": "2449:14:10", + "referencedDeclaration": 2859, + "src": "2346:14:13", "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$3_memory_ptr", - "typeString": "address[3] memory" + "typeIdentifier": "t_array$_t_address_$4_memory_ptr", + "typeString": "address[4] memory" } }, - "id": 2314, + "id": 2878, "indexExpression": { "argumentTypes": null, "hexValue": "31", - "id": 2313, + "id": 2877, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "2464:1:10", + "src": "2361:1:13", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", @@ -876,7 +885,7 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "2449:17:10", + "src": "2346:17:13", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -886,29 +895,29 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 2315, + "id": 2879, "name": "orderAddresses", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2294, - "src": "2484:14:10", + "referencedDeclaration": 2859, + "src": "2381:14:13", "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$3_memory_ptr", - "typeString": "address[3] memory" + "typeIdentifier": "t_array$_t_address_$4_memory_ptr", + "typeString": "address[4] memory" } }, - "id": 2317, + "id": 2881, "indexExpression": { "argumentTypes": null, "hexValue": "32", - "id": 2316, + "id": 2880, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "2499:1:10", + "src": "2396:1:13", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_2_by_1", @@ -921,7 +930,52 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "2484:17:10", + "src": "2381:17:13", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2882, + "name": "orderAddresses", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2859, + "src": "2416:14:13", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$4_memory_ptr", + "typeString": "address[4] memory" + } + }, + "id": 2884, + "indexExpression": { + "argumentTypes": null, + "hexValue": "33", + "id": 2883, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2431:1:13", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2416:17:13", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -931,29 +985,29 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 2318, + "id": 2885, "name": "unsignedOrderValues", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2298, - "src": "2519:19:10", + "referencedDeclaration": 2863, + "src": "2451:19:13", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$5_memory_ptr", "typeString": "uint256[5] memory" } }, - "id": 2320, + "id": 2887, "indexExpression": { "argumentTypes": null, "hexValue": "30", - "id": 2319, + "id": 2886, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "2539:1:10", + "src": "2471:1:13", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -966,7 +1020,7 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "2519:22:10", + "src": "2451:22:13", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -976,29 +1030,29 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 2321, + "id": 2888, "name": "unsignedOrderValues", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2298, - "src": "2559:19:10", + "referencedDeclaration": 2863, + "src": "2491:19:13", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$5_memory_ptr", "typeString": "uint256[5] memory" } }, - "id": 2323, + "id": 2890, "indexExpression": { "argumentTypes": null, "hexValue": "31", - "id": 2322, + "id": 2889, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "2579:1:10", + "src": "2511:1:13", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", @@ -1011,7 +1065,7 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "2559:22:10", + "src": "2491:22:13", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1021,29 +1075,29 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 2324, + "id": 2891, "name": "unsignedOrderValues", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2298, - "src": "2599:19:10", + "referencedDeclaration": 2863, + "src": "2531:19:13", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$5_memory_ptr", "typeString": "uint256[5] memory" } }, - "id": 2326, + "id": 2893, "indexExpression": { "argumentTypes": null, "hexValue": "32", - "id": 2325, + "id": 2892, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "2619:1:10", + "src": "2551:1:13", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_2_by_1", @@ -1056,7 +1110,7 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "2599:22:10", + "src": "2531:22:13", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1066,29 +1120,29 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 2327, + "id": 2894, "name": "unsignedOrderValues", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2298, - "src": "2639:19:10", + "referencedDeclaration": 2863, + "src": "2571:19:13", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$5_memory_ptr", "typeString": "uint256[5] memory" } }, - "id": 2329, + "id": 2896, "indexExpression": { "argumentTypes": null, "hexValue": "33", - "id": 2328, + "id": 2895, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "2659:1:10", + "src": "2591:1:13", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_3_by_1", @@ -1101,7 +1155,7 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "2639:22:10", + "src": "2571:22:13", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1111,29 +1165,29 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 2330, + "id": 2897, "name": "unsignedOrderValues", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2298, - "src": "2679:19:10", + "referencedDeclaration": 2863, + "src": "2611:19:13", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$5_memory_ptr", "typeString": "uint256[5] memory" } }, - "id": 2332, + "id": 2899, "indexExpression": { "argumentTypes": null, "hexValue": "34", - "id": 2331, + "id": 2898, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "2699:1:10", + "src": "2631:1:13", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_4_by_1", @@ -1146,7 +1200,7 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "2679:22:10", + "src": "2611:22:13", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1154,12 +1208,12 @@ }, { "argumentTypes": null, - "id": 2333, + "id": 2900, "name": "orderQty", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2300, - "src": "2719:8:10", + "referencedDeclaration": 2865, + "src": "2651:8:13", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -1211,18 +1265,18 @@ ], "expression": { "argumentTypes": null, - "id": 2306, + "id": 2871, "name": "abi", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 5180, - "src": "2347:3:10", + "referencedDeclaration": 8170, + "src": "2277:3:13", "typeDescriptions": { "typeIdentifier": "t_magic_abi", "typeString": "abi" } }, - "id": 2307, + "id": 2872, "isConstant": false, "isLValue": false, "isPure": true, @@ -1230,13 +1284,13 @@ "memberName": "encodePacked", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "2347:16:10", + "src": "2277:16:13", "typeDescriptions": { "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", "typeString": "function () pure returns (bytes memory)" } }, - "id": 2334, + "id": 2901, "isConstant": false, "isLValue": false, "isPure": false, @@ -1244,7 +1298,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "2347:394:10", + "src": "2277:396:13", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" @@ -1258,18 +1312,18 @@ "typeString": "bytes memory" } ], - "id": 2305, + "id": 2870, "name": "keccak256", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 5187, - "src": "2324:9:10", + "referencedDeclaration": 8177, + "src": "2254:9:13", "typeDescriptions": { "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", "typeString": "function () pure returns (bytes32)" } }, - "id": 2335, + "id": 2902, "isConstant": false, "isLValue": false, "isPure": false, @@ -1277,21 +1331,21 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "2324:427:10", + "src": "2254:429:13", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "functionReturnParameters": 2304, - "id": 2336, + "functionReturnParameters": 2869, + "id": 2903, "nodeType": "Return", - "src": "2317:434:10" + "src": "2247:436:13" } ] }, - "documentation": "@notice creates the hash for the given order parameters.\n @param contractAddress address of the calling contract, orders are unique to each contract\n @param orderAddresses array of 3 address. maker, taker, and feeRecipient\n @param unsignedOrderValues array of 5 unsigned integers. makerFee, takerFee, price, expirationTimeStamp and salt\n @param orderQty signed qty of the original order.", - "id": 2338, + "documentation": "@notice creates the hash for the given order parameters.\n @param orderAddresses array of 4 address. marketContractAddress, maker, taker, and feeRecipient\n @param unsignedOrderValues array of 5 unsigned integers. makerFee, takerFee, price, expirationTimeStamp and salt\n @param orderQty signed qty of the original order.", + "id": 2905, "implemented": true, "isConstructor": false, "isDeclaredConst": true, @@ -1299,83 +1353,57 @@ "name": "createOrderHash", "nodeType": "FunctionDefinition", "parameters": { - "id": 2301, + "id": 2866, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2290, - "name": "contractAddress", - "nodeType": "VariableDeclaration", - "scope": 2338, - "src": "2149:23:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2289, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2149:7:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2294, + "id": 2859, "name": "orderAddresses", "nodeType": "VariableDeclaration", - "scope": 2338, - "src": "2182:25:10", + "scope": 2905, + "src": "2112:25:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$3_memory_ptr", - "typeString": "address[3]" + "typeIdentifier": "t_array$_t_address_$4_memory_ptr", + "typeString": "address[4]" }, "typeName": { "baseType": { - "id": 2291, + "id": 2856, "name": "address", "nodeType": "ElementaryTypeName", - "src": "2182:7:10", + "src": "2112:7:13", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "id": 2293, + "id": 2858, "length": { "argumentTypes": null, - "hexValue": "33", - "id": 2292, + "hexValue": "34", + "id": 2857, "isConstant": false, "isLValue": false, "isPure": false, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "2190:1:10", + "src": "2120:1:13", "subdenomination": null, "typeDescriptions": { "typeIdentifier": null, "typeString": null }, - "value": "3" + "value": "4" }, "nodeType": "ArrayTypeName", - "src": "2182:10:10", + "src": "2112:10:13", "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$3_storage_ptr", - "typeString": "address[3]" + "typeIdentifier": "t_array$_t_address_$4_storage_ptr", + "typeString": "address[4]" } }, "value": null, @@ -1383,11 +1411,11 @@ }, { "constant": false, - "id": 2298, + "id": 2863, "name": "unsignedOrderValues", "nodeType": "VariableDeclaration", - "scope": 2338, - "src": "2217:27:10", + "scope": 2905, + "src": "2147:27:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1396,27 +1424,27 @@ }, "typeName": { "baseType": { - "id": 2295, + "id": 2860, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "2217:4:10", + "src": "2147:4:13", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 2297, + "id": 2862, "length": { "argumentTypes": null, "hexValue": "35", - "id": 2296, + "id": 2861, "isConstant": false, "isLValue": false, "isPure": false, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "2222:1:10", + "src": "2152:1:13", "subdenomination": null, "typeDescriptions": { "typeIdentifier": null, @@ -1425,7 +1453,7 @@ "value": "5" }, "nodeType": "ArrayTypeName", - "src": "2217:7:10", + "src": "2147:7:13", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$5_storage_ptr", "typeString": "uint256[5]" @@ -1436,11 +1464,11 @@ }, { "constant": false, - "id": 2300, + "id": 2865, "name": "orderQty", "nodeType": "VariableDeclaration", - "scope": 2338, - "src": "2254:12:10", + "scope": 2905, + "src": "2184:12:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1448,10 +1476,10 @@ "typeString": "int256" }, "typeName": { - "id": 2299, + "id": 2864, "name": "int", "nodeType": "ElementaryTypeName", - "src": "2254:3:10", + "src": "2184:3:13", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -1461,20 +1489,20 @@ "visibility": "internal" } ], - "src": "2139:133:10" + "src": "2102:100:13" }, "payable": false, "returnParameters": { - "id": 2304, + "id": 2869, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2303, + "id": 2868, "name": "", "nodeType": "VariableDeclaration", - "scope": 2338, - "src": "2294:7:10", + "scope": 2905, + "src": "2224:7:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1482,10 +1510,10 @@ "typeString": "bytes32" }, "typeName": { - "id": 2302, + "id": 2867, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "2294:7:10", + "src": "2224:7:13", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -1495,19 +1523,19 @@ "visibility": "internal" } ], - "src": "2293:9:10" + "src": "2223:9:13" }, - "scope": 2511, - "src": "2115:643:10", + "scope": 3083, + "src": "2078:612:13", "stateMutability": "pure", "superFunction": null, "visibility": "public" }, { "body": { - "id": 2368, + "id": 2935, "nodeType": "Block", - "src": "3188:188:10", + "src": "3120:188:13", "statements": [ { "expression": { @@ -1516,19 +1544,19 @@ "typeIdentifier": "t_address", "typeString": "address" }, - "id": 2366, + "id": 2933, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 2353, + "id": 2920, "name": "signerAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2340, - "src": "3205:13:10", + "referencedDeclaration": 2907, + "src": "3137:13:13", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -1548,14 +1576,14 @@ { "argumentTypes": null, "hexValue": "19457468657265756d205369676e6564204d6573736167653a0a3332", - "id": 2358, + "id": 2925, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "3272:34:10", + "src": "3204:34:13", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_178a2411ab6fbc1ba11064408972259c558d0e82fd48b0aba3ad81d14f065e73", @@ -1565,12 +1593,12 @@ }, { "argumentTypes": null, - "id": 2359, + "id": 2926, "name": "hash", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2342, - "src": "3308:4:10", + "referencedDeclaration": 2909, + "src": "3240:4:13", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -1590,18 +1618,18 @@ ], "expression": { "argumentTypes": null, - "id": 2356, + "id": 2923, "name": "abi", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 5180, - "src": "3255:3:10", + "referencedDeclaration": 8170, + "src": "3187:3:13", "typeDescriptions": { "typeIdentifier": "t_magic_abi", "typeString": "abi" } }, - "id": 2357, + "id": 2924, "isConstant": false, "isLValue": false, "isPure": true, @@ -1609,13 +1637,13 @@ "memberName": "encodePacked", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "3255:16:10", + "src": "3187:16:13", "typeDescriptions": { "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", "typeString": "function () pure returns (bytes memory)" } }, - "id": 2360, + "id": 2927, "isConstant": false, "isLValue": false, "isPure": false, @@ -1623,7 +1651,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3255:58:10", + "src": "3187:58:13", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" @@ -1637,18 +1665,18 @@ "typeString": "bytes memory" } ], - "id": 2355, + "id": 2922, "name": "keccak256", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 5187, - "src": "3245:9:10", + "referencedDeclaration": 8177, + "src": "3177:9:13", "typeDescriptions": { "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", "typeString": "function () pure returns (bytes32)" } }, - "id": 2361, + "id": 2928, "isConstant": false, "isLValue": false, "isPure": false, @@ -1656,7 +1684,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3245:69:10", + "src": "3177:69:13", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -1664,12 +1692,12 @@ }, { "argumentTypes": null, - "id": 2362, + "id": 2929, "name": "v", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2344, - "src": "3328:1:10", + "referencedDeclaration": 2911, + "src": "3260:1:13", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" @@ -1677,12 +1705,12 @@ }, { "argumentTypes": null, - "id": 2363, + "id": 2930, "name": "r", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2346, - "src": "3343:1:10", + "referencedDeclaration": 2913, + "src": "3275:1:13", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -1690,12 +1718,12 @@ }, { "argumentTypes": null, - "id": 2364, + "id": 2931, "name": "s", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2348, - "src": "3358:1:10", + "referencedDeclaration": 2915, + "src": "3290:1:13", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -1721,18 +1749,18 @@ "typeString": "bytes32" } ], - "id": 2354, + "id": 2921, "name": "ecrecover", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 5185, - "src": "3222:9:10", + "referencedDeclaration": 8175, + "src": "3154:9:13", "typeDescriptions": { "typeIdentifier": "t_function_ecrecover_pure$_t_bytes32_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$_t_address_$", "typeString": "function (bytes32,uint8,bytes32,bytes32) pure returns (address)" } }, - "id": 2365, + "id": 2932, "isConstant": false, "isLValue": false, "isPure": false, @@ -1740,27 +1768,27 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3222:147:10", + "src": "3154:147:13", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "src": "3205:164:10", + "src": "3137:164:13", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "functionReturnParameters": 2352, - "id": 2367, + "functionReturnParameters": 2919, + "id": 2934, "nodeType": "Return", - "src": "3198:171:10" + "src": "3130:171:13" } ] }, "documentation": "@notice confirms hash originated from signer\n @param signerAddress - address of order originator\n @param hash - original order hash\n @param v order signature\n @param r order signature\n @param s order signature", - "id": 2369, + "id": 2936, "implemented": true, "isConstructor": false, "isDeclaredConst": true, @@ -1768,16 +1796,16 @@ "name": "isValidSignature", "nodeType": "FunctionDefinition", "parameters": { - "id": 2349, + "id": 2916, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2340, + "id": 2907, "name": "signerAddress", "nodeType": "VariableDeclaration", - "scope": 2369, - "src": "3052:21:10", + "scope": 2936, + "src": "2984:21:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1785,10 +1813,10 @@ "typeString": "address" }, "typeName": { - "id": 2339, + "id": 2906, "name": "address", "nodeType": "ElementaryTypeName", - "src": "3052:7:10", + "src": "2984:7:13", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -1799,11 +1827,11 @@ }, { "constant": false, - "id": 2342, + "id": 2909, "name": "hash", "nodeType": "VariableDeclaration", - "scope": 2369, - "src": "3083:12:10", + "scope": 2936, + "src": "3015:12:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1811,10 +1839,10 @@ "typeString": "bytes32" }, "typeName": { - "id": 2341, + "id": 2908, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "3083:7:10", + "src": "3015:7:13", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -1825,11 +1853,11 @@ }, { "constant": false, - "id": 2344, + "id": 2911, "name": "v", "nodeType": "VariableDeclaration", - "scope": 2369, - "src": "3105:7:10", + "scope": 2936, + "src": "3037:7:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1837,10 +1865,10 @@ "typeString": "uint8" }, "typeName": { - "id": 2343, + "id": 2910, "name": "uint8", "nodeType": "ElementaryTypeName", - "src": "3105:5:10", + "src": "3037:5:13", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" @@ -1851,11 +1879,11 @@ }, { "constant": false, - "id": 2346, + "id": 2913, "name": "r", "nodeType": "VariableDeclaration", - "scope": 2369, - "src": "3122:9:10", + "scope": 2936, + "src": "3054:9:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1863,10 +1891,10 @@ "typeString": "bytes32" }, "typeName": { - "id": 2345, + "id": 2912, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "3122:7:10", + "src": "3054:7:13", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -1877,11 +1905,11 @@ }, { "constant": false, - "id": 2348, + "id": 2915, "name": "s", "nodeType": "VariableDeclaration", - "scope": 2369, - "src": "3141:9:10", + "scope": 2936, + "src": "3073:9:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1889,10 +1917,10 @@ "typeString": "bytes32" }, "typeName": { - "id": 2347, + "id": 2914, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "3141:7:10", + "src": "3073:7:13", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -1902,20 +1930,20 @@ "visibility": "internal" } ], - "src": "3042:114:10" + "src": "2974:114:13" }, "payable": false, "returnParameters": { - "id": 2352, + "id": 2919, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2351, + "id": 2918, "name": "", "nodeType": "VariableDeclaration", - "scope": 2369, - "src": "3178:4:10", + "scope": 2936, + "src": "3110:4:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1923,10 +1951,10 @@ "typeString": "bool" }, "typeName": { - "id": 2350, + "id": 2917, "name": "bool", "nodeType": "ElementaryTypeName", - "src": "3178:4:10", + "src": "3110:4:13", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -1936,24 +1964,24 @@ "visibility": "internal" } ], - "src": "3177:6:10" + "src": "3109:6:13" }, - "scope": 2511, - "src": "3017:359:10", + "scope": 3083, + "src": "2949:359:13", "stateMutability": "pure", "superFunction": null, "visibility": "public" }, { "body": { - "id": 2461, + "id": 3033, "nodeType": "Block", - "src": "4038:558:10", + "src": "3861:586:13", "statements": [ { "expression": { "argumentTypes": null, - "id": 2392, + "id": 2957, "isConstant": false, "isLValue": false, "isPure": false, @@ -1962,26 +1990,26 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 2386, + "id": 2951, "name": "order", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2384, - "src": "4048:5:10", + "referencedDeclaration": 2949, + "src": "3871:5:13", "typeDescriptions": { - "typeIdentifier": "t_struct$_Order_$2267_memory_ptr", + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", "typeString": "struct OrderLib.Order memory" } }, - "id": 2388, + "id": 2953, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, - "memberName": "maker", + "memberName": "marketContractAddress", "nodeType": "MemberAccess", - "referencedDeclaration": 2250, - "src": "4048:11:10", + "referencedDeclaration": 2815, + "src": "3871:27:13", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -1993,29 +2021,29 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 2389, + "id": 2954, "name": "orderAddresses", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2375, - "src": "4062:14:10", + "referencedDeclaration": 2940, + "src": "3901:14:13", "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$3_memory_ptr", - "typeString": "address[3] memory" + "typeIdentifier": "t_array$_t_address_$4_memory_ptr", + "typeString": "address[4] memory" } }, - "id": 2391, + "id": 2956, "indexExpression": { "argumentTypes": null, "hexValue": "30", - "id": 2390, + "id": 2955, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "4077:1:10", + "src": "3916:1:13", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -2028,26 +2056,26 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "4062:17:10", + "src": "3901:17:13", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "src": "4048:31:10", + "src": "3871:47:13", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "id": 2393, + "id": 2958, "nodeType": "ExpressionStatement", - "src": "4048:31:10" + "src": "3871:47:13" }, { "expression": { "argumentTypes": null, - "id": 2400, + "id": 2965, "isConstant": false, "isLValue": false, "isPure": false, @@ -2056,26 +2084,26 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 2394, + "id": 2959, "name": "order", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2384, - "src": "4089:5:10", + "referencedDeclaration": 2949, + "src": "3928:5:13", "typeDescriptions": { - "typeIdentifier": "t_struct$_Order_$2267_memory_ptr", + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", "typeString": "struct OrderLib.Order memory" } }, - "id": 2396, + "id": 2961, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, - "memberName": "taker", + "memberName": "maker", "nodeType": "MemberAccess", - "referencedDeclaration": 2252, - "src": "4089:11:10", + "referencedDeclaration": 2817, + "src": "3928:11:13", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -2087,29 +2115,29 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 2397, + "id": 2962, "name": "orderAddresses", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2375, - "src": "4103:14:10", + "referencedDeclaration": 2940, + "src": "3942:14:13", "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$3_memory_ptr", - "typeString": "address[3] memory" + "typeIdentifier": "t_array$_t_address_$4_memory_ptr", + "typeString": "address[4] memory" } }, - "id": 2399, + "id": 2964, "indexExpression": { "argumentTypes": null, "hexValue": "31", - "id": 2398, + "id": 2963, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "4118:1:10", + "src": "3957:1:13", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", @@ -2122,26 +2150,26 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "4103:17:10", + "src": "3942:17:13", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "src": "4089:31:10", + "src": "3928:31:13", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "id": 2401, + "id": 2966, "nodeType": "ExpressionStatement", - "src": "4089:31:10" + "src": "3928:31:13" }, { "expression": { "argumentTypes": null, - "id": 2408, + "id": 2973, "isConstant": false, "isLValue": false, "isPure": false, @@ -2150,26 +2178,26 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 2402, + "id": 2967, "name": "order", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2384, - "src": "4130:5:10", + "referencedDeclaration": 2949, + "src": "3969:5:13", "typeDescriptions": { - "typeIdentifier": "t_struct$_Order_$2267_memory_ptr", + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", "typeString": "struct OrderLib.Order memory" } }, - "id": 2404, + "id": 2969, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, - "memberName": "feeRecipient", + "memberName": "taker", "nodeType": "MemberAccess", - "referencedDeclaration": 2254, - "src": "4130:18:10", + "referencedDeclaration": 2819, + "src": "3969:11:13", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -2181,29 +2209,29 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 2405, + "id": 2970, "name": "orderAddresses", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2375, - "src": "4151:14:10", + "referencedDeclaration": 2940, + "src": "3983:14:13", "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$3_memory_ptr", - "typeString": "address[3] memory" + "typeIdentifier": "t_array$_t_address_$4_memory_ptr", + "typeString": "address[4] memory" } }, - "id": 2407, + "id": 2972, "indexExpression": { "argumentTypes": null, "hexValue": "32", - "id": 2406, + "id": 2971, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "4166:1:10", + "src": "3998:1:13", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_2_by_1", @@ -2216,26 +2244,26 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "4151:17:10", + "src": "3983:17:13", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "src": "4130:38:10", + "src": "3969:31:13", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "id": 2409, + "id": 2974, "nodeType": "ExpressionStatement", - "src": "4130:38:10" + "src": "3969:31:13" }, { "expression": { "argumentTypes": null, - "id": 2416, + "id": 2981, "isConstant": false, "isLValue": false, "isPure": false, @@ -2244,26 +2272,120 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 2410, + "id": 2975, "name": "order", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2384, - "src": "4178:5:10", + "referencedDeclaration": 2949, + "src": "4010:5:13", "typeDescriptions": { - "typeIdentifier": "t_struct$_Order_$2267_memory_ptr", + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", "typeString": "struct OrderLib.Order memory" } }, - "id": 2412, + "id": 2977, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "feeRecipient", + "nodeType": "MemberAccess", + "referencedDeclaration": 2821, + "src": "4010:18:13", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2978, + "name": "orderAddresses", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2940, + "src": "4031:14:13", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$4_memory_ptr", + "typeString": "address[4] memory" + } + }, + "id": 2980, + "indexExpression": { + "argumentTypes": null, + "hexValue": "33", + "id": 2979, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4046:1:13", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4031:17:13", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "4010:38:13", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2982, + "nodeType": "ExpressionStatement", + "src": "4010:38:13" + }, + { + "expression": { + "argumentTypes": null, + "id": 2989, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2983, + "name": "order", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2949, + "src": "4058:5:13", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "id": 2985, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "memberName": "makerFee", "nodeType": "MemberAccess", - "referencedDeclaration": 2256, - "src": "4178:14:10", + "referencedDeclaration": 2823, + "src": "4058:14:13", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2275,29 +2397,29 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 2413, + "id": 2986, "name": "unsignedOrderValues", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2379, - "src": "4195:19:10", + "referencedDeclaration": 2944, + "src": "4075:19:13", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$5_memory_ptr", "typeString": "uint256[5] memory" } }, - "id": 2415, + "id": 2988, "indexExpression": { "argumentTypes": null, "hexValue": "30", - "id": 2414, + "id": 2987, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "4215:1:10", + "src": "4095:1:13", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -2310,26 +2432,26 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "4195:22:10", + "src": "4075:22:13", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "4178:39:10", + "src": "4058:39:13", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 2417, + "id": 2990, "nodeType": "ExpressionStatement", - "src": "4178:39:10" + "src": "4058:39:13" }, { "expression": { "argumentTypes": null, - "id": 2424, + "id": 2997, "isConstant": false, "isLValue": false, "isPure": false, @@ -2338,26 +2460,26 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 2418, + "id": 2991, "name": "order", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2384, - "src": "4227:5:10", + "referencedDeclaration": 2949, + "src": "4107:5:13", "typeDescriptions": { - "typeIdentifier": "t_struct$_Order_$2267_memory_ptr", + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", "typeString": "struct OrderLib.Order memory" } }, - "id": 2420, + "id": 2993, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "memberName": "takerFee", "nodeType": "MemberAccess", - "referencedDeclaration": 2258, - "src": "4227:14:10", + "referencedDeclaration": 2825, + "src": "4107:14:13", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2369,29 +2491,29 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 2421, + "id": 2994, "name": "unsignedOrderValues", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2379, - "src": "4244:19:10", + "referencedDeclaration": 2944, + "src": "4124:19:13", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$5_memory_ptr", "typeString": "uint256[5] memory" } }, - "id": 2423, + "id": 2996, "indexExpression": { "argumentTypes": null, "hexValue": "31", - "id": 2422, + "id": 2995, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "4264:1:10", + "src": "4144:1:13", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", @@ -2404,26 +2526,26 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "4244:22:10", + "src": "4124:22:13", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "4227:39:10", + "src": "4107:39:13", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 2425, + "id": 2998, "nodeType": "ExpressionStatement", - "src": "4227:39:10" + "src": "4107:39:13" }, { "expression": { "argumentTypes": null, - "id": 2432, + "id": 3005, "isConstant": false, "isLValue": false, "isPure": false, @@ -2432,26 +2554,26 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 2426, + "id": 2999, "name": "order", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2384, - "src": "4276:5:10", + "referencedDeclaration": 2949, + "src": "4156:5:13", "typeDescriptions": { - "typeIdentifier": "t_struct$_Order_$2267_memory_ptr", + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", "typeString": "struct OrderLib.Order memory" } }, - "id": 2428, + "id": 3001, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "memberName": "price", "nodeType": "MemberAccess", - "referencedDeclaration": 2260, - "src": "4276:11:10", + "referencedDeclaration": 2827, + "src": "4156:11:13", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2463,29 +2585,29 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 2429, + "id": 3002, "name": "unsignedOrderValues", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2379, - "src": "4290:19:10", + "referencedDeclaration": 2944, + "src": "4170:19:13", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$5_memory_ptr", "typeString": "uint256[5] memory" } }, - "id": 2431, + "id": 3004, "indexExpression": { "argumentTypes": null, "hexValue": "32", - "id": 2430, + "id": 3003, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "4310:1:10", + "src": "4190:1:13", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_2_by_1", @@ -2498,26 +2620,26 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "4290:22:10", + "src": "4170:22:13", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "4276:36:10", + "src": "4156:36:13", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 2433, + "id": 3006, "nodeType": "ExpressionStatement", - "src": "4276:36:10" + "src": "4156:36:13" }, { "expression": { "argumentTypes": null, - "id": 2440, + "id": 3013, "isConstant": false, "isLValue": false, "isPure": false, @@ -2526,26 +2648,26 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 2434, + "id": 3007, "name": "order", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2384, - "src": "4322:5:10", + "referencedDeclaration": 2949, + "src": "4202:5:13", "typeDescriptions": { - "typeIdentifier": "t_struct$_Order_$2267_memory_ptr", + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", "typeString": "struct OrderLib.Order memory" } }, - "id": 2436, + "id": 3009, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "memberName": "expirationTimeStamp", "nodeType": "MemberAccess", - "referencedDeclaration": 2262, - "src": "4322:25:10", + "referencedDeclaration": 2829, + "src": "4202:25:13", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2557,29 +2679,29 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 2437, + "id": 3010, "name": "unsignedOrderValues", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2379, - "src": "4350:19:10", + "referencedDeclaration": 2944, + "src": "4230:19:13", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$5_memory_ptr", "typeString": "uint256[5] memory" } }, - "id": 2439, + "id": 3012, "indexExpression": { "argumentTypes": null, "hexValue": "33", - "id": 2438, + "id": 3011, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "4370:1:10", + "src": "4250:1:13", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_3_by_1", @@ -2592,26 +2714,26 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "4350:22:10", + "src": "4230:22:13", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "4322:50:10", + "src": "4202:50:13", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 2441, + "id": 3014, "nodeType": "ExpressionStatement", - "src": "4322:50:10" + "src": "4202:50:13" }, { "expression": { "argumentTypes": null, - "id": 2446, + "id": 3019, "isConstant": false, "isLValue": false, "isPure": false, @@ -2620,26 +2742,26 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 2442, + "id": 3015, "name": "order", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2384, - "src": "4382:5:10", + "referencedDeclaration": 2949, + "src": "4262:5:13", "typeDescriptions": { - "typeIdentifier": "t_struct$_Order_$2267_memory_ptr", + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", "typeString": "struct OrderLib.Order memory" } }, - "id": 2444, + "id": 3017, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "memberName": "qty", "nodeType": "MemberAccess", - "referencedDeclaration": 2264, - "src": "4382:9:10", + "referencedDeclaration": 2831, + "src": "4262:9:13", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -2649,31 +2771,31 @@ "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 2445, + "id": 3018, "name": "orderQty", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2381, - "src": "4394:8:10", + "referencedDeclaration": 2946, + "src": "4274:8:13", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, - "src": "4382:20:10", + "src": "4262:20:13", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, - "id": 2447, + "id": 3020, "nodeType": "ExpressionStatement", - "src": "4382:20:10" + "src": "4262:20:13" }, { "expression": { "argumentTypes": null, - "id": 2457, + "id": 3029, "isConstant": false, "isLValue": false, "isPure": false, @@ -2682,26 +2804,26 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 2448, + "id": 3021, "name": "order", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2384, - "src": "4412:5:10", + "referencedDeclaration": 2949, + "src": "4292:5:13", "typeDescriptions": { - "typeIdentifier": "t_struct$_Order_$2267_memory_ptr", + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", "typeString": "struct OrderLib.Order memory" } }, - "id": 2450, + "id": 3023, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "memberName": "orderHash", "nodeType": "MemberAccess", - "referencedDeclaration": 2266, - "src": "4412:15:10", + "referencedDeclaration": 2833, + "src": "4292:15:13", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -2714,38 +2836,25 @@ "arguments": [ { "argumentTypes": null, - "id": 2452, - "name": "contractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2371, - "src": "4459:15:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 2453, + "id": 3025, "name": "orderAddresses", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2375, - "src": "4488:14:10", + "referencedDeclaration": 2940, + "src": "4339:14:13", "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$3_memory_ptr", - "typeString": "address[3] memory" + "typeIdentifier": "t_array$_t_address_$4_memory_ptr", + "typeString": "address[4] memory" } }, { "argumentTypes": null, - "id": 2454, + "id": 3026, "name": "unsignedOrderValues", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2379, - "src": "4516:19:10", + "referencedDeclaration": 2944, + "src": "4367:19:13", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$5_memory_ptr", "typeString": "uint256[5] memory" @@ -2753,12 +2862,12 @@ }, { "argumentTypes": null, - "id": 2455, + "id": 3027, "name": "orderQty", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2381, - "src": "4549:8:10", + "referencedDeclaration": 2946, + "src": "4400:8:13", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -2768,12 +2877,8 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_array$_t_address_$3_memory_ptr", - "typeString": "address[3] memory" + "typeIdentifier": "t_array$_t_address_$4_memory_ptr", + "typeString": "address[4] memory" }, { "typeIdentifier": "t_array$_t_uint256_$5_memory_ptr", @@ -2784,18 +2889,18 @@ "typeString": "int256" } ], - "id": 2451, + "id": 3024, "name": "createOrderHash", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2338, - "src": "4430:15:10", + "referencedDeclaration": 2905, + "src": "4310:15:13", "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_address_$_t_array$_t_address_$3_memory_ptr_$_t_array$_t_uint256_$5_memory_ptr_$_t_int256_$returns$_t_bytes32_$", - "typeString": "function (address,address[3] memory,uint256[5] memory,int256) pure returns (bytes32)" + "typeIdentifier": "t_function_internal_pure$_t_array$_t_address_$4_memory_ptr_$_t_array$_t_uint256_$5_memory_ptr_$_t_int256_$returns$_t_bytes32_$", + "typeString": "function (address[4] memory,uint256[5] memory,int256) pure returns (bytes32)" } }, - "id": 2456, + "id": 3028, "isConstant": false, "isLValue": false, "isPure": false, @@ -2803,45 +2908,45 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "4430:137:10", + "src": "4310:108:13", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "src": "4412:155:10", + "src": "4292:126:13", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "id": 2458, + "id": 3030, "nodeType": "ExpressionStatement", - "src": "4412:155:10" + "src": "4292:126:13" }, { "expression": { "argumentTypes": null, - "id": 2459, + "id": 3031, "name": "order", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2384, - "src": "4584:5:10", + "referencedDeclaration": 2949, + "src": "4435:5:13", "typeDescriptions": { - "typeIdentifier": "t_struct$_Order_$2267_memory_ptr", + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", "typeString": "struct OrderLib.Order memory" } }, - "functionReturnParameters": 2385, - "id": 2460, + "functionReturnParameters": 2950, + "id": 3032, "nodeType": "Return", - "src": "4577:12:10" + "src": "4428:12:13" } ] }, - "documentation": "@dev factory for orders to be created with needed hash.\n @param contractAddress address of the calling contract, orders are unique to each contract\n @param orderAddresses array of 3 address. maker, taker, and feeRecipient\n @param unsignedOrderValues array of 5 unsigned integers. makerFee, takerFee, price, expirationTimeStamp and salt\n @param orderQty signed qty of the original order.", - "id": 2462, + "documentation": "@dev factory for orders to be created with needed hash.\n @param orderAddresses array of 4 address. marketContractAddress, maker, taker, and feeRecipient\n @param unsignedOrderValues array of 5 unsigned integers. makerFee, takerFee, price, expirationTimeStamp and salt\n @param orderQty signed qty of the original order.", + "id": 3034, "implemented": true, "isConstructor": false, "isDeclaredConst": true, @@ -2849,83 +2954,57 @@ "name": "createOrder", "nodeType": "FunctionDefinition", "parameters": { - "id": 2382, + "id": 2947, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2371, - "name": "contractAddress", - "nodeType": "VariableDeclaration", - "scope": 2462, - "src": "3874:23:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2370, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3874:7:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2375, + "id": 2940, "name": "orderAddresses", "nodeType": "VariableDeclaration", - "scope": 2462, - "src": "3907:25:10", + "scope": 3034, + "src": "3730:25:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$3_memory_ptr", - "typeString": "address[3]" + "typeIdentifier": "t_array$_t_address_$4_memory_ptr", + "typeString": "address[4]" }, "typeName": { "baseType": { - "id": 2372, + "id": 2937, "name": "address", "nodeType": "ElementaryTypeName", - "src": "3907:7:10", + "src": "3730:7:13", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "id": 2374, + "id": 2939, "length": { "argumentTypes": null, - "hexValue": "33", - "id": 2373, + "hexValue": "34", + "id": 2938, "isConstant": false, "isLValue": false, "isPure": false, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "3915:1:10", + "src": "3738:1:13", "subdenomination": null, "typeDescriptions": { "typeIdentifier": null, "typeString": null }, - "value": "3" + "value": "4" }, "nodeType": "ArrayTypeName", - "src": "3907:10:10", + "src": "3730:10:13", "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$3_storage_ptr", - "typeString": "address[3]" + "typeIdentifier": "t_array$_t_address_$4_storage_ptr", + "typeString": "address[4]" } }, "value": null, @@ -2933,11 +3012,11 @@ }, { "constant": false, - "id": 2379, + "id": 2944, "name": "unsignedOrderValues", "nodeType": "VariableDeclaration", - "scope": 2462, - "src": "3942:27:10", + "scope": 3034, + "src": "3765:27:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2946,27 +3025,27 @@ }, "typeName": { "baseType": { - "id": 2376, + "id": 2941, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "3942:4:10", + "src": "3765:4:13", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 2378, + "id": 2943, "length": { "argumentTypes": null, "hexValue": "35", - "id": 2377, + "id": 2942, "isConstant": false, "isLValue": false, "isPure": false, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "3947:1:10", + "src": "3770:1:13", "subdenomination": null, "typeDescriptions": { "typeIdentifier": null, @@ -2975,7 +3054,7 @@ "value": "5" }, "nodeType": "ArrayTypeName", - "src": "3942:7:10", + "src": "3765:7:13", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$5_storage_ptr", "typeString": "uint256[5]" @@ -2986,11 +3065,11 @@ }, { "constant": false, - "id": 2381, + "id": 2946, "name": "orderQty", "nodeType": "VariableDeclaration", - "scope": 2462, - "src": "3979:12:10", + "scope": 3034, + "src": "3802:12:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2998,10 +3077,10 @@ "typeString": "int256" }, "typeName": { - "id": 2380, + "id": 2945, "name": "int", "nodeType": "ElementaryTypeName", - "src": "3979:3:10", + "src": "3802:3:13", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -3011,35 +3090,35 @@ "visibility": "internal" } ], - "src": "3864:133:10" + "src": "3720:100:13" }, "payable": false, "returnParameters": { - "id": 2385, + "id": 2950, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2384, + "id": 2949, "name": "order", "nodeType": "VariableDeclaration", - "scope": 2462, - "src": "4021:11:10", + "scope": 3034, + "src": "3844:11:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_struct$_Order_$2267_memory_ptr", + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", "typeString": "struct OrderLib.Order" }, "typeName": { "contractScope": null, - "id": 2383, + "id": 2948, "name": "Order", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2267, - "src": "4021:5:10", + "referencedDeclaration": 2834, + "src": "3844:5:13", "typeDescriptions": { - "typeIdentifier": "t_struct$_Order_$2267_storage_ptr", + "typeIdentifier": "t_struct$_Order_$2834_storage_ptr", "typeString": "struct OrderLib.Order" } }, @@ -3047,24 +3126,24 @@ "visibility": "internal" } ], - "src": "4020:13:10" + "src": "3843:13:13" }, - "scope": 2511, - "src": "3844:752:10", + "scope": 3083, + "src": "3700:747:13", "stateMutability": "pure", "superFunction": null, "visibility": "internal" }, { "body": { - "id": 2485, + "id": 3057, "nodeType": "Block", - "src": "4902:95:10", + "src": "4753:95:13", "statements": [ { "expression": { "argumentTypes": null, - "id": 2483, + "id": 3055, "isConstant": false, "isLValue": false, "isPure": false, @@ -3075,40 +3154,40 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 2471, + "id": 3043, "name": "self", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2464, - "src": "4912:4:10", + "referencedDeclaration": 3036, + "src": "4763:4:13", "typeDescriptions": { - "typeIdentifier": "t_struct$_OrderMappings_$2248_storage_ptr", + "typeIdentifier": "t_struct$_OrderMappings_$2813_storage_ptr", "typeString": "struct OrderLib.OrderMappings storage pointer" } }, - "id": 2474, + "id": 3046, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "filledOrderQty", "nodeType": "MemberAccess", - "referencedDeclaration": 2243, - "src": "4912:19:10", + "referencedDeclaration": 2808, + "src": "4763:19:13", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_int256_$", "typeString": "mapping(bytes32 => int256)" } }, - "id": 2475, + "id": 3047, "indexExpression": { "argumentTypes": null, - "id": 2473, + "id": 3045, "name": "orderHash", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2466, - "src": "4932:9:10", + "referencedDeclaration": 3038, + "src": "4783:9:13", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -3119,7 +3198,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "4912:30:10", + "src": "4763:30:13", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -3132,12 +3211,12 @@ "arguments": [ { "argumentTypes": null, - "id": 2481, + "id": 3053, "name": "filledQty", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2468, - "src": "4980:9:10", + "referencedDeclaration": 3040, + "src": "4831:9:13", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -3157,40 +3236,40 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 2476, + "id": 3048, "name": "self", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2464, - "src": "4945:4:10", + "referencedDeclaration": 3036, + "src": "4796:4:13", "typeDescriptions": { - "typeIdentifier": "t_struct$_OrderMappings_$2248_storage_ptr", + "typeIdentifier": "t_struct$_OrderMappings_$2813_storage_ptr", "typeString": "struct OrderLib.OrderMappings storage pointer" } }, - "id": 2477, + "id": 3049, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "filledOrderQty", "nodeType": "MemberAccess", - "referencedDeclaration": 2243, - "src": "4945:19:10", + "referencedDeclaration": 2808, + "src": "4796:19:13", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_int256_$", "typeString": "mapping(bytes32 => int256)" } }, - "id": 2479, + "id": 3051, "indexExpression": { "argumentTypes": null, - "id": 2478, + "id": 3050, "name": "orderHash", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2466, - "src": "4965:9:10", + "referencedDeclaration": 3038, + "src": "4816:9:13", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -3201,27 +3280,27 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "4945:30:10", + "src": "4796:30:13", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, - "id": 2480, + "id": 3052, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "add", "nodeType": "MemberAccess", - "referencedDeclaration": 2036, - "src": "4945:34:10", + "referencedDeclaration": 2601, + "src": "4796:34:13", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_int256_$bound_to$_t_int256_$", "typeString": "function (int256,int256) pure returns (int256)" } }, - "id": 2482, + "id": 3054, "isConstant": false, "isLValue": false, "isPure": false, @@ -3229,26 +3308,26 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "4945:45:10", + "src": "4796:45:13", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, - "src": "4912:78:10", + "src": "4763:78:13", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, - "id": 2484, + "id": 3056, "nodeType": "ExpressionStatement", - "src": "4912:78:10" + "src": "4763:78:13" } ] }, "documentation": null, - "id": 2486, + "id": 3058, "implemented": true, "isConstructor": false, "isDeclaredConst": false, @@ -3256,31 +3335,31 @@ "name": "addFilledQtyToOrder", "nodeType": "FunctionDefinition", "parameters": { - "id": 2469, + "id": 3041, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2464, + "id": 3036, "name": "self", "nodeType": "VariableDeclaration", - "scope": 2486, - "src": "4831:26:10", + "scope": 3058, + "src": "4682:26:13", "stateVariable": false, "storageLocation": "storage", "typeDescriptions": { - "typeIdentifier": "t_struct$_OrderMappings_$2248_storage_ptr", + "typeIdentifier": "t_struct$_OrderMappings_$2813_storage_ptr", "typeString": "struct OrderLib.OrderMappings" }, "typeName": { "contractScope": null, - "id": 2463, + "id": 3035, "name": "OrderMappings", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2248, - "src": "4831:13:10", + "referencedDeclaration": 2813, + "src": "4682:13:13", "typeDescriptions": { - "typeIdentifier": "t_struct$_OrderMappings_$2248_storage_ptr", + "typeIdentifier": "t_struct$_OrderMappings_$2813_storage_ptr", "typeString": "struct OrderLib.OrderMappings" } }, @@ -3289,11 +3368,11 @@ }, { "constant": false, - "id": 2466, + "id": 3038, "name": "orderHash", "nodeType": "VariableDeclaration", - "scope": 2486, - "src": "4859:17:10", + "scope": 3058, + "src": "4710:17:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3301,10 +3380,10 @@ "typeString": "bytes32" }, "typeName": { - "id": 2465, + "id": 3037, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "4859:7:10", + "src": "4710:7:13", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -3315,11 +3394,11 @@ }, { "constant": false, - "id": 2468, + "id": 3040, "name": "filledQty", "nodeType": "VariableDeclaration", - "scope": 2486, - "src": "4878:13:10", + "scope": 3058, + "src": "4729:13:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3327,10 +3406,10 @@ "typeString": "int256" }, "typeName": { - "id": 2467, + "id": 3039, "name": "int", "nodeType": "ElementaryTypeName", - "src": "4878:3:10", + "src": "4729:3:13", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -3340,31 +3419,31 @@ "visibility": "internal" } ], - "src": "4830:62:10" + "src": "4681:62:13" }, "payable": false, "returnParameters": { - "id": 2470, + "id": 3042, "nodeType": "ParameterList", "parameters": [], - "src": "4902:0:10" + "src": "4753:0:13" }, - "scope": 2511, - "src": "4802:195:10", + "scope": 3083, + "src": "4653:195:13", "stateMutability": "nonpayable", "superFunction": null, "visibility": "internal" }, { "body": { - "id": 2509, + "id": 3081, "nodeType": "Block", - "src": "5297:104:10", + "src": "5148:104:13", "statements": [ { "expression": { "argumentTypes": null, - "id": 2507, + "id": 3079, "isConstant": false, "isLValue": false, "isPure": false, @@ -3375,40 +3454,40 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 2495, + "id": 3067, "name": "self", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2488, - "src": "5307:4:10", + "referencedDeclaration": 3060, + "src": "5158:4:13", "typeDescriptions": { - "typeIdentifier": "t_struct$_OrderMappings_$2248_storage_ptr", + "typeIdentifier": "t_struct$_OrderMappings_$2813_storage_ptr", "typeString": "struct OrderLib.OrderMappings storage pointer" } }, - "id": 2498, + "id": 3070, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "cancelledOrderQty", "nodeType": "MemberAccess", - "referencedDeclaration": 2247, - "src": "5307:22:10", + "referencedDeclaration": 2812, + "src": "5158:22:13", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_int256_$", "typeString": "mapping(bytes32 => int256)" } }, - "id": 2499, + "id": 3071, "indexExpression": { "argumentTypes": null, - "id": 2497, + "id": 3069, "name": "orderHash", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2490, - "src": "5330:9:10", + "referencedDeclaration": 3062, + "src": "5181:9:13", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -3419,7 +3498,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "5307:33:10", + "src": "5158:33:13", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -3432,12 +3511,12 @@ "arguments": [ { "argumentTypes": null, - "id": 2505, + "id": 3077, "name": "cancelledQty", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2492, - "src": "5381:12:10", + "referencedDeclaration": 3064, + "src": "5232:12:13", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -3457,40 +3536,40 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 2500, + "id": 3072, "name": "self", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2488, - "src": "5343:4:10", + "referencedDeclaration": 3060, + "src": "5194:4:13", "typeDescriptions": { - "typeIdentifier": "t_struct$_OrderMappings_$2248_storage_ptr", + "typeIdentifier": "t_struct$_OrderMappings_$2813_storage_ptr", "typeString": "struct OrderLib.OrderMappings storage pointer" } }, - "id": 2501, + "id": 3073, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "cancelledOrderQty", "nodeType": "MemberAccess", - "referencedDeclaration": 2247, - "src": "5343:22:10", + "referencedDeclaration": 2812, + "src": "5194:22:13", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_int256_$", "typeString": "mapping(bytes32 => int256)" } }, - "id": 2503, + "id": 3075, "indexExpression": { "argumentTypes": null, - "id": 2502, + "id": 3074, "name": "orderHash", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2490, - "src": "5366:9:10", + "referencedDeclaration": 3062, + "src": "5217:9:13", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -3501,27 +3580,27 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "5343:33:10", + "src": "5194:33:13", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, - "id": 2504, + "id": 3076, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "add", "nodeType": "MemberAccess", - "referencedDeclaration": 2036, - "src": "5343:37:10", + "referencedDeclaration": 2601, + "src": "5194:37:13", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_int256_$bound_to$_t_int256_$", "typeString": "function (int256,int256) pure returns (int256)" } }, - "id": 2506, + "id": 3078, "isConstant": false, "isLValue": false, "isPure": false, @@ -3529,26 +3608,26 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "5343:51:10", + "src": "5194:51:13", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, - "src": "5307:87:10", + "src": "5158:87:13", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, - "id": 2508, + "id": 3080, "nodeType": "ExpressionStatement", - "src": "5307:87:10" + "src": "5158:87:13" } ] }, "documentation": null, - "id": 2510, + "id": 3082, "implemented": true, "isConstructor": false, "isDeclaredConst": false, @@ -3556,31 +3635,31 @@ "name": "addCancelledQtyToOrder", "nodeType": "FunctionDefinition", "parameters": { - "id": 2493, + "id": 3065, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2488, + "id": 3060, "name": "self", "nodeType": "VariableDeclaration", - "scope": 2510, - "src": "5223:26:10", + "scope": 3082, + "src": "5074:26:13", "stateVariable": false, "storageLocation": "storage", "typeDescriptions": { - "typeIdentifier": "t_struct$_OrderMappings_$2248_storage_ptr", + "typeIdentifier": "t_struct$_OrderMappings_$2813_storage_ptr", "typeString": "struct OrderLib.OrderMappings" }, "typeName": { "contractScope": null, - "id": 2487, + "id": 3059, "name": "OrderMappings", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2248, - "src": "5223:13:10", + "referencedDeclaration": 2813, + "src": "5074:13:13", "typeDescriptions": { - "typeIdentifier": "t_struct$_OrderMappings_$2248_storage_ptr", + "typeIdentifier": "t_struct$_OrderMappings_$2813_storage_ptr", "typeString": "struct OrderLib.OrderMappings" } }, @@ -3589,11 +3668,11 @@ }, { "constant": false, - "id": 2490, + "id": 3062, "name": "orderHash", "nodeType": "VariableDeclaration", - "scope": 2510, - "src": "5251:17:10", + "scope": 3082, + "src": "5102:17:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3601,10 +3680,10 @@ "typeString": "bytes32" }, "typeName": { - "id": 2489, + "id": 3061, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "5251:7:10", + "src": "5102:7:13", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -3615,11 +3694,11 @@ }, { "constant": false, - "id": 2492, + "id": 3064, "name": "cancelledQty", "nodeType": "VariableDeclaration", - "scope": 2510, - "src": "5270:16:10", + "scope": 3082, + "src": "5121:16:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3627,10 +3706,10 @@ "typeString": "int256" }, "typeName": { - "id": 2491, + "id": 3063, "name": "int", "nodeType": "ElementaryTypeName", - "src": "5270:3:10", + "src": "5121:3:13", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -3640,40 +3719,40 @@ "visibility": "internal" } ], - "src": "5222:65:10" + "src": "5073:65:13" }, "payable": false, "returnParameters": { - "id": 2494, + "id": 3066, "nodeType": "ParameterList", "parameters": [], - "src": "5297:0:10" + "src": "5148:0:13" }, - "scope": 2511, - "src": "5191:210:10", + "scope": 3083, + "src": "5042:210:13", "stateMutability": "nonpayable", "superFunction": null, "visibility": "internal" } ], - "scope": 2512, - "src": "730:4673:10" + "scope": 3084, + "src": "730:4524:13" } ], - "src": "607:4798:10" + "src": "607:4649:13" }, "legacyAST": { - "absolutePath": "/home/pelsasser/MARKETProtocol/contracts/libraries/OrderLib.sol", + "absolutePath": "/home/travis/build/MARKETProtocol/MARKETProtocol/contracts/libraries/OrderLib.sol", "exportedSymbols": { "OrderLib": [ - 2511 + 3083 ] }, - "id": 2512, + "id": 3084, "nodeType": "SourceUnit", "nodes": [ { - "id": 2235, + "id": 2800, "literals": [ "solidity", "^", @@ -3681,16 +3760,16 @@ ".24" ], "nodeType": "PragmaDirective", - "src": "607:24:10" + "src": "607:24:13" }, { - "absolutePath": "/home/pelsasser/MARKETProtocol/contracts/libraries/MathLib.sol", + "absolutePath": "/home/travis/build/MARKETProtocol/MARKETProtocol/contracts/libraries/MathLib.sol", "file": "./MathLib.sol", - "id": 2236, + "id": 2801, "nodeType": "ImportDirective", - "scope": 2512, - "sourceUnit": 2234, - "src": "633:23:10", + "scope": 3084, + "sourceUnit": 2799, + "src": "633:23:13", "symbolAliases": [], "unitAlias": "" }, @@ -3700,34 +3779,34 @@ "contractKind": "library", "documentation": "@title OrderLib\n @author Phil Elsasser ", "fullyImplemented": true, - "id": 2511, + "id": 3083, "linearizedBaseContracts": [ - 2511 + 3083 ], "name": "OrderLib", "nodeType": "ContractDefinition", "nodes": [ { - "id": 2239, + "id": 2804, "libraryName": { "contractScope": null, - "id": 2237, + "id": 2802, "name": "MathLib", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2233, - "src": "759:7:10", + "referencedDeclaration": 2798, + "src": "759:7:13", "typeDescriptions": { - "typeIdentifier": "t_contract$_MathLib_$2233", + "typeIdentifier": "t_contract$_MathLib_$2798", "typeString": "library MathLib" } }, "nodeType": "UsingForDirective", - "src": "753:22:10", + "src": "753:22:13", "typeName": { - "id": 2238, + "id": 2803, "name": "int", "nodeType": "ElementaryTypeName", - "src": "771:3:10", + "src": "771:3:13", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -3736,15 +3815,15 @@ }, { "canonicalName": "OrderLib.OrderMappings", - "id": 2248, + "id": 2813, "members": [ { "constant": false, - "id": 2243, + "id": 2808, "name": "filledOrderQty", "nodeType": "VariableDeclaration", - "scope": 2248, - "src": "812:39:10", + "scope": 2813, + "src": "812:39:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3752,28 +3831,28 @@ "typeString": "mapping(bytes32 => int256)" }, "typeName": { - "id": 2242, + "id": 2807, "keyType": { - "id": 2240, + "id": 2805, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "821:7:10", + "src": "821:7:13", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "nodeType": "Mapping", - "src": "812:24:10", + "src": "812:24:13", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_int256_$", "typeString": "mapping(bytes32 => int256)" }, "valueType": { - "id": 2241, + "id": 2806, "name": "int", "nodeType": "ElementaryTypeName", - "src": "832:3:10", + "src": "832:3:13", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -3785,11 +3864,11 @@ }, { "constant": false, - "id": 2247, + "id": 2812, "name": "cancelledOrderQty", "nodeType": "VariableDeclaration", - "scope": 2248, - "src": "861:42:10", + "scope": 2813, + "src": "861:42:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3797,28 +3876,28 @@ "typeString": "mapping(bytes32 => int256)" }, "typeName": { - "id": 2246, + "id": 2811, "keyType": { - "id": 2244, + "id": 2809, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "870:7:10", + "src": "870:7:13", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "nodeType": "Mapping", - "src": "861:24:10", + "src": "861:24:13", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_int256_$", "typeString": "mapping(bytes32 => int256)" }, "valueType": { - "id": 2245, + "id": 2810, "name": "int", "nodeType": "ElementaryTypeName", - "src": "881:3:10", + "src": "881:3:13", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -3831,21 +3910,47 @@ ], "name": "OrderMappings", "nodeType": "StructDefinition", - "scope": 2511, - "src": "781:129:10", + "scope": 3083, + "src": "781:129:13", "visibility": "public" }, { "canonicalName": "OrderLib.Order", - "id": 2267, + "id": 2834, "members": [ { "constant": false, - "id": 2250, + "id": 2815, + "name": "marketContractAddress", + "nodeType": "VariableDeclaration", + "scope": 2834, + "src": "939:29:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2814, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "939:7:13", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2817, "name": "maker", "nodeType": "VariableDeclaration", - "scope": 2267, - "src": "939:13:10", + "scope": 2834, + "src": "978:13:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3853,10 +3958,10 @@ "typeString": "address" }, "typeName": { - "id": 2249, + "id": 2816, "name": "address", "nodeType": "ElementaryTypeName", - "src": "939:7:10", + "src": "978:7:13", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -3867,11 +3972,11 @@ }, { "constant": false, - "id": 2252, + "id": 2819, "name": "taker", "nodeType": "VariableDeclaration", - "scope": 2267, - "src": "962:13:10", + "scope": 2834, + "src": "1001:13:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3879,10 +3984,10 @@ "typeString": "address" }, "typeName": { - "id": 2251, + "id": 2818, "name": "address", "nodeType": "ElementaryTypeName", - "src": "962:7:10", + "src": "1001:7:13", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -3893,11 +3998,11 @@ }, { "constant": false, - "id": 2254, + "id": 2821, "name": "feeRecipient", "nodeType": "VariableDeclaration", - "scope": 2267, - "src": "985:20:10", + "scope": 2834, + "src": "1024:20:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3905,10 +4010,10 @@ "typeString": "address" }, "typeName": { - "id": 2253, + "id": 2820, "name": "address", "nodeType": "ElementaryTypeName", - "src": "985:7:10", + "src": "1024:7:13", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -3919,11 +4024,11 @@ }, { "constant": false, - "id": 2256, + "id": 2823, "name": "makerFee", "nodeType": "VariableDeclaration", - "scope": 2267, - "src": "1015:13:10", + "scope": 2834, + "src": "1054:13:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3931,10 +4036,10 @@ "typeString": "uint256" }, "typeName": { - "id": 2255, + "id": 2822, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "1015:4:10", + "src": "1054:4:13", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3945,11 +4050,11 @@ }, { "constant": false, - "id": 2258, + "id": 2825, "name": "takerFee", "nodeType": "VariableDeclaration", - "scope": 2267, - "src": "1038:13:10", + "scope": 2834, + "src": "1077:13:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3957,10 +4062,10 @@ "typeString": "uint256" }, "typeName": { - "id": 2257, + "id": 2824, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "1038:4:10", + "src": "1077:4:13", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3971,11 +4076,11 @@ }, { "constant": false, - "id": 2260, + "id": 2827, "name": "price", "nodeType": "VariableDeclaration", - "scope": 2267, - "src": "1061:10:10", + "scope": 2834, + "src": "1100:10:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3983,10 +4088,10 @@ "typeString": "uint256" }, "typeName": { - "id": 2259, + "id": 2826, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "1061:4:10", + "src": "1100:4:13", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3997,11 +4102,11 @@ }, { "constant": false, - "id": 2262, + "id": 2829, "name": "expirationTimeStamp", "nodeType": "VariableDeclaration", - "scope": 2267, - "src": "1081:24:10", + "scope": 2834, + "src": "1120:24:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4009,10 +4114,10 @@ "typeString": "uint256" }, "typeName": { - "id": 2261, + "id": 2828, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "1081:4:10", + "src": "1120:4:13", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4023,11 +4128,11 @@ }, { "constant": false, - "id": 2264, + "id": 2831, "name": "qty", "nodeType": "VariableDeclaration", - "scope": 2267, - "src": "1115:7:10", + "scope": 2834, + "src": "1154:7:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4035,10 +4140,10 @@ "typeString": "int256" }, "typeName": { - "id": 2263, + "id": 2830, "name": "int", "nodeType": "ElementaryTypeName", - "src": "1115:3:10", + "src": "1154:3:13", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -4049,11 +4154,11 @@ }, { "constant": false, - "id": 2266, + "id": 2833, "name": "orderHash", "nodeType": "VariableDeclaration", - "scope": 2267, - "src": "1132:17:10", + "scope": 2834, + "src": "1171:17:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4061,10 +4166,10 @@ "typeString": "bytes32" }, "typeName": { - "id": 2265, + "id": 2832, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "1132:7:10", + "src": "1171:7:13", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -4076,15 +4181,15 @@ ], "name": "Order", "nodeType": "StructDefinition", - "scope": 2511, - "src": "916:240:10", + "scope": 3083, + "src": "916:279:13", "visibility": "public" }, { "body": { - "id": 2287, + "id": 2854, "nodeType": "Block", - "src": "1592:93:10", + "src": "1631:93:13", "statements": [ { "expression": { @@ -4096,40 +4201,40 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 2281, + "id": 2848, "name": "self", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2269, - "src": "1644:4:10", + "referencedDeclaration": 2836, + "src": "1683:4:13", "typeDescriptions": { - "typeIdentifier": "t_struct$_OrderMappings_$2248_storage_ptr", + "typeIdentifier": "t_struct$_OrderMappings_$2813_storage_ptr", "typeString": "struct OrderLib.OrderMappings storage pointer" } }, - "id": 2282, + "id": 2849, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "cancelledOrderQty", "nodeType": "MemberAccess", - "referencedDeclaration": 2247, - "src": "1644:22:10", + "referencedDeclaration": 2812, + "src": "1683:22:13", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_int256_$", "typeString": "mapping(bytes32 => int256)" } }, - "id": 2284, + "id": 2851, "indexExpression": { "argumentTypes": null, - "id": 2283, + "id": 2850, "name": "orderHash", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2271, - "src": "1667:9:10", + "referencedDeclaration": 2838, + "src": "1706:9:13", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -4140,7 +4245,7 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "1644:33:10", + "src": "1683:33:13", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -4160,40 +4265,40 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 2276, + "id": 2843, "name": "self", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2269, - "src": "1609:4:10", + "referencedDeclaration": 2836, + "src": "1648:4:13", "typeDescriptions": { - "typeIdentifier": "t_struct$_OrderMappings_$2248_storage_ptr", + "typeIdentifier": "t_struct$_OrderMappings_$2813_storage_ptr", "typeString": "struct OrderLib.OrderMappings storage pointer" } }, - "id": 2277, + "id": 2844, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "filledOrderQty", "nodeType": "MemberAccess", - "referencedDeclaration": 2243, - "src": "1609:19:10", + "referencedDeclaration": 2808, + "src": "1648:19:13", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_int256_$", "typeString": "mapping(bytes32 => int256)" } }, - "id": 2279, + "id": 2846, "indexExpression": { "argumentTypes": null, - "id": 2278, + "id": 2845, "name": "orderHash", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2271, - "src": "1629:9:10", + "referencedDeclaration": 2838, + "src": "1668:9:13", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -4204,27 +4309,27 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "1609:30:10", + "src": "1648:30:13", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, - "id": 2280, + "id": 2847, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "add", "nodeType": "MemberAccess", - "referencedDeclaration": 2036, - "src": "1609:34:10", + "referencedDeclaration": 2601, + "src": "1648:34:13", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_int256_$bound_to$_t_int256_$", "typeString": "function (int256,int256) pure returns (int256)" } }, - "id": 2285, + "id": 2852, "isConstant": false, "isLValue": false, "isPure": false, @@ -4232,21 +4337,21 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "1609:69:10", + "src": "1648:69:13", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, - "functionReturnParameters": 2275, - "id": 2286, + "functionReturnParameters": 2842, + "id": 2853, "nodeType": "Return", - "src": "1602:76:10" + "src": "1641:76:13" } ] }, "documentation": "@notice returns the qty that is no longer available to trade for a given order\n @param orderHash hash of order to find filled and cancelled qty\n @return int quantity that is no longer able to filled from the supplied order hash", - "id": 2288, + "id": 2855, "implemented": true, "isConstructor": false, "isDeclaredConst": true, @@ -4254,31 +4359,31 @@ "name": "getQtyFilledOrCancelledFromOrder", "nodeType": "FunctionDefinition", "parameters": { - "id": 2272, + "id": 2839, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2269, + "id": 2836, "name": "self", "nodeType": "VariableDeclaration", - "scope": 2288, - "src": "1500:26:10", + "scope": 2855, + "src": "1539:26:13", "stateVariable": false, "storageLocation": "storage", "typeDescriptions": { - "typeIdentifier": "t_struct$_OrderMappings_$2248_storage_ptr", + "typeIdentifier": "t_struct$_OrderMappings_$2813_storage_ptr", "typeString": "struct OrderLib.OrderMappings" }, "typeName": { "contractScope": null, - "id": 2268, + "id": 2835, "name": "OrderMappings", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2248, - "src": "1500:13:10", + "referencedDeclaration": 2813, + "src": "1539:13:13", "typeDescriptions": { - "typeIdentifier": "t_struct$_OrderMappings_$2248_storage_ptr", + "typeIdentifier": "t_struct$_OrderMappings_$2813_storage_ptr", "typeString": "struct OrderLib.OrderMappings" } }, @@ -4287,11 +4392,11 @@ }, { "constant": false, - "id": 2271, + "id": 2838, "name": "orderHash", "nodeType": "VariableDeclaration", - "scope": 2288, - "src": "1536:17:10", + "scope": 2855, + "src": "1575:17:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4299,10 +4404,10 @@ "typeString": "bytes32" }, "typeName": { - "id": 2270, + "id": 2837, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "1536:7:10", + "src": "1575:7:13", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -4312,20 +4417,20 @@ "visibility": "internal" } ], - "src": "1490:69:10" + "src": "1529:69:13" }, "payable": false, "returnParameters": { - "id": 2275, + "id": 2842, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2274, + "id": 2841, "name": "", "nodeType": "VariableDeclaration", - "scope": 2288, - "src": "1583:3:10", + "scope": 2855, + "src": "1622:3:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4333,10 +4438,10 @@ "typeString": "int256" }, "typeName": { - "id": 2273, + "id": 2840, "name": "int", "nodeType": "ElementaryTypeName", - "src": "1583:3:10", + "src": "1622:3:13", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -4346,19 +4451,19 @@ "visibility": "internal" } ], - "src": "1582:5:10" + "src": "1621:5:13" }, - "scope": 2511, - "src": "1449:236:10", + "scope": 3083, + "src": "1488:236:13", "stateMutability": "view", "superFunction": null, "visibility": "internal" }, { "body": { - "id": 2337, + "id": 2904, "nodeType": "Block", - "src": "2307:451:10", + "src": "2237:453:13", "statements": [ { "expression": { @@ -4367,46 +4472,33 @@ { "argumentTypes": null, "arguments": [ - { - "argumentTypes": null, - "id": 2308, - "name": "contractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2290, - "src": "2381:15:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, { "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 2309, + "id": 2873, "name": "orderAddresses", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2294, - "src": "2414:14:10", + "referencedDeclaration": 2859, + "src": "2311:14:13", "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$3_memory_ptr", - "typeString": "address[3] memory" + "typeIdentifier": "t_array$_t_address_$4_memory_ptr", + "typeString": "address[4] memory" } }, - "id": 2311, + "id": 2875, "indexExpression": { "argumentTypes": null, "hexValue": "30", - "id": 2310, + "id": 2874, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "2429:1:10", + "src": "2326:1:13", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -4419,7 +4511,7 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "2414:17:10", + "src": "2311:17:13", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -4429,29 +4521,29 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 2312, + "id": 2876, "name": "orderAddresses", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2294, - "src": "2449:14:10", + "referencedDeclaration": 2859, + "src": "2346:14:13", "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$3_memory_ptr", - "typeString": "address[3] memory" + "typeIdentifier": "t_array$_t_address_$4_memory_ptr", + "typeString": "address[4] memory" } }, - "id": 2314, + "id": 2878, "indexExpression": { "argumentTypes": null, "hexValue": "31", - "id": 2313, + "id": 2877, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "2464:1:10", + "src": "2361:1:13", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", @@ -4464,7 +4556,7 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "2449:17:10", + "src": "2346:17:13", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -4474,29 +4566,29 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 2315, + "id": 2879, "name": "orderAddresses", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2294, - "src": "2484:14:10", + "referencedDeclaration": 2859, + "src": "2381:14:13", "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$3_memory_ptr", - "typeString": "address[3] memory" + "typeIdentifier": "t_array$_t_address_$4_memory_ptr", + "typeString": "address[4] memory" } }, - "id": 2317, + "id": 2881, "indexExpression": { "argumentTypes": null, "hexValue": "32", - "id": 2316, + "id": 2880, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "2499:1:10", + "src": "2396:1:13", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_2_by_1", @@ -4509,7 +4601,7 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "2484:17:10", + "src": "2381:17:13", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -4519,29 +4611,74 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 2318, + "id": 2882, + "name": "orderAddresses", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2859, + "src": "2416:14:13", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$4_memory_ptr", + "typeString": "address[4] memory" + } + }, + "id": 2884, + "indexExpression": { + "argumentTypes": null, + "hexValue": "33", + "id": 2883, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2431:1:13", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2416:17:13", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2885, "name": "unsignedOrderValues", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2298, - "src": "2519:19:10", + "referencedDeclaration": 2863, + "src": "2451:19:13", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$5_memory_ptr", "typeString": "uint256[5] memory" } }, - "id": 2320, + "id": 2887, "indexExpression": { "argumentTypes": null, "hexValue": "30", - "id": 2319, + "id": 2886, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "2539:1:10", + "src": "2471:1:13", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -4554,7 +4691,7 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "2519:22:10", + "src": "2451:22:13", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4564,29 +4701,29 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 2321, + "id": 2888, "name": "unsignedOrderValues", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2298, - "src": "2559:19:10", + "referencedDeclaration": 2863, + "src": "2491:19:13", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$5_memory_ptr", "typeString": "uint256[5] memory" } }, - "id": 2323, + "id": 2890, "indexExpression": { "argumentTypes": null, "hexValue": "31", - "id": 2322, + "id": 2889, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "2579:1:10", + "src": "2511:1:13", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", @@ -4599,7 +4736,7 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "2559:22:10", + "src": "2491:22:13", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4609,29 +4746,29 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 2324, + "id": 2891, "name": "unsignedOrderValues", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2298, - "src": "2599:19:10", + "referencedDeclaration": 2863, + "src": "2531:19:13", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$5_memory_ptr", "typeString": "uint256[5] memory" } }, - "id": 2326, + "id": 2893, "indexExpression": { "argumentTypes": null, "hexValue": "32", - "id": 2325, + "id": 2892, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "2619:1:10", + "src": "2551:1:13", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_2_by_1", @@ -4644,7 +4781,7 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "2599:22:10", + "src": "2531:22:13", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4654,29 +4791,29 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 2327, + "id": 2894, "name": "unsignedOrderValues", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2298, - "src": "2639:19:10", + "referencedDeclaration": 2863, + "src": "2571:19:13", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$5_memory_ptr", "typeString": "uint256[5] memory" } }, - "id": 2329, + "id": 2896, "indexExpression": { "argumentTypes": null, "hexValue": "33", - "id": 2328, + "id": 2895, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "2659:1:10", + "src": "2591:1:13", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_3_by_1", @@ -4689,7 +4826,7 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "2639:22:10", + "src": "2571:22:13", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4699,29 +4836,29 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 2330, + "id": 2897, "name": "unsignedOrderValues", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2298, - "src": "2679:19:10", + "referencedDeclaration": 2863, + "src": "2611:19:13", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$5_memory_ptr", "typeString": "uint256[5] memory" } }, - "id": 2332, + "id": 2899, "indexExpression": { "argumentTypes": null, "hexValue": "34", - "id": 2331, + "id": 2898, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "2699:1:10", + "src": "2631:1:13", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_4_by_1", @@ -4734,7 +4871,7 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "2679:22:10", + "src": "2611:22:13", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4742,12 +4879,12 @@ }, { "argumentTypes": null, - "id": 2333, + "id": 2900, "name": "orderQty", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2300, - "src": "2719:8:10", + "referencedDeclaration": 2865, + "src": "2651:8:13", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -4799,18 +4936,18 @@ ], "expression": { "argumentTypes": null, - "id": 2306, + "id": 2871, "name": "abi", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 5180, - "src": "2347:3:10", + "referencedDeclaration": 8170, + "src": "2277:3:13", "typeDescriptions": { "typeIdentifier": "t_magic_abi", "typeString": "abi" } }, - "id": 2307, + "id": 2872, "isConstant": false, "isLValue": false, "isPure": true, @@ -4818,13 +4955,13 @@ "memberName": "encodePacked", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "2347:16:10", + "src": "2277:16:13", "typeDescriptions": { "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", "typeString": "function () pure returns (bytes memory)" } }, - "id": 2334, + "id": 2901, "isConstant": false, "isLValue": false, "isPure": false, @@ -4832,7 +4969,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "2347:394:10", + "src": "2277:396:13", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" @@ -4846,18 +4983,18 @@ "typeString": "bytes memory" } ], - "id": 2305, + "id": 2870, "name": "keccak256", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 5187, - "src": "2324:9:10", + "referencedDeclaration": 8177, + "src": "2254:9:13", "typeDescriptions": { "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", "typeString": "function () pure returns (bytes32)" } }, - "id": 2335, + "id": 2902, "isConstant": false, "isLValue": false, "isPure": false, @@ -4865,21 +5002,21 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "2324:427:10", + "src": "2254:429:13", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "functionReturnParameters": 2304, - "id": 2336, + "functionReturnParameters": 2869, + "id": 2903, "nodeType": "Return", - "src": "2317:434:10" + "src": "2247:436:13" } ] }, - "documentation": "@notice creates the hash for the given order parameters.\n @param contractAddress address of the calling contract, orders are unique to each contract\n @param orderAddresses array of 3 address. maker, taker, and feeRecipient\n @param unsignedOrderValues array of 5 unsigned integers. makerFee, takerFee, price, expirationTimeStamp and salt\n @param orderQty signed qty of the original order.", - "id": 2338, + "documentation": "@notice creates the hash for the given order parameters.\n @param orderAddresses array of 4 address. marketContractAddress, maker, taker, and feeRecipient\n @param unsignedOrderValues array of 5 unsigned integers. makerFee, takerFee, price, expirationTimeStamp and salt\n @param orderQty signed qty of the original order.", + "id": 2905, "implemented": true, "isConstructor": false, "isDeclaredConst": true, @@ -4887,83 +5024,57 @@ "name": "createOrderHash", "nodeType": "FunctionDefinition", "parameters": { - "id": 2301, + "id": 2866, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2290, - "name": "contractAddress", - "nodeType": "VariableDeclaration", - "scope": 2338, - "src": "2149:23:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2289, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2149:7:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2294, + "id": 2859, "name": "orderAddresses", "nodeType": "VariableDeclaration", - "scope": 2338, - "src": "2182:25:10", + "scope": 2905, + "src": "2112:25:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$3_memory_ptr", - "typeString": "address[3]" + "typeIdentifier": "t_array$_t_address_$4_memory_ptr", + "typeString": "address[4]" }, "typeName": { "baseType": { - "id": 2291, + "id": 2856, "name": "address", "nodeType": "ElementaryTypeName", - "src": "2182:7:10", + "src": "2112:7:13", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "id": 2293, + "id": 2858, "length": { "argumentTypes": null, - "hexValue": "33", - "id": 2292, + "hexValue": "34", + "id": 2857, "isConstant": false, "isLValue": false, "isPure": false, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "2190:1:10", + "src": "2120:1:13", "subdenomination": null, "typeDescriptions": { "typeIdentifier": null, "typeString": null }, - "value": "3" + "value": "4" }, "nodeType": "ArrayTypeName", - "src": "2182:10:10", + "src": "2112:10:13", "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$3_storage_ptr", - "typeString": "address[3]" + "typeIdentifier": "t_array$_t_address_$4_storage_ptr", + "typeString": "address[4]" } }, "value": null, @@ -4971,11 +5082,11 @@ }, { "constant": false, - "id": 2298, + "id": 2863, "name": "unsignedOrderValues", "nodeType": "VariableDeclaration", - "scope": 2338, - "src": "2217:27:10", + "scope": 2905, + "src": "2147:27:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4984,27 +5095,27 @@ }, "typeName": { "baseType": { - "id": 2295, + "id": 2860, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "2217:4:10", + "src": "2147:4:13", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 2297, + "id": 2862, "length": { "argumentTypes": null, "hexValue": "35", - "id": 2296, + "id": 2861, "isConstant": false, "isLValue": false, "isPure": false, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "2222:1:10", + "src": "2152:1:13", "subdenomination": null, "typeDescriptions": { "typeIdentifier": null, @@ -5013,7 +5124,7 @@ "value": "5" }, "nodeType": "ArrayTypeName", - "src": "2217:7:10", + "src": "2147:7:13", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$5_storage_ptr", "typeString": "uint256[5]" @@ -5024,11 +5135,11 @@ }, { "constant": false, - "id": 2300, + "id": 2865, "name": "orderQty", "nodeType": "VariableDeclaration", - "scope": 2338, - "src": "2254:12:10", + "scope": 2905, + "src": "2184:12:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5036,10 +5147,10 @@ "typeString": "int256" }, "typeName": { - "id": 2299, + "id": 2864, "name": "int", "nodeType": "ElementaryTypeName", - "src": "2254:3:10", + "src": "2184:3:13", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -5049,20 +5160,20 @@ "visibility": "internal" } ], - "src": "2139:133:10" + "src": "2102:100:13" }, "payable": false, "returnParameters": { - "id": 2304, + "id": 2869, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2303, + "id": 2868, "name": "", "nodeType": "VariableDeclaration", - "scope": 2338, - "src": "2294:7:10", + "scope": 2905, + "src": "2224:7:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5070,10 +5181,10 @@ "typeString": "bytes32" }, "typeName": { - "id": 2302, + "id": 2867, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "2294:7:10", + "src": "2224:7:13", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -5083,19 +5194,19 @@ "visibility": "internal" } ], - "src": "2293:9:10" + "src": "2223:9:13" }, - "scope": 2511, - "src": "2115:643:10", + "scope": 3083, + "src": "2078:612:13", "stateMutability": "pure", "superFunction": null, "visibility": "public" }, { "body": { - "id": 2368, + "id": 2935, "nodeType": "Block", - "src": "3188:188:10", + "src": "3120:188:13", "statements": [ { "expression": { @@ -5104,19 +5215,19 @@ "typeIdentifier": "t_address", "typeString": "address" }, - "id": 2366, + "id": 2933, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 2353, + "id": 2920, "name": "signerAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2340, - "src": "3205:13:10", + "referencedDeclaration": 2907, + "src": "3137:13:13", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -5136,14 +5247,14 @@ { "argumentTypes": null, "hexValue": "19457468657265756d205369676e6564204d6573736167653a0a3332", - "id": 2358, + "id": 2925, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "3272:34:10", + "src": "3204:34:13", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_178a2411ab6fbc1ba11064408972259c558d0e82fd48b0aba3ad81d14f065e73", @@ -5153,12 +5264,12 @@ }, { "argumentTypes": null, - "id": 2359, + "id": 2926, "name": "hash", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2342, - "src": "3308:4:10", + "referencedDeclaration": 2909, + "src": "3240:4:13", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -5178,18 +5289,18 @@ ], "expression": { "argumentTypes": null, - "id": 2356, + "id": 2923, "name": "abi", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 5180, - "src": "3255:3:10", + "referencedDeclaration": 8170, + "src": "3187:3:13", "typeDescriptions": { "typeIdentifier": "t_magic_abi", "typeString": "abi" } }, - "id": 2357, + "id": 2924, "isConstant": false, "isLValue": false, "isPure": true, @@ -5197,13 +5308,13 @@ "memberName": "encodePacked", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "3255:16:10", + "src": "3187:16:13", "typeDescriptions": { "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", "typeString": "function () pure returns (bytes memory)" } }, - "id": 2360, + "id": 2927, "isConstant": false, "isLValue": false, "isPure": false, @@ -5211,7 +5322,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3255:58:10", + "src": "3187:58:13", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" @@ -5225,18 +5336,18 @@ "typeString": "bytes memory" } ], - "id": 2355, + "id": 2922, "name": "keccak256", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 5187, - "src": "3245:9:10", + "referencedDeclaration": 8177, + "src": "3177:9:13", "typeDescriptions": { "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", "typeString": "function () pure returns (bytes32)" } }, - "id": 2361, + "id": 2928, "isConstant": false, "isLValue": false, "isPure": false, @@ -5244,7 +5355,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3245:69:10", + "src": "3177:69:13", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -5252,12 +5363,12 @@ }, { "argumentTypes": null, - "id": 2362, + "id": 2929, "name": "v", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2344, - "src": "3328:1:10", + "referencedDeclaration": 2911, + "src": "3260:1:13", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" @@ -5265,12 +5376,12 @@ }, { "argumentTypes": null, - "id": 2363, + "id": 2930, "name": "r", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2346, - "src": "3343:1:10", + "referencedDeclaration": 2913, + "src": "3275:1:13", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -5278,12 +5389,12 @@ }, { "argumentTypes": null, - "id": 2364, + "id": 2931, "name": "s", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2348, - "src": "3358:1:10", + "referencedDeclaration": 2915, + "src": "3290:1:13", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -5309,18 +5420,18 @@ "typeString": "bytes32" } ], - "id": 2354, + "id": 2921, "name": "ecrecover", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 5185, - "src": "3222:9:10", + "referencedDeclaration": 8175, + "src": "3154:9:13", "typeDescriptions": { "typeIdentifier": "t_function_ecrecover_pure$_t_bytes32_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$_t_address_$", "typeString": "function (bytes32,uint8,bytes32,bytes32) pure returns (address)" } }, - "id": 2365, + "id": 2932, "isConstant": false, "isLValue": false, "isPure": false, @@ -5328,27 +5439,27 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3222:147:10", + "src": "3154:147:13", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "src": "3205:164:10", + "src": "3137:164:13", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "functionReturnParameters": 2352, - "id": 2367, + "functionReturnParameters": 2919, + "id": 2934, "nodeType": "Return", - "src": "3198:171:10" + "src": "3130:171:13" } ] }, "documentation": "@notice confirms hash originated from signer\n @param signerAddress - address of order originator\n @param hash - original order hash\n @param v order signature\n @param r order signature\n @param s order signature", - "id": 2369, + "id": 2936, "implemented": true, "isConstructor": false, "isDeclaredConst": true, @@ -5356,16 +5467,16 @@ "name": "isValidSignature", "nodeType": "FunctionDefinition", "parameters": { - "id": 2349, + "id": 2916, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2340, + "id": 2907, "name": "signerAddress", "nodeType": "VariableDeclaration", - "scope": 2369, - "src": "3052:21:10", + "scope": 2936, + "src": "2984:21:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5373,10 +5484,10 @@ "typeString": "address" }, "typeName": { - "id": 2339, + "id": 2906, "name": "address", "nodeType": "ElementaryTypeName", - "src": "3052:7:10", + "src": "2984:7:13", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -5387,11 +5498,11 @@ }, { "constant": false, - "id": 2342, + "id": 2909, "name": "hash", "nodeType": "VariableDeclaration", - "scope": 2369, - "src": "3083:12:10", + "scope": 2936, + "src": "3015:12:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5399,10 +5510,10 @@ "typeString": "bytes32" }, "typeName": { - "id": 2341, + "id": 2908, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "3083:7:10", + "src": "3015:7:13", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -5413,11 +5524,11 @@ }, { "constant": false, - "id": 2344, + "id": 2911, "name": "v", "nodeType": "VariableDeclaration", - "scope": 2369, - "src": "3105:7:10", + "scope": 2936, + "src": "3037:7:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5425,10 +5536,10 @@ "typeString": "uint8" }, "typeName": { - "id": 2343, + "id": 2910, "name": "uint8", "nodeType": "ElementaryTypeName", - "src": "3105:5:10", + "src": "3037:5:13", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" @@ -5439,11 +5550,11 @@ }, { "constant": false, - "id": 2346, + "id": 2913, "name": "r", "nodeType": "VariableDeclaration", - "scope": 2369, - "src": "3122:9:10", + "scope": 2936, + "src": "3054:9:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5451,10 +5562,10 @@ "typeString": "bytes32" }, "typeName": { - "id": 2345, + "id": 2912, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "3122:7:10", + "src": "3054:7:13", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -5465,11 +5576,11 @@ }, { "constant": false, - "id": 2348, + "id": 2915, "name": "s", "nodeType": "VariableDeclaration", - "scope": 2369, - "src": "3141:9:10", + "scope": 2936, + "src": "3073:9:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5477,10 +5588,10 @@ "typeString": "bytes32" }, "typeName": { - "id": 2347, + "id": 2914, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "3141:7:10", + "src": "3073:7:13", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -5490,20 +5601,20 @@ "visibility": "internal" } ], - "src": "3042:114:10" + "src": "2974:114:13" }, "payable": false, "returnParameters": { - "id": 2352, + "id": 2919, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2351, + "id": 2918, "name": "", "nodeType": "VariableDeclaration", - "scope": 2369, - "src": "3178:4:10", + "scope": 2936, + "src": "3110:4:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5511,10 +5622,10 @@ "typeString": "bool" }, "typeName": { - "id": 2350, + "id": 2917, "name": "bool", "nodeType": "ElementaryTypeName", - "src": "3178:4:10", + "src": "3110:4:13", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -5524,24 +5635,24 @@ "visibility": "internal" } ], - "src": "3177:6:10" + "src": "3109:6:13" }, - "scope": 2511, - "src": "3017:359:10", + "scope": 3083, + "src": "2949:359:13", "stateMutability": "pure", "superFunction": null, "visibility": "public" }, { "body": { - "id": 2461, + "id": 3033, "nodeType": "Block", - "src": "4038:558:10", + "src": "3861:586:13", "statements": [ { "expression": { "argumentTypes": null, - "id": 2392, + "id": 2957, "isConstant": false, "isLValue": false, "isPure": false, @@ -5550,26 +5661,26 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 2386, + "id": 2951, "name": "order", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2384, - "src": "4048:5:10", + "referencedDeclaration": 2949, + "src": "3871:5:13", "typeDescriptions": { - "typeIdentifier": "t_struct$_Order_$2267_memory_ptr", + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", "typeString": "struct OrderLib.Order memory" } }, - "id": 2388, + "id": 2953, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, - "memberName": "maker", + "memberName": "marketContractAddress", "nodeType": "MemberAccess", - "referencedDeclaration": 2250, - "src": "4048:11:10", + "referencedDeclaration": 2815, + "src": "3871:27:13", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -5581,29 +5692,29 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 2389, + "id": 2954, "name": "orderAddresses", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2375, - "src": "4062:14:10", + "referencedDeclaration": 2940, + "src": "3901:14:13", "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$3_memory_ptr", - "typeString": "address[3] memory" + "typeIdentifier": "t_array$_t_address_$4_memory_ptr", + "typeString": "address[4] memory" } }, - "id": 2391, + "id": 2956, "indexExpression": { "argumentTypes": null, "hexValue": "30", - "id": 2390, + "id": 2955, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "4077:1:10", + "src": "3916:1:13", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -5616,26 +5727,26 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "4062:17:10", + "src": "3901:17:13", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "src": "4048:31:10", + "src": "3871:47:13", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "id": 2393, + "id": 2958, "nodeType": "ExpressionStatement", - "src": "4048:31:10" + "src": "3871:47:13" }, { "expression": { "argumentTypes": null, - "id": 2400, + "id": 2965, "isConstant": false, "isLValue": false, "isPure": false, @@ -5644,26 +5755,26 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 2394, + "id": 2959, "name": "order", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2384, - "src": "4089:5:10", + "referencedDeclaration": 2949, + "src": "3928:5:13", "typeDescriptions": { - "typeIdentifier": "t_struct$_Order_$2267_memory_ptr", + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", "typeString": "struct OrderLib.Order memory" } }, - "id": 2396, + "id": 2961, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, - "memberName": "taker", + "memberName": "maker", "nodeType": "MemberAccess", - "referencedDeclaration": 2252, - "src": "4089:11:10", + "referencedDeclaration": 2817, + "src": "3928:11:13", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -5675,29 +5786,29 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 2397, + "id": 2962, "name": "orderAddresses", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2375, - "src": "4103:14:10", + "referencedDeclaration": 2940, + "src": "3942:14:13", "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$3_memory_ptr", - "typeString": "address[3] memory" + "typeIdentifier": "t_array$_t_address_$4_memory_ptr", + "typeString": "address[4] memory" } }, - "id": 2399, + "id": 2964, "indexExpression": { "argumentTypes": null, "hexValue": "31", - "id": 2398, + "id": 2963, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "4118:1:10", + "src": "3957:1:13", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", @@ -5710,26 +5821,26 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "4103:17:10", + "src": "3942:17:13", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "src": "4089:31:10", + "src": "3928:31:13", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "id": 2401, + "id": 2966, "nodeType": "ExpressionStatement", - "src": "4089:31:10" + "src": "3928:31:13" }, { "expression": { "argumentTypes": null, - "id": 2408, + "id": 2973, "isConstant": false, "isLValue": false, "isPure": false, @@ -5738,26 +5849,26 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 2402, + "id": 2967, "name": "order", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2384, - "src": "4130:5:10", + "referencedDeclaration": 2949, + "src": "3969:5:13", "typeDescriptions": { - "typeIdentifier": "t_struct$_Order_$2267_memory_ptr", + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", "typeString": "struct OrderLib.Order memory" } }, - "id": 2404, + "id": 2969, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, - "memberName": "feeRecipient", + "memberName": "taker", "nodeType": "MemberAccess", - "referencedDeclaration": 2254, - "src": "4130:18:10", + "referencedDeclaration": 2819, + "src": "3969:11:13", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -5769,29 +5880,29 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 2405, + "id": 2970, "name": "orderAddresses", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2375, - "src": "4151:14:10", + "referencedDeclaration": 2940, + "src": "3983:14:13", "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$3_memory_ptr", - "typeString": "address[3] memory" + "typeIdentifier": "t_array$_t_address_$4_memory_ptr", + "typeString": "address[4] memory" } }, - "id": 2407, + "id": 2972, "indexExpression": { "argumentTypes": null, "hexValue": "32", - "id": 2406, + "id": 2971, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "4166:1:10", + "src": "3998:1:13", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_2_by_1", @@ -5804,26 +5915,120 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "4151:17:10", + "src": "3983:17:13", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "3969:31:13", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2974, + "nodeType": "ExpressionStatement", + "src": "3969:31:13" + }, + { + "expression": { + "argumentTypes": null, + "id": 2981, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2975, + "name": "order", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2949, + "src": "4010:5:13", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", + "typeString": "struct OrderLib.Order memory" + } + }, + "id": 2977, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "feeRecipient", + "nodeType": "MemberAccess", + "referencedDeclaration": 2821, + "src": "4010:18:13", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2978, + "name": "orderAddresses", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2940, + "src": "4031:14:13", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$4_memory_ptr", + "typeString": "address[4] memory" + } + }, + "id": 2980, + "indexExpression": { + "argumentTypes": null, + "hexValue": "33", + "id": 2979, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4046:1:13", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4031:17:13", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "src": "4130:38:10", + "src": "4010:38:13", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "id": 2409, + "id": 2982, "nodeType": "ExpressionStatement", - "src": "4130:38:10" + "src": "4010:38:13" }, { "expression": { "argumentTypes": null, - "id": 2416, + "id": 2989, "isConstant": false, "isLValue": false, "isPure": false, @@ -5832,26 +6037,26 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 2410, + "id": 2983, "name": "order", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2384, - "src": "4178:5:10", + "referencedDeclaration": 2949, + "src": "4058:5:13", "typeDescriptions": { - "typeIdentifier": "t_struct$_Order_$2267_memory_ptr", + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", "typeString": "struct OrderLib.Order memory" } }, - "id": 2412, + "id": 2985, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "memberName": "makerFee", "nodeType": "MemberAccess", - "referencedDeclaration": 2256, - "src": "4178:14:10", + "referencedDeclaration": 2823, + "src": "4058:14:13", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5863,29 +6068,29 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 2413, + "id": 2986, "name": "unsignedOrderValues", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2379, - "src": "4195:19:10", + "referencedDeclaration": 2944, + "src": "4075:19:13", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$5_memory_ptr", "typeString": "uint256[5] memory" } }, - "id": 2415, + "id": 2988, "indexExpression": { "argumentTypes": null, "hexValue": "30", - "id": 2414, + "id": 2987, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "4215:1:10", + "src": "4095:1:13", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -5898,26 +6103,26 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "4195:22:10", + "src": "4075:22:13", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "4178:39:10", + "src": "4058:39:13", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 2417, + "id": 2990, "nodeType": "ExpressionStatement", - "src": "4178:39:10" + "src": "4058:39:13" }, { "expression": { "argumentTypes": null, - "id": 2424, + "id": 2997, "isConstant": false, "isLValue": false, "isPure": false, @@ -5926,26 +6131,26 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 2418, + "id": 2991, "name": "order", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2384, - "src": "4227:5:10", + "referencedDeclaration": 2949, + "src": "4107:5:13", "typeDescriptions": { - "typeIdentifier": "t_struct$_Order_$2267_memory_ptr", + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", "typeString": "struct OrderLib.Order memory" } }, - "id": 2420, + "id": 2993, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "memberName": "takerFee", "nodeType": "MemberAccess", - "referencedDeclaration": 2258, - "src": "4227:14:10", + "referencedDeclaration": 2825, + "src": "4107:14:13", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5957,29 +6162,29 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 2421, + "id": 2994, "name": "unsignedOrderValues", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2379, - "src": "4244:19:10", + "referencedDeclaration": 2944, + "src": "4124:19:13", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$5_memory_ptr", "typeString": "uint256[5] memory" } }, - "id": 2423, + "id": 2996, "indexExpression": { "argumentTypes": null, "hexValue": "31", - "id": 2422, + "id": 2995, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "4264:1:10", + "src": "4144:1:13", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", @@ -5992,26 +6197,26 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "4244:22:10", + "src": "4124:22:13", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "4227:39:10", + "src": "4107:39:13", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 2425, + "id": 2998, "nodeType": "ExpressionStatement", - "src": "4227:39:10" + "src": "4107:39:13" }, { "expression": { "argumentTypes": null, - "id": 2432, + "id": 3005, "isConstant": false, "isLValue": false, "isPure": false, @@ -6020,26 +6225,26 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 2426, + "id": 2999, "name": "order", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2384, - "src": "4276:5:10", + "referencedDeclaration": 2949, + "src": "4156:5:13", "typeDescriptions": { - "typeIdentifier": "t_struct$_Order_$2267_memory_ptr", + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", "typeString": "struct OrderLib.Order memory" } }, - "id": 2428, + "id": 3001, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "memberName": "price", "nodeType": "MemberAccess", - "referencedDeclaration": 2260, - "src": "4276:11:10", + "referencedDeclaration": 2827, + "src": "4156:11:13", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6051,29 +6256,29 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 2429, + "id": 3002, "name": "unsignedOrderValues", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2379, - "src": "4290:19:10", + "referencedDeclaration": 2944, + "src": "4170:19:13", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$5_memory_ptr", "typeString": "uint256[5] memory" } }, - "id": 2431, + "id": 3004, "indexExpression": { "argumentTypes": null, "hexValue": "32", - "id": 2430, + "id": 3003, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "4310:1:10", + "src": "4190:1:13", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_2_by_1", @@ -6086,26 +6291,26 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "4290:22:10", + "src": "4170:22:13", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "4276:36:10", + "src": "4156:36:13", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 2433, + "id": 3006, "nodeType": "ExpressionStatement", - "src": "4276:36:10" + "src": "4156:36:13" }, { "expression": { "argumentTypes": null, - "id": 2440, + "id": 3013, "isConstant": false, "isLValue": false, "isPure": false, @@ -6114,26 +6319,26 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 2434, + "id": 3007, "name": "order", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2384, - "src": "4322:5:10", + "referencedDeclaration": 2949, + "src": "4202:5:13", "typeDescriptions": { - "typeIdentifier": "t_struct$_Order_$2267_memory_ptr", + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", "typeString": "struct OrderLib.Order memory" } }, - "id": 2436, + "id": 3009, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "memberName": "expirationTimeStamp", "nodeType": "MemberAccess", - "referencedDeclaration": 2262, - "src": "4322:25:10", + "referencedDeclaration": 2829, + "src": "4202:25:13", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6145,29 +6350,29 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 2437, + "id": 3010, "name": "unsignedOrderValues", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2379, - "src": "4350:19:10", + "referencedDeclaration": 2944, + "src": "4230:19:13", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$5_memory_ptr", "typeString": "uint256[5] memory" } }, - "id": 2439, + "id": 3012, "indexExpression": { "argumentTypes": null, "hexValue": "33", - "id": 2438, + "id": 3011, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "4370:1:10", + "src": "4250:1:13", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_3_by_1", @@ -6180,26 +6385,26 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "4350:22:10", + "src": "4230:22:13", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "4322:50:10", + "src": "4202:50:13", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 2441, + "id": 3014, "nodeType": "ExpressionStatement", - "src": "4322:50:10" + "src": "4202:50:13" }, { "expression": { "argumentTypes": null, - "id": 2446, + "id": 3019, "isConstant": false, "isLValue": false, "isPure": false, @@ -6208,26 +6413,26 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 2442, + "id": 3015, "name": "order", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2384, - "src": "4382:5:10", + "referencedDeclaration": 2949, + "src": "4262:5:13", "typeDescriptions": { - "typeIdentifier": "t_struct$_Order_$2267_memory_ptr", + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", "typeString": "struct OrderLib.Order memory" } }, - "id": 2444, + "id": 3017, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "memberName": "qty", "nodeType": "MemberAccess", - "referencedDeclaration": 2264, - "src": "4382:9:10", + "referencedDeclaration": 2831, + "src": "4262:9:13", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -6237,31 +6442,31 @@ "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 2445, + "id": 3018, "name": "orderQty", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2381, - "src": "4394:8:10", + "referencedDeclaration": 2946, + "src": "4274:8:13", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, - "src": "4382:20:10", + "src": "4262:20:13", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, - "id": 2447, + "id": 3020, "nodeType": "ExpressionStatement", - "src": "4382:20:10" + "src": "4262:20:13" }, { "expression": { "argumentTypes": null, - "id": 2457, + "id": 3029, "isConstant": false, "isLValue": false, "isPure": false, @@ -6270,26 +6475,26 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 2448, + "id": 3021, "name": "order", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2384, - "src": "4412:5:10", + "referencedDeclaration": 2949, + "src": "4292:5:13", "typeDescriptions": { - "typeIdentifier": "t_struct$_Order_$2267_memory_ptr", + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", "typeString": "struct OrderLib.Order memory" } }, - "id": 2450, + "id": 3023, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "memberName": "orderHash", "nodeType": "MemberAccess", - "referencedDeclaration": 2266, - "src": "4412:15:10", + "referencedDeclaration": 2833, + "src": "4292:15:13", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -6302,38 +6507,25 @@ "arguments": [ { "argumentTypes": null, - "id": 2452, - "name": "contractAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2371, - "src": "4459:15:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 2453, + "id": 3025, "name": "orderAddresses", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2375, - "src": "4488:14:10", + "referencedDeclaration": 2940, + "src": "4339:14:13", "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$3_memory_ptr", - "typeString": "address[3] memory" + "typeIdentifier": "t_array$_t_address_$4_memory_ptr", + "typeString": "address[4] memory" } }, { "argumentTypes": null, - "id": 2454, + "id": 3026, "name": "unsignedOrderValues", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2379, - "src": "4516:19:10", + "referencedDeclaration": 2944, + "src": "4367:19:13", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$5_memory_ptr", "typeString": "uint256[5] memory" @@ -6341,12 +6533,12 @@ }, { "argumentTypes": null, - "id": 2455, + "id": 3027, "name": "orderQty", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2381, - "src": "4549:8:10", + "referencedDeclaration": 2946, + "src": "4400:8:13", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -6356,12 +6548,8 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_array$_t_address_$3_memory_ptr", - "typeString": "address[3] memory" + "typeIdentifier": "t_array$_t_address_$4_memory_ptr", + "typeString": "address[4] memory" }, { "typeIdentifier": "t_array$_t_uint256_$5_memory_ptr", @@ -6372,18 +6560,18 @@ "typeString": "int256" } ], - "id": 2451, + "id": 3024, "name": "createOrderHash", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2338, - "src": "4430:15:10", + "referencedDeclaration": 2905, + "src": "4310:15:13", "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_address_$_t_array$_t_address_$3_memory_ptr_$_t_array$_t_uint256_$5_memory_ptr_$_t_int256_$returns$_t_bytes32_$", - "typeString": "function (address,address[3] memory,uint256[5] memory,int256) pure returns (bytes32)" + "typeIdentifier": "t_function_internal_pure$_t_array$_t_address_$4_memory_ptr_$_t_array$_t_uint256_$5_memory_ptr_$_t_int256_$returns$_t_bytes32_$", + "typeString": "function (address[4] memory,uint256[5] memory,int256) pure returns (bytes32)" } }, - "id": 2456, + "id": 3028, "isConstant": false, "isLValue": false, "isPure": false, @@ -6391,45 +6579,45 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "4430:137:10", + "src": "4310:108:13", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "src": "4412:155:10", + "src": "4292:126:13", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "id": 2458, + "id": 3030, "nodeType": "ExpressionStatement", - "src": "4412:155:10" + "src": "4292:126:13" }, { "expression": { "argumentTypes": null, - "id": 2459, + "id": 3031, "name": "order", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2384, - "src": "4584:5:10", + "referencedDeclaration": 2949, + "src": "4435:5:13", "typeDescriptions": { - "typeIdentifier": "t_struct$_Order_$2267_memory_ptr", + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", "typeString": "struct OrderLib.Order memory" } }, - "functionReturnParameters": 2385, - "id": 2460, + "functionReturnParameters": 2950, + "id": 3032, "nodeType": "Return", - "src": "4577:12:10" + "src": "4428:12:13" } ] }, - "documentation": "@dev factory for orders to be created with needed hash.\n @param contractAddress address of the calling contract, orders are unique to each contract\n @param orderAddresses array of 3 address. maker, taker, and feeRecipient\n @param unsignedOrderValues array of 5 unsigned integers. makerFee, takerFee, price, expirationTimeStamp and salt\n @param orderQty signed qty of the original order.", - "id": 2462, + "documentation": "@dev factory for orders to be created with needed hash.\n @param orderAddresses array of 4 address. marketContractAddress, maker, taker, and feeRecipient\n @param unsignedOrderValues array of 5 unsigned integers. makerFee, takerFee, price, expirationTimeStamp and salt\n @param orderQty signed qty of the original order.", + "id": 3034, "implemented": true, "isConstructor": false, "isDeclaredConst": true, @@ -6437,83 +6625,57 @@ "name": "createOrder", "nodeType": "FunctionDefinition", "parameters": { - "id": 2382, + "id": 2947, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2371, - "name": "contractAddress", - "nodeType": "VariableDeclaration", - "scope": 2462, - "src": "3874:23:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2370, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3874:7:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2375, + "id": 2940, "name": "orderAddresses", "nodeType": "VariableDeclaration", - "scope": 2462, - "src": "3907:25:10", + "scope": 3034, + "src": "3730:25:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$3_memory_ptr", - "typeString": "address[3]" + "typeIdentifier": "t_array$_t_address_$4_memory_ptr", + "typeString": "address[4]" }, "typeName": { "baseType": { - "id": 2372, + "id": 2937, "name": "address", "nodeType": "ElementaryTypeName", - "src": "3907:7:10", + "src": "3730:7:13", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "id": 2374, + "id": 2939, "length": { "argumentTypes": null, - "hexValue": "33", - "id": 2373, + "hexValue": "34", + "id": 2938, "isConstant": false, "isLValue": false, "isPure": false, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "3915:1:10", + "src": "3738:1:13", "subdenomination": null, "typeDescriptions": { "typeIdentifier": null, "typeString": null }, - "value": "3" + "value": "4" }, "nodeType": "ArrayTypeName", - "src": "3907:10:10", + "src": "3730:10:13", "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$3_storage_ptr", - "typeString": "address[3]" + "typeIdentifier": "t_array$_t_address_$4_storage_ptr", + "typeString": "address[4]" } }, "value": null, @@ -6521,11 +6683,11 @@ }, { "constant": false, - "id": 2379, + "id": 2944, "name": "unsignedOrderValues", "nodeType": "VariableDeclaration", - "scope": 2462, - "src": "3942:27:10", + "scope": 3034, + "src": "3765:27:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -6534,27 +6696,27 @@ }, "typeName": { "baseType": { - "id": 2376, + "id": 2941, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "3942:4:10", + "src": "3765:4:13", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 2378, + "id": 2943, "length": { "argumentTypes": null, "hexValue": "35", - "id": 2377, + "id": 2942, "isConstant": false, "isLValue": false, "isPure": false, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "3947:1:10", + "src": "3770:1:13", "subdenomination": null, "typeDescriptions": { "typeIdentifier": null, @@ -6563,7 +6725,7 @@ "value": "5" }, "nodeType": "ArrayTypeName", - "src": "3942:7:10", + "src": "3765:7:13", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$5_storage_ptr", "typeString": "uint256[5]" @@ -6574,11 +6736,11 @@ }, { "constant": false, - "id": 2381, + "id": 2946, "name": "orderQty", "nodeType": "VariableDeclaration", - "scope": 2462, - "src": "3979:12:10", + "scope": 3034, + "src": "3802:12:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -6586,10 +6748,10 @@ "typeString": "int256" }, "typeName": { - "id": 2380, + "id": 2945, "name": "int", "nodeType": "ElementaryTypeName", - "src": "3979:3:10", + "src": "3802:3:13", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -6599,35 +6761,35 @@ "visibility": "internal" } ], - "src": "3864:133:10" + "src": "3720:100:13" }, "payable": false, "returnParameters": { - "id": 2385, + "id": 2950, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2384, + "id": 2949, "name": "order", "nodeType": "VariableDeclaration", - "scope": 2462, - "src": "4021:11:10", + "scope": 3034, + "src": "3844:11:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_struct$_Order_$2267_memory_ptr", + "typeIdentifier": "t_struct$_Order_$2834_memory_ptr", "typeString": "struct OrderLib.Order" }, "typeName": { "contractScope": null, - "id": 2383, + "id": 2948, "name": "Order", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2267, - "src": "4021:5:10", + "referencedDeclaration": 2834, + "src": "3844:5:13", "typeDescriptions": { - "typeIdentifier": "t_struct$_Order_$2267_storage_ptr", + "typeIdentifier": "t_struct$_Order_$2834_storage_ptr", "typeString": "struct OrderLib.Order" } }, @@ -6635,24 +6797,24 @@ "visibility": "internal" } ], - "src": "4020:13:10" + "src": "3843:13:13" }, - "scope": 2511, - "src": "3844:752:10", + "scope": 3083, + "src": "3700:747:13", "stateMutability": "pure", "superFunction": null, "visibility": "internal" }, { "body": { - "id": 2485, + "id": 3057, "nodeType": "Block", - "src": "4902:95:10", + "src": "4753:95:13", "statements": [ { "expression": { "argumentTypes": null, - "id": 2483, + "id": 3055, "isConstant": false, "isLValue": false, "isPure": false, @@ -6663,40 +6825,40 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 2471, + "id": 3043, "name": "self", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2464, - "src": "4912:4:10", + "referencedDeclaration": 3036, + "src": "4763:4:13", "typeDescriptions": { - "typeIdentifier": "t_struct$_OrderMappings_$2248_storage_ptr", + "typeIdentifier": "t_struct$_OrderMappings_$2813_storage_ptr", "typeString": "struct OrderLib.OrderMappings storage pointer" } }, - "id": 2474, + "id": 3046, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "filledOrderQty", "nodeType": "MemberAccess", - "referencedDeclaration": 2243, - "src": "4912:19:10", + "referencedDeclaration": 2808, + "src": "4763:19:13", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_int256_$", "typeString": "mapping(bytes32 => int256)" } }, - "id": 2475, + "id": 3047, "indexExpression": { "argumentTypes": null, - "id": 2473, + "id": 3045, "name": "orderHash", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2466, - "src": "4932:9:10", + "referencedDeclaration": 3038, + "src": "4783:9:13", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -6707,7 +6869,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "4912:30:10", + "src": "4763:30:13", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -6720,12 +6882,12 @@ "arguments": [ { "argumentTypes": null, - "id": 2481, + "id": 3053, "name": "filledQty", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2468, - "src": "4980:9:10", + "referencedDeclaration": 3040, + "src": "4831:9:13", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -6745,40 +6907,40 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 2476, + "id": 3048, "name": "self", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2464, - "src": "4945:4:10", + "referencedDeclaration": 3036, + "src": "4796:4:13", "typeDescriptions": { - "typeIdentifier": "t_struct$_OrderMappings_$2248_storage_ptr", + "typeIdentifier": "t_struct$_OrderMappings_$2813_storage_ptr", "typeString": "struct OrderLib.OrderMappings storage pointer" } }, - "id": 2477, + "id": 3049, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "filledOrderQty", "nodeType": "MemberAccess", - "referencedDeclaration": 2243, - "src": "4945:19:10", + "referencedDeclaration": 2808, + "src": "4796:19:13", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_int256_$", "typeString": "mapping(bytes32 => int256)" } }, - "id": 2479, + "id": 3051, "indexExpression": { "argumentTypes": null, - "id": 2478, + "id": 3050, "name": "orderHash", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2466, - "src": "4965:9:10", + "referencedDeclaration": 3038, + "src": "4816:9:13", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -6789,27 +6951,27 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "4945:30:10", + "src": "4796:30:13", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, - "id": 2480, + "id": 3052, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "add", "nodeType": "MemberAccess", - "referencedDeclaration": 2036, - "src": "4945:34:10", + "referencedDeclaration": 2601, + "src": "4796:34:13", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_int256_$bound_to$_t_int256_$", "typeString": "function (int256,int256) pure returns (int256)" } }, - "id": 2482, + "id": 3054, "isConstant": false, "isLValue": false, "isPure": false, @@ -6817,26 +6979,26 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "4945:45:10", + "src": "4796:45:13", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, - "src": "4912:78:10", + "src": "4763:78:13", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, - "id": 2484, + "id": 3056, "nodeType": "ExpressionStatement", - "src": "4912:78:10" + "src": "4763:78:13" } ] }, "documentation": null, - "id": 2486, + "id": 3058, "implemented": true, "isConstructor": false, "isDeclaredConst": false, @@ -6844,31 +7006,31 @@ "name": "addFilledQtyToOrder", "nodeType": "FunctionDefinition", "parameters": { - "id": 2469, + "id": 3041, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2464, + "id": 3036, "name": "self", "nodeType": "VariableDeclaration", - "scope": 2486, - "src": "4831:26:10", + "scope": 3058, + "src": "4682:26:13", "stateVariable": false, "storageLocation": "storage", "typeDescriptions": { - "typeIdentifier": "t_struct$_OrderMappings_$2248_storage_ptr", + "typeIdentifier": "t_struct$_OrderMappings_$2813_storage_ptr", "typeString": "struct OrderLib.OrderMappings" }, "typeName": { "contractScope": null, - "id": 2463, + "id": 3035, "name": "OrderMappings", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2248, - "src": "4831:13:10", + "referencedDeclaration": 2813, + "src": "4682:13:13", "typeDescriptions": { - "typeIdentifier": "t_struct$_OrderMappings_$2248_storage_ptr", + "typeIdentifier": "t_struct$_OrderMappings_$2813_storage_ptr", "typeString": "struct OrderLib.OrderMappings" } }, @@ -6877,11 +7039,11 @@ }, { "constant": false, - "id": 2466, + "id": 3038, "name": "orderHash", "nodeType": "VariableDeclaration", - "scope": 2486, - "src": "4859:17:10", + "scope": 3058, + "src": "4710:17:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -6889,10 +7051,10 @@ "typeString": "bytes32" }, "typeName": { - "id": 2465, + "id": 3037, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "4859:7:10", + "src": "4710:7:13", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -6903,11 +7065,11 @@ }, { "constant": false, - "id": 2468, + "id": 3040, "name": "filledQty", "nodeType": "VariableDeclaration", - "scope": 2486, - "src": "4878:13:10", + "scope": 3058, + "src": "4729:13:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -6915,10 +7077,10 @@ "typeString": "int256" }, "typeName": { - "id": 2467, + "id": 3039, "name": "int", "nodeType": "ElementaryTypeName", - "src": "4878:3:10", + "src": "4729:3:13", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -6928,31 +7090,31 @@ "visibility": "internal" } ], - "src": "4830:62:10" + "src": "4681:62:13" }, "payable": false, "returnParameters": { - "id": 2470, + "id": 3042, "nodeType": "ParameterList", "parameters": [], - "src": "4902:0:10" + "src": "4753:0:13" }, - "scope": 2511, - "src": "4802:195:10", + "scope": 3083, + "src": "4653:195:13", "stateMutability": "nonpayable", "superFunction": null, "visibility": "internal" }, { "body": { - "id": 2509, + "id": 3081, "nodeType": "Block", - "src": "5297:104:10", + "src": "5148:104:13", "statements": [ { "expression": { "argumentTypes": null, - "id": 2507, + "id": 3079, "isConstant": false, "isLValue": false, "isPure": false, @@ -6963,40 +7125,40 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 2495, + "id": 3067, "name": "self", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2488, - "src": "5307:4:10", + "referencedDeclaration": 3060, + "src": "5158:4:13", "typeDescriptions": { - "typeIdentifier": "t_struct$_OrderMappings_$2248_storage_ptr", + "typeIdentifier": "t_struct$_OrderMappings_$2813_storage_ptr", "typeString": "struct OrderLib.OrderMappings storage pointer" } }, - "id": 2498, + "id": 3070, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "cancelledOrderQty", "nodeType": "MemberAccess", - "referencedDeclaration": 2247, - "src": "5307:22:10", + "referencedDeclaration": 2812, + "src": "5158:22:13", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_int256_$", "typeString": "mapping(bytes32 => int256)" } }, - "id": 2499, + "id": 3071, "indexExpression": { "argumentTypes": null, - "id": 2497, + "id": 3069, "name": "orderHash", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2490, - "src": "5330:9:10", + "referencedDeclaration": 3062, + "src": "5181:9:13", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -7007,7 +7169,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "5307:33:10", + "src": "5158:33:13", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -7020,12 +7182,12 @@ "arguments": [ { "argumentTypes": null, - "id": 2505, + "id": 3077, "name": "cancelledQty", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2492, - "src": "5381:12:10", + "referencedDeclaration": 3064, + "src": "5232:12:13", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -7045,40 +7207,40 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 2500, + "id": 3072, "name": "self", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2488, - "src": "5343:4:10", + "referencedDeclaration": 3060, + "src": "5194:4:13", "typeDescriptions": { - "typeIdentifier": "t_struct$_OrderMappings_$2248_storage_ptr", + "typeIdentifier": "t_struct$_OrderMappings_$2813_storage_ptr", "typeString": "struct OrderLib.OrderMappings storage pointer" } }, - "id": 2501, + "id": 3073, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "cancelledOrderQty", "nodeType": "MemberAccess", - "referencedDeclaration": 2247, - "src": "5343:22:10", + "referencedDeclaration": 2812, + "src": "5194:22:13", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_int256_$", "typeString": "mapping(bytes32 => int256)" } }, - "id": 2503, + "id": 3075, "indexExpression": { "argumentTypes": null, - "id": 2502, + "id": 3074, "name": "orderHash", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2490, - "src": "5366:9:10", + "referencedDeclaration": 3062, + "src": "5217:9:13", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -7089,27 +7251,27 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "5343:33:10", + "src": "5194:33:13", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, - "id": 2504, + "id": 3076, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "add", "nodeType": "MemberAccess", - "referencedDeclaration": 2036, - "src": "5343:37:10", + "referencedDeclaration": 2601, + "src": "5194:37:13", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_int256_$bound_to$_t_int256_$", "typeString": "function (int256,int256) pure returns (int256)" } }, - "id": 2506, + "id": 3078, "isConstant": false, "isLValue": false, "isPure": false, @@ -7117,26 +7279,26 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "5343:51:10", + "src": "5194:51:13", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, - "src": "5307:87:10", + "src": "5158:87:13", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, - "id": 2508, + "id": 3080, "nodeType": "ExpressionStatement", - "src": "5307:87:10" + "src": "5158:87:13" } ] }, "documentation": null, - "id": 2510, + "id": 3082, "implemented": true, "isConstructor": false, "isDeclaredConst": false, @@ -7144,31 +7306,31 @@ "name": "addCancelledQtyToOrder", "nodeType": "FunctionDefinition", "parameters": { - "id": 2493, + "id": 3065, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2488, + "id": 3060, "name": "self", "nodeType": "VariableDeclaration", - "scope": 2510, - "src": "5223:26:10", + "scope": 3082, + "src": "5074:26:13", "stateVariable": false, "storageLocation": "storage", "typeDescriptions": { - "typeIdentifier": "t_struct$_OrderMappings_$2248_storage_ptr", + "typeIdentifier": "t_struct$_OrderMappings_$2813_storage_ptr", "typeString": "struct OrderLib.OrderMappings" }, "typeName": { "contractScope": null, - "id": 2487, + "id": 3059, "name": "OrderMappings", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2248, - "src": "5223:13:10", + "referencedDeclaration": 2813, + "src": "5074:13:13", "typeDescriptions": { - "typeIdentifier": "t_struct$_OrderMappings_$2248_storage_ptr", + "typeIdentifier": "t_struct$_OrderMappings_$2813_storage_ptr", "typeString": "struct OrderLib.OrderMappings" } }, @@ -7177,11 +7339,11 @@ }, { "constant": false, - "id": 2490, + "id": 3062, "name": "orderHash", "nodeType": "VariableDeclaration", - "scope": 2510, - "src": "5251:17:10", + "scope": 3082, + "src": "5102:17:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -7189,10 +7351,10 @@ "typeString": "bytes32" }, "typeName": { - "id": 2489, + "id": 3061, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "5251:7:10", + "src": "5102:7:13", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -7203,11 +7365,11 @@ }, { "constant": false, - "id": 2492, + "id": 3064, "name": "cancelledQty", "nodeType": "VariableDeclaration", - "scope": 2510, - "src": "5270:16:10", + "scope": 3082, + "src": "5121:16:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -7215,10 +7377,10 @@ "typeString": "int256" }, "typeName": { - "id": 2491, + "id": 3063, "name": "int", "nodeType": "ElementaryTypeName", - "src": "5270:3:10", + "src": "5121:3:13", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -7228,27 +7390,27 @@ "visibility": "internal" } ], - "src": "5222:65:10" + "src": "5073:65:13" }, "payable": false, "returnParameters": { - "id": 2494, + "id": 3066, "nodeType": "ParameterList", "parameters": [], - "src": "5297:0:10" + "src": "5148:0:13" }, - "scope": 2511, - "src": "5191:210:10", + "scope": 3083, + "src": "5042:210:13", "stateMutability": "nonpayable", "superFunction": null, "visibility": "internal" } ], - "scope": 2512, - "src": "730:4673:10" + "scope": 3084, + "src": "730:4524:13" } ], - "src": "607:4798:10" + "src": "607:4649:13" }, "compiler": { "name": "solc", @@ -7258,10 +7420,10 @@ "4": { "events": {}, "links": {}, - "address": "0x1cf1af7f3df9e9075796c7a6bf8d91c3398fe984", - "transactionHash": "0xe9dfc82fcc0b64845ca9a24529a268a6ae1eee7913ed59b80c285b30c5c975d9" + "address": "0x0bcda746989ee743560712e4e8e48be30ce81852", + "transactionHash": "0xa7e7a6a234ae330b3b9412f790c6608c39d19d65da260c5936bc46cf8e85a73b" } }, "schemaVersion": "2.0.1", - "updatedAt": "2018-10-05T14:03:26.623Z" + "updatedAt": "2018-10-16T03:15:00.591Z" } \ No newline at end of file From 084811ea1e000fa06462c1c31ff47db892803a24 Mon Sep 17 00:00:00 2001 From: Phil Elsasser Date: Mon, 15 Oct 2018 21:19:07 -0600 Subject: [PATCH 4/4] bump version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0fac7f6..605d28d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@marketprotocol/abis", - "version": "0.0.4", + "version": "0.1.0", "description": "MARKET Protocol truffle artifacts and ABIs", "main": "truffle-config.js", "scripts": {