From a72a5fe337c8bd4be5424a5f49f5004a03ffa263 Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Sun, 5 Jul 2020 15:36:55 +0300 Subject: [PATCH 001/113] Add truffle package --- package-lock.json | 621 +++++++++++++++++++++++++++++++++++++++++++--- package.json | 1 + 2 files changed, 581 insertions(+), 41 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1da85e8dc..5433a5e00 100644 --- a/package-lock.json +++ b/package-lock.json @@ -599,9 +599,9 @@ }, "dependencies": { "@types/node": { - "version": "12.12.50", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.50.tgz", - "integrity": "sha512-5ImO01Fb8YsEOYpV+aeyGYztcYcjGsBvN4D7G5r1ef2cuQOpymjWNQi5V0rKHE6PC2ru3HkoUr/Br2/8GUA84w==" + "version": "12.12.51", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.51.tgz", + "integrity": "sha512-6ILqt8iNThALrxDv2Q4LyYFQxULQz96HKNIFd4s9QRQaiHINYeUpLqeU/2IU7YMtvipG1fQVAy//vY8/fX1Y9w==" }, "aes-js": { "version": "3.0.0", @@ -2049,6 +2049,20 @@ "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", "integrity": "sha1-q8av7tzqUugJzcA3au0845Y10X8=" }, + "anymatch": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", + "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==", + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + } + }, + "app-module-path": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/app-module-path/-/app-module-path-2.2.0.tgz", + "integrity": "sha1-ZBqlXft9am8KgUHEucCqULbCTdU=" + }, "argparse": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", @@ -2088,6 +2102,17 @@ "es-abstract": "^1.17.0-next.1" } }, + "array.prototype.map": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array.prototype.map/-/array.prototype.map-1.0.2.tgz", + "integrity": "sha512-Az3OYxgsa1g7xDYp86l0nnN4bcmuEITGe1rbdEBVkrqkzMgDcbdQ2R7r41pNzti+4NMces3H8gMmuioZUilLgw==", + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0-next.1", + "es-array-method-boxes-properly": "^1.0.0", + "is-string": "^1.0.4" + } + }, "asn1": { "version": "0.2.4", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", @@ -2176,9 +2201,9 @@ "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" }, "aws-sdk": { - "version": "2.715.0", - "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.715.0.tgz", - "integrity": "sha512-O6ytb66IXFCowp0Ng2bSPM6v/cZVOhjJWFTR1CG4ieG4IroAaVgB3YQKkfPKA0Cy9B/Ovlsm7B737iuroKsd0w==", + "version": "2.716.0", + "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.716.0.tgz", + "integrity": "sha512-/tl65GnyU+vIBKdLALJzKUldr4W0zIjAFOOGgusGPjLPI7XZM8aIw04trQPfK+dcTrv/k7E1fceiEvTX0f+OOQ==", "requires": { "buffer": "4.9.2", "events": "1.1.1", @@ -2362,6 +2387,11 @@ "version": "git+https://github.com/debris/bignumber.js.git#94d7146671b9719e00a09c29b01a691bc85048c2", "from": "git+https://github.com/debris/bignumber.js.git#94d7146671b9719e00a09c29b01a691bc85048c2" }, + "binary-extensions": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.1.0.tgz", + "integrity": "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==" + }, "bip39": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/bip39/-/bip39-3.0.2.tgz", @@ -2793,6 +2823,21 @@ } } }, + "chokidar": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.3.1.tgz", + "integrity": "sha512-4QYCEWOcK3OJrxwvyyAOxFuhpvOVCYkr33LPfFNBjAD/w3sEzWsp2BUOkI4l9bHvWioAd0rc6NlHUOEaWkTeqg==", + "requires": { + "anymatch": "~3.1.1", + "braces": "~3.0.2", + "fsevents": "~2.1.2", + "glob-parent": "~5.1.0", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.3.0" + } + }, "chownr": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", @@ -3510,7 +3555,6 @@ "version": "1.1.3", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", - "dev": true, "requires": { "object-keys": "^1.0.12" } @@ -3748,7 +3792,6 @@ "version": "1.17.6", "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.6.tgz", "integrity": "sha512-Fr89bON3WFyUi5EvAeI48QTWX0AyekGgLA8H+c+7fbfCkJwRWRMLd8CQedNEyJuoYYhmtEqY92pgte1FAhBlhw==", - "dev": true, "requires": { "es-to-primitive": "^1.2.1", "function-bind": "^1.1.1", @@ -3763,11 +3806,36 @@ "string.prototype.trimstart": "^1.0.1" } }, + "es-array-method-boxes-properly": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz", + "integrity": "sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA==" + }, + "es-get-iterator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/es-get-iterator/-/es-get-iterator-1.1.0.tgz", + "integrity": "sha512-UfrmHuWQlNMTs35e1ypnvikg6jCz3SK8v8ImvmDsh36fCVUR1MqoFDiyn0/k52C8NqO3YsO8Oe0azeesNuqSsQ==", + "requires": { + "es-abstract": "^1.17.4", + "has-symbols": "^1.0.1", + "is-arguments": "^1.0.4", + "is-map": "^2.0.1", + "is-set": "^2.0.1", + "is-string": "^1.0.5", + "isarray": "^2.0.5" + }, + "dependencies": { + "isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==" + } + } + }, "es-to-primitive": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", - "dev": true, "requires": { "is-callable": "^1.1.4", "is-date-object": "^1.0.1", @@ -5200,6 +5268,14 @@ "semver-regex": "^2.0.0" } }, + "flat": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.0.tgz", + "integrity": "sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw==", + "requires": { + "is-buffer": "~2.0.3" + } + }, "flat-cache": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", @@ -5321,6 +5397,12 @@ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, + "fsevents": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", + "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", + "optional": true + }, "fstream": { "version": "1.0.12", "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.12.tgz", @@ -5350,8 +5432,7 @@ "function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" }, "function.name": { "version": "1.0.12", @@ -6189,7 +6270,6 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, "requires": { "function-bind": "^1.1.1" } @@ -6215,8 +6295,7 @@ "has-symbols": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", - "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", - "dev": true + "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==" }, "has-to-string-tag-x": { "version": "1.4.1", @@ -6760,11 +6839,24 @@ "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==" }, + "is-arguments": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.0.4.tgz", + "integrity": "sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA==" + }, "is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=" }, + "is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "requires": { + "binary-extensions": "^2.0.0" + } + }, "is-buffer": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz", @@ -6773,14 +6865,12 @@ "is-callable": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.0.tgz", - "integrity": "sha512-pyVD9AaGLxtg6srb2Ng6ynWJqkHU9bEM087AKck0w8QwDarTfNcpIYoU8x8Hv2Icm8u6kFJM18Dag8lyqGkviw==", - "dev": true + "integrity": "sha512-pyVD9AaGLxtg6srb2Ng6ynWJqkHU9bEM087AKck0w8QwDarTfNcpIYoU8x8Hv2Icm8u6kFJM18Dag8lyqGkviw==" }, "is-date-object": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", - "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==", - "dev": true + "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==" }, "is-directory": { "version": "0.3.1", @@ -6823,6 +6913,11 @@ "resolved": "https://registry.npmjs.org/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz", "integrity": "sha1-fY035q135dEnFIkTxXPggtd39VQ=" }, + "is-map": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.1.tgz", + "integrity": "sha512-T/S49scO8plUiAOA2DBTBG3JHpn1yiw0kRp6dgiZ0v2/6twi5eiB0rHtHFH9ZIrvlWc6+4O+m4zg5+Z833aXgw==" + }, "is-natural-number": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/is-natural-number/-/is-natural-number-4.0.1.tgz", @@ -6852,7 +6947,6 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.0.tgz", "integrity": "sha512-iI97M8KTWID2la5uYXlkbSDQIg4F6o1sYboZKKTDpnDQMLtUL86zxhgDet3Q2SriaYsyGqZ6Mn2SjbRKeLHdqw==", - "dev": true, "requires": { "has-symbols": "^1.0.1" } @@ -6867,6 +6961,11 @@ "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz", "integrity": "sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg==" }, + "is-set": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.1.tgz", + "integrity": "sha512-eJEzOtVyenDs1TMzSQ3kU3K+E0GUS9sno+F0OBT97xsgcJsF9nXMBtkT9/kut5JEpM7oL7X/0qxR17K3mcwIAA==" + }, "is-stream": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", @@ -6875,14 +6974,12 @@ "is-string": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.5.tgz", - "integrity": "sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ==", - "dev": true + "integrity": "sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ==" }, "is-symbol": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", - "dev": true, "requires": { "has-symbols": "^1.0.1" } @@ -7033,6 +7130,20 @@ "is-object": "^1.0.1" } }, + "iterate-iterator": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/iterate-iterator/-/iterate-iterator-1.0.1.tgz", + "integrity": "sha512-3Q6tudGN05kbkDQDI4CqjaBf4qf85w6W6GnuZDtUVYwKgtC1q8yxYX7CZed7N+tLzQqS6roujWvszf13T+n9aw==" + }, + "iterate-value": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/iterate-value/-/iterate-value-1.0.2.tgz", + "integrity": "sha512-A6fMAio4D2ot2r/TYzr4yUWrmwNdsN5xL7+HUiyACE4DXm+q8HtPcnFTp+NnW3k4N05tZ7FVYFFb2CR13NxyHQ==", + "requires": { + "es-get-iterator": "^1.0.2", + "iterate-iterator": "^1.0.1" + } + }, "jmespath": { "version": "0.15.0", "resolved": "https://registry.npmjs.org/jmespath/-/jmespath-0.15.0.tgz", @@ -7196,9 +7307,9 @@ } }, "keccak": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/keccak/-/keccak-3.0.0.tgz", - "integrity": "sha512-/4h4FIfFEpTEuySXi/nVFM5rqSKPnnhI7cL4K3MFSwoI3VyM7AhPSq3SsysARtnEBEeIKMBUWD8cTh9nHE8AkA==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/keccak/-/keccak-3.0.1.tgz", + "integrity": "sha512-epq90L9jlFWCW7+pQa6JOnKn2Xgl2mtI664seYR6MHskvI9agt7AnDqmAlp9TqU4/caMYbA08Hi5DMZAl5zdkA==", "requires": { "node-addon-api": "^2.0.0", "node-gyp-build": "^4.2.0" @@ -8118,9 +8229,9 @@ "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==" }, "node-gyp-build": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.2.2.tgz", - "integrity": "sha512-Lqh7mrByWCM8Cf9UPqpeoVBBo5Ugx+RKu885GAzmLBVYjeywScxHXPGLa4JfYNZmcNGwzR0Glu5/9GaQZMFqyA==" + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.2.3.tgz", + "integrity": "sha512-MN6ZpzmfNCRM+3t57PTJHgHyw/h4OWnZ6mR8P5j/uZtqQr46RRuDE/P+g3n0YR/AiYXeWixZZzaip77gdICfRg==" }, "node-interval-tree": { "version": "1.3.3", @@ -8243,20 +8354,17 @@ "object-inspect": { "version": "1.8.0", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.8.0.tgz", - "integrity": "sha512-jLdtEOB112fORuypAyl/50VRVIBIdVQOSUUGQHzJ4xBSbit81zRarz7GThkEFZy1RceYrWYcPcBFPQwHyAc1gA==", - "dev": true + "integrity": "sha512-jLdtEOB112fORuypAyl/50VRVIBIdVQOSUUGQHzJ4xBSbit81zRarz7GThkEFZy1RceYrWYcPcBFPQwHyAc1gA==" }, "object-keys": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==" }, "object.assign": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", - "dev": true, "requires": { "define-properties": "^1.1.2", "function-bind": "^1.1.1", @@ -8618,6 +8726,18 @@ "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==" }, + "promise.allsettled": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/promise.allsettled/-/promise.allsettled-1.0.2.tgz", + "integrity": "sha512-UpcYW5S1RaNKT6pd+s9jp9K9rlQge1UXKskec0j6Mmuq7UJCvlS2J2/s/yuPN8ehftf9HXMxWlKiPbGGUzpoRg==", + "requires": { + "array.prototype.map": "^1.0.1", + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0-next.1", + "function-bind": "^1.1.1", + "iterate-value": "^1.0.0" + } + }, "proxy-addr": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.6.tgz", @@ -8824,6 +8944,14 @@ "util-deprecate": "^1.0.1" } }, + "readdirp": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.3.0.tgz", + "integrity": "sha512-zz0pAkSPOXXm1viEwygWIPSPkcBYjW1xU5j/JBh5t9bGCJwa6f9+BJa6VaB2g+b55yVrmXzqkyLf4xaWYM0IkQ==", + "requires": { + "picomatch": "^2.0.7" + } + }, "rechoir": { "version": "0.6.2", "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", @@ -9183,9 +9311,9 @@ } }, "secp256k1": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-4.0.1.tgz", - "integrity": "sha512-iGRjbGAKfXMqhtdkkuNxsgJQfJO8Oo78Rm7DAvsG3XKngq+nJIOGqrCSXcQqIVsmCj0wFanE5uTKFxV3T9j2wg==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-4.0.2.tgz", + "integrity": "sha512-UDar4sKvWAksIlfX3xIaQReADn+WFnHvbVujpcbr+9Sf/69odMwy2MUsz5CKLQgX9nsIyrjuxL2imVyoNHa3fg==", "requires": { "elliptic": "^6.5.2", "node-addon-api": "^2.0.0", @@ -9257,6 +9385,11 @@ } } }, + "serialize-javascript": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-3.0.0.tgz", + "integrity": "sha512-skZcHYw2vEX4bw90nAr2iTTsz6x2SrHEnfxgKYmZlvJYBEZrvbKtobJWlQ20zczKb3bsHHXXTYt48zBA7ni9cw==" + }, "serve-static": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz", @@ -9989,9 +10122,9 @@ }, "dependencies": { "@types/node": { - "version": "12.12.50", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.50.tgz", - "integrity": "sha512-5ImO01Fb8YsEOYpV+aeyGYztcYcjGsBvN4D7G5r1ef2cuQOpymjWNQi5V0rKHE6PC2ru3HkoUr/Br2/8GUA84w==" + "version": "12.12.51", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.51.tgz", + "integrity": "sha512-6ILqt8iNThALrxDv2Q4LyYFQxULQz96HKNIFd4s9QRQaiHINYeUpLqeU/2IU7YMtvipG1fQVAy//vY8/fX1Y9w==" }, "aes-js": { "version": "3.0.0", @@ -11347,7 +11480,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz", "integrity": "sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g==", - "dev": true, "requires": { "define-properties": "^1.1.3", "es-abstract": "^1.17.5" @@ -11357,7 +11489,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz", "integrity": "sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw==", - "dev": true, "requires": { "define-properties": "^1.1.3", "es-abstract": "^1.17.5" @@ -11743,6 +11874,292 @@ "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=" }, + "truffle": { + "version": "5.1.36", + "resolved": "https://registry.npmjs.org/truffle/-/truffle-5.1.36.tgz", + "integrity": "sha512-BXfDrRJmxECsHFu1ZHeQNDdv3OA3vmwQ6Wp5m9yaE0swKcHS+gd8sBdxQBoliiAI0xvUAsD62PRGowqFfT1CLg==", + "requires": { + "app-module-path": "^2.2.0", + "mocha": "8.0.1", + "original-require": "1.0.1" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "dependencies": { + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "cliui": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "requires": { + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" + } + }, + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "requires": { + "ms": "^2.1.1" + } + }, + "diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==" + }, + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" + }, + "he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==" + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" + }, + "js-yaml": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "requires": { + "p-locate": "^4.1.0" + } + }, + "log-symbols": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz", + "integrity": "sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ==", + "requires": { + "chalk": "^2.4.2" + } + }, + "mocha": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-8.0.1.tgz", + "integrity": "sha512-vefaXfdYI8+Yo8nPZQQi0QO2o+5q9UIMX1jZ1XMmK3+4+CQjc7+B0hPdUeglXiTlr8IHMVRo63IhO9Mzt6fxOg==", + "requires": { + "ansi-colors": "4.1.1", + "browser-stdout": "1.3.1", + "chokidar": "3.3.1", + "debug": "3.2.6", + "diff": "4.0.2", + "escape-string-regexp": "1.0.5", + "find-up": "4.1.0", + "glob": "7.1.6", + "growl": "1.10.5", + "he": "1.2.0", + "js-yaml": "3.13.1", + "log-symbols": "3.0.0", + "minimatch": "3.0.4", + "ms": "2.1.2", + "object.assign": "4.1.0", + "promise.allsettled": "1.0.2", + "serialize-javascript": "3.0.0", + "strip-json-comments": "3.0.1", + "supports-color": "7.1.0", + "which": "2.0.2", + "wide-align": "1.1.3", + "workerpool": "6.0.0", + "yargs": "13.3.2", + "yargs-parser": "13.1.2", + "yargs-unparser": "1.6.0" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "requires": { + "p-limit": "^2.2.0" + } + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" + }, + "require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==" + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "requires": { + "ansi-regex": "^4.1.0" + } + }, + "strip-json-comments": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.0.1.tgz", + "integrity": "sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw==" + }, + "supports-color": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "requires": { + "has-flag": "^4.0.0" + }, + "dependencies": { + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + } + } + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "requires": { + "isexe": "^2.0.0" + } + }, + "wrap-ansi": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "requires": { + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" + } + }, + "yargs": { + "version": "13.3.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", + "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", + "requires": { + "cliui": "^5.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^13.1.2" + }, + "dependencies": { + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "requires": { + "locate-path": "^3.0.0" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "requires": { + "p-limit": "^2.0.0" + } + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" + } + } + }, + "yargs-parser": { + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + } + } + }, "truffle-code-utils": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/truffle-code-utils/-/truffle-code-utils-1.1.4.tgz", @@ -12714,6 +13131,14 @@ "resolved": "https://registry.npmjs.org/which-pm-runs/-/which-pm-runs-1.0.0.tgz", "integrity": "sha1-Zws6+8VS4LVd9rd4DKdGFfI60cs=" }, + "wide-align": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", + "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", + "requires": { + "string-width": "^1.0.2 || 2" + } + }, "word-wrap": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", @@ -12724,6 +13149,11 @@ "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=" }, + "workerpool": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.0.0.tgz", + "integrity": "sha512-fU2OcNA/GVAJLLyKUoHkAgIhKb0JoCpSjLC/G2vYKxUjVmQwGbRVeoPJ1a8U4pnVofz4AQV5Y/NEw8oKqxEBtA==" + }, "wrap-ansi": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", @@ -13043,6 +13473,115 @@ "decamelize": "^1.2.0" } }, + "yargs-unparser": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.0.tgz", + "integrity": "sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw==", + "requires": { + "flat": "^4.1.0", + "lodash": "^4.17.15", + "yargs": "^13.3.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "^1.9.0" + } + }, + "cliui": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "requires": { + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" + } + }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" + }, + "lodash": { + "version": "4.17.19", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", + "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==" + }, + "require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==" + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "requires": { + "ansi-regex": "^4.1.0" + } + }, + "wrap-ansi": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "requires": { + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" + } + }, + "yargs": { + "version": "13.3.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", + "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", + "requires": { + "cliui": "^5.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^13.1.2" + } + }, + "yargs-parser": { + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + } + } + }, "yauzl": { "version": "2.10.0", "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", diff --git a/package.json b/package.json index b6b06e1d9..43ad48a75 100644 --- a/package.json +++ b/package.json @@ -86,6 +86,7 @@ "solc": "0.6.12", "solhint": "^3.1.0", "tinyreq": "^3.4.1", + "truffle": "^5.1.36", "web3-eth-abi": "^1.2.9" }, "devDependencies": { From b4fda7c6d919b89b970d5a3a64368e2765b621d4 Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Tue, 28 Jul 2020 15:05:59 +0300 Subject: [PATCH 002/113] Switch contracts compile to use truffle --- contracts/Migrations.sol | 19 +++++ migrations/1_initial_migration.js | 5 ++ package.json | 18 ++--- truffle-config-contracts-legacy-1.3.js | 99 ++++++++++++++++++++++++++ truffle-config-contracts-legacy-1.6.js | 99 ++++++++++++++++++++++++++ truffle-config-contracts-test.js | 98 +++++++++++++++++++++++++ truffle-config-contracts.js | 98 +++++++++++++++++++++++++ truffle-config-infrastructure-0.5.js | 98 +++++++++++++++++++++++++ truffle-config-infrastructure.js | 98 +++++++++++++++++++++++++ truffle-config-lib.js | 27 +++++++ truffle-config-modules.js | 98 +++++++++++++++++++++++++ truffle-config-wallet.js | 98 +++++++++++++++++++++++++ 12 files changed, 846 insertions(+), 9 deletions(-) create mode 100644 contracts/Migrations.sol create mode 100644 migrations/1_initial_migration.js create mode 100644 truffle-config-contracts-legacy-1.3.js create mode 100644 truffle-config-contracts-legacy-1.6.js create mode 100644 truffle-config-contracts-test.js create mode 100644 truffle-config-contracts.js create mode 100644 truffle-config-infrastructure-0.5.js create mode 100644 truffle-config-infrastructure.js create mode 100644 truffle-config-lib.js create mode 100644 truffle-config-modules.js create mode 100644 truffle-config-wallet.js diff --git a/contracts/Migrations.sol b/contracts/Migrations.sol new file mode 100644 index 000000000..f95d6c40d --- /dev/null +++ b/contracts/Migrations.sol @@ -0,0 +1,19 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.4.21 <0.7.0; + +contract Migrations { + address public owner; + uint public last_completed_migration; + + constructor() public { + owner = msg.sender; + } + + modifier restricted() { + if (msg.sender == owner) _; + } + + function setCompleted(uint completed) public restricted { + last_completed_migration = completed; + } +} diff --git a/migrations/1_initial_migration.js b/migrations/1_initial_migration.js new file mode 100644 index 000000000..ee2135d29 --- /dev/null +++ b/migrations/1_initial_migration.js @@ -0,0 +1,5 @@ +const Migrations = artifacts.require("Migrations"); + +module.exports = function(deployer) { + deployer.deploy(Migrations); +}; diff --git a/package.json b/package.json index 43ad48a75..2c437a56a 100644 --- a/package.json +++ b/package.json @@ -6,22 +6,22 @@ "test": "test" }, "scripts": { - "compile:lib": "npx etherlime compile --workingDirectory lib --solcVersion 0.5.4 --runs=200", - "compile:legacy:1.3": "npx etherlime compile --workingDirectory contracts-legacy/v1.3.0 --buildDirectory build-legacy/v1.3.0 --solcVersion 0.5.4 --runs=999", - "compile:legacy:1.6": "npx etherlime compile --workingDirectory contracts-legacy/v1.6.0 --buildDirectory build-legacy/v1.6.0 --solcVersion 0.5.4 --runs=999", + "compile:lib": "npx truffle compile --config truffle-config-lib.js", + "compile:legacy:1.3": "npx truffle compile --config truffle-config-contracts-legacy-1.3.js", + "compile:legacy:1.6": "npx truffle compile --config truffle-config-contracts-legacy-1.6.js", "compile:legacy": "npm run compile:legacy:1.3 && npm run compile:legacy:1.6", - "compile:infrastructure_0.5": "npx etherlime compile --workingDirectory contracts/infrastructure_0.5 --solcVersion 0.5.4 --runs=999", - "compile:infrastructure_0.6": "npx etherlime compile --workingDirectory contracts/infrastructure --runs=999", + "compile:infrastructure_0.5": "npx truffle compile --config truffle-config-infrastructure-0.5.js", + "compile:infrastructure_0.6": "npx truffle compile --config truffle-config-infrastructure.js", "compile:infrastructure": "npm run compile:infrastructure_0.5 && npm run compile:infrastructure_0.6", - "compile:modules": "npx etherlime compile --workingDirectory contracts/modules --runs=999 && rm build/ApprovedTransfer.json && npx etherlime compile --workingDirectory contracts/modules/ApprovedTransfer --runs=999 && rm build/RelayerManager.json && npx etherlime compile --workingDirectory contracts/modules/RelayerManager --runs=999 && rm build/TransferManager.json && npx etherlime compile --workingDirectory contracts/modules/TransferManager --runs=999 && rm build/TokenExchanger.json && npx etherlime compile --workingDirectory contracts/modules/TokenExchanger --runs=999", - "compile:wallet": "npx etherlime compile --workingDirectory contracts/wallet --runs=999", - "compile:test": "npx etherlime compile --workingDirectory contracts-test --runs=999", + "compile:modules": "npx truffle compile --config truffle-config-modules.js && rm build/ApprovedTransfer.json && npx truffle compile --workingDirectory contracts/modules/ApprovedTransfer --runs=999 && rm build/RelayerManager.json && npx truffle compile --workingDirectory contracts/modules/RelayerManager --runs=999 && rm build/TransferManager.json && npx truffle compile --workingDirectory contracts/modules/TransferManager --runs=999 && rm build/TokenExchanger.json && npx truffle compile --workingDirectory contracts/modules/TokenExchanger --runs=999", + "compile:wallet": "npx truffle compile --config truffle-config-wallet.js", + "compile:test": "npx truffle compile --config truffle-config-contracts-test.js", "compile": "npm run compile:infrastructure && npm run compile:modules && npm run compile:wallet", "cc": "rm -rf build && rm -rf build-legacy && npm run compile:lib && npm run compile && npm run compile:legacy && npm run compile:test", "ganache": "npx etherlime ganache --gasLimit=20700000 -e 10000", "kovan-fork": "npx ganache-cli -i 42 -l 20700000 -f https://kovan.infura.io/v3/$(cat .env | sed -En 's/INFURA_KEY=''\"''([^''\"'']+)''\"''/\\1/p')@16988040", "kovan-fork-latest": "npx ganache-cli -i 42 -l 20700000 -f https://kovan.infura.io/v3/$(cat .env | sed -En 's/INFURA_KEY=''\"''([^''\"'']+)''\"''/\\1/p')", - "test": "npx etherlime test --skip-compilation", + "test": "npx truffle test", "ctest": "npm run compile && npm run test", "provision:lib:artefacts": "bash ./scripts/provision_lib_artefacts.sh", "test:coverage": "bash ./scripts/provision_lib_artefacts.sh & npx etherlime coverage && istanbul check-coverage --statements 94 --branches 83 --functions 96 --lines 94", diff --git a/truffle-config-contracts-legacy-1.3.js b/truffle-config-contracts-legacy-1.3.js new file mode 100644 index 000000000..15f7cfc04 --- /dev/null +++ b/truffle-config-contracts-legacy-1.3.js @@ -0,0 +1,99 @@ +/** + * Use this file to configure your truffle project. It's seeded with some + * common settings for different networks and features like migrations, + * compilation and testing. Uncomment the ones you need or modify + * them to suit your project as necessary. + * + * More information about configuration can be found at: + * + * truffleframework.com/docs/advanced/configuration + * + * To deploy via Infura you'll need a wallet provider (like @truffle/hdwallet-provider) + * to sign your transactions before they're sent to a remote public node. Infura accounts + * are available for free at: infura.io/register. + * + * You'll also need a mnemonic - the twelve word phrase the wallet uses to generate + * public/private key pairs. If you're publishing your code to GitHub make sure you load this + * phrase from a file you've .gitignored so it doesn't accidentally become public. + * + */ + +// const HDWalletProvider = require('@truffle/hdwallet-provider'); +// const infuraKey = "fj4jll3k....."; +// +// const fs = require('fs'); +// const mnemonic = fs.readFileSync(".secret").toString().trim(); + +module.exports = { + /** + * Networks define how you connect to your ethereum client and let you set the + * defaults web3 uses to send transactions. If you don't specify one truffle + * will spin up a development blockchain for you on port 9545 when you + * run `develop` or `test`. You can ask a truffle command to use a specific + * network from the command line, e.g + * + * $ truffle test --network + */ + contracts_directory: "contracts-legacy/v1.3.0", + contracts_build_directory: "build-legacy/v1.3.0", + networks: { + // Useful for testing. The `development` name is special - truffle uses it by default + // if it's defined here and no other network is specified at the command line. + // You should run a client (like ganache-cli, geth or parity) in a separate terminal + // tab if you use this network and you must also set the `host`, `port` and `network_id` + // options below to some value. + // + development: { + host: "127.0.0.1", // Localhost (default: none) + port: 8545, // Standard Ethereum port (default: none) + network_id: "*", // Any network (default: none) + }, + + // Another network with more advanced options... + // advanced: { + // port: 8777, // Custom port + // network_id: 1342, // Custom network + // gas: 8500000, // Gas sent with each transaction (default: ~6700000) + // gasPrice: 20000000000, // 20 gwei (in wei) (default: 100 gwei) + // from:
, // Account to send txs from (default: accounts[0]) + // websockets: true // Enable EventEmitter interface for web3 (default: false) + // }, + + // Useful for deploying to a public network. + // NB: It's important to wrap the provider as a function. + // ropsten: { + // provider: () => new HDWalletProvider(mnemonic, `https://ropsten.infura.io/v3/YOUR-PROJECT-ID`), + // network_id: 3, // Ropsten's id + // gas: 5500000, // Ropsten has a lower block limit than mainnet + // confirmations: 2, // # of confs to wait between deployments. (default: 0) + // timeoutBlocks: 200, // # of blocks before a deployment times out (minimum/default: 50) + // skipDryRun: true // Skip dry run before migrations? (default: false for public nets ) + // }, + + // Useful for private networks + // private: { + // provider: () => new HDWalletProvider(mnemonic, `https://network.io`), + // network_id: 2111, // This network is yours, in the cloud. + // production: true // Treats this network as if it was a public net. (default: false) + // } + }, + + // Set default mocha options here, use special reporters etc. + mocha: { + // timeout: 100000 + }, + + // Configure your compilers + compilers: { + solc: { + version: "0.5.4", // Fetch exact version from solc-bin (default: truffle's version) + docker: true, // Use "0.5.1" you've installed locally with docker (default: false) + settings: { // See the solidity docs for advice about optimization and evmVersion + optimizer: { + enabled: true, + runs: 999 + } + } + } + } +} diff --git a/truffle-config-contracts-legacy-1.6.js b/truffle-config-contracts-legacy-1.6.js new file mode 100644 index 000000000..aa0bfbdc4 --- /dev/null +++ b/truffle-config-contracts-legacy-1.6.js @@ -0,0 +1,99 @@ +/** + * Use this file to configure your truffle project. It's seeded with some + * common settings for different networks and features like migrations, + * compilation and testing. Uncomment the ones you need or modify + * them to suit your project as necessary. + * + * More information about configuration can be found at: + * + * truffleframework.com/docs/advanced/configuration + * + * To deploy via Infura you'll need a wallet provider (like @truffle/hdwallet-provider) + * to sign your transactions before they're sent to a remote public node. Infura accounts + * are available for free at: infura.io/register. + * + * You'll also need a mnemonic - the twelve word phrase the wallet uses to generate + * public/private key pairs. If you're publishing your code to GitHub make sure you load this + * phrase from a file you've .gitignored so it doesn't accidentally become public. + * + */ + +// const HDWalletProvider = require('@truffle/hdwallet-provider'); +// const infuraKey = "fj4jll3k....."; +// +// const fs = require('fs'); +// const mnemonic = fs.readFileSync(".secret").toString().trim(); + +module.exports = { + /** + * Networks define how you connect to your ethereum client and let you set the + * defaults web3 uses to send transactions. If you don't specify one truffle + * will spin up a development blockchain for you on port 9545 when you + * run `develop` or `test`. You can ask a truffle command to use a specific + * network from the command line, e.g + * + * $ truffle test --network + */ + contracts_directory: "contracts-legacy/v1.6.0", + contracts_build_directory: "build-legacy/v1.6.0", + networks: { + // Useful for testing. The `development` name is special - truffle uses it by default + // if it's defined here and no other network is specified at the command line. + // You should run a client (like ganache-cli, geth or parity) in a separate terminal + // tab if you use this network and you must also set the `host`, `port` and `network_id` + // options below to some value. + // + development: { + host: "127.0.0.1", // Localhost (default: none) + port: 8545, // Standard Ethereum port (default: none) + network_id: "*", // Any network (default: none) + }, + + // Another network with more advanced options... + // advanced: { + // port: 8777, // Custom port + // network_id: 1342, // Custom network + // gas: 8500000, // Gas sent with each transaction (default: ~6700000) + // gasPrice: 20000000000, // 20 gwei (in wei) (default: 100 gwei) + // from:
, // Account to send txs from (default: accounts[0]) + // websockets: true // Enable EventEmitter interface for web3 (default: false) + // }, + + // Useful for deploying to a public network. + // NB: It's important to wrap the provider as a function. + // ropsten: { + // provider: () => new HDWalletProvider(mnemonic, `https://ropsten.infura.io/v3/YOUR-PROJECT-ID`), + // network_id: 3, // Ropsten's id + // gas: 5500000, // Ropsten has a lower block limit than mainnet + // confirmations: 2, // # of confs to wait between deployments. (default: 0) + // timeoutBlocks: 200, // # of blocks before a deployment times out (minimum/default: 50) + // skipDryRun: true // Skip dry run before migrations? (default: false for public nets ) + // }, + + // Useful for private networks + // private: { + // provider: () => new HDWalletProvider(mnemonic, `https://network.io`), + // network_id: 2111, // This network is yours, in the cloud. + // production: true // Treats this network as if it was a public net. (default: false) + // } + }, + + // Set default mocha options here, use special reporters etc. + mocha: { + // timeout: 100000 + }, + + // Configure your compilers + compilers: { + solc: { + version: "0.5.4", // Fetch exact version from solc-bin (default: truffle's version) + docker: true, // Use "0.5.1" you've installed locally with docker (default: false) + settings: { // See the solidity docs for advice about optimization and evmVersion + optimizer: { + enabled: true, + runs: 999 + } + } + } + } +} diff --git a/truffle-config-contracts-test.js b/truffle-config-contracts-test.js new file mode 100644 index 000000000..6befba68b --- /dev/null +++ b/truffle-config-contracts-test.js @@ -0,0 +1,98 @@ +/** + * Use this file to configure your truffle project. It's seeded with some + * common settings for different networks and features like migrations, + * compilation and testing. Uncomment the ones you need or modify + * them to suit your project as necessary. + * + * More information about configuration can be found at: + * + * truffleframework.com/docs/advanced/configuration + * + * To deploy via Infura you'll need a wallet provider (like @truffle/hdwallet-provider) + * to sign your transactions before they're sent to a remote public node. Infura accounts + * are available for free at: infura.io/register. + * + * You'll also need a mnemonic - the twelve word phrase the wallet uses to generate + * public/private key pairs. If you're publishing your code to GitHub make sure you load this + * phrase from a file you've .gitignored so it doesn't accidentally become public. + * + */ + +// const HDWalletProvider = require('@truffle/hdwallet-provider'); +// const infuraKey = "fj4jll3k....."; +// +// const fs = require('fs'); +// const mnemonic = fs.readFileSync(".secret").toString().trim(); + +module.exports = { + /** + * Networks define how you connect to your ethereum client and let you set the + * defaults web3 uses to send transactions. If you don't specify one truffle + * will spin up a development blockchain for you on port 9545 when you + * run `develop` or `test`. You can ask a truffle command to use a specific + * network from the command line, e.g + * + * $ truffle test --network + */ + contracts_directory: "contracts-test", + networks: { + // Useful for testing. The `development` name is special - truffle uses it by default + // if it's defined here and no other network is specified at the command line. + // You should run a client (like ganache-cli, geth or parity) in a separate terminal + // tab if you use this network and you must also set the `host`, `port` and `network_id` + // options below to some value. + // + development: { + host: "127.0.0.1", // Localhost (default: none) + port: 8545, // Standard Ethereum port (default: none) + network_id: "*", // Any network (default: none) + }, + + // Another network with more advanced options... + // advanced: { + // port: 8777, // Custom port + // network_id: 1342, // Custom network + // gas: 8500000, // Gas sent with each transaction (default: ~6700000) + // gasPrice: 20000000000, // 20 gwei (in wei) (default: 100 gwei) + // from:
, // Account to send txs from (default: accounts[0]) + // websockets: true // Enable EventEmitter interface for web3 (default: false) + // }, + + // Useful for deploying to a public network. + // NB: It's important to wrap the provider as a function. + // ropsten: { + // provider: () => new HDWalletProvider(mnemonic, `https://ropsten.infura.io/v3/YOUR-PROJECT-ID`), + // network_id: 3, // Ropsten's id + // gas: 5500000, // Ropsten has a lower block limit than mainnet + // confirmations: 2, // # of confs to wait between deployments. (default: 0) + // timeoutBlocks: 200, // # of blocks before a deployment times out (minimum/default: 50) + // skipDryRun: true // Skip dry run before migrations? (default: false for public nets ) + // }, + + // Useful for private networks + // private: { + // provider: () => new HDWalletProvider(mnemonic, `https://network.io`), + // network_id: 2111, // This network is yours, in the cloud. + // production: true // Treats this network as if it was a public net. (default: false) + // } + }, + + // Set default mocha options here, use special reporters etc. + mocha: { + // timeout: 100000 + }, + + // Configure your compilers + compilers: { + solc: { + version: "0.6.12", // Fetch exact version from solc-bin (default: truffle's version) + docker: true, // Use "0.5.1" you've installed locally with docker (default: false) + settings: { // See the solidity docs for advice about optimization and evmVersion + optimizer: { + enabled: true, + runs: 999 + } + } + } + } +} diff --git a/truffle-config-contracts.js b/truffle-config-contracts.js new file mode 100644 index 000000000..effc2e33b --- /dev/null +++ b/truffle-config-contracts.js @@ -0,0 +1,98 @@ +/** + * Use this file to configure your truffle project. It's seeded with some + * common settings for different networks and features like migrations, + * compilation and testing. Uncomment the ones you need or modify + * them to suit your project as necessary. + * + * More information about configuration can be found at: + * + * truffleframework.com/docs/advanced/configuration + * + * To deploy via Infura you'll need a wallet provider (like @truffle/hdwallet-provider) + * to sign your transactions before they're sent to a remote public node. Infura accounts + * are available for free at: infura.io/register. + * + * You'll also need a mnemonic - the twelve word phrase the wallet uses to generate + * public/private key pairs. If you're publishing your code to GitHub make sure you load this + * phrase from a file you've .gitignored so it doesn't accidentally become public. + * + */ + +// const HDWalletProvider = require('@truffle/hdwallet-provider'); +// const infuraKey = "fj4jll3k....."; +// +// const fs = require('fs'); +// const mnemonic = fs.readFileSync(".secret").toString().trim(); + +module.exports = { + /** + * Networks define how you connect to your ethereum client and let you set the + * defaults web3 uses to send transactions. If you don't specify one truffle + * will spin up a development blockchain for you on port 9545 when you + * run `develop` or `test`. You can ask a truffle command to use a specific + * network from the command line, e.g + * + * $ truffle test --network + */ + contracts_directory: "contracts/*.sol", + networks: { + // Useful for testing. The `development` name is special - truffle uses it by default + // if it's defined here and no other network is specified at the command line. + // You should run a client (like ganache-cli, geth or parity) in a separate terminal + // tab if you use this network and you must also set the `host`, `port` and `network_id` + // options below to some value. + // + development: { + host: "127.0.0.1", // Localhost (default: none) + port: 8545, // Standard Ethereum port (default: none) + network_id: "*", // Any network (default: none) + }, + + // Another network with more advanced options... + // advanced: { + // port: 8777, // Custom port + // network_id: 1342, // Custom network + // gas: 8500000, // Gas sent with each transaction (default: ~6700000) + // gasPrice: 20000000000, // 20 gwei (in wei) (default: 100 gwei) + // from:
, // Account to send txs from (default: accounts[0]) + // websockets: true // Enable EventEmitter interface for web3 (default: false) + // }, + + // Useful for deploying to a public network. + // NB: It's important to wrap the provider as a function. + // ropsten: { + // provider: () => new HDWalletProvider(mnemonic, `https://ropsten.infura.io/v3/YOUR-PROJECT-ID`), + // network_id: 3, // Ropsten's id + // gas: 5500000, // Ropsten has a lower block limit than mainnet + // confirmations: 2, // # of confs to wait between deployments. (default: 0) + // timeoutBlocks: 200, // # of blocks before a deployment times out (minimum/default: 50) + // skipDryRun: true // Skip dry run before migrations? (default: false for public nets ) + // }, + + // Useful for private networks + // private: { + // provider: () => new HDWalletProvider(mnemonic, `https://network.io`), + // network_id: 2111, // This network is yours, in the cloud. + // production: true // Treats this network as if it was a public net. (default: false) + // } + }, + + // Set default mocha options here, use special reporters etc. + mocha: { + // timeout: 100000 + }, + + // Configure your compilers + compilers: { + solc: { + version: "0.6.12", // Fetch exact version from solc-bin (default: truffle's version) + docker: true, // Use "0.5.1" you've installed locally with docker (default: false) + settings: { // See the solidity docs for advice about optimization and evmVersion + optimizer: { + enabled: true, + runs: 999 + } + } + } + } +} diff --git a/truffle-config-infrastructure-0.5.js b/truffle-config-infrastructure-0.5.js new file mode 100644 index 000000000..468dfc3d7 --- /dev/null +++ b/truffle-config-infrastructure-0.5.js @@ -0,0 +1,98 @@ +/** + * Use this file to configure your truffle project. It's seeded with some + * common settings for different networks and features like migrations, + * compilation and testing. Uncomment the ones you need or modify + * them to suit your project as necessary. + * + * More information about configuration can be found at: + * + * truffleframework.com/docs/advanced/configuration + * + * To deploy via Infura you'll need a wallet provider (like @truffle/hdwallet-provider) + * to sign your transactions before they're sent to a remote public node. Infura accounts + * are available for free at: infura.io/register. + * + * You'll also need a mnemonic - the twelve word phrase the wallet uses to generate + * public/private key pairs. If you're publishing your code to GitHub make sure you load this + * phrase from a file you've .gitignored so it doesn't accidentally become public. + * + */ + +// const HDWalletProvider = require('@truffle/hdwallet-provider'); +// const infuraKey = "fj4jll3k....."; +// +// const fs = require('fs'); +// const mnemonic = fs.readFileSync(".secret").toString().trim(); + +module.exports = { + /** + * Networks define how you connect to your ethereum client and let you set the + * defaults web3 uses to send transactions. If you don't specify one truffle + * will spin up a development blockchain for you on port 9545 when you + * run `develop` or `test`. You can ask a truffle command to use a specific + * network from the command line, e.g + * + * $ truffle test --network + */ + contracts_directory: "contracts/infrastructure_0.5", + networks: { + // Useful for testing. The `development` name is special - truffle uses it by default + // if it's defined here and no other network is specified at the command line. + // You should run a client (like ganache-cli, geth or parity) in a separate terminal + // tab if you use this network and you must also set the `host`, `port` and `network_id` + // options below to some value. + // + development: { + host: "127.0.0.1", // Localhost (default: none) + port: 8545, // Standard Ethereum port (default: none) + network_id: "*", // Any network (default: none) + }, + + // Another network with more advanced options... + // advanced: { + // port: 8777, // Custom port + // network_id: 1342, // Custom network + // gas: 8500000, // Gas sent with each transaction (default: ~6700000) + // gasPrice: 20000000000, // 20 gwei (in wei) (default: 100 gwei) + // from:
, // Account to send txs from (default: accounts[0]) + // websockets: true // Enable EventEmitter interface for web3 (default: false) + // }, + + // Useful for deploying to a public network. + // NB: It's important to wrap the provider as a function. + // ropsten: { + // provider: () => new HDWalletProvider(mnemonic, `https://ropsten.infura.io/v3/YOUR-PROJECT-ID`), + // network_id: 3, // Ropsten's id + // gas: 5500000, // Ropsten has a lower block limit than mainnet + // confirmations: 2, // # of confs to wait between deployments. (default: 0) + // timeoutBlocks: 200, // # of blocks before a deployment times out (minimum/default: 50) + // skipDryRun: true // Skip dry run before migrations? (default: false for public nets ) + // }, + + // Useful for private networks + // private: { + // provider: () => new HDWalletProvider(mnemonic, `https://network.io`), + // network_id: 2111, // This network is yours, in the cloud. + // production: true // Treats this network as if it was a public net. (default: false) + // } + }, + + // Set default mocha options here, use special reporters etc. + mocha: { + // timeout: 100000 + }, + + // Configure your compilers + compilers: { + solc: { + version: "0.5.4", // Fetch exact version from solc-bin (default: truffle's version) + docker: true, // Use "0.5.1" you've installed locally with docker (default: false) + settings: { // See the solidity docs for advice about optimization and evmVersion + optimizer: { + enabled: true, + runs: 999 + } + } + } + } +} diff --git a/truffle-config-infrastructure.js b/truffle-config-infrastructure.js new file mode 100644 index 000000000..3d30d4f0a --- /dev/null +++ b/truffle-config-infrastructure.js @@ -0,0 +1,98 @@ +/** + * Use this file to configure your truffle project. It's seeded with some + * common settings for different networks and features like migrations, + * compilation and testing. Uncomment the ones you need or modify + * them to suit your project as necessary. + * + * More information about configuration can be found at: + * + * truffleframework.com/docs/advanced/configuration + * + * To deploy via Infura you'll need a wallet provider (like @truffle/hdwallet-provider) + * to sign your transactions before they're sent to a remote public node. Infura accounts + * are available for free at: infura.io/register. + * + * You'll also need a mnemonic - the twelve word phrase the wallet uses to generate + * public/private key pairs. If you're publishing your code to GitHub make sure you load this + * phrase from a file you've .gitignored so it doesn't accidentally become public. + * + */ + +// const HDWalletProvider = require('@truffle/hdwallet-provider'); +// const infuraKey = "fj4jll3k....."; +// +// const fs = require('fs'); +// const mnemonic = fs.readFileSync(".secret").toString().trim(); + +module.exports = { + /** + * Networks define how you connect to your ethereum client and let you set the + * defaults web3 uses to send transactions. If you don't specify one truffle + * will spin up a development blockchain for you on port 9545 when you + * run `develop` or `test`. You can ask a truffle command to use a specific + * network from the command line, e.g + * + * $ truffle test --network + */ + contracts_directory: "contracts/modules", + networks: { + // Useful for testing. The `development` name is special - truffle uses it by default + // if it's defined here and no other network is specified at the command line. + // You should run a client (like ganache-cli, geth or parity) in a separate terminal + // tab if you use this network and you must also set the `host`, `port` and `network_id` + // options below to some value. + // + development: { + host: "127.0.0.1", // Localhost (default: none) + port: 8545, // Standard Ethereum port (default: none) + network_id: "*", // Any network (default: none) + }, + + // Another network with more advanced options... + // advanced: { + // port: 8777, // Custom port + // network_id: 1342, // Custom network + // gas: 8500000, // Gas sent with each transaction (default: ~6700000) + // gasPrice: 20000000000, // 20 gwei (in wei) (default: 100 gwei) + // from:
, // Account to send txs from (default: accounts[0]) + // websockets: true // Enable EventEmitter interface for web3 (default: false) + // }, + + // Useful for deploying to a public network. + // NB: It's important to wrap the provider as a function. + // ropsten: { + // provider: () => new HDWalletProvider(mnemonic, `https://ropsten.infura.io/v3/YOUR-PROJECT-ID`), + // network_id: 3, // Ropsten's id + // gas: 5500000, // Ropsten has a lower block limit than mainnet + // confirmations: 2, // # of confs to wait between deployments. (default: 0) + // timeoutBlocks: 200, // # of blocks before a deployment times out (minimum/default: 50) + // skipDryRun: true // Skip dry run before migrations? (default: false for public nets ) + // }, + + // Useful for private networks + // private: { + // provider: () => new HDWalletProvider(mnemonic, `https://network.io`), + // network_id: 2111, // This network is yours, in the cloud. + // production: true // Treats this network as if it was a public net. (default: false) + // } + }, + + // Set default mocha options here, use special reporters etc. + mocha: { + // timeout: 100000 + }, + + // Configure your compilers + compilers: { + solc: { + version: "0.6.12", // Fetch exact version from solc-bin (default: truffle's version) + docker: true, // Use "0.5.1" you've installed locally with docker (default: false) + settings: { // See the solidity docs for advice about optimization and evmVersion + optimizer: { + enabled: true, + runs: 999 + } + } + } + } +} diff --git a/truffle-config-lib.js b/truffle-config-lib.js new file mode 100644 index 000000000..84f95832e --- /dev/null +++ b/truffle-config-lib.js @@ -0,0 +1,27 @@ +module.exports = { + contracts_directory: "lib", + networks: { + development: { + host: "127.0.0.1", + port: 8545, + network_id: "*", + }, + }, + + mocha: { + // timeout: 100000 + }, + + compilers: { + solc: { + version: "0.5.4", // Fetch exact version from solc-bin (default: truffle's version) + docker: true, // Use "0.5.1" you've installed locally with docker (default: false) + settings: { // See the solidity docs for advice about optimization and evmVersion + optimizer: { + enabled: true, + runs: 200 + } + } + } + } +} diff --git a/truffle-config-modules.js b/truffle-config-modules.js new file mode 100644 index 000000000..3d30d4f0a --- /dev/null +++ b/truffle-config-modules.js @@ -0,0 +1,98 @@ +/** + * Use this file to configure your truffle project. It's seeded with some + * common settings for different networks and features like migrations, + * compilation and testing. Uncomment the ones you need or modify + * them to suit your project as necessary. + * + * More information about configuration can be found at: + * + * truffleframework.com/docs/advanced/configuration + * + * To deploy via Infura you'll need a wallet provider (like @truffle/hdwallet-provider) + * to sign your transactions before they're sent to a remote public node. Infura accounts + * are available for free at: infura.io/register. + * + * You'll also need a mnemonic - the twelve word phrase the wallet uses to generate + * public/private key pairs. If you're publishing your code to GitHub make sure you load this + * phrase from a file you've .gitignored so it doesn't accidentally become public. + * + */ + +// const HDWalletProvider = require('@truffle/hdwallet-provider'); +// const infuraKey = "fj4jll3k....."; +// +// const fs = require('fs'); +// const mnemonic = fs.readFileSync(".secret").toString().trim(); + +module.exports = { + /** + * Networks define how you connect to your ethereum client and let you set the + * defaults web3 uses to send transactions. If you don't specify one truffle + * will spin up a development blockchain for you on port 9545 when you + * run `develop` or `test`. You can ask a truffle command to use a specific + * network from the command line, e.g + * + * $ truffle test --network + */ + contracts_directory: "contracts/modules", + networks: { + // Useful for testing. The `development` name is special - truffle uses it by default + // if it's defined here and no other network is specified at the command line. + // You should run a client (like ganache-cli, geth or parity) in a separate terminal + // tab if you use this network and you must also set the `host`, `port` and `network_id` + // options below to some value. + // + development: { + host: "127.0.0.1", // Localhost (default: none) + port: 8545, // Standard Ethereum port (default: none) + network_id: "*", // Any network (default: none) + }, + + // Another network with more advanced options... + // advanced: { + // port: 8777, // Custom port + // network_id: 1342, // Custom network + // gas: 8500000, // Gas sent with each transaction (default: ~6700000) + // gasPrice: 20000000000, // 20 gwei (in wei) (default: 100 gwei) + // from:
, // Account to send txs from (default: accounts[0]) + // websockets: true // Enable EventEmitter interface for web3 (default: false) + // }, + + // Useful for deploying to a public network. + // NB: It's important to wrap the provider as a function. + // ropsten: { + // provider: () => new HDWalletProvider(mnemonic, `https://ropsten.infura.io/v3/YOUR-PROJECT-ID`), + // network_id: 3, // Ropsten's id + // gas: 5500000, // Ropsten has a lower block limit than mainnet + // confirmations: 2, // # of confs to wait between deployments. (default: 0) + // timeoutBlocks: 200, // # of blocks before a deployment times out (minimum/default: 50) + // skipDryRun: true // Skip dry run before migrations? (default: false for public nets ) + // }, + + // Useful for private networks + // private: { + // provider: () => new HDWalletProvider(mnemonic, `https://network.io`), + // network_id: 2111, // This network is yours, in the cloud. + // production: true // Treats this network as if it was a public net. (default: false) + // } + }, + + // Set default mocha options here, use special reporters etc. + mocha: { + // timeout: 100000 + }, + + // Configure your compilers + compilers: { + solc: { + version: "0.6.12", // Fetch exact version from solc-bin (default: truffle's version) + docker: true, // Use "0.5.1" you've installed locally with docker (default: false) + settings: { // See the solidity docs for advice about optimization and evmVersion + optimizer: { + enabled: true, + runs: 999 + } + } + } + } +} diff --git a/truffle-config-wallet.js b/truffle-config-wallet.js new file mode 100644 index 000000000..d6f059f98 --- /dev/null +++ b/truffle-config-wallet.js @@ -0,0 +1,98 @@ +/** + * Use this file to configure your truffle project. It's seeded with some + * common settings for different networks and features like migrations, + * compilation and testing. Uncomment the ones you need or modify + * them to suit your project as necessary. + * + * More information about configuration can be found at: + * + * truffleframework.com/docs/advanced/configuration + * + * To deploy via Infura you'll need a wallet provider (like @truffle/hdwallet-provider) + * to sign your transactions before they're sent to a remote public node. Infura accounts + * are available for free at: infura.io/register. + * + * You'll also need a mnemonic - the twelve word phrase the wallet uses to generate + * public/private key pairs. If you're publishing your code to GitHub make sure you load this + * phrase from a file you've .gitignored so it doesn't accidentally become public. + * + */ + +// const HDWalletProvider = require('@truffle/hdwallet-provider'); +// const infuraKey = "fj4jll3k....."; +// +// const fs = require('fs'); +// const mnemonic = fs.readFileSync(".secret").toString().trim(); + +module.exports = { + /** + * Networks define how you connect to your ethereum client and let you set the + * defaults web3 uses to send transactions. If you don't specify one truffle + * will spin up a development blockchain for you on port 9545 when you + * run `develop` or `test`. You can ask a truffle command to use a specific + * network from the command line, e.g + * + * $ truffle test --network + */ + contracts_directory: "contracts/wallet", + networks: { + // Useful for testing. The `development` name is special - truffle uses it by default + // if it's defined here and no other network is specified at the command line. + // You should run a client (like ganache-cli, geth or parity) in a separate terminal + // tab if you use this network and you must also set the `host`, `port` and `network_id` + // options below to some value. + // + development: { + host: "127.0.0.1", // Localhost (default: none) + port: 8545, // Standard Ethereum port (default: none) + network_id: "*", // Any network (default: none) + }, + + // Another network with more advanced options... + // advanced: { + // port: 8777, // Custom port + // network_id: 1342, // Custom network + // gas: 8500000, // Gas sent with each transaction (default: ~6700000) + // gasPrice: 20000000000, // 20 gwei (in wei) (default: 100 gwei) + // from:
, // Account to send txs from (default: accounts[0]) + // websockets: true // Enable EventEmitter interface for web3 (default: false) + // }, + + // Useful for deploying to a public network. + // NB: It's important to wrap the provider as a function. + // ropsten: { + // provider: () => new HDWalletProvider(mnemonic, `https://ropsten.infura.io/v3/YOUR-PROJECT-ID`), + // network_id: 3, // Ropsten's id + // gas: 5500000, // Ropsten has a lower block limit than mainnet + // confirmations: 2, // # of confs to wait between deployments. (default: 0) + // timeoutBlocks: 200, // # of blocks before a deployment times out (minimum/default: 50) + // skipDryRun: true // Skip dry run before migrations? (default: false for public nets ) + // }, + + // Useful for private networks + // private: { + // provider: () => new HDWalletProvider(mnemonic, `https://network.io`), + // network_id: 2111, // This network is yours, in the cloud. + // production: true // Treats this network as if it was a public net. (default: false) + // } + }, + + // Set default mocha options here, use special reporters etc. + mocha: { + // timeout: 100000 + }, + + // Configure your compilers + compilers: { + solc: { + version: "0.6.12", // Fetch exact version from solc-bin (default: truffle's version) + docker: true, // Use "0.5.1" you've installed locally with docker (default: false) + settings: { // See the solidity docs for advice about optimization and evmVersion + optimizer: { + enabled: true, + runs: 999 + } + } + } + } +} From 6441805594195d85479fb5e3198b9058d0e78524 Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Tue, 28 Jul 2020 15:37:28 +0300 Subject: [PATCH 003/113] Fix path in infrastructure contracts compilation --- truffle-config-infrastructure.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/truffle-config-infrastructure.js b/truffle-config-infrastructure.js index 3d30d4f0a..2185989ba 100644 --- a/truffle-config-infrastructure.js +++ b/truffle-config-infrastructure.js @@ -34,7 +34,7 @@ module.exports = { * * $ truffle test --network */ - contracts_directory: "contracts/modules", + contracts_directory: "contracts/infrastructure", networks: { // Useful for testing. The `development` name is special - truffle uses it by default // if it's defined here and no other network is specified at the command line. From 5548d052e4c499e5b9c08fd03b5bd1f368336d58 Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Tue, 28 Jul 2020 15:38:24 +0300 Subject: [PATCH 004/113] Switch to truffle artefact loading in tests --- deployment/2_deploy_contracts.js | 38 +++++++-------- deployment/3_setup_contracts.js | 14 +++--- deployment/5_deploy_modules.js | 22 ++++----- deployment/6_register_modules.js | 6 ++- scripts/deploy_custom_upgrader.js | 6 +-- scripts/deploy_defi.js | 10 ++-- scripts/update_compound_registry.js | 5 ++ scripts/update_multisig_threshold.js | 4 ++ scripts/update_wallet_in_factory.js | 7 +-- test/approvedTransfer.js | 30 ++++++------ test/baseContracts.js | 4 +- test/baseModule.js | 69 ++++++++++++++++++++++++++++ test/baseWallet.js | 17 +++---- test/compoundManager_invest.js | 36 +++++++-------- test/compoundManager_loan.js | 36 +++++++-------- test/ens.js | 12 ++--- test/factory.js | 16 +++---- test/guardianManager.js | 22 ++++----- test/kyber.js | 6 +-- test/lockManager.js | 22 ++++----- test/makerV2Manager_invest.js | 24 +++++----- test/makerV2Manager_loan.js | 36 ++++++++------- test/multisig.js | 6 +-- test/nftTransfer.js | 30 ++++++------ test/proxy.js | 10 ++-- test/recoveryManager.js | 22 ++++----- test/relayer.js | 34 +++++++------- test/simpleUpgrader.js | 28 +++++------ test/tokenExchanger.js | 53 ++++++++++----------- test/transferManager.js | 35 +++++++------- utils/defi-deployer.js | 28 +++++------ 31 files changed, 389 insertions(+), 299 deletions(-) create mode 100644 test/baseModule.js diff --git a/deployment/2_deploy_contracts.js b/deployment/2_deploy_contracts.js index abf530d11..c40e2e4c5 100644 --- a/deployment/2_deploy_contracts.js +++ b/deployment/2_deploy_contracts.js @@ -1,22 +1,22 @@ -const GuardianStorage = require("../build/GuardianStorage"); -const TransferStorage = require("../build/TransferStorage"); -const LockStorage = require("../build/LockStorage"); -const LimitStorage = require("../build/LimitStorage"); - -const BaseWallet = require("../build/BaseWallet"); -const ModuleRegistry = require("../build/ModuleRegistry"); -const CompoundRegistry = require("../build/CompoundRegistry"); -const MultiSig = require("../build/MultiSigWallet"); -const ENS = require("../build/ENSRegistryWithFallback"); -const ENSManager = require("../build/ArgentENSManager"); -const ENSResolver = require("../build/ArgentENSResolver"); -const WalletFactory = require("../build/WalletFactory"); - -const TokenPriceRegistry = require("../build/TokenPriceRegistry"); -const DexRegistry = require("../build/DexRegistry"); - -const MakerRegistry = require("../build/MakerRegistry"); -const ScdMcdMigration = require("../build/ScdMcdMigration"); +const GuardianStorage = artifacts.require("GuardianStorage"); +const TransferStorage = artifacts.require("TransferStorage"); +const LockStorage = artifacts.require("LockStorage"); +const LimitStorage = artifacts.require("LimitStorage"); + +const BaseWallet = artifacts.require("BaseWallet"); +const ModuleRegistry = artifacts.require("ModuleRegistry"); +const CompoundRegistry = artifacts.require("CompoundRegistry"); +const MultiSig = artifacts.require("MultiSigWallet"); +const ENS = artifacts.require("ENSRegistryWithFallback"); +const ENSManager = artifacts.require("ArgentENSManager"); +const ENSResolver = artifacts.require("ArgentENSResolver"); +const WalletFactory = artifacts.require("WalletFactory"); + +const TokenPriceRegistry = artifacts.require("TokenPriceRegistry"); +const DexRegistry = artifacts.require("DexRegistry"); + +const MakerRegistry = artifacts.require("MakerRegistry"); +const ScdMcdMigration = artifacts.require("ScdMcdMigration"); const utils = require("../utils/utilities.js"); diff --git a/deployment/3_setup_contracts.js b/deployment/3_setup_contracts.js index 0a6a10f14..e4c4fb52f 100644 --- a/deployment/3_setup_contracts.js +++ b/deployment/3_setup_contracts.js @@ -1,10 +1,10 @@ -const ModuleRegistry = require("../build/ModuleRegistry"); -const ENSManager = require("../build/ArgentENSManager"); -const ENSResolver = require("../build/ArgentENSResolver"); -const WalletFactory = require("../build/WalletFactory"); -const TokenPriceRegistry = require("../build/TokenPriceRegistry"); -const CompoundRegistry = require("../build/CompoundRegistry"); -const DexRegistry = require("../build/DexRegistry"); +const ModuleRegistry = artifacts.require("ModuleRegistry"); +const ENSManager = artifacts.require("ArgentENSManager"); +const ENSResolver = artifacts.require("ArgentENSResolver"); +const WalletFactory = artifacts.require("WalletFactory"); +const TokenPriceRegistry = artifacts.require("TokenPriceRegistry"); +const CompoundRegistry = artifacts.require("CompoundRegistry"); +const DexRegistry = artifacts.require("DexRegistry"); const DeployManager = require("../utils/deploy-manager.js"); diff --git a/deployment/5_deploy_modules.js b/deployment/5_deploy_modules.js index c7cf946e8..e8ef3e59e 100644 --- a/deployment/5_deploy_modules.js +++ b/deployment/5_deploy_modules.js @@ -1,16 +1,16 @@ const childProcess = require("child_process"); -const ApprovedTransfer = require("../build/ApprovedTransfer"); -const CompoundManager = require("../build/CompoundManager"); -const GuardianManager = require("../build/GuardianManager"); -const LockManager = require("../build/LockManager"); -const NftTransfer = require("../build/NftTransfer"); -const RecoveryManager = require("../build/RecoveryManager"); -const TokenExchanger = require("../build/TokenExchanger"); -const MakerV2Manager = require("../build/MakerV2Manager"); -const TransferManager = require("../build/TransferManager"); -const RelayerManager = require("../build/RelayerManager"); -const VersionManager = require("../build/VersionManager"); +const ApprovedTransfer = artifacts.require("ApprovedTransfer"); +const CompoundManager = artifacts.require("CompoundManager"); +const GuardianManager = artifacts.require("GuardianManager"); +const LockManager = artifacts.require("LockManager"); +const NftTransfer = artifacts.require("NftTransfer"); +const RecoveryManager = artifacts.require("RecoveryManager"); +const TokenExchanger = artifacts.require("TokenExchanger"); +const MakerV2Manager = artifacts.require("MakerV2Manager"); +const TransferManager = artifacts.require("TransferManager"); +const RelayerManager = artifacts.require("RelayerManager"); +const VersionManager = artifacts.require("VersionManager"); const DeployManager = require("../utils/deploy-manager.js"); diff --git a/deployment/6_register_modules.js b/deployment/6_register_modules.js index c54de517f..249b5636e 100644 --- a/deployment/6_register_modules.js +++ b/deployment/6_register_modules.js @@ -1,5 +1,7 @@ -const ModuleRegistry = require("../build/ModuleRegistry"); -const MultiSig = require("../build/MultiSigWallet"); +/* global artifacts */ + +const ModuleRegistry = artifacts.require("ModuleRegistry"); +const MultiSig = artifacts.require("MultiSigWallet"); const ApprovedTransfer = require("../build/ApprovedTransfer"); const CompoundManager = require("../build/CompoundManager"); diff --git a/scripts/deploy_custom_upgrader.js b/scripts/deploy_custom_upgrader.js index 8245865b6..7dbd38737 100644 --- a/scripts/deploy_custom_upgrader.js +++ b/scripts/deploy_custom_upgrader.js @@ -1,8 +1,8 @@ // AWS_PROFILE=argent-test AWS_SDK_LOAD_CONFIG=true etherlime deploy --file ./scripts/deploy_custom_upgrader.js --compile false -const ModuleRegistry = require("../build/ModuleRegistry"); -const MultiSig = require("../build/MultiSigWallet"); -const Upgrader = require("../build/SimpleUpgrader"); +const ModuleRegistry = artifacts.require("ModuleRegistry"); +const MultiSig = artifacts.require("MultiSigWallet"); +const Upgrader = artifacts.require("SimpleUpgrader"); const utils = require("../utils/utilities.js"); const DeployManager = require("../utils/deploy-manager.js"); diff --git a/scripts/deploy_defi.js b/scripts/deploy_defi.js index 26868881c..62121c9b3 100644 --- a/scripts/deploy_defi.js +++ b/scripts/deploy_defi.js @@ -7,11 +7,11 @@ const DeployManager = require("../utils/deploy-manager.js"); const UniswapFactory = require("../lib/uniswap/UniswapFactory"); const UniswapExchange = require("../lib/uniswap/UniswapExchange"); -const Vox = require("../build/SaiVox"); -const Tub = require("../build/SaiTub"); -const DSToken = require("../build/DSToken"); -const WETH = require("../build/WETH9"); -const DSValue = require("../build/DSValue"); +const Vox = artifacts.require("SaiVox"); +const Tub = artifacts.require("SaiTub"); +const DSToken = artifacts.require("DSToken"); +const WETH = artifacts.require("WETH9"); +const DSValue = artifacts.require("DSValue"); const RAY = ethers.BigNumber.from("1000000000000000000000000000"); // 10**27 const WAD = ethers.BigNumber.from("1000000000000000000"); // 10**18 diff --git a/scripts/update_compound_registry.js b/scripts/update_compound_registry.js index 4b6c44acc..3f756f236 100644 --- a/scripts/update_compound_registry.js +++ b/scripts/update_compound_registry.js @@ -1,3 +1,4 @@ +<<<<<<< HEAD:scripts/update_compound_registry.js // /////////////////////////////////////////////////////////////////// // Script to add/remove CTokens on Compound // @@ -13,6 +14,10 @@ const CompoundRegistry = require("../build/CompoundRegistry"); const MultiSig = require("../build/MultiSigWallet"); +======= +const CompoundRegistry = artifacts.require("CompoundRegistry"); +const MultiSig = artifacts.require("MultiSigWallet"); +>>>>>>> cd79b8da... Switch to truffle artefact loading in tests:scripts/compound.js const DeployManager = require("../utils/deploy-manager.js"); const MultisigExecutor = require("../utils/multisigexecutor.js"); diff --git a/scripts/update_multisig_threshold.js b/scripts/update_multisig_threshold.js index e3b477e6d..82dcea734 100644 --- a/scripts/update_multisig_threshold.js +++ b/scripts/update_multisig_threshold.js @@ -1,3 +1,4 @@ +<<<<<<< HEAD:scripts/update_multisig_threshold.js // /////////////////////////////////////////////////////////////////// // Script to set the threshold of the Argent multisig. // @@ -9,6 +10,9 @@ // //////////////////////////////////////////////////////////////////// const MultiSig = require("../build/MultiSigWallet"); +======= +const MultiSig = artifacts.require("MultiSigWallet"); +>>>>>>> cd79b8da... Switch to truffle artefact loading in tests:scripts/setThreshold.js const DeployManager = require("../utils/deploy-manager.js"); const MultisigExecutor = require("../utils/multisigexecutor.js"); diff --git a/scripts/update_wallet_in_factory.js b/scripts/update_wallet_in_factory.js index 03bfab036..fa7123a17 100644 --- a/scripts/update_wallet_in_factory.js +++ b/scripts/update_wallet_in_factory.js @@ -8,9 +8,10 @@ // - network = [ganache, test, staging, prod] // //////////////////////////////////////////////////////////////////// -const BaseWallet = require("../build/BaseWallet"); -const WalletFactory = require("../build/WalletFactory"); -const MultiSigWallet = require("../build/MultiSigWallet"); +const BaseWallet = artifacts.require("BaseWallet"); +const WalletFactory = artifacts.require("WalletFactory"); +const MultiSigWallet = artifacts.require("MultiSigWallet"); + const MultisigExecutor = require("../utils/multisigexecutor.js"); const DeployManager = require("../utils/deploy-manager.js"); diff --git a/test/approvedTransfer.js b/test/approvedTransfer.js index f1ebf621f..79ebc67db 100644 --- a/test/approvedTransfer.js +++ b/test/approvedTransfer.js @@ -1,20 +1,20 @@ -/* global accounts */ +/* global artifacts */ const ethers = require("ethers"); -const Proxy = require("../build/Proxy"); -const BaseWallet = require("../build/BaseWallet"); -const RelayerManager = require("../build/RelayerManager"); -const VersionManager = require("../build/VersionManager"); -const Registry = require("../build/ModuleRegistry"); -const LockStorage = require("../build/LockStorage"); -const GuardianStorage = require("../build/GuardianStorage"); -const LimitStorage = require("../build/LimitStorage"); -const GuardianManager = require("../build/GuardianManager"); -const ApprovedTransfer = require("../build/ApprovedTransfer"); -const ERC20 = require("../build/TestERC20"); -const WETH = require("../build/WETH9"); -const TestContract = require("../build/TestContract"); -const TestLimitFeature = require("../build/TestLimitFeature"); +const Proxy = artifacts.require("Proxy"); +const BaseWallet = artifacts.require("BaseWallet"); +const RelayerManager = artifacts.require("RelayerManager"); +const VersionManager = artifacts.require("VersionManager"); +const Registry = artifacts.require("ModuleRegistry"); +const LockStorage = artifacts.require("LockStorage"); +const GuardianStorage = artifacts.require("GuardianStorage"); +const LimitStorage = artifacts.require("LimitStorage"); +const GuardianManager = artifacts.require("GuardianManager"); +const ApprovedTransfer = artifacts.require("ApprovedTransfer"); +const ERC20 = artifacts.require("TestERC20"); +const WETH = artifacts.require("WETH9"); +const TestContract = artifacts.require("TestContract"); +const TestLimitFeature = artifacts.require("TestLimitFeature"); const TestManager = require("../utils/test-manager"); const { sortWalletByAddress, parseRelayReceipt, ETH_TOKEN } = require("../utils/utilities.js"); diff --git a/test/baseContracts.js b/test/baseContracts.js index ba3e73138..38eec7d8d 100644 --- a/test/baseContracts.js +++ b/test/baseContracts.js @@ -1,6 +1,6 @@ -/* global accounts */ +/* global artifacts */ const ethers = require("ethers"); -const Managed = require("../build/Managed"); +const Managed = artifacts.require("Managed"); const TestManager = require("../utils/test-manager"); diff --git a/test/baseModule.js b/test/baseModule.js new file mode 100644 index 000000000..7c94c7ca8 --- /dev/null +++ b/test/baseModule.js @@ -0,0 +1,69 @@ +/* global artifacts */ +require("ethers"); + +const Registry = artifacts.require("ModuleRegistry"); +const GuardianStorage = artifacts.require("GuardianStorage"); +const BaseModule = artifacts.require("TestOnlyOwnerModule"); +const ERC20 = artifacts.require("TestERC20"); +const NonCompliantERC20 = artifacts.require("NonCompliantERC20"); + +const TestManager = require("../utils/test-manager"); + +describe("BaseModule", function () { + this.timeout(10000); + + const manager = new TestManager(); + const { deployer } = manager; + + const owner = accounts[1].signer; + + let registry; + let guardianStorage; + let token; + let baseModule; + + before(async () => { + }); + + beforeEach(async () => { + registry = await deployer.deploy(Registry); + guardianStorage = await deployer.deploy(GuardianStorage); + token = await deployer.deploy(ERC20, {}, [owner.address], 10, 18); + + baseModule = await deployer.deploy(BaseModule, {}, registry.contractAddress, guardianStorage.contractAddress); + }); + + describe("Recover tokens", async () => { + it("should be able to recover ERC20 tokens sent to the module", async () => { + let balance = await token.balanceOf(baseModule.contractAddress); + assert.equal(balance, 0); + + await token.from(owner).transfer(baseModule.contractAddress, 10000000); + balance = await token.balanceOf(baseModule.contractAddress); + assert.equal(balance, 10000000); + + await baseModule.recoverToken(token.contractAddress); + + balance = await token.balanceOf(baseModule.contractAddress); + assert.equal(balance, 0); + + const moduleregistryBalance = await token.balanceOf(registry.contractAddress); + assert.equal(moduleregistryBalance, 10000000); + }); + + it("should be able to recover non-ERC20 compliant tokens sent to the module", async () => { + const nonCompliantToken = await deployer.deploy(NonCompliantERC20, {}); + await nonCompliantToken.mint(baseModule.contractAddress, 10000000); + let balance = await nonCompliantToken.balanceOf(baseModule.contractAddress); + assert.equal(balance, 10000000); + + await baseModule.recoverToken(nonCompliantToken.contractAddress); + + balance = await nonCompliantToken.balanceOf(baseModule.contractAddress); + assert.equal(balance, 0); + + const moduleregistryBalance = await nonCompliantToken.balanceOf(registry.contractAddress); + assert.equal(moduleregistryBalance, 10000000); + }); + }); +}); diff --git a/test/baseWallet.js b/test/baseWallet.js index 03349c996..e1b371bd7 100644 --- a/test/baseWallet.js +++ b/test/baseWallet.js @@ -1,13 +1,14 @@ -/* global accounts */ +/* global artifacts */ const ethers = require("ethers"); -const Proxy = require("../build/Proxy"); -const BaseWallet = require("../build/BaseWallet"); -const OldWalletV16 = require("../build-legacy/v1.6.0/BaseWallet"); -const OldWalletV13 = require("../build-legacy/v1.3.0/BaseWallet"); + +const Proxy = artifacts.require("Proxy"); +const BaseWallet = artifacts.require("BaseWallet"); +const OldWalletV16 = artifacts.require("../build-legacy/v1.6.0/BaseWallet"); +const OldWalletV13 = artifacts.require("../build-legacy/v1.3.0/BaseWallet"); const VersionManager = require("../build/VersionManager"); -const Registry = require("../build/ModuleRegistry"); -const SimpleUpgrader = require("../build/SimpleUpgrader"); -const GuardianStorage = require("../build/GuardianStorage"); +const Registry = artifacts.require("ModuleRegistry"); +const SimpleUpgrader = artifacts.require("SimpleUpgrader"); +const GuardianStorage = artifacts.require("GuardianStorage"); const LockStorage = require("../build/LockStorage"); const TestFeature = require("../build/TestFeature"); diff --git a/test/compoundManager_invest.js b/test/compoundManager_invest.js index 88a63acac..de94c952d 100644 --- a/test/compoundManager_invest.js +++ b/test/compoundManager_invest.js @@ -1,30 +1,30 @@ -/* global accounts, utils */ +/* global artefacts */ const { parseEther, formatBytes32String } = require("ethers").utils; const ethers = require("ethers"); -const GuardianStorage = require("../build/GuardianStorage"); -const LockStorage = require("../build/LockStorage"); -const Registry = require("../build/ModuleRegistry"); +const GuardianStorage = artifacts.require("GuardianStorage"); +const LockStorage = artifacts.require("LockStorage"); +const Registry = artifacts.require("ModuleRegistry"); -const Proxy = require("../build/Proxy"); -const BaseWallet = require("../build/BaseWallet"); -const RelayerManager = require("../build/RelayerManager"); -const CompoundManager = require("../build/CompoundManager"); -const VersionManager = require("../build/VersionManager"); +const Proxy = artifacts.require("Proxy"); +const BaseWallet = artifacts.require("BaseWallet"); +const RelayerManager = artifacts.require("RelayerManager"); +const CompoundManager = artifacts.require("CompoundManager"); +const VersionManager = artifacts.require("VersionManager"); // Compound -const Unitroller = require("../build/Unitroller"); -const PriceOracle = require("../build/SimplePriceOracle"); -const PriceOracleProxy = require("../build/PriceOracleProxy"); -const Comptroller = require("../build/Comptroller"); -const InterestModel = require("../build/WhitePaperInterestRateModel"); -const CEther = require("../build/CEther"); -const CErc20 = require("../build/CErc20"); -const CompoundRegistry = require("../build/CompoundRegistry"); +const Unitroller = artifacts.require("Unitroller"); +const PriceOracle = artifacts.require("SimplePriceOracle"); +const PriceOracleProxy = artifacts.require("PriceOracleProxy"); +const Comptroller = artifacts.require("Comptroller"); +const InterestModel = artifacts.require("WhitePaperInterestRateModel"); +const CEther = artifacts.require("CEther"); +const CErc20 = artifacts.require("CErc20"); +const CompoundRegistry = artifacts.require("CompoundRegistry"); const WAD = ethers.BigNumber.from("1000000000000000000"); // 10**18 const ETH_EXCHANGE_RATE = ethers.BigNumber.from("200000000000000000000000000"); -const ERC20 = require("../build/TestERC20"); +const ERC20 = artifacts.require("TestERC20"); const { ETH_TOKEN } = require("../utils/utilities.js"); const TestManager = require("../utils/test-manager"); diff --git a/test/compoundManager_loan.js b/test/compoundManager_loan.js index cbed96441..6085c5eec 100644 --- a/test/compoundManager_loan.js +++ b/test/compoundManager_loan.js @@ -1,31 +1,31 @@ -/* global accounts, utils */ +/* global artifacts */ const ethers = require("ethers"); const { parseEther } = require("ethers").utils; -const GuardianStorage = require("../build/GuardianStorage"); -const LockStorage = require("../build/LockStorage"); -const Registry = require("../build/ModuleRegistry"); +const GuardianStorage = artifacts.require("GuardianStorage"); +const LockStorage = artifacts.require("LockStorage"); +const Registry = artifacts.require("ModuleRegistry"); -const Proxy = require("../build/Proxy"); -const BaseWallet = require("../build/BaseWallet"); -const RelayerManager = require("../build/RelayerManager"); -const CompoundManager = require("../build/CompoundManager"); -const VersionManager = require("../build/VersionManager"); +const Proxy = artifacts.require("Proxy"); +const BaseWallet = artifacts.require("BaseWallet"); +const RelayerManager = artifacts.require("RelayerManager"); +const CompoundManager = artifacts.require("CompoundManager"); +const VersionManager = artifacts.require("VersionManager"); // Compound -const Unitroller = require("../build/Unitroller"); -const PriceOracle = require("../build/SimplePriceOracle"); -const PriceOracleProxy = require("../build/PriceOracleProxy"); -const Comptroller = require("../build/Comptroller"); -const InterestModel = require("../build/WhitePaperInterestRateModel"); -const CEther = require("../build/CEther"); -const CErc20 = require("../build/CErc20"); -const CompoundRegistry = require("../build/CompoundRegistry"); +const Unitroller = artifacts.require("Unitroller"); +const PriceOracle = artifacts.require("SimplePriceOracle"); +const PriceOracleProxy = artifacts.require("PriceOracleProxy"); +const Comptroller = artifacts.require("Comptroller"); +const InterestModel = artifacts.require("WhitePaperInterestRateModel"); +const CEther = artifacts.require("CEther"); +const CErc20 = artifacts.require("CErc20"); +const CompoundRegistry = artifacts.require("CompoundRegistry"); const WAD = ethers.BigNumber.from("1000000000000000000"); // 10**18 const ETH_EXCHANGE_RATE = ethers.BigNumber.from("200000000000000000000000000"); -const ERC20 = require("../build/TestERC20"); +const ERC20 = artifacts.require("TestERC20"); const { ETH_TOKEN } = require("../utils/utilities.js"); const TestManager = require("../utils/test-manager"); diff --git a/test/ens.js b/test/ens.js index b82854f6c..bf9127a3c 100644 --- a/test/ens.js +++ b/test/ens.js @@ -1,11 +1,11 @@ -/* global accounts */ +/* global artifacts */ const ethers = require("ethers"); -const ENSRegistry = require("../build/ENSRegistry"); -const ENSRegistryWithFallback = require("../build/ENSRegistryWithFallback"); -const ENSManager = require("../build/ArgentENSManager"); -const ENSResolver = require("../build/ArgentENSResolver"); -const ENSReverseRegistrar = require("../build/ReverseRegistrar"); +const ENSRegistry = artifacts.require("ENSRegistry"); +const ENSRegistryWithFallback = artifacts.require("ENSRegistryWithFallback"); +const ENSManager = artifacts.require("ArgentENSManager"); +const ENSResolver = artifacts.require("ArgentENSResolver"); +const ENSReverseRegistrar = artifacts.require("ReverseRegistrar"); const TestManager = require("../utils/test-manager"); const utilities = require("../utils/utilities.js"); diff --git a/test/factory.js b/test/factory.js index 9860cd959..f06da0cdc 100644 --- a/test/factory.js +++ b/test/factory.js @@ -1,14 +1,14 @@ -/* global accounts, utils */ +/* global artifacts */ const ethers = require("ethers"); -const BaseWallet = require("../build/BaseWallet"); -const VersionManager = require("../build/VersionManager"); -const ModuleRegistry = require("../build/ModuleRegistry"); -const Factory = require("../build/WalletFactory"); -const GuardianStorage = require("../build/GuardianStorage"); +const BaseWallet = artifacts.require("BaseWallet"); +const VersionManager = artifacts.require("VersionManager"); +const ModuleRegistry = artifacts.require("ModuleRegistry"); +const Factory = artifacts.require("WalletFactory"); +const GuardianStorage = artifacts.require("GuardianStorage"); -const TestManager = require("../utils/test-manager"); -const utilities = require("../utils/utilities.js"); +const TestManager = artifacts.require("test-manager"); +const utilities = artifacts.require("utilities.js"); const ZERO_ADDRESS = ethers.constants.AddressZero; diff --git a/test/guardianManager.js b/test/guardianManager.js index 3486a6890..a43a3989b 100644 --- a/test/guardianManager.js +++ b/test/guardianManager.js @@ -1,15 +1,15 @@ -/* global accounts */ +/* global artifacts */ const ethers = require("ethers"); -const GuardianManager = require("../build/GuardianManager"); -const LockStorage = require("../build/LockStorage"); -const GuardianStorage = require("../build/GuardianStorage"); -const Proxy = require("../build/Proxy"); -const BaseWallet = require("../build/BaseWallet"); -const RelayerManager = require("../build/RelayerManager"); -const VersionManager = require("../build/VersionManager"); -const Registry = require("../build/ModuleRegistry"); -const DumbContract = require("../build/TestContract"); -const NonCompliantGuardian = require("../build/NonCompliantGuardian"); +const GuardianManager = artifacts.require("GuardianManager"); +const LockStorage = artifacts.require("LockStorage"); +const GuardianStorage = artifacts.require("GuardianStorage"); +const Proxy = artifacts.require("Proxy"); +const BaseWallet = artifacts.require("BaseWallet"); +const RelayerManager = artifacts.require("RelayerManager"); +const VersionManager = artifacts.require("VersionManager"); +const Registry = artifacts.require("ModuleRegistry"); +const DumbContract = artifacts.require("TestContract"); +const NonCompliantGuardian = artifacts.require("NonCompliantGuardian"); const TestManager = require("../utils/test-manager"); diff --git a/test/kyber.js b/test/kyber.js index 1bf94802d..014f4280a 100644 --- a/test/kyber.js +++ b/test/kyber.js @@ -1,8 +1,8 @@ -/* global accounts */ +/* global artifacts */ const ethers = require("ethers"); -const KyberNetwork = require("../build/KyberNetworkTest"); -const ERC20 = require("../build/TestERC20"); +const KyberNetwork = artifacts.require("KyberNetworkTest"); +const ERC20 = artifacts.require("TestERC20"); const TestManager = require("../utils/test-manager"); const { ETH_TOKEN } = require("../utils/utilities.js"); diff --git a/test/lockManager.js b/test/lockManager.js index fae374dde..c5fead58f 100644 --- a/test/lockManager.js +++ b/test/lockManager.js @@ -1,15 +1,15 @@ -/* global accounts */ +/* global artifacts */ const ethers = require("ethers"); -const RelayerManager = require("../build/RelayerManager"); -const GuardianManager = require("../build/GuardianManager"); -const LockManager = require("../build/LockManager"); -const LockStorage = require("../build/LockStorage"); -const GuardianStorage = require("../build/GuardianStorage"); -const Proxy = require("../build/Proxy"); -const BaseWallet = require("../build/BaseWallet"); -const Registry = require("../build/ModuleRegistry"); -const RecoveryManager = require("../build/RecoveryManager"); -const VersionManager = require("../build/VersionManager"); +const RelayerManager = artifacts.require("RelayerManager"); +const GuardianManager = artifacts.require("GuardianManager"); +const LockManager = artifacts.require("LockManager"); +const LockStorage = artifacts.require("LockStorage"); +const GuardianStorage = artifacts.require("GuardianStorage"); +const Proxy = artifacts.require("Proxy"); +const BaseWallet = artifacts.require("BaseWallet"); +const Registry = artifacts.require("ModuleRegistry"); +const RecoveryManager = artifacts.require("RecoveryManager"); +const VersionManager = artifacts.require("VersionManager"); const TestManager = require("../utils/test-manager"); diff --git a/test/makerV2Manager_invest.js b/test/makerV2Manager_invest.js index e98731d6b..74e8ad84a 100644 --- a/test/makerV2Manager_invest.js +++ b/test/makerV2Manager_invest.js @@ -1,17 +1,17 @@ +/* global artifacts */ + const ethers = require("ethers"); -const { - deployMaker, deployUniswap, WAD, ETH_PER_DAI, ETH_PER_MKR, -} = require("../utils/defi-deployer"); +const { deployMaker, deployUniswap, WAD, ETH_PER_DAI, ETH_PER_MKR } = require("../utils/defi-deployer"); const TestManager = require("../utils/test-manager"); -const Registry = require("../build/ModuleRegistry"); -const MakerV2Manager = require("../build/MakerV2Manager"); -const Proxy = require("../build/Proxy"); -const BaseWallet = require("../build/BaseWallet"); -const GuardianStorage = require("../build/GuardianStorage"); -const LockStorage = require("../build/LockStorage"); -const MakerRegistry = require("../build/MakerRegistry"); -const RelayerManager = require("../build/RelayerManager"); -const VersionManager = require("../build/VersionManager"); +const Registry = artifacts.require("ModuleRegistry"); +const MakerV2Manager = artifacts.require("MakerV2Manager"); +const Proxy = artifacts.require("Proxy"); +const BaseWallet = artifacts.require("BaseWallet"); +const GuardianStorage = artifacts.require("GuardianStorage"); +const LockStorage = artifacts.require("LockStorage"); +const MakerRegistry = artifacts.require("MakerRegistry"); +const RelayerManager = artifacts.require("RelayerManager"); +const VersionManager = artifacts.require("VersionManager"); const DAI_SENT = WAD.div(100000000); diff --git a/test/makerV2Manager_loan.js b/test/makerV2Manager_loan.js index bc96a1a88..649c9bde4 100644 --- a/test/makerV2Manager_loan.js +++ b/test/makerV2Manager_loan.js @@ -1,3 +1,5 @@ +/* global artifacts */ + const ethers = require("ethers"); const { bigNumToBytes32, ETH_TOKEN, parseLogs, hasEvent, @@ -10,23 +12,23 @@ const { parseEther, formatBytes32String } = ethers.utils; const { AddressZero } = ethers.constants; const TestManager = require("../utils/test-manager"); -const GemJoin = require("../build/GemJoin"); -const Registry = require("../build/ModuleRegistry"); -const MakerV2Manager = require("../build/MakerV2Manager"); -const UpgradedMakerV2Manager = require("../build/TestUpgradedMakerV2Manager"); -const MakerRegistry = require("../build/MakerRegistry"); -const Proxy = require("../build/Proxy"); -const BaseWallet = require("../build/BaseWallet"); -const FakeWallet = require("../build/FakeWallet"); -const GuardianStorage = require("../build/GuardianStorage"); -const LockStorage = require("../build/LockStorage"); -const TransferStorage = require("../build/TransferStorage"); -const LimitStorage = require("../build/LimitStorage"); -const TokenPriceRegistry = require("../build/TokenPriceRegistry"); -const TransferManager = require("../build/TransferManager"); -const BadFeature = require("../build/TestFeature"); -const RelayerManager = require("../build/RelayerManager"); -const VersionManager = require("../build/VersionManager"); +const GemJoin = artifacts.require("GemJoin"); +const Registry = artifacts.require("ModuleRegistry"); +const MakerV2Manager = artifacts.require("MakerV2Manager"); +const UpgradedMakerV2Manager = artifacts.require("TestUpgradedMakerV2Manager"); +const MakerRegistry = artifacts.require("MakerRegistry"); +const Proxy = artifacts.require("Proxy"); +const BaseWallet = artifacts.require("BaseWallet"); +const FakeWallet = artifacts.require("FakeWallet"); +const GuardianStorage = artifacts.require("GuardianStorage"); +const LockStorage = artifacts.require("LockStorage"); +const TransferStorage = artifacts.require("TransferStorage"); +const LimitStorage = artifacts.require("LimitStorage"); +const TokenPriceRegistry = artifacts.require("TokenPriceRegistry"); +const TransferManager = artifacts.require("TransferManager"); +const BadFeature = artifacts.require("TestFeature"); +const RelayerManager = artifacts.require("RelayerManager"); +const VersionManager = artifacts.require("VersionManager"); /* global accounts */ describe("MakerV2 Vaults", function () { diff --git a/test/multisig.js b/test/multisig.js index 0ef593a8d..4b53c5d03 100644 --- a/test/multisig.js +++ b/test/multisig.js @@ -1,6 +1,6 @@ -/* global accounts */ -const MultiSigWallet = require("../build/MultiSigWallet"); -const TestRegistry = require("../build/TestRegistry"); +/* global artifacts */ +const MultiSigWallet = artifacts.require("MultiSigWallet"); +const TestRegistry = artifacts.require("TestRegistry"); const TestManager = require("../utils/test-manager"); const MultisigExecutor = require("../utils/multisigexecutor.js"); diff --git a/test/nftTransfer.js b/test/nftTransfer.js index 66cb72618..fe924d03a 100644 --- a/test/nftTransfer.js +++ b/test/nftTransfer.js @@ -1,20 +1,20 @@ -/* global accounts */ +/* global artifacts */ const ethers = require("ethers"); -const Proxy = require("../build/Proxy"); -const BaseWallet = require("../build/BaseWallet"); -const Registry = require("../build/ModuleRegistry"); -const VersionManager = require("../build/VersionManager"); -const RelayerManager = require("../build/RelayerManager"); -const LockStorage = require("../build/LockStorage"); -const GuardianStorage = require("../build/GuardianStorage"); -const NftTransfer = require("../build/NftTransfer"); -const TokenPriceRegistry = require("../build/TokenPriceRegistry"); - -const ERC721 = require("../build/TestERC721"); -const CK = require("../build/CryptoKittyTest"); -const ERC20 = require("../build/TestERC20"); -const ERC20Approver = require("../build/ERC20Approver"); +const Proxy = artifacts.require("Proxy"); +const BaseWallet = artifacts.require("BaseWallet"); +const Registry = artifacts.require("ModuleRegistry"); +const VersionManager = artifacts.require("VersionManager"); +const RelayerManager = artifacts.require("RelayerManager"); +const LockStorage = artifacts.require("LockStorage"); +const GuardianStorage = artifacts.require("GuardianStorage"); +const NftModule = artifacts.require("NftTransfer"); +const TokenPriceRegistry = artifacts.require("TokenPriceRegistry"); + +const ERC721 = artifacts.require("TestERC721"); +const CK = artifacts.require("CryptoKittyTest"); +const ERC20 = artifacts.require("TestERC20"); +const ERC20Approver = artifacts.require("ERC20Approver"); const ZERO_BYTES32 = ethers.constants.HashZero; diff --git a/test/proxy.js b/test/proxy.js index 36023f46e..549f245c0 100644 --- a/test/proxy.js +++ b/test/proxy.js @@ -1,12 +1,12 @@ -/* global accounts */ +/* global artifacts */ const ethers = require("ethers"); const TestManager = require("../utils/test-manager"); -const Proxy = require("../build/Proxy"); -const BaseWallet = require("../build/BaseWallet"); -const VersionManager = require("../build/VersionManager"); -const Registry = require("../build/ModuleRegistry"); +const Proxy = artifacts.require("Proxy"); +const BaseWallet = artifacts.require("BaseWallet"); +const VersionManager = artifacts.require("VersionManager"); +const Registry = artifacts.require("ModuleRegistry"); describe("Proxy", function () { this.timeout(100000); diff --git a/test/recoveryManager.js b/test/recoveryManager.js index 49274882d..83ad90436 100644 --- a/test/recoveryManager.js +++ b/test/recoveryManager.js @@ -1,16 +1,16 @@ -/* global accounts */ +/* global artifacts */ const ethers = require("ethers"); -const GuardianManager = require("../build/GuardianManager"); -const LockManager = require("../build/LockManager"); -const RecoveryManager = require("../build/RecoveryManager"); -const GuardianStorage = require("../build/GuardianStorage"); -const LockStorage = require("../build/LockStorage"); -const Proxy = require("../build/Proxy"); -const BaseWallet = require("../build/BaseWallet"); -const Registry = require("../build/ModuleRegistry"); -const RelayerManager = require("../build/RelayerManager"); -const VersionManager = require("../build/VersionManager"); +const GuardianManager = artifacts.require("GuardianManager"); +const LockManager = artifacts.require("LockManager"); +const RecoveryManager = artifacts.require("RecoveryManager"); +const GuardianStorage = artifacts.require("GuardianStorage"); +const LockStorage = artifacts.require("LockStorage"); +const Proxy = artifacts.require("Proxy"); +const BaseWallet = artifacts.require("BaseWallet"); +const Registry = artifacts.require("ModuleRegistry"); +const RelayerManager = artifacts.require("RelayerManager"); +const VersionManager = artifacts.require("VersionManager"); const TestManager = require("../utils/test-manager"); const { diff --git a/test/relayer.js b/test/relayer.js index ca282049e..286e30173 100644 --- a/test/relayer.js +++ b/test/relayer.js @@ -1,25 +1,25 @@ -/* global accounts */ +/* global artifacts */ const ethers = require("ethers"); const BN = require("bn.js"); const { formatBytes32String } = require("ethers").utils; const { parseRelayReceipt, hasEvent } = require("../utils/utilities.js"); -const Proxy = require("../build/Proxy"); -const BaseWallet = require("../build/BaseWallet"); -const BadFeature = require("../build/BadFeature"); -const RelayerManager = require("../build/RelayerManager"); -const TestFeature = require("../build/TestFeature"); -const TestLimitFeature = require("../build/TestLimitFeature"); -const Registry = require("../build/ModuleRegistry"); -const GuardianManager = require("../build/GuardianManager"); -const GuardianStorage = require("../build/GuardianStorage"); -const LockStorage = require("../build/LockStorage"); -const LimitStorage = require("../build/LimitStorage"); -const TokenPriceRegistry = require("../build/TokenPriceRegistry"); -const ApprovedTransfer = require("../build/ApprovedTransfer"); -const RecoveryManager = require("../build/RecoveryManager"); // non-owner only feature -const VersionManager = require("../build/VersionManager"); -const ERC20 = require("../build/TestERC20"); +const Proxy = artifacts.require("Proxy"); +const BaseWallet = artifacts.require("BaseWallet"); +const BadFeature = artifacts.require("BadFeature"); +const RelayerManager = artifacts.require("RelayerManager"); +const TestFeature = artifacts.require("TestFeature"); +const TestLimitFeature = artifacts.require("TestLimitFeature"); +const Registry = artifacts.require("ModuleRegistry"); +const GuardianManager = artifacts.require("GuardianManager"); +const GuardianStorage = artifacts.require("GuardianStorage"); +const LockStorage = artifacts.require("LockStorage"); +const LimitStorage = artifacts.require("LimitStorage"); +const TokenPriceRegistry = artifacts.require("TokenPriceRegistry"); +const ApprovedTransfer = artifacts.require("ApprovedTransfer"); +const RecoveryManager = artifacts.require("RecoveryManager"); // non-owner only feature +const VersionManager = artifacts.require("VersionManager"); +const ERC20 = artifacts.require("TestERC20"); const TestManager = require("../utils/test-manager"); const { ETH_TOKEN } = require("../utils/utilities.js"); diff --git a/test/simpleUpgrader.js b/test/simpleUpgrader.js index 82ba9c51c..b54f8a52f 100644 --- a/test/simpleUpgrader.js +++ b/test/simpleUpgrader.js @@ -1,19 +1,21 @@ +/* global artifacts */ + const ethers = require("ethers"); /* global accounts, utils */ const { formatBytes32String, parseBytes32String } = require("ethers").utils; -const Proxy = require("../build/Proxy"); -const BaseWallet = require("../build/BaseWallet"); -const SimpleUpgrader = require("../build/SimpleUpgrader"); -const GuardianManager = require("../build/GuardianManager"); -const LockManager = require("../build/LockManager"); -const GuardianStorage = require("../build/GuardianStorage"); -const LockStorage = require("../build/LockStorage"); -const Registry = require("../build/ModuleRegistry"); -const RecoveryManager = require("../build/RecoveryManager"); -const VersionManager = require("../build/VersionManager"); - -const RelayerManager = require("../build/RelayerManager"); -const TestManager = require("../utils/test-manager"); +const Proxy = artifacts.require("Proxy"); +const BaseWallet = artifacts.require("BaseWallet"); +const SimpleUpgrader = artifacts.require("SimpleUpgrader"); +const GuardianManager = artifacts.require("GuardianManager"); +const LockManager = artifacts.require("LockManager"); +const GuardianStorage = artifacts.require("GuardianStorage"); +const LockStorage = artifacts.require("LockStorage"); +const Registry = artifacts.require("ModuleRegistry"); +const RecoveryManager = artifacts.require("RecoveryManager"); +const VersionManager = artifacts.require("VersionManager"); + +const RelayerManager = artifacts.require("RelayerManager"); +const TestManager = artifacts.require("test-manager"); describe("SimpleUpgrader", function () { this.timeout(100000); diff --git a/test/tokenExchanger.js b/test/tokenExchanger.js index 9fc6b2d75..3a89b2382 100644 --- a/test/tokenExchanger.js +++ b/test/tokenExchanger.js @@ -1,40 +1,41 @@ -/* global accounts */ +/* global artifacts */ + const ethers = require("ethers"); const { parseEther } = require("ethers").utils; const { AddressZero } = require("ethers").constants; // Paraswap -const AugustusSwapper = require("../build/AugustusSwapper"); -const Whitelisted = require("../build/Whitelisted"); -const PartnerRegistry = require("../build/PartnerRegistry"); -const PartnerDeployer = require("../build/PartnerDeployer"); -const Kyber = require("../build/Kyber"); -const UniswapV2 = require("../build/UniswapV2"); +const AugustusSwapper = artifacts.require("AugustusSwapper"); +const Whitelisted = artifacts.require("Whitelisted"); +const PartnerRegistry = artifacts.require("PartnerRegistry"); +const PartnerDeployer = artifacts.require("PartnerDeployer"); +const Kyber = artifacts.require("Kyber"); +const UniswapV2 = artifacts.require("UniswapV2"); // Kyber -const KyberNetwork = require("../build/KyberNetworkTest"); +const KyberNetwork = artifacts.require("KyberNetworkTest"); // UniswapV2 -const UniswapV2Factory = require("../build/UniswapV2Factory"); -const UniswapV2Router01 = require("../build/UniswapV2Router01"); -const WETH = require("../build/WETH9"); +const UniswapV2Factory = artifacts.require("UniswapV2Factory"); +const UniswapV2Router01 = artifacts.require("UniswapV2Router01"); +const WETH = artifacts.require("WETH9"); // Argent -const ModuleRegistry = require("../build/ModuleRegistry"); -const DexRegistry = require("../build/DexRegistry"); -const Proxy = require("../build/Proxy"); -const BaseWallet = require("../build/BaseWallet"); -const OldWallet = require("../build-legacy/v1.3.0/BaseWallet"); -const GuardianStorage = require("../build/GuardianStorage"); -const LockStorage = require("../build/LockStorage"); -const TokenExchanger = require("../build/TokenExchanger"); -const RelayerManager = require("../build/RelayerManager"); -const ERC20 = require("../build/TestERC20"); -const TransferStorage = require("../build/TransferStorage"); -const LimitStorage = require("../build/LimitStorage"); -const TransferManager = require("../build/TransferManager"); -const TokenPriceRegistry = require("../build/TokenPriceRegistry"); -const VersionManager = require("../build/VersionManager"); +const ModuleRegistry = artifacts.require("ModuleRegistry"); +const DexRegistry = artifacts.require("DexRegistry"); +const Proxy = artifacts.require("Proxy"); +const BaseWallet = artifacts.require("BaseWallet"); +const OldWallet = artifacts.require("../build-legacy/v1.3.0/BaseWallet"); +const GuardianStorage = artifacts.require("GuardianStorage"); +const LockStorage = artifacts.require("LockStorage"); +const TokenExchanger = artifacts.require("TokenExchanger"); +const RelayerManager = artifacts.require("RelayerManager"); +const ERC20 = artifacts.require("TestERC20"); +const TransferStorage = artifacts.require("TransferStorage"); +const LimitStorage = artifacts.require("LimitStorage"); +const TransferManager = artifacts.require("TransferManager"); +const TokenPriceRegistry = artifacts.require("TokenPriceRegistry"); +const VersionManager = artifacts.require("VersionManager"); // Utils const { makePathes } = require("../utils/paraswap/sell-helper"); diff --git a/test/transferManager.js b/test/transferManager.js index cfc96e6d0..eb5b1f542 100644 --- a/test/transferManager.js +++ b/test/transferManager.js @@ -1,4 +1,5 @@ -/* global accounts, utils */ +/* global artifacts */ + const ethers = require("ethers"); const chai = require("chai"); const BN = require("bn.js"); @@ -7,22 +8,22 @@ const bnChai = require("bn-chai"); const { expect } = chai; chai.use(bnChai(BN)); -const Proxy = require("../build/Proxy"); -const BaseWallet = require("../build/BaseWallet"); -const Registry = require("../build/ModuleRegistry"); -const VersionManager = require("../build/VersionManager"); -const TransferStorage = require("../build/TransferStorage"); -const LockStorage = require("../build/LockStorage"); -const GuardianStorage = require("../build/GuardianStorage"); -const LimitStorage = require("../build/LimitStorage"); -const TokenPriceRegistry = require("../build/TokenPriceRegistry"); -const RelayerManager = require("../build/RelayerManager"); -const TransferManager = require("../build/TransferManager"); -const LegacyTransferManager = require("../build-legacy/v1.6.0/TransferManager"); -const LegacyTokenPriceProvider = require("../build-legacy/v1.6.0/TokenPriceProvider"); -const ERC20 = require("../build/TestERC20"); -const WETH = require("../build/WETH9"); -const TestContract = require("../build/TestContract"); +const Proxy = artifacts.require("Proxy"); +const BaseWallet = artifacts.require("BaseWallet"); +const Registry = artifacts.require("ModuleRegistry"); +const VersionManager = artifacts.require("VersionManager"); +const TransferStorage = artifacts.require("TransferStorage"); +const LockStorage = artifacts.require("LockStorage"); +const GuardianStorage = artifacts.require("GuardianStorage"); +const LimitStorage = artifacts.require("LimitStorage"); +const TokenPriceRegistry = artifacts.require("TokenPriceRegistry"); +const RelayerManager = artifacts.require("RelayerManager"); +const TransferManager = artifacts.require("TransferManager"); +const LegacyTransferManager = artifacts.require("../build-legacy/v1.6.0/TransferManager"); +const LegacyTokenPriceProvider = artifacts.require("../build-legacy/v1.6.0/TokenPriceProvider"); +const ERC20 = artifacts.require("TestERC20"); +const WETH = artifacts.require("WETH9"); +const TestContract = artifacts.require("TestContract"); const { ETH_TOKEN, hasEvent, personalSign } = require("../utils/utilities.js"); diff --git a/utils/defi-deployer.js b/utils/defi-deployer.js index 0a8064187..8f7307452 100644 --- a/utils/defi-deployer.js +++ b/utils/defi-deployer.js @@ -1,3 +1,5 @@ +/* global artifacts */ + const { parseEther, formatBytes32String } = require("ethers").utils; const etherlime = require("etherlime-lib"); const ethers = require("ethers"); @@ -5,19 +7,19 @@ const ethers = require("ethers"); const UniswapFactory = require("../lib/uniswap/UniswapFactory"); const UniswapExchange = require("../lib/uniswap/UniswapExchange"); -const ScdMcdMigration = require("../build/ScdMcdMigration"); -const DSValue = require("../build/DSValue"); -const DSToken = require("../build/DSToken"); -const Dai = require("../build/Dai"); -const Vox = require("../build/SaiVox"); -const Tub = require("../build/SaiTub"); -const WETH = require("../build/WETH9"); -const Vat = require("../build/Vat"); -const Pot = require("../build/Pot"); -const Jug = require("../build/Jug"); -const CdpManager = require("../build/DssCdpManager"); -const GemJoin = require("../build/GemJoin"); -const DaiJoin = require("../build/DaiJoin"); +const ScdMcdMigration = artifacts.require("ScdMcdMigration"); +const DSValue = artifacts.require("DSValue"); +const DSToken = artifacts.require("DSToken"); +const Dai = artifacts.require("Dai"); +const Vox = artifacts.require("SaiVox"); +const Tub = artifacts.require("SaiTub"); +const WETH = artifacts.require("WETH9"); +const Vat = artifacts.require("Vat"); +const Pot = artifacts.require("Pot"); +const Jug = artifacts.require("Jug"); +const CdpManager = artifacts.require("DssCdpManager"); +const GemJoin = artifacts.require("GemJoin"); +const DaiJoin = artifacts.require("DaiJoin"); const RAY = ethers.BigNumber.from("1000000000000000000000000000"); // 10**27 const WAD = ethers.BigNumber.from("1000000000000000000"); // 10**18 From e7d92acf4d26207829215b19023c2d1692b518bc Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Tue, 28 Jul 2020 16:27:49 +0300 Subject: [PATCH 005/113] Fix linting issues --- deployment/1_setup_test_environment.js | 22 +++++---- deployment/4_finalise_test_environment.js | 6 ++- deployment/5_deploy_modules.js | 2 + deployment/999_benchmark.js | 35 +++++++------- migrations/1_initial_migration.js | 4 +- scripts/deploy_custom_upgrader.js | 1 + scripts/deploy_defi.js | 2 + scripts/update_compound_registry.js | 7 +-- scripts/update_multisig_threshold.js | 5 +- scripts/update_wallet_in_factory.js | 1 + test/approvedTransfer.js | 4 +- test/baseContracts.js | 3 +- test/baseModule.js | 2 +- test/baseWallet.js | 4 +- test/compoundManager_invest.js | 5 +- test/compoundManager_loan.js | 4 +- test/ens.js | 4 +- test/factory.js | 55 ++++++++++++++------- test/guardianManager.js | 5 +- test/kyber.js | 4 +- test/lockManager.js | 4 +- test/makerV2Manager_invest.js | 7 +-- test/makerV2Manager_loan.js | 4 +- test/multisig.js | 2 +- test/nftTransfer.js | 4 +- test/proxy.js | 4 +- test/recoveryManager.js | 4 +- test/relayer.js | 4 +- test/simpleUpgrader.js | 7 +-- test/tokenExchanger.js | 4 +- test/transferManager.js | 17 +++---- truffle-config-contracts-legacy-1.3.js | 58 +++++++++++------------ truffle-config-contracts-legacy-1.6.js | 58 +++++++++++------------ truffle-config-contracts-test.js | 58 +++++++++++------------ truffle-config-contracts.js | 58 +++++++++++------------ truffle-config-infrastructure-0.5.js | 58 +++++++++++------------ truffle-config-infrastructure.js | 58 +++++++++++------------ truffle-config-lib.js | 28 +++++------ truffle-config-modules.js | 58 +++++++++++------------ truffle-config-wallet.js | 58 +++++++++++------------ 40 files changed, 382 insertions(+), 346 deletions(-) diff --git a/deployment/1_setup_test_environment.js b/deployment/1_setup_test_environment.js index a00cf64a7..92d219bdb 100644 --- a/deployment/1_setup_test_environment.js +++ b/deployment/1_setup_test_environment.js @@ -1,15 +1,17 @@ -const ENSRegistry = require("../build/ENSRegistry"); -const ENSRegistryWithFallback = require("../build/ENSRegistryWithFallback"); -const UniswapFactory = require("../lib/uniswap/UniswapFactory"); -const UniswapExchange = require("../lib/uniswap/UniswapExchange"); -const MakerMigration = require("../build/MockScdMcdMigration"); +/* global artifacts */ + +const ENSRegistry = artifacts.require("ENSRegistry"); +const ENSRegistryWithFallback = artifacts.require("ENSRegistryWithFallback"); +const UniswapFactory = artifacts.require("../lib/uniswap/UniswapFactory"); +const UniswapExchange = artifacts.require("../lib/uniswap/UniswapExchange"); +const MakerMigration = artifacts.require("MockScdMcdMigration"); // Paraswap -const AugustusSwapper = require("../build/AugustusSwapper"); -const Whitelisted = require("../build/Whitelisted"); -const PartnerRegistry = require("../build/PartnerRegistry"); -const PartnerDeployer = require("../build/PartnerDeployer"); -const KyberAdapter = require("../build/Kyber"); +const AugustusSwapper = artifacts.require("AugustusSwapper"); +const Whitelisted = artifacts.require("Whitelisted"); +const PartnerRegistry = artifacts.require("PartnerRegistry"); +const PartnerDeployer = artifacts.require("PartnerDeployer"); +const KyberAdapter = artifacts.require("Kyber"); const utils = require("../utils/utilities.js"); const DeployManager = require("../utils/deploy-manager.js"); diff --git a/deployment/4_finalise_test_environment.js b/deployment/4_finalise_test_environment.js index 3b2f419c7..d817244c3 100644 --- a/deployment/4_finalise_test_environment.js +++ b/deployment/4_finalise_test_environment.js @@ -1,5 +1,7 @@ -const ENS = require("../build/ENSRegistryWithFallback"); -const ENSReverseRegistrar = require("../build/ReverseRegistrar"); +/* global artifacts */ + +const ENS = artifacts.require("ENSRegistryWithFallback"); +const ENSReverseRegistrar = artifacts.require("ReverseRegistrar"); const utils = require("../utils/utilities.js"); const DeployManager = require("../utils/deploy-manager.js"); diff --git a/deployment/5_deploy_modules.js b/deployment/5_deploy_modules.js index e8ef3e59e..b82af2a6e 100644 --- a/deployment/5_deploy_modules.js +++ b/deployment/5_deploy_modules.js @@ -1,3 +1,5 @@ +/* global artifacts */ + const childProcess = require("child_process"); const ApprovedTransfer = artifacts.require("ApprovedTransfer"); diff --git a/deployment/999_benchmark.js b/deployment/999_benchmark.js index 7ca0c842c..b9b9a1e7d 100644 --- a/deployment/999_benchmark.js +++ b/deployment/999_benchmark.js @@ -1,25 +1,26 @@ /* eslint max-classes-per-file: ["error", 2] */ - +/* global artifacts */ const ethers = require("ethers"); const Table = require("cli-table2"); const tinyreq = require("tinyreq"); const { assert } = require("chai"); -const BaseWallet = require("../build/BaseWallet"); -const Proxy = require("../build/Proxy"); -const ModuleRegistry = require("../build/ModuleRegistry"); -const MultiSig = require("../build/MultiSigWallet"); -const WalletFactory = require("../build/WalletFactory"); - -const GuardianManager = require("../build/GuardianManager"); -const TokenExchanger = require("../build/TokenExchanger"); -const LockManager = require("../build/LockManager"); -const RecoveryManager = require("../build/RecoveryManager"); -const ApprovedTransfer = require("../build/ApprovedTransfer"); -const TransferManager = require("../build/TransferManager"); -const NftTransfer = require("../build/NftTransfer"); -const CompoundManager = require("../build/CompoundManager"); -const MakerV2Manager = require("../build/MakerV2Manager"); -const RelayerManager = require("../build/RelayerManager"); + +const BaseWallet = artifacts.require("BaseWallet"); +const Proxy = artifacts.require("Proxy"); +const ModuleRegistry = artifacts.require("ModuleRegistry"); +const MultiSig = artifacts.require("MultiSigWallet"); +const WalletFactory = artifacts.require("WalletFactory"); + +const GuardianManager = artifacts.require("GuardianManager"); +const TokenExchanger = artifacts.require("TokenExchanger"); +const LockManager = artifacts.require("LockManager"); +const RecoveryManager = artifacts.require("RecoveryManager"); +const ApprovedTransfer = artifacts.require("ApprovedTransfer"); +const TransferManager = artifacts.require("TransferManager"); +const NftTransfer = artifacts.require("NftTransfer"); +const CompoundManager = artifacts.require("CompoundManager"); +const MakerV2Manager = artifacts.require("MakerV2Manager"); +const RelayerManager = artifacts.require("RelayerManager"); const VersionManager = require("../build/VersionManager"); diff --git a/migrations/1_initial_migration.js b/migrations/1_initial_migration.js index ee2135d29..4d01edd3b 100644 --- a/migrations/1_initial_migration.js +++ b/migrations/1_initial_migration.js @@ -1,5 +1,7 @@ +/* global artifacts */ + const Migrations = artifacts.require("Migrations"); -module.exports = function(deployer) { +module.exports = function (deployer) { deployer.deploy(Migrations); }; diff --git a/scripts/deploy_custom_upgrader.js b/scripts/deploy_custom_upgrader.js index 7dbd38737..01434db11 100644 --- a/scripts/deploy_custom_upgrader.js +++ b/scripts/deploy_custom_upgrader.js @@ -1,5 +1,6 @@ // AWS_PROFILE=argent-test AWS_SDK_LOAD_CONFIG=true etherlime deploy --file ./scripts/deploy_custom_upgrader.js --compile false +/* global artifacts */ const ModuleRegistry = artifacts.require("ModuleRegistry"); const MultiSig = artifacts.require("MultiSigWallet"); const Upgrader = artifacts.require("SimpleUpgrader"); diff --git a/scripts/deploy_defi.js b/scripts/deploy_defi.js index 62121c9b3..cf9271674 100644 --- a/scripts/deploy_defi.js +++ b/scripts/deploy_defi.js @@ -1,4 +1,6 @@ // AWS_PROFILE=argent-test AWS_SDK_LOAD_CONFIG=true etherlime deploy --file ./scripts/deploy_defi.js --compile false +/* global artifacts */ + const ethers = require("ethers"); const { parseEther, formatBytes32String } = require("ethers").utils; diff --git a/scripts/update_compound_registry.js b/scripts/update_compound_registry.js index 3f756f236..7e4ca09c2 100644 --- a/scripts/update_compound_registry.js +++ b/scripts/update_compound_registry.js @@ -1,4 +1,3 @@ -<<<<<<< HEAD:scripts/update_compound_registry.js // /////////////////////////////////////////////////////////////////// // Script to add/remove CTokens on Compound // @@ -12,12 +11,10 @@ // - network = [ganache, test, staging, prod] // //////////////////////////////////////////////////////////////////// -const CompoundRegistry = require("../build/CompoundRegistry"); -const MultiSig = require("../build/MultiSigWallet"); -======= +/* global artifacts */ + const CompoundRegistry = artifacts.require("CompoundRegistry"); const MultiSig = artifacts.require("MultiSigWallet"); ->>>>>>> cd79b8da... Switch to truffle artefact loading in tests:scripts/compound.js const DeployManager = require("../utils/deploy-manager.js"); const MultisigExecutor = require("../utils/multisigexecutor.js"); diff --git a/scripts/update_multisig_threshold.js b/scripts/update_multisig_threshold.js index 82dcea734..4f7a050c5 100644 --- a/scripts/update_multisig_threshold.js +++ b/scripts/update_multisig_threshold.js @@ -1,4 +1,3 @@ -<<<<<<< HEAD:scripts/update_multisig_threshold.js // /////////////////////////////////////////////////////////////////// // Script to set the threshold of the Argent multisig. // @@ -9,10 +8,8 @@ // - network = [ganache, test, staging, prod] // //////////////////////////////////////////////////////////////////// -const MultiSig = require("../build/MultiSigWallet"); -======= +/* global artifacts */ const MultiSig = artifacts.require("MultiSigWallet"); ->>>>>>> cd79b8da... Switch to truffle artefact loading in tests:scripts/setThreshold.js const DeployManager = require("../utils/deploy-manager.js"); const MultisigExecutor = require("../utils/multisigexecutor.js"); diff --git a/scripts/update_wallet_in_factory.js b/scripts/update_wallet_in_factory.js index fa7123a17..a2a94dea7 100644 --- a/scripts/update_wallet_in_factory.js +++ b/scripts/update_wallet_in_factory.js @@ -8,6 +8,7 @@ // - network = [ganache, test, staging, prod] // //////////////////////////////////////////////////////////////////// +/* global artifacts */ const BaseWallet = artifacts.require("BaseWallet"); const WalletFactory = artifacts.require("WalletFactory"); const MultiSigWallet = artifacts.require("MultiSigWallet"); diff --git a/test/approvedTransfer.js b/test/approvedTransfer.js index 79ebc67db..6dd17801b 100644 --- a/test/approvedTransfer.js +++ b/test/approvedTransfer.js @@ -24,8 +24,8 @@ const ZERO_BYTES32 = ethers.constants.HashZero; const WRONG_SIGNATURE_NUMBER_REVERT_MSG = "RM: Wrong number of signatures"; const INVALID_SIGNATURES_REVERT_MSG = "RM: Invalid signatures"; -describe("Approved Transfer", function () { - this.timeout(100000); +contract("ApprovedTransfer", function (accounts) { + this.timeout(10000); const manager = new TestManager(); diff --git a/test/baseContracts.js b/test/baseContracts.js index 38eec7d8d..64e49816d 100644 --- a/test/baseContracts.js +++ b/test/baseContracts.js @@ -1,10 +1,11 @@ /* global artifacts */ const ethers = require("ethers"); + const Managed = artifacts.require("Managed"); const TestManager = require("../utils/test-manager"); -describe("Token Price Provider", () => { +contract("Managed and Owned", (accounts) => { const manager = new TestManager(); const infrastructure = accounts[0].signer; diff --git a/test/baseModule.js b/test/baseModule.js index 7c94c7ca8..8e0a2fee0 100644 --- a/test/baseModule.js +++ b/test/baseModule.js @@ -9,7 +9,7 @@ const NonCompliantERC20 = artifacts.require("NonCompliantERC20"); const TestManager = require("../utils/test-manager"); -describe("BaseModule", function () { +contract("BaseModule", function (accounts) { this.timeout(10000); const manager = new TestManager(); diff --git a/test/baseWallet.js b/test/baseWallet.js index e1b371bd7..1ad1cc23b 100644 --- a/test/baseWallet.js +++ b/test/baseWallet.js @@ -14,8 +14,8 @@ const TestFeature = require("../build/TestFeature"); const TestManager = require("../utils/test-manager"); -describe("BaseWallet", function () { - this.timeout(100000); +contract("BaseWallet", function (accounts) { + this.timeout(10000); const manager = new TestManager(); diff --git a/test/compoundManager_invest.js b/test/compoundManager_invest.js index de94c952d..de2483dba 100644 --- a/test/compoundManager_invest.js +++ b/test/compoundManager_invest.js @@ -1,10 +1,11 @@ /* global artefacts */ const { parseEther, formatBytes32String } = require("ethers").utils; const ethers = require("ethers"); +const utils = require("../utils/utilities.js"); + const GuardianStorage = artifacts.require("GuardianStorage"); const LockStorage = artifacts.require("LockStorage"); const Registry = artifacts.require("ModuleRegistry"); - const Proxy = artifacts.require("Proxy"); const BaseWallet = artifacts.require("BaseWallet"); const RelayerManager = artifacts.require("RelayerManager"); @@ -29,7 +30,7 @@ const ERC20 = artifacts.require("TestERC20"); const { ETH_TOKEN } = require("../utils/utilities.js"); const TestManager = require("../utils/test-manager"); -describe("Invest Manager with Compound", function () { +contract("Invest Manager with Compound", function (accounts) { this.timeout(1000000); const manager = new TestManager(); diff --git a/test/compoundManager_loan.js b/test/compoundManager_loan.js index 6085c5eec..ec246f0e0 100644 --- a/test/compoundManager_loan.js +++ b/test/compoundManager_loan.js @@ -1,6 +1,8 @@ /* global artifacts */ + const ethers = require("ethers"); const { parseEther } = require("ethers").utils; +const utils = require("../utils/utilities.js"); const GuardianStorage = artifacts.require("GuardianStorage"); const LockStorage = artifacts.require("LockStorage"); @@ -32,7 +34,7 @@ const TestManager = require("../utils/test-manager"); const ZERO_BYTES32 = ethers.constants.HashZero; -describe("Loan Module", function () { +contract("Loan Module", function (accounts) { this.timeout(1000000); const manager = new TestManager(); diff --git a/test/ens.js b/test/ens.js index bf9127a3c..d8a853708 100644 --- a/test/ens.js +++ b/test/ens.js @@ -12,8 +12,8 @@ const utilities = require("../utils/utilities.js"); const ZERO_BYTES32 = ethers.constants.HashZero; -describe("ENS contracts", function () { - this.timeout(100000); +contract("ENS contracts", function (accounts) { + this.timeout(10000); const manager = new TestManager(); diff --git a/test/factory.js b/test/factory.js index f06da0cdc..40a45ed10 100644 --- a/test/factory.js +++ b/test/factory.js @@ -7,13 +7,13 @@ const ModuleRegistry = artifacts.require("ModuleRegistry"); const Factory = artifacts.require("WalletFactory"); const GuardianStorage = artifacts.require("GuardianStorage"); -const TestManager = artifacts.require("test-manager"); -const utilities = artifacts.require("utilities.js"); +const TestManager = require("../utils/test-manager"); +const utils = require("../utils/utilities.js"); const ZERO_ADDRESS = ethers.constants.AddressZero; -describe("Wallet Factory", function () { - this.timeout(100000); +contract("WalletFactory", function (accounts) { + this.timeout(10000); const manager = new TestManager(); @@ -85,7 +85,7 @@ describe("Wallet Factory", function () { }); it("should allow owner to change the module registry", async () => { - const randomAddress = utilities.getRandomAddress(); + const randomAddress = utils.getRandomAddress(); await factory.changeModuleRegistry(randomAddress); const updatedModuleRegistry = await factory.moduleRegistry(); assert.equal(updatedModuleRegistry, randomAddress); @@ -96,9 +96,30 @@ describe("Wallet Factory", function () { }); it("should not allow non-owner to change the module registry", async () => { - const randomAddress = utilities.getRandomAddress(); + const randomAddress = utils.getRandomAddress(); await assert.revertWith(factory.from(other).changeModuleRegistry(randomAddress), "Must be owner"); }); + + it("should allow owner to change the ens manager", async () => { + const randomAddress = utils.getRandomAddress(); + await factory.changeENSManager(randomAddress); + const updatedEnsManager = await factory.ensManager(); + assert.equal(updatedEnsManager, randomAddress); + }); + + it("should not allow owner to change the ens manager to a zero address", async () => { + await assert.revertWith(factory.changeENSManager(ethers.constants.AddressZero), "WF: address cannot be null"); + }); + + it("should not allow non-owner to change the ens manager", async () => { + const randomAddress = utils.getRandomAddress(); + await assert.revertWith(factory.from(other).changeENSManager(randomAddress), "Must be owner"); + }); + + it("should return the correct ENSManager", async () => { + const ensManagerOnFactory = await factory.ensManager(); + assert.equal(ensManagerOnFactory, ensManager.contractAddress, "should have the correct ENSManager addrress"); + }); }); describe("Create wallets with CREATE", () => { @@ -164,7 +185,7 @@ describe("Wallet Factory", function () { }); it("should fail to create with unregistered module", async () => { - const randomAddress = utilities.getRandomAddress(); + const randomAddress = utils.getRandomAddress(); await assert.revertWith(factory.from(infrastructure).createWallet(owner.address, randomAddress, guardian.address, 1), "WF: invalid _versionManager"); }); @@ -177,7 +198,7 @@ describe("Wallet Factory", function () { }); it("should create a wallet at the correct address", async () => { - const salt = utilities.generateSaltValue(); + const salt = utils.generateSaltValue(); // we get the future address const futureAddr = await factory.getAddressForCounterfactualWallet(owner.address, versionManager.contractAddress, guardian.address, salt, 1); // we create the wallet @@ -191,7 +212,7 @@ describe("Wallet Factory", function () { }); it("should create with the correct owner", async () => { - const salt = utilities.generateSaltValue(); + const salt = utils.generateSaltValue(); // we get the future address const futureAddr = await factory.getAddressForCounterfactualWallet(owner.address, versionManager.contractAddress, guardian.address, salt, 1); // we create the wallet @@ -209,7 +230,7 @@ describe("Wallet Factory", function () { }); it("should create with the correct modules", async () => { - const salt = utilities.generateSaltValue(); + const salt = utils.generateSaltValue(); // we get the future address const futureAddr = await factory.getAddressForCounterfactualWallet(owner.address, versionManager.contractAddress, guardian.address, salt, 1); // we create the wallet @@ -231,7 +252,7 @@ describe("Wallet Factory", function () { await versionManager.addVersion([], []); await versionManager.setMinVersion(await versionManager.lastVersion()); - const salt = utilities.generateSaltValue(); + const salt = utils.generateSaltValue(); // we get the future address const futureAddr = await factory.getAddressForCounterfactualWallet( owner.address, versionManager.contractAddress, guardian.address, salt, badVersion, @@ -247,7 +268,7 @@ describe("Wallet Factory", function () { }); it("should create with the correct guardian", async () => { - const salt = utilities.generateSaltValue(); + const salt = utils.generateSaltValue(); // we get the future address const futureAddr = await factory.getAddressForCounterfactualWallet(owner.address, versionManager.contractAddress, guardian.address, salt, 1); // we create the wallet @@ -264,7 +285,7 @@ describe("Wallet Factory", function () { }); it("should fail to create a wallet at an existing address", async () => { - const salt = utilities.generateSaltValue(); + const salt = utils.generateSaltValue(); // we get the future address const futureAddr = await factory.getAddressForCounterfactualWallet(owner.address, versionManager.contractAddress, guardian.address, salt, 1); // we create the first wallet @@ -283,7 +304,7 @@ describe("Wallet Factory", function () { }); it("should fail to create counterfactually when there are no modules (with guardian)", async () => { - const salt = utilities.generateSaltValue(); + const salt = utils.generateSaltValue(); await assert.revertWith( factory.from(deployer).createCounterfactualWallet( owner.address, ethers.constants.AddressZero, guardian.address, salt, 1, @@ -293,7 +314,7 @@ describe("Wallet Factory", function () { }); it("should fail to create when the guardian is empty", async () => { - const salt = utilities.generateSaltValue(); + const salt = utils.generateSaltValue(); await assert.revertWith( factory.from(infrastructure).createCounterfactualWallet(owner.address, versionManager.contractAddress, ZERO_ADDRESS, salt, 1), "WF: guardian cannot be null", @@ -301,7 +322,7 @@ describe("Wallet Factory", function () { }); it("should emit and event when the balance is non zero at creation", async () => { - const salt = utilities.generateSaltValue(); + const salt = utils.generateSaltValue(); const amount = ethers.BigNumber.from("10000000000000"); // we get the future address const futureAddr = await factory.getAddressForCounterfactualWallet(owner.address, versionManager.contractAddress, guardian.address, salt, 1); @@ -320,7 +341,7 @@ describe("Wallet Factory", function () { }); it("should fail to get an address when the guardian is empty", async () => { - const salt = utilities.generateSaltValue(); + const salt = utils.generateSaltValue(); await assert.revertWith( factory.from(infrastructure).getAddressForCounterfactualWallet(owner.address, versionManager.contractAddress, ZERO_ADDRESS, salt, 1), "WF: guardian cannot be null", diff --git a/test/guardianManager.js b/test/guardianManager.js index a43a3989b..316dd3e39 100644 --- a/test/guardianManager.js +++ b/test/guardianManager.js @@ -1,5 +1,6 @@ /* global artifacts */ const ethers = require("ethers"); + const GuardianManager = artifacts.require("GuardianManager"); const LockStorage = artifacts.require("LockStorage"); const GuardianStorage = artifacts.require("GuardianStorage"); @@ -13,8 +14,8 @@ const NonCompliantGuardian = artifacts.require("NonCompliantGuardian"); const TestManager = require("../utils/test-manager"); -describe("GuardianManager", function () { - this.timeout(100000); +contract("GuardianManager", function (accounts) { + this.timeout(10000); const manager = new TestManager(accounts); diff --git a/test/kyber.js b/test/kyber.js index 014f4280a..ca6c8f986 100644 --- a/test/kyber.js +++ b/test/kyber.js @@ -11,8 +11,8 @@ const ERC20_SUPPLY = 10000000; const ERC20_DECIMALS = 18; const ERC20_RATE = 51 * 10 ** 13; // 1 ERC20 = 0.00051 ETH -describe("Kyber", function () { - this.timeout(100000); +contract("KyberNetwork", function (accounts) { + this.timeout(10000); const manager = new TestManager(); diff --git a/test/lockManager.js b/test/lockManager.js index c5fead58f..6b8202f93 100644 --- a/test/lockManager.js +++ b/test/lockManager.js @@ -13,8 +13,8 @@ const VersionManager = artifacts.require("VersionManager"); const TestManager = require("../utils/test-manager"); -describe("LockManager", function () { - this.timeout(100000); +contract("LockManager", function (accounts) { + this.timeout(10000); const manager = new TestManager(); diff --git a/test/makerV2Manager_invest.js b/test/makerV2Manager_invest.js index 74e8ad84a..af9636551 100644 --- a/test/makerV2Manager_invest.js +++ b/test/makerV2Manager_invest.js @@ -1,7 +1,9 @@ /* global artifacts */ const ethers = require("ethers"); -const { deployMaker, deployUniswap, WAD, ETH_PER_DAI, ETH_PER_MKR } = require("../utils/defi-deployer"); +const { + deployMaker, deployUniswap, WAD, ETH_PER_DAI, ETH_PER_MKR, +} = require("../utils/defi-deployer"); const TestManager = require("../utils/test-manager"); const Registry = artifacts.require("ModuleRegistry"); const MakerV2Manager = artifacts.require("MakerV2Manager"); @@ -15,8 +17,7 @@ const VersionManager = artifacts.require("VersionManager"); const DAI_SENT = WAD.div(100000000); -/* global accounts */ -describe("MakerV2 DSR", function () { +contract("MakerV2Invest", function (accounts) { this.timeout(100000); const manager = new TestManager(); diff --git a/test/makerV2Manager_loan.js b/test/makerV2Manager_loan.js index 649c9bde4..9683676ab 100644 --- a/test/makerV2Manager_loan.js +++ b/test/makerV2Manager_loan.js @@ -14,6 +14,7 @@ const { AddressZero } = ethers.constants; const TestManager = require("../utils/test-manager"); const GemJoin = artifacts.require("GemJoin"); const Registry = artifacts.require("ModuleRegistry"); + const MakerV2Manager = artifacts.require("MakerV2Manager"); const UpgradedMakerV2Manager = artifacts.require("TestUpgradedMakerV2Manager"); const MakerRegistry = artifacts.require("MakerRegistry"); @@ -30,8 +31,7 @@ const BadFeature = artifacts.require("TestFeature"); const RelayerManager = artifacts.require("RelayerManager"); const VersionManager = artifacts.require("VersionManager"); -/* global accounts */ -describe("MakerV2 Vaults", function () { +contract("MakerV2Loan", function (accounts) { this.timeout(100000); const manager = new TestManager(); diff --git a/test/multisig.js b/test/multisig.js index 4b53c5d03..dd91d22db 100644 --- a/test/multisig.js +++ b/test/multisig.js @@ -6,7 +6,7 @@ const TestManager = require("../utils/test-manager"); const MultisigExecutor = require("../utils/multisigexecutor.js"); const utils = require("../utils/utilities.js"); -describe("MultiSigWallet", function () { +contract("MultiSigWallet", function (accounts) { this.timeout(100000); const manager = new TestManager(); const owner = accounts[0].signer; diff --git a/test/nftTransfer.js b/test/nftTransfer.js index fe924d03a..9e888de20 100644 --- a/test/nftTransfer.js +++ b/test/nftTransfer.js @@ -21,8 +21,8 @@ const ZERO_BYTES32 = ethers.constants.HashZero; const TestManager = require("../utils/test-manager"); const { parseRelayReceipt, callStatic } = require("../utils/utilities.js"); -describe("Token Transfer", function () { - this.timeout(100000); +contract("NftTransfer", function (accounts) { + this.timeout(10000); const manager = new TestManager(); diff --git a/test/proxy.js b/test/proxy.js index 549f245c0..667b4dc2f 100644 --- a/test/proxy.js +++ b/test/proxy.js @@ -8,8 +8,8 @@ const BaseWallet = artifacts.require("BaseWallet"); const VersionManager = artifacts.require("VersionManager"); const Registry = artifacts.require("ModuleRegistry"); -describe("Proxy", function () { - this.timeout(100000); +contract("Proxy", function (accounts) { + this.timeout(10000); const owner = accounts[1].signer; const nonowner = accounts[2].signer; diff --git a/test/recoveryManager.js b/test/recoveryManager.js index 83ad90436..f15796df5 100644 --- a/test/recoveryManager.js +++ b/test/recoveryManager.js @@ -23,8 +23,8 @@ const { const WRONG_SIGNATURE_NUMBER_REVERT_MSG = "RM: Wrong number of signatures"; const INVALID_SIGNATURES_REVERT_MSG = "RM: Invalid signatures"; -describe("RecoveryManager", function () { - this.timeout(100000); +contract("RecoveryManager", function (accounts) { + this.timeout(10000); const manager = new TestManager(accounts); diff --git a/test/relayer.js b/test/relayer.js index 286e30173..31b2ead8e 100644 --- a/test/relayer.js +++ b/test/relayer.js @@ -32,8 +32,8 @@ const RELAYER_NOT_AUTHORISED_FOR_WALLET = "BF: must be owner or feature"; const GAS_LESS_THAN_GASLIMIT = "RM: not enough gas provided"; const WRONG_NUMBER_SIGNATURES = "RM: Wrong number of signatures"; -describe("RelayerManager", function () { - this.timeout(100000); +contract("RelayerManager", function (accounts) { + this.timeout(10000); const manager = new TestManager(); const { deployer } = manager; diff --git a/test/simpleUpgrader.js b/test/simpleUpgrader.js index b54f8a52f..6b205ef8e 100644 --- a/test/simpleUpgrader.js +++ b/test/simpleUpgrader.js @@ -1,7 +1,8 @@ /* global artifacts */ const ethers = require("ethers"); -/* global accounts, utils */ +const utils = require("../utils/utilities.js"); + const { formatBytes32String, parseBytes32String } = require("ethers").utils; const Proxy = artifacts.require("Proxy"); const BaseWallet = artifacts.require("BaseWallet"); @@ -17,8 +18,8 @@ const VersionManager = artifacts.require("VersionManager"); const RelayerManager = artifacts.require("RelayerManager"); const TestManager = artifacts.require("test-manager"); -describe("SimpleUpgrader", function () { - this.timeout(100000); +contract("SimpleUpgrader", function (accounts) { + this.timeout(10000); const manager = new TestManager(); diff --git a/test/tokenExchanger.js b/test/tokenExchanger.js index 3a89b2382..dcf5670ee 100644 --- a/test/tokenExchanger.js +++ b/test/tokenExchanger.js @@ -48,8 +48,8 @@ const DECIMALS = 18; // number of decimal for TOKEN_A, TOKEN_B contracts const TOKEN_A_RATE = parseEther("0.06"); const TOKEN_B_RATE = parseEther("0.03"); -describe("Token Exchanger", function () { - this.timeout(100000); +contract("TokenExchanger", function (accounts) { + this.timeout(10000); const manager = new TestManager(); const infrastructure = accounts[0].signer; diff --git a/test/transferManager.js b/test/transferManager.js index eb5b1f542..70615966f 100644 --- a/test/transferManager.js +++ b/test/transferManager.js @@ -25,7 +25,8 @@ const ERC20 = artifacts.require("TestERC20"); const WETH = artifacts.require("WETH9"); const TestContract = artifacts.require("TestContract"); -const { ETH_TOKEN, hasEvent, personalSign } = require("../utils/utilities.js"); +const utils = require("../utils/utilities.js"); +const { ETH_TOKEN } = require("../utils/utilities.js"); const ETH_LIMIT = 1000000; const SECURITY_PERIOD = 2; @@ -36,8 +37,8 @@ const ACTION_TRANSFER = 0; const TestManager = require("../utils/test-manager"); -describe("TransferManager", function () { - this.timeout(100000); +contract("TransferManager", function (accounts) { + this.timeout(10000); const manager = new TestManager(); @@ -286,7 +287,7 @@ describe("TransferManager", function () { await previousTransferManager.from(owner).addModule(existingWallet.contractAddress, versionManager.contractAddress); const tx = await versionManager.from(owner).upgradeWallet(existingWallet.contractAddress, await versionManager.lastVersion()); const txReceipt = await previousTransferManager.verboseWaitForTransaction(tx); - assert.isTrue(hasEvent(txReceipt, transferManager, "DailyLimitMigrated")); + assert.isTrue(utils.hasEvent(txReceipt, transferManager, "DailyLimitMigrated")); // check result limit = await transferManager.getCurrentLimit(existingWallet.contractAddress); assert.equal(limit.toNumber(), 4000000, "limit should have been migrated"); @@ -335,7 +336,7 @@ describe("TransferManager", function () { it("should be able to disable the limit", async () => { const tx = await transferManager.from(owner).disableLimit(wallet.contractAddress); const txReceipt = await transferManager.verboseWaitForTransaction(tx); - assert.isTrue(hasEvent(txReceipt, transferManager, "DailyLimitDisabled")); + assert.isTrue(utils.hasEvent(txReceipt, transferManager, "DailyLimitDisabled")); let limitDisabled = await transferManager.isLimitDisabled(wallet.contractAddress); assert.isFalse(limitDisabled); await manager.increaseTime(SECURITY_PERIOD + 1); @@ -898,14 +899,14 @@ describe("TransferManager", function () { const walletAsTransferManager = deployer.wrapDeployedContract(TransferManager, wallet.contractAddress); const signHash = ethers.utils.keccak256("0x1234"); - const sig = await personalSign(signHash, owner); + const sig = await utils.personalSign(signHash, owner); const valid = await walletAsTransferManager.isValidSignature(signHash, sig); assert.equal(valid, ERC1271_ISVALIDSIGNATURE_BYTES32); }); it("should revert isValidSignature static call for invalid signature", async () => { const walletAsTransferManager = deployer.wrapDeployedContract(TransferManager, wallet.contractAddress); const signHash = ethers.utils.keccak256("0x1234"); - const sig = `${await personalSign(signHash, owner)}a1`; + const sig = `${await utils.personalSign(signHash, owner)}a1`; await assert.revertWith( walletAsTransferManager.isValidSignature(signHash, sig), "TM: invalid signature length", @@ -914,7 +915,7 @@ describe("TransferManager", function () { it("should revert isValidSignature static call for invalid signer", async () => { const walletAsTransferManager = deployer.wrapDeployedContract(TransferManager, wallet.contractAddress); const signHash = ethers.utils.keccak256("0x1234"); - const sig = await personalSign(signHash, nonowner); + const sig = await utils.personalSign(signHash, nonowner); await assert.revertWith( walletAsTransferManager.isValidSignature(signHash, sig), "TM: Invalid signer", diff --git a/truffle-config-contracts-legacy-1.3.js b/truffle-config-contracts-legacy-1.3.js index 15f7cfc04..9c9920788 100644 --- a/truffle-config-contracts-legacy-1.3.js +++ b/truffle-config-contracts-legacy-1.3.js @@ -44,37 +44,37 @@ module.exports = { // options below to some value. // development: { - host: "127.0.0.1", // Localhost (default: none) - port: 8545, // Standard Ethereum port (default: none) - network_id: "*", // Any network (default: none) + host: "127.0.0.1", // Localhost (default: none) + port: 8545, // Standard Ethereum port (default: none) + network_id: "*", // Any network (default: none) }, // Another network with more advanced options... // advanced: { - // port: 8777, // Custom port - // network_id: 1342, // Custom network - // gas: 8500000, // Gas sent with each transaction (default: ~6700000) - // gasPrice: 20000000000, // 20 gwei (in wei) (default: 100 gwei) - // from:
, // Account to send txs from (default: accounts[0]) - // websockets: true // Enable EventEmitter interface for web3 (default: false) + // port: 8777, // Custom port + // network_id: 1342, // Custom network + // gas: 8500000, // Gas sent with each transaction (default: ~6700000) + // gasPrice: 20000000000, // 20 gwei (in wei) (default: 100 gwei) + // from:
, // Account to send txs from (default: accounts[0]) + // websockets: true // Enable EventEmitter interface for web3 (default: false) // }, // Useful for deploying to a public network. // NB: It's important to wrap the provider as a function. // ropsten: { - // provider: () => new HDWalletProvider(mnemonic, `https://ropsten.infura.io/v3/YOUR-PROJECT-ID`), - // network_id: 3, // Ropsten's id - // gas: 5500000, // Ropsten has a lower block limit than mainnet - // confirmations: 2, // # of confs to wait between deployments. (default: 0) - // timeoutBlocks: 200, // # of blocks before a deployment times out (minimum/default: 50) - // skipDryRun: true // Skip dry run before migrations? (default: false for public nets ) + // provider: () => new HDWalletProvider(mnemonic, `https://ropsten.infura.io/v3/YOUR-PROJECT-ID`), + // network_id: 3, // Ropsten's id + // gas: 5500000, // Ropsten has a lower block limit than mainnet + // confirmations: 2, // # of confs to wait between deployments. (default: 0) + // timeoutBlocks: 200, // # of blocks before a deployment times out (minimum/default: 50) + // skipDryRun: true // Skip dry run before migrations? (default: false for public nets ) // }, // Useful for private networks // private: { - // provider: () => new HDWalletProvider(mnemonic, `https://network.io`), - // network_id: 2111, // This network is yours, in the cloud. - // production: true // Treats this network as if it was a public net. (default: false) + // provider: () => new HDWalletProvider(mnemonic, `https://network.io`), + // network_id: 2111, // This network is yours, in the cloud. + // production: true // Treats this network as if it was a public net. (default: false) // } }, @@ -86,14 +86,14 @@ module.exports = { // Configure your compilers compilers: { solc: { - version: "0.5.4", // Fetch exact version from solc-bin (default: truffle's version) - docker: true, // Use "0.5.1" you've installed locally with docker (default: false) - settings: { // See the solidity docs for advice about optimization and evmVersion - optimizer: { - enabled: true, - runs: 999 - } - } - } - } -} + version: "0.5.4", // Fetch exact version from solc-bin (default: truffle's version) + docker: true, // Use "0.5.1" you've installed locally with docker (default: false) + settings: { // See the solidity docs for advice about optimization and evmVersion + optimizer: { + enabled: true, + runs: 999, + }, + }, + }, + }, +}; diff --git a/truffle-config-contracts-legacy-1.6.js b/truffle-config-contracts-legacy-1.6.js index aa0bfbdc4..7314cfae8 100644 --- a/truffle-config-contracts-legacy-1.6.js +++ b/truffle-config-contracts-legacy-1.6.js @@ -44,37 +44,37 @@ module.exports = { // options below to some value. // development: { - host: "127.0.0.1", // Localhost (default: none) - port: 8545, // Standard Ethereum port (default: none) - network_id: "*", // Any network (default: none) + host: "127.0.0.1", // Localhost (default: none) + port: 8545, // Standard Ethereum port (default: none) + network_id: "*", // Any network (default: none) }, // Another network with more advanced options... // advanced: { - // port: 8777, // Custom port - // network_id: 1342, // Custom network - // gas: 8500000, // Gas sent with each transaction (default: ~6700000) - // gasPrice: 20000000000, // 20 gwei (in wei) (default: 100 gwei) - // from:
, // Account to send txs from (default: accounts[0]) - // websockets: true // Enable EventEmitter interface for web3 (default: false) + // port: 8777, // Custom port + // network_id: 1342, // Custom network + // gas: 8500000, // Gas sent with each transaction (default: ~6700000) + // gasPrice: 20000000000, // 20 gwei (in wei) (default: 100 gwei) + // from:
, // Account to send txs from (default: accounts[0]) + // websockets: true // Enable EventEmitter interface for web3 (default: false) // }, // Useful for deploying to a public network. // NB: It's important to wrap the provider as a function. // ropsten: { - // provider: () => new HDWalletProvider(mnemonic, `https://ropsten.infura.io/v3/YOUR-PROJECT-ID`), - // network_id: 3, // Ropsten's id - // gas: 5500000, // Ropsten has a lower block limit than mainnet - // confirmations: 2, // # of confs to wait between deployments. (default: 0) - // timeoutBlocks: 200, // # of blocks before a deployment times out (minimum/default: 50) - // skipDryRun: true // Skip dry run before migrations? (default: false for public nets ) + // provider: () => new HDWalletProvider(mnemonic, `https://ropsten.infura.io/v3/YOUR-PROJECT-ID`), + // network_id: 3, // Ropsten's id + // gas: 5500000, // Ropsten has a lower block limit than mainnet + // confirmations: 2, // # of confs to wait between deployments. (default: 0) + // timeoutBlocks: 200, // # of blocks before a deployment times out (minimum/default: 50) + // skipDryRun: true // Skip dry run before migrations? (default: false for public nets ) // }, // Useful for private networks // private: { - // provider: () => new HDWalletProvider(mnemonic, `https://network.io`), - // network_id: 2111, // This network is yours, in the cloud. - // production: true // Treats this network as if it was a public net. (default: false) + // provider: () => new HDWalletProvider(mnemonic, `https://network.io`), + // network_id: 2111, // This network is yours, in the cloud. + // production: true // Treats this network as if it was a public net. (default: false) // } }, @@ -86,14 +86,14 @@ module.exports = { // Configure your compilers compilers: { solc: { - version: "0.5.4", // Fetch exact version from solc-bin (default: truffle's version) - docker: true, // Use "0.5.1" you've installed locally with docker (default: false) - settings: { // See the solidity docs for advice about optimization and evmVersion - optimizer: { - enabled: true, - runs: 999 - } - } - } - } -} + version: "0.5.4", // Fetch exact version from solc-bin (default: truffle's version) + docker: true, // Use "0.5.1" you've installed locally with docker (default: false) + settings: { // See the solidity docs for advice about optimization and evmVersion + optimizer: { + enabled: true, + runs: 999, + }, + }, + }, + }, +}; diff --git a/truffle-config-contracts-test.js b/truffle-config-contracts-test.js index 6befba68b..2f0292c52 100644 --- a/truffle-config-contracts-test.js +++ b/truffle-config-contracts-test.js @@ -43,37 +43,37 @@ module.exports = { // options below to some value. // development: { - host: "127.0.0.1", // Localhost (default: none) - port: 8545, // Standard Ethereum port (default: none) - network_id: "*", // Any network (default: none) + host: "127.0.0.1", // Localhost (default: none) + port: 8545, // Standard Ethereum port (default: none) + network_id: "*", // Any network (default: none) }, // Another network with more advanced options... // advanced: { - // port: 8777, // Custom port - // network_id: 1342, // Custom network - // gas: 8500000, // Gas sent with each transaction (default: ~6700000) - // gasPrice: 20000000000, // 20 gwei (in wei) (default: 100 gwei) - // from:
, // Account to send txs from (default: accounts[0]) - // websockets: true // Enable EventEmitter interface for web3 (default: false) + // port: 8777, // Custom port + // network_id: 1342, // Custom network + // gas: 8500000, // Gas sent with each transaction (default: ~6700000) + // gasPrice: 20000000000, // 20 gwei (in wei) (default: 100 gwei) + // from:
, // Account to send txs from (default: accounts[0]) + // websockets: true // Enable EventEmitter interface for web3 (default: false) // }, // Useful for deploying to a public network. // NB: It's important to wrap the provider as a function. // ropsten: { - // provider: () => new HDWalletProvider(mnemonic, `https://ropsten.infura.io/v3/YOUR-PROJECT-ID`), - // network_id: 3, // Ropsten's id - // gas: 5500000, // Ropsten has a lower block limit than mainnet - // confirmations: 2, // # of confs to wait between deployments. (default: 0) - // timeoutBlocks: 200, // # of blocks before a deployment times out (minimum/default: 50) - // skipDryRun: true // Skip dry run before migrations? (default: false for public nets ) + // provider: () => new HDWalletProvider(mnemonic, `https://ropsten.infura.io/v3/YOUR-PROJECT-ID`), + // network_id: 3, // Ropsten's id + // gas: 5500000, // Ropsten has a lower block limit than mainnet + // confirmations: 2, // # of confs to wait between deployments. (default: 0) + // timeoutBlocks: 200, // # of blocks before a deployment times out (minimum/default: 50) + // skipDryRun: true // Skip dry run before migrations? (default: false for public nets ) // }, // Useful for private networks // private: { - // provider: () => new HDWalletProvider(mnemonic, `https://network.io`), - // network_id: 2111, // This network is yours, in the cloud. - // production: true // Treats this network as if it was a public net. (default: false) + // provider: () => new HDWalletProvider(mnemonic, `https://network.io`), + // network_id: 2111, // This network is yours, in the cloud. + // production: true // Treats this network as if it was a public net. (default: false) // } }, @@ -85,14 +85,14 @@ module.exports = { // Configure your compilers compilers: { solc: { - version: "0.6.12", // Fetch exact version from solc-bin (default: truffle's version) - docker: true, // Use "0.5.1" you've installed locally with docker (default: false) - settings: { // See the solidity docs for advice about optimization and evmVersion - optimizer: { - enabled: true, - runs: 999 - } - } - } - } -} + version: "0.6.12", // Fetch exact version from solc-bin (default: truffle's version) + docker: true, // Use "0.5.1" you've installed locally with docker (default: false) + settings: { // See the solidity docs for advice about optimization and evmVersion + optimizer: { + enabled: true, + runs: 999, + }, + }, + }, + }, +}; diff --git a/truffle-config-contracts.js b/truffle-config-contracts.js index effc2e33b..6a451164e 100644 --- a/truffle-config-contracts.js +++ b/truffle-config-contracts.js @@ -43,37 +43,37 @@ module.exports = { // options below to some value. // development: { - host: "127.0.0.1", // Localhost (default: none) - port: 8545, // Standard Ethereum port (default: none) - network_id: "*", // Any network (default: none) + host: "127.0.0.1", // Localhost (default: none) + port: 8545, // Standard Ethereum port (default: none) + network_id: "*", // Any network (default: none) }, // Another network with more advanced options... // advanced: { - // port: 8777, // Custom port - // network_id: 1342, // Custom network - // gas: 8500000, // Gas sent with each transaction (default: ~6700000) - // gasPrice: 20000000000, // 20 gwei (in wei) (default: 100 gwei) - // from:
, // Account to send txs from (default: accounts[0]) - // websockets: true // Enable EventEmitter interface for web3 (default: false) + // port: 8777, // Custom port + // network_id: 1342, // Custom network + // gas: 8500000, // Gas sent with each transaction (default: ~6700000) + // gasPrice: 20000000000, // 20 gwei (in wei) (default: 100 gwei) + // from:
, // Account to send txs from (default: accounts[0]) + // websockets: true // Enable EventEmitter interface for web3 (default: false) // }, // Useful for deploying to a public network. // NB: It's important to wrap the provider as a function. // ropsten: { - // provider: () => new HDWalletProvider(mnemonic, `https://ropsten.infura.io/v3/YOUR-PROJECT-ID`), - // network_id: 3, // Ropsten's id - // gas: 5500000, // Ropsten has a lower block limit than mainnet - // confirmations: 2, // # of confs to wait between deployments. (default: 0) - // timeoutBlocks: 200, // # of blocks before a deployment times out (minimum/default: 50) - // skipDryRun: true // Skip dry run before migrations? (default: false for public nets ) + // provider: () => new HDWalletProvider(mnemonic, `https://ropsten.infura.io/v3/YOUR-PROJECT-ID`), + // network_id: 3, // Ropsten's id + // gas: 5500000, // Ropsten has a lower block limit than mainnet + // confirmations: 2, // # of confs to wait between deployments. (default: 0) + // timeoutBlocks: 200, // # of blocks before a deployment times out (minimum/default: 50) + // skipDryRun: true // Skip dry run before migrations? (default: false for public nets ) // }, // Useful for private networks // private: { - // provider: () => new HDWalletProvider(mnemonic, `https://network.io`), - // network_id: 2111, // This network is yours, in the cloud. - // production: true // Treats this network as if it was a public net. (default: false) + // provider: () => new HDWalletProvider(mnemonic, `https://network.io`), + // network_id: 2111, // This network is yours, in the cloud. + // production: true // Treats this network as if it was a public net. (default: false) // } }, @@ -85,14 +85,14 @@ module.exports = { // Configure your compilers compilers: { solc: { - version: "0.6.12", // Fetch exact version from solc-bin (default: truffle's version) - docker: true, // Use "0.5.1" you've installed locally with docker (default: false) - settings: { // See the solidity docs for advice about optimization and evmVersion - optimizer: { - enabled: true, - runs: 999 - } - } - } - } -} + version: "0.6.12", // Fetch exact version from solc-bin (default: truffle's version) + docker: true, // Use "0.5.1" you've installed locally with docker (default: false) + settings: { // See the solidity docs for advice about optimization and evmVersion + optimizer: { + enabled: true, + runs: 999, + }, + }, + }, + }, +}; diff --git a/truffle-config-infrastructure-0.5.js b/truffle-config-infrastructure-0.5.js index 468dfc3d7..00576ce66 100644 --- a/truffle-config-infrastructure-0.5.js +++ b/truffle-config-infrastructure-0.5.js @@ -43,37 +43,37 @@ module.exports = { // options below to some value. // development: { - host: "127.0.0.1", // Localhost (default: none) - port: 8545, // Standard Ethereum port (default: none) - network_id: "*", // Any network (default: none) + host: "127.0.0.1", // Localhost (default: none) + port: 8545, // Standard Ethereum port (default: none) + network_id: "*", // Any network (default: none) }, // Another network with more advanced options... // advanced: { - // port: 8777, // Custom port - // network_id: 1342, // Custom network - // gas: 8500000, // Gas sent with each transaction (default: ~6700000) - // gasPrice: 20000000000, // 20 gwei (in wei) (default: 100 gwei) - // from:
, // Account to send txs from (default: accounts[0]) - // websockets: true // Enable EventEmitter interface for web3 (default: false) + // port: 8777, // Custom port + // network_id: 1342, // Custom network + // gas: 8500000, // Gas sent with each transaction (default: ~6700000) + // gasPrice: 20000000000, // 20 gwei (in wei) (default: 100 gwei) + // from:
, // Account to send txs from (default: accounts[0]) + // websockets: true // Enable EventEmitter interface for web3 (default: false) // }, // Useful for deploying to a public network. // NB: It's important to wrap the provider as a function. // ropsten: { - // provider: () => new HDWalletProvider(mnemonic, `https://ropsten.infura.io/v3/YOUR-PROJECT-ID`), - // network_id: 3, // Ropsten's id - // gas: 5500000, // Ropsten has a lower block limit than mainnet - // confirmations: 2, // # of confs to wait between deployments. (default: 0) - // timeoutBlocks: 200, // # of blocks before a deployment times out (minimum/default: 50) - // skipDryRun: true // Skip dry run before migrations? (default: false for public nets ) + // provider: () => new HDWalletProvider(mnemonic, `https://ropsten.infura.io/v3/YOUR-PROJECT-ID`), + // network_id: 3, // Ropsten's id + // gas: 5500000, // Ropsten has a lower block limit than mainnet + // confirmations: 2, // # of confs to wait between deployments. (default: 0) + // timeoutBlocks: 200, // # of blocks before a deployment times out (minimum/default: 50) + // skipDryRun: true // Skip dry run before migrations? (default: false for public nets ) // }, // Useful for private networks // private: { - // provider: () => new HDWalletProvider(mnemonic, `https://network.io`), - // network_id: 2111, // This network is yours, in the cloud. - // production: true // Treats this network as if it was a public net. (default: false) + // provider: () => new HDWalletProvider(mnemonic, `https://network.io`), + // network_id: 2111, // This network is yours, in the cloud. + // production: true // Treats this network as if it was a public net. (default: false) // } }, @@ -85,14 +85,14 @@ module.exports = { // Configure your compilers compilers: { solc: { - version: "0.5.4", // Fetch exact version from solc-bin (default: truffle's version) - docker: true, // Use "0.5.1" you've installed locally with docker (default: false) - settings: { // See the solidity docs for advice about optimization and evmVersion - optimizer: { - enabled: true, - runs: 999 - } - } - } - } -} + version: "0.5.4", // Fetch exact version from solc-bin (default: truffle's version) + docker: true, // Use "0.5.1" you've installed locally with docker (default: false) + settings: { // See the solidity docs for advice about optimization and evmVersion + optimizer: { + enabled: true, + runs: 999, + }, + }, + }, + }, +}; diff --git a/truffle-config-infrastructure.js b/truffle-config-infrastructure.js index 2185989ba..68fd4d7e5 100644 --- a/truffle-config-infrastructure.js +++ b/truffle-config-infrastructure.js @@ -43,37 +43,37 @@ module.exports = { // options below to some value. // development: { - host: "127.0.0.1", // Localhost (default: none) - port: 8545, // Standard Ethereum port (default: none) - network_id: "*", // Any network (default: none) + host: "127.0.0.1", // Localhost (default: none) + port: 8545, // Standard Ethereum port (default: none) + network_id: "*", // Any network (default: none) }, // Another network with more advanced options... // advanced: { - // port: 8777, // Custom port - // network_id: 1342, // Custom network - // gas: 8500000, // Gas sent with each transaction (default: ~6700000) - // gasPrice: 20000000000, // 20 gwei (in wei) (default: 100 gwei) - // from:
, // Account to send txs from (default: accounts[0]) - // websockets: true // Enable EventEmitter interface for web3 (default: false) + // port: 8777, // Custom port + // network_id: 1342, // Custom network + // gas: 8500000, // Gas sent with each transaction (default: ~6700000) + // gasPrice: 20000000000, // 20 gwei (in wei) (default: 100 gwei) + // from:
, // Account to send txs from (default: accounts[0]) + // websockets: true // Enable EventEmitter interface for web3 (default: false) // }, // Useful for deploying to a public network. // NB: It's important to wrap the provider as a function. // ropsten: { - // provider: () => new HDWalletProvider(mnemonic, `https://ropsten.infura.io/v3/YOUR-PROJECT-ID`), - // network_id: 3, // Ropsten's id - // gas: 5500000, // Ropsten has a lower block limit than mainnet - // confirmations: 2, // # of confs to wait between deployments. (default: 0) - // timeoutBlocks: 200, // # of blocks before a deployment times out (minimum/default: 50) - // skipDryRun: true // Skip dry run before migrations? (default: false for public nets ) + // provider: () => new HDWalletProvider(mnemonic, `https://ropsten.infura.io/v3/YOUR-PROJECT-ID`), + // network_id: 3, // Ropsten's id + // gas: 5500000, // Ropsten has a lower block limit than mainnet + // confirmations: 2, // # of confs to wait between deployments. (default: 0) + // timeoutBlocks: 200, // # of blocks before a deployment times out (minimum/default: 50) + // skipDryRun: true // Skip dry run before migrations? (default: false for public nets ) // }, // Useful for private networks // private: { - // provider: () => new HDWalletProvider(mnemonic, `https://network.io`), - // network_id: 2111, // This network is yours, in the cloud. - // production: true // Treats this network as if it was a public net. (default: false) + // provider: () => new HDWalletProvider(mnemonic, `https://network.io`), + // network_id: 2111, // This network is yours, in the cloud. + // production: true // Treats this network as if it was a public net. (default: false) // } }, @@ -85,14 +85,14 @@ module.exports = { // Configure your compilers compilers: { solc: { - version: "0.6.12", // Fetch exact version from solc-bin (default: truffle's version) - docker: true, // Use "0.5.1" you've installed locally with docker (default: false) - settings: { // See the solidity docs for advice about optimization and evmVersion - optimizer: { - enabled: true, - runs: 999 - } - } - } - } -} + version: "0.6.12", // Fetch exact version from solc-bin (default: truffle's version) + docker: true, // Use "0.5.1" you've installed locally with docker (default: false) + settings: { // See the solidity docs for advice about optimization and evmVersion + optimizer: { + enabled: true, + runs: 999, + }, + }, + }, + }, +}; diff --git a/truffle-config-lib.js b/truffle-config-lib.js index 84f95832e..46c348bc9 100644 --- a/truffle-config-lib.js +++ b/truffle-config-lib.js @@ -2,9 +2,9 @@ module.exports = { contracts_directory: "lib", networks: { development: { - host: "127.0.0.1", - port: 8545, - network_id: "*", + host: "127.0.0.1", + port: 8545, + network_id: "*", }, }, @@ -14,14 +14,14 @@ module.exports = { compilers: { solc: { - version: "0.5.4", // Fetch exact version from solc-bin (default: truffle's version) - docker: true, // Use "0.5.1" you've installed locally with docker (default: false) - settings: { // See the solidity docs for advice about optimization and evmVersion - optimizer: { - enabled: true, - runs: 200 - } - } - } - } -} + version: "0.5.4", // Fetch exact version from solc-bin (default: truffle's version) + docker: true, // Use "0.5.1" you've installed locally with docker (default: false) + settings: { // See the solidity docs for advice about optimization and evmVersion + optimizer: { + enabled: true, + runs: 200, + }, + }, + }, + }, +}; diff --git a/truffle-config-modules.js b/truffle-config-modules.js index 3d30d4f0a..68381d73d 100644 --- a/truffle-config-modules.js +++ b/truffle-config-modules.js @@ -43,37 +43,37 @@ module.exports = { // options below to some value. // development: { - host: "127.0.0.1", // Localhost (default: none) - port: 8545, // Standard Ethereum port (default: none) - network_id: "*", // Any network (default: none) + host: "127.0.0.1", // Localhost (default: none) + port: 8545, // Standard Ethereum port (default: none) + network_id: "*", // Any network (default: none) }, // Another network with more advanced options... // advanced: { - // port: 8777, // Custom port - // network_id: 1342, // Custom network - // gas: 8500000, // Gas sent with each transaction (default: ~6700000) - // gasPrice: 20000000000, // 20 gwei (in wei) (default: 100 gwei) - // from:
, // Account to send txs from (default: accounts[0]) - // websockets: true // Enable EventEmitter interface for web3 (default: false) + // port: 8777, // Custom port + // network_id: 1342, // Custom network + // gas: 8500000, // Gas sent with each transaction (default: ~6700000) + // gasPrice: 20000000000, // 20 gwei (in wei) (default: 100 gwei) + // from:
, // Account to send txs from (default: accounts[0]) + // websockets: true // Enable EventEmitter interface for web3 (default: false) // }, // Useful for deploying to a public network. // NB: It's important to wrap the provider as a function. // ropsten: { - // provider: () => new HDWalletProvider(mnemonic, `https://ropsten.infura.io/v3/YOUR-PROJECT-ID`), - // network_id: 3, // Ropsten's id - // gas: 5500000, // Ropsten has a lower block limit than mainnet - // confirmations: 2, // # of confs to wait between deployments. (default: 0) - // timeoutBlocks: 200, // # of blocks before a deployment times out (minimum/default: 50) - // skipDryRun: true // Skip dry run before migrations? (default: false for public nets ) + // provider: () => new HDWalletProvider(mnemonic, `https://ropsten.infura.io/v3/YOUR-PROJECT-ID`), + // network_id: 3, // Ropsten's id + // gas: 5500000, // Ropsten has a lower block limit than mainnet + // confirmations: 2, // # of confs to wait between deployments. (default: 0) + // timeoutBlocks: 200, // # of blocks before a deployment times out (minimum/default: 50) + // skipDryRun: true // Skip dry run before migrations? (default: false for public nets ) // }, // Useful for private networks // private: { - // provider: () => new HDWalletProvider(mnemonic, `https://network.io`), - // network_id: 2111, // This network is yours, in the cloud. - // production: true // Treats this network as if it was a public net. (default: false) + // provider: () => new HDWalletProvider(mnemonic, `https://network.io`), + // network_id: 2111, // This network is yours, in the cloud. + // production: true // Treats this network as if it was a public net. (default: false) // } }, @@ -85,14 +85,14 @@ module.exports = { // Configure your compilers compilers: { solc: { - version: "0.6.12", // Fetch exact version from solc-bin (default: truffle's version) - docker: true, // Use "0.5.1" you've installed locally with docker (default: false) - settings: { // See the solidity docs for advice about optimization and evmVersion - optimizer: { - enabled: true, - runs: 999 - } - } - } - } -} + version: "0.6.12", // Fetch exact version from solc-bin (default: truffle's version) + docker: true, // Use "0.5.1" you've installed locally with docker (default: false) + settings: { // See the solidity docs for advice about optimization and evmVersion + optimizer: { + enabled: true, + runs: 999, + }, + }, + }, + }, +}; diff --git a/truffle-config-wallet.js b/truffle-config-wallet.js index d6f059f98..bbd2e5df5 100644 --- a/truffle-config-wallet.js +++ b/truffle-config-wallet.js @@ -43,37 +43,37 @@ module.exports = { // options below to some value. // development: { - host: "127.0.0.1", // Localhost (default: none) - port: 8545, // Standard Ethereum port (default: none) - network_id: "*", // Any network (default: none) + host: "127.0.0.1", // Localhost (default: none) + port: 8545, // Standard Ethereum port (default: none) + network_id: "*", // Any network (default: none) }, // Another network with more advanced options... // advanced: { - // port: 8777, // Custom port - // network_id: 1342, // Custom network - // gas: 8500000, // Gas sent with each transaction (default: ~6700000) - // gasPrice: 20000000000, // 20 gwei (in wei) (default: 100 gwei) - // from:
, // Account to send txs from (default: accounts[0]) - // websockets: true // Enable EventEmitter interface for web3 (default: false) + // port: 8777, // Custom port + // network_id: 1342, // Custom network + // gas: 8500000, // Gas sent with each transaction (default: ~6700000) + // gasPrice: 20000000000, // 20 gwei (in wei) (default: 100 gwei) + // from:
, // Account to send txs from (default: accounts[0]) + // websockets: true // Enable EventEmitter interface for web3 (default: false) // }, // Useful for deploying to a public network. // NB: It's important to wrap the provider as a function. // ropsten: { - // provider: () => new HDWalletProvider(mnemonic, `https://ropsten.infura.io/v3/YOUR-PROJECT-ID`), - // network_id: 3, // Ropsten's id - // gas: 5500000, // Ropsten has a lower block limit than mainnet - // confirmations: 2, // # of confs to wait between deployments. (default: 0) - // timeoutBlocks: 200, // # of blocks before a deployment times out (minimum/default: 50) - // skipDryRun: true // Skip dry run before migrations? (default: false for public nets ) + // provider: () => new HDWalletProvider(mnemonic, `https://ropsten.infura.io/v3/YOUR-PROJECT-ID`), + // network_id: 3, // Ropsten's id + // gas: 5500000, // Ropsten has a lower block limit than mainnet + // confirmations: 2, // # of confs to wait between deployments. (default: 0) + // timeoutBlocks: 200, // # of blocks before a deployment times out (minimum/default: 50) + // skipDryRun: true // Skip dry run before migrations? (default: false for public nets ) // }, // Useful for private networks // private: { - // provider: () => new HDWalletProvider(mnemonic, `https://network.io`), - // network_id: 2111, // This network is yours, in the cloud. - // production: true // Treats this network as if it was a public net. (default: false) + // provider: () => new HDWalletProvider(mnemonic, `https://network.io`), + // network_id: 2111, // This network is yours, in the cloud. + // production: true // Treats this network as if it was a public net. (default: false) // } }, @@ -85,14 +85,14 @@ module.exports = { // Configure your compilers compilers: { solc: { - version: "0.6.12", // Fetch exact version from solc-bin (default: truffle's version) - docker: true, // Use "0.5.1" you've installed locally with docker (default: false) - settings: { // See the solidity docs for advice about optimization and evmVersion - optimizer: { - enabled: true, - runs: 999 - } - } - } - } -} + version: "0.6.12", // Fetch exact version from solc-bin (default: truffle's version) + docker: true, // Use "0.5.1" you've installed locally with docker (default: false) + settings: { // See the solidity docs for advice about optimization and evmVersion + optimizer: { + enabled: true, + runs: 999, + }, + }, + }, + }, +}; From a7d98fb0535ad9ec28e14f6af05c868bd2770bc8 Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Tue, 28 Jul 2020 16:34:09 +0300 Subject: [PATCH 006/113] Switch to default truffle config file name --- truffle-config-contracts.js => truffle-config.js | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename truffle-config-contracts.js => truffle-config.js (100%) diff --git a/truffle-config-contracts.js b/truffle-config.js similarity index 100% rename from truffle-config-contracts.js rename to truffle-config.js From 40a3da9dfb118225eec4ef26938f21d7cb47ee28 Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Tue, 28 Jul 2020 16:43:24 +0300 Subject: [PATCH 007/113] Move to use mocha test timeout configuration in truffle config --- test/approvedTransfer.js | 4 +--- test/baseModule.js | 4 +--- test/baseWallet.js | 4 +--- test/compoundManager_invest.js | 4 +--- test/compoundManager_loan.js | 4 +--- test/ens.js | 4 +--- test/factory.js | 4 +--- test/guardianManager.js | 4 +--- test/kyber.js | 4 +--- test/lockManager.js | 4 +--- test/makerV2Manager_invest.js | 4 +--- test/makerV2Manager_loan.js | 4 +--- test/multisig.js | 3 +-- test/nftTransfer.js | 4 +--- test/proxy.js | 4 +--- test/recoveryManager.js | 4 +--- test/relayer.js | 4 +--- test/simpleUpgrader.js | 4 +--- test/tokenExchanger.js | 4 +--- test/transferManager.js | 4 +--- truffle-config-contracts-legacy-1.3.js | 2 +- truffle-config-contracts-legacy-1.6.js | 2 +- truffle-config-contracts-test.js | 2 +- truffle-config-infrastructure-0.5.js | 2 +- truffle-config-infrastructure.js | 2 +- truffle-config-lib.js | 2 +- truffle-config-modules.js | 2 +- truffle-config-wallet.js | 2 +- truffle-config.js | 2 +- 29 files changed, 29 insertions(+), 68 deletions(-) diff --git a/test/approvedTransfer.js b/test/approvedTransfer.js index 6dd17801b..865c91e2e 100644 --- a/test/approvedTransfer.js +++ b/test/approvedTransfer.js @@ -24,9 +24,7 @@ const ZERO_BYTES32 = ethers.constants.HashZero; const WRONG_SIGNATURE_NUMBER_REVERT_MSG = "RM: Wrong number of signatures"; const INVALID_SIGNATURES_REVERT_MSG = "RM: Invalid signatures"; -contract("ApprovedTransfer", function (accounts) { - this.timeout(10000); - +contract("ApprovedTransfer", (accounts) => { const manager = new TestManager(); const infrastructure = accounts[0].signer; diff --git a/test/baseModule.js b/test/baseModule.js index 8e0a2fee0..ff82a0a99 100644 --- a/test/baseModule.js +++ b/test/baseModule.js @@ -9,9 +9,7 @@ const NonCompliantERC20 = artifacts.require("NonCompliantERC20"); const TestManager = require("../utils/test-manager"); -contract("BaseModule", function (accounts) { - this.timeout(10000); - +contract("BaseModule", (accounts) => { const manager = new TestManager(); const { deployer } = manager; diff --git a/test/baseWallet.js b/test/baseWallet.js index 1ad1cc23b..f1112b2e7 100644 --- a/test/baseWallet.js +++ b/test/baseWallet.js @@ -14,9 +14,7 @@ const TestFeature = require("../build/TestFeature"); const TestManager = require("../utils/test-manager"); -contract("BaseWallet", function (accounts) { - this.timeout(10000); - +contract("BaseWallet", (accounts) => { const manager = new TestManager(); const owner = accounts[1].signer; diff --git a/test/compoundManager_invest.js b/test/compoundManager_invest.js index de2483dba..bf09e0950 100644 --- a/test/compoundManager_invest.js +++ b/test/compoundManager_invest.js @@ -30,9 +30,7 @@ const ERC20 = artifacts.require("TestERC20"); const { ETH_TOKEN } = require("../utils/utilities.js"); const TestManager = require("../utils/test-manager"); -contract("Invest Manager with Compound", function (accounts) { - this.timeout(1000000); - +contract("Invest Manager with Compound", (accounts) => { const manager = new TestManager(); const infrastructure = accounts[0].signer; diff --git a/test/compoundManager_loan.js b/test/compoundManager_loan.js index ec246f0e0..e65c9bed0 100644 --- a/test/compoundManager_loan.js +++ b/test/compoundManager_loan.js @@ -34,9 +34,7 @@ const TestManager = require("../utils/test-manager"); const ZERO_BYTES32 = ethers.constants.HashZero; -contract("Loan Module", function (accounts) { - this.timeout(1000000); - +contract("Loan Module", (accounts) => { const manager = new TestManager(); const infrastructure = accounts[0].signer; diff --git a/test/ens.js b/test/ens.js index d8a853708..374ae0249 100644 --- a/test/ens.js +++ b/test/ens.js @@ -12,9 +12,7 @@ const utilities = require("../utils/utilities.js"); const ZERO_BYTES32 = ethers.constants.HashZero; -contract("ENS contracts", function (accounts) { - this.timeout(10000); - +contract("ENS contracts", (accounts) => { const manager = new TestManager(); const infrastructure = accounts[0].signer; diff --git a/test/factory.js b/test/factory.js index 40a45ed10..21797ec4a 100644 --- a/test/factory.js +++ b/test/factory.js @@ -12,9 +12,7 @@ const utils = require("../utils/utilities.js"); const ZERO_ADDRESS = ethers.constants.AddressZero; -contract("WalletFactory", function (accounts) { - this.timeout(10000); - +contract("WalletFactory", (accounts) => { const manager = new TestManager(); const infrastructure = accounts[0].signer; diff --git a/test/guardianManager.js b/test/guardianManager.js index 316dd3e39..b7b46254b 100644 --- a/test/guardianManager.js +++ b/test/guardianManager.js @@ -14,9 +14,7 @@ const NonCompliantGuardian = artifacts.require("NonCompliantGuardian"); const TestManager = require("../utils/test-manager"); -contract("GuardianManager", function (accounts) { - this.timeout(10000); - +contract("GuardianManager", (accounts) => { const manager = new TestManager(accounts); const owner = accounts[1].signer; diff --git a/test/kyber.js b/test/kyber.js index ca6c8f986..c232ef2c5 100644 --- a/test/kyber.js +++ b/test/kyber.js @@ -11,9 +11,7 @@ const ERC20_SUPPLY = 10000000; const ERC20_DECIMALS = 18; const ERC20_RATE = 51 * 10 ** 13; // 1 ERC20 = 0.00051 ETH -contract("KyberNetwork", function (accounts) { - this.timeout(10000); - +contract("KyberNetwork", (accounts) => { const manager = new TestManager(); const trader = accounts[1].signer; diff --git a/test/lockManager.js b/test/lockManager.js index 6b8202f93..ae05b7a74 100644 --- a/test/lockManager.js +++ b/test/lockManager.js @@ -13,9 +13,7 @@ const VersionManager = artifacts.require("VersionManager"); const TestManager = require("../utils/test-manager"); -contract("LockManager", function (accounts) { - this.timeout(10000); - +contract("LockManager", (accounts) => { const manager = new TestManager(); const owner = accounts[1].signer; diff --git a/test/makerV2Manager_invest.js b/test/makerV2Manager_invest.js index af9636551..8a6f6fe21 100644 --- a/test/makerV2Manager_invest.js +++ b/test/makerV2Manager_invest.js @@ -17,9 +17,7 @@ const VersionManager = artifacts.require("VersionManager"); const DAI_SENT = WAD.div(100000000); -contract("MakerV2Invest", function (accounts) { - this.timeout(100000); - +contract("MakerV2Invest", (accounts) => { const manager = new TestManager(); const { deployer } = manager; diff --git a/test/makerV2Manager_loan.js b/test/makerV2Manager_loan.js index 9683676ab..259d242be 100644 --- a/test/makerV2Manager_loan.js +++ b/test/makerV2Manager_loan.js @@ -31,9 +31,7 @@ const BadFeature = artifacts.require("TestFeature"); const RelayerManager = artifacts.require("RelayerManager"); const VersionManager = artifacts.require("VersionManager"); -contract("MakerV2Loan", function (accounts) { - this.timeout(100000); - +contract("MakerV2Loan", (accounts) => { const manager = new TestManager(); const { deployer } = manager; diff --git a/test/multisig.js b/test/multisig.js index dd91d22db..0cae611b9 100644 --- a/test/multisig.js +++ b/test/multisig.js @@ -6,8 +6,7 @@ const TestManager = require("../utils/test-manager"); const MultisigExecutor = require("../utils/multisigexecutor.js"); const utils = require("../utils/utilities.js"); -contract("MultiSigWallet", function (accounts) { - this.timeout(100000); +contract("MultiSigWallet", (accounts) => { const manager = new TestManager(); const owner = accounts[0].signer; const owner1 = accounts[1].signer; diff --git a/test/nftTransfer.js b/test/nftTransfer.js index 9e888de20..f631deee7 100644 --- a/test/nftTransfer.js +++ b/test/nftTransfer.js @@ -21,9 +21,7 @@ const ZERO_BYTES32 = ethers.constants.HashZero; const TestManager = require("../utils/test-manager"); const { parseRelayReceipt, callStatic } = require("../utils/utilities.js"); -contract("NftTransfer", function (accounts) { - this.timeout(10000); - +contract("NftTransfer", (accounts) => { const manager = new TestManager(); const infrastructure = accounts[0].signer; diff --git a/test/proxy.js b/test/proxy.js index 667b4dc2f..021ed8bae 100644 --- a/test/proxy.js +++ b/test/proxy.js @@ -8,9 +8,7 @@ const BaseWallet = artifacts.require("BaseWallet"); const VersionManager = artifacts.require("VersionManager"); const Registry = artifacts.require("ModuleRegistry"); -contract("Proxy", function (accounts) { - this.timeout(10000); - +contract("Proxy", (accounts) => { const owner = accounts[1].signer; const nonowner = accounts[2].signer; diff --git a/test/recoveryManager.js b/test/recoveryManager.js index f15796df5..f0c29cbb9 100644 --- a/test/recoveryManager.js +++ b/test/recoveryManager.js @@ -23,9 +23,7 @@ const { const WRONG_SIGNATURE_NUMBER_REVERT_MSG = "RM: Wrong number of signatures"; const INVALID_SIGNATURES_REVERT_MSG = "RM: Invalid signatures"; -contract("RecoveryManager", function (accounts) { - this.timeout(10000); - +contract("RecoveryManager", (accounts) => { const manager = new TestManager(accounts); const owner = accounts[1].signer; diff --git a/test/relayer.js b/test/relayer.js index 31b2ead8e..bfbdd1f72 100644 --- a/test/relayer.js +++ b/test/relayer.js @@ -32,9 +32,7 @@ const RELAYER_NOT_AUTHORISED_FOR_WALLET = "BF: must be owner or feature"; const GAS_LESS_THAN_GASLIMIT = "RM: not enough gas provided"; const WRONG_NUMBER_SIGNATURES = "RM: Wrong number of signatures"; -contract("RelayerManager", function (accounts) { - this.timeout(10000); - +contract("RelayerManager", (accounts) => { const manager = new TestManager(); const { deployer } = manager; let { getNonceForRelay } = manager; diff --git a/test/simpleUpgrader.js b/test/simpleUpgrader.js index 6b205ef8e..491c380d4 100644 --- a/test/simpleUpgrader.js +++ b/test/simpleUpgrader.js @@ -18,9 +18,7 @@ const VersionManager = artifacts.require("VersionManager"); const RelayerManager = artifacts.require("RelayerManager"); const TestManager = artifacts.require("test-manager"); -contract("SimpleUpgrader", function (accounts) { - this.timeout(10000); - +contract("SimpleUpgrader", (accounts) => { const manager = new TestManager(); const owner = accounts[1].signer; diff --git a/test/tokenExchanger.js b/test/tokenExchanger.js index dcf5670ee..411141f80 100644 --- a/test/tokenExchanger.js +++ b/test/tokenExchanger.js @@ -48,9 +48,7 @@ const DECIMALS = 18; // number of decimal for TOKEN_A, TOKEN_B contracts const TOKEN_A_RATE = parseEther("0.06"); const TOKEN_B_RATE = parseEther("0.03"); -contract("TokenExchanger", function (accounts) { - this.timeout(10000); - +contract("TokenExchanger", (accounts) => { const manager = new TestManager(); const infrastructure = accounts[0].signer; const owner = accounts[1].signer; diff --git a/test/transferManager.js b/test/transferManager.js index 70615966f..3dcc85b29 100644 --- a/test/transferManager.js +++ b/test/transferManager.js @@ -37,9 +37,7 @@ const ACTION_TRANSFER = 0; const TestManager = require("../utils/test-manager"); -contract("TransferManager", function (accounts) { - this.timeout(10000); - +contract("TransferManager", (accounts) => { const manager = new TestManager(); const infrastructure = accounts[0].signer; diff --git a/truffle-config-contracts-legacy-1.3.js b/truffle-config-contracts-legacy-1.3.js index 9c9920788..bca58dc65 100644 --- a/truffle-config-contracts-legacy-1.3.js +++ b/truffle-config-contracts-legacy-1.3.js @@ -80,7 +80,7 @@ module.exports = { // Set default mocha options here, use special reporters etc. mocha: { - // timeout: 100000 + timeout: 100000, }, // Configure your compilers diff --git a/truffle-config-contracts-legacy-1.6.js b/truffle-config-contracts-legacy-1.6.js index 7314cfae8..68a34bab7 100644 --- a/truffle-config-contracts-legacy-1.6.js +++ b/truffle-config-contracts-legacy-1.6.js @@ -80,7 +80,7 @@ module.exports = { // Set default mocha options here, use special reporters etc. mocha: { - // timeout: 100000 + timeout: 100000, }, // Configure your compilers diff --git a/truffle-config-contracts-test.js b/truffle-config-contracts-test.js index 2f0292c52..234196ffb 100644 --- a/truffle-config-contracts-test.js +++ b/truffle-config-contracts-test.js @@ -79,7 +79,7 @@ module.exports = { // Set default mocha options here, use special reporters etc. mocha: { - // timeout: 100000 + timeout: 100000, }, // Configure your compilers diff --git a/truffle-config-infrastructure-0.5.js b/truffle-config-infrastructure-0.5.js index 00576ce66..76dc7a960 100644 --- a/truffle-config-infrastructure-0.5.js +++ b/truffle-config-infrastructure-0.5.js @@ -79,7 +79,7 @@ module.exports = { // Set default mocha options here, use special reporters etc. mocha: { - // timeout: 100000 + timeout: 100000, }, // Configure your compilers diff --git a/truffle-config-infrastructure.js b/truffle-config-infrastructure.js index 68fd4d7e5..f651083f1 100644 --- a/truffle-config-infrastructure.js +++ b/truffle-config-infrastructure.js @@ -79,7 +79,7 @@ module.exports = { // Set default mocha options here, use special reporters etc. mocha: { - // timeout: 100000 + timeout: 100000, }, // Configure your compilers diff --git a/truffle-config-lib.js b/truffle-config-lib.js index 46c348bc9..cb0003c62 100644 --- a/truffle-config-lib.js +++ b/truffle-config-lib.js @@ -9,7 +9,7 @@ module.exports = { }, mocha: { - // timeout: 100000 + timeout: 100000, }, compilers: { diff --git a/truffle-config-modules.js b/truffle-config-modules.js index 68381d73d..128f69705 100644 --- a/truffle-config-modules.js +++ b/truffle-config-modules.js @@ -79,7 +79,7 @@ module.exports = { // Set default mocha options here, use special reporters etc. mocha: { - // timeout: 100000 + timeout: 100000, }, // Configure your compilers diff --git a/truffle-config-wallet.js b/truffle-config-wallet.js index bbd2e5df5..8d147c95c 100644 --- a/truffle-config-wallet.js +++ b/truffle-config-wallet.js @@ -79,7 +79,7 @@ module.exports = { // Set default mocha options here, use special reporters etc. mocha: { - // timeout: 100000 + timeout: 100000, }, // Configure your compilers diff --git a/truffle-config.js b/truffle-config.js index 6a451164e..2d7c7bd2d 100644 --- a/truffle-config.js +++ b/truffle-config.js @@ -79,7 +79,7 @@ module.exports = { // Set default mocha options here, use special reporters etc. mocha: { - // timeout: 100000 + timeout: 100000, }, // Configure your compilers From 222d5934dc006994f28d323304b51c5be1f6c2e8 Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Tue, 28 Jul 2020 22:13:00 +0300 Subject: [PATCH 008/113] Run ganache directly and not via etherlime --- .gitignore | 1 + package.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 345cf8869..5ba08359e 100644 --- a/.gitignore +++ b/.gitignore @@ -31,6 +31,7 @@ utils/config/*.json !utils/config/ganache.json !utils/config/kovan.json !utils/config/kovan-fork.json +ganache-accounts.json ## Etherlime **/.etherlime-store diff --git a/package.json b/package.json index 2c437a56a..5da215699 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "compile:test": "npx truffle compile --config truffle-config-contracts-test.js", "compile": "npm run compile:infrastructure && npm run compile:modules && npm run compile:wallet", "cc": "rm -rf build && rm -rf build-legacy && npm run compile:lib && npm run compile && npm run compile:legacy && npm run compile:test", - "ganache": "npx etherlime ganache --gasLimit=20700000 -e 10000", + "ganache": "npx ganache-cli --gasLimit=20700000 -e 10000 --acctKeys=\"./ganache-accounts.json\" --account=\"0x7ab741b57e8d94dd7e1a29055646bafde7010f38a900f55bbd7647880faa6ee8, 100000000000000000000\" --account=\"0x2030b463177db2da82908ef90fa55ddfcef56e8183caf60db464bc398e736e6f, 100000000000000000000\" --account=\"0x62ecd49c4ccb41a70ad46532aed63cf815de15864bc415c87d507afd6a5e8da2, 100000000000000000000\" --account=\"0xf473040b1a83739a9c7cc1f5719fab0f5bf178f83314d98557c58aae1910e03a, 100000000000000000000\" --account=\"0x823d590ed2cb5e8493bb0efc834771c1cde36f9fc49b9fe3620ebd0754ad6ea2, 100000000000000000000\" --account=\"0xd6d710943471e4c37ceb787857e7a2b41ca57f9cb4307ee9a9b21436a8e709c3, 100000000000000000000\" --account=\"0x187bb12e927c1652377405f81d93ce948a593f7d66cfba383ee761858b05921a, 100000000000000000000\" --account=\"0xf41486fdb04505e7966c8720a353ed92ce0d6830f8a5e915fbde735106a06d25, 100000000000000000000\" --account=\"0x6ca40ba4cca775643398385022264c0c414da1abd21d08d9e7136796a520a543, 100000000000000000000\" --account=\"0xfac0bc9325ad342033afe956e83f0bf8f1e863c1c3e956bc75d66961fe4cd186, 100000000000000000000\"", "kovan-fork": "npx ganache-cli -i 42 -l 20700000 -f https://kovan.infura.io/v3/$(cat .env | sed -En 's/INFURA_KEY=''\"''([^''\"'']+)''\"''/\\1/p')@16988040", "kovan-fork-latest": "npx ganache-cli -i 42 -l 20700000 -f https://kovan.infura.io/v3/$(cat .env | sed -En 's/INFURA_KEY=''\"''([^''\"'']+)''\"''/\\1/p')", "test": "npx truffle test", From 18c7acd9c47d4fd100612ebdc150eddd0798a6f7 Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Tue, 28 Jul 2020 22:21:26 +0300 Subject: [PATCH 009/113] Use ganache accounts for testing --- deployment/999_benchmark.js | 2 +- package-lock.json | 32 ------ package.json | 2 - scripts/deploy_defi.js | 4 +- test/approvedTransfer.js | 24 ++-- test/baseContracts.js | 54 ++++----- test/baseFeature.js | 6 +- test/baseModule.js | 4 +- test/baseWallet.js | 60 +++++----- test/compoundManager_invest.js | 12 +- test/compoundManager_loan.js | 16 +-- test/ens.js | 36 +++--- test/factory.js | 70 ++++++------ test/guardianManager.js | 190 +++++++++++++++---------------- test/kyber.js | 24 ++-- test/lockManager.js | 20 ++-- test/makerV2Manager_invest.js | 6 +- test/makerV2Manager_loan.js | 31 +++-- test/multisig.js | 30 ++--- test/nftTransfer.js | 26 ++--- test/proxy.js | 10 +- test/recoveryManager.js | 78 ++++++------- test/relayer.js | 46 ++++---- test/simpleUpgrader.js | 20 ++-- test/tokenExchanger.js | 24 ++-- test/tokenPriceRegistry.js | 2 +- test/transferManager.js | 92 +++++++-------- test/upgraderToVersionManager.js | 12 +- test/versionManager.js | 4 +- utils/defi-deployer.js | 6 +- utils/test-manager.js | 28 +---- 31 files changed, 455 insertions(+), 516 deletions(-) diff --git a/deployment/999_benchmark.js b/deployment/999_benchmark.js index b9b9a1e7d..ce0ff7120 100644 --- a/deployment/999_benchmark.js +++ b/deployment/999_benchmark.js @@ -106,7 +106,7 @@ class Benchmark { this.accounts = this.signers.map((s) => s._address); this.config = config; - this.testManager = new TestManager(this.accounts); + this.testManager = new TestManager(); // Features this.GuardianManagerWrapper = await this.deployer.wrapDeployedContract(GuardianManager, config.modules.GuardianManager); diff --git a/package-lock.json b/package-lock.json index 5433a5e00..9c762b117 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1988,11 +1988,6 @@ "resolved": "https://registry.npmjs.org/address/-/address-1.1.2.tgz", "integrity": "sha512-aT6camzM4xEA54YVJYSqxz1kv4IHnQZRtThJJHhUMRExaU5spC7jX5ugSwTaTgJliIgs4VhZOk7htClvQ/LmRA==" }, - "aes-js": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.1.2.tgz", - "integrity": "sha512-e5pEa2kBnBOgR4Y/p20pskXI74UEz7de8ZGVo58asOtvSVG5YAbJeELPZxOmt+Bnz3rX753YKhfIn4X4l1PPRQ==" - }, "aggregate-error": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.0.1.tgz", @@ -2392,17 +2387,6 @@ "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.1.0.tgz", "integrity": "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==" }, - "bip39": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/bip39/-/bip39-3.0.2.tgz", - "integrity": "sha512-J4E1r2N0tUylTKt07ibXvhpT2c5pyAFgvuA5q1H9uDy6dEGpjV8jmymh3MTYJDLCNbIVClSB9FbND49I6N24MQ==", - "requires": { - "@types/node": "11.11.6", - "create-hash": "^1.1.0", - "pbkdf2": "^3.0.9", - "randombytes": "^2.0.1" - } - }, "bl": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.2.tgz", @@ -4678,22 +4662,6 @@ } } }, - "ethereumjs-wallet": { - "version": "0.6.5", - "resolved": "https://registry.npmjs.org/ethereumjs-wallet/-/ethereumjs-wallet-0.6.5.tgz", - "integrity": "sha512-MDwjwB9VQVnpp/Dc1XzA6J1a3wgHQ4hSvA1uWNatdpOrtCbPVuQSKSyRnjLvS0a+KKMw2pvQ9Ybqpb3+eW8oNA==", - "requires": { - "aes-js": "^3.1.1", - "bs58check": "^2.1.2", - "ethereum-cryptography": "^0.1.3", - "ethereumjs-util": "^6.0.0", - "randombytes": "^2.0.6", - "safe-buffer": "^5.1.2", - "scryptsy": "^1.2.1", - "utf8": "^3.0.0", - "uuid": "^3.3.2" - } - }, "etherlime-argent": { "version": "2.3.5", "resolved": "https://registry.npmjs.org/etherlime-argent/-/etherlime-argent-2.3.5.tgz", diff --git a/package.json b/package.json index 5da215699..eaf96953d 100644 --- a/package.json +++ b/package.json @@ -64,13 +64,11 @@ "@uniswap/v2-core": "^1.0.1", "ajv": "^6.10.0", "aws-sdk": "^2.521.0", - "bip39": "^3.0.2", "bn-chai": "^1.0.1", "bn.js": "^5.1.1", "chai": "^4.2.0", "cli-table2": "^0.2.0", "dotenv": "^6.2.0", - "ethereumjs-wallet": "^0.6.3", "etherlime-argent": "2.3.5", "etherlime-lib": "1.1.3", "ethers": "^5.0.7", diff --git a/scripts/deploy_defi.js b/scripts/deploy_defi.js index cf9271674..1b48113b4 100644 --- a/scripts/deploy_defi.js +++ b/scripts/deploy_defi.js @@ -60,7 +60,7 @@ async function deploy() { pip.contractAddress, pep.contractAddress, vox.contractAddress, - manager.address); + manager); // let the Tub mint PETH and DAI await skr.setOwner(tub.contractAddress); @@ -88,7 +88,7 @@ async function deploy() { const ethLiquidity = parseEther("1"); const mkrLiquidity = ethLiquidity.mul(WAD).div(ETH_PER_MKR); - await gov["mint(address,uint256)"](manager.address, mkrLiquidity); + await gov["mint(address,uint256)"](manager, mkrLiquidity); await uniswapFactory.createExchange(gov.contractAddress, { gasLimit: 450000 }); let exchange = "0x0000000000000000000000000000000000000000"; diff --git a/test/approvedTransfer.js b/test/approvedTransfer.js index 865c91e2e..70e28c2ac 100644 --- a/test/approvedTransfer.js +++ b/test/approvedTransfer.js @@ -27,12 +27,12 @@ const INVALID_SIGNATURES_REVERT_MSG = "RM: Invalid signatures"; contract("ApprovedTransfer", (accounts) => { const manager = new TestManager(); - const infrastructure = accounts[0].signer; - const owner = accounts[1].signer; - const guardian1 = accounts[2].signer; - const guardian2 = accounts[3].signer; - const guardian3 = accounts[4].signer; - const recipient = accounts[5].signer; + const infrastructure = accounts[0]; + const owner = accounts[1]; + const guardian1 = accounts[2]; + const guardian2 = accounts[3]; + const guardian3 = accounts[4]; + const recipient = accounts[5]; let deployer; let wallet; @@ -93,18 +93,18 @@ contract("ApprovedTransfer", (accounts) => { const proxy = await deployer.deploy(Proxy, {}, walletImplementation.contractAddress); wallet = deployer.wrapDeployedContract(BaseWallet, proxy.contractAddress); - await wallet.init(owner.address, [versionManager.contractAddress]); + await wallet.init(owner, [versionManager.contractAddress]); await versionManager.from(owner).upgradeWallet(wallet.contractAddress, await versionManager.lastVersion()); const decimals = 12; // number of decimal for TOKN contract - erc20 = await deployer.deploy(ERC20, {}, [infrastructure.address, wallet.contractAddress], 10000000, decimals); // TOKN contract with 10M tokens (5M TOKN for wallet and 5M TOKN for account[0]) + erc20 = await deployer.deploy(ERC20, {}, [infrastructure, wallet.contractAddress], 10000000, decimals); // TOKN contract with 10M tokens (5M TOKN for wallet and 5M TOKN for account[0]) await infrastructure.sendTransaction({ to: wallet.contractAddress, value: 50000000 }); }); async function addGuardians(guardians) { // guardians can be BaseWallet or ContractWrapper objects const guardianAddresses = guardians.map((guardian) => { - if (guardian.address) return guardian.address; + if (guardian) return guardian; return guardian.contractAddress; }); @@ -124,7 +124,7 @@ contract("ApprovedTransfer", (accounts) => { const wallets = []; for (const g of guardians) { const guardianWallet = await deployer.deploy(BaseWallet); - await guardianWallet.init(g.address, [versionManager.contractAddress]); + await guardianWallet.init(g, [versionManager.contractAddress]); await versionManager.from(g).upgradeWallet(guardianWallet.contractAddress, await versionManager.lastVersion()); wallets.push(guardianWallet); } @@ -132,7 +132,7 @@ contract("ApprovedTransfer", (accounts) => { } async function transferToken(_token, _signers) { - const to = recipient.address; + const to = recipient; const before = _token === ETH_TOKEN ? await deployer.provider.getBalance(to) : await erc20.balanceOf(to); await manager.relay(approvedTransfer, "transferToken", [wallet.contractAddress, _token, to, amountToTransfer, ZERO_BYTES32], wallet, _signers); @@ -157,7 +157,7 @@ contract("ApprovedTransfer", (accounts) => { manager.relay( approvedTransfer, "transferToken", - [wallet.contractAddress, _token, recipient.address, amountToTransfer, ZERO_BYTES32], + [wallet.contractAddress, _token, recipient, amountToTransfer, ZERO_BYTES32], wallet, _signers, ), _reason, diff --git a/test/baseContracts.js b/test/baseContracts.js index 64e49816d..454889b62 100644 --- a/test/baseContracts.js +++ b/test/baseContracts.js @@ -8,10 +8,10 @@ const TestManager = require("../utils/test-manager"); contract("Managed and Owned", (accounts) => { const manager = new TestManager(); - const infrastructure = accounts[0].signer; - const manager1 = accounts[1].signer; - const manager2 = accounts[2].signer; - const nonOwner = accounts[3].signer; + const infrastructure = accounts[0]; + const manager1 = accounts[1]; + const manager2 = accounts[2]; + const nonOwner = accounts[3]; let deployer; let managed; @@ -27,14 +27,14 @@ contract("Managed and Owned", (accounts) => { describe("Owned contract logic", () => { it("should set owner to caller", async () => { const owner = await managed.owner(); - assert.equal(owner, infrastructure.address); + assert.equal(owner, infrastructure); }); it("should be able to change owner", async () => { - const newOwner = accounts[1].signer; - await managed.changeOwner(newOwner.address); + const newOwner = accounts[1]; + await managed.changeOwner(newOwner); const owner = await managed.owner(); - assert.equal(owner, newOwner.address); + assert.equal(owner, newOwner); }); it("should not be able to change owner to zero address", async () => { @@ -45,23 +45,23 @@ contract("Managed and Owned", (accounts) => { describe("Managed contract logic", () => { it("should be able to add manager", async () => { // Ensure the manager test accounts are not managers to start with - let isManager1 = await managed.managers(manager1.address); + let isManager1 = await managed.managers(manager1); assert.isFalse(isManager1); - let isManager2 = await managed.managers(manager2.address); + let isManager2 = await managed.managers(manager2); assert.isFalse(isManager2); // Add managers - await managed.addManager(manager1.address); - await managed.addManager(manager2.address); + await managed.addManager(manager1); + await managed.addManager(manager2); - isManager1 = await managed.managers(manager1.address); + isManager1 = await managed.managers(manager1); assert.isTrue(isManager1); - isManager2 = await managed.managers(manager2.address); + isManager2 = await managed.managers(manager2); assert.isTrue(isManager2); }); it("should not be able to add manager if not called by owner", async () => { - await assert.revertWith(managed.from(nonOwner.address).addManager(manager1.address), "Must be owner"); + await assert.revertWith(managed.from(nonOwner).addManager(manager1), "Must be owner"); }); it("should not be able to set manager to zero address", async () => { @@ -70,37 +70,37 @@ contract("Managed and Owned", (accounts) => { it("should be able to set manager twice without error", async () => { // Set manager once - await managed.addManager(manager1.address); - let isManager1 = await managed.managers(manager1.address); + await managed.addManager(manager1); + let isManager1 = await managed.managers(manager1); assert.isTrue(isManager1); // Set manager twice - await managed.addManager(manager1.address); - isManager1 = await managed.managers(manager1.address); + await managed.addManager(manager1); + isManager1 = await managed.managers(manager1); assert.isTrue(isManager1); }); it("should be able to revoke manager", async () => { // Add managers - await managed.addManager(manager1.address); - await managed.addManager(manager2.address); + await managed.addManager(manager1); + await managed.addManager(manager2); // Revoke only the second manager - await managed.revokeManager(manager2.address); + await managed.revokeManager(manager2); - const isManager1 = await managed.managers(manager1.address); + const isManager1 = await managed.managers(manager1); assert.isTrue(isManager1); - const isManager2 = await managed.managers(manager2.address); + const isManager2 = await managed.managers(manager2); assert.isFalse(isManager2); }); it("should not be able to revoke manager if not called by owner", async () => { - await managed.addManager(manager1.address); - await assert.revertWith(managed.from(nonOwner.address).revokeManager(manager1.address), "Must be owner"); + await managed.addManager(manager1); + await assert.revertWith(managed.from(nonOwner).revokeManager(manager1), "Must be owner"); }); it("should not be able to revoke a nonexisting managerr", async () => { - await assert.revertWith(managed.revokeManager(manager2.address), "M: Target must be an existing manager"); + await assert.revertWith(managed.revokeManager(manager2), "M: Target must be an existing manager"); }); }); }); diff --git a/test/baseFeature.js b/test/baseFeature.js index 62e1272d4..b889bd8bf 100644 --- a/test/baseFeature.js +++ b/test/baseFeature.js @@ -47,7 +47,7 @@ describe("BaseFeature", function () { versionManager.contractAddress); await versionManager.addVersion([relayerManager.contractAddress], []); - token = await deployer.deploy(ERC20, {}, [owner.address], 10, 18); + token = await deployer.deploy(ERC20, {}, [owner], 10, 18); }); describe("Recover tokens", async () => { @@ -69,7 +69,7 @@ describe("BaseFeature", function () { await versionManager.recoverToken(token.contractAddress); - const adminBalance = await token.balanceOf(accounts[0].signer.address); + const adminBalance = await token.balanceOf(accounts[0]); assert.equal(adminBalance, 10000000); }); @@ -89,7 +89,7 @@ describe("BaseFeature", function () { await versionManager.recoverToken(nonCompliantToken.contractAddress); - const adminBalance = await nonCompliantToken.balanceOf(accounts[0].signer.address); + const adminBalance = await nonCompliantToken.balanceOf(accounts[0]); assert.equal(adminBalance, 10000000); }); }); diff --git a/test/baseModule.js b/test/baseModule.js index ff82a0a99..7bf916ea0 100644 --- a/test/baseModule.js +++ b/test/baseModule.js @@ -13,7 +13,7 @@ contract("BaseModule", (accounts) => { const manager = new TestManager(); const { deployer } = manager; - const owner = accounts[1].signer; + const owner = accounts[1]; let registry; let guardianStorage; @@ -26,7 +26,7 @@ contract("BaseModule", (accounts) => { beforeEach(async () => { registry = await deployer.deploy(Registry); guardianStorage = await deployer.deploy(GuardianStorage); - token = await deployer.deploy(ERC20, {}, [owner.address], 10, 18); + token = await deployer.deploy(ERC20, {}, [owner], 10, 18); baseModule = await deployer.deploy(BaseModule, {}, registry.contractAddress, guardianStorage.contractAddress); }); diff --git a/test/baseWallet.js b/test/baseWallet.js index f1112b2e7..885b2f5e4 100644 --- a/test/baseWallet.js +++ b/test/baseWallet.js @@ -5,20 +5,20 @@ const Proxy = artifacts.require("Proxy"); const BaseWallet = artifacts.require("BaseWallet"); const OldWalletV16 = artifacts.require("../build-legacy/v1.6.0/BaseWallet"); const OldWalletV13 = artifacts.require("../build-legacy/v1.3.0/BaseWallet"); -const VersionManager = require("../build/VersionManager"); +const VersionManager = artifacts.require("VersionManager"); const Registry = artifacts.require("ModuleRegistry"); const SimpleUpgrader = artifacts.require("SimpleUpgrader"); const GuardianStorage = artifacts.require("GuardianStorage"); -const LockStorage = require("../build/LockStorage"); -const TestFeature = require("../build/TestFeature"); +const LockStorage = artifacts.require("LockStorage"); +const TestFeature = artifacts.require("TestFeature"); const TestManager = require("../utils/test-manager"); contract("BaseWallet", (accounts) => { const manager = new TestManager(); - const owner = accounts[1].signer; - const nonowner = accounts[2].signer; + const owner = accounts[1]; + const nonowner = accounts[2]; let deployer; let wallet; @@ -108,16 +108,16 @@ contract("BaseWallet", (accounts) => { it("should create a wallet with the correct owner", async () => { let walletOwner = await wallet.owner(); assert.equal(walletOwner, "0x0000000000000000000000000000000000000000", "owner should be null before init"); - await wallet.init(owner.address, [module1.contractAddress]); - await module1.from(owner).upgradeWallet(wallet.contractAddress, await module1.lastVersion()); + await wallet.init(owner, [module1.contractAddress]); + await module1.upgradeWallet(wallet.contractAddress, await module1.lastVersion(), { from: owner }); walletOwner = await wallet.owner(); - assert.equal(walletOwner, owner.address, "owner should be the owner after init"); + assert.equal(walletOwner, owner, "owner should be the owner after init"); }); it("should create a wallet with the correct modules", async () => { - await wallet.init(owner.address, [module1.contractAddress, module2.contractAddress]); - await module1.from(owner).upgradeWallet(wallet.contractAddress, await module1.lastVersion()); - await module2.from(owner).upgradeWallet(wallet.contractAddress, await module2.lastVersion()); + await wallet.init(owner, [module1.contractAddress, module2.contractAddress]); + await module1.upgradeWallet(wallet.contractAddress, await module1.lastVersion(), { from: owner }); + await module2.upgradeWallet(wallet.contractAddress, await module2.lastVersion(), { from: owner }); const module1IsAuthorised = await wallet.authorised(module1.contractAddress); const module2IsAuthorised = await wallet.authorised(module2.contractAddress); const module3IsAuthorised = await wallet.authorised(module3.contractAddress); @@ -127,17 +127,17 @@ contract("BaseWallet", (accounts) => { }); it("should not reinitialize a wallet", async () => { - await wallet.init(owner.address, [module1.contractAddress]); - await module1.from(owner).upgradeWallet(wallet.contractAddress, await module1.lastVersion()); - await assert.revertWith(wallet.init(owner.address, [module1.contractAddress]), "BW: wallet already initialised"); + await wallet.init(owner, [module1.contractAddress]); + await module1.upgradeWallet(wallet.contractAddress, await module1.lastVersion(), { from: owner }); + await assert.revertWith(wallet.init(owner, [module1.contractAddress]), "BW: wallet already initialised"); }); it("should not initialize a wallet with no module", async () => { - await assert.revertWith(wallet.init(owner.address, []), "BW: construction requires at least 1 module"); + await assert.revertWith(wallet.init(owner, []), "BW: construction requires at least 1 module"); }); it("should not initialize a wallet with duplicate modules", async () => { - await assert.revertWith(wallet.init(owner.address, [module1.contractAddress, module1.contractAddress]), "BW: module is already added"); + await assert.revertWith(wallet.init(owner, [module1.contractAddress, module1.contractAddress]), "BW: module is already added"); }); }); @@ -159,13 +159,13 @@ contract("BaseWallet", (accounts) => { describe("Authorisations", () => { it("should not let a non-module deauthorise a module", async () => { - await wallet.init(owner.address, [module1.contractAddress]); + await wallet.init(owner, [module1.contractAddress]); await assert.revertWith(wallet.authoriseModule(module1.contractAddress, false), "BW: msg.sender not an authorized module"); }); it("should not let a feature set the owner to address(0)", async () => { - await wallet.init(owner.address, [module1.contractAddress]); - await module1.from(owner).upgradeWallet(wallet.contractAddress, await module1.lastVersion()); + await wallet.init(owner, [module1.contractAddress]); + await module1.upgradeWallet(wallet.contractAddress, await module1.lastVersion(), { from: owner }); await assert.revertWith(feature1.invalidOwnerChange(wallet.contractAddress), "BW: address cannot be null"); }); @@ -173,22 +173,22 @@ contract("BaseWallet", (accounts) => { describe("Static calls", () => { it("should delegate static calls to the modules", async () => { - await wallet.init(owner.address, [module1.contractAddress]); - await module1.from(owner).upgradeWallet(wallet.contractAddress, await module1.lastVersion()); + await wallet.init(owner, [module1.contractAddress]); + await module1.upgradeWallet(wallet.contractAddress, await module1.lastVersion(), { from: owner }); const module1IsAuthorised = await wallet.authorised(module1.contractAddress); assert.equal(module1IsAuthorised, true, "module1 should be authorised"); const walletAsFeature = deployer.wrapDeployedContract(TestFeature, wallet.contractAddress); const boolVal = await walletAsFeature.contract.getBoolean(); const uintVal = await walletAsFeature.contract.getUint(); - const addressVal = await walletAsFeature.contract.getAddress(nonowner.address); + const addressVal = await walletAsFeature.contract.getAddress(nonowner); assert.equal(boolVal, true, "should have the correct bool"); assert.equal(uintVal, 42, "should have the correct uint"); - assert.equal(addressVal, nonowner.address, "should have the address"); + assert.equal(addressVal, nonowner, "should have the address"); }); it("should not delegate static calls to no longer authorised modules ", async () => { - await wallet.init(owner.address, [module1.contractAddress, module2.contractAddress]); - await module1.from(owner).upgradeWallet(wallet.contractAddress, await module1.lastVersion()); + await wallet.init(owner, [module1.contractAddress, module2.contractAddress]); + await module1.upgradeWallet(wallet.contractAddress, await module1.lastVersion(), { from: owner }); let module1IsAuthorised = await wallet.authorised(module1.contractAddress); assert.equal(module1IsAuthorised, true, "module1 should be authorised"); @@ -196,7 +196,7 @@ contract("BaseWallet", (accounts) => { const upgrader = await deployer.deploy(SimpleUpgrader, {}, registry.contractAddress, lockStorage.contractAddress, [module1.contractAddress], []); await registry.registerModule(upgrader.contractAddress, ethers.utils.formatBytes32String("Removing module1")); - await module1.from(owner).addModule(wallet.contractAddress, upgrader.contractAddress); + await module1.addModule(wallet.contractAddress, upgrader.contractAddress, { from: owner }); module1IsAuthorised = await wallet.authorised(module1.contractAddress); assert.equal(module1IsAuthorised, false, "module1 should not be authorised"); @@ -210,8 +210,8 @@ contract("BaseWallet", (accounts) => { describe("Old BaseWallet V1.3", () => { it("should work with new modules", async () => { const oldWallet = await deployer.deploy(OldWalletV13); - await oldWallet.init(owner.address, [module1.contractAddress]); - await module1.from(owner).upgradeWallet(oldWallet.contractAddress, await module1.lastVersion()); + await oldWallet.init(owner, [module1.contractAddress]); + await module1.upgradeWallet(oldWallet.contractAddress, await module1.lastVersion(), { from: owner }); await feature1.callDapp(oldWallet.contractAddress); await feature1.callDapp2(oldWallet.contractAddress, 2, false); await assert.revert(feature1.fail(oldWallet.contractAddress, "just because")); @@ -221,8 +221,8 @@ contract("BaseWallet", (accounts) => { describe("Old BaseWallet V1.6", () => { it("should work with new modules", async () => { const oldWallet = await deployer.deploy(OldWalletV16); - await oldWallet.init(owner.address, [module1.contractAddress]); - await module1.from(owner).upgradeWallet(oldWallet.contractAddress, await module1.lastVersion()); + await oldWallet.init(owner, [module1.contractAddress]); + await module1.upgradeWallet(oldWallet.contractAddress, await module1.lastVersion(), { from: owner }); await feature1.callDapp(oldWallet.contractAddress); await feature1.callDapp2(oldWallet.contractAddress, 2, true); await assert.revert(feature1.fail(oldWallet.contractAddress, "just because")); diff --git a/test/compoundManager_invest.js b/test/compoundManager_invest.js index bf09e0950..10958c7b3 100644 --- a/test/compoundManager_invest.js +++ b/test/compoundManager_invest.js @@ -33,10 +33,10 @@ const TestManager = require("../utils/test-manager"); contract("Invest Manager with Compound", (accounts) => { const manager = new TestManager(); - const infrastructure = accounts[0].signer; - const owner = accounts[1].signer; - const liquidityProvider = accounts[2].signer; - const borrower = accounts[3].signer; + const infrastructure = accounts[0]; + const owner = accounts[1]; + const liquidityProvider = accounts[2]; + const borrower = accounts[3]; let deployer; let wallet; @@ -80,7 +80,7 @@ contract("Invest Manager with Compound", (accounts) => { ); // deploy token - token = await deployer.deploy(ERC20, {}, [infrastructure.address, liquidityProvider.address, borrower.address], 10000000, 18); + token = await deployer.deploy(ERC20, {}, [infrastructure, liquidityProvider, borrower], 10000000, 18); // deploy CToken cToken = await deployer.deploy( CErc20, @@ -153,7 +153,7 @@ contract("Invest Manager with Compound", (accounts) => { beforeEach(async () => { const proxy = await deployer.deploy(Proxy, {}, walletImplementation.contractAddress); wallet = deployer.wrapDeployedContract(BaseWallet, proxy.contractAddress); - await wallet.init(owner.address, [versionManager.contractAddress]); + await wallet.init(owner, [versionManager.contractAddress]); await versionManager.from(owner).upgradeWallet(wallet.contractAddress, await versionManager.lastVersion()); }); diff --git a/test/compoundManager_loan.js b/test/compoundManager_loan.js index e65c9bed0..bcee4e6b4 100644 --- a/test/compoundManager_loan.js +++ b/test/compoundManager_loan.js @@ -37,10 +37,10 @@ const ZERO_BYTES32 = ethers.constants.HashZero; contract("Loan Module", (accounts) => { const manager = new TestManager(); - const infrastructure = accounts[0].signer; - const owner = accounts[1].signer; - const liquidityProvider = accounts[2].signer; - const borrower = accounts[3].signer; + const infrastructure = accounts[0]; + const owner = accounts[1]; + const liquidityProvider = accounts[2]; + const borrower = accounts[3]; let deployer; let wallet; @@ -86,8 +86,8 @@ contract("Loan Module", (accounts) => { ); // deploy token - token1 = await deployer.deploy(ERC20, {}, [infrastructure.address, liquidityProvider.address, borrower.address], 10000000, 18); - token2 = await deployer.deploy(ERC20, {}, [infrastructure.address, liquidityProvider.address, borrower.address], 10000000, 18); + token1 = await deployer.deploy(ERC20, {}, [infrastructure, liquidityProvider, borrower], 10000000, 18); + token2 = await deployer.deploy(ERC20, {}, [infrastructure, liquidityProvider, borrower], 10000000, 18); // deploy CToken cToken1 = await deployer.deploy( CErc20, @@ -178,7 +178,7 @@ contract("Loan Module", (accounts) => { beforeEach(async () => { const proxy = await deployer.deploy(Proxy, {}, walletImplementation.contractAddress); wallet = deployer.wrapDeployedContract(BaseWallet, proxy.contractAddress); - await wallet.init(owner.address, [versionManager.contractAddress]); + await wallet.init(owner, [versionManager.contractAddress]); await versionManager.from(owner).upgradeWallet(wallet.contractAddress, await versionManager.lastVersion()); }); @@ -613,7 +613,7 @@ contract("Loan Module", (accounts) => { const params = [wallet.contractAddress, loanId]; let txReceipt; if (relayed) { - txReceipt = await manager.relay(loanManager, method, params, wallet, [owner], accounts[9].signer, false, 2000000); + txReceipt = await manager.relay(loanManager, method, params, wallet, [owner], accounts[9], false, 2000000); } else { const tx = await loanManager.from(owner)[method](...params); txReceipt = await loanManager.verboseWaitForTransaction(tx); diff --git a/test/ens.js b/test/ens.js index 374ae0249..95e457029 100644 --- a/test/ens.js +++ b/test/ens.js @@ -15,10 +15,10 @@ const ZERO_BYTES32 = ethers.constants.HashZero; contract("ENS contracts", (accounts) => { const manager = new TestManager(); - const infrastructure = accounts[0].signer; - const owner = accounts[1].signer; - const amanager = accounts[2].signer; - const anonmanager = accounts[3].signer; + const infrastructure = accounts[0]; + const owner = accounts[1]; + const amanager = accounts[2]; + const anonmanager = accounts[3]; const root = "xyz"; const subnameWallet = "argent"; @@ -39,14 +39,14 @@ contract("ENS contracts", (accounts) => { ensManager = await deployer.deploy(ENSManager, {}, `${subnameWallet}.${root}`, walletNode, ensRegistry.contractAddress, ensResolver.contractAddress); await ensResolver.addManager(ensManager.contractAddress); - await ensResolver.addManager(infrastructure.address); - await ensManager.addManager(infrastructure.address); + await ensResolver.addManager(infrastructure); + await ensManager.addManager(infrastructure); - await ensRegistry.setSubnodeOwner(ZERO_BYTES32, ethers.utils.keccak256(ethers.utils.toUtf8Bytes(root)), infrastructure.address); + await ensRegistry.setSubnodeOwner(ZERO_BYTES32, ethers.utils.keccak256(ethers.utils.toUtf8Bytes(root)), infrastructure); await ensRegistry.setSubnodeOwner( ethers.utils.namehash(root), ethers.utils.keccak256(ethers.utils.toUtf8Bytes(subnameWallet)), ensManager.contractAddress, ); - await ensRegistry.setSubnodeOwner(ZERO_BYTES32, ethers.utils.keccak256(ethers.utils.toUtf8Bytes("reverse")), infrastructure.address); + await ensRegistry.setSubnodeOwner(ZERO_BYTES32, ethers.utils.keccak256(ethers.utils.toUtf8Bytes("reverse")), infrastructure); await ensRegistry.setSubnodeOwner( ethers.utils.namehash("reverse"), ethers.utils.keccak256(ethers.utils.toUtf8Bytes("addr")), ensReverse.contractAddress, ); @@ -66,12 +66,12 @@ contract("ENS contracts", (accounts) => { it("should register an ENS name", async () => { const label = "wallet"; const labelNode = ethers.utils.namehash(`${label}.${subnameWallet}.${root}`); - await ensManager.from(infrastructure).register(label, owner.address); + await ensManager.from(infrastructure).register(label, owner); const recordExists = await ensRegistry.recordExists(labelNode); assert.isTrue(recordExists); const nodeOwner = await ensRegistry.owner(labelNode); - assert.equal(nodeOwner, owner.address); + assert.equal(nodeOwner, owner); const res = await ensRegistry.resolver(labelNode); assert.equal(res, ensResolver.contractAddress); }); @@ -85,10 +85,10 @@ contract("ENS contracts", (accounts) => { assert.isTrue(available); // then we register it - await ensManager.from(infrastructure).register(label, owner.address); + await ensManager.from(infrastructure).register(label, owner); const nodeOwner = await ensRegistry.owner(labelNode); - assert.equal(nodeOwner, owner.address); + assert.equal(nodeOwner, owner); // then the node is unavailable available = await ensManager.isAvailable(labelNode1); @@ -98,15 +98,15 @@ contract("ENS contracts", (accounts) => { it("should add a new manager and register an ENS name", async () => { const label = "wallet"; const labelNode = ethers.utils.namehash(`${label}.${subnameWallet}.${root}`); - await ensManager.addManager(amanager.address); - await ensManager.from(amanager).register(label, owner.address); + await ensManager.addManager(amanager); + await ensManager.from(amanager).register(label, owner); const nodeOwner = await ensRegistry.owner(labelNode); - assert.equal(nodeOwner, owner.address, "new manager should have registered the ens name"); + assert.equal(nodeOwner, owner, "new manager should have registered the ens name"); }); it("should fail to register an ENS name when the caller is not a manager", async () => { const label = "wallet"; - await assert.revert(ensManager.from(anonmanager).register(label, owner.address), "registering should throw"); + await assert.revert(ensManager.from(anonmanager).register(label, owner), "registering should throw"); }); it("should be able to change the root node owner", async () => { @@ -160,9 +160,9 @@ contract("ENS contracts", (accounts) => { it("should resolve a name", async () => { const label = "wallet"; - await ensManager.from(infrastructure).register(label, owner.address); + await ensManager.from(infrastructure).register(label, owner); - const node = await ensReverse.node(owner.address); + const node = await ensReverse.node(owner); const name = await ensResolver.name(node); assert.equal(name, "wallet.argent.xyz"); }); diff --git a/test/factory.js b/test/factory.js index 21797ec4a..8ff4c2b5b 100644 --- a/test/factory.js +++ b/test/factory.js @@ -15,10 +15,10 @@ const ZERO_ADDRESS = ethers.constants.AddressZero; contract("WalletFactory", (accounts) => { const manager = new TestManager(); - const infrastructure = accounts[0].signer; - const owner = accounts[1].signer; - const guardian = accounts[4].signer; - const other = accounts[6].signer; + const infrastructure = accounts[0]; + const owner = accounts[1]; + const guardian = accounts[4]; + const other = accounts[6]; let deployer; @@ -38,7 +38,7 @@ contract("WalletFactory", (accounts) => { moduleRegistry.contractAddress, implementation.contractAddress, guardianStorage.contractAddress); - await factory.addManager(infrastructure.address); + await factory.addManager(infrastructure); }); async function deployVersionManager() { @@ -123,18 +123,18 @@ contract("WalletFactory", (accounts) => { describe("Create wallets with CREATE", () => { it("should create with the correct owner", async () => { // we create the wallet - const tx = await factory.from(infrastructure).createWallet(owner.address, versionManager.contractAddress, guardian.address, 1); + const tx = await factory.from(infrastructure).createWallet(owner, versionManager.contractAddress, guardian, 1); const txReceipt = await factory.verboseWaitForTransaction(tx); const walletAddr = txReceipt.events.filter((event) => event.event === "WalletCreated")[0].args.wallet; // we test that the wallet has the correct owner const wallet = await deployer.wrapDeployedContract(BaseWallet, walletAddr); const walletOwner = await wallet.owner(); - assert.equal(walletOwner, owner.address, "should have the correct owner"); + assert.equal(walletOwner, owner, "should have the correct owner"); }); it("should create with the correct module", async () => { // we create the wallet - const tx = await factory.from(infrastructure).createWallet(owner.address, versionManager.contractAddress, guardian.address, 1); + const tx = await factory.from(infrastructure).createWallet(owner, versionManager.contractAddress, guardian, 1); const txReceipt = await factory.verboseWaitForTransaction(tx); const walletAddr = txReceipt.events.filter((event) => event.event === "WalletCreated")[0].args.wallet; // we test that the wallet has the correct module @@ -145,11 +145,11 @@ contract("WalletFactory", (accounts) => { it("should create with the correct guardian", async () => { // we create the wallet - const tx = await factory.from(infrastructure).createWallet(owner.address, versionManager.contractAddress, guardian.address, 1); + const tx = await factory.from(infrastructure).createWallet(owner, versionManager.contractAddress, guardian, 1); const txReceipt = await factory.verboseWaitForTransaction(tx); const walletAddr = txReceipt.events.filter((event) => event.event === "WalletCreated")[0].args.wallet; // we test that the wallet has the correct guardian - const success = await guardianStorage.isGuardian(walletAddr, guardian.address); + const success = await guardianStorage.isGuardian(walletAddr, guardian); assert.equal(success, true, "should have the correct guardian"); }); @@ -158,7 +158,7 @@ contract("WalletFactory", (accounts) => { await versionManager.addVersion([], []); await versionManager.setMinVersion(await versionManager.lastVersion()); // we create the wallet - const tx = await factory.from(infrastructure).createWallet(owner.address, versionManager.contractAddress, guardian.address, badVersion); + const tx = await factory.from(infrastructure).createWallet(owner, versionManager.contractAddress, guardian, badVersion); const txReceipt = await factory.verboseWaitForTransaction(tx); const walletAddr = txReceipt.events.filter((event) => event.event === "WalletCreated")[0].args.wallet; assert.notEqual(walletAddr, ZERO_ADDRESS, "wallet should be created"); @@ -166,25 +166,25 @@ contract("WalletFactory", (accounts) => { it("should fail to create when the guardian is empty", async () => { // we create the wallet - await assert.revertWith(factory.from(infrastructure).createWallet(owner.address, versionManager.contractAddress, ZERO_ADDRESS, 1), + await assert.revertWith(factory.from(infrastructure).createWallet(owner, versionManager.contractAddress, ZERO_ADDRESS, 1), "WF: guardian cannot be null"); }); it("should fail to create when there are is no VersionManager", async () => { - await assert.revertWith(factory.from(deployer).createWallet(owner.address, ethers.constants.AddressZero, guardian.address, 1), + await assert.revertWith(factory.from(deployer).createWallet(owner, ethers.constants.AddressZero, guardian, 1), "WF: invalid _versionManager"); }); it("should fail to create with zero address as owner", async () => { await assert.revertWith( - factory.from(infrastructure).createWallet(ethers.constants.AddressZero, versionManager.contractAddress, guardian.address, 1), + factory.from(infrastructure).createWallet(ethers.constants.AddressZero, versionManager.contractAddress, guardian, 1), "WF: owner cannot be null", ); }); it("should fail to create with unregistered module", async () => { const randomAddress = utils.getRandomAddress(); - await assert.revertWith(factory.from(infrastructure).createWallet(owner.address, randomAddress, guardian.address, 1), + await assert.revertWith(factory.from(infrastructure).createWallet(owner, randomAddress, guardian, 1), "WF: invalid _versionManager"); }); }); @@ -198,10 +198,10 @@ contract("WalletFactory", (accounts) => { it("should create a wallet at the correct address", async () => { const salt = utils.generateSaltValue(); // we get the future address - const futureAddr = await factory.getAddressForCounterfactualWallet(owner.address, versionManager.contractAddress, guardian.address, salt, 1); + const futureAddr = await factory.getAddressForCounterfactualWallet(owner, versionManager.contractAddress, guardian, salt, 1); // we create the wallet const tx = await factory.from(infrastructure).createCounterfactualWallet( - owner.address, versionManager.contractAddress, guardian.address, salt, 1, + owner, versionManager.contractAddress, guardian, salt, 1, ); const txReceipt = await factory.verboseWaitForTransaction(tx); const walletAddr = txReceipt.events.filter((event) => event.event === "WalletCreated")[0].args.wallet; @@ -212,10 +212,10 @@ contract("WalletFactory", (accounts) => { it("should create with the correct owner", async () => { const salt = utils.generateSaltValue(); // we get the future address - const futureAddr = await factory.getAddressForCounterfactualWallet(owner.address, versionManager.contractAddress, guardian.address, salt, 1); + const futureAddr = await factory.getAddressForCounterfactualWallet(owner, versionManager.contractAddress, guardian, salt, 1); // we create the wallet const tx = await factory.from(infrastructure).createCounterfactualWallet( - owner.address, versionManager.contractAddress, guardian.address, salt, 1, + owner, versionManager.contractAddress, guardian, salt, 1, ); const txReceipt = await factory.verboseWaitForTransaction(tx); const walletAddr = txReceipt.events.filter((event) => event.event === "WalletCreated")[0].args.wallet; @@ -224,16 +224,16 @@ contract("WalletFactory", (accounts) => { // we test that the wallet has the correct owner const wallet = await deployer.wrapDeployedContract(BaseWallet, walletAddr); const walletOwner = await wallet.owner(); - assert.equal(walletOwner, owner.address, "should have the correct owner"); + assert.equal(walletOwner, owner, "should have the correct owner"); }); it("should create with the correct modules", async () => { const salt = utils.generateSaltValue(); // we get the future address - const futureAddr = await factory.getAddressForCounterfactualWallet(owner.address, versionManager.contractAddress, guardian.address, salt, 1); + const futureAddr = await factory.getAddressForCounterfactualWallet(owner, versionManager.contractAddress, guardian, salt, 1); // we create the wallet const tx = await factory.from(infrastructure).createCounterfactualWallet( - owner.address, versionManager.contractAddress, guardian.address, salt, 1, + owner, versionManager.contractAddress, guardian, salt, 1, ); const txReceipt = await factory.verboseWaitForTransaction(tx); const walletAddr = txReceipt.events.filter((event) => event.event === "WalletCreated")[0].args.wallet; @@ -253,11 +253,11 @@ contract("WalletFactory", (accounts) => { const salt = utils.generateSaltValue(); // we get the future address const futureAddr = await factory.getAddressForCounterfactualWallet( - owner.address, versionManager.contractAddress, guardian.address, salt, badVersion, + owner, versionManager.contractAddress, guardian, salt, badVersion, ); // we create the wallet const tx = await factory.from(deployer).createCounterfactualWallet( - owner.address, versionManager.contractAddress, guardian.address, salt, badVersion, + owner, versionManager.contractAddress, guardian, salt, badVersion, ); const txReceipt = await factory.verboseWaitForTransaction(tx); const walletAddr = txReceipt.events.filter((event) => event.event === "WalletCreated")[0].args.wallet; @@ -268,27 +268,27 @@ contract("WalletFactory", (accounts) => { it("should create with the correct guardian", async () => { const salt = utils.generateSaltValue(); // we get the future address - const futureAddr = await factory.getAddressForCounterfactualWallet(owner.address, versionManager.contractAddress, guardian.address, salt, 1); + const futureAddr = await factory.getAddressForCounterfactualWallet(owner, versionManager.contractAddress, guardian, salt, 1); // we create the wallet const tx = await factory.from(infrastructure).createCounterfactualWallet( - owner.address, versionManager.contractAddress, guardian.address, salt, 1, + owner, versionManager.contractAddress, guardian, salt, 1, ); const txReceipt = await factory.verboseWaitForTransaction(tx); const walletAddr = txReceipt.events.filter((event) => event.event === "WalletCreated")[0].args.wallet; // we test that the wallet is at the correct address assert.equal(futureAddr, walletAddr, "should have the correct address"); // we test that the wallet has the correct guardian - const success = await guardianStorage.isGuardian(walletAddr, guardian.address); + const success = await guardianStorage.isGuardian(walletAddr, guardian); assert.equal(success, true, "should have the correct guardian"); }); it("should fail to create a wallet at an existing address", async () => { const salt = utils.generateSaltValue(); // we get the future address - const futureAddr = await factory.getAddressForCounterfactualWallet(owner.address, versionManager.contractAddress, guardian.address, salt, 1); + const futureAddr = await factory.getAddressForCounterfactualWallet(owner, versionManager.contractAddress, guardian, salt, 1); // we create the first wallet const tx = await factory.from(infrastructure).createCounterfactualWallet( - owner.address, versionManager.contractAddress, guardian.address, salt, 1, + owner, versionManager.contractAddress, guardian, salt, 1, ); const txReceipt = await factory.verboseWaitForTransaction(tx); const walletAddr = txReceipt.events.filter((event) => event.event === "WalletCreated")[0].args.wallet; @@ -296,7 +296,7 @@ contract("WalletFactory", (accounts) => { assert.equal(futureAddr, walletAddr, "should have the correct address"); // we create the second wallet await assert.revert( - factory.from(infrastructure).createCounterfactualWallet(owner.address, versionManager.contractAddress, guardian.address, salt, 1), + factory.from(infrastructure).createCounterfactualWallet(owner, versionManager.contractAddress, guardian, salt, 1), "should fail when address is in use", ); }); @@ -305,7 +305,7 @@ contract("WalletFactory", (accounts) => { const salt = utils.generateSaltValue(); await assert.revertWith( factory.from(deployer).createCounterfactualWallet( - owner.address, ethers.constants.AddressZero, guardian.address, salt, 1, + owner, ethers.constants.AddressZero, guardian, salt, 1, ), "invalid _versionManager", ); @@ -314,7 +314,7 @@ contract("WalletFactory", (accounts) => { it("should fail to create when the guardian is empty", async () => { const salt = utils.generateSaltValue(); await assert.revertWith( - factory.from(infrastructure).createCounterfactualWallet(owner.address, versionManager.contractAddress, ZERO_ADDRESS, salt, 1), + factory.from(infrastructure).createCounterfactualWallet(owner, versionManager.contractAddress, ZERO_ADDRESS, salt, 1), "WF: guardian cannot be null", ); }); @@ -323,12 +323,12 @@ contract("WalletFactory", (accounts) => { const salt = utils.generateSaltValue(); const amount = ethers.BigNumber.from("10000000000000"); // we get the future address - const futureAddr = await factory.getAddressForCounterfactualWallet(owner.address, versionManager.contractAddress, guardian.address, salt, 1); + const futureAddr = await factory.getAddressForCounterfactualWallet(owner, versionManager.contractAddress, guardian, salt, 1); // We send ETH to the address await infrastructure.sendTransaction({ to: futureAddr, value: amount }); // we create the wallet const tx = await factory.from(infrastructure).createCounterfactualWallet( - owner.address, versionManager.contractAddress, guardian.address, salt, 1, + owner, versionManager.contractAddress, guardian, salt, 1, ); const txReceipt = await factory.verboseWaitForTransaction(tx); const wallet = deployer.wrapDeployedContract(BaseWallet, futureAddr); @@ -341,7 +341,7 @@ contract("WalletFactory", (accounts) => { it("should fail to get an address when the guardian is empty", async () => { const salt = utils.generateSaltValue(); await assert.revertWith( - factory.from(infrastructure).getAddressForCounterfactualWallet(owner.address, versionManager.contractAddress, ZERO_ADDRESS, salt, 1), + factory.from(infrastructure).getAddressForCounterfactualWallet(owner, versionManager.contractAddress, ZERO_ADDRESS, salt, 1), "WF: guardian cannot be null", ); }); diff --git a/test/guardianManager.js b/test/guardianManager.js index b7b46254b..758219db2 100644 --- a/test/guardianManager.js +++ b/test/guardianManager.js @@ -17,13 +17,13 @@ const TestManager = require("../utils/test-manager"); contract("GuardianManager", (accounts) => { const manager = new TestManager(accounts); - const owner = accounts[1].signer; - const guardian1 = accounts[2].signer; - const guardian2 = accounts[3].signer; - const guardian3 = accounts[4].signer; - const guardian4 = accounts[5].signer; - const guardian5 = accounts[6].signer; - const nonowner = accounts[7].signer; + const owner = accounts[1]; + const guardian1 = accounts[2]; + const guardian2 = accounts[3]; + const guardian3 = accounts[4]; + const guardian4 = accounts[5]; + const guardian5 = accounts[6]; + const nonowner = accounts[7]; let deployer; let wallet; @@ -66,109 +66,109 @@ contract("GuardianManager", (accounts) => { const proxy = await deployer.deploy(Proxy, {}, walletImplementation.contractAddress); wallet = deployer.wrapDeployedContract(BaseWallet, proxy.contractAddress); - await wallet.init(owner.address, [versionManager.contractAddress]); + await wallet.init(owner, [versionManager.contractAddress]); await versionManager.from(owner).upgradeWallet(wallet.contractAddress, await versionManager.lastVersion()); }); describe("Adding Guardians", () => { describe("EOA Guardians", () => { it("should let the owner add EOA Guardians (blockchain transaction)", async () => { - await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardian1.address); + await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardian1); let count = (await guardianStorage.guardianCount(wallet.contractAddress)).toNumber(); - let active = await guardianManager.isGuardian(wallet.contractAddress, guardian1.address); + let active = await guardianManager.isGuardian(wallet.contractAddress, guardian1); assert.isTrue(active, "first guardian should be active"); assert.equal(count, 1, "1 guardian should be active"); - await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardian2.address); + await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardian2); count = (await guardianStorage.guardianCount(wallet.contractAddress)).toNumber(); - active = await guardianManager.isGuardian(wallet.contractAddress, guardian2.address); + active = await guardianManager.isGuardian(wallet.contractAddress, guardian2); assert.isFalse(active, "second guardian should not yet be active"); assert.equal(count, 1, "second guardian should be pending during security period"); await manager.increaseTime(30); - await guardianManager.confirmGuardianAddition(wallet.contractAddress, guardian2.address); + await guardianManager.confirmGuardianAddition(wallet.contractAddress, guardian2); count = (await guardianStorage.guardianCount(wallet.contractAddress)).toNumber(); - active = await guardianManager.isGuardian(wallet.contractAddress, guardian2.address); + active = await guardianManager.isGuardian(wallet.contractAddress, guardian2); const guardians = await guardianManager.getGuardians(wallet.contractAddress); assert.isTrue(active, "second guardian should be active"); assert.equal(count, 2, "2 guardians should be active after security period"); - assert.equal(guardian1.address, guardians[0], "should return first guardian address"); - assert.equal(guardian2.address, guardians[1], "should return second guardian address"); + assert.equal(guardian1, guardians[0], "should return first guardian address"); + assert.equal(guardian2, guardians[1], "should return second guardian address"); }); it("should not let the owner add EOA Guardians after two security periods (blockchain transaction)", async () => { - await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardian1.address); - await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardian2.address); + await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardian1); + await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardian2); await manager.increaseTime(48); // 42 == 2 * security_period - await assert.revertWith(guardianManager.confirmGuardianAddition(wallet.contractAddress, guardian2.address), + await assert.revertWith(guardianManager.confirmGuardianAddition(wallet.contractAddress, guardian2), "GM: Too late to confirm guardian addition"); const count = (await guardianStorage.guardianCount(wallet.contractAddress)).toNumber(); - const active = await guardianManager.isGuardian(wallet.contractAddress, guardian2.address); + const active = await guardianManager.isGuardian(wallet.contractAddress, guardian2); assert.isFalse(active, "second guardian should not be active (addition confirmation was too late)"); assert.equal(count, 1, "1 guardian should be active after two security periods (addition confirmation was too late)"); }); it("should not allow confirming too early", async () => { - await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardian1.address); - await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardian2.address); - await assert.revertWith(guardianManager.confirmGuardianAddition(wallet.contractAddress, guardian2.address), + await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardian1); + await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardian2); + await assert.revertWith(guardianManager.confirmGuardianAddition(wallet.contractAddress, guardian2), "GM: Too early to confirm guardian addition"); }); it("should let the owner re-add EOA Guardians after missing the confirmation window (blockchain transaction)", async () => { - await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardian1.address); + await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardian1); // first time - await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardian2.address); + await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardian2); await manager.increaseTime(48); // 42 == 2 * security_period - await assert.revertWith(guardianManager.confirmGuardianAddition(wallet.contractAddress, guardian2.address), + await assert.revertWith(guardianManager.confirmGuardianAddition(wallet.contractAddress, guardian2), "GM: Too late to confirm guardian addition"); // second time - await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardian2.address); + await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardian2); let count = (await guardianStorage.guardianCount(wallet.contractAddress)).toNumber(); - let active = await guardianManager.isGuardian(wallet.contractAddress, guardian2.address); + let active = await guardianManager.isGuardian(wallet.contractAddress, guardian2); assert.isFalse(active, "second guardian should not yet be active"); assert.equal(count, 1, "second guardian should be pending during security period"); await manager.increaseTime(30); - await guardianManager.confirmGuardianAddition(wallet.contractAddress, guardian2.address); + await guardianManager.confirmGuardianAddition(wallet.contractAddress, guardian2); count = (await guardianStorage.guardianCount(wallet.contractAddress)).toNumber(); - active = await guardianManager.isGuardian(wallet.contractAddress, guardian2.address); + active = await guardianManager.isGuardian(wallet.contractAddress, guardian2); assert.isTrue(active, "second guardian should be active"); assert.equal(count, 2, "2 guardians should be active after security period"); }); it("should only let the owner add an EOA guardian", async () => { - await assert.revertWith(guardianManager.from(nonowner).addGuardian(wallet.contractAddress, guardian1.address), + await assert.revertWith(guardianManager.from(nonowner).addGuardian(wallet.contractAddress, guardian1), "BF: must be owner or feature"); }); it("should not allow adding wallet owner as guardian", async () => { - await assert.revertWith(guardianManager.from(owner).addGuardian(wallet.contractAddress, owner.address), + await assert.revertWith(guardianManager.from(owner).addGuardian(wallet.contractAddress, owner), "GM: target guardian cannot be owner"); }); it("should not allow adding an existing guardian twice", async () => { - await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardian1.address); - await assert.revertWith(guardianManager.from(owner).addGuardian(wallet.contractAddress, guardian1.address), + await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardian1); + await assert.revertWith(guardianManager.from(owner).addGuardian(wallet.contractAddress, guardian1), "GM: target is already a guardian"); }); it("should not allow adding a duplicate request to add a guardian to the request queue", async () => { - await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardian1.address); - await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardian2.address); - await assert.revertWith(guardianManager.from(owner).addGuardian(wallet.contractAddress, guardian2.address), + await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardian1); + await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardian2); + await assert.revertWith(guardianManager.from(owner).addGuardian(wallet.contractAddress, guardian2), "GM: addition of target as guardian is already pending"); }); it("should let the owner add an EOA guardian (relayed transaction)", async () => { - await manager.relay(guardianManager, "addGuardian", [wallet.contractAddress, guardian1.address], wallet, [owner]); + await manager.relay(guardianManager, "addGuardian", [wallet.contractAddress, guardian1], wallet, [owner]); const count = (await guardianStorage.guardianCount(wallet.contractAddress)).toNumber(); - const active = await guardianManager.isGuardian(wallet.contractAddress, guardian1.address); + const active = await guardianManager.isGuardian(wallet.contractAddress, guardian1); assert.isTrue(active, "first guardian should be active"); assert.equal(count, 1, "1 guardian should be active"); }); @@ -178,13 +178,13 @@ contract("GuardianManager", (accounts) => { let count; let active; for (let i = 1; i <= 5; i += 1) { - await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardians[i - 1].address); + await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardians[i - 1]); if (i > 1) { await manager.increaseTime(31); - await guardianManager.confirmGuardianAddition(wallet.contractAddress, guardians[i - 1].address); + await guardianManager.confirmGuardianAddition(wallet.contractAddress, guardians[i - 1]); } count = (await guardianStorage.guardianCount(wallet.contractAddress)).toNumber(); - active = await guardianManager.isGuardian(wallet.contractAddress, guardians[i - 1].address); + active = await guardianManager.isGuardian(wallet.contractAddress, guardians[i - 1]); assert.equal(count, i, `guardian ${i} should be added`); assert.isTrue(active, `guardian ${i} should be active`); } @@ -195,13 +195,13 @@ contract("GuardianManager", (accounts) => { let count; let active; for (let i = 1; i <= 3; i += 1) { - await manager.relay(guardianManager, "addGuardian", [wallet.contractAddress, guardians[i - 1].address], wallet, [owner]); + await manager.relay(guardianManager, "addGuardian", [wallet.contractAddress, guardians[i - 1]], wallet, [owner]); if (i > 1) { await manager.increaseTime(30); - await manager.relay(guardianManager, "confirmGuardianAddition", [wallet.contractAddress, guardians[i - 1].address], wallet, []); + await manager.relay(guardianManager, "confirmGuardianAddition", [wallet.contractAddress, guardians[i - 1]], wallet, []); } count = (await guardianStorage.guardianCount(wallet.contractAddress)).toNumber(); - active = await guardianManager.isGuardian(wallet.contractAddress, guardians[i - 1].address); + active = await guardianManager.isGuardian(wallet.contractAddress, guardians[i - 1]); assert.equal(count, i, `guardian ${i} should be added`); assert.isTrue(active, `guardian ${i} should be active`); } @@ -216,18 +216,18 @@ contract("GuardianManager", (accounts) => { beforeEach(async () => { const proxy1 = await deployer.deploy(Proxy, {}, walletImplementation.contractAddress); guardianWallet1 = deployer.wrapDeployedContract(BaseWallet, proxy1.contractAddress); - await guardianWallet1.init(guardian1.address, [versionManager.contractAddress]); + await guardianWallet1.init(guardian1, [versionManager.contractAddress]); const proxy2 = await deployer.deploy(Proxy, {}, walletImplementation.contractAddress); guardianWallet2 = deployer.wrapDeployedContract(BaseWallet, proxy2.contractAddress); - await guardianWallet2.init(guardian2.address, [versionManager.contractAddress]); + await guardianWallet2.init(guardian2, [versionManager.contractAddress]); dumbContract = await deployer.deploy(DumbContract); }); it("should let the owner add Smart Contract Guardians (blockchain transaction)", async () => { await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardianWallet1.contractAddress); let count = (await guardianStorage.guardianCount(wallet.contractAddress)).toNumber(); - let active = await guardianManager.isGuardianOrGuardianSigner(wallet.contractAddress, guardian1.address); + let active = await guardianManager.isGuardianOrGuardianSigner(wallet.contractAddress, guardian1); assert.isTrue(active, "first guardian owner should be recognized as guardian"); active = await guardianManager.isGuardian(wallet.contractAddress, guardianWallet1.contractAddress); assert.isTrue(active, "first guardian should be recognized as guardian"); @@ -235,7 +235,7 @@ contract("GuardianManager", (accounts) => { await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardianWallet2.contractAddress); count = (await guardianStorage.guardianCount(wallet.contractAddress)).toNumber(); - active = await guardianManager.isGuardianOrGuardianSigner(wallet.contractAddress, guardian2.address); + active = await guardianManager.isGuardianOrGuardianSigner(wallet.contractAddress, guardian2); assert.isFalse(active, "second guardian owner should not yet be active"); active = await guardianManager.isGuardian(wallet.contractAddress, guardianWallet2.contractAddress); assert.isFalse(active, "second guardian should not yet be active"); @@ -244,7 +244,7 @@ contract("GuardianManager", (accounts) => { await manager.increaseTime(30); await guardianManager.confirmGuardianAddition(wallet.contractAddress, guardianWallet2.contractAddress); count = (await guardianStorage.guardianCount(wallet.contractAddress)).toNumber(); - active = await guardianManager.isGuardianOrGuardianSigner(wallet.contractAddress, guardian2.address); + active = await guardianManager.isGuardianOrGuardianSigner(wallet.contractAddress, guardian2); assert.isTrue(active, "second guardian owner should be active"); active = await guardianManager.isGuardian(wallet.contractAddress, guardianWallet2.contractAddress); assert.isTrue(active, "second guardian should be active"); @@ -256,7 +256,7 @@ contract("GuardianManager", (accounts) => { const count = (await guardianStorage.guardianCount(wallet.contractAddress)).toNumber(); let active = await guardianManager.isGuardian(wallet.contractAddress, guardianWallet1.contractAddress); assert.isTrue(active, "first guardian should be active"); - active = await guardianManager.isGuardianOrGuardianSigner(wallet.contractAddress, guardian1.address); + active = await guardianManager.isGuardianOrGuardianSigner(wallet.contractAddress, guardian1); assert.isTrue(active, "first guardian owner should be active"); assert.equal(count, 1, "1 guardian should be active"); }); @@ -269,7 +269,7 @@ contract("GuardianManager", (accounts) => { describe("Non-Compliant Guardians", () => { let nonCompliantGuardian; beforeEach(async () => { - await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardian1.address); + await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardian1); nonCompliantGuardian = await deployer.deploy(NonCompliantGuardian); }); it("it should fail to add a non-compliant guardian", async () => { @@ -281,95 +281,95 @@ contract("GuardianManager", (accounts) => { describe("Revoking Guardians", () => { beforeEach(async () => { - await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardian1.address); - await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardian2.address); + await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardian1); + await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardian2); await manager.increaseTime(30); - await guardianManager.confirmGuardianAddition(wallet.contractAddress, guardian2.address); + await guardianManager.confirmGuardianAddition(wallet.contractAddress, guardian2); const count = (await guardianStorage.guardianCount(wallet.contractAddress)).toNumber(); assert.equal(count, 2, "2 guardians should be added"); }); it("should revoke a guardian (blockchain transaction)", async () => { - await guardianManager.from(owner).revokeGuardian(wallet.contractAddress, guardian1.address); + await guardianManager.from(owner).revokeGuardian(wallet.contractAddress, guardian1); let count = (await guardianStorage.guardianCount(wallet.contractAddress)).toNumber(); - let active = await guardianManager.isGuardian(wallet.contractAddress, guardian1.address); + let active = await guardianManager.isGuardian(wallet.contractAddress, guardian1); assert.isTrue(active, "the revoked guardian should still be active during the security period"); assert.equal(count, 2, "the revoked guardian should go through a security period"); await manager.increaseTime(30); - await guardianManager.confirmGuardianRevokation(wallet.contractAddress, guardian1.address); + await guardianManager.confirmGuardianRevokation(wallet.contractAddress, guardian1); count = (await guardianStorage.guardianCount(wallet.contractAddress)).toNumber(); - active = await guardianManager.isGuardian(wallet.contractAddress, guardian1.address); + active = await guardianManager.isGuardian(wallet.contractAddress, guardian1); assert.isFalse(active, "the revoked guardian should no longer be active after the security period"); assert.equal(count, 1, "the revoked guardian should be removed after the security period"); }); it("should not be able to revoke a nonexistent guardian", async () => { - await assert.revertWith(guardianManager.from(owner).revokeGuardian(wallet.contractAddress, nonowner.address), + await assert.revertWith(guardianManager.from(owner).revokeGuardian(wallet.contractAddress, nonowner), "GM: must be an existing guardian"); }); it("should not confirm a guardian revokation too early", async () => { - await guardianManager.from(owner).revokeGuardian(wallet.contractAddress, guardian1.address); - await assert.revertWith(guardianManager.confirmGuardianRevokation(wallet.contractAddress, guardian1.address), + await guardianManager.from(owner).revokeGuardian(wallet.contractAddress, guardian1); + await assert.revertWith(guardianManager.confirmGuardianRevokation(wallet.contractAddress, guardian1), "GM: Too early to confirm guardian revokation"); }); it("should not confirm a guardian revokation after two security periods (blockchain transaction)", async () => { - await guardianManager.from(owner).revokeGuardian(wallet.contractAddress, guardian1.address); + await guardianManager.from(owner).revokeGuardian(wallet.contractAddress, guardian1); await manager.increaseTime(48); // 48 == 2 * security_period - await assert.revertWith(guardianManager.confirmGuardianRevokation(wallet.contractAddress, guardian1.address), + await assert.revertWith(guardianManager.confirmGuardianRevokation(wallet.contractAddress, guardian1), "GM: Too late to confirm guardian revokation"); }); it("should not be able to revoke a guardian twice", async () => { - await guardianManager.from(owner).revokeGuardian(wallet.contractAddress, guardian1.address); - await assert.revertWith(guardianManager.from(owner).revokeGuardian(wallet.contractAddress, guardian1.address), + await guardianManager.from(owner).revokeGuardian(wallet.contractAddress, guardian1); + await assert.revertWith(guardianManager.from(owner).revokeGuardian(wallet.contractAddress, guardian1), "GM: revokation of target as guardian is already pending"); }); it("should revoke a guardian again after missing the confirmation window the first time (blockchain transaction)", async () => { // first time - await guardianManager.from(owner).revokeGuardian(wallet.contractAddress, guardian1.address); + await guardianManager.from(owner).revokeGuardian(wallet.contractAddress, guardian1); await manager.increaseTime(48); // 48 == 2 * security_period - await assert.revertWith(guardianManager.confirmGuardianRevokation(wallet.contractAddress, guardian1.address), + await assert.revertWith(guardianManager.confirmGuardianRevokation(wallet.contractAddress, guardian1), "GM: Too late to confirm guardian revokation"); // second time - await guardianManager.from(owner).revokeGuardian(wallet.contractAddress, guardian1.address); + await guardianManager.from(owner).revokeGuardian(wallet.contractAddress, guardian1); let count = (await guardianStorage.guardianCount(wallet.contractAddress)).toNumber(); - let active = await guardianManager.isGuardian(wallet.contractAddress, guardian1.address); + let active = await guardianManager.isGuardian(wallet.contractAddress, guardian1); assert.isTrue(active, "the revoked guardian should still be active during the security period"); assert.equal(count, 2, "the revoked guardian should go through a security period"); await manager.increaseTime(30); - await guardianManager.confirmGuardianRevokation(wallet.contractAddress, guardian1.address); + await guardianManager.confirmGuardianRevokation(wallet.contractAddress, guardian1); count = (await guardianStorage.guardianCount(wallet.contractAddress)).toNumber(); - active = await guardianManager.isGuardian(wallet.contractAddress, guardian1.address); + active = await guardianManager.isGuardian(wallet.contractAddress, guardian1); assert.isFalse(active, "the revoked guardian should no longer be active after the security period"); assert.equal(count, 1, "the revoked guardian should be removed after the security period"); }); it("should add a guardian after a revoke (blockchain transaction)", async () => { - await guardianManager.from(owner).revokeGuardian(wallet.contractAddress, guardian1.address); + await guardianManager.from(owner).revokeGuardian(wallet.contractAddress, guardian1); await manager.increaseTime(30); - await guardianManager.confirmGuardianRevokation(wallet.contractAddress, guardian1.address); + await guardianManager.confirmGuardianRevokation(wallet.contractAddress, guardian1); let count = (await guardianStorage.guardianCount(wallet.contractAddress)).toNumber(); assert.equal(count, 1, "there should be 1 guardian left"); - await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardian3.address); + await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardian3); await manager.increaseTime(30); - await guardianManager.confirmGuardianAddition(wallet.contractAddress, guardian3.address); + await guardianManager.confirmGuardianAddition(wallet.contractAddress, guardian3); count = (await guardianStorage.guardianCount(wallet.contractAddress)).toNumber(); assert.equal(count, 2, "there should be 2 guardians again"); }); it("should be able to remove a guardian that is the last in the list", async () => { - await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardian3.address); + await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardian3); await manager.increaseTime(30); - await guardianManager.confirmGuardianAddition(wallet.contractAddress, guardian3.address); + await guardianManager.confirmGuardianAddition(wallet.contractAddress, guardian3); let count = await guardianStorage.guardianCount(wallet.contractAddress); assert.equal(count.toNumber(), 3, "there should be 3 guardians"); @@ -384,66 +384,66 @@ contract("GuardianManager", (accounts) => { describe("Cancelling Pending Guardians", () => { beforeEach(async () => { - await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardian1.address); + await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardian1); const count = (await guardianManager.guardianCount(wallet.contractAddress)).toNumber(); assert.equal(count, 1, "1 guardian should be added"); }); it("owner should be able to cancel pending addition of guardian (blockchain transaction)", async () => { // Add guardian 2 and cancel its addition - await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardian2.address); - await guardianManager.from(owner).cancelGuardianAddition(wallet.contractAddress, guardian2.address); + await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardian2); + await guardianManager.from(owner).cancelGuardianAddition(wallet.contractAddress, guardian2); await manager.increaseTime(30); - await assert.revertWith(guardianManager.confirmGuardianAddition(wallet.contractAddress, guardian2.address), + await assert.revertWith(guardianManager.confirmGuardianAddition(wallet.contractAddress, guardian2), "GM: no pending addition as guardian for target"); }); it("owner should not be able to cancel a nonexistent addition of a guardian request", async () => { - await assert.revertWith(guardianManager.from(owner).cancelGuardianAddition(wallet.contractAddress, guardian2.address), + await assert.revertWith(guardianManager.from(owner).cancelGuardianAddition(wallet.contractAddress, guardian2), "GM: no pending addition as guardian for target"); }); it("owner should be able to cancel pending revokation of guardian (blockchain transaction)", async () => { // Revoke guardian 1 and cancel its revokation - await guardianManager.from(owner).revokeGuardian(wallet.contractAddress, guardian1.address); - await guardianManager.from(owner).cancelGuardianRevokation(wallet.contractAddress, guardian1.address); + await guardianManager.from(owner).revokeGuardian(wallet.contractAddress, guardian1); + await guardianManager.from(owner).cancelGuardianRevokation(wallet.contractAddress, guardian1); await manager.increaseTime(30); - await assert.revertWith(guardianManager.confirmGuardianRevokation(wallet.contractAddress, guardian1.address), + await assert.revertWith(guardianManager.confirmGuardianRevokation(wallet.contractAddress, guardian1), "GM: no pending guardian revokation for target"); }); it("owner should not be able to cancel a nonexistent pending revokation of guardian", async () => { - await assert.revertWith(guardianManager.from(owner).cancelGuardianRevokation(wallet.contractAddress, nonowner.address), + await assert.revertWith(guardianManager.from(owner).cancelGuardianRevokation(wallet.contractAddress, nonowner), "GM: no pending guardian revokation for target"); }); it("owner should be able to cancel pending addition of guardian (relayed transaction)", async () => { // Add guardian 2 and cancel its addition - await manager.relay(guardianManager, "addGuardian", [wallet.contractAddress, guardian2.address], wallet, [owner]); - await manager.relay(guardianManager, "cancelGuardianAddition", [wallet.contractAddress, guardian2.address], wallet, [owner]); + await manager.relay(guardianManager, "addGuardian", [wallet.contractAddress, guardian2], wallet, [owner]); + await manager.relay(guardianManager, "cancelGuardianAddition", [wallet.contractAddress, guardian2], wallet, [owner]); await manager.increaseTime(30); - await assert.revertWith(guardianManager.confirmGuardianAddition(wallet.contractAddress, guardian2.address), + await assert.revertWith(guardianManager.confirmGuardianAddition(wallet.contractAddress, guardian2), "GM: no pending addition as guardian for target"); }); it("owner should be able to cancel pending revokation of guardian (relayed transaction)", async () => { // Revoke guardian 1 and cancel its revokation - await manager.relay(guardianManager, "revokeGuardian", [wallet.contractAddress, guardian1.address], wallet, [owner]); - await manager.relay(guardianManager, "cancelGuardianRevokation", [wallet.contractAddress, guardian1.address], wallet, [owner]); + await manager.relay(guardianManager, "revokeGuardian", [wallet.contractAddress, guardian1], wallet, [owner]); + await manager.relay(guardianManager, "cancelGuardianRevokation", [wallet.contractAddress, guardian1], wallet, [owner]); await manager.increaseTime(30); - await assert.revertWith(guardianManager.confirmGuardianRevokation(wallet.contractAddress, guardian1.address), + await assert.revertWith(guardianManager.confirmGuardianRevokation(wallet.contractAddress, guardian1), "GM: no pending guardian revokation for target"); }); }); describe("Guardian Storage", () => { it("should not allow non modules to addGuardian", async () => { - await assert.revertWith(guardianStorage.addGuardian(wallet.contractAddress, guardian4.address), + await assert.revertWith(guardianStorage.addGuardian(wallet.contractAddress, guardian4), "must be an authorized module to call this method"); }); it("should not allow non modules to revokeGuardian", async () => { - await assert.revertWith(guardianStorage.revokeGuardian(wallet.contractAddress, guardian1.address), + await assert.revertWith(guardianStorage.revokeGuardian(wallet.contractAddress, guardian1), "must be an authorized module to call this method"); }); }); diff --git a/test/kyber.js b/test/kyber.js index c232ef2c5..04e676d6e 100644 --- a/test/kyber.js +++ b/test/kyber.js @@ -14,7 +14,7 @@ const ERC20_RATE = 51 * 10 ** 13; // 1 ERC20 = 0.00051 ETH contract("KyberNetwork", (accounts) => { const manager = new TestManager(); - const trader = accounts[1].signer; + const trader = accounts[1]; let deployer; let erc20; @@ -33,13 +33,13 @@ contract("KyberNetwork", (accounts) => { }); it("should exchange ETH for ERC20", async () => { - const beforeERC20 = await erc20.balanceOf(trader.address); - const beforeETH = await deployer.provider.getBalance(trader.address); + const beforeERC20 = await erc20.balanceOf(trader); + const beforeETH = await deployer.provider.getBalance(trader); assert.equal(beforeERC20.toNumber(), 0, "trader should have no ERC20"); - await kyber.from(trader).trade(ETH_TOKEN, 10000, erc20.contractAddress, trader.address, + await kyber.from(trader).trade(ETH_TOKEN, 10000, erc20.contractAddress, trader, ethers.BigNumber.from("10000000000000000000000"), 1, "0x0000000000000000000000000000000000000000", { value: 10000 }); - const afterERC20 = await erc20.balanceOf(trader.address); - const afterETH = await deployer.provider.getBalance(trader.address); + const afterERC20 = await erc20.balanceOf(trader); + const afterETH = await deployer.provider.getBalance(trader); assert.equal(beforeETH.sub(afterETH).gt(10000), true, "trader should have exchanged 10000 wei"); assert.equal(afterERC20.gt(0), true, "trader should have received ERC20"); }); @@ -50,22 +50,22 @@ contract("KyberNetwork", (accounts) => { ETH_TOKEN, ethers.BigNumber.from("1000000000000000000"), erc20.contractAddress, - trader.address, + trader, ethers.BigNumber.from("10000000000000000000000"), 1, "0x0000000000000000000000000000000000000000", { value: ethers.BigNumber.from("1000000000000000000") }, ); - const beforeERC20 = await erc20.balanceOf(trader.address); - const beforeETH = await deployer.provider.getBalance(trader.address); + const beforeERC20 = await erc20.balanceOf(trader); + const beforeETH = await deployer.provider.getBalance(trader); assert.equal(beforeERC20 > 0, true, "trader should have some ERC20"); // exchange ERC20 const srcAmount = beforeERC20.div(ethers.BigNumber.from(2)); await erc20.from(trader).approve(kyber.contractAddress, srcAmount); - await kyber.from(trader).trade(erc20.contractAddress, srcAmount, ETH_TOKEN, trader.address, + await kyber.from(trader).trade(erc20.contractAddress, srcAmount, ETH_TOKEN, trader, ethers.BigNumber.from("10000000000000000000000"), 1, "0x0000000000000000000000000000000000000000"); - const afterERC20 = await erc20.balanceOf(trader.address); - const afterETH = await deployer.provider.getBalance(trader.address); + const afterERC20 = await erc20.balanceOf(trader); + const afterETH = await deployer.provider.getBalance(trader); assert.equal(beforeERC20.sub(afterERC20).eq(srcAmount), true, "trader should have exchanged ERC20"); assert.equal(afterETH.sub(beforeETH).gt(0), true, "trader should have received wei"); }); diff --git a/test/lockManager.js b/test/lockManager.js index ae05b7a74..36380cbb0 100644 --- a/test/lockManager.js +++ b/test/lockManager.js @@ -16,9 +16,9 @@ const TestManager = require("../utils/test-manager"); contract("LockManager", (accounts) => { const manager = new TestManager(); - const owner = accounts[1].signer; - const guardian1 = accounts[2].signer; - const nonguardian = accounts[3].signer; + const owner = accounts[1]; + const guardian1 = accounts[2]; + const nonguardian = accounts[3]; let deployer; let guardianManager; @@ -80,16 +80,16 @@ contract("LockManager", (accounts) => { relayerManager.contractAddress, ], []); - await wallet.init(owner.address, [versionManager.contractAddress]); + await wallet.init(owner, [versionManager.contractAddress]); await versionManager.from(owner).upgradeWallet(wallet.contractAddress, await versionManager.lastVersion()); }); describe("(Un)Lock by EOA guardians", () => { beforeEach(async () => { - await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardian1.address); + await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardian1); const count = (await guardianManager.guardianCount(wallet.contractAddress)).toNumber(); assert.equal(count, 1, "1 guardian should be added"); - const isGuardian = await guardianManager.isGuardian(wallet.contractAddress, guardian1.address); + const isGuardian = await guardianManager.isGuardian(wallet.contractAddress, guardian1); assert.isTrue(isGuardian, "guardian1 should be a guardian of the wallet"); const isLocked = await lockManager.isLocked(wallet.contractAddress); assert.isFalse(isLocked, "should be unlocked by default"); @@ -140,7 +140,7 @@ contract("LockManager", (accounts) => { const proxy = await deployer.deploy(Proxy, {}, walletImplementation.contractAddress); const guardianWallet = deployer.wrapDeployedContract(BaseWallet, proxy.contractAddress); - await guardianWallet.init(guardian1.address, [versionManager.contractAddress]); + await guardianWallet.init(guardian1, [versionManager.contractAddress]); await versionManager.from(guardian1).upgradeWallet(guardianWallet.contractAddress, await versionManager.lastVersion()); await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardianWallet.contractAddress); const count = (await guardianManager.guardianCount(wallet.contractAddress)).toNumber(); @@ -168,7 +168,7 @@ contract("LockManager", (accounts) => { describe("Auto-unlock", () => { it("should auto-unlock after lock period", async () => { - await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardian1.address); + await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardian1); await lockManager.from(guardian1).lock(wallet.contractAddress); let state = await lockManager.isLocked(wallet.contractAddress); assert.isTrue(state, "should be locked by guardian"); @@ -185,7 +185,7 @@ contract("LockManager", (accounts) => { describe("Unlocking wallets", () => { beforeEach(async () => { - await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardian1.address); + await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardian1); }); it("should not be able to unlock, an already unlocked wallet", async () => { @@ -200,7 +200,7 @@ contract("LockManager", (accounts) => { it("should not be able to unlock a wallet, locked by another feature", async () => { // lock by putting the wallet in recovery mode - await manager.relay(recoveryManager, "executeRecovery", [wallet.contractAddress, accounts[5].signer.address], wallet, [guardian1]); + await manager.relay(recoveryManager, "executeRecovery", [wallet.contractAddress, accounts[5]], wallet, [guardian1]); // try to unlock await assert.revertWith(lockManager.from(guardian1).unlock(wallet.contractAddress), diff --git a/test/makerV2Manager_invest.js b/test/makerV2Manager_invest.js index 8a6f6fe21..c4f8f559b 100644 --- a/test/makerV2Manager_invest.js +++ b/test/makerV2Manager_invest.js @@ -21,8 +21,8 @@ contract("MakerV2Invest", (accounts) => { const manager = new TestManager(); const { deployer } = manager; - const infrastructure = accounts[0].signer; - const owner = accounts[1].signer; + const infrastructure = accounts[0]; + const owner = accounts[1]; let wallet; let walletImplementation; @@ -87,7 +87,7 @@ contract("MakerV2Invest", (accounts) => { const proxy = await deployer.deploy(Proxy, {}, walletImplementation.contractAddress); wallet = deployer.wrapDeployedContract(BaseWallet, proxy.contractAddress); - await wallet.init(owner.address, [versionManager.contractAddress]); + await wallet.init(owner, [versionManager.contractAddress]); await versionManager.from(owner).upgradeWallet(wallet.contractAddress, await versionManager.lastVersion()); await sai["mint(address,uint256)"](wallet.contractAddress, DAI_SENT.mul(20)); await dai["mint(address,uint256)"](wallet.contractAddress, DAI_SENT.mul(20)); diff --git a/test/makerV2Manager_loan.js b/test/makerV2Manager_loan.js index 259d242be..acf6e72d6 100644 --- a/test/makerV2Manager_loan.js +++ b/test/makerV2Manager_loan.js @@ -35,9 +35,9 @@ contract("MakerV2Loan", (accounts) => { const manager = new TestManager(); const { deployer } = manager; - const infrastructure = accounts[0].signer; - const owner = accounts[1].signer; - const owner2 = accounts[2].signer; + const infrastructure = accounts[0]; + const owner = accounts[1]; + const owner2 = accounts[2]; let sai; let dai; @@ -136,7 +136,7 @@ contract("MakerV2Loan", (accounts) => { const proxy = await deployer.deploy(Proxy, {}, walletImplementation.contractAddress); wallet = deployer.wrapDeployedContract(BaseWallet, proxy.contractAddress); - await wallet.init(owner.address, [versionManager.contractAddress]); + await wallet.init(owner, [versionManager.contractAddress]); await versionManager.from(owner).upgradeWallet(wallet.contractAddress, await versionManager.lastVersion()); walletAddress = wallet.contractAddress; await infrastructure.sendTransaction({ to: walletAddress, value: parseEther("2.0") }); @@ -301,7 +301,7 @@ contract("MakerV2Loan", (accounts) => { const proxy = await deployer.deploy(Proxy, {}, walletImplementation.contractAddress); const wallet2 = deployer.wrapDeployedContract(BaseWallet, proxy.contractAddress); - await wallet2.init(owner2.address, [versionManager.contractAddress]); + await wallet2.init(owner2, [versionManager.contractAddress]); await assert.revertWith( makerV2.from(owner2).addCollateral(wallet2.contractAddress, loanId, ETH_TOKEN, parseEther("0.010")), "MV2: unauthorized loanId", @@ -335,7 +335,7 @@ contract("MakerV2Loan", (accounts) => { const proxy = await deployer.deploy(Proxy, {}, walletImplementation.contractAddress); const wallet2 = deployer.wrapDeployedContract(BaseWallet, proxy.contractAddress); - await wallet2.init(owner2.address, [versionManager.contractAddress]); + await wallet2.init(owner2, [versionManager.contractAddress]); await assert.revertWith( makerV2.from(owner2).removeCollateral(wallet2.contractAddress, loanId, ETH_TOKEN, parseEther("0.010")), "MV2: unauthorized loanId", @@ -401,7 +401,7 @@ contract("MakerV2Loan", (accounts) => { const proxy = await deployer.deploy(Proxy, {}, walletImplementation.contractAddress); const wallet2 = deployer.wrapDeployedContract(BaseWallet, proxy.contractAddress); - await wallet2.init(owner2.address, [versionManager.contractAddress]); + await wallet2.init(owner2, [versionManager.contractAddress]); await assert.revertWith( makerV2.from(owner2).addDebt(wallet2.contractAddress, loanId, ETH_TOKEN, parseEther("0.010")), "MV2: unauthorized loanId", @@ -451,7 +451,7 @@ contract("MakerV2Loan", (accounts) => { const proxy = await deployer.deploy(Proxy, {}, walletImplementation.contractAddress); const wallet2 = deployer.wrapDeployedContract(BaseWallet, proxy.contractAddress); - await wallet2.init(owner2.address, [versionManager.contractAddress]); + await wallet2.init(owner2, [versionManager.contractAddress]); await assert.revertWith( makerV2.from(owner2).removeDebt(wallet2.contractAddress, loanId, ETH_TOKEN, parseEther("0.010")), "MV2: unauthorized loanId", @@ -464,7 +464,6 @@ contract("MakerV2Loan", (accounts) => { const loanId = await testOpenLoan({ collateralAmount, daiAmount, relayed }); // give some ETH to the wallet to be used for repayment await owner.sendTransaction({ to: walletAddress, value: collateralAmount.mul(2) }); - await manager.increaseTime(3); // wait 3 seconds const beforeDAI = await dai.balanceOf(wallet.contractAddress); const method = "closeLoan"; @@ -495,7 +494,7 @@ contract("MakerV2Loan", (accounts) => { const proxy = await deployer.deploy(Proxy, {}, walletImplementation.contractAddress); const wallet2 = deployer.wrapDeployedContract(BaseWallet, proxy.contractAddress); - await wallet2.init(owner2.address, [versionManager.contractAddress]); + await wallet2.init(owner2, [versionManager.contractAddress]); await assert.revertWith( makerV2.from(owner2).closeLoan(wallet2.contractAddress, loanId), "MV2: unauthorized loanId", @@ -550,7 +549,7 @@ contract("MakerV2Loan", (accounts) => { async function testAcquireVault({ relayed }) { // Create the vault with `owner` as owner const { ilk } = await makerRegistry.collaterals(weth.contractAddress); - const txR = await (await cdpManager.from(owner).open(ilk, owner.address)).wait(); + const txR = await (await cdpManager.from(owner).open(ilk, owner)).wait(); const vaultId = txR.events.find((e) => e.event === "NewCdp").args.cdp; // Transfer the vault to the wallet await cdpManager.from(owner).give(vaultId, walletAddress); @@ -591,7 +590,7 @@ contract("MakerV2Loan", (accounts) => { it("should not transfer a vault that is not owned by the wallet", async () => { // Create the vault with `owner` as owner const { ilk } = await makerRegistry.collaterals(weth.contractAddress); - const txR = await (await cdpManager.from(owner).open(ilk, owner.address)).wait(); + const txR = await (await cdpManager.from(owner).open(ilk, owner)).wait(); const vaultId = txR.events.find((e) => e.event === "NewCdp").args.cdp; const loanId = bigNumToBytes32(vaultId); // We are NOT transferring the vault from the owner to the wallet @@ -603,11 +602,11 @@ contract("MakerV2Loan", (accounts) => { it("should not transfer a vault that is not given to the feature", async () => { // Deploy a fake wallet const fakeWallet = await deployer.deploy(FakeWallet, {}, false, AddressZero, 0, "0x00"); - await fakeWallet.init(owner.address, [versionManager.contractAddress]); + await fakeWallet.init(owner, [versionManager.contractAddress]); await versionManager.from(owner).upgradeWallet(fakeWallet.contractAddress, await versionManager.lastVersion()); // Create the vault with `owner` as owner const { ilk } = await makerRegistry.collaterals(weth.contractAddress); - const txR = await (await cdpManager.from(owner).open(ilk, owner.address)).wait(); + const txR = await (await cdpManager.from(owner).open(ilk, owner)).wait(); const vaultId = txR.events.find((e) => e.event === "NewCdp").args.cdp; const loanId = bigNumToBytes32(vaultId); // Transfer the vault to the fake wallet @@ -633,11 +632,11 @@ contract("MakerV2Loan", (accounts) => { // Deploy a fake wallet capable of reentrancy const acquireLoanCallData = makerV2.contract.interface.functions.acquireLoan.encode([AddressZero, bigNumToBytes32(ethers.BigNumber.from(0))]); const fakeWallet = await deployer.deploy(FakeWallet, {}, true, makerV2.contractAddress, 0, acquireLoanCallData); - await fakeWallet.init(owner.address, [versionManager.contractAddress]); + await fakeWallet.init(owner, [versionManager.contractAddress]); await versionManager.from(owner).upgradeWallet(fakeWallet.contractAddress, await versionManager.lastVersion()); // Create the vault with `owner` as owner const { ilk } = await makerRegistry.collaterals(weth.contractAddress); - const txR = await (await cdpManager.from(owner).open(ilk, owner.address)).wait(); + const txR = await (await cdpManager.from(owner).open(ilk, owner)).wait(); const vaultId = txR.events.find((e) => e.event === "NewCdp").args.cdp; const loanId = bigNumToBytes32(vaultId); // Transfer the vault to the fake wallet diff --git a/test/multisig.js b/test/multisig.js index 0cae611b9..66b7715c9 100644 --- a/test/multisig.js +++ b/test/multisig.js @@ -8,11 +8,11 @@ const utils = require("../utils/utilities.js"); contract("MultiSigWallet", (accounts) => { const manager = new TestManager(); - const owner = accounts[0].signer; - const owner1 = accounts[1].signer; - const owner2 = accounts[2].signer; - const owner3 = accounts[3].signer; - const newowner = accounts[4].signer; + const owner = accounts[0]; + const owner1 = accounts[1]; + const owner2 = accounts[2]; + const owner3 = accounts[3]; + const newowner = accounts[4]; let deployer; let multisig; @@ -25,7 +25,7 @@ contract("MultiSigWallet", (accounts) => { deployer = manager.newDeployer(); number = 12345; value = 10000000000; - owners = utils.sortWalletByAddress([owner1, owner2, owner3]).map((o) => o.address); + owners = utils.sortWalletByAddress([owner1, owner2, owner3]); }); beforeEach(async () => { @@ -127,11 +127,11 @@ contract("MultiSigWallet", (accounts) => { }); it("should not be able to execute addOwner externally", async () => { - await assert.revertWith(multisig.addOwner(newowner.address), "MSW: Calling account is not wallet"); + await assert.revertWith(multisig.addOwner(newowner), "MSW: Calling account is not wallet"); }); it("should not be able to execute removeOwner externally", async () => { - await assert.revertWith(multisig.removeOwner(newowner.address), "MSW: Calling account is not wallet"); + await assert.revertWith(multisig.removeOwner(newowner), "MSW: Calling account is not wallet"); }); it("should not be able to execute changeThreshold externally", async () => { @@ -139,10 +139,10 @@ contract("MultiSigWallet", (accounts) => { }); it("should be able to add new owner", async () => { - const { data, signatures } = await getMultiSigParams("addOwner", [newowner.address]); + const { data, signatures } = await getMultiSigParams("addOwner", [newowner]); await multisig.execute(multisig.contractAddress, 0, data, signatures); - const isOwner = await multisig.isOwner(newowner.address); + const isOwner = await multisig.isOwner(newowner); assert.isTrue(isOwner); }); @@ -164,23 +164,23 @@ contract("MultiSigWallet", (accounts) => { }); it("should not be able to add owner twice", async () => { - const { data, signatures } = await getMultiSigParams("addOwner", [owner1.address]); + const { data, signatures } = await getMultiSigParams("addOwner", [owner1]); await assert.revertWith(multisig.execute(multisig.contractAddress, 0, data, signatures), "MSW: External call failed"); }); it("should be able to remove existing owner", async () => { - const { data, signatures } = await getMultiSigParams("removeOwner", [owner1.address]); + const { data, signatures } = await getMultiSigParams("removeOwner", [owner1]); await multisig.execute(multisig.contractAddress, 0, data, signatures); - const isOwner = await multisig.isOwner(owner1.address); + const isOwner = await multisig.isOwner(owner1); assert.isFalse(isOwner); }); it("should not be able to remove owner if remaining owners are at the threshold count", async () => { - const values1 = await getMultiSigParams("removeOwner", [owner3.address]); + const values1 = await getMultiSigParams("removeOwner", [owner3]); await multisig.execute(multisig.contractAddress, 0, values1.data, values1.signatures); - const values2 = await getMultiSigParams("removeOwner", [owner2.address]); + const values2 = await getMultiSigParams("removeOwner", [owner2]); await assert.revertWith(multisig.execute(multisig.contractAddress, 0, values2.data, values2.signatures), "MSW: External call failed"); }); diff --git a/test/nftTransfer.js b/test/nftTransfer.js index f631deee7..ab1787f8f 100644 --- a/test/nftTransfer.js +++ b/test/nftTransfer.js @@ -24,10 +24,10 @@ const { parseRelayReceipt, callStatic } = require("../utils/utilities.js"); contract("NftTransfer", (accounts) => { const manager = new TestManager(); - const infrastructure = accounts[0].signer; - const owner1 = accounts[1].signer; - const owner2 = accounts[2].signer; - const eoaRecipient = accounts[3].signer; + const infrastructure = accounts[0]; + const owner1 = accounts[1]; + const owner2 = accounts[2]; + const eoaRecipient = accounts[3]; const tokenId = 1; let deployer; @@ -68,7 +68,7 @@ contract("NftTransfer", (accounts) => { manager.setRelayerManager(relayerManager); ck = await deployer.deploy(CK); tokenPriceRegistry = await deployer.deploy(TokenPriceRegistry); - await tokenPriceRegistry.addManager(infrastructure.address); + await tokenPriceRegistry.addManager(infrastructure); nftFeature = await deployer.deploy(NftTransfer, {}, lockStorage.contractAddress, tokenPriceRegistry.contractAddress, @@ -85,8 +85,8 @@ contract("NftTransfer", (accounts) => { const proxy2 = await deployer.deploy(Proxy, {}, walletImplementation.contractAddress); wallet2 = deployer.wrapDeployedContract(BaseWallet, proxy2.contractAddress); - await wallet1.init(owner1.address, [versionManager.contractAddress]); - await wallet2.init(owner2.address, [versionManager.contractAddress]); + await wallet1.init(owner1, [versionManager.contractAddress]); + await wallet2.init(owner2, [versionManager.contractAddress]); await versionManager.from(owner1).upgradeWallet(wallet1.contractAddress, await versionManager.lastVersion()); await versionManager.from(owner2).upgradeWallet(wallet2.contractAddress, await versionManager.lastVersion()); @@ -127,19 +127,19 @@ contract("NftTransfer", (accounts) => { describe("transfer to EOA account", () => { it("should allow unsafe NFT transfer from wallet1 to an EOA account", async () => { - await testNftTransfer({ safe: false, relayed: false, recipientAddress: eoaRecipient.address }); + await testNftTransfer({ safe: false, relayed: false, recipientAddress: eoaRecipient }); }); it("should allow safe NFT transfer from wallet1 to an EOA account", async () => { - await testNftTransfer({ safe: true, relayed: false, recipientAddress: eoaRecipient.address }); + await testNftTransfer({ safe: true, relayed: false, recipientAddress: eoaRecipient }); }); it("should allow unsafe NFT transfer from wallet1 to an EOA account (relayed)", async () => { - await testNftTransfer({ safe: false, relayed: true, recipientAddress: eoaRecipient.address }); + await testNftTransfer({ safe: false, relayed: true, recipientAddress: eoaRecipient }); }); it("should allow safe NFT transfer from wallet1 to an EOA account (relayed)", async () => { - await testNftTransfer({ safe: true, relayed: true, recipientAddress: eoaRecipient.address }); + await testNftTransfer({ safe: true, relayed: true, recipientAddress: eoaRecipient }); }); }); @@ -181,13 +181,13 @@ contract("NftTransfer", (accounts) => { it("should allow CK transfer from wallet1 to EOA account", async () => { await testNftTransfer({ - relayed: false, nftId: ckId, nftContract: ck, recipientAddress: eoaRecipient.address, + relayed: false, nftId: ckId, nftContract: ck, recipientAddress: eoaRecipient, }); }); it("should allow CK transfer from wallet1 to EOA account (relayed)", async () => { await testNftTransfer({ - relayed: true, nftId: ckId, nftContract: ck, recipientAddress: eoaRecipient.address, + relayed: true, nftId: ckId, nftContract: ck, recipientAddress: eoaRecipient, }); }); }); diff --git a/test/proxy.js b/test/proxy.js index 021ed8bae..3cde98460 100644 --- a/test/proxy.js +++ b/test/proxy.js @@ -9,8 +9,8 @@ const VersionManager = artifacts.require("VersionManager"); const Registry = artifacts.require("ModuleRegistry"); contract("Proxy", (accounts) => { - const owner = accounts[1].signer; - const nonowner = accounts[2].signer; + const owner = accounts[1]; + const nonowner = accounts[2]; let deployer; let walletImplementation; @@ -50,13 +50,13 @@ contract("Proxy", (accounts) => { it("should init the wallet with the correct owner", async () => { let walletOwner = await wallet.owner(); assert.equal(walletOwner, ethers.constants.AddressZero, "owner should be null before init"); - await wallet.init(owner.address, [module1.contractAddress]); + await wallet.init(owner, [module1.contractAddress]); walletOwner = await wallet.owner(); - assert.equal(walletOwner, owner.address, "owner should be the owner after init"); + assert.equal(walletOwner, owner, "owner should be the owner after init"); }); it("should init a wallet with the correct modules", async () => { - await wallet.init(owner.address, [module1.contractAddress, module2.contractAddress]); + await wallet.init(owner, [module1.contractAddress, module2.contractAddress]); const module1IsAuthorised = await wallet.authorised(module1.contractAddress); const module2IsAuthorised = await wallet.authorised(module2.contractAddress); const module3IsAuthorised = await wallet.authorised(module3.contractAddress); diff --git a/test/recoveryManager.js b/test/recoveryManager.js index f0c29cbb9..99042beb8 100644 --- a/test/recoveryManager.js +++ b/test/recoveryManager.js @@ -24,15 +24,15 @@ const WRONG_SIGNATURE_NUMBER_REVERT_MSG = "RM: Wrong number of signatures"; const INVALID_SIGNATURES_REVERT_MSG = "RM: Invalid signatures"; contract("RecoveryManager", (accounts) => { - const manager = new TestManager(accounts); + const manager = new TestManager(); - const owner = accounts[1].signer; - const guardian1 = accounts[2].signer; - const guardian2 = accounts[3].signer; - const guardian3 = accounts[4].signer; - const newowner = accounts[5].signer; - const nonowner = accounts[6].signer; - const nonowner2 = accounts[9].signer; + const owner = accounts[1]; + const guardian1 = accounts[2]; + const guardian2 = accounts[3]; + const guardian3 = accounts[4]; + const newowner = accounts[5]; + const nonowner = accounts[6]; + const nonowner2 = accounts[9]; let deployer; let guardianManager; @@ -96,14 +96,14 @@ contract("RecoveryManager", (accounts) => { relayerManager.contractAddress, ], []); - await wallet.init(owner.address, [versionManager.contractAddress]); + await wallet.init(owner, [versionManager.contractAddress]); await versionManager.from(owner).upgradeWallet(wallet.contractAddress, await versionManager.lastVersion()); }); async function addGuardians(guardians) { // guardians can be BaseWallet or ContractWrapper objects const guardianAddresses = guardians.map((guardian) => { - if (guardian.address) return guardian.address; + if (guardian) return guardian; return guardian.contractAddress; }); @@ -125,7 +125,7 @@ contract("RecoveryManager", (accounts) => { for (g of guardians) { const proxy = await deployer.deploy(Proxy, {}, walletImplementation.contractAddress); const guardianWallet = deployer.wrapDeployedContract(BaseWallet, proxy.contractAddress); - await guardianWallet.init(g.address, [versionManager.contractAddress]); + await guardianWallet.init(g, [versionManager.contractAddress]); await versionManager.from(g).upgradeWallet(guardianWallet.contractAddress, await versionManager.lastVersion()); wallets.push(guardianWallet); } @@ -135,14 +135,14 @@ contract("RecoveryManager", (accounts) => { function testExecuteRecovery(guardians) { it("should let a majority of guardians execute the recovery procedure", async () => { const majority = guardians.slice(0, Math.ceil((guardians.length) / 2)); - await manager.relay(recoveryManager, "executeRecovery", [wallet.contractAddress, newowner.address], wallet, sortWalletByAddress(majority)); + await manager.relay(recoveryManager, "executeRecovery", [wallet.contractAddress, newowner], wallet, sortWalletByAddress(majority)); const currentBlock = await manager.getCurrentBlock(); const timestamp = await manager.getTimestamp(currentBlock); const isLocked = await lockManager.isLocked(wallet.contractAddress); assert.isTrue(isLocked, "should be locked by recovery"); const recoveryConfig = await recoveryManager.getRecovery(wallet.contractAddress); - assert.equal(recoveryConfig._address, newowner.address); + assert.equal(recoveryConfig._address, newowner); assert.closeTo(recoveryConfig._executeAfter.toNumber(), recoveryPeriod.add(timestamp).toNumber(), 1); assert.equal(recoveryConfig._guardianCount, guardians.length); }); @@ -153,7 +153,7 @@ contract("RecoveryManager", (accounts) => { manager.relay( recoveryManager, "executeRecovery", - [wallet.contractAddress, newowner.address], + [wallet.contractAddress, newowner], wallet, [owner], ), expectedRevertMsg, @@ -166,7 +166,7 @@ contract("RecoveryManager", (accounts) => { manager.relay( recoveryManager, "executeRecovery", - [wallet.contractAddress, newowner.address], + [wallet.contractAddress, newowner], wallet, [owner, ...sortWalletByAddress(majority)], ), INVALID_SIGNATURES_REVERT_MSG, @@ -182,7 +182,7 @@ contract("RecoveryManager", (accounts) => { manager.relay( recoveryManager, "executeRecovery", - [wallet.contractAddress, newowner.address], + [wallet.contractAddress, newowner], wallet, sortWalletByAddress(minority), ), WRONG_SIGNATURE_NUMBER_REVERT_MSG, @@ -200,7 +200,7 @@ contract("RecoveryManager", (accounts) => { const isLocked = await lockManager.isLocked(wallet.contractAddress); assert.isFalse(isLocked, "should no longer be locked after finalization of recovery"); const walletOwner = await wallet.owner(); - assert.equal(walletOwner, newowner.address, "wallet owner should have been changed"); + assert.equal(walletOwner, newowner, "wallet owner should have been changed"); const recoveryConfig = await recoveryManager.getRecovery(wallet.contractAddress); assert.equal(recoveryConfig._address, ethers.constants.AddressZero); @@ -230,7 +230,7 @@ contract("RecoveryManager", (accounts) => { assert.isFalse(success); assert.equal(error, "RM: there must be an ongoing recovery"); const walletOwner = await wallet.owner(); - assert.equal(walletOwner, owner.address, "wallet owner should not have been changed"); + assert.equal(walletOwner, owner, "wallet owner should not have been changed"); const recoveryConfig = await recoveryManager.getRecovery(wallet.contractAddress); assert.equal(recoveryConfig._address, ethers.constants.AddressZero); @@ -248,7 +248,7 @@ contract("RecoveryManager", (accounts) => { assert.isFalse(success, "finalization should have failed"); assert.equal(error, "RM: there must be an ongoing recovery"); const walletOwner = await wallet.owner(); - assert.equal(walletOwner, owner.address, "wallet owner should not have been changed"); + assert.equal(walletOwner, owner, "wallet owner should not have been changed"); }); it("should not let 1 guardian cancel the recovery procedure", async () => { @@ -317,9 +317,9 @@ contract("RecoveryManager", (accounts) => { const majority = guardians.slice(0, Math.ceil((guardians.length) / 2)); await manager.relay(recoveryManager, "transferOwnership", - [wallet.contractAddress, newowner.address], wallet, [owner, ...sortWalletByAddress(majority)]); + [wallet.contractAddress, newowner], wallet, [owner, ...sortWalletByAddress(majority)]); const walletOwner = await wallet.owner(); - assert.equal(walletOwner, newowner.address, "owner should have been changed"); + assert.equal(walletOwner, newowner, "owner should have been changed"); }); it("should not let owner + minority of guardians execute an ownership transfer", async () => { @@ -328,14 +328,14 @@ contract("RecoveryManager", (accounts) => { manager.relay( recoveryManager, "transferOwnership", - [wallet.contractAddress, newowner.address], + [wallet.contractAddress, newowner], wallet, [owner, ...sortWalletByAddress(minority)], ), WRONG_SIGNATURE_NUMBER_REVERT_MSG, ); const walletOwner = await wallet.owner(); - assert.equal(walletOwner, owner.address, "owner should not have been changed"); + assert.equal(walletOwner, owner, "owner should not have been changed"); }); it("should not let majority of guardians execute an ownership transfer without owner", async () => { @@ -344,14 +344,14 @@ contract("RecoveryManager", (accounts) => { manager.relay( recoveryManager, "transferOwnership", - [wallet.contractAddress, newowner.address], + [wallet.contractAddress, newowner], wallet, [...sortWalletByAddress(majority)], ), WRONG_SIGNATURE_NUMBER_REVERT_MSG, ); const walletOwner = await wallet.owner(); - assert.equal(walletOwner, owner.address, "owner should not have been changed"); + assert.equal(walletOwner, owner, "owner should not have been changed"); }); } @@ -372,7 +372,7 @@ contract("RecoveryManager", (accounts) => { await assert.revertWith(manager.relay( recoveryManager, "executeRecovery", - [wallet.contractAddress, newowner.address], + [wallet.contractAddress, newowner], wallet, noGuardians, ), "RM: no guardians set on wallet"); @@ -381,7 +381,7 @@ contract("RecoveryManager", (accounts) => { assert.isFalse(isLocked, "should not be locked by recovery"); const walletOwner = await wallet.owner(); - assert.equal(walletOwner, owner.address, "owner should have not changed"); + assert.equal(walletOwner, owner, "owner should have not changed"); }); describe("EOA Guardians: G = 2", () => { @@ -405,7 +405,7 @@ contract("RecoveryManager", (accounts) => { manager.relay( recoveryManager, "executeRecovery", - [wallet.contractAddress, newowner.address], + [wallet.contractAddress, newowner], wallet, [...sortWalletByAddress(badMajority)], ), INVALID_SIGNATURES_REVERT_MSG, @@ -448,7 +448,7 @@ contract("RecoveryManager", (accounts) => { it("should not be able to call ExecuteRecovery with a guardian address", async () => { const txReceipt = await manager.relay(recoveryManager, "executeRecovery", - [wallet.contractAddress, guardian1.address], wallet, [guardian1]); + [wallet.contractAddress, guardian1], wallet, [guardian1]); const { success, error } = parseRelayReceipt(txReceipt); assert.isFalse(success, "executeRecovery should fail"); assert.equal(error, "RM: new owner address cannot be a guardian"); @@ -456,7 +456,7 @@ contract("RecoveryManager", (accounts) => { it("should not be able to call ExecuteRecovery if already in the process of Recovery", async () => { await manager.relay(recoveryManager, "executeRecovery", - [wallet.contractAddress, newowner.address], wallet, sortWalletByAddress([guardian1])); + [wallet.contractAddress, newowner], wallet, sortWalletByAddress([guardian1])); const txReceipt = await manager.relay(recoveryManager, "executeRecovery", [wallet.contractAddress, ethers.constants.AddressZero], wallet, [guardian1]); @@ -510,7 +510,7 @@ contract("RecoveryManager", (accounts) => { await manager.relay( recoveryManager, "executeRecovery", - [wallet.contractAddress, newowner.address], + [wallet.contractAddress, newowner], wallet, sortWalletByAddress([guardian1, guardian2]), ); @@ -526,7 +526,7 @@ contract("RecoveryManager", (accounts) => { await manager.relay( recoveryManager, "executeRecovery", - [wallet.contractAddress, newowner.address], + [wallet.contractAddress, newowner], wallet, sortWalletByAddress([guardian1, guardian2]), ); @@ -540,7 +540,7 @@ contract("RecoveryManager", (accounts) => { await manager.relay( recoveryManager, "executeRecovery", - [wallet.contractAddress, newowner.address], + [wallet.contractAddress, newowner], wallet, sortWalletByAddress([guardian1, guardian2]), ); @@ -568,7 +568,7 @@ contract("RecoveryManager", (accounts) => { const txReceipt = await manager.relay( recoveryManager, "transferOwnership", - [wallet.contractAddress, guardian1.address], wallet, [owner, guardian1], + [wallet.contractAddress, guardian1], wallet, [owner, guardian1], ); const { success, error } = parseRelayReceipt(txReceipt); assert.isFalse(success, "transferOwnership should fail"); @@ -579,7 +579,7 @@ contract("RecoveryManager", (accounts) => { const txReceipt = await manager.relay( recoveryManager, "transferOwnership", - [wallet.contractAddress, newowner.address], + [wallet.contractAddress, newowner], wallet, [owner], ); @@ -593,7 +593,7 @@ contract("RecoveryManager", (accounts) => { manager.relay( recoveryManager, "transferOwnership", - [wallet.contractAddress, newowner.address], + [wallet.contractAddress, newowner], wallet, [nonowner, guardian1], ), INVALID_SIGNATURES_REVERT_MSG, @@ -606,7 +606,7 @@ contract("RecoveryManager", (accounts) => { manager.relay( recoveryManager, "transferOwnership", - [wallet.contractAddress, newowner.address], + [wallet.contractAddress, newowner], wallet, [owner, owner], ), INVALID_SIGNATURES_REVERT_MSG, @@ -619,7 +619,7 @@ contract("RecoveryManager", (accounts) => { manager.relay( recoveryManager, "transferOwnership", - [wallet.contractAddress, newowner.address], + [wallet.contractAddress, newowner], wallet, [owner, guardian1, guardian1], ), INVALID_SIGNATURES_REVERT_MSG, @@ -632,7 +632,7 @@ contract("RecoveryManager", (accounts) => { manager.relay( recoveryManager, "transferOwnership", - [wallet.contractAddress, newowner.address], + [wallet.contractAddress, newowner], wallet, [owner, nonowner], ), INVALID_SIGNATURES_REVERT_MSG, diff --git a/test/relayer.js b/test/relayer.js index bfbdd1f72..33950cf49 100644 --- a/test/relayer.js +++ b/test/relayer.js @@ -38,10 +38,10 @@ contract("RelayerManager", (accounts) => { let { getNonceForRelay } = manager; getNonceForRelay = getNonceForRelay.bind(manager); - const infrastructure = accounts[0].signer; - const owner = accounts[1].signer; - const recipient = accounts[3].signer; - const guardian = accounts[4].signer; + const infrastructure = accounts[0]; + const owner = accounts[1]; + const recipient = accounts[3]; + const guardian = accounts[4]; let registry; let guardianStorage; @@ -79,7 +79,7 @@ contract("RelayerManager", (accounts) => { limitStorage.contractAddress); tokenPriceRegistry = await deployer.deploy(TokenPriceRegistry); - await tokenPriceRegistry.addManager(infrastructure.address); + await tokenPriceRegistry.addManager(infrastructure); relayerManager = await deployer.deploy(RelayerManager, {}, lockStorage.contractAddress, guardianStorage.contractAddress, @@ -131,7 +131,7 @@ contract("RelayerManager", (accounts) => { ], []); } - await wallet.init(owner.address, [versionManager.contractAddress]); + await wallet.init(owner, [versionManager.contractAddress]); await versionManager.from(owner).upgradeWallet(wallet.contractAddress, await versionManager.lastVersion()); }); @@ -153,7 +153,7 @@ contract("RelayerManager", (accounts) => { it("should fail when the RelayerManager is not authorised", async () => { await versionManager.addVersion([testFeature.contractAddress], []); const wrongWallet = await deployer.deploy(BaseWallet); - await wrongWallet.init(owner.address, [versionManager.contractAddress]); + await wrongWallet.init(owner, [versionManager.contractAddress]); await versionManager.from(owner).upgradeWallet(wrongWallet.contractAddress, await versionManager.lastVersion()); const params = [wrongWallet.contractAddress, 2]; const txReceipt = await manager.relay(testFeature, "setIntOwnerOnly", params, wrongWallet, [owner]); @@ -173,7 +173,7 @@ contract("RelayerManager", (accounts) => { }); it("should fail when the first param is not the wallet ", async () => { - const params = [owner.address, 4]; + const params = [owner, 4]; await assert.revertWith( manager.relay(testFeature, "setIntOwnerOnly", params, wallet, [owner]), INVALID_WALLET_REVERT_MSG, ); @@ -189,7 +189,7 @@ contract("RelayerManager", (accounts) => { params, wallet, [owner], - accounts[9].signer, + accounts[9], false, gasLimit, nonce, @@ -210,7 +210,7 @@ contract("RelayerManager", (accounts) => { const params = [wallet.contractAddress, 2]; const nonce = await getNonceForRelay(); const relayParams = [testFeature, "setIntOwnerOnly", params, wallet, [owner], - accounts[9].signer, false, 2000000, nonce]; + accounts[9], false, 2000000, nonce]; await manager.relay(...relayParams); await assert.revertWith( manager.relay(...relayParams), DUPLICATE_REQUEST_REVERT_MSG, @@ -240,7 +240,7 @@ contract("RelayerManager", (accounts) => { it("should update the nonce after the transaction", async () => { const nonce = await getNonceForRelay(); await manager.relay(testFeature, "setIntOwnerOnly", [wallet.contractAddress, 2], wallet, [owner], - accounts[9].signer, false, 2000000, nonce); + accounts[9], false, 2000000, nonce); const updatedNonce = await relayerManager.getNonce(wallet.contractAddress); const updatedNonceHex = await ethers.utils.hexZeroPad(updatedNonce.toHexString(), 32); @@ -253,7 +253,7 @@ contract("RelayerManager", (accounts) => { beforeEach(async () => { const decimals = 12; // number of decimal for TOKN contract const tokenRate = new BN(10).pow(new BN(19)).muln(51); // 1 TOKN = 0.00051 ETH = 0.00051*10^18 ETH wei => *10^(18-decimals) = 0.00051*10^18 * 10^6 = 0.00051*10^24 = 51*10^19 - erc20 = await deployer.deploy(ERC20, {}, [infrastructure.address], 10000000, decimals); // TOKN contract with 10M tokens (10M TOKN for account[0]) + erc20 = await deployer.deploy(ERC20, {}, [infrastructure], 10000000, decimals); // TOKN contract with 10M tokens (10M TOKN for account[0]) await tokenPriceRegistry.setPriceForTokenList([erc20.contractAddress], [tokenRate.toString()]); await limitFeature.setLimitAndDailySpent(wallet.contractAddress, 10000000000, 0); }); @@ -275,13 +275,13 @@ contract("RelayerManager", (accounts) => { [wallet.contractAddress, 2], wallet, [owner], - accounts[9].signer, + accounts[9], false, 2000000, nonce, 10, refundToken, - recipient.address]; + recipient]; const txReceipt = await manager.relay(...relayParams); return txReceipt; } @@ -293,10 +293,10 @@ contract("RelayerManager", (accounts) => { it("should refund in ETH", async () => { await provisionFunds(ethers.BigNumber.from("100000000000000"), 0); const wBalanceStart = await deployer.provider.getBalance(wallet.contractAddress); - const rBalanceStart = await deployer.provider.getBalance(recipient.address); + const rBalanceStart = await deployer.provider.getBalance(recipient); await callAndRefund({ refundToken: ETH_TOKEN }); const wBalanceEnd = await deployer.provider.getBalance(wallet.contractAddress); - const rBalanceEnd = await deployer.provider.getBalance(recipient.address); + const rBalanceEnd = await deployer.provider.getBalance(recipient); const refund = wBalanceStart.sub(wBalanceEnd); assert.isTrue(refund.gt(0), "should have refunded ETH"); assert.isTrue(refund.eq(rBalanceEnd.sub(rBalanceStart)), "should have refunded the recipient"); @@ -305,10 +305,10 @@ contract("RelayerManager", (accounts) => { it("should refund in ERC20", async () => { await provisionFunds(0, ethers.BigNumber.from("100000000000000")); const wBalanceStart = await erc20.balanceOf(wallet.contractAddress); - const rBalanceStart = await erc20.balanceOf(recipient.address); + const rBalanceStart = await erc20.balanceOf(recipient); await callAndRefund({ refundToken: erc20.contractAddress }); const wBalanceEnd = await erc20.balanceOf(wallet.contractAddress); - const rBalanceEnd = await erc20.balanceOf(recipient.address); + const rBalanceEnd = await erc20.balanceOf(recipient); const refund = wBalanceStart.sub(wBalanceEnd); assert.isTrue(refund.gt(0), "should have refunded ERC20"); assert.isTrue(refund.eq(rBalanceEnd.sub(rBalanceStart)), "should have refunded the recipient"); @@ -346,11 +346,11 @@ contract("RelayerManager", (accounts) => { await setLimitAndDailySpent({ limit: 1000000000, alreadySpent: 10 }); let dailySpent = await limitFeature.getDailySpent(wallet.contractAddress); assert.isTrue(dailySpent.toNumber() === 10, "initial daily spent should be 10"); - const rBalanceStart = await deployer.provider.getBalance(recipient.address); + const rBalanceStart = await deployer.provider.getBalance(recipient); // add a guardian - await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardian.address); + await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardian); // call approvedTransfer - const params = [wallet.contractAddress, ETH_TOKEN, recipient.address, 1000, ethers.constants.HashZero]; + const params = [wallet.contractAddress, ETH_TOKEN, recipient, 1000, ethers.constants.HashZero]; const nonce = await getNonceForRelay(); const gasLimit = 2000000; const relayParams = [ @@ -359,7 +359,7 @@ contract("RelayerManager", (accounts) => { params, wallet, [owner, guardian], - accounts[9].signer, + accounts[9], false, gasLimit, nonce, @@ -370,7 +370,7 @@ contract("RelayerManager", (accounts) => { await manager.relay(...relayParams); dailySpent = await limitFeature.getDailySpent(wallet.contractAddress); assert.isTrue(dailySpent.toNumber() === 0, "daily spent should be reset"); - const rBalanceEnd = await deployer.provider.getBalance(recipient.address); + const rBalanceEnd = await deployer.provider.getBalance(recipient); assert.isTrue(rBalanceEnd.gt(rBalanceStart), "should have refunded the recipient"); }); diff --git a/test/simpleUpgrader.js b/test/simpleUpgrader.js index 491c380d4..98a423604 100644 --- a/test/simpleUpgrader.js +++ b/test/simpleUpgrader.js @@ -21,7 +21,7 @@ const TestManager = artifacts.require("test-manager"); contract("SimpleUpgrader", (accounts) => { const manager = new TestManager(); - const owner = accounts[1].signer; + const owner = accounts[1]; let deployer; let registry; let guardianStorage; @@ -83,7 +83,7 @@ contract("SimpleUpgrader", (accounts) => { await registry.registerModule(initialModule.contractAddress, formatBytes32String("initial")); await registry.registerModule(moduleToAdd.contractAddress, formatBytes32String("added")); - await wallet.init(owner.address, [initialModule.contractAddress]); + await wallet.init(owner, [initialModule.contractAddress]); await initialModule.from(owner).upgradeWallet(wallet.contractAddress, await initialModule.lastVersion()); let isAuthorised = await wallet.authorised(initialModule.contractAddress); assert.equal(isAuthorised, true, "initial module should be authorised"); @@ -101,7 +101,7 @@ contract("SimpleUpgrader", (accounts) => { // register initial module only await registry.registerModule(initialModule.contractAddress, formatBytes32String("initial")); - await wallet.init(owner.address, [initialModule.contractAddress]); + await wallet.init(owner, [initialModule.contractAddress]); await initialModule.from(owner).upgradeWallet(wallet.contractAddress, await initialModule.lastVersion()); let isAuthorised = await wallet.authorised(initialModule.contractAddress); assert.equal(isAuthorised, true, "initial module should be authorised"); @@ -117,7 +117,7 @@ contract("SimpleUpgrader", (accounts) => { // register module V1 await registry.registerModule(moduleV1.contractAddress, formatBytes32String("V1")); - await wallet.init(owner.address, [moduleV1.contractAddress]); + await wallet.init(owner, [moduleV1.contractAddress]); await moduleV1.from(owner).upgradeWallet(wallet.contractAddress, await moduleV1.lastVersion()); // create module V2 const { module: moduleV2 } = await deployTestModule(); @@ -155,7 +155,7 @@ contract("SimpleUpgrader", (accounts) => { // create wallet with module V1 and relayer feature const proxy = await deployer.deploy(Proxy, {}, walletImplementation.contractAddress); wallet = deployer.wrapDeployedContract(BaseWallet, proxy.contractAddress); - await wallet.init(owner.address, [moduleV1.contractAddress]); + await wallet.init(owner, [moduleV1.contractAddress]); await moduleV1.from(owner).upgradeWallet(wallet.contractAddress, await moduleV1.lastVersion()); // create module V2 @@ -235,8 +235,8 @@ contract("SimpleUpgrader", (accounts) => { let lockManager; let recoveryManager; let moduleV2; - const guardian = accounts[2].signer; - const newowner = accounts[3].signer; + const guardian = accounts[2]; + const newowner = accounts[3]; beforeEach(async () => { // Setup the module for wallet @@ -276,9 +276,9 @@ contract("SimpleUpgrader", (accounts) => { recoveryManager.contractAddress, relayerManager.contractAddress, ], []); - await wallet.init(owner.address, [versionManager.contractAddress]); + await wallet.init(owner, [versionManager.contractAddress]); await versionManager.from(owner).upgradeWallet(wallet.contractAddress, await versionManager.lastVersion()); - await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardian.address); + await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardian); // Setup module v2 for the upgrade const { module } = await deployTestModule(); @@ -319,7 +319,7 @@ contract("SimpleUpgrader", (accounts) => { await registry.registerModule(upgrader.contractAddress, formatBytes32String("V1toV2")); // Put the wallet under recovery - await manager.relay(recoveryManager, "executeRecovery", [wallet.contractAddress, newowner.address], wallet, [guardian]); + await manager.relay(recoveryManager, "executeRecovery", [wallet.contractAddress, newowner], wallet, [guardian]); // check that the wallet is locked let locked = await lockManager.isLocked(wallet.contractAddress); assert.isTrue(locked, "wallet should be locked"); diff --git a/test/tokenExchanger.js b/test/tokenExchanger.js index 411141f80..072042357 100644 --- a/test/tokenExchanger.js +++ b/test/tokenExchanger.js @@ -25,7 +25,7 @@ const ModuleRegistry = artifacts.require("ModuleRegistry"); const DexRegistry = artifacts.require("DexRegistry"); const Proxy = artifacts.require("Proxy"); const BaseWallet = artifacts.require("BaseWallet"); -const OldWallet = artifacts.require("../build-legacy/v1.3.0/BaseWallet"); +const OldWallet = require("../build-legacy/v1.3.0/BaseWallet"); const GuardianStorage = artifacts.require("GuardianStorage"); const LockStorage = artifacts.require("LockStorage"); const TokenExchanger = artifacts.require("TokenExchanger"); @@ -50,8 +50,8 @@ const TOKEN_B_RATE = parseEther("0.03"); contract("TokenExchanger", (accounts) => { const manager = new TestManager(); - const infrastructure = accounts[0].signer; - const owner = accounts[1].signer; + const infrastructure = accounts[0]; + const owner = accounts[1]; let deployer; let lockStorage; @@ -97,8 +97,8 @@ contract("TokenExchanger", (accounts) => { manager.setRelayerManager(relayerManager); // Deploy test tokens - tokenA = await deployer.deploy(ERC20, {}, [infrastructure.address], parseEther("1000"), DECIMALS); - tokenB = await deployer.deploy(ERC20, {}, [infrastructure.address], parseEther("1000"), DECIMALS); + tokenA = await deployer.deploy(ERC20, {}, [infrastructure], parseEther("1000"), DECIMALS); + tokenB = await deployer.deploy(ERC20, {}, [infrastructure], parseEther("1000"), DECIMALS); // Deploy and fund Kyber kyberNetwork = await deployer.deploy(KyberNetwork); @@ -122,7 +122,7 @@ contract("TokenExchanger", (accounts) => { parseEther("600"), 1, 1, - infrastructure.address, + infrastructure, timestamp + 300, ); @@ -134,12 +134,12 @@ contract("TokenExchanger", (accounts) => { AugustusSwapper, {}, whitelist.contractAddress, - infrastructure.address, + infrastructure, partnerRegistry.contractAddress, - infrastructure.address, - infrastructure.address, + infrastructure, + infrastructure, ); - kyberAdapter = await deployer.deploy(Kyber, {}, infrastructure.address); + kyberAdapter = await deployer.deploy(Kyber, {}, infrastructure); uniswapV2Adapter = await deployer.deploy(UniswapV2, {}, weth.contractAddress); await whitelist.addWhitelisted(kyberAdapter.contractAddress); await whitelist.addWhitelisted(uniswapV2Adapter.contractAddress); @@ -188,7 +188,7 @@ contract("TokenExchanger", (accounts) => { // create wallet const proxy = await deployer.deploy(Proxy, {}, walletImplementation.contractAddress); wallet = deployer.wrapDeployedContract(BaseWallet, proxy.contractAddress); - await wallet.init(owner.address, [versionManager.contractAddress]); + await wallet.init(owner, [versionManager.contractAddress]); await versionManager.from(owner).upgradeWallet(wallet.contractAddress, await versionManager.lastVersion()); // fund wallet @@ -398,7 +398,7 @@ contract("TokenExchanger", (accounts) => { const oldWalletImplementation = await deployer.deploy(OldWallet); const proxy = await deployer.deploy(Proxy, {}, oldWalletImplementation.contractAddress); const oldWallet = deployer.wrapDeployedContract(OldWallet, proxy.contractAddress); - await oldWallet.init(owner.address, [versionManager.contractAddress]); + await oldWallet.init(owner, [versionManager.contractAddress]); await versionManager.from(owner).upgradeWallet(oldWallet.contractAddress, await versionManager.lastVersion()); // fund wallet await infrastructure.sendTransaction({ to: oldWallet.contractAddress, value: parseEther("0.1") }); diff --git a/test/tokenPriceRegistry.js b/test/tokenPriceRegistry.js index e59a1c4f5..2b752198d 100644 --- a/test/tokenPriceRegistry.js +++ b/test/tokenPriceRegistry.js @@ -20,7 +20,7 @@ describe("TokenPriceRegistry", function () { beforeEach(async () => { tokenPriceRegistry = await deployer.deploy(TokenPriceRegistry); - await tokenPriceRegistry.addManager(manager.address); + await tokenPriceRegistry.addManager(manager); await tokenPriceRegistry.setMinPriceUpdatePeriod(3600); }); diff --git a/test/transferManager.js b/test/transferManager.js index 3dcc85b29..04fe14dd4 100644 --- a/test/transferManager.js +++ b/test/transferManager.js @@ -40,11 +40,11 @@ const TestManager = require("../utils/test-manager"); contract("TransferManager", (accounts) => { const manager = new TestManager(); - const infrastructure = accounts[0].signer; - const owner = accounts[1].signer; - const nonowner = accounts[2].signer; - const recipient = accounts[3].signer; - const spender = accounts[4].signer; + const infrastructure = accounts[0]; + const owner = accounts[1]; + const nonowner = accounts[2]; + const recipient = accounts[3]; + const spender = accounts[4]; let deployer; let priceProvider; @@ -67,14 +67,14 @@ contract("TransferManager", (accounts) => { weth = await deployer.deploy(WETH); const registry = await deployer.deploy(Registry); priceProvider = await deployer.deploy(LegacyTokenPriceProvider, {}, ethers.constants.AddressZero); - await priceProvider.addManager(infrastructure.address); + await priceProvider.addManager(infrastructure); transferStorage = await deployer.deploy(TransferStorage); lockStorage = await deployer.deploy(LockStorage); guardianStorage = await deployer.deploy(GuardianStorage); limitStorage = await deployer.deploy(LimitStorage); tokenPriceRegistry = await deployer.deploy(TokenPriceRegistry); - await tokenPriceRegistry.addManager(infrastructure.address); + await tokenPriceRegistry.addManager(infrastructure); versionManager = await deployer.deploy(VersionManager, {}, registry.contractAddress, lockStorage.contractAddress, @@ -122,13 +122,13 @@ contract("TransferManager", (accounts) => { beforeEach(async () => { const proxy = await deployer.deploy(Proxy, {}, walletImplementation.contractAddress); wallet = deployer.wrapDeployedContract(BaseWallet, proxy.contractAddress); - await wallet.init(owner.address, [versionManager.contractAddress]); + await wallet.init(owner, [versionManager.contractAddress]); await versionManager.from(owner).upgradeWallet(wallet.contractAddress, await versionManager.lastVersion()); const decimals = 12; // number of decimal for TOKN contract const tokenRate = new BN(10).pow(new BN(19)).muln(51); // 1 TOKN = 0.00051 ETH = 0.00051*10^18 ETH wei => *10^(18-decimals) = 0.00051*10^18 * 10^6 = 0.00051*10^24 = 51*10^19 - erc20 = await deployer.deploy(ERC20, {}, [infrastructure.address, wallet.contractAddress], 10000000, decimals); // TOKN contract with 10M tokens (5M TOKN for wallet and 5M TOKN for account[0]) + erc20 = await deployer.deploy(ERC20, {}, [infrastructure, wallet.contractAddress], 10000000, decimals); // TOKN contract with 10M tokens (5M TOKN for wallet and 5M TOKN for account[0]) await tokenPriceRegistry.setPriceForTokenList([erc20.contractAddress], [tokenRate.toString()]); await infrastructure.sendTransaction({ to: wallet.contractAddress, value: ethers.BigNumber.from("1000000000000000000") }); }); @@ -158,7 +158,7 @@ contract("TransferManager", (accounts) => { await versionManager.addVersion([transferManager1.contractAddress], [transferManager1.contractAddress]); const proxy = await deployer.deploy(Proxy, {}, walletImplementation.contractAddress); const existingWallet = deployer.wrapDeployedContract(BaseWallet, proxy.contractAddress); - await existingWallet.init(owner.address, [versionManager.contractAddress]); + await existingWallet.init(owner, [versionManager.contractAddress]); await versionManager.from(owner).upgradeWallet(existingWallet.contractAddress, await versionManager.lastVersion()); const defautlimit = await transferManager1.defaultLimit(); @@ -172,31 +172,31 @@ contract("TransferManager", (accounts) => { describe("Managing the whitelist", () => { it("should add/remove an account to/from the whitelist", async () => { - await transferManager.from(owner).addToWhitelist(wallet.contractAddress, recipient.address); - let isTrusted = await transferManager.isWhitelisted(wallet.contractAddress, recipient.address); + await transferManager.from(owner).addToWhitelist(wallet.contractAddress, recipient); + let isTrusted = await transferManager.isWhitelisted(wallet.contractAddress, recipient); assert.equal(isTrusted, false, "should not be trusted during the security period"); await manager.increaseTime(3); - isTrusted = await transferManager.isWhitelisted(wallet.contractAddress, recipient.address); + isTrusted = await transferManager.isWhitelisted(wallet.contractAddress, recipient); assert.equal(isTrusted, true, "should be trusted after the security period"); - await transferManager.from(owner).removeFromWhitelist(wallet.contractAddress, recipient.address); - isTrusted = await transferManager.isWhitelisted(wallet.contractAddress, recipient.address); + await transferManager.from(owner).removeFromWhitelist(wallet.contractAddress, recipient); + isTrusted = await transferManager.isWhitelisted(wallet.contractAddress, recipient); assert.equal(isTrusted, false, "should no removed from whitelist immediately"); }); it("should not be able to whitelist a token twice", async () => { - await transferManager.from(owner).addToWhitelist(wallet.contractAddress, recipient.address); + await transferManager.from(owner).addToWhitelist(wallet.contractAddress, recipient); await manager.increaseTime(3); await assert.revertWith( - transferManager.from(owner).addToWhitelist(wallet.contractAddress, recipient.address), "TT: target already whitelisted", + transferManager.from(owner).addToWhitelist(wallet.contractAddress, recipient), "TT: target already whitelisted", ); }); it("should be able to remove a whitelisted token from the whitelist during the security period", async () => { - await transferManager.from(owner).addToWhitelist(wallet.contractAddress, recipient.address); - await transferManager.from(owner).removeFromWhitelist(wallet.contractAddress, recipient.address); + await transferManager.from(owner).addToWhitelist(wallet.contractAddress, recipient); + await transferManager.from(owner).removeFromWhitelist(wallet.contractAddress, recipient); await manager.increaseTime(3); - const isTrusted = await transferManager.isWhitelisted(wallet.contractAddress, recipient.address); + const isTrusted = await transferManager.isWhitelisted(wallet.contractAddress, recipient); assert.equal(isTrusted, false); }); }); @@ -207,9 +207,9 @@ contract("TransferManager", (accounts) => { let erc20ZeroDecimals; beforeEach(async () => { - erc20First = await deployer.deploy(ERC20, {}, [infrastructure.address], 10000000, 18); - erc20Second = await deployer.deploy(ERC20, {}, [infrastructure.address], 10000000, 18); - erc20ZeroDecimals = await deployer.deploy(ERC20, {}, [infrastructure.address], 10000000, 0); + erc20First = await deployer.deploy(ERC20, {}, [infrastructure], 10000000, 18); + erc20Second = await deployer.deploy(ERC20, {}, [infrastructure], 10000000, 18); + erc20ZeroDecimals = await deployer.deploy(ERC20, {}, [infrastructure], 10000000, 0); }); it("should get a token price correctly", async () => { @@ -272,7 +272,7 @@ contract("TransferManager", (accounts) => { const proxy = await deployer.deploy(Proxy, {}, walletImplementation.contractAddress); const existingWallet = deployer.wrapDeployedContract(BaseWallet, proxy.contractAddress); - await existingWallet.init(owner.address, [previousTransferManager.contractAddress]); + await existingWallet.init(owner, [previousTransferManager.contractAddress]); await infrastructure.sendTransaction({ to: existingWallet.contractAddress, value: ethers.BigNumber.from("100000000") }); // change the limit await previousTransferManager.from(owner).changeLimit(existingWallet.contractAddress, 4000000); @@ -280,7 +280,7 @@ contract("TransferManager", (accounts) => { let limit = await previousTransferManager.getCurrentLimit(existingWallet.contractAddress); assert.equal(limit.toNumber(), 4000000, "limit should be changed"); // transfer some funds - await previousTransferManager.from(owner).transferToken(existingWallet.contractAddress, ETH_TOKEN, recipient.address, 1000000, ZERO_BYTES32); + await previousTransferManager.from(owner).transferToken(existingWallet.contractAddress, ETH_TOKEN, recipient, 1000000, ZERO_BYTES32); // add new module await previousTransferManager.from(owner).addModule(existingWallet.contractAddress, versionManager.contractAddress); const tx = await versionManager.from(owner).upgradeWallet(existingWallet.contractAddress, await versionManager.lastVersion()); @@ -345,7 +345,7 @@ contract("TransferManager", (accounts) => { it("should return the correct unspent daily limit amount", async () => { await infrastructure.sendTransaction({ to: wallet.contractAddress, value: ethers.BigNumber.from(ETH_LIMIT) }); const transferAmount = ETH_LIMIT - 100; - await transferManager.from(owner).transferToken(wallet.contractAddress, ETH_TOKEN, recipient.address, transferAmount, ZERO_BYTES32); + await transferManager.from(owner).transferToken(wallet.contractAddress, ETH_TOKEN, recipient, transferAmount, ZERO_BYTES32); const { _unspent } = await transferManager.getDailyUnspent(wallet.contractAddress); assert.equal(_unspent.toNumber(), 100); }); @@ -353,11 +353,11 @@ contract("TransferManager", (accounts) => { it("should return the correct spent daily limit amount", async () => { await infrastructure.sendTransaction({ to: wallet.contractAddress, value: ethers.BigNumber.from(ETH_LIMIT) }); // Transfer 100 wei - const tx = await transferManager.from(owner).transferToken(wallet.contractAddress, ETH_TOKEN, recipient.address, 100, ZERO_BYTES32); + const tx = await transferManager.from(owner).transferToken(wallet.contractAddress, ETH_TOKEN, recipient, 100, ZERO_BYTES32); const txReceipt = await transferManager.verboseWaitForTransaction(tx); const timestamp = await manager.getTimestamp(txReceipt.block); // Then transfer 200 wei more - await transferManager.from(owner).transferToken(wallet.contractAddress, ETH_TOKEN, recipient.address, 200, ZERO_BYTES32); + await transferManager.from(owner).transferToken(wallet.contractAddress, ETH_TOKEN, recipient, 200, ZERO_BYTES32); const dailySpent = await limitStorage.getDailySpent(wallet.contractAddress); assert.equal(dailySpent[0].toNumber(), 300); @@ -366,7 +366,7 @@ contract("TransferManager", (accounts) => { it("should return 0 if the entire daily limit amount has been spent", async () => { await infrastructure.sendTransaction({ to: wallet.contractAddress, value: ethers.BigNumber.from(ETH_LIMIT) }); - await transferManager.from(owner).transferToken(wallet.contractAddress, ETH_TOKEN, recipient.address, ETH_LIMIT, ZERO_BYTES32); + await transferManager.from(owner).transferToken(wallet.contractAddress, ETH_TOKEN, recipient, ETH_LIMIT, ZERO_BYTES32); const { _unspent } = await transferManager.getDailyUnspent(wallet.contractAddress); assert.equal(_unspent.toNumber(), 0); }); @@ -376,9 +376,9 @@ contract("TransferManager", (accounts) => { async function doDirectTransfer({ token, signer = owner, to, amount, relayed = false, }) { - const fundsBefore = (token === ETH_TOKEN ? await deployer.provider.getBalance(to.address) : await token.balanceOf(to.address)); + const fundsBefore = (token === ETH_TOKEN ? await deployer.provider.getBalance(to) : await token.balanceOf(to)); const unspentBefore = await transferManager.getDailyUnspent(wallet.contractAddress); - const params = [wallet.contractAddress, token === ETH_TOKEN ? ETH_TOKEN : token.contractAddress, to.address, amount, ZERO_BYTES32]; + const params = [wallet.contractAddress, token === ETH_TOKEN ? ETH_TOKEN : token.contractAddress, to, amount, ZERO_BYTES32]; let txReceipt; if (relayed) { txReceipt = await manager.relay(transferManager, "transferToken", params, wallet, [signer]); @@ -387,7 +387,7 @@ contract("TransferManager", (accounts) => { txReceipt = await transferManager.verboseWaitForTransaction(tx); } assert.isTrue(await utils.hasEvent(txReceipt, transferManager, "Transfer"), "should have generated Transfer event"); - const fundsAfter = (token === ETH_TOKEN ? await deployer.provider.getBalance(to.address) : await token.balanceOf(to.address)); + const fundsAfter = (token === ETH_TOKEN ? await deployer.provider.getBalance(to) : await token.balanceOf(to)); const unspentAfter = await transferManager.getDailyUnspent(wallet.contractAddress); assert.equal(fundsAfter.sub(fundsBefore).toNumber(), amount, "should have transfered amount"); const ethValue = (token === ETH_TOKEN ? amount : (await getEtherValue(amount, token.contractAddress)).toNumber()); @@ -401,8 +401,8 @@ contract("TransferManager", (accounts) => { token, to, amount, delay, relayed = false, }) { const tokenAddress = token === ETH_TOKEN ? ETH_TOKEN : token.contractAddress; - const fundsBefore = (token === ETH_TOKEN ? await deployer.provider.getBalance(to.address) : await token.balanceOf(to.address)); - const params = [wallet.contractAddress, tokenAddress, to.address, amount, ZERO_BYTES32]; + const fundsBefore = (token === ETH_TOKEN ? await deployer.provider.getBalance(to) : await token.balanceOf(to)); + const params = [wallet.contractAddress, tokenAddress, to, amount, ZERO_BYTES32]; let txReceipt; let tx; if (relayed) { @@ -412,20 +412,20 @@ contract("TransferManager", (accounts) => { txReceipt = await transferManager.verboseWaitForTransaction(tx); } assert.isTrue(await utils.hasEvent(txReceipt, transferManager, "PendingTransferCreated"), "should have generated PendingTransferCreated event"); - let fundsAfter = (token === ETH_TOKEN ? await deployer.provider.getBalance(to.address) : await token.balanceOf(to.address)); + let fundsAfter = (token === ETH_TOKEN ? await deployer.provider.getBalance(to) : await token.balanceOf(to)); assert.equal(fundsAfter.sub(fundsBefore).toNumber(), 0, "should not have transfered amount"); if (delay === 0) { const id = ethers.utils.solidityKeccak256(["uint8", "address", "address", "uint256", "bytes", "uint256"], - [ACTION_TRANSFER, tokenAddress, recipient.address, amount, ZERO_BYTES32, txReceipt.blockNumber]); + [ACTION_TRANSFER, tokenAddress, recipient, amount, ZERO_BYTES32, txReceipt.blockNumber]); return id; } await manager.increaseTime(delay); tx = await transferManager.executePendingTransfer(wallet.contractAddress, - tokenAddress, recipient.address, amount, ZERO_BYTES32, txReceipt.blockNumber); + tokenAddress, recipient, amount, ZERO_BYTES32, txReceipt.blockNumber); txReceipt = await transferManager.verboseWaitForTransaction(tx); assert.isTrue(await utils.hasEvent(txReceipt, transferManager, "PendingTransferExecuted"), "should have generated PendingTransferExecuted event"); - fundsAfter = (token === ETH_TOKEN ? await deployer.provider.getBalance(to.address) : await token.balanceOf(to.address)); + fundsAfter = (token === ETH_TOKEN ? await deployer.provider.getBalance(to) : await token.balanceOf(to)); return assert.equal(fundsAfter.sub(fundsBefore).toNumber(), amount, "should have transfered amount"); } @@ -571,13 +571,13 @@ contract("TransferManager", (accounts) => { }); it("should send immediately ETH to a whitelisted address", async () => { - await transferManager.from(owner).addToWhitelist(wallet.contractAddress, recipient.address); + await transferManager.from(owner).addToWhitelist(wallet.contractAddress, recipient); await manager.increaseTime(3); await doDirectTransfer({ token: ETH_TOKEN, to: recipient, amount: ETH_LIMIT * 2 }); }); it("should send immediately ERC20 to a whitelisted address", async () => { - await transferManager.from(owner).addToWhitelist(wallet.contractAddress, recipient.address); + await transferManager.from(owner).addToWhitelist(wallet.contractAddress, recipient); await manager.increaseTime(3); await doDirectTransfer({ token: erc20, to: recipient, amount: ETH_LIMIT * 2 }); }); @@ -587,7 +587,7 @@ contract("TransferManager", (accounts) => { describe("Token Approvals", () => { async function doDirectApprove({ signer = owner, amount, relayed = false }) { const unspentBefore = await transferManager.getDailyUnspent(wallet.contractAddress); - const params = [wallet.contractAddress, erc20.contractAddress, spender.address, amount]; + const params = [wallet.contractAddress, erc20.contractAddress, spender, amount]; let txReceipt; if (relayed) { txReceipt = await manager.relay(transferManager, "approveToken", params, wallet, [signer]); @@ -602,7 +602,7 @@ contract("TransferManager", (accounts) => { if (amountInEth < ETH_LIMIT) { assert.equal(unspentBefore[0].sub(unspentAfter[0]).toNumber(), amountInEth, "should have updated the daily limit"); } - const approval = await erc20.allowance(wallet.contractAddress, spender.address); + const approval = await erc20.allowance(wallet.contractAddress, spender); assert.equal(approval.toNumber(), amount, "should have approved the amount"); return txReceipt; @@ -618,8 +618,8 @@ contract("TransferManager", (accounts) => { it("should approve an ERC20 immediately when the amount is under the existing approved amount", async () => { await doDirectApprove({ amount: 100 }); - await transferManager.from(owner).approveToken(wallet.contractAddress, erc20.contractAddress, spender.address, 10); - const approval = await erc20.allowance(wallet.contractAddress, spender.address); + await transferManager.from(owner).approveToken(wallet.contractAddress, erc20.contractAddress, spender, 10); + const approval = await erc20.allowance(wallet.contractAddress, spender); assert.equal(approval.toNumber(), 10); }); @@ -633,7 +633,7 @@ contract("TransferManager", (accounts) => { }); it("should approve an ERC20 immediately when the spender is whitelisted ", async () => { - await transferManager.from(owner).addToWhitelist(wallet.contractAddress, spender.address); + await transferManager.from(owner).addToWhitelist(wallet.contractAddress, spender); await manager.increaseTime(3); await doDirectApprove({ amount: ETH_LIMIT + 10000 }); }); @@ -696,7 +696,7 @@ contract("TransferManager", (accounts) => { it("should be able to call a supported token contract which is whitelisted", async () => { await transferManager.from(owner).addToWhitelist(wallet.contractAddress, erc20.contractAddress); await manager.increaseTime(3); - const dataToTransfer = erc20.contract.interface.functions.transfer.encode([infrastructure.address, 4]); + const dataToTransfer = erc20.contract.interface.functions.transfer.encode([infrastructure, 4]); const params = [wallet.contractAddress, erc20.contractAddress, 0, dataToTransfer]; await transferManager.from(owner).callContract(...params); }); diff --git a/test/upgraderToVersionManager.js b/test/upgraderToVersionManager.js index e508200c4..f97852640 100644 --- a/test/upgraderToVersionManager.js +++ b/test/upgraderToVersionManager.js @@ -101,7 +101,7 @@ describe("UpgraderToVersionManager", function () { it("should fail to upgrade a pre-VersionManager wallet to a version lower than minVersion", async () => { const proxy = await deployer.deploy(Proxy, {}, walletImplementation.contractAddress); wallet = deployer.wrapDeployedContract(BaseWallet, proxy.contractAddress); - await wallet.init(owner.address, [previousTransferManager.contractAddress]); + await wallet.init(owner, [previousTransferManager.contractAddress]); const prevVersion = await versionManager.lastVersion(); await versionManager.addVersion([], []); const lastVersion = await versionManager.lastVersion(); @@ -118,17 +118,17 @@ describe("UpgraderToVersionManager", function () { const proxy = await deployer.deploy(Proxy, {}, walletImplementation.contractAddress); wallet = deployer.wrapDeployedContract(BaseWallet, proxy.contractAddress); - await wallet.init(owner.address, [previousTransferManager.contractAddress]); + await wallet.init(owner, [previousTransferManager.contractAddress]); await previousTransferManager.from(owner).addModule(wallet.contractAddress, upgrader.contractAddress); }); it("should add/remove an account to/from the whitelist", async () => { - await transferManager.from(owner).addToWhitelist(wallet.contractAddress, recipient.address); + await transferManager.from(owner).addToWhitelist(wallet.contractAddress, recipient); await manager.increaseTime(SECURITY_PERIOD + 1); - let isTrusted = await transferManager.isWhitelisted(wallet.contractAddress, recipient.address); + let isTrusted = await transferManager.isWhitelisted(wallet.contractAddress, recipient); assert.equal(isTrusted, true, "should be trusted after the security period"); - await transferManager.from(owner).removeFromWhitelist(wallet.contractAddress, recipient.address); - isTrusted = await transferManager.isWhitelisted(wallet.contractAddress, recipient.address); + await transferManager.from(owner).removeFromWhitelist(wallet.contractAddress, recipient); + isTrusted = await transferManager.isWhitelisted(wallet.contractAddress, recipient); assert.equal(isTrusted, false, "should no removed from whitelist immediately"); }); diff --git a/test/versionManager.js b/test/versionManager.js index c2bfc5043..9891c97e0 100644 --- a/test/versionManager.js +++ b/test/versionManager.js @@ -72,7 +72,7 @@ describe("VersionManager", function () { const proxy = await deployer.deploy(Proxy, {}, walletImplementation.contractAddress); wallet = deployer.wrapDeployedContract(BaseWallet, proxy.contractAddress); - await wallet.init(owner.address, [versionManager.contractAddress]); + await wallet.init(owner, [versionManager.contractAddress]); await versionManager.from(owner).upgradeWallet(wallet.contractAddress, await versionManager.lastVersion()); }); @@ -105,7 +105,7 @@ describe("VersionManager", function () { describe("Wallet owner", () => { it("should not let the relayer call a forbidden method", async () => { await assert.revertWith( - manager.relay(versionManager, "setOwner", [wallet.contractAddress, owner.address], wallet, [owner]), + manager.relay(versionManager, "setOwner", [wallet.contractAddress, owner], wallet, [owner]), "VM: unknown method", ); }); diff --git a/utils/defi-deployer.js b/utils/defi-deployer.js index 8f7307452..aa3a739a9 100644 --- a/utils/defi-deployer.js +++ b/utils/defi-deployer.js @@ -46,7 +46,7 @@ module.exports = { await uniswapFactory.from(infrastructure).createExchange(token.contractAddress); const tokenExchange = await etherlime.ContractAt(UniswapExchange, await uniswapFactory.getExchange(token.contractAddress)); const tokenLiquidity = ethLiquidity.mul(WAD).div(ethPerToken[i]); - await token["mint(address,uint256)"](infrastructure.address, tokenLiquidity); + await token["mint(address,uint256)"](infrastructure, tokenLiquidity); await token.from(infrastructure).approve(tokenExchange.contractAddress, tokenLiquidity); const timestamp = await manager.getTimestamp(await manager.getCurrentBlock()); await tokenExchange.from(infrastructure).addLiquidity(1, tokenLiquidity, timestamp + 300, { value: ethLiquidity, gasLimit: 150000 }); @@ -76,7 +76,7 @@ module.exports = { pip.contractAddress, pep.contractAddress, vox.contractAddress, - infrastructure.address); + infrastructure); // Let the Tub mint PETH and DAI await skr.setOwner(tub.contractAddress); await sai.setOwner(tub.contractAddress); @@ -160,7 +160,7 @@ module.exports = { ); // Setting up the common migration vault used by ScdMcdMigration const initialSaiAmountInMigrationVault = parseEther("1000"); - await sai["mint(address,uint256)"](infrastructure.address, initialSaiAmountInMigrationVault); + await sai["mint(address,uint256)"](infrastructure, initialSaiAmountInMigrationVault); await sai.from(infrastructure).approve(migration.contractAddress, initialSaiAmountInMigrationVault); await migration.from(infrastructure).swapSaiToDai(initialSaiAmountInMigrationVault); diff --git a/utils/test-manager.js b/utils/test-manager.js index fd906da8c..bcc1c5fa3 100644 --- a/utils/test-manager.js +++ b/utils/test-manager.js @@ -5,39 +5,13 @@ const hdkey = require("ethereumjs-wallet/hdkey"); const bip39 = require("bip39"); const { signOffchain, ETH_TOKEN } = require("./utilities.js"); -const USE_ETHERLIME_GANACHE_MNEMONIC = true; - -// this is the same mnemonic as that used by ganache-cli --deterministic -// this mnemonic will not be used if `USE_ETHERLIME_GANACHE_MNEMONIC` is set to `true` -const MNEMONIC = "myth like bonus scare over problem client lizard pioneer submit female collect"; - class TestManager { - constructor(_accounts = null, network = "ganache", deployer) { + constructor(network = "ganache", deployer) { this.network = network; - this.accounts = _accounts || this.loadAccounts(); - global.accounts = this.accounts; this.deployer = deployer || this.newDeployer(); this.provider = this.deployer.provider; } - loadAccounts() { // eslint-disable-line class-methods-use-this - if (USE_ETHERLIME_GANACHE_MNEMONIC) return global.accounts; - - // ignore (global) accounts loaded from cli-commands/ganache/setup.json - // and instead generate accounts matching those used by ganache-cli in determistic mode - const hdWallet = hdkey.fromMasterSeed(bip39.mnemonicToSeedSync(MNEMONIC)); - const localNodeProvider = new ethers.providers.JsonRpcProvider("http://localhost:8545"); - const accounts = []; - for (let i = 0; i < 10; i += 1) { - const privKey = hdWallet.derivePath(`m/44'/60'/0'/0/${i}`).getWallet().getPrivateKeyString(); - accounts.push({ - secretKey: privKey, - signer: new ethers.Wallet(privKey, localNodeProvider), - }); - } - return accounts; - } - newDeployer() { const defaultConfigs = { gasLimit: ethers.BigNumber.from(20700000), From b20766706313e99d755d02a221e8896750a69214 Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Wed, 29 Jul 2020 09:58:49 +0300 Subject: [PATCH 010/113] Hardcode the first account as deployment account --- utils/test-manager.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/test-manager.js b/utils/test-manager.js index bcc1c5fa3..63aa5504e 100644 --- a/utils/test-manager.js +++ b/utils/test-manager.js @@ -16,7 +16,7 @@ class TestManager { const defaultConfigs = { gasLimit: ethers.BigNumber.from(20700000), }; - const deployerInstance = new etherlime.EtherlimeGanacheDeployer(this.accounts[0].secretKey); + const deployerInstance = new etherlime.EtherlimeGanacheDeployer("0x7ab741b57e8d94dd7e1a29055646bafde7010f38a900f55bbd7647880faa6ee8"); deployerInstance.setDefaultOverrides(defaultConfigs); return deployerInstance; } From aba643486c5bdc81033b95beb34a2d86750fefa2 Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Tue, 11 Aug 2020 10:10:41 +0300 Subject: [PATCH 011/113] Refactor etherlime to using truffle --- test/approvedTransfer.js | 2 +- test/baseWallet.js | 4 ++-- test/compoundManager_invest.js | 2 +- test/compoundManager_loan.js | 2 +- test/factory.js | 2 +- test/makerV2Manager_loan.js | 4 ++-- test/multisig.js | 5 +---- test/proxy.js | 2 +- test/relayer.js | 2 +- test/tokenExchanger.js | 6 +++--- test/transferManager.js | 12 +++++++++--- utils/test-manager.js | 2 -- 12 files changed, 23 insertions(+), 22 deletions(-) diff --git a/test/approvedTransfer.js b/test/approvedTransfer.js index 70e28c2ac..529738936 100644 --- a/test/approvedTransfer.js +++ b/test/approvedTransfer.js @@ -98,7 +98,7 @@ contract("ApprovedTransfer", (accounts) => { const decimals = 12; // number of decimal for TOKN contract erc20 = await deployer.deploy(ERC20, {}, [infrastructure, wallet.contractAddress], 10000000, decimals); // TOKN contract with 10M tokens (5M TOKN for wallet and 5M TOKN for account[0]) - await infrastructure.sendTransaction({ to: wallet.contractAddress, value: 50000000 }); + await wallet.send(50000000); }); async function addGuardians(guardians) { diff --git a/test/baseWallet.js b/test/baseWallet.js index 885b2f5e4..be2df646b 100644 --- a/test/baseWallet.js +++ b/test/baseWallet.js @@ -144,14 +144,14 @@ contract("BaseWallet", (accounts) => { describe("Receiving ETH", () => { it("should accept ETH", async () => { const before = await deployer.provider.getBalance(wallet.contractAddress); - await nonowner.sendTransaction({ to: wallet.contractAddress, value: 50000000 }); + await wallet.send(50000000); const after = await deployer.provider.getBalance(wallet.contractAddress); assert.equal(after.sub(before).toNumber(), 50000000, "should have received ETH"); }); it("should accept ETH with data", async () => { const before = await deployer.provider.getBalance(wallet.contractAddress); - await nonowner.sendTransaction({ to: wallet.contractAddress, value: 50000000, data: 0x1234 }); + await wallet.send(50000000, {data: 0x1234}); const after = await deployer.provider.getBalance(wallet.contractAddress); assert.equal(after.sub(before).toNumber(), 50000000, "should have received ETH"); }); diff --git a/test/compoundManager_invest.js b/test/compoundManager_invest.js index 10958c7b3..6d8d4e7f5 100644 --- a/test/compoundManager_invest.js +++ b/test/compoundManager_invest.js @@ -202,7 +202,7 @@ contract("Invest Manager with Compound", (accounts) => { const investInEth = (tokenAddress === ETH_TOKEN); if (investInEth) { - tx = await infrastructure.sendTransaction({ to: wallet.contractAddress, value: amount }); + tx = await wallet.send(amount); } else { await token.from(infrastructure).transfer(wallet.contractAddress, amount); } diff --git a/test/compoundManager_loan.js b/test/compoundManager_loan.js index bcee4e6b4..2abc053ae 100644 --- a/test/compoundManager_loan.js +++ b/test/compoundManager_loan.js @@ -183,7 +183,7 @@ contract("Loan Module", (accounts) => { }); async function fundWallet({ ethAmount, token1Amount, token2Amount = 0 }) { - if (ethAmount > 0) await infrastructure.sendTransaction({ to: wallet.contractAddress, value: ethAmount }); + if (ethAmount > 0) await wallet.send(ethAmount); if (token1Amount > 0) await token1.from(infrastructure).transfer(wallet.contractAddress, token1Amount); if (token2Amount > 0) await token2.from(infrastructure).transfer(wallet.contractAddress, token2Amount); } diff --git a/test/factory.js b/test/factory.js index 8ff4c2b5b..5ecd58408 100644 --- a/test/factory.js +++ b/test/factory.js @@ -325,7 +325,7 @@ contract("WalletFactory", (accounts) => { // we get the future address const futureAddr = await factory.getAddressForCounterfactualWallet(owner, versionManager.contractAddress, guardian, salt, 1); // We send ETH to the address - await infrastructure.sendTransaction({ to: futureAddr, value: amount }); + await futureAddr.send(amount); // we create the wallet const tx = await factory.from(infrastructure).createCounterfactualWallet( owner, versionManager.contractAddress, guardian, salt, 1, diff --git a/test/makerV2Manager_loan.js b/test/makerV2Manager_loan.js index acf6e72d6..239c42379 100644 --- a/test/makerV2Manager_loan.js +++ b/test/makerV2Manager_loan.js @@ -139,7 +139,7 @@ contract("MakerV2Loan", (accounts) => { await wallet.init(owner, [versionManager.contractAddress]); await versionManager.from(owner).upgradeWallet(wallet.contractAddress, await versionManager.lastVersion()); walletAddress = wallet.contractAddress; - await infrastructure.sendTransaction({ to: walletAddress, value: parseEther("2.0") }); + await wallet.send(parseEther("2.0")); await dai["mint(address,uint256)"](walletAddress, parseEther("10")); }); @@ -463,7 +463,7 @@ contract("MakerV2Loan", (accounts) => { const { collateralAmount, daiAmount } = await getTestAmounts(ETH_TOKEN); const loanId = await testOpenLoan({ collateralAmount, daiAmount, relayed }); // give some ETH to the wallet to be used for repayment - await owner.sendTransaction({ to: walletAddress, value: collateralAmount.mul(2) }); + await owner.send({ to: walletAddress, value: collateralAmount.mul(2) }); await manager.increaseTime(3); // wait 3 seconds const beforeDAI = await dai.balanceOf(wallet.contractAddress); const method = "closeLoan"; diff --git a/test/multisig.js b/test/multisig.js index 66b7715c9..0cb7f21dd 100644 --- a/test/multisig.js +++ b/test/multisig.js @@ -34,10 +34,7 @@ contract("MultiSigWallet", (accounts) => { reg = await deployer.deploy(TestRegistry, {}); // Fund the multisig - await deployer.signer.sendTransaction({ - to: multisig.contractAddress, - value, - }); + await multisig.send(value); const bal = await deployer.provider.getBalance(multisig.contractAddress); assert.equal(bal.toNumber(), value); diff --git a/test/proxy.js b/test/proxy.js index 3cde98460..95dc5644e 100644 --- a/test/proxy.js +++ b/test/proxy.js @@ -67,7 +67,7 @@ contract("Proxy", (accounts) => { it("should accept ETH", async () => { const before = await deployer.provider.getBalance(wallet.contractAddress); - await nonowner.sendTransaction({ to: wallet.contractAddress, value: 50000000 }); + await wallet.send(50000000); const after = await deployer.provider.getBalance(wallet.contractAddress); assert.equal(after.sub(before).toNumber(), 50000000, "should have received ETH"); }); diff --git a/test/relayer.js b/test/relayer.js index 33950cf49..c789b4df2 100644 --- a/test/relayer.js +++ b/test/relayer.js @@ -260,7 +260,7 @@ contract("RelayerManager", (accounts) => { async function provisionFunds(ethAmount, erc20Amount) { if (ethAmount) { - await infrastructure.sendTransaction({ to: wallet.contractAddress, value: ethAmount }); + await wallet.send(ethAmount); } if (erc20Amount) { await erc20.transfer(wallet.contractAddress, erc20Amount); diff --git a/test/tokenExchanger.js b/test/tokenExchanger.js index 072042357..d6f707810 100644 --- a/test/tokenExchanger.js +++ b/test/tokenExchanger.js @@ -106,7 +106,7 @@ contract("TokenExchanger", (accounts) => { await tokenB.mint(kyberNetwork.contractAddress, parseEther("1000")); await kyberNetwork.addToken(tokenA.contractAddress, TOKEN_A_RATE, DECIMALS); await kyberNetwork.addToken(tokenB.contractAddress, TOKEN_B_RATE, DECIMALS); - await infrastructure.sendTransaction({ to: kyberNetwork.contractAddress, value: parseEther("10") }); + await kyberNetwork.send(parseEther("10")); // Deploy and fund UniswapV2 const uniswapFactory = await deployer.deploy(UniswapV2Factory, {}, AddressZero); @@ -192,7 +192,7 @@ contract("TokenExchanger", (accounts) => { await versionManager.from(owner).upgradeWallet(wallet.contractAddress, await versionManager.lastVersion()); // fund wallet - await infrastructure.sendTransaction({ to: wallet.contractAddress, value: parseEther("0.1") }); + await wallet.send(parseEther("0.1")); await tokenA.mint(wallet.contractAddress, parseEther("1000")); await tokenB.mint(wallet.contractAddress, parseEther("1000")); }); @@ -401,7 +401,7 @@ contract("TokenExchanger", (accounts) => { await oldWallet.init(owner, [versionManager.contractAddress]); await versionManager.from(owner).upgradeWallet(oldWallet.contractAddress, await versionManager.lastVersion()); // fund wallet - await infrastructure.sendTransaction({ to: oldWallet.contractAddress, value: parseEther("0.1") }); + await oldWallet.send(parseEther("0.1")); // call sell/buy await testTrade({ method, diff --git a/test/transferManager.js b/test/transferManager.js index 04fe14dd4..770832230 100644 --- a/test/transferManager.js +++ b/test/transferManager.js @@ -129,8 +129,13 @@ contract("TransferManager", (accounts) => { const tokenRate = new BN(10).pow(new BN(19)).muln(51); // 1 TOKN = 0.00051 ETH = 0.00051*10^18 ETH wei => *10^(18-decimals) = 0.00051*10^18 * 10^6 = 0.00051*10^24 = 51*10^19 erc20 = await deployer.deploy(ERC20, {}, [infrastructure, wallet.contractAddress], 10000000, decimals); // TOKN contract with 10M tokens (5M TOKN for wallet and 5M TOKN for account[0]) +<<<<<<< HEAD await tokenPriceRegistry.setPriceForTokenList([erc20.contractAddress], [tokenRate.toString()]); await infrastructure.sendTransaction({ to: wallet.contractAddress, value: ethers.BigNumber.from("1000000000000000000") }); +======= + await tokenPriceStorage.setPrice(erc20.contractAddress, tokenRate.toString()); + await wallet.send(ethers.BigNumber.from("1000000000000000000")); +>>>>>>> 5b5b4e5f... Refactor etherlime to using truffle }); async function getEtherValue(amount, token) { @@ -273,7 +278,8 @@ contract("TransferManager", (accounts) => { const existingWallet = deployer.wrapDeployedContract(BaseWallet, proxy.contractAddress); await existingWallet.init(owner, [previousTransferManager.contractAddress]); - await infrastructure.sendTransaction({ to: existingWallet.contractAddress, value: ethers.BigNumber.from("100000000") }); + await existingWallet.send(ethers.BigNumber.from("100000000")); + // change the limit await previousTransferManager.from(owner).changeLimit(existingWallet.contractAddress, 4000000); await manager.increaseTime(SECURITY_PERIOD + 1); @@ -343,7 +349,7 @@ contract("TransferManager", (accounts) => { }); it("should return the correct unspent daily limit amount", async () => { - await infrastructure.sendTransaction({ to: wallet.contractAddress, value: ethers.BigNumber.from(ETH_LIMIT) }); + await wallet.send(ethers.BigNumber.from(ETH_LIMIT)); const transferAmount = ETH_LIMIT - 100; await transferManager.from(owner).transferToken(wallet.contractAddress, ETH_TOKEN, recipient, transferAmount, ZERO_BYTES32); const { _unspent } = await transferManager.getDailyUnspent(wallet.contractAddress); @@ -351,7 +357,7 @@ contract("TransferManager", (accounts) => { }); it("should return the correct spent daily limit amount", async () => { - await infrastructure.sendTransaction({ to: wallet.contractAddress, value: ethers.BigNumber.from(ETH_LIMIT) }); + await wallet.send(ethers.BigNumber.from(ETH_LIMIT)); // Transfer 100 wei const tx = await transferManager.from(owner).transferToken(wallet.contractAddress, ETH_TOKEN, recipient, 100, ZERO_BYTES32); const txReceipt = await transferManager.verboseWaitForTransaction(tx); diff --git a/utils/test-manager.js b/utils/test-manager.js index 63aa5504e..801f9be5e 100644 --- a/utils/test-manager.js +++ b/utils/test-manager.js @@ -1,8 +1,6 @@ const etherlime = require("etherlime-lib"); const ethers = require("ethers"); const ps = require("ps-node"); -const hdkey = require("ethereumjs-wallet/hdkey"); -const bip39 = require("bip39"); const { signOffchain, ETH_TOKEN } = require("./utilities.js"); class TestManager { From 4e0ab47bf842aac76ce0b93017e1a728cb13100b Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Tue, 11 Aug 2020 10:16:50 +0300 Subject: [PATCH 012/113] Fix linting errors [skip ci] --- deployment/5_deploy_modules.js | 2 -- test/baseWallet.js | 6 +++--- test/compoundManager_invest.js | 2 +- test/proxy.js | 1 - test/tokenExchanger.js | 1 + test/transferManager.js | 9 ++------- utils/test-manager.js | 2 +- 7 files changed, 8 insertions(+), 15 deletions(-) diff --git a/deployment/5_deploy_modules.js b/deployment/5_deploy_modules.js index b82af2a6e..e8ef3e59e 100644 --- a/deployment/5_deploy_modules.js +++ b/deployment/5_deploy_modules.js @@ -1,5 +1,3 @@ -/* global artifacts */ - const childProcess = require("child_process"); const ApprovedTransfer = artifacts.require("ApprovedTransfer"); diff --git a/test/baseWallet.js b/test/baseWallet.js index be2df646b..6686e532b 100644 --- a/test/baseWallet.js +++ b/test/baseWallet.js @@ -3,8 +3,8 @@ const ethers = require("ethers"); const Proxy = artifacts.require("Proxy"); const BaseWallet = artifacts.require("BaseWallet"); -const OldWalletV16 = artifacts.require("../build-legacy/v1.6.0/BaseWallet"); -const OldWalletV13 = artifacts.require("../build-legacy/v1.3.0/BaseWallet"); +const OldWalletV16 = require("../build-legacy/v1.6.0/BaseWallet"); +const OldWalletV13 = require("../build-legacy/v1.3.0/BaseWallet"); const VersionManager = artifacts.require("VersionManager"); const Registry = artifacts.require("ModuleRegistry"); const SimpleUpgrader = artifacts.require("SimpleUpgrader"); @@ -151,7 +151,7 @@ contract("BaseWallet", (accounts) => { it("should accept ETH with data", async () => { const before = await deployer.provider.getBalance(wallet.contractAddress); - await wallet.send(50000000, {data: 0x1234}); + await wallet.send(50000000, { data: 0x1234 }); const after = await deployer.provider.getBalance(wallet.contractAddress); assert.equal(after.sub(before).toNumber(), 50000000, "should have received ETH"); }); diff --git a/test/compoundManager_invest.js b/test/compoundManager_invest.js index 6d8d4e7f5..e4ca99fc6 100644 --- a/test/compoundManager_invest.js +++ b/test/compoundManager_invest.js @@ -1,4 +1,4 @@ -/* global artefacts */ +/* global artifacts */ const { parseEther, formatBytes32String } = require("ethers").utils; const ethers = require("ethers"); const utils = require("../utils/utilities.js"); diff --git a/test/proxy.js b/test/proxy.js index 95dc5644e..d60a1b52d 100644 --- a/test/proxy.js +++ b/test/proxy.js @@ -10,7 +10,6 @@ const Registry = artifacts.require("ModuleRegistry"); contract("Proxy", (accounts) => { const owner = accounts[1]; - const nonowner = accounts[2]; let deployer; let walletImplementation; diff --git a/test/tokenExchanger.js b/test/tokenExchanger.js index d6f707810..9f322049a 100644 --- a/test/tokenExchanger.js +++ b/test/tokenExchanger.js @@ -26,6 +26,7 @@ const DexRegistry = artifacts.require("DexRegistry"); const Proxy = artifacts.require("Proxy"); const BaseWallet = artifacts.require("BaseWallet"); const OldWallet = require("../build-legacy/v1.3.0/BaseWallet"); + const GuardianStorage = artifacts.require("GuardianStorage"); const LockStorage = artifacts.require("LockStorage"); const TokenExchanger = artifacts.require("TokenExchanger"); diff --git a/test/transferManager.js b/test/transferManager.js index 770832230..44373af03 100644 --- a/test/transferManager.js +++ b/test/transferManager.js @@ -19,8 +19,8 @@ const LimitStorage = artifacts.require("LimitStorage"); const TokenPriceRegistry = artifacts.require("TokenPriceRegistry"); const RelayerManager = artifacts.require("RelayerManager"); const TransferManager = artifacts.require("TransferManager"); -const LegacyTransferManager = artifacts.require("../build-legacy/v1.6.0/TransferManager"); -const LegacyTokenPriceProvider = artifacts.require("../build-legacy/v1.6.0/TokenPriceProvider"); +const LegacyTransferManager = require("../build-legacy/v1.6.0/TransferManager"); +const LegacyTokenPriceProvider = require("../build-legacy/v1.6.0/TokenPriceProvider"); const ERC20 = artifacts.require("TestERC20"); const WETH = artifacts.require("WETH9"); const TestContract = artifacts.require("TestContract"); @@ -129,13 +129,8 @@ contract("TransferManager", (accounts) => { const tokenRate = new BN(10).pow(new BN(19)).muln(51); // 1 TOKN = 0.00051 ETH = 0.00051*10^18 ETH wei => *10^(18-decimals) = 0.00051*10^18 * 10^6 = 0.00051*10^24 = 51*10^19 erc20 = await deployer.deploy(ERC20, {}, [infrastructure, wallet.contractAddress], 10000000, decimals); // TOKN contract with 10M tokens (5M TOKN for wallet and 5M TOKN for account[0]) -<<<<<<< HEAD await tokenPriceRegistry.setPriceForTokenList([erc20.contractAddress], [tokenRate.toString()]); - await infrastructure.sendTransaction({ to: wallet.contractAddress, value: ethers.BigNumber.from("1000000000000000000") }); -======= - await tokenPriceStorage.setPrice(erc20.contractAddress, tokenRate.toString()); await wallet.send(ethers.BigNumber.from("1000000000000000000")); ->>>>>>> 5b5b4e5f... Refactor etherlime to using truffle }); async function getEtherValue(amount, token) { diff --git a/utils/test-manager.js b/utils/test-manager.js index 801f9be5e..08a7d6456 100644 --- a/utils/test-manager.js +++ b/utils/test-manager.js @@ -10,7 +10,7 @@ class TestManager { this.provider = this.deployer.provider; } - newDeployer() { + static newDeployer() { const defaultConfigs = { gasLimit: ethers.BigNumber.from(20700000), }; From 61a908e7aee9574981252d255e1823006540013e Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Tue, 11 Aug 2020 13:17:09 +0300 Subject: [PATCH 013/113] Migrate away from deployer .deploy => .new .wrapDeployedContract => .at .contractAddress => .address --- deployment/1_setup_test_environment.js | 20 +- deployment/2_deploy_contracts.js | 34 +- deployment/4_finalise_test_environment.js | 2 +- deployment/5_deploy_modules.js | 42 +-- deployment/6_register_modules.js | 4 +- deployment/999_benchmark.js | 62 ++-- scripts/deploy_custom_upgrader.js | 6 +- scripts/deploy_defi.js | 38 +-- scripts/update_compound_registry.js | 4 +- scripts/update_multisig_threshold.js | 2 +- scripts/update_wallet_in_factory.js | 10 +- test/approvedTransfer.js | 170 +++++----- test/baseContracts.js | 2 +- test/baseModule.js | 32 +- test/baseWallet.js | 138 ++++---- test/compoundManager_invest.js | 158 +++++---- test/compoundManager_loan.js | 212 ++++++------ test/ens.js | 23 +- test/factory.js | 100 +++--- test/guardianManager.js | 284 ++++++++-------- test/kyber.js | 16 +- test/lockManager.js | 154 ++++----- test/makerV2Manager_invest.js | 74 ++-- test/makerV2Manager_loan.js | 158 +++++---- test/multisig.js | 44 +-- test/nftTransfer.js | 108 +++--- test/proxy.js | 24 +- test/recoveryManager.js | 196 ++++++----- test/relayer.js | 200 +++++------ test/simpleUpgrader.js | 226 ++++++------ test/tokenExchanger.js | 192 +++++------ test/transferManager.js | 396 +++++++++++----------- utils/abi-uploader.js | 2 +- utils/defi-deployer.js | 104 +++--- utils/multisigexecutor.js | 4 +- utils/test-manager.js | 12 +- 36 files changed, 1608 insertions(+), 1645 deletions(-) diff --git a/deployment/1_setup_test_environment.js b/deployment/1_setup_test_environment.js index 92d219bdb..e7dba6ffc 100644 --- a/deployment/1_setup_test_environment.js +++ b/deployment/1_setup_test_environment.js @@ -23,7 +23,7 @@ async function deployENSRegistry(deployer, owner, domain) { const { gasPrice } = deployer.defaultOverrides; // Deploy the public ENS registry const ensRegistryWithoutFallback = await deployer.deploy(ENSRegistry); - const ENSWrapper = await deployer.deploy(ENSRegistryWithFallback, {}, ensRegistryWithoutFallback.contractAddress); + const ENSWrapper = await deployer.deploy(ENSRegistryWithFallback, {}, ensRegistryWithoutFallback.address); // ENS domain const parts = domain.split("."); @@ -38,26 +38,26 @@ async function deployENSRegistry(deployer, owner, domain) { const setSubnodeOwnerArgent = await ENSWrapper.contract.setSubnodeOwner(utils.namehash(extension), utils.sha3(domainName), owner, { gasPrice }); await ENSWrapper.verboseWaitForTransaction(setSubnodeOwnerArgent, `Setting Subnode Owner for ${domainName}.${extension}`); - return ENSWrapper.contractAddress; + return ENSWrapper.address; } async function deployParaswap(deployer) { const deploymentAccount = await deployer.signer.getAddress(); const whitelist = await deployer.deploy(Whitelisted); const partnerDeployer = await deployer.deploy(PartnerDeployer); - const partnerRegistry = await deployer.deploy(PartnerRegistry, {}, partnerDeployer.contractAddress); + const partnerRegistry = await deployer.deploy(PartnerRegistry, {}, partnerDeployer.address); const paraswap = await deployer.deploy( AugustusSwapper, {}, - whitelist.contractAddress, + whitelist.address, deploymentAccount, - partnerRegistry.contractAddress, + partnerRegistry.address, deploymentAccount, deploymentAccount, ); const kyberAdapter = await deployer.deploy(KyberAdapter, {}, deploymentAccount); - await whitelist.addWhitelisted(kyberAdapter.contractAddress); - return { paraswap: paraswap.contractAddress, kyberAdapter: kyberAdapter.contractAddress }; + await whitelist.addWhitelisted(kyberAdapter.address); + return { paraswap: paraswap.address, kyberAdapter: kyberAdapter.address }; } const deploy = async (network) => { @@ -85,9 +85,9 @@ const deploy = async (network) => { if (config.defi.uniswap.deployOwn) { const UniswapFactoryWrapper = await deployer.deploy(UniswapFactory); - configurator.updateUniswapFactory(UniswapFactoryWrapper.contractAddress); + configurator.updateUniswapFactory(UniswapFactoryWrapper.address); const UniswapExchangeTemplateWrapper = await deployer.deploy(UniswapExchange); - const initializeFactoryTx = await UniswapFactoryWrapper.contract.initializeFactory(UniswapExchangeTemplateWrapper.contractAddress, { gasPrice }); + const initializeFactoryTx = await UniswapFactoryWrapper.contract.initializeFactory(UniswapExchangeTemplateWrapper.address, { gasPrice }); await UniswapFactoryWrapper.verboseWaitForTransaction(initializeFactoryTx, "Initializing UniswapFactory"); } @@ -102,7 +102,7 @@ const deploy = async (network) => { config.defi.maker.tub || "0x0000000000000000000000000000000000000000", config.defi.maker.cdpManager || "0x0000000000000000000000000000000000000000", ); - configurator.updateMakerMigration(MakerMigrationWrapper.contractAddress); + configurator.updateMakerMigration(MakerMigrationWrapper.address); } // save configuration diff --git a/deployment/2_deploy_contracts.js b/deployment/2_deploy_contracts.js index c40e2e4c5..cef2c6545 100644 --- a/deployment/2_deploy_contracts.js +++ b/deployment/2_deploy_contracts.js @@ -79,10 +79,10 @@ const deploy = async (network) => { const ENSResolverWrapper = await deployer.deploy(ENSResolver); // Deploy the ENS Manager const ENSManagerWrapper = await deployer.deploy(ENSManager, {}, - walletRootEns, utils.namehash(walletRootEns), newConfig.ENS.ensRegistry, ENSResolverWrapper.contractAddress); + walletRootEns, utils.namehash(walletRootEns), newConfig.ENS.ensRegistry, ENSResolverWrapper.address); // Deploy the Wallet Factory const WalletFactoryWrapper = await deployer.deploy(WalletFactory, {}, - ModuleRegistryWrapper.contractAddress, BaseWalletWrapper.contractAddress, GuardianStorageWrapper.contractAddress); + ModuleRegistryWrapper.address, BaseWalletWrapper.address, GuardianStorageWrapper.address); // Deploy and configure Maker Registry const ScdMcdMigrationWrapper = await deployer.wrapDeployedContract(ScdMcdMigration, newConfig.defi.maker.migration); @@ -105,7 +105,7 @@ const deploy = async (network) => { if (previousWalletEnsOwner.toLowerCase() === deploymentAccount.toLowerCase()) { // newly registered name -> change its owner from deploymentAccount to ENSManager address - const setOwnerTransaction = await ENSRegistryWrapper.contract.setOwner(utils.namehash(walletRootEns), ENSManagerWrapper.contractAddress, + const setOwnerTransaction = await ENSRegistryWrapper.contract.setOwner(utils.namehash(walletRootEns), ENSManagerWrapper.address, { gasPrice }); await ENSRegistryWrapper.verboseWaitForTransaction(setOwnerTransaction, "Replace deployment account by ENSManager as new owner of walletENS"); } else if (previousWalletEnsOwner.toLowerCase() === prevConfig.contracts.ENSManager.toLowerCase()) { @@ -116,7 +116,7 @@ const deploy = async (network) => { const multisigExecutor = new MultisigExecutor(previousMultiSigWrapper, deploymentWallet, prevConfig.multisig.autosign, { gasPrice }); console.log(`Owner of ${walletRootEns} changed from old ENSManager to new ENSManager...`); - await multisigExecutor.executeCall(previousENSManagerWrapper, "changeRootnodeOwner", [ENSManagerWrapper.contractAddress]); + await multisigExecutor.executeCall(previousENSManagerWrapper, "changeRootnodeOwner", [ENSManagerWrapper.address]); } else { throw new Error(`Ownership of ${walletRootEns} not changed`); } @@ -136,22 +136,22 @@ const deploy = async (network) => { // Update config and Upload ABIs // ///////////////////////////////////////////////// configurator.updateModuleAddresses({ - GuardianStorage: GuardianStorageWrapper.contractAddress, - TransferStorage: TransferStorageWrapper.contractAddress, - LockStorage: LockStorageWrapper.contractAddress, - LimitStorage: LimitStorageWrapper.contractAddress, - TokenPriceRegistry: TokenPriceRegistryWrapper.contractAddress, + GuardianStorage: GuardianStorageWrapper.address, + TransferStorage: TransferStorageWrapper.address, + LockStorage: LockStorageWrapper.address, + LimitStorage: LimitStorageWrapper.address, + TokenPriceRegistry: TokenPriceRegistryWrapper.address, }); configurator.updateInfrastructureAddresses({ - MultiSigWallet: MultiSigWrapper.contractAddress, - WalletFactory: WalletFactoryWrapper.contractAddress, - ENSResolver: ENSResolverWrapper.contractAddress, - ENSManager: ENSManagerWrapper.contractAddress, - ModuleRegistry: ModuleRegistryWrapper.contractAddress, - CompoundRegistry: CompoundRegistryWrapper.contractAddress, - DexRegistry: DexRegistryWrapper.contractAddress, - BaseWallet: BaseWalletWrapper.contractAddress, + MultiSigWallet: MultiSigWrapper.address, + WalletFactory: WalletFactoryWrapper.address, + ENSResolver: ENSResolverWrapper.address, + ENSManager: ENSManagerWrapper.address, + ModuleRegistry: ModuleRegistryWrapper.address, + CompoundRegistry: CompoundRegistryWrapper.address, + DexRegistry: DexRegistryWrapper.address, + BaseWallet: BaseWalletWrapper.address, }); await configurator.save(); diff --git a/deployment/4_finalise_test_environment.js b/deployment/4_finalise_test_environment.js index d817244c3..982710e4b 100644 --- a/deployment/4_finalise_test_environment.js +++ b/deployment/4_finalise_test_environment.js @@ -18,7 +18,7 @@ async function deployENSReverseRegistrar(deployer, config, owner, overrides) { const setSubnodeOwnerTx2 = await ENSRegistryWrapper.contract.setSubnodeOwner( utils.namehash("reverse"), utils.sha3("addr"), - ENSReverseRegistrarWrapper.contractAddress, + ENSReverseRegistrarWrapper.address, overrides, ); await ENSRegistryWrapper.verboseWaitForTransaction(setSubnodeOwnerTx2, diff --git a/deployment/5_deploy_modules.js b/deployment/5_deploy_modules.js index e8ef3e59e..3200e07c9 100644 --- a/deployment/5_deploy_modules.js +++ b/deployment/5_deploy_modules.js @@ -56,7 +56,7 @@ const deploy = async (network) => { {}, config.modules.LockStorage, config.modules.GuardianStorage, - VersionManagerWrapper.contractAddress, + VersionManagerWrapper.address, config.settings.securityPeriod || 0, config.settings.securityWindow || 0, ); @@ -66,7 +66,7 @@ const deploy = async (network) => { {}, config.modules.LockStorage, config.modules.GuardianStorage, - VersionManagerWrapper.contractAddress, + VersionManagerWrapper.address, config.settings.lockPeriod || 0, ); // Deploy the RecoveryManager module @@ -75,7 +75,7 @@ const deploy = async (network) => { {}, config.modules.LockStorage, config.modules.GuardianStorage, - VersionManagerWrapper.contractAddress, + VersionManagerWrapper.address, config.settings.recoveryPeriod || 0, config.settings.lockPeriod || 0, ); @@ -86,7 +86,7 @@ const deploy = async (network) => { config.modules.LockStorage, config.modules.GuardianStorage, config.modules.LimitStorage, - VersionManagerWrapper.contractAddress, + VersionManagerWrapper.address, config.defi.weth, ); // Deploy the TransferManager module @@ -97,7 +97,7 @@ const deploy = async (network) => { config.modules.TransferStorage, config.modules.LimitStorage, config.modules.TokenPriceRegistry, - VersionManagerWrapper.contractAddress, + VersionManagerWrapper.address, config.settings.securityPeriod || 0, config.settings.securityWindow || 0, config.settings.defaultLimit || "1000000000000000000", @@ -110,7 +110,7 @@ const deploy = async (network) => { {}, config.modules.LockStorage, config.modules.TokenPriceRegistry, - VersionManagerWrapper.contractAddress, + VersionManagerWrapper.address, config.contracts.DexRegistry, config.defi.paraswap.contract, "argent", @@ -121,7 +121,7 @@ const deploy = async (network) => { {}, config.modules.LockStorage, config.modules.TokenPriceRegistry, - VersionManagerWrapper.contractAddress, + VersionManagerWrapper.address, config.CryptoKitties.contract, ); // Deploy the CompoundManager module @@ -131,7 +131,7 @@ const deploy = async (network) => { config.modules.LockStorage, config.defi.compound.comptroller, config.contracts.CompoundRegistry, - VersionManagerWrapper.contractAddress, + VersionManagerWrapper.address, ); // Deploy MakerManagerV2 const MakerV2ManagerWrapper = await deployer.deploy( @@ -143,7 +143,7 @@ const deploy = async (network) => { config.defi.maker.jug, config.contracts.MakerRegistry, config.defi.uniswap.factory, - VersionManagerWrapper.contractAddress, + VersionManagerWrapper.address, ); // Deploy RelayerManager const RelayerManagerWrapper = await deployer.deploy( @@ -153,7 +153,7 @@ const deploy = async (network) => { config.modules.GuardianStorage, config.modules.LimitStorage, config.modules.TokenPriceRegistry, - VersionManagerWrapper.contractAddress, + VersionManagerWrapper.address, ); // ///////////////////////////////////////////////// @@ -162,17 +162,17 @@ const deploy = async (network) => { // TODO: change name from "module" to "feature" where appropriate configurator.updateModuleAddresses({ - GuardianManager: GuardianManagerWrapper.contractAddress, - LockManager: LockManagerWrapper.contractAddress, - RecoveryManager: RecoveryManagerWrapper.contractAddress, - ApprovedTransfer: ApprovedTransferWrapper.contractAddress, - TransferManager: TransferManagerWrapper.contractAddress, - TokenExchanger: TokenExchangerWrapper.contractAddress, - NftTransfer: NftTransferWrapper.contractAddress, - CompoundManager: CompoundManagerWrapper.contractAddress, - MakerV2Manager: MakerV2ManagerWrapper.contractAddress, - RelayerManager: RelayerManagerWrapper.contractAddress, - VersionManager: VersionManagerWrapper.contractAddress, + GuardianManager: GuardianManagerWrapper.address, + LockManager: LockManagerWrapper.address, + RecoveryManager: RecoveryManagerWrapper.address, + ApprovedTransfer: ApprovedTransferWrapper.address, + TransferManager: TransferManagerWrapper.address, + TokenExchanger: TokenExchangerWrapper.address, + NftTransfer: NftTransferWrapper.address, + CompoundManager: CompoundManagerWrapper.address, + MakerV2Manager: MakerV2ManagerWrapper.address, + RelayerManager: RelayerManagerWrapper.address, + VersionManager: VersionManagerWrapper.address, }); const gitHash = childProcess.execSync("git rev-parse HEAD").toString("utf8").replace(/\n$/, ""); diff --git a/deployment/6_register_modules.js b/deployment/6_register_modules.js index 249b5636e..7a3228179 100644 --- a/deployment/6_register_modules.js +++ b/deployment/6_register_modules.js @@ -92,7 +92,7 @@ const deploy = async (network) => { for (let idx = 0; idx < wrappers.length; idx += 1) { const wrapper = wrappers[idx]; await multisigExecutor.executeCall(ModuleRegistryWrapper, "registerModule", - [wrapper.contractAddress, utils.asciiToBytes32(wrapper._contract.contractName)]); + [wrapper.address, utils.asciiToBytes32(wrapper._contract.contractName)]); } const changeOwnerTx = await VersionManagerWrapper.contract.changeOwner(config.contracts.MultiSigWallet, { gasPrice }); @@ -102,7 +102,7 @@ const deploy = async (network) => { // Upload Version // ////////////////////////////////// - const modules = wrappers.map((wrapper) => ({ address: wrapper.contractAddress, name: wrapper._contract.contractName })); + const modules = wrappers.map((wrapper) => ({ address: wrapper.address, name: wrapper._contract.contractName })); const version = { modules, fingerprint: utils.versionFingerprint(modules), diff --git a/deployment/999_benchmark.js b/deployment/999_benchmark.js index ce0ff7120..e18be9495 100644 --- a/deployment/999_benchmark.js +++ b/deployment/999_benchmark.js @@ -136,30 +136,30 @@ class Benchmark { this.VersionManagerWrapper, "addVersion", [ [ - this.GuardianManagerWrapper.contractAddress, - this.LockManagerWrapper.contractAddress, - this.RecoveryManagerWrapper.contractAddress, - this.ApprovedTransferWrapper.contractAddress, - this.TransferManagerWrapper.contractAddress, - this.TokenExchangerWrapper.contractAddress, - this.NftTransferWrapper.contractAddress, - this.CompoundManagerWrapper.contractAddress, - this.MakerV2ManagerWrapper.contractAddress, - this.RelayerManagerWrapper.contractAddress, + this.GuardianManagerWrapper.address, + this.LockManagerWrapper.address, + this.RecoveryManagerWrapper.address, + this.ApprovedTransferWrapper.address, + this.TransferManagerWrapper.address, + this.TokenExchangerWrapper.address, + this.NftTransferWrapper.address, + this.CompoundManagerWrapper.address, + this.MakerV2ManagerWrapper.address, + this.RelayerManagerWrapper.address, ], [ - this.TransferManagerWrapper.contractAddress, + this.TransferManagerWrapper.address, ], ], ); } async setupWallet() { - const proxy = await this.deployer.deploy(Proxy, {}, this.BaseWalletWrapper.contractAddress); - this.wallet = this.deployer.wrapDeployedContract(BaseWallet, proxy.contractAddress); - this.walletAddress = this.wallet.contractAddress; + const proxy = await this.deployer.deploy(Proxy, {}, this.BaseWalletWrapper.address); + this.wallet = this.deployer.wrapDeployedContract(BaseWallet, proxy.address); + this.walletAddress = this.wallet.address; // init the wallet - await this.wallet.init(this.accounts[0], [this.VersionManagerWrapper.contractAddress]); - await this.VersionManagerWrapper.upgradeWallet(this.wallet.contractAddress, await this.VersionManagerWrapper.lastVersion()); + await this.wallet.init(this.accounts[0], [this.VersionManagerWrapper.address]); + await this.VersionManagerWrapper.upgradeWallet(this.wallet.address, await this.VersionManagerWrapper.lastVersion()); // add first guardian [, this.firstGuardian] = this.signers; await this.GuardianManagerWrapper.addGuardian(this.walletAddress, this.accounts[1]); @@ -282,28 +282,28 @@ class Benchmark { this.VersionManagerWrapper, "addVersion", [ [ - this.GuardianManagerWrapper.contractAddress, - this.LockManagerWrapper.contractAddress, - this.RecoveryManagerWrapper.contractAddress, - this.ApprovedTransferWrapper.contractAddress, - this.TransferManagerWrapper.contractAddress, - this.TokenExchangerWrapper.contractAddress, - this.NftTransferWrapper.contractAddress, - this.CompoundManagerWrapper.contractAddress, - this.MakerV2ManagerWrapper.contractAddress, - this.RelayerManagerWrapper.contractAddress, + this.GuardianManagerWrapper.address, + this.LockManagerWrapper.address, + this.RecoveryManagerWrapper.address, + this.ApprovedTransferWrapper.address, + this.TransferManagerWrapper.address, + this.TokenExchangerWrapper.address, + this.NftTransferWrapper.address, + this.CompoundManagerWrapper.address, + this.MakerV2ManagerWrapper.address, + this.RelayerManagerWrapper.address, ], [ - this.TransferManagerWrapper.contractAddress, + this.TransferManagerWrapper.address, ], ], ); // Upgrade a wallet from 2.0 to 2.1 - const fromVersion = await this.VersionManagerWrapper.walletVersions(this.wallet.contractAddress); + const fromVersion = await this.VersionManagerWrapper.walletVersions(this.wallet.address); const lastVersion = await this.VersionManagerWrapper.lastVersion(); - const tx = await this.VersionManagerWrapper.from(this.accounts[0]).upgradeWallet(this.wallet.contractAddress, lastVersion); + const tx = await this.VersionManagerWrapper.from(this.accounts[0]).upgradeWallet(this.wallet.address, lastVersion); const txReceipt = await this.VersionManagerWrapper.verboseWaitForTransaction(tx); - const toVersion = await this.VersionManagerWrapper.walletVersions(this.wallet.contractAddress); + const toVersion = await this.VersionManagerWrapper.walletVersions(this.wallet.address); assert.equal(fromVersion.toNumber() + 1, toVersion.toNumber(), "Bad Update"); console.log(`Wallet updated from version ${fromVersion.toString()} to version ${toVersion.toString()}`); @@ -316,7 +316,7 @@ class Benchmark { async estimateCreateWalletAllModules() { const gasUsed = await this.WalletFactoryWrapper.estimate.createWallet( - this.accounts[4], this.VersionManagerWrapper.contractAddress, this.accounts[4], 1, + this.accounts[4], this.VersionManagerWrapper.address, this.accounts[4], 1, ); this._logger.addItem("Create a wallet (all modules)", gasUsed); } diff --git a/scripts/deploy_custom_upgrader.js b/scripts/deploy_custom_upgrader.js index 01434db11..7841b1b0c 100644 --- a/scripts/deploy_custom_upgrader.js +++ b/scripts/deploy_custom_upgrader.js @@ -28,8 +28,8 @@ async function deploy() { const deploymentWallet = deployer.signer; const { config } = configurator; - const ModuleRegistryWrapper = await deployer.wrapDeployedContract(ModuleRegistry, config.contracts.ModuleRegistry); - const MultiSigWrapper = await deployer.wrapDeployedContract(MultiSig, config.contracts.MultiSigWallet); + const ModuleRegistryWrapper = await ModuleRegistry.at(config.contracts.ModuleRegistry); + const MultiSigWrapper = await MultiSig.at(config.contracts.MultiSigWallet); const multisigExecutor = new MultisigExecutor(MultiSigWrapper, deploymentWallet, config.multisig.autosign); const UpgraderWrapper = await deployer.deploy( @@ -40,7 +40,7 @@ async function deploy() { ); await multisigExecutor.executeCall(ModuleRegistryWrapper, "registerUpgrader", - [UpgraderWrapper.contractAddress, utils.asciiToBytes32(upgraderName)]); + [UpgraderWrapper.address, utils.asciiToBytes32(upgraderName)]); } module.exports = { diff --git a/scripts/deploy_defi.js b/scripts/deploy_defi.js index 1b48113b4..d1846bbad 100644 --- a/scripts/deploy_defi.js +++ b/scripts/deploy_defi.js @@ -52,19 +52,19 @@ async function deploy() { const pip = await deployer.deploy(DSValue); const pep = await deployer.deploy(DSValue); const tub = await deployer.deploy(Tub, {}, - sai.contractAddress, - sin.contractAddress, - skr.contractAddress, - gem.contractAddress, - gov.contractAddress, - pip.contractAddress, - pep.contractAddress, - vox.contractAddress, + sai.address, + sin.address, + skr.address, + gem.address, + gov.address, + pip.address, + pep.address, + vox.address, manager); // let the Tub mint PETH and DAI - await skr.setOwner(tub.contractAddress); - await sai.setOwner(tub.contractAddress); + await skr.setOwner(tub.address); + await sai.setOwner(tub.address); // setup USD/ETH oracle with a convertion rate of 100 USD/ETH await pip.poke(`0x${USD_PER_ETH.toHexString().slice(2).padStart(64, "0")}`); // setup USD/MKR oracle with a convertion rate of 400 USD/MKR @@ -82,7 +82,7 @@ async function deploy() { const uniswapFactory = await deployer.deploy(UniswapFactory); const uniswapTemplateExchange = await deployer.deploy(UniswapExchange); - await uniswapFactory.initializeFactory(uniswapTemplateExchange.contractAddress); + await uniswapFactory.initializeFactory(uniswapTemplateExchange.address); /* *************** create MKR exchange ***************** */ @@ -90,23 +90,23 @@ async function deploy() { const mkrLiquidity = ethLiquidity.mul(WAD).div(ETH_PER_MKR); await gov["mint(address,uint256)"](manager, mkrLiquidity); - await uniswapFactory.createExchange(gov.contractAddress, { gasLimit: 450000 }); + await uniswapFactory.createExchange(gov.address, { gasLimit: 450000 }); let exchange = "0x0000000000000000000000000000000000000000"; while (exchange === "0x0000000000000000000000000000000000000000") { - exchange = await uniswapFactory.getExchange(gov.contractAddress); + exchange = await uniswapFactory.getExchange(gov.address); console.log("exchange: ", exchange); await sleep(5000); } - const mkrExchange = await deployer.wrapDeployedContract(UniswapExchange, exchange); - await gov.approve(mkrExchange.contractAddress, mkrLiquidity); + const mkrExchange = await UniswapExchange.at(exchange); + await gov.approve(mkrExchange.address, mkrLiquidity); const timestamp = await getTimestamp(deployer); await mkrExchange.addLiquidity(1, mkrLiquidity, timestamp + 300, { value: ethLiquidity, gasLimit: 250000 }); console.log("******* contracts *******"); - console.log(`DAI: ${sai.contractAddress}`); - console.log(`MKR: ${gov.contractAddress}`); - console.log(`MAKER TUB: ${tub.contractAddress}`); - console.log(`UNISWAP FACTORY: ${uniswapFactory.contractAddress}`); + console.log(`DAI: ${sai.address}`); + console.log(`MKR: ${gov.address}`); + console.log(`MAKER TUB: ${tub.address}`); + console.log(`UNISWAP FACTORY: ${uniswapFactory.address}`); console.log("********************************"); } diff --git a/scripts/update_compound_registry.js b/scripts/update_compound_registry.js index 7e4ca09c2..45d6ab83e 100644 --- a/scripts/update_compound_registry.js +++ b/scripts/update_compound_registry.js @@ -53,8 +53,8 @@ async function main() { const deploymentWallet = deployer.signer; const { config } = configurator; - const CompoundRegistryWrapper = await deployer.wrapDeployedContract(CompoundRegistry, config.contracts.CompoundRegistry); - const MultiSigWrapper = await deployer.wrapDeployedContract(MultiSig, config.contracts.MultiSigWallet); + const CompoundRegistryWrapper = await CompoundRegistry.at(config.contracts.CompoundRegistry); + const MultiSigWrapper = await MultiSig.at(config.contracts.MultiSigWallet); const multisigExecutor = new MultisigExecutor(MultiSigWrapper, deploymentWallet, config.multisig.autosign); if (add) { diff --git a/scripts/update_multisig_threshold.js b/scripts/update_multisig_threshold.js index 4f7a050c5..3a3e7e421 100644 --- a/scripts/update_multisig_threshold.js +++ b/scripts/update_multisig_threshold.js @@ -30,7 +30,7 @@ async function main() { const deploymentWallet = deployer.signer; const { config } = configurator; - const MultiSigWrapper = await deployer.wrapDeployedContract(MultiSig, config.contracts.MultiSigWallet); + const MultiSigWrapper = await MultiSig.at(config.contracts.MultiSigWallet); const multisigExecutor = new MultisigExecutor(MultiSigWrapper, deploymentWallet, config.multisig.autosign); // deregister diff --git a/scripts/update_wallet_in_factory.js b/scripts/update_wallet_in_factory.js index a2a94dea7..1b38de6d5 100644 --- a/scripts/update_wallet_in_factory.js +++ b/scripts/update_wallet_in_factory.js @@ -31,21 +31,21 @@ async function main() { // Deploy new BaseWallet console.log("Deploying new BaseWallet..."); - const BaseWalletWrapper = await deployer.deploy(BaseWallet); + const BaseWalletWrapper = await BaseWallet.new(); // Setup WalletFactory with new BaseWallet console.log("Setting up WalletFactory with new BaseWallet..."); - const walletFactoryWrapper = await deployer.wrapDeployedContract(WalletFactory, config.contracts.WalletFactory); - const multisigWrapper = await deployer.wrapDeployedContract(MultiSigWallet, config.contracts.MultiSigWallet); + const walletFactoryWrapper = await WalletFactory.at(config.contracts.WalletFactory); + const multisigWrapper = await MultiSigWallet.at(config.contracts.MultiSigWallet); const multisigExecutor = new MultisigExecutor(multisigWrapper, manager, config.multisig.autosign); await multisigExecutor.executeCall( walletFactoryWrapper, "changeWalletImplementation", - [BaseWalletWrapper.contractAddress], + [BaseWalletWrapper.address], ); console.log("Saving new config..."); - configurator.updateInfrastructureAddresses({ BaseWallet: BaseWalletWrapper.contractAddress }); + configurator.updateInfrastructureAddresses({ BaseWallet: BaseWalletWrapper.address }); await configurator.save(); await deployManager.abiUploader.upload(BaseWalletWrapper, "contracts"); diff --git a/test/approvedTransfer.js b/test/approvedTransfer.js index 529738936..fdbd68ced 100644 --- a/test/approvedTransfer.js +++ b/test/approvedTransfer.js @@ -49,55 +49,55 @@ contract("ApprovedTransfer", (accounts) => { before(async () => { deployer = manager.newDeployer(); - weth = await deployer.deploy(WETH); - const registry = await deployer.deploy(Registry); - const lockStorage = await deployer.deploy(LockStorage); - const guardianStorage = await deployer.deploy(GuardianStorage); - const limitStorage = await deployer.deploy(LimitStorage); - versionManager = await deployer.deploy(VersionManager, {}, - registry.contractAddress, - lockStorage.contractAddress, - guardianStorage.contractAddress, + weth = await WETH.new() + const registry = await Registry.new() + const lockStorage = await LockStorage.new() + const guardianStorage = await GuardianStorage.new() + const limitStorage = await LimitStorage.new() + versionManager = await VersionManager.new( + registry.address, + lockStorage.address, + guardianStorage.address, ethers.constants.AddressZero, - limitStorage.contractAddress); - guardianManager = await deployer.deploy(GuardianManager, {}, - lockStorage.contractAddress, - guardianStorage.contractAddress, - versionManager.contractAddress, + limitStorage.address); + guardianManager = await GuardianManager.new( + lockStorage.address, + guardianStorage.address, + versionManager.address, 24, 12); - approvedTransfer = await deployer.deploy(ApprovedTransfer, {}, - lockStorage.contractAddress, - guardianStorage.contractAddress, - limitStorage.contractAddress, - versionManager.contractAddress, - weth.contractAddress); - relayerManager = await deployer.deploy(RelayerManager, {}, - lockStorage.contractAddress, - guardianStorage.contractAddress, - limitStorage.contractAddress, + approvedTransfer = await ApprovedTransfer.new( + lockStorage.address, + guardianStorage.address, + limitStorage.address, + versionManager.address, + weth.address); + relayerManager = await RelayerManager.new( + lockStorage.address, + guardianStorage.address, + limitStorage.address, ethers.constants.AddressZero, - versionManager.contractAddress); + versionManager.address); manager.setRelayerManager(relayerManager); - walletImplementation = await deployer.deploy(BaseWallet); + walletImplementation = await BaseWallet.new(); - limitFeature = await deployer.deploy(TestLimitFeature, {}, - guardianStorage.contractAddress, limitStorage.contractAddress, versionManager.contractAddress); + limitFeature = await TestLimitFeature.new( + guardianStorage.address, limitStorage.address, versionManager.address); await versionManager.addVersion([ - approvedTransfer.contractAddress, guardianManager.contractAddress, relayerManager.contractAddress, limitFeature.contractAddress, + approvedTransfer.address, guardianManager.address, relayerManager.address, limitFeature.address, ], []); }); beforeEach(async () => { - const proxy = await deployer.deploy(Proxy, {}, walletImplementation.contractAddress); - wallet = deployer.wrapDeployedContract(BaseWallet, proxy.contractAddress); + const proxy = await Proxy.new(walletImplementation.address); + wallet = BaseWallet.at(proxy.address); - await wallet.init(owner, [versionManager.contractAddress]); - await versionManager.from(owner).upgradeWallet(wallet.contractAddress, await versionManager.lastVersion()); + await wallet.init(owner, [versionManager.address]); + await versionManager.from(owner).upgradeWallet(wallet.address, await versionManager.lastVersion()); const decimals = 12; // number of decimal for TOKN contract - erc20 = await deployer.deploy(ERC20, {}, [infrastructure, wallet.contractAddress], 10000000, decimals); // TOKN contract with 10M tokens (5M TOKN for wallet and 5M TOKN for account[0]) + erc20 = await ERC20.new([infrastructure, wallet.address], 10000000, decimals); // TOKN contract with 10M tokens (5M TOKN for wallet and 5M TOKN for account[0]) await wallet.send(50000000); }); @@ -105,18 +105,18 @@ contract("ApprovedTransfer", (accounts) => { // guardians can be BaseWallet or ContractWrapper objects const guardianAddresses = guardians.map((guardian) => { if (guardian) return guardian; - return guardian.contractAddress; + return guardian.address; }); for (const address of guardianAddresses) { - await guardianManager.from(owner).addGuardian(wallet.contractAddress, address); + await guardianManager.from(owner).addGuardian(wallet.address, address); } await manager.increaseTime(30); for (let i = 1; i < guardianAddresses.length; i += 1) { - await guardianManager.confirmGuardianAddition(wallet.contractAddress, guardianAddresses[i]); + await guardianManager.confirmGuardianAddition(wallet.address, guardianAddresses[i]); } - const count = (await guardianManager.guardianCount(wallet.contractAddress)).toNumber(); + const count = (await guardianManager.guardianCount(wallet.address)).toNumber(); assert.equal(count, guardians.length, `${guardians.length} guardians should be added`); } @@ -124,8 +124,8 @@ contract("ApprovedTransfer", (accounts) => { const wallets = []; for (const g of guardians) { const guardianWallet = await deployer.deploy(BaseWallet); - await guardianWallet.init(g, [versionManager.contractAddress]); - await versionManager.from(g).upgradeWallet(guardianWallet.contractAddress, await versionManager.lastVersion()); + await guardianWallet.init(g, [versionManager.address]); + await versionManager.from(g).upgradeWallet(guardianWallet.address, await versionManager.lastVersion()); wallets.push(guardianWallet); } return wallets; @@ -135,18 +135,18 @@ contract("ApprovedTransfer", (accounts) => { const to = recipient; const before = _token === ETH_TOKEN ? await deployer.provider.getBalance(to) : await erc20.balanceOf(to); await manager.relay(approvedTransfer, "transferToken", - [wallet.contractAddress, _token, to, amountToTransfer, ZERO_BYTES32], wallet, _signers); + [wallet.address, _token, to, amountToTransfer, ZERO_BYTES32], wallet, _signers); const after = _token === ETH_TOKEN ? await deployer.provider.getBalance(to) : await erc20.balanceOf(to); assert.equal(after.sub(before).toNumber(), amountToTransfer, "should have transfered the amount"); } async function callContract(_signers) { - const before = await deployer.provider.getBalance(contract.contractAddress); + const before = await deployer.provider.getBalance(contract.address); const newState = parseInt((await contract.state()).toString(), 10) + 1; const dataToTransfer = contract.contract.interface.functions.setState.encode([newState]); await manager.relay(approvedTransfer, "callContract", - [wallet.contractAddress, contract.contractAddress, amountToTransfer, dataToTransfer], wallet, _signers); - const after = await deployer.provider.getBalance(contract.contractAddress); + [wallet.address, contract.address, amountToTransfer, dataToTransfer], wallet, _signers); + const after = await deployer.provider.getBalance(contract.address); assert.equal(after.sub(before).toNumber(), amountToTransfer, "should have transfered the ETH amount"); assert.equal((await contract.state()).toNumber(), newState, "the state of the external contract should have been changed"); } @@ -157,7 +157,7 @@ contract("ApprovedTransfer", (accounts) => { manager.relay( approvedTransfer, "transferToken", - [wallet.contractAddress, _token, recipient, amountToTransfer, ZERO_BYTES32], + [wallet.address, _token, recipient, amountToTransfer, ZERO_BYTES32], wallet, _signers, ), _reason, @@ -180,7 +180,7 @@ contract("ApprovedTransfer", (accounts) => { await expectFailingTransferToken(ETH_TOKEN, [owner, guardian2], INVALID_SIGNATURES_REVERT_MSG); }); it("should transfer ERC20 with 1 confirmation for 1 guardian", async () => { - await transferToken(erc20.contractAddress, [owner, guardian1]); + await transferToken(erc20.address, [owner, guardian1]); }); }); describe("2 guardians", () => { @@ -202,10 +202,10 @@ contract("ApprovedTransfer", (accounts) => { await transferToken(ETH_TOKEN, [owner, ...sortWalletByAddress([guardian1, guardian2])]); }); it("should fail to transfer ERC20 with 1 confirmation for 3 guardians", async () => { - await expectFailingTransferToken(erc20.contractAddress, [owner, guardian1], WRONG_SIGNATURE_NUMBER_REVERT_MSG); + await expectFailingTransferToken(erc20.address, [owner, guardian1], WRONG_SIGNATURE_NUMBER_REVERT_MSG); }); it("should transfer ERC20 with 2 confirmations for 3 guardians", async () => { - await transferToken(erc20.contractAddress, [owner, ...sortWalletByAddress([guardian1, guardian2])]); + await transferToken(erc20.address, [owner, ...sortWalletByAddress([guardian1, guardian2])]); }); }); }); @@ -219,7 +219,7 @@ contract("ApprovedTransfer", (accounts) => { await transferToken(ETH_TOKEN, [owner, guardian1]); }); it("should transfer ERC20 with 1 confirmation for 1 guardian", async () => { - await transferToken(erc20.contractAddress, [owner, guardian1]); + await transferToken(erc20.address, [owner, guardian1]); }); }); describe("2 guardians", () => { @@ -241,10 +241,10 @@ contract("ApprovedTransfer", (accounts) => { await transferToken(ETH_TOKEN, [owner, ...sortWalletByAddress([guardian1, guardian2])]); }); it("should not transfer ERC20 with 1 confirmations for 3 guardians", async () => { - await expectFailingTransferToken(erc20.contractAddress, [owner, guardian1], WRONG_SIGNATURE_NUMBER_REVERT_MSG); + await expectFailingTransferToken(erc20.address, [owner, guardian1], WRONG_SIGNATURE_NUMBER_REVERT_MSG); }); it("should transfer ERC20 with 2 confirmations for 3 guardians", async () => { - await transferToken(erc20.contractAddress, [owner, ...sortWalletByAddress([guardian1, guardian2])]); + await transferToken(erc20.address, [owner, ...sortWalletByAddress([guardian1, guardian2])]); }); }); }); @@ -274,7 +274,7 @@ contract("ApprovedTransfer", (accounts) => { manager.relay( approvedTransfer, "callContract", - [wallet.contractAddress, contract.contractAddress, amountToTransfer, dataToTransfer], + [wallet.address, contract.address, amountToTransfer, dataToTransfer], wallet, [owner], ), @@ -284,7 +284,7 @@ contract("ApprovedTransfer", (accounts) => { describe("Approved by 1 EOA and 2 smart-contract guardians", () => { beforeEach(async () => { - contract = await deployer.deploy(TestContract); + contract = await TestContract.new(); assert.equal(await contract.state(), 0, "initial contract state should be 0"); await addGuardians([guardian1, ...(await createSmartContractGuardians([guardian2, guardian3]))]); }); @@ -297,7 +297,7 @@ contract("ApprovedTransfer", (accounts) => { it("should not be able to call the wallet itself", async () => { const txReceipt = await manager.relay(approvedTransfer, "callContract", - [wallet.contractAddress, wallet.contractAddress, amountToTransfer, ethers.constants.HashZero], + [wallet.address, wallet.address, amountToTransfer, ethers.constants.HashZero], wallet, [owner, ...sortWalletByAddress([guardian1, guardian2])]); const { success, error } = parseRelayReceipt(txReceipt); @@ -312,16 +312,16 @@ contract("ApprovedTransfer", (accounts) => { const amountToApprove = 10000; beforeEach(async () => { - contract = await deployer.deploy(TestContract); + contract = await TestContract.new(); assert.equal(await contract.state(), 0, "initial contract state should be 0"); await addGuardians([guardian1, ...(await createSmartContractGuardians([guardian2, guardian3]))]); }); describe("Invalid Target", () => { async function expectFailingApproveTokenAndCallContract(target) { - const invalidData = contract.contract.interface.functions.setStateAndPayToken.encode([2, erc20.contractAddress, amountToApprove]); + const invalidData = contract.contract.interface.functions.setStateAndPayToken.encode([2, erc20.address, amountToApprove]); const txReceipt = await manager.relay(approvedTransfer, "approveTokenAndCallContract", - [wallet.contractAddress, erc20.contractAddress, wallet.contractAddress, amountToApprove, target.contractAddress, invalidData], + [wallet.address, erc20.address, wallet.address, amountToApprove, target.address, invalidData], wallet, [owner, ...sortWalletByAddress([guardian1, guardian2])]); const { success } = parseRelayReceipt(txReceipt); assert.isFalse(success); @@ -337,17 +337,17 @@ contract("ApprovedTransfer", (accounts) => { }); describe("Valid Target", () => { - async function approveTokenAndCallContract(_signers, _consumerAddress = contract.contractAddress, _wrapEth = false) { + async function approveTokenAndCallContract(_signers, _consumerAddress = contract.address, _wrapEth = false) { const newState = parseInt((await contract.state()).toString(), 10) + 1; const token = _wrapEth ? weth : erc20; - const fun = _consumerAddress === contract.contractAddress ? "setStateAndPayToken" : "setStateAndPayTokenWithConsumer"; + const fun = _consumerAddress === contract.address ? "setStateAndPayToken" : "setStateAndPayTokenWithConsumer"; const data = contract.contract.interface.functions[fun].encode( - [newState, token.contractAddress, amountToApprove], + [newState, token.address, amountToApprove], ); - const before = await token.balanceOf(contract.contractAddress); - const params = [wallet.contractAddress] - .concat(_wrapEth ? [] : [erc20.contractAddress]) - .concat([_consumerAddress, amountToApprove, contract.contractAddress, data]); + const before = await token.balanceOf(contract.address); + const params = [wallet.address] + .concat(_wrapEth ? [] : [erc20.address]) + .concat([_consumerAddress, amountToApprove, contract.address, data]); const method = _wrapEth ? "approveWethAndCallContract" : "approveTokenAndCallContract"; await manager.relay( approvedTransfer, @@ -356,7 +356,7 @@ contract("ApprovedTransfer", (accounts) => { wallet, _signers, ); - const after = await token.balanceOf(contract.contractAddress); + const after = await token.balanceOf(contract.address); assert.equal(after.sub(before).toNumber(), amountToApprove, "should have approved and transfered the token amount"); assert.equal((await contract.state()).toNumber(), newState, "the state of the external contract should have been changed"); } @@ -368,9 +368,9 @@ contract("ApprovedTransfer", (accounts) => { }); it("should approve WETH for a spender then call a contract with 3 guardians, spender = contract", async () => { - await approveTokenAndCallContract([owner, ...sortWalletByAddress([guardian1, guardian2])], contract.contractAddress, true); - await approveTokenAndCallContract([owner, ...sortWalletByAddress([guardian1, guardian3])], contract.contractAddress, true); - await approveTokenAndCallContract([owner, ...sortWalletByAddress([guardian2, guardian3])], contract.contractAddress, true); + await approveTokenAndCallContract([owner, ...sortWalletByAddress([guardian1, guardian2])], contract.address, true); + await approveTokenAndCallContract([owner, ...sortWalletByAddress([guardian1, guardian3])], contract.address, true); + await approveTokenAndCallContract([owner, ...sortWalletByAddress([guardian2, guardian3])], contract.address, true); }); it("should approve token for a spender then call a contract with 3 guardians, spender != contract", async () => { @@ -382,20 +382,20 @@ contract("ApprovedTransfer", (accounts) => { it("should restore the original approved amount", async () => { const consumer = await contract.tokenConsumer(); - const allowanceBefore = await erc20.allowance(wallet.contractAddress, consumer); - const balanceBefore = await erc20.balanceOf(contract.contractAddress); + const allowanceBefore = await erc20.allowance(wallet.address, consumer); + const balanceBefore = await erc20.balanceOf(contract.address); const dataToTransfer = contract.contract.interface.functions - .setStateAndPayTokenWithConsumer.encode([2, erc20.contractAddress, amountToApprove]); + .setStateAndPayTokenWithConsumer.encode([2, erc20.address, amountToApprove]); await manager.relay(approvedTransfer, "approveTokenAndCallContract", - [wallet.contractAddress, erc20.contractAddress, consumer, amountToApprove, contract.contractAddress, dataToTransfer], + [wallet.address, erc20.address, consumer, amountToApprove, contract.address, dataToTransfer], wallet, [owner, ...sortWalletByAddress([guardian1, guardian2])]); - const balanceAfter = await erc20.balanceOf(contract.contractAddress); + const balanceAfter = await erc20.balanceOf(contract.address); assert.equal(balanceAfter.sub(balanceBefore).toNumber(), amountToApprove, "should have approved and transfered the token amount"); assert.equal((await contract.state()).toNumber(), 2, "the state of the external contract should have been changed"); - const allowanceAfter = await erc20.allowance(wallet.contractAddress, consumer); + const allowanceAfter = await erc20.allowance(wallet.address, consumer); assert.equal(allowanceAfter.toNumber(), allowanceBefore.toNumber()); }); }); @@ -405,38 +405,38 @@ contract("ApprovedTransfer", (accounts) => { describe("Daily Limit", () => { beforeEach(async () => { await addGuardians([guardian1]); - await limitFeature.setLimitAndDailySpent(wallet.contractAddress, 1000000, 500); + await limitFeature.setLimitAndDailySpent(wallet.address, 1000000, 500); }); it("should change the limit immediately", async () => { - let limit = await limitFeature.getLimit(wallet.contractAddress); + let limit = await limitFeature.getLimit(wallet.address); assert.equal(limit.toNumber(), 1000000, "limit should be 1000000"); - await manager.relay(approvedTransfer, "changeLimit", [wallet.contractAddress, 4000000], wallet, [owner, guardian1]); - limit = await limitFeature.getLimit(wallet.contractAddress); + await manager.relay(approvedTransfer, "changeLimit", [wallet.address, 4000000], wallet, [owner, guardian1]); + limit = await limitFeature.getLimit(wallet.address); assert.equal(limit.toNumber(), 4000000, "limit should be changed immediately"); }); it("should reset the daily consumption", async () => { - let dailySpent = await limitFeature.getDailySpent(wallet.contractAddress); + let dailySpent = await limitFeature.getDailySpent(wallet.address); assert.equal(dailySpent.toNumber(), 500, "dailySpent should be 500"); - await manager.relay(approvedTransfer, "resetDailySpent", [wallet.contractAddress], wallet, [owner, guardian1]); - dailySpent = await limitFeature.getDailySpent(wallet.contractAddress); + await manager.relay(approvedTransfer, "resetDailySpent", [wallet.address], wallet, [owner, guardian1]); + dailySpent = await limitFeature.getDailySpent(wallet.address); assert.equal(dailySpent.toNumber(), 0, "dailySpent should be 0"); }); it("should reset the daily consumption after a transfer", async () => { - let dailySpent = await limitFeature.getDailySpent(wallet.contractAddress); + let dailySpent = await limitFeature.getDailySpent(wallet.address); assert.equal(dailySpent.toNumber(), 500, "dailySpent should be 500"); await transferToken(ETH_TOKEN, [owner, guardian1]); - dailySpent = await limitFeature.getDailySpent(wallet.contractAddress); + dailySpent = await limitFeature.getDailySpent(wallet.address); assert.equal(dailySpent.toNumber(), 0, "dailySpent should be 0"); }); it("should reset the daily consumption after a call contract", async () => { - let dailySpent = await limitFeature.getDailySpent(wallet.contractAddress); + let dailySpent = await limitFeature.getDailySpent(wallet.address); assert.equal(dailySpent.toNumber(), 500, "dailySpent should be 500"); await callContract([owner, guardian1]); - dailySpent = await limitFeature.getDailySpent(wallet.contractAddress); + dailySpent = await limitFeature.getDailySpent(wallet.address); assert.equal(dailySpent.toNumber(), 0, "dailySpent should be 0"); }); }); diff --git a/test/baseContracts.js b/test/baseContracts.js index 454889b62..de27aab3d 100644 --- a/test/baseContracts.js +++ b/test/baseContracts.js @@ -21,7 +21,7 @@ contract("Managed and Owned", (accounts) => { }); beforeEach(async () => { - managed = await deployer.deploy(Managed); + managed = await Managed.new(); }); describe("Owned contract logic", () => { diff --git a/test/baseModule.js b/test/baseModule.js index 7bf916ea0..af8a90906 100644 --- a/test/baseModule.js +++ b/test/baseModule.js @@ -24,43 +24,43 @@ contract("BaseModule", (accounts) => { }); beforeEach(async () => { - registry = await deployer.deploy(Registry); - guardianStorage = await deployer.deploy(GuardianStorage); - token = await deployer.deploy(ERC20, {}, [owner], 10, 18); + registry = await Registry.new(); + guardianStorage = await GuardianStorage.new(); + token = await ERC20.new([owner], 10, 18); - baseModule = await deployer.deploy(BaseModule, {}, registry.contractAddress, guardianStorage.contractAddress); + baseModule = await BaseModule.new(registry.address, guardianStorage.address); }); describe("Recover tokens", async () => { it("should be able to recover ERC20 tokens sent to the module", async () => { - let balance = await token.balanceOf(baseModule.contractAddress); + let balance = await token.balanceOf(baseModule.address); assert.equal(balance, 0); - await token.from(owner).transfer(baseModule.contractAddress, 10000000); - balance = await token.balanceOf(baseModule.contractAddress); + await token.from(owner).transfer(baseModule.address, 10000000); + balance = await token.balanceOf(baseModule.address); assert.equal(balance, 10000000); - await baseModule.recoverToken(token.contractAddress); + await baseModule.recoverToken(token.address); - balance = await token.balanceOf(baseModule.contractAddress); + balance = await token.balanceOf(baseModule.address); assert.equal(balance, 0); - const moduleregistryBalance = await token.balanceOf(registry.contractAddress); + const moduleregistryBalance = await token.balanceOf(registry.address); assert.equal(moduleregistryBalance, 10000000); }); it("should be able to recover non-ERC20 compliant tokens sent to the module", async () => { - const nonCompliantToken = await deployer.deploy(NonCompliantERC20, {}); - await nonCompliantToken.mint(baseModule.contractAddress, 10000000); - let balance = await nonCompliantToken.balanceOf(baseModule.contractAddress); + const nonCompliantToken = await NonCompliantERC20.new(); + await nonCompliantToken.mint(baseModule.address, 10000000); + let balance = await nonCompliantToken.balanceOf(baseModule.address); assert.equal(balance, 10000000); - await baseModule.recoverToken(nonCompliantToken.contractAddress); + await baseModule.recoverToken(nonCompliantToken.address); - balance = await nonCompliantToken.balanceOf(baseModule.contractAddress); + balance = await nonCompliantToken.balanceOf(baseModule.address); assert.equal(balance, 0); - const moduleregistryBalance = await nonCompliantToken.balanceOf(registry.contractAddress); + const moduleregistryBalance = await nonCompliantToken.balanceOf(registry.address); assert.equal(moduleregistryBalance, 10000000); }); }); diff --git a/test/baseWallet.js b/test/baseWallet.js index 6686e532b..098402ccd 100644 --- a/test/baseWallet.js +++ b/test/baseWallet.js @@ -33,72 +33,72 @@ contract("BaseWallet", (accounts) => { async function deployTestModule() { const module = await deployer.deploy(VersionManager, {}, - registry.contractAddress, - lockStorage.contractAddress, - guardianStorage.contractAddress, + registry.address, + lockStorage.address, + guardianStorage.address, ethers.constants.AddressZero, ethers.constants.AddressZero); const feature = await deployer.deploy(TestFeature, {}, - lockStorage.contractAddress, - module.contractAddress, + lockStorage.address, + module.address, 42); - await module.addVersion([feature.contractAddress], []); + await module.addVersion([feature.address], []); return { module, feature }; } before(async () => { deployer = manager.newDeployer(); - registry = await deployer.deploy(Registry); - guardianStorage = await deployer.deploy(GuardianStorage); - lockStorage = await deployer.deploy(LockStorage); + registry = await Registry.new(); + guardianStorage = await GuardianStorage.new(); + lockStorage = await LockStorage.new(); const mod = await deployTestModule(); [module1, feature1] = [mod.module, mod.feature]; module2 = (await deployTestModule()).module; module3 = (await deployTestModule()).module; - walletImplementation = await deployer.deploy(BaseWallet); + walletImplementation = await BaseWallet.new(); }); beforeEach(async () => { - const proxy = await deployer.deploy(Proxy, {}, walletImplementation.contractAddress); - wallet = deployer.wrapDeployedContract(BaseWallet, proxy.contractAddress); + const proxy = await Proxy.new(walletImplementation.address); + wallet = BaseWallet.at(proxy.address); }); describe("Registering modules", () => { it("should register a module with the correct info", async () => { const name = ethers.utils.formatBytes32String("module1"); - await registry.registerModule(module1.contractAddress, name); - const isRegistered = await registry["isRegisteredModule(address)"](module1.contractAddress); + await registry.registerModule(module1.address, name); + const isRegistered = await registry["isRegisteredModule(address)"](module1.address); assert.isTrue(isRegistered, "module should be registered"); - const info = await registry.moduleInfo(module1.contractAddress); + const info = await registry.moduleInfo(module1.address); assert.equal(name, info, "name should be correct"); }); it("should deregister a module", async () => { const name = ethers.utils.formatBytes32String("module2"); - await registry.registerModule(module2.contractAddress, name); - let isRegistered = await registry["isRegisteredModule(address)"](module2.contractAddress); + await registry.registerModule(module2.address, name); + let isRegistered = await registry["isRegisteredModule(address)"](module2.address); assert.isTrue(isRegistered, "module should be registered"); - await registry.deregisterModule(module2.contractAddress); - isRegistered = await registry["isRegisteredModule(address)"](module2.contractAddress); + await registry.deregisterModule(module2.address); + isRegistered = await registry["isRegisteredModule(address)"](module2.address); assert.isFalse(isRegistered, "module should be deregistered"); }); it("should register an upgrader with the correct info", async () => { const name = ethers.utils.formatBytes32String("upgrader1"); - await registry.registerUpgrader(module1.contractAddress, name); - const isRegistered = await registry.isRegisteredUpgrader(module1.contractAddress); + await registry.registerUpgrader(module1.address, name); + const isRegistered = await registry.isRegisteredUpgrader(module1.address); assert.isTrue(isRegistered, "module should be registered"); - const info = await registry.upgraderInfo(module1.contractAddress); + const info = await registry.upgraderInfo(module1.address); assert.equal(name, info, "name should be correct"); }); it("should deregister an upgrader", async () => { const name = ethers.utils.formatBytes32String("upgrader2"); - await registry.registerUpgrader(module2.contractAddress, name); - let isRegistered = await registry.isRegisteredUpgrader(module2.contractAddress); + await registry.registerUpgrader(module2.address, name); + let isRegistered = await registry.isRegisteredUpgrader(module2.address); assert.isTrue(isRegistered, "upgrader should be registered"); - await registry.deregisterUpgrader(module2.contractAddress); - isRegistered = await registry.isRegisteredUpgrader(module2.contractAddress); + await registry.deregisterUpgrader(module2.address); + isRegistered = await registry.isRegisteredUpgrader(module2.address); assert.isFalse(isRegistered, "upgrader should be deregistered"); }); }); @@ -108,28 +108,28 @@ contract("BaseWallet", (accounts) => { it("should create a wallet with the correct owner", async () => { let walletOwner = await wallet.owner(); assert.equal(walletOwner, "0x0000000000000000000000000000000000000000", "owner should be null before init"); - await wallet.init(owner, [module1.contractAddress]); - await module1.upgradeWallet(wallet.contractAddress, await module1.lastVersion(), { from: owner }); + await wallet.init(owner, [module1.address]); + await module1.upgradeWallet(wallet.address, await module1.lastVersion(), { from: owner }); walletOwner = await wallet.owner(); assert.equal(walletOwner, owner, "owner should be the owner after init"); }); it("should create a wallet with the correct modules", async () => { - await wallet.init(owner, [module1.contractAddress, module2.contractAddress]); - await module1.upgradeWallet(wallet.contractAddress, await module1.lastVersion(), { from: owner }); - await module2.upgradeWallet(wallet.contractAddress, await module2.lastVersion(), { from: owner }); - const module1IsAuthorised = await wallet.authorised(module1.contractAddress); - const module2IsAuthorised = await wallet.authorised(module2.contractAddress); - const module3IsAuthorised = await wallet.authorised(module3.contractAddress); + await wallet.init(owner, [module1.address, module2.address]); + await module1.upgradeWallet(wallet.address, await module1.lastVersion(), { from: owner }); + await module2.upgradeWallet(wallet.address, await module2.lastVersion(), { from: owner }); + const module1IsAuthorised = await wallet.authorised(module1.address); + const module2IsAuthorised = await wallet.authorised(module2.address); + const module3IsAuthorised = await wallet.authorised(module3.address); assert.equal(module1IsAuthorised, true, "module1 should be authorised"); assert.equal(module2IsAuthorised, true, "module2 should be authorised"); assert.equal(module3IsAuthorised, false, "module3 should not be authorised"); }); it("should not reinitialize a wallet", async () => { - await wallet.init(owner, [module1.contractAddress]); - await module1.upgradeWallet(wallet.contractAddress, await module1.lastVersion(), { from: owner }); - await assert.revertWith(wallet.init(owner, [module1.contractAddress]), "BW: wallet already initialised"); + await wallet.init(owner, [module1.address]); + await module1.upgradeWallet(wallet.address, await module1.lastVersion(), { from: owner }); + await assert.revertWith(wallet.init(owner, [module1.address]), "BW: wallet already initialised"); }); it("should not initialize a wallet with no module", async () => { @@ -137,47 +137,47 @@ contract("BaseWallet", (accounts) => { }); it("should not initialize a wallet with duplicate modules", async () => { - await assert.revertWith(wallet.init(owner, [module1.contractAddress, module1.contractAddress]), "BW: module is already added"); + await assert.revertWith(wallet.init(owner, [module1.address, module1.address]), "BW: module is already added"); }); }); describe("Receiving ETH", () => { it("should accept ETH", async () => { - const before = await deployer.provider.getBalance(wallet.contractAddress); + const before = await deployer.provider.getBalance(wallet.address); await wallet.send(50000000); - const after = await deployer.provider.getBalance(wallet.contractAddress); + const after = await deployer.provider.getBalance(wallet.address); assert.equal(after.sub(before).toNumber(), 50000000, "should have received ETH"); }); it("should accept ETH with data", async () => { - const before = await deployer.provider.getBalance(wallet.contractAddress); + const before = await deployer.provider.getBalance(wallet.address); await wallet.send(50000000, { data: 0x1234 }); - const after = await deployer.provider.getBalance(wallet.contractAddress); + const after = await deployer.provider.getBalance(wallet.address); assert.equal(after.sub(before).toNumber(), 50000000, "should have received ETH"); }); }); describe("Authorisations", () => { it("should not let a non-module deauthorise a module", async () => { - await wallet.init(owner, [module1.contractAddress]); - await assert.revertWith(wallet.authoriseModule(module1.contractAddress, false), "BW: msg.sender not an authorized module"); + await wallet.init(owner, [module1.address]); + await assert.revertWith(wallet.authoriseModule(module1.address, false), "BW: msg.sender not an authorized module"); }); it("should not let a feature set the owner to address(0)", async () => { - await wallet.init(owner, [module1.contractAddress]); - await module1.upgradeWallet(wallet.contractAddress, await module1.lastVersion(), { from: owner }); + await wallet.init(owner, [module1.address]); + await module1.upgradeWallet(wallet.address, await module1.lastVersion(), { from: owner }); - await assert.revertWith(feature1.invalidOwnerChange(wallet.contractAddress), "BW: address cannot be null"); + await assert.revertWith(feature1.invalidOwnerChange(wallet.address), "BW: address cannot be null"); }); }); describe("Static calls", () => { it("should delegate static calls to the modules", async () => { - await wallet.init(owner, [module1.contractAddress]); - await module1.upgradeWallet(wallet.contractAddress, await module1.lastVersion(), { from: owner }); - const module1IsAuthorised = await wallet.authorised(module1.contractAddress); + await wallet.init(owner, [module1.address]); + await module1.upgradeWallet(wallet.address, await module1.lastVersion(), { from: owner }); + const module1IsAuthorised = await wallet.authorised(module1.address); assert.equal(module1IsAuthorised, true, "module1 should be authorised"); - const walletAsFeature = deployer.wrapDeployedContract(TestFeature, wallet.contractAddress); + const walletAsFeature = deployer.wrapDeployedContract(TestFeature, wallet.address); const boolVal = await walletAsFeature.contract.getBoolean(); const uintVal = await walletAsFeature.contract.getUint(); const addressVal = await walletAsFeature.contract.getAddress(nonowner); @@ -187,21 +187,21 @@ contract("BaseWallet", (accounts) => { }); it("should not delegate static calls to no longer authorised modules ", async () => { - await wallet.init(owner, [module1.contractAddress, module2.contractAddress]); - await module1.upgradeWallet(wallet.contractAddress, await module1.lastVersion(), { from: owner }); - let module1IsAuthorised = await wallet.authorised(module1.contractAddress); + await wallet.init(owner, [module1.address, module2.address]); + await module1.upgradeWallet(wallet.address, await module1.lastVersion(), { from: owner }); + let module1IsAuthorised = await wallet.authorised(module1.address); assert.equal(module1IsAuthorised, true, "module1 should be authorised"); // removing module 1 const upgrader = await deployer.deploy(SimpleUpgrader, {}, - registry.contractAddress, lockStorage.contractAddress, [module1.contractAddress], []); - await registry.registerModule(upgrader.contractAddress, ethers.utils.formatBytes32String("Removing module1")); - await module1.addModule(wallet.contractAddress, upgrader.contractAddress, { from: owner }); - module1IsAuthorised = await wallet.authorised(module1.contractAddress); + registry.address, lockStorage.address, [module1.address], []); + await registry.registerModule(upgrader.address, ethers.utils.formatBytes32String("Removing module1")); + await module1.addModule(wallet.address, upgrader.address, { from: owner }); + module1IsAuthorised = await wallet.authorised(module1.address); assert.equal(module1IsAuthorised, false, "module1 should not be authorised"); // trying to execute static call delegated to module1 (it should fail) - const walletAsModule = deployer.wrapDeployedContract(TestFeature, wallet.contractAddress); + const walletAsModule = deployer.wrapDeployedContract(TestFeature, wallet.address); await assert.revertWith(walletAsModule.contract.getBoolean(), "BW: must be an authorised module for static call"); }); }); @@ -210,22 +210,22 @@ contract("BaseWallet", (accounts) => { describe("Old BaseWallet V1.3", () => { it("should work with new modules", async () => { const oldWallet = await deployer.deploy(OldWalletV13); - await oldWallet.init(owner, [module1.contractAddress]); - await module1.upgradeWallet(oldWallet.contractAddress, await module1.lastVersion(), { from: owner }); - await feature1.callDapp(oldWallet.contractAddress); - await feature1.callDapp2(oldWallet.contractAddress, 2, false); - await assert.revert(feature1.fail(oldWallet.contractAddress, "just because")); + await oldWallet.init(owner, [module1.address]); + await module1.upgradeWallet(oldWallet.address, await module1.lastVersion(), { from: owner }); + await feature1.callDapp(oldWallet.address); + await feature1.callDapp2(oldWallet.address, 2, false); + await assert.revert(feature1.fail(oldWallet.address, "just because")); }); }); describe("Old BaseWallet V1.6", () => { it("should work with new modules", async () => { const oldWallet = await deployer.deploy(OldWalletV16); - await oldWallet.init(owner, [module1.contractAddress]); - await module1.upgradeWallet(oldWallet.contractAddress, await module1.lastVersion(), { from: owner }); - await feature1.callDapp(oldWallet.contractAddress); - await feature1.callDapp2(oldWallet.contractAddress, 2, true); - await assert.revert(feature1.fail(oldWallet.contractAddress, "just because")); + await oldWallet.init(owner, [module1.address]); + await module1.upgradeWallet(oldWallet.address, await module1.lastVersion(), { from: owner }); + await feature1.callDapp(oldWallet.address); + await feature1.callDapp2(oldWallet.address, 2, true); + await assert.revert(feature1.fail(oldWallet.address, "just because")); }); }); }); diff --git a/test/compoundManager_invest.js b/test/compoundManager_invest.js index e4ca99fc6..122b2a9dc 100644 --- a/test/compoundManager_invest.js +++ b/test/compoundManager_invest.js @@ -57,22 +57,20 @@ contract("Invest Manager with Compound", (accounts) => { /* Deploy Compound V2 Architecture */ // deploy price oracle - const oracle = await deployer.deploy(PriceOracle); + const oracle = await PriceOracle); // deploy comptroller - const comptrollerProxy = await deployer.deploy(Unitroller); - const comptrollerImpl = await deployer.deploy(Comptroller); - await comptrollerProxy._setPendingImplementation(comptrollerImpl.contractAddress); - await comptrollerImpl._become(comptrollerProxy.contractAddress, oracle.contractAddress, WAD.div(10), 5, false); - comptroller = deployer.wrapDeployedContract(Comptroller, comptrollerProxy.contractAddress); + const comptrollerProxy = await Unitroller.new(); + const comptrollerImpl = await Comptroller.new(); + await comptrollerProxy._setPendingImplementation(comptrollerImpl.address); + await comptrollerImpl._become(comptrollerProxy.address, oracle.address, WAD.div(10), 5, false); + comptroller = Comptroller.at(comptrollerProxy.address); // deploy Interest rate model - const interestModel = await deployer.deploy(InterestModel, {}, WAD.mul(250).div(10000), WAD.mul(2000).div(10000)); + const interestModel = await InterestModel.new(WAD.mul(250).div(10000), WAD.mul(2000).div(10000)); // deploy CEther - cEther = await deployer.deploy( - CEther, - {}, - comptroller.contractAddress, - interestModel.contractAddress, + cEther = await CEther.new( + comptroller.address, + interestModel.address, ETH_EXCHANGE_RATE, formatBytes32String("Compound Ether"), formatBytes32String("cETH"), @@ -80,94 +78,90 @@ contract("Invest Manager with Compound", (accounts) => { ); // deploy token - token = await deployer.deploy(ERC20, {}, [infrastructure, liquidityProvider, borrower], 10000000, 18); + token = await ERC20.new([infrastructure, liquidityProvider, borrower], 10000000, 18); // deploy CToken - cToken = await deployer.deploy( - CErc20, - {}, - token.contractAddress, - comptroller.contractAddress, - interestModel.contractAddress, + cToken = await CErc20.new( + token.address, + comptroller.address, + interestModel.address, ETH_EXCHANGE_RATE, "Compound Token", "cTOKEN", 18, ); // add price to Oracle - await oracle.setUnderlyingPrice(cToken.contractAddress, WAD.div(10)); + await oracle.setUnderlyingPrice(cToken.address, WAD.div(10)); // list cToken in Comptroller - await comptroller._supportMarket(cEther.contractAddress); - await comptroller._supportMarket(cToken.contractAddress); + await comptroller._supportMarket(cEther.address); + await comptroller._supportMarket(cToken.address); // deploy Price Oracle proxy - oracleProxy = await deployer.deploy(PriceOracleProxy, {}, comptroller.contractAddress, oracle.contractAddress, cEther.contractAddress); - await comptroller._setPriceOracle(oracleProxy.contractAddress); + oracleProxy = await PriceOracleProxy.new(comptroller.address, oracle.address, cEther.address); + await comptroller._setPriceOracle(oracleProxy.address); // set collateral factor - await comptroller._setCollateralFactor(cToken.contractAddress, WAD.div(10)); - await comptroller._setCollateralFactor(cEther.contractAddress, WAD.div(10)); + await comptroller._setCollateralFactor(cToken.address, WAD.div(10)); + await comptroller._setCollateralFactor(cEther.address, WAD.div(10)); // add liquidity to tokens await cEther.from(liquidityProvider).mint({ value: parseEther("100") }); - await token.from(liquidityProvider).approve(cToken.contractAddress, parseEther("100")); + await token.from(liquidityProvider).approve(cToken.address, parseEther("100")); await cToken.from(liquidityProvider).mint(parseEther("10")); /* Deploy Argent Architecture */ - compoundRegistry = await deployer.deploy(CompoundRegistry); - await compoundRegistry.addCToken(ETH_TOKEN, cEther.contractAddress); - await compoundRegistry.addCToken(token.contractAddress, cToken.contractAddress); - const registry = await deployer.deploy(Registry); - const guardianStorage = await deployer.deploy(GuardianStorage); - const lockStorage = await deployer.deploy(LockStorage); - versionManager = await deployer.deploy(VersionManager, {}, - registry.contractAddress, - lockStorage.contractAddress, - guardianStorage.contractAddress, + compoundRegistry = await CompoundRegistry.new(); + await compoundRegistry.addCToken(ETH_TOKEN, cEther.address); + await compoundRegistry.addCToken(token.address, cToken.address); + const registry = await Registry.new(); + const guardianStorage = await GuardianStorage.new(); + const lockStorage = await LockStorage.new(); + versionManager = await VersionManager.new( + registry.address, + lockStorage.address, + guardianStorage.address, ethers.constants.AddressZero, ethers.constants.AddressZero); - investManager = await deployer.deploy( - CompoundManager, - {}, - lockStorage.contractAddress, - comptroller.contractAddress, - compoundRegistry.contractAddress, - versionManager.contractAddress, + investManager = await CompoundManager.new( + lockStorage.address, + comptroller.address, + compoundRegistry.address, + versionManager.address, ); - walletImplementation = await deployer.deploy(BaseWallet); + walletImplementation = await BaseWallet.new(); - relayerManager = await deployer.deploy(RelayerManager, {}, - lockStorage.contractAddress, - guardianStorage.contractAddress, + relayerManager = await RelayerManager.new( + lockStorage.address, + guardianStorage.address, ethers.constants.AddressZero, ethers.constants.AddressZero, - versionManager.contractAddress); + versionManager.address); manager.setRelayerManager(relayerManager); await versionManager.addVersion([ - investManager.contractAddress, - relayerManager.contractAddress, + investManager.address, + relayerManager.address, ], []); }); beforeEach(async () => { - const proxy = await deployer.deploy(Proxy, {}, walletImplementation.contractAddress); - wallet = deployer.wrapDeployedContract(BaseWallet, proxy.contractAddress); - await wallet.init(owner, [versionManager.contractAddress]); - await versionManager.from(owner).upgradeWallet(wallet.contractAddress, await versionManager.lastVersion()); + const proxy = await Proxy.new(walletImplementation.address); + wallet = await BaseWallet.at(proxy.address); + await wallet.init(owner, [versionManager.address]); + await versionManager.from(owner).upgradeWallet(wallet.address, await versionManager.lastVersion()); }); describe("Environment", () => { it("should deploy the environment correctly", async () => { - const getCToken = await compoundRegistry.getCToken(token.contractAddress); - assert.isTrue(getCToken === cToken.contractAddress, "cToken should be registered"); + const getCToken = await compoundRegistry.getCToken(token.address); + assert.isTrue(getCToken === cToken.address, "cToken should be registered"); const getCEther = await compoundRegistry.getCToken(ETH_TOKEN); - assert.isTrue(getCEther === cEther.contractAddress, "cEther should be registered"); + assert.isTrue(getCEther === cEther.address, "cEther should be registered"); const cOracle = await comptroller.oracle(); - assert.isTrue(cOracle === oracleProxy.contractAddress, "oracle should be registered"); - const cTokenPrice = await oracleProxy.getUnderlyingPrice(cToken.contractAddress); + assert.isTrue(cOracle === oracleProxy.address, "oracle should be registered"); + const cTokenPrice = await oracleProxy.getUnderlyingPrice(cToken.address); assert.isTrue(cTokenPrice.eq(WAD.div(10)), "cToken price should be 1e17"); - const cEtherPrice = await oracleProxy.getUnderlyingPrice(cEther.contractAddress); + const cEtherPrice = await oracleProxy.getUnderlyingPrice(cEther.address); assert.isTrue(cEtherPrice.eq(WAD), "cEther price should be 1e18"); }); }); @@ -177,9 +171,9 @@ contract("Invest Manager with Compound", (accounts) => { let tx; let txReceipt; // genrate borrows to create interests - await comptroller.from(borrower).enterMarkets([cEther.contractAddress, cToken.contractAddress]); + await comptroller.from(borrower).enterMarkets([cEther.address, cToken.address]); if (investInEth) { - await token.from(borrower).approve(cToken.contractAddress, parseEther("20")); + await token.from(borrower).approve(cToken.address, parseEther("20")); await cToken.from(borrower).mint(parseEther("20")); tx = await cEther.from(borrower).borrow(parseEther("0.1")); txReceipt = await cEther.verboseWaitForTransaction(tx); @@ -204,9 +198,9 @@ contract("Invest Manager with Compound", (accounts) => { if (investInEth) { tx = await wallet.send(amount); } else { - await token.from(infrastructure).transfer(wallet.contractAddress, amount); + await token.from(infrastructure).transfer(wallet.address, amount); } - const params = [wallet.contractAddress, tokenAddress, amount, 0]; + const params = [wallet.address, tokenAddress, amount, 0]; if (relay) { txReceipt = await manager.relay(investManager, "addInvestment", params, wallet, [owner]); } else { @@ -218,7 +212,7 @@ contract("Invest Manager with Compound", (accounts) => { await accrueInterests(days, investInEth); - const output = await investManager.getInvestment(wallet.contractAddress, tokenAddress); + const output = await investManager.getInvestment(wallet.address, tokenAddress); assert.isTrue(output._tokenValue > amount, "investment should have gained value"); return output._tokenValue; @@ -230,9 +224,9 @@ contract("Invest Manager with Compound", (accounts) => { const investInEth = (tokenAddress === ETH_TOKEN); await addInvestment(tokenAddress, parseEther("0.1"), 365, false); - const before = investInEth ? await cEther.balanceOf(wallet.contractAddress) : await cToken.balanceOf(wallet.contractAddress); + const before = investInEth ? await cEther.balanceOf(wallet.address) : await cToken.balanceOf(wallet.address); - const params = [wallet.contractAddress, tokenAddress, fraction]; + const params = [wallet.address, tokenAddress, fraction]; if (relay) { txReceipt = await manager.relay(investManager, "removeInvestment", params, wallet, [owner]); } else { @@ -241,7 +235,7 @@ contract("Invest Manager with Compound", (accounts) => { } assert.isTrue(await utils.hasEvent(txReceipt, investManager, "InvestmentRemoved"), "should have generated InvestmentRemoved event"); - const after = investInEth ? await cEther.balanceOf(wallet.contractAddress) : await cToken.balanceOf(wallet.contractAddress); + const after = investInEth ? await cEther.balanceOf(wallet.address) : await cToken.balanceOf(wallet.address); assert.isTrue(after.eq(Math.ceil((before * (10000 - fraction)) / 10000)), "should have removed the correct fraction"); } @@ -249,11 +243,11 @@ contract("Invest Manager with Compound", (accounts) => { // Successes it("should invest in ERC20 for 1 year and gain interests (blockchain tx)", async () => { - await addInvestment(token.contractAddress, parseEther("1"), 365, false); + await addInvestment(token.address, parseEther("1"), 365, false); }); it("should invest in ERC20 for 1 year and gain interests (relay tx)", async () => { - await addInvestment(token.contractAddress, parseEther("1"), 365, true); + await addInvestment(token.address, parseEther("1"), 365, true); }); it("should invest in ETH for 1 year and gain interests (blockchain tx)", async () => { @@ -267,17 +261,17 @@ contract("Invest Manager with Compound", (accounts) => { // Reverts it("should fail to invest in ERC20 with an unknown token", async () => { - const params = [wallet.contractAddress, ethers.constants.AddressZero, parseEther("1"), 0]; + const params = [wallet.address, ethers.constants.AddressZero, parseEther("1"), 0]; await assert.revertWith(investManager.from(owner).addInvestment(...params), "CM: No market for target token"); }); it("should fail to invest in ERC20 with an amount of zero", async () => { - const params = [wallet.contractAddress, token.contractAddress, 0, 0]; + const params = [wallet.address, token.address, 0, 0]; await assert.revertWith(investManager.from(owner).addInvestment(...params), "CM: amount cannot be 0"); }); it("should fail to invest in ERC20 when not holding any ERC20", async () => { - const params = [wallet.contractAddress, token.contractAddress, parseEther("1"), 0]; + const params = [wallet.address, token.address, parseEther("1"), 0]; await assert.revertWith(investManager.from(owner).addInvestment(...params), "CM: mint failed"); }); }); @@ -287,12 +281,12 @@ contract("Invest Manager with Compound", (accounts) => { function testRemoveERC20Investment(fraction, relay) { it(`should remove ${fraction / 100}% of an ERC20 investment (${relay ? "relay" : "blockchain"} tx)`, async () => { - await removeInvestment(token.contractAddress, fraction, relay); + await removeInvestment(token.address, fraction, relay); }); } function testRemoveETHInvestment(fraction, relay) { it(`should remove ${fraction / 100}% of an ETH investment (${relay ? "relay" : "blockchain"} tx)`, async () => { - await removeInvestment(token.contractAddress, fraction, relay); + await removeInvestment(token.address, fraction, relay); }); } @@ -306,27 +300,27 @@ contract("Invest Manager with Compound", (accounts) => { // Reverts it("should fail to remove an ERC20 investment when passing an invalid fraction value", async () => { - const params = [wallet.contractAddress, token.contractAddress, 50000]; + const params = [wallet.address, token.address, 50000]; await assert.revertWith(investManager.from(owner).removeInvestment(...params), "CM: invalid fraction value"); }); it("should fail to remove an ERC20 investment when not holding any of the corresponding cToken", async () => { - const params = [wallet.contractAddress, token.contractAddress, 5000]; + const params = [wallet.address, token.address, 5000]; await assert.revertWith(investManager.from(owner).removeInvestment(...params), "CM: amount cannot be 0"); }); it("should fail to remove all of an ERC20 investment when it collateralizes a loan", async () => { const collateralAmount = parseEther("1"); const debtAmount = parseEther("0.001"); - await token.from(infrastructure).transfer(wallet.contractAddress, collateralAmount); + await token.from(infrastructure).transfer(wallet.address, collateralAmount); const openLoanParams = [ - wallet.contractAddress, - token.contractAddress, + wallet.address, + token.address, collateralAmount, ETH_TOKEN, debtAmount]; await investManager.from(owner).openLoan(...openLoanParams); - const removeInvestmentParams = [wallet.contractAddress, token.contractAddress, 10000]; + const removeInvestmentParams = [wallet.address, token.address, 10000]; await assert.revertWith(investManager.from(owner).removeInvestment(...removeInvestmentParams), "CM: redeem failed"); }); }); diff --git a/test/compoundManager_loan.js b/test/compoundManager_loan.js index 2abc053ae..e1234a9c0 100644 --- a/test/compoundManager_loan.js +++ b/test/compoundManager_loan.js @@ -64,21 +64,19 @@ contract("Loan Module", (accounts) => { /* Deploy Compound V2 Architecture */ // deploy price oracle - oracle = await deployer.deploy(PriceOracle); + oracle = await PriceOracle.new(); // deploy comptroller - const comptrollerProxy = await deployer.deploy(Unitroller); - const comptrollerImpl = await deployer.deploy(Comptroller); - await comptrollerProxy._setPendingImplementation(comptrollerImpl.contractAddress); - await comptrollerImpl._become(comptrollerProxy.contractAddress, oracle.contractAddress, WAD.div(10), 5, false); - comptroller = deployer.wrapDeployedContract(Comptroller, comptrollerProxy.contractAddress); + const comptrollerProxy = await Unitroller.new(); + const comptrollerImpl = await Comptroller.new(); + await comptrollerProxy._setPendingImplementation(comptrollerImpl.address); + await comptrollerImpl._become(comptrollerProxy.address, oracle.address, WAD.div(10), 5, false); + comptroller = await Comptroller.at(comptrollerProxy.address); // deploy Interest rate model - const interestModel = await deployer.deploy(InterestModel, {}, WAD.mul(250).div(10000), WAD.mul(2000).div(10000)); + const interestModel = await InterestModel.new(WAD.mul(250).div(10000), WAD.mul(2000).div(10000)); // deploy CEther - cEther = await deployer.deploy( - CEther, - {}, - comptroller.contractAddress, - interestModel.contractAddress, + cEther = await CEther.new( + comptroller.address, + interestModel.address, ETH_EXCHANGE_RATE, "Compound Ether", "cETH", @@ -86,26 +84,22 @@ contract("Loan Module", (accounts) => { ); // deploy token - token1 = await deployer.deploy(ERC20, {}, [infrastructure, liquidityProvider, borrower], 10000000, 18); - token2 = await deployer.deploy(ERC20, {}, [infrastructure, liquidityProvider, borrower], 10000000, 18); + token1 = await ERC20.new([infrastructure, liquidityProvider, borrower], 10000000, 18); + token2 = await ERC20.new([infrastructure, liquidityProvider, borrower], 10000000, 18); // deploy CToken - cToken1 = await deployer.deploy( - CErc20, - {}, - token1.contractAddress, - comptroller.contractAddress, - interestModel.contractAddress, + cToken1 = await CErc20.new( + token1.address, + comptroller.address, + interestModel.address, ETH_EXCHANGE_RATE, "Compound Token 1", "cTOKEN1", 18, ); - cToken2 = await deployer.deploy( - CErc20, - {}, - token2.contractAddress, - comptroller.contractAddress, - interestModel.contractAddress, + cToken2 = await CErc20.new( + token2.address, + comptroller.address, + interestModel.address, ETH_EXCHANGE_RATE, "Compound Token 2", "cTOKEN2", @@ -113,95 +107,93 @@ contract("Loan Module", (accounts) => { ); // add price to Oracle - await oracle.setUnderlyingPrice(cToken1.contractAddress, WAD.div(10)); - await oracle.setUnderlyingPrice(cToken2.contractAddress, WAD.div(10)); + await oracle.setUnderlyingPrice(cToken1.address, WAD.div(10)); + await oracle.setUnderlyingPrice(cToken2.address, WAD.div(10)); // list cToken in Comptroller - await comptroller._supportMarket(cEther.contractAddress); - await comptroller._supportMarket(cToken1.contractAddress); - await comptroller._supportMarket(cToken2.contractAddress); + await comptroller._supportMarket(cEther.address); + await comptroller._supportMarket(cToken1.address); + await comptroller._supportMarket(cToken2.address); // deploy Price Oracle proxy - oracleProxy = await deployer.deploy(PriceOracleProxy, {}, comptroller.contractAddress, oracle.contractAddress, cEther.contractAddress); - await comptroller._setPriceOracle(oracleProxy.contractAddress); + oracleProxy = await PriceOracleProxy.new(comptroller.address, oracle.address, cEther.address); + await comptroller._setPriceOracle(oracleProxy.address); // set collateral factor - await comptroller._setCollateralFactor(cToken1.contractAddress, WAD.div(10)); - await comptroller._setCollateralFactor(cToken2.contractAddress, WAD.div(10)); - await comptroller._setCollateralFactor(cEther.contractAddress, WAD.div(10)); + await comptroller._setCollateralFactor(cToken1.address, WAD.div(10)); + await comptroller._setCollateralFactor(cToken2.address, WAD.div(10)); + await comptroller._setCollateralFactor(cEther.address, WAD.div(10)); // add liquidity to tokens await cEther.from(liquidityProvider).mint({ value: parseEther("100") }); - await token1.from(liquidityProvider).approve(cToken1.contractAddress, parseEther("10")); + await token1.from(liquidityProvider).approve(cToken1.address, parseEther("10")); await cToken1.from(liquidityProvider).mint(parseEther("10")); - await token2.from(liquidityProvider).approve(cToken2.contractAddress, parseEther("10")); + await token2.from(liquidityProvider).approve(cToken2.address, parseEther("10")); await cToken2.from(liquidityProvider).mint(parseEther("10")); /* Deploy Argent Architecture */ - compoundRegistry = await deployer.deploy(CompoundRegistry); - await compoundRegistry.addCToken(ETH_TOKEN, cEther.contractAddress); - await compoundRegistry.addCToken(token1.contractAddress, cToken1.contractAddress); - await compoundRegistry.addCToken(token2.contractAddress, cToken2.contractAddress); - const registry = await deployer.deploy(Registry); - const guardianStorage = await deployer.deploy(GuardianStorage); - const lockStorage = await deployer.deploy(LockStorage); - versionManager = await deployer.deploy(VersionManager, {}, - registry.contractAddress, - lockStorage.contractAddress, - guardianStorage.contractAddress, + compoundRegistry = await CompoundRegistry.new(); + await compoundRegistry.addCToken(ETH_TOKEN, cEther.address); + await compoundRegistry.addCToken(token1.address, cToken1.address); + await compoundRegistry.addCToken(token2.address, cToken2.address); + const registry = await Registry.new(); + const guardianStorage = await GuardianStorage.new(); + const lockStorage = await LockStorage.new(); + versionManager = await VersionManager.new( + registry.address, + lockStorage.address, + guardianStorage.address, ethers.constants.AddressZero, ethers.constants.AddressZero); - loanManager = await deployer.deploy( - CompoundManager, - {}, - lockStorage.contractAddress, - comptroller.contractAddress, - compoundRegistry.contractAddress, - versionManager.contractAddress, + loanManager = await CompoundManager.new( + lockStorage.address, + comptroller.address, + compoundRegistry.address, + versionManager.address, ); - walletImplementation = await deployer.deploy(BaseWallet); + walletImplementation = await BaseWallet.new(); - relayerManager = await deployer.deploy(RelayerManager, {}, - lockStorage.contractAddress, - guardianStorage.contractAddress, + relayerManager = await RelayerManager.new( + lockStorage.address, + guardianStorage.address, ethers.constants.AddressZero, ethers.constants.AddressZero, - versionManager.contractAddress); + versionManager.address); manager.setRelayerManager(relayerManager); await versionManager.addVersion([ - loanManager.contractAddress, - relayerManager.contractAddress, + loanManager.address, + relayerManager.address, ], []); }); beforeEach(async () => { - const proxy = await deployer.deploy(Proxy, {}, walletImplementation.contractAddress); - wallet = deployer.wrapDeployedContract(BaseWallet, proxy.contractAddress); - await wallet.init(owner, [versionManager.contractAddress]); - await versionManager.from(owner).upgradeWallet(wallet.contractAddress, await versionManager.lastVersion()); + const proxy = await Proxy.new(walletImplementation.address); + wallet = await BaseWallet.at(proxy.address); + await wallet.init(owner, [versionManager.address]); + await versionManager.from(owner).upgradeWallet(wallet.address, await versionManager.lastVersion()); }); async function fundWallet({ ethAmount, token1Amount, token2Amount = 0 }) { if (ethAmount > 0) await wallet.send(ethAmount); - if (token1Amount > 0) await token1.from(infrastructure).transfer(wallet.contractAddress, token1Amount); - if (token2Amount > 0) await token2.from(infrastructure).transfer(wallet.contractAddress, token2Amount); + if (token1Amount > 0) await token1.from(infrastructure).transfer(wallet.address, token1Amount); + if (token2Amount > 0) await token2.from(infrastructure).transfer(wallet.address, token2Amount); } describe("Loan", () => { async function testOpenLoan({ collateral, collateralAmount, debt, debtAmount, relayed, }) { - const collateralBefore = (collateral === ETH_TOKEN) ? await deployer.provider.getBalance(wallet.contractAddress) - : await collateral.balanceOf(wallet.contractAddress); - const debtBefore = (debt === ETH_TOKEN) ? await deployer.provider.getBalance(wallet.contractAddress) - : await debt.balanceOf(wallet.contractAddress); + const collateralBefore = (collateral === ETH_TOKEN) ? await deployer.provider.getBalance(wallet.address) + : await collateral.balanceOf(wallet.address); + const debtBefore = (debt === ETH_TOKEN) ? await deployer.provider.getBalance(wallet.address) + : await debt.balanceOf(wallet.address); const params = [ - wallet.contractAddress, - (collateral === ETH_TOKEN) ? ETH_TOKEN : collateral.contractAddress, + wallet.address, + (collateral === ETH_TOKEN) ? ETH_TOKEN : collateral.address, collateralAmount, - (debt === ETH_TOKEN) ? ETH_TOKEN : debt.contractAddress, + (debt === ETH_TOKEN) ? ETH_TOKEN : debt.address, debtAmount]; let txReceipt; if (relayed) { @@ -214,10 +206,10 @@ contract("Loan Module", (accounts) => { const loanId = (await utils.parseLogs(txReceipt, loanManager, "LoanOpened"))[0]._loanId; assert.isDefined(loanId, "Loan ID should be defined"); - const collateralAfter = (collateral === ETH_TOKEN) ? await deployer.provider.getBalance(wallet.contractAddress) - : await collateral.balanceOf(wallet.contractAddress); - const debtAfter = (debt === ETH_TOKEN) ? await deployer.provider.getBalance(wallet.contractAddress) - : await debt.balanceOf(wallet.contractAddress); + const collateralAfter = (collateral === ETH_TOKEN) ? await deployer.provider.getBalance(wallet.address) + : await collateral.balanceOf(wallet.address); + const debtAfter = (debt === ETH_TOKEN) ? await deployer.provider.getBalance(wallet.address) + : await debt.balanceOf(wallet.address); assert.isTrue(collateralBefore.sub(collateralAfter).eq(collateralAmount), `wallet should have ${collateralAmount} less ETH (relayed: ${relayed})`); @@ -229,14 +221,14 @@ contract("Loan Module", (accounts) => { async function testChangeCollateral({ loanId, collateral, amount, add, relayed, }) { - const collateralBalanceBefore = (collateral === ETH_TOKEN) ? await deployer.provider.getBalance(wallet.contractAddress) - : await collateral.balanceOf(wallet.contractAddress); + const collateralBalanceBefore = (collateral === ETH_TOKEN) ? await deployer.provider.getBalance(wallet.address) + : await collateral.balanceOf(wallet.address); const method = add ? "addCollateral" : "removeCollateral"; const params = [ - wallet.contractAddress, + wallet.address, loanId, - (collateral === ETH_TOKEN) ? ETH_TOKEN : collateral.contractAddress, + (collateral === ETH_TOKEN) ? ETH_TOKEN : collateral.address, amount]; let txReceipt; if (relayed) { @@ -245,8 +237,8 @@ contract("Loan Module", (accounts) => { const tx = await loanManager.from(owner)[method](...params); txReceipt = await loanManager.verboseWaitForTransaction(tx); } - const collateralBalanceAfter = (collateral === ETH_TOKEN) ? await deployer.provider.getBalance(wallet.contractAddress) - : await collateral.balanceOf(wallet.contractAddress); + const collateralBalanceAfter = (collateral === ETH_TOKEN) ? await deployer.provider.getBalance(wallet.address) + : await collateral.balanceOf(wallet.address); if (add) { assert.isTrue(await utils.hasEvent(txReceipt, loanManager, "CollateralAdded"), "should have generated CollateralAdded event"); assert.isTrue(collateralBalanceAfter.eq(collateralBalanceBefore.sub(amount)), @@ -261,14 +253,14 @@ contract("Loan Module", (accounts) => { async function testChangeDebt({ loanId, debtToken, amount, add, relayed, }) { - const debtBalanceBefore = (debtToken === ETH_TOKEN) ? await deployer.provider.getBalance(wallet.contractAddress) - : await debtToken.balanceOf(wallet.contractAddress); + const debtBalanceBefore = (debtToken === ETH_TOKEN) ? await deployer.provider.getBalance(wallet.address) + : await debtToken.balanceOf(wallet.address); const method = add ? "addDebt" : "removeDebt"; const params = [ - wallet.contractAddress, + wallet.address, loanId, - (debtToken === ETH_TOKEN) ? ETH_TOKEN : debtToken.contractAddress, + (debtToken === ETH_TOKEN) ? ETH_TOKEN : debtToken.address, amount]; let txReceipt; if (relayed) { @@ -277,8 +269,8 @@ contract("Loan Module", (accounts) => { const tx = await loanManager.from(owner)[method](...params); txReceipt = await loanManager.verboseWaitForTransaction(tx); } - const debtBalanceAfter = (debtToken === ETH_TOKEN) ? await deployer.provider.getBalance(wallet.contractAddress) - : await debtToken.balanceOf(wallet.contractAddress); + const debtBalanceAfter = (debtToken === ETH_TOKEN) ? await deployer.provider.getBalance(wallet.address) + : await debtToken.balanceOf(wallet.address); if (add) { assert.isTrue(await utils.hasEvent(txReceipt, loanManager, "DebtAdded"), "should have generated DebtAdded event"); assert.isTrue(debtBalanceAfter.eq(debtBalanceBefore.add(amount)), `wallet debt should have increase by ${amount} (relayed: ${relayed})`); @@ -335,17 +327,17 @@ contract("Loan Module", (accounts) => { await testOpenLoan({ collateral: ETH_TOKEN, collateralAmount, debt: token1, debtAmount, relayed: false, }); - let loan = await loanManager.getLoan(wallet.contractAddress, ZERO_BYTES32); + let loan = await loanManager.getLoan(wallet.address, ZERO_BYTES32); assert.isTrue(loan._status === 1 && loan._ethValue.gt(0), "should have obtained the liquidity info of the loan"); - await oracle.setUnderlyingPrice(cToken1.contractAddress, WAD.mul(10)); - loan = await loanManager.getLoan(wallet.contractAddress, ZERO_BYTES32); + await oracle.setUnderlyingPrice(cToken1.address, WAD.mul(10)); + loan = await loanManager.getLoan(wallet.address, ZERO_BYTES32); assert.isTrue(loan._status === 2 && loan._ethValue.gt(0), "should have obtained the shortfall info of the loan"); - await oracle.setUnderlyingPrice(cToken1.contractAddress, 0); - await assert.revertWith(loanManager.getLoan(wallet.contractAddress, ZERO_BYTES32), "CM: failed to get account liquidity"); + await oracle.setUnderlyingPrice(cToken1.address, 0); + await assert.revertWith(loanManager.getLoan(wallet.address, ZERO_BYTES32), "CM: failed to get account liquidity"); - await oracle.setUnderlyingPrice(cToken1.contractAddress, WAD.div(10)); + await oracle.setUnderlyingPrice(cToken1.address, WAD.div(10)); loan = await loanManager.getLoan(ethers.constants.AddressZero, ZERO_BYTES32); assert.isTrue(loan._status === 0 && loan._ethValue.eq(0), "should have obtained (0,0) for the non-existing loan info"); }); @@ -437,27 +429,27 @@ contract("Loan Module", (accounts) => { // Reverts it("should fail to borrow an unknown token", async () => { - const params = [wallet.contractAddress, ZERO_BYTES32, ethers.constants.AddressZero, parseEther("1")]; + const params = [wallet.address, ZERO_BYTES32, ethers.constants.AddressZero, parseEther("1")]; await assert.revertWith(loanManager.from(owner).addDebt(...params), "CM: No market for target token"); }); it("should fail to borrow 0 token", async () => { - const params = [wallet.contractAddress, ZERO_BYTES32, ETH_TOKEN, parseEther("0")]; + const params = [wallet.address, ZERO_BYTES32, ETH_TOKEN, parseEther("0")]; await assert.revertWith(loanManager.from(owner).addDebt(...params), "CM: amount cannot be 0"); }); it("should fail to borrow token with no collateral", async () => { - const params = [wallet.contractAddress, ZERO_BYTES32, ETH_TOKEN, parseEther("1")]; + const params = [wallet.address, ZERO_BYTES32, ETH_TOKEN, parseEther("1")]; await assert.revertWith(loanManager.from(owner).addDebt(...params), "CM: borrow failed"); }); it("should fail to repay an unknown token", async () => { - const params = [wallet.contractAddress, ZERO_BYTES32, ethers.constants.AddressZero, parseEther("1")]; + const params = [wallet.address, ZERO_BYTES32, ethers.constants.AddressZero, parseEther("1")]; await assert.revertWith(loanManager.from(owner).removeDebt(...params), "CM: No market for target token"); }); it("should fail to repay 0 token", async () => { - const params = [wallet.contractAddress, ZERO_BYTES32, ETH_TOKEN, parseEther("0")]; + const params = [wallet.address, ZERO_BYTES32, ETH_TOKEN, parseEther("0")]; await assert.revertWith(loanManager.from(owner).removeDebt(...params), "CM: amount cannot be 0"); }); @@ -468,17 +460,17 @@ contract("Loan Module", (accounts) => { const loanId = await testOpenLoan({ collateral: ETH_TOKEN, collateralAmount, debt: token1, debtAmount, relayed: false, }); - const removeDebtParams = [wallet.contractAddress, loanId, token1.contractAddress, parseEther("0.002")]; + const removeDebtParams = [wallet.address, loanId, token1.address, parseEther("0.002")]; await assert.revertWith(loanManager.from(owner).removeDebt(...removeDebtParams), "CM: repayBorrow failed"); }); it("should fail to remove an unknown collateral token", async () => { - const params = [wallet.contractAddress, ZERO_BYTES32, ethers.constants.AddressZero, parseEther("1")]; + const params = [wallet.address, ZERO_BYTES32, ethers.constants.AddressZero, parseEther("1")]; await assert.revertWith(loanManager.from(owner).removeCollateral(...params), "CM: No market for target token"); }); it("should fail to remove 0 collateral token", async () => { - const params = [wallet.contractAddress, ZERO_BYTES32, ETH_TOKEN, parseEther("0")]; + const params = [wallet.address, ZERO_BYTES32, ETH_TOKEN, parseEther("0")]; await assert.revertWith(loanManager.from(owner).removeCollateral(...params), "CM: amount cannot be 0"); }); @@ -489,7 +481,7 @@ contract("Loan Module", (accounts) => { const loanId = await testOpenLoan({ collateral: ETH_TOKEN, collateralAmount, debt: token1, debtAmount, relayed: false, }); - const removeDebtParams = [wallet.contractAddress, loanId, token1.contractAddress, parseEther("0.002")]; + const removeDebtParams = [wallet.address, loanId, token1.address, parseEther("0.002")]; await assert.revertWith(loanManager.from(owner).removeCollateral(...removeDebtParams), "CM: redeemUnderlying failed"); }); }); @@ -608,9 +600,9 @@ contract("Loan Module", (accounts) => { describe("Close Loan", () => { async function testCloseLoan({ loanId, relayed, debtMarkets = 1 }) { - const marketsBefore = await comptroller.getAssetsIn(wallet.contractAddress); + const marketsBefore = await comptroller.getAssetsIn(wallet.address); const method = "closeLoan"; - const params = [wallet.contractAddress, loanId]; + const params = [wallet.address, loanId]; let txReceipt; if (relayed) { txReceipt = await manager.relay(loanManager, method, params, wallet, [owner], accounts[9], false, 2000000); @@ -620,7 +612,7 @@ contract("Loan Module", (accounts) => { } assert.isTrue(await utils.hasEvent(txReceipt, loanManager, "LoanClosed"), "should have generated LoanClosed event"); - const marketsAfter = await comptroller.getAssetsIn(wallet.contractAddress); + const marketsAfter = await comptroller.getAssetsIn(wallet.address); assert.isTrue(marketsAfter.length === marketsBefore.length - debtMarkets, `should have exited ${debtMarkets} market (relayed: ${relayed})`); } diff --git a/test/ens.js b/test/ens.js index 95e457029..e8a4cb870 100644 --- a/test/ens.js +++ b/test/ens.js @@ -32,35 +32,34 @@ contract("ENS contracts", (accounts) => { beforeEach(async () => { deployer = manager.newDeployer(); - const ensRegistryWithoutFallback = await deployer.deploy(ENSRegistry); - ensRegistry = await deployer.deploy(ENSRegistryWithFallback, {}, ensRegistryWithoutFallback.contractAddress); - ensResolver = await deployer.deploy(ENSResolver); - ensReverse = await deployer.deploy(ENSReverseRegistrar, {}, ensRegistry.contractAddress, ensResolver.contractAddress); - ensManager = await deployer.deploy(ENSManager, {}, - `${subnameWallet}.${root}`, walletNode, ensRegistry.contractAddress, ensResolver.contractAddress); - await ensResolver.addManager(ensManager.contractAddress); + const ensRegistryWithoutFallback = await ENSRegistry.new(); + ensRegistry = await ENSRegistryWithFallback.new(ensRegistryWithoutFallback.address); + ensResolver = await ENSResolver.new(); + ensReverse = await ENSReverseRegistrar.new(ensRegistry.address, ensResolver.address); + ensManager = await ENSManager.new(`${subnameWallet}.${root}`, walletNode, ensRegistry.address, ensResolver.address); + await ensResolver.addManager(ensManager.address); await ensResolver.addManager(infrastructure); await ensManager.addManager(infrastructure); await ensRegistry.setSubnodeOwner(ZERO_BYTES32, ethers.utils.keccak256(ethers.utils.toUtf8Bytes(root)), infrastructure); await ensRegistry.setSubnodeOwner( - ethers.utils.namehash(root), ethers.utils.keccak256(ethers.utils.toUtf8Bytes(subnameWallet)), ensManager.contractAddress, + ethers.utils.namehash(root), ethers.utils.keccak256(ethers.utils.toUtf8Bytes(subnameWallet)), ensManager.address, ); await ensRegistry.setSubnodeOwner(ZERO_BYTES32, ethers.utils.keccak256(ethers.utils.toUtf8Bytes("reverse")), infrastructure); await ensRegistry.setSubnodeOwner( - ethers.utils.namehash("reverse"), ethers.utils.keccak256(ethers.utils.toUtf8Bytes("addr")), ensReverse.contractAddress, + ethers.utils.namehash("reverse"), ethers.utils.keccak256(ethers.utils.toUtf8Bytes("addr")), ensReverse.address, ); }); describe("ENS Manager", () => { it("should be the owner of the wallet root", async () => { const nodeOwner = await ensRegistry.owner(walletNode); - assert.equal(nodeOwner, ensManager.contractAddress, "ens manager should be the owner of the wallet root node"); + assert.equal(nodeOwner, ensManager.address, "ens manager should be the owner of the wallet root node"); }); it("should return correct ENSResolver", async () => { const ensResolverOnManager = await ensManager.ensResolver(); - assert.equal(ensResolverOnManager, ensResolver.contractAddress, "should have the correct ENSResolver addrress"); + assert.equal(ensResolverOnManager, ensResolver.address, "should have the correct ENSResolver addrress"); }); it("should register an ENS name", async () => { @@ -73,7 +72,7 @@ contract("ENS contracts", (accounts) => { const nodeOwner = await ensRegistry.owner(labelNode); assert.equal(nodeOwner, owner); const res = await ensRegistry.resolver(labelNode); - assert.equal(res, ensResolver.contractAddress); + assert.equal(res, ensResolver.address); }); it("should return the correct availability for a subnode", async () => { diff --git a/test/factory.js b/test/factory.js index 5ecd58408..b694517ee 100644 --- a/test/factory.js +++ b/test/factory.js @@ -31,20 +31,20 @@ contract("WalletFactory", (accounts) => { before(async () => { deployer = manager.newDeployer(); - implementation = await deployer.deploy(BaseWallet); - moduleRegistry = await deployer.deploy(ModuleRegistry); - guardianStorage = await deployer.deploy(GuardianStorage); - factory = await deployer.deploy(Factory, {}, - moduleRegistry.contractAddress, - implementation.contractAddress, - guardianStorage.contractAddress); + implementation = await BaseWallet.new(); + moduleRegistry = await ModuleRegistry.new(); + guardianStorage = await GuardianStorage.new(); + factory = await Factory.new( + moduleRegistry.address, + implementation.address, + guardianStorage.address); await factory.addManager(infrastructure); }); async function deployVersionManager() { - const vm = await deployer.deploy(VersionManager, {}, - moduleRegistry.contractAddress, - guardianStorage.contractAddress, + const vm = await VersionManager.new( + moduleRegistry.address, + guardianStorage.address, ethers.constants.AddressZero, ethers.constants.AddressZero, ethers.constants.AddressZero); @@ -54,31 +54,31 @@ contract("WalletFactory", (accounts) => { beforeEach(async () => { // Restore the good state of factory (we set these to bad addresses in some tests) - await factory.changeModuleRegistry(moduleRegistry.contractAddress); + await factory.changeModuleRegistry(moduleRegistry.address); versionManager = await deployVersionManager(); - await moduleRegistry.registerModule(versionManager.contractAddress, ethers.utils.formatBytes32String("versionManager")); + await moduleRegistry.registerModule(versionManager.address, ethers.utils.formatBytes32String("versionManager")); }); describe("Create and configure the factory", () => { it("should not allow to be created with empty ModuleRegistry", async () => { - await assert.revertWith(deployer.deploy(Factory, {}, + await assert.revertWith(Factory.new( ZERO_ADDRESS, - implementation.contractAddress, - guardianStorage.contractAddress), "WF: ModuleRegistry address not defined"); + implementation.address, + guardianStorage.address), "WF: ModuleRegistry address not defined"); }); it("should not allow to be created with empty WalletImplementation", async () => { - await assert.revertWith(deployer.deploy(Factory, {}, - moduleRegistry.contractAddress, + await assert.revertWith(Factory.new( + moduleRegistry.address, ZERO_ADDRESS, - guardianStorage.contractAddress), "WF: WalletImplementation address not defined"); + guardianStorage.address), "WF: WalletImplementation address not defined"); }); it("should not allow to be created with empty GuardianStorage", async () => { await assert.revertWith(deployer.deploy(Factory, {}, - moduleRegistry.contractAddress, - implementation.contractAddress, + moduleRegistry.address, + implementation.address, ZERO_ADDRESS), "WF: GuardianStorage address not defined"); }); @@ -116,36 +116,36 @@ contract("WalletFactory", (accounts) => { it("should return the correct ENSManager", async () => { const ensManagerOnFactory = await factory.ensManager(); - assert.equal(ensManagerOnFactory, ensManager.contractAddress, "should have the correct ENSManager addrress"); + assert.equal(ensManagerOnFactory, ensManager.address, "should have the correct ENSManager addrress"); }); }); describe("Create wallets with CREATE", () => { it("should create with the correct owner", async () => { // we create the wallet - const tx = await factory.from(infrastructure).createWallet(owner, versionManager.contractAddress, guardian, 1); + const tx = await factory.from(infrastructure).createWallet(owner, versionManager.address, guardian, 1); const txReceipt = await factory.verboseWaitForTransaction(tx); const walletAddr = txReceipt.events.filter((event) => event.event === "WalletCreated")[0].args.wallet; // we test that the wallet has the correct owner - const wallet = await deployer.wrapDeployedContract(BaseWallet, walletAddr); + const wallet = await BaseWallet.at(walletAddr); const walletOwner = await wallet.owner(); assert.equal(walletOwner, owner, "should have the correct owner"); }); it("should create with the correct module", async () => { // we create the wallet - const tx = await factory.from(infrastructure).createWallet(owner, versionManager.contractAddress, guardian, 1); + const tx = await factory.from(infrastructure).createWallet(owner, versionManager.address, guardian, 1); const txReceipt = await factory.verboseWaitForTransaction(tx); const walletAddr = txReceipt.events.filter((event) => event.event === "WalletCreated")[0].args.wallet; // we test that the wallet has the correct module const wallet = await deployer.wrapDeployedContract(BaseWallet, walletAddr); - const isAuthorised = await wallet.authorised(versionManager.contractAddress); + const isAuthorised = await wallet.authorised(versionManager.address); assert.equal(isAuthorised, true, "versionManager should be authorised"); }); it("should create with the correct guardian", async () => { // we create the wallet - const tx = await factory.from(infrastructure).createWallet(owner, versionManager.contractAddress, guardian, 1); + const tx = await factory.from(infrastructure).createWallet(owner, versionManager.address, guardian, 1); const txReceipt = await factory.verboseWaitForTransaction(tx); const walletAddr = txReceipt.events.filter((event) => event.event === "WalletCreated")[0].args.wallet; // we test that the wallet has the correct guardian @@ -158,7 +158,7 @@ contract("WalletFactory", (accounts) => { await versionManager.addVersion([], []); await versionManager.setMinVersion(await versionManager.lastVersion()); // we create the wallet - const tx = await factory.from(infrastructure).createWallet(owner, versionManager.contractAddress, guardian, badVersion); + const tx = await factory.from(infrastructure).createWallet(owner, versionManager.address, guardian, badVersion); const txReceipt = await factory.verboseWaitForTransaction(tx); const walletAddr = txReceipt.events.filter((event) => event.event === "WalletCreated")[0].args.wallet; assert.notEqual(walletAddr, ZERO_ADDRESS, "wallet should be created"); @@ -166,7 +166,7 @@ contract("WalletFactory", (accounts) => { it("should fail to create when the guardian is empty", async () => { // we create the wallet - await assert.revertWith(factory.from(infrastructure).createWallet(owner, versionManager.contractAddress, ZERO_ADDRESS, 1), + await assert.revertWith(factory.from(infrastructure).createWallet(owner, versionManager.address, ZERO_ADDRESS, 1), "WF: guardian cannot be null"); }); @@ -177,7 +177,7 @@ contract("WalletFactory", (accounts) => { it("should fail to create with zero address as owner", async () => { await assert.revertWith( - factory.from(infrastructure).createWallet(ethers.constants.AddressZero, versionManager.contractAddress, guardian, 1), + factory.from(infrastructure).createWallet(ethers.constants.AddressZero, versionManager.address, guardian, 1), "WF: owner cannot be null", ); }); @@ -192,16 +192,16 @@ contract("WalletFactory", (accounts) => { describe("Create wallets with CREATE2", () => { beforeEach(async () => { versionManager = await deployVersionManager(); - await moduleRegistry.registerModule(versionManager.contractAddress, ethers.utils.formatBytes32String("versionManager")); + await moduleRegistry.registerModule(versionManager.address, ethers.utils.formatBytes32String("versionManager")); }); it("should create a wallet at the correct address", async () => { const salt = utils.generateSaltValue(); // we get the future address - const futureAddr = await factory.getAddressForCounterfactualWallet(owner, versionManager.contractAddress, guardian, salt, 1); + const futureAddr = await factory.getAddressForCounterfactualWallet(owner, versionManager.address, guardian, salt, 1); // we create the wallet const tx = await factory.from(infrastructure).createCounterfactualWallet( - owner, versionManager.contractAddress, guardian, salt, 1, + owner, versionManager.address, guardian, salt, 1, ); const txReceipt = await factory.verboseWaitForTransaction(tx); const walletAddr = txReceipt.events.filter((event) => event.event === "WalletCreated")[0].args.wallet; @@ -212,17 +212,17 @@ contract("WalletFactory", (accounts) => { it("should create with the correct owner", async () => { const salt = utils.generateSaltValue(); // we get the future address - const futureAddr = await factory.getAddressForCounterfactualWallet(owner, versionManager.contractAddress, guardian, salt, 1); + const futureAddr = await factory.getAddressForCounterfactualWallet(owner, versionManager.address, guardian, salt, 1); // we create the wallet const tx = await factory.from(infrastructure).createCounterfactualWallet( - owner, versionManager.contractAddress, guardian, salt, 1, + owner, versionManager.address, guardian, salt, 1, ); const txReceipt = await factory.verboseWaitForTransaction(tx); const walletAddr = txReceipt.events.filter((event) => event.event === "WalletCreated")[0].args.wallet; // we test that the wallet is at the correct address assert.equal(futureAddr, walletAddr, "should have the correct address"); // we test that the wallet has the correct owner - const wallet = await deployer.wrapDeployedContract(BaseWallet, walletAddr); + const wallet = await BaseWallet.at(walletAddr); const walletOwner = await wallet.owner(); assert.equal(walletOwner, owner, "should have the correct owner"); }); @@ -230,10 +230,10 @@ contract("WalletFactory", (accounts) => { it("should create with the correct modules", async () => { const salt = utils.generateSaltValue(); // we get the future address - const futureAddr = await factory.getAddressForCounterfactualWallet(owner, versionManager.contractAddress, guardian, salt, 1); + const futureAddr = await factory.getAddressForCounterfactualWallet(owner, versionManager.address, guardian, salt, 1); // we create the wallet const tx = await factory.from(infrastructure).createCounterfactualWallet( - owner, versionManager.contractAddress, guardian, salt, 1, + owner, versionManager.address, guardian, salt, 1, ); const txReceipt = await factory.verboseWaitForTransaction(tx); const walletAddr = txReceipt.events.filter((event) => event.event === "WalletCreated")[0].args.wallet; @@ -241,7 +241,7 @@ contract("WalletFactory", (accounts) => { assert.equal(futureAddr, walletAddr, "should have the correct address"); // we test that the wallet has the correct modules const wallet = await deployer.wrapDeployedContract(BaseWallet, walletAddr); - const isAuthorised = await wallet.authorised(versionManager.contractAddress); + const isAuthorised = await wallet.authorised(versionManager.address); assert.equal(isAuthorised, true, "versionManager should be authorised"); }); @@ -253,11 +253,11 @@ contract("WalletFactory", (accounts) => { const salt = utils.generateSaltValue(); // we get the future address const futureAddr = await factory.getAddressForCounterfactualWallet( - owner, versionManager.contractAddress, guardian, salt, badVersion, + owner, versionManager.address, guardian, salt, badVersion, ); // we create the wallet const tx = await factory.from(deployer).createCounterfactualWallet( - owner, versionManager.contractAddress, guardian, salt, badVersion, + owner, versionManager.address, guardian, salt, badVersion, ); const txReceipt = await factory.verboseWaitForTransaction(tx); const walletAddr = txReceipt.events.filter((event) => event.event === "WalletCreated")[0].args.wallet; @@ -268,10 +268,10 @@ contract("WalletFactory", (accounts) => { it("should create with the correct guardian", async () => { const salt = utils.generateSaltValue(); // we get the future address - const futureAddr = await factory.getAddressForCounterfactualWallet(owner, versionManager.contractAddress, guardian, salt, 1); + const futureAddr = await factory.getAddressForCounterfactualWallet(owner, versionManager.address, guardian, salt, 1); // we create the wallet const tx = await factory.from(infrastructure).createCounterfactualWallet( - owner, versionManager.contractAddress, guardian, salt, 1, + owner, versionManager.address, guardian, salt, 1, ); const txReceipt = await factory.verboseWaitForTransaction(tx); const walletAddr = txReceipt.events.filter((event) => event.event === "WalletCreated")[0].args.wallet; @@ -285,10 +285,10 @@ contract("WalletFactory", (accounts) => { it("should fail to create a wallet at an existing address", async () => { const salt = utils.generateSaltValue(); // we get the future address - const futureAddr = await factory.getAddressForCounterfactualWallet(owner, versionManager.contractAddress, guardian, salt, 1); + const futureAddr = await factory.getAddressForCounterfactualWallet(owner, versionManager.address, guardian, salt, 1); // we create the first wallet const tx = await factory.from(infrastructure).createCounterfactualWallet( - owner, versionManager.contractAddress, guardian, salt, 1, + owner, versionManager.address, guardian, salt, 1, ); const txReceipt = await factory.verboseWaitForTransaction(tx); const walletAddr = txReceipt.events.filter((event) => event.event === "WalletCreated")[0].args.wallet; @@ -296,7 +296,7 @@ contract("WalletFactory", (accounts) => { assert.equal(futureAddr, walletAddr, "should have the correct address"); // we create the second wallet await assert.revert( - factory.from(infrastructure).createCounterfactualWallet(owner, versionManager.contractAddress, guardian, salt, 1), + factory.from(infrastructure).createCounterfactualWallet(owner, versionManager.address, guardian, salt, 1), "should fail when address is in use", ); }); @@ -314,7 +314,7 @@ contract("WalletFactory", (accounts) => { it("should fail to create when the guardian is empty", async () => { const salt = utils.generateSaltValue(); await assert.revertWith( - factory.from(infrastructure).createCounterfactualWallet(owner, versionManager.contractAddress, ZERO_ADDRESS, salt, 1), + factory.from(infrastructure).createCounterfactualWallet(owner, versionManager.address, ZERO_ADDRESS, salt, 1), "WF: guardian cannot be null", ); }); @@ -323,15 +323,15 @@ contract("WalletFactory", (accounts) => { const salt = utils.generateSaltValue(); const amount = ethers.BigNumber.from("10000000000000"); // we get the future address - const futureAddr = await factory.getAddressForCounterfactualWallet(owner, versionManager.contractAddress, guardian, salt, 1); + const futureAddr = await factory.getAddressForCounterfactualWallet(owner, versionManager.address, guardian, salt, 1); // We send ETH to the address await futureAddr.send(amount); // we create the wallet const tx = await factory.from(infrastructure).createCounterfactualWallet( - owner, versionManager.contractAddress, guardian, salt, 1, + owner, versionManager.address, guardian, salt, 1, ); const txReceipt = await factory.verboseWaitForTransaction(tx); - const wallet = deployer.wrapDeployedContract(BaseWallet, futureAddr); + const wallet = await BaseWallet.at(futureAddr); assert.isTrue(await utils.hasEvent(txReceipt, wallet, "Received"), "should have generated Received event"); const log = await utils.parseLogs(txReceipt, wallet, "Received"); assert.equal(log[0].value.toNumber(), amount, "should log the correct amount"); @@ -341,7 +341,7 @@ contract("WalletFactory", (accounts) => { it("should fail to get an address when the guardian is empty", async () => { const salt = utils.generateSaltValue(); await assert.revertWith( - factory.from(infrastructure).getAddressForCounterfactualWallet(owner, versionManager.contractAddress, ZERO_ADDRESS, salt, 1), + factory.from(infrastructure).getAddressForCounterfactualWallet(owner, versionManager.address, ZERO_ADDRESS, salt, 1), "WF: guardian cannot be null", ); }); diff --git a/test/guardianManager.js b/test/guardianManager.js index 758219db2..09a795def 100644 --- a/test/guardianManager.js +++ b/test/guardianManager.js @@ -36,7 +36,7 @@ contract("GuardianManager", (accounts) => { before(async () => { deployer = manager.newDeployer(); - walletImplementation = await deployer.deploy(BaseWallet); + walletImplementation = await BaseWallet.new(); }); beforeEach(async () => { @@ -44,52 +44,52 @@ contract("GuardianManager", (accounts) => { lockStorage = await deployer.deploy(LockStorage); guardianStorage = await deployer.deploy(GuardianStorage); versionManager = await deployer.deploy(VersionManager, {}, - registry.contractAddress, - lockStorage.contractAddress, - guardianStorage.contractAddress, + registry.address, + lockStorage.address, + guardianStorage.address, ethers.constants.AddressZero, ethers.constants.AddressZero); relayerManager = await deployer.deploy(RelayerManager, {}, - lockStorage.contractAddress, - guardianStorage.contractAddress, + lockStorage.address, + guardianStorage.address, ethers.constants.AddressZero, ethers.constants.AddressZero, - versionManager.contractAddress); + versionManager.address); guardianManager = await deployer.deploy(GuardianManager, {}, - lockStorage.contractAddress, - guardianStorage.contractAddress, - versionManager.contractAddress, + lockStorage.address, + guardianStorage.address, + versionManager.address, 24, 12); - await versionManager.addVersion([guardianManager.contractAddress, relayerManager.contractAddress], []); + await versionManager.addVersion([guardianManager.address, relayerManager.address], []); manager.setRelayerManager(relayerManager); - const proxy = await deployer.deploy(Proxy, {}, walletImplementation.contractAddress); - wallet = deployer.wrapDeployedContract(BaseWallet, proxy.contractAddress); - await wallet.init(owner, [versionManager.contractAddress]); - await versionManager.from(owner).upgradeWallet(wallet.contractAddress, await versionManager.lastVersion()); + const proxy = await deployer.deploy(Proxy, {}, walletImplementation.address); + wallet = deployer.wrapDeployedContract(BaseWallet, proxy.address); + await wallet.init(owner, [versionManager.address]); + await versionManager.from(owner).upgradeWallet(wallet.address, await versionManager.lastVersion()); }); describe("Adding Guardians", () => { describe("EOA Guardians", () => { it("should let the owner add EOA Guardians (blockchain transaction)", async () => { - await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardian1); - let count = (await guardianStorage.guardianCount(wallet.contractAddress)).toNumber(); - let active = await guardianManager.isGuardian(wallet.contractAddress, guardian1); + await guardianManager.from(owner).addGuardian(wallet.address, guardian1); + let count = (await guardianStorage.guardianCount(wallet.address)).toNumber(); + let active = await guardianManager.isGuardian(wallet.address, guardian1); assert.isTrue(active, "first guardian should be active"); assert.equal(count, 1, "1 guardian should be active"); - await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardian2); - count = (await guardianStorage.guardianCount(wallet.contractAddress)).toNumber(); - active = await guardianManager.isGuardian(wallet.contractAddress, guardian2); + await guardianManager.from(owner).addGuardian(wallet.address, guardian2); + count = (await guardianStorage.guardianCount(wallet.address)).toNumber(); + active = await guardianManager.isGuardian(wallet.address, guardian2); assert.isFalse(active, "second guardian should not yet be active"); assert.equal(count, 1, "second guardian should be pending during security period"); await manager.increaseTime(30); - await guardianManager.confirmGuardianAddition(wallet.contractAddress, guardian2); - count = (await guardianStorage.guardianCount(wallet.contractAddress)).toNumber(); - active = await guardianManager.isGuardian(wallet.contractAddress, guardian2); - const guardians = await guardianManager.getGuardians(wallet.contractAddress); + await guardianManager.confirmGuardianAddition(wallet.address, guardian2); + count = (await guardianStorage.guardianCount(wallet.address)).toNumber(); + active = await guardianManager.isGuardian(wallet.address, guardian2); + const guardians = await guardianManager.getGuardians(wallet.address); assert.isTrue(active, "second guardian should be active"); assert.equal(count, 2, "2 guardians should be active after security period"); assert.equal(guardian1, guardians[0], "should return first guardian address"); @@ -97,78 +97,78 @@ contract("GuardianManager", (accounts) => { }); it("should not let the owner add EOA Guardians after two security periods (blockchain transaction)", async () => { - await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardian1); - await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardian2); + await guardianManager.from(owner).addGuardian(wallet.address, guardian1); + await guardianManager.from(owner).addGuardian(wallet.address, guardian2); await manager.increaseTime(48); // 42 == 2 * security_period - await assert.revertWith(guardianManager.confirmGuardianAddition(wallet.contractAddress, guardian2), + await assert.revertWith(guardianManager.confirmGuardianAddition(wallet.address, guardian2), "GM: Too late to confirm guardian addition"); - const count = (await guardianStorage.guardianCount(wallet.contractAddress)).toNumber(); - const active = await guardianManager.isGuardian(wallet.contractAddress, guardian2); + const count = (await guardianStorage.guardianCount(wallet.address)).toNumber(); + const active = await guardianManager.isGuardian(wallet.address, guardian2); assert.isFalse(active, "second guardian should not be active (addition confirmation was too late)"); assert.equal(count, 1, "1 guardian should be active after two security periods (addition confirmation was too late)"); }); it("should not allow confirming too early", async () => { - await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardian1); - await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardian2); - await assert.revertWith(guardianManager.confirmGuardianAddition(wallet.contractAddress, guardian2), + await guardianManager.from(owner).addGuardian(wallet.address, guardian1); + await guardianManager.from(owner).addGuardian(wallet.address, guardian2); + await assert.revertWith(guardianManager.confirmGuardianAddition(wallet.address, guardian2), "GM: Too early to confirm guardian addition"); }); it("should let the owner re-add EOA Guardians after missing the confirmation window (blockchain transaction)", async () => { - await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardian1); + await guardianManager.from(owner).addGuardian(wallet.address, guardian1); // first time - await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardian2); + await guardianManager.from(owner).addGuardian(wallet.address, guardian2); await manager.increaseTime(48); // 42 == 2 * security_period - await assert.revertWith(guardianManager.confirmGuardianAddition(wallet.contractAddress, guardian2), + await assert.revertWith(guardianManager.confirmGuardianAddition(wallet.address, guardian2), "GM: Too late to confirm guardian addition"); // second time - await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardian2); - let count = (await guardianStorage.guardianCount(wallet.contractAddress)).toNumber(); - let active = await guardianManager.isGuardian(wallet.contractAddress, guardian2); + await guardianManager.from(owner).addGuardian(wallet.address, guardian2); + let count = (await guardianStorage.guardianCount(wallet.address)).toNumber(); + let active = await guardianManager.isGuardian(wallet.address, guardian2); assert.isFalse(active, "second guardian should not yet be active"); assert.equal(count, 1, "second guardian should be pending during security period"); await manager.increaseTime(30); - await guardianManager.confirmGuardianAddition(wallet.contractAddress, guardian2); - count = (await guardianStorage.guardianCount(wallet.contractAddress)).toNumber(); - active = await guardianManager.isGuardian(wallet.contractAddress, guardian2); + await guardianManager.confirmGuardianAddition(wallet.address, guardian2); + count = (await guardianStorage.guardianCount(wallet.address)).toNumber(); + active = await guardianManager.isGuardian(wallet.address, guardian2); assert.isTrue(active, "second guardian should be active"); assert.equal(count, 2, "2 guardians should be active after security period"); }); it("should only let the owner add an EOA guardian", async () => { - await assert.revertWith(guardianManager.from(nonowner).addGuardian(wallet.contractAddress, guardian1), + await assert.revertWith(guardianManager.from(nonowner).addGuardian(wallet.address, guardian1), "BF: must be owner or feature"); }); it("should not allow adding wallet owner as guardian", async () => { - await assert.revertWith(guardianManager.from(owner).addGuardian(wallet.contractAddress, owner), + await assert.revertWith(guardianManager.from(owner).addGuardian(wallet.address, owner), "GM: target guardian cannot be owner"); }); it("should not allow adding an existing guardian twice", async () => { - await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardian1); - await assert.revertWith(guardianManager.from(owner).addGuardian(wallet.contractAddress, guardian1), + await guardianManager.from(owner).addGuardian(wallet.address, guardian1); + await assert.revertWith(guardianManager.from(owner).addGuardian(wallet.address, guardian1), "GM: target is already a guardian"); }); it("should not allow adding a duplicate request to add a guardian to the request queue", async () => { - await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardian1); - await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardian2); - await assert.revertWith(guardianManager.from(owner).addGuardian(wallet.contractAddress, guardian2), + await guardianManager.from(owner).addGuardian(wallet.address, guardian1); + await guardianManager.from(owner).addGuardian(wallet.address, guardian2); + await assert.revertWith(guardianManager.from(owner).addGuardian(wallet.address, guardian2), "GM: addition of target as guardian is already pending"); }); it("should let the owner add an EOA guardian (relayed transaction)", async () => { - await manager.relay(guardianManager, "addGuardian", [wallet.contractAddress, guardian1], wallet, [owner]); - const count = (await guardianStorage.guardianCount(wallet.contractAddress)).toNumber(); - const active = await guardianManager.isGuardian(wallet.contractAddress, guardian1); + await manager.relay(guardianManager, "addGuardian", [wallet.address, guardian1], wallet, [owner]); + const count = (await guardianStorage.guardianCount(wallet.address)).toNumber(); + const active = await guardianManager.isGuardian(wallet.address, guardian1); assert.isTrue(active, "first guardian should be active"); assert.equal(count, 1, "1 guardian should be active"); }); @@ -178,13 +178,13 @@ contract("GuardianManager", (accounts) => { let count; let active; for (let i = 1; i <= 5; i += 1) { - await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardians[i - 1]); + await guardianManager.from(owner).addGuardian(wallet.address, guardians[i - 1]); if (i > 1) { await manager.increaseTime(31); - await guardianManager.confirmGuardianAddition(wallet.contractAddress, guardians[i - 1]); + await guardianManager.confirmGuardianAddition(wallet.address, guardians[i - 1]); } - count = (await guardianStorage.guardianCount(wallet.contractAddress)).toNumber(); - active = await guardianManager.isGuardian(wallet.contractAddress, guardians[i - 1]); + count = (await guardianStorage.guardianCount(wallet.address)).toNumber(); + active = await guardianManager.isGuardian(wallet.address, guardians[i - 1]); assert.equal(count, i, `guardian ${i} should be added`); assert.isTrue(active, `guardian ${i} should be active`); } @@ -195,13 +195,13 @@ contract("GuardianManager", (accounts) => { let count; let active; for (let i = 1; i <= 3; i += 1) { - await manager.relay(guardianManager, "addGuardian", [wallet.contractAddress, guardians[i - 1]], wallet, [owner]); + await manager.relay(guardianManager, "addGuardian", [wallet.address, guardians[i - 1]], wallet, [owner]); if (i > 1) { await manager.increaseTime(30); - await manager.relay(guardianManager, "confirmGuardianAddition", [wallet.contractAddress, guardians[i - 1]], wallet, []); + await manager.relay(guardianManager, "confirmGuardianAddition", [wallet.address, guardians[i - 1]], wallet, []); } - count = (await guardianStorage.guardianCount(wallet.contractAddress)).toNumber(); - active = await guardianManager.isGuardian(wallet.contractAddress, guardians[i - 1]); + count = (await guardianStorage.guardianCount(wallet.address)).toNumber(); + active = await guardianManager.isGuardian(wallet.address, guardians[i - 1]); assert.equal(count, i, `guardian ${i} should be added`); assert.isTrue(active, `guardian ${i} should be active`); } @@ -214,66 +214,66 @@ contract("GuardianManager", (accounts) => { let dumbContract; beforeEach(async () => { - const proxy1 = await deployer.deploy(Proxy, {}, walletImplementation.contractAddress); - guardianWallet1 = deployer.wrapDeployedContract(BaseWallet, proxy1.contractAddress); - await guardianWallet1.init(guardian1, [versionManager.contractAddress]); + const proxy1 = await deployer.deploy(Proxy, {}, walletImplementation.address); + guardianWallet1 = deployer.wrapDeployedContract(BaseWallet, proxy1.address); + await guardianWallet1.init(guardian1, [versionManager.address]); - const proxy2 = await deployer.deploy(Proxy, {}, walletImplementation.contractAddress); - guardianWallet2 = deployer.wrapDeployedContract(BaseWallet, proxy2.contractAddress); - await guardianWallet2.init(guardian2, [versionManager.contractAddress]); + const proxy2 = await deployer.deploy(Proxy, {}, walletImplementation.address); + guardianWallet2 = deployer.wrapDeployedContract(BaseWallet, proxy2.address); + await guardianWallet2.init(guardian2, [versionManager.address]); dumbContract = await deployer.deploy(DumbContract); }); it("should let the owner add Smart Contract Guardians (blockchain transaction)", async () => { - await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardianWallet1.contractAddress); - let count = (await guardianStorage.guardianCount(wallet.contractAddress)).toNumber(); - let active = await guardianManager.isGuardianOrGuardianSigner(wallet.contractAddress, guardian1); + await guardianManager.from(owner).addGuardian(wallet.address, guardianWallet1.address); + let count = (await guardianStorage.guardianCount(wallet.address)).toNumber(); + let active = await guardianManager.isGuardianOrGuardianSigner(wallet.address, guardian1); assert.isTrue(active, "first guardian owner should be recognized as guardian"); - active = await guardianManager.isGuardian(wallet.contractAddress, guardianWallet1.contractAddress); + active = await guardianManager.isGuardian(wallet.address, guardianWallet1.address); assert.isTrue(active, "first guardian should be recognized as guardian"); assert.equal(count, 1, "1 guardian should be active"); - await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardianWallet2.contractAddress); - count = (await guardianStorage.guardianCount(wallet.contractAddress)).toNumber(); - active = await guardianManager.isGuardianOrGuardianSigner(wallet.contractAddress, guardian2); + await guardianManager.from(owner).addGuardian(wallet.address, guardianWallet2.address); + count = (await guardianStorage.guardianCount(wallet.address)).toNumber(); + active = await guardianManager.isGuardian(wallet.address, guardian2); assert.isFalse(active, "second guardian owner should not yet be active"); - active = await guardianManager.isGuardian(wallet.contractAddress, guardianWallet2.contractAddress); + active = await guardianManager.isGuardian(wallet.address, guardianWallet2.address); assert.isFalse(active, "second guardian should not yet be active"); assert.equal(count, 1, "second guardian should be pending during security period"); await manager.increaseTime(30); - await guardianManager.confirmGuardianAddition(wallet.contractAddress, guardianWallet2.contractAddress); - count = (await guardianStorage.guardianCount(wallet.contractAddress)).toNumber(); - active = await guardianManager.isGuardianOrGuardianSigner(wallet.contractAddress, guardian2); + await guardianManager.confirmGuardianAddition(wallet.address, guardianWallet2.address); + count = (await guardianStorage.guardianCount(wallet.address)).toNumber(); + active = await guardianManager.isGuardian(wallet.address, guardian2); assert.isTrue(active, "second guardian owner should be active"); - active = await guardianManager.isGuardian(wallet.contractAddress, guardianWallet2.contractAddress); + active = await guardianManager.isGuardian(wallet.address, guardianWallet2.address); assert.isTrue(active, "second guardian should be active"); assert.equal(count, 2, "2 guardians should be active after security period"); }); it("should let the owner add a Smart Contract guardian (relayed transaction)", async () => { - await manager.relay(guardianManager, "addGuardian", [wallet.contractAddress, guardianWallet1.contractAddress], wallet, [owner]); - const count = (await guardianStorage.guardianCount(wallet.contractAddress)).toNumber(); - let active = await guardianManager.isGuardian(wallet.contractAddress, guardianWallet1.contractAddress); + await manager.relay(guardianManager, "addGuardian", [wallet.address, guardianWallet1.address], wallet, [owner]); + const count = (await guardianStorage.guardianCount(wallet.address)).toNumber(); + let active = await guardianManager.isGuardian(wallet.address, guardianWallet1.address); assert.isTrue(active, "first guardian should be active"); - active = await guardianManager.isGuardianOrGuardianSigner(wallet.contractAddress, guardian1); + active = await guardianManager.isGuardianOrGuardianSigner(wallet.address, guardian1); assert.isTrue(active, "first guardian owner should be active"); assert.equal(count, 1, "1 guardian should be active"); }); it("should not let owner add a Smart Contract guardian that does not have an owner manager", async () => { - await assert.revertWith(guardianManager.from(owner).addGuardian(wallet.contractAddress, dumbContract.contractAddress), + await assert.revertWith(guardianManager.from(owner).addGuardian(wallet.address, dumbContract.address), "GM: guardian must be EOA or implement owner()"); }); describe("Non-Compliant Guardians", () => { let nonCompliantGuardian; beforeEach(async () => { - await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardian1); - nonCompliantGuardian = await deployer.deploy(NonCompliantGuardian); + await guardianManager.from(owner).addGuardian(wallet.address, guardian1); + nonCompliantGuardian = await NonCompliantGuardian.new(); }); it("it should fail to add a non-compliant guardian", async () => { - await assert.revert(guardianManager.from(owner).addGuardian(wallet.contractAddress, nonCompliantGuardian.contractAddress)); + await assert.revert(guardianManager.from(owner).addGuardian(wallet.address, nonCompliantGuardian.address)); }); }); }); @@ -281,169 +281,169 @@ contract("GuardianManager", (accounts) => { describe("Revoking Guardians", () => { beforeEach(async () => { - await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardian1); - await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardian2); + await guardianManager.from(owner).addGuardian(wallet.address, guardian1); + await guardianManager.from(owner).addGuardian(wallet.address, guardian2); await manager.increaseTime(30); - await guardianManager.confirmGuardianAddition(wallet.contractAddress, guardian2); - const count = (await guardianStorage.guardianCount(wallet.contractAddress)).toNumber(); + await guardianManager.confirmGuardianAddition(wallet.address, guardian2); + const count = (await guardianStorage.guardianCount(wallet.address)).toNumber(); assert.equal(count, 2, "2 guardians should be added"); }); it("should revoke a guardian (blockchain transaction)", async () => { - await guardianManager.from(owner).revokeGuardian(wallet.contractAddress, guardian1); - let count = (await guardianStorage.guardianCount(wallet.contractAddress)).toNumber(); - let active = await guardianManager.isGuardian(wallet.contractAddress, guardian1); + await guardianManager.from(owner).revokeGuardian(wallet.address, guardian1); + let count = (await guardianStorage.guardianCount(wallet.address)).toNumber(); + let active = await guardianManager.isGuardian(wallet.address, guardian1); assert.isTrue(active, "the revoked guardian should still be active during the security period"); assert.equal(count, 2, "the revoked guardian should go through a security period"); await manager.increaseTime(30); - await guardianManager.confirmGuardianRevokation(wallet.contractAddress, guardian1); - count = (await guardianStorage.guardianCount(wallet.contractAddress)).toNumber(); - active = await guardianManager.isGuardian(wallet.contractAddress, guardian1); + await guardianManager.confirmGuardianRevokation(wallet.address, guardian1); + count = (await guardianStorage.guardianCount(wallet.address)).toNumber(); + active = await guardianManager.isGuardian(wallet.address, guardian1); assert.isFalse(active, "the revoked guardian should no longer be active after the security period"); assert.equal(count, 1, "the revoked guardian should be removed after the security period"); }); it("should not be able to revoke a nonexistent guardian", async () => { - await assert.revertWith(guardianManager.from(owner).revokeGuardian(wallet.contractAddress, nonowner), + await assert.revertWith(guardianManager.from(owner).revokeGuardian(wallet.address, nonowner), "GM: must be an existing guardian"); }); it("should not confirm a guardian revokation too early", async () => { - await guardianManager.from(owner).revokeGuardian(wallet.contractAddress, guardian1); - await assert.revertWith(guardianManager.confirmGuardianRevokation(wallet.contractAddress, guardian1), + await guardianManager.from(owner).revokeGuardian(wallet.address, guardian1); + await assert.revertWith(guardianManager.confirmGuardianRevokation(wallet.address, guardian1), "GM: Too early to confirm guardian revokation"); }); it("should not confirm a guardian revokation after two security periods (blockchain transaction)", async () => { - await guardianManager.from(owner).revokeGuardian(wallet.contractAddress, guardian1); + await guardianManager.from(owner).revokeGuardian(wallet.address, guardian1); await manager.increaseTime(48); // 48 == 2 * security_period - await assert.revertWith(guardianManager.confirmGuardianRevokation(wallet.contractAddress, guardian1), + await assert.revertWith(guardianManager.confirmGuardianRevokation(wallet.address, guardian1), "GM: Too late to confirm guardian revokation"); }); it("should not be able to revoke a guardian twice", async () => { - await guardianManager.from(owner).revokeGuardian(wallet.contractAddress, guardian1); - await assert.revertWith(guardianManager.from(owner).revokeGuardian(wallet.contractAddress, guardian1), + await guardianManager.from(owner).revokeGuardian(wallet.address, guardian1); + await assert.revertWith(guardianManager.from(owner).revokeGuardian(wallet.address, guardian1), "GM: revokation of target as guardian is already pending"); }); it("should revoke a guardian again after missing the confirmation window the first time (blockchain transaction)", async () => { // first time - await guardianManager.from(owner).revokeGuardian(wallet.contractAddress, guardian1); + await guardianManager.from(owner).revokeGuardian(wallet.address, guardian1); await manager.increaseTime(48); // 48 == 2 * security_period - await assert.revertWith(guardianManager.confirmGuardianRevokation(wallet.contractAddress, guardian1), + await assert.revertWith(guardianManager.confirmGuardianRevokation(wallet.address, guardian1), "GM: Too late to confirm guardian revokation"); // second time - await guardianManager.from(owner).revokeGuardian(wallet.contractAddress, guardian1); - let count = (await guardianStorage.guardianCount(wallet.contractAddress)).toNumber(); - let active = await guardianManager.isGuardian(wallet.contractAddress, guardian1); + await guardianManager.from(owner).revokeGuardian(wallet.address, guardian1); + let count = (await guardianStorage.guardianCount(wallet.address)).toNumber(); + let active = await guardianManager.isGuardian(wallet.address, guardian1); assert.isTrue(active, "the revoked guardian should still be active during the security period"); assert.equal(count, 2, "the revoked guardian should go through a security period"); await manager.increaseTime(30); - await guardianManager.confirmGuardianRevokation(wallet.contractAddress, guardian1); - count = (await guardianStorage.guardianCount(wallet.contractAddress)).toNumber(); - active = await guardianManager.isGuardian(wallet.contractAddress, guardian1); + await guardianManager.confirmGuardianRevokation(wallet.address, guardian1); + count = (await guardianStorage.guardianCount(wallet.address)).toNumber(); + active = await guardianManager.isGuardian(wallet.address, guardian1); assert.isFalse(active, "the revoked guardian should no longer be active after the security period"); assert.equal(count, 1, "the revoked guardian should be removed after the security period"); }); it("should add a guardian after a revoke (blockchain transaction)", async () => { - await guardianManager.from(owner).revokeGuardian(wallet.contractAddress, guardian1); + await guardianManager.from(owner).revokeGuardian(wallet.address, guardian1); await manager.increaseTime(30); - await guardianManager.confirmGuardianRevokation(wallet.contractAddress, guardian1); - let count = (await guardianStorage.guardianCount(wallet.contractAddress)).toNumber(); + await guardianManager.confirmGuardianRevokation(wallet.address, guardian1); + let count = (await guardianStorage.guardianCount(wallet.address)).toNumber(); assert.equal(count, 1, "there should be 1 guardian left"); - await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardian3); + await guardianManager.from(owner).addGuardian(wallet.address, guardian3); await manager.increaseTime(30); - await guardianManager.confirmGuardianAddition(wallet.contractAddress, guardian3); - count = (await guardianStorage.guardianCount(wallet.contractAddress)).toNumber(); + await guardianManager.confirmGuardianAddition(wallet.address, guardian3); + count = (await guardianStorage.guardianCount(wallet.address)).toNumber(); assert.equal(count, 2, "there should be 2 guardians again"); }); it("should be able to remove a guardian that is the last in the list", async () => { - await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardian3); + await guardianManager.from(owner).addGuardian(wallet.address, guardian3); await manager.increaseTime(30); - await guardianManager.confirmGuardianAddition(wallet.contractAddress, guardian3); - let count = await guardianStorage.guardianCount(wallet.contractAddress); + await guardianManager.confirmGuardianAddition(wallet.address, guardian3); + let count = await guardianStorage.guardianCount(wallet.address); assert.equal(count.toNumber(), 3, "there should be 3 guardians"); - const guardians = await guardianStorage.getGuardians(wallet.contractAddress); - await guardianManager.from(owner).revokeGuardian(wallet.contractAddress, guardians[2]); + const guardians = await guardianStorage.getGuardians(wallet.address); + await guardianManager.from(owner).revokeGuardian(wallet.address, guardians[2]); await manager.increaseTime(30); - await guardianManager.confirmGuardianRevokation(wallet.contractAddress, guardians[2]); - count = await guardianStorage.guardianCount(wallet.contractAddress); + await guardianManager.confirmGuardianRevokation(wallet.address, guardians[2]); + count = await guardianStorage.guardianCount(wallet.address); assert.equal(count.toNumber(), 2, "there should be 2 guardians left"); }); }); describe("Cancelling Pending Guardians", () => { beforeEach(async () => { - await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardian1); - const count = (await guardianManager.guardianCount(wallet.contractAddress)).toNumber(); + await guardianManager.from(owner).addGuardian(wallet.address, guardian1); + const count = (await guardianManager.guardianCount(wallet.address)).toNumber(); assert.equal(count, 1, "1 guardian should be added"); }); it("owner should be able to cancel pending addition of guardian (blockchain transaction)", async () => { // Add guardian 2 and cancel its addition - await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardian2); - await guardianManager.from(owner).cancelGuardianAddition(wallet.contractAddress, guardian2); + await guardianManager.from(owner).addGuardian(wallet.address, guardian2); + await guardianManager.from(owner).cancelGuardianAddition(wallet.address, guardian2); await manager.increaseTime(30); - await assert.revertWith(guardianManager.confirmGuardianAddition(wallet.contractAddress, guardian2), + await assert.revertWith(guardianManager.confirmGuardianAddition(wallet.address, guardian2), "GM: no pending addition as guardian for target"); }); it("owner should not be able to cancel a nonexistent addition of a guardian request", async () => { - await assert.revertWith(guardianManager.from(owner).cancelGuardianAddition(wallet.contractAddress, guardian2), + await assert.revertWith(guardianManager.from(owner).cancelGuardianAddition(wallet.address, guardian2), "GM: no pending addition as guardian for target"); }); it("owner should be able to cancel pending revokation of guardian (blockchain transaction)", async () => { // Revoke guardian 1 and cancel its revokation - await guardianManager.from(owner).revokeGuardian(wallet.contractAddress, guardian1); - await guardianManager.from(owner).cancelGuardianRevokation(wallet.contractAddress, guardian1); + await guardianManager.from(owner).revokeGuardian(wallet.address, guardian1); + await guardianManager.from(owner).cancelGuardianRevokation(wallet.address, guardian1); await manager.increaseTime(30); - await assert.revertWith(guardianManager.confirmGuardianRevokation(wallet.contractAddress, guardian1), + await assert.revertWith(guardianManager.confirmGuardianRevokation(wallet.address, guardian1), "GM: no pending guardian revokation for target"); }); it("owner should not be able to cancel a nonexistent pending revokation of guardian", async () => { - await assert.revertWith(guardianManager.from(owner).cancelGuardianRevokation(wallet.contractAddress, nonowner), + await assert.revertWith(guardianManager.from(owner).cancelGuardianRevokation(wallet.address, nonowner), "GM: no pending guardian revokation for target"); }); it("owner should be able to cancel pending addition of guardian (relayed transaction)", async () => { // Add guardian 2 and cancel its addition - await manager.relay(guardianManager, "addGuardian", [wallet.contractAddress, guardian2], wallet, [owner]); - await manager.relay(guardianManager, "cancelGuardianAddition", [wallet.contractAddress, guardian2], wallet, [owner]); + await manager.relay(guardianManager, "addGuardian", [wallet.address, guardian2], wallet, [owner]); + await manager.relay(guardianManager, "cancelGuardianAddition", [wallet.address, guardian2], wallet, [owner]); await manager.increaseTime(30); - await assert.revertWith(guardianManager.confirmGuardianAddition(wallet.contractAddress, guardian2), + await assert.revertWith(guardianManager.confirmGuardianAddition(wallet.address, guardian2), "GM: no pending addition as guardian for target"); }); it("owner should be able to cancel pending revokation of guardian (relayed transaction)", async () => { // Revoke guardian 1 and cancel its revokation - await manager.relay(guardianManager, "revokeGuardian", [wallet.contractAddress, guardian1], wallet, [owner]); - await manager.relay(guardianManager, "cancelGuardianRevokation", [wallet.contractAddress, guardian1], wallet, [owner]); + await manager.relay(guardianManager, "revokeGuardian", [wallet.address, guardian1], wallet, [owner]); + await manager.relay(guardianManager, "cancelGuardianRevokation", [wallet.address, guardian1], wallet, [owner]); await manager.increaseTime(30); - await assert.revertWith(guardianManager.confirmGuardianRevokation(wallet.contractAddress, guardian1), + await assert.revertWith(guardianManager.confirmGuardianRevokation(wallet.address, guardian1), "GM: no pending guardian revokation for target"); }); }); describe("Guardian Storage", () => { it("should not allow non modules to addGuardian", async () => { - await assert.revertWith(guardianStorage.addGuardian(wallet.contractAddress, guardian4), + await assert.revertWith(guardianStorage.addGuardian(wallet.address, guardian4), "must be an authorized module to call this method"); }); it("should not allow non modules to revokeGuardian", async () => { - await assert.revertWith(guardianStorage.revokeGuardian(wallet.contractAddress, guardian1), + await assert.revertWith(guardianStorage.revokeGuardian(wallet.address, guardian1), "must be an authorized module to call this method"); }); }); diff --git a/test/kyber.js b/test/kyber.js index 04e676d6e..bde090cb7 100644 --- a/test/kyber.js +++ b/test/kyber.js @@ -22,13 +22,13 @@ contract("KyberNetwork", (accounts) => { beforeEach(async () => { deployer = manager.newDeployer(); - kyber = await deployer.deploy(KyberNetwork); - erc20 = await deployer.deploy(ERC20, {}, [kyber.contractAddress], ERC20_SUPPLY, ERC20_DECIMALS); - await kyber.addToken(erc20.contractAddress, ERC20_RATE, ERC20_DECIMALS); + kyber = await KyberNetwork.new(); + erc20 = await ERC20.new([kyber.address], ERC20_SUPPLY, ERC20_DECIMALS); + await kyber.addToken(erc20.address, ERC20_RATE, ERC20_DECIMALS); }); it("should return the expected rate for a token pair", async () => { - const rate = await kyber.getExpectedRate(erc20.contractAddress, ETH_TOKEN, 1); + const rate = await kyber.getExpectedRate(erc20.address, ETH_TOKEN, 1); assert.equal(rate[0], ERC20_RATE, "rate should be correct"); }); @@ -36,7 +36,7 @@ contract("KyberNetwork", (accounts) => { const beforeERC20 = await erc20.balanceOf(trader); const beforeETH = await deployer.provider.getBalance(trader); assert.equal(beforeERC20.toNumber(), 0, "trader should have no ERC20"); - await kyber.from(trader).trade(ETH_TOKEN, 10000, erc20.contractAddress, trader, + await kyber.from(trader).trade(ETH_TOKEN, 10000, erc20.address, trader, ethers.BigNumber.from("10000000000000000000000"), 1, "0x0000000000000000000000000000000000000000", { value: 10000 }); const afterERC20 = await erc20.balanceOf(trader); const afterETH = await deployer.provider.getBalance(trader); @@ -49,7 +49,7 @@ contract("KyberNetwork", (accounts) => { await kyber.trade( ETH_TOKEN, ethers.BigNumber.from("1000000000000000000"), - erc20.contractAddress, + erc20.address, trader, ethers.BigNumber.from("10000000000000000000000"), 1, @@ -61,8 +61,8 @@ contract("KyberNetwork", (accounts) => { assert.equal(beforeERC20 > 0, true, "trader should have some ERC20"); // exchange ERC20 const srcAmount = beforeERC20.div(ethers.BigNumber.from(2)); - await erc20.from(trader).approve(kyber.contractAddress, srcAmount); - await kyber.from(trader).trade(erc20.contractAddress, srcAmount, ETH_TOKEN, trader, + await erc20.from(trader).approve(kyber.address, srcAmount); + await kyber.from(trader).trade(erc20.address, srcAmount, ETH_TOKEN, trader, ethers.BigNumber.from("10000000000000000000000"), 1, "0x0000000000000000000000000000000000000000"); const afterERC20 = await erc20.balanceOf(trader); const afterETH = await deployer.provider.getBalance(trader); diff --git a/test/lockManager.js b/test/lockManager.js index 36380cbb0..03e11ef32 100644 --- a/test/lockManager.js +++ b/test/lockManager.js @@ -33,177 +33,177 @@ contract("LockManager", (accounts) => { before(async () => { deployer = manager.newDeployer(); - walletImplementation = await deployer.deploy(BaseWallet); + walletImplementation = await BaseWallet.new(); }); beforeEach(async () => { - const registry = await deployer.deploy(Registry); - guardianStorage = await deployer.deploy(GuardianStorage); - lockStorage = await deployer.deploy(LockStorage); - versionManager = await deployer.deploy(VersionManager, {}, - registry.contractAddress, - lockStorage.contractAddress, - guardianStorage.contractAddress, + const registry = await Registry.new(); + guardianStorage = await GuardianStorage.new(); + lockStorage = await LockStorage.new(); + versionManager = await VersionManager.new( + registry.address, + lockStorage.address, + guardianStorage.address, ethers.constants.AddressZero, ethers.constants.AddressZero); - guardianManager = await deployer.deploy(GuardianManager, {}, - lockStorage.contractAddress, - guardianStorage.contractAddress, - versionManager.contractAddress, + guardianManager = await GuardianManager.new( + lockStorage.address, + guardianStorage.address, + versionManager.address, 24, 12); - lockManager = await deployer.deploy(LockManager, {}, - lockStorage.contractAddress, - guardianStorage.contractAddress, - versionManager.contractAddress, + lockManager = await LockManager.new( + lockStorage.address, + guardianStorage.address, + versionManager.address, 24 * 5); - recoveryManager = await deployer.deploy(RecoveryManager, {}, - lockStorage.contractAddress, - guardianStorage.contractAddress, - versionManager.contractAddress, + recoveryManager = await RecoveryManager.new( + lockStorage.address, + guardianStorage.address, + versionManager.address, 36, 24 * 5); - relayerManager = await deployer.deploy(RelayerManager, {}, - lockStorage.contractAddress, - guardianStorage.contractAddress, + relayerManager = await RelayerManager.new( + lockStorage.address, + guardianStorage.address, ethers.constants.AddressZero, ethers.constants.AddressZero, - versionManager.contractAddress); + versionManager.address); manager.setRelayerManager(relayerManager); - const proxy = await deployer.deploy(Proxy, {}, walletImplementation.contractAddress); - wallet = deployer.wrapDeployedContract(BaseWallet, proxy.contractAddress); + const proxy = await Proxy.new(walletImplementation.address); + wallet = deployer.wrapDeployedContract(BaseWallet, proxy.address); await versionManager.addVersion([ - guardianManager.contractAddress, - lockManager.contractAddress, - recoveryManager.contractAddress, - relayerManager.contractAddress, + guardianManager.address, + lockManager.address, + recoveryManager.address, + relayerManager.address, ], []); - await wallet.init(owner, [versionManager.contractAddress]); - await versionManager.from(owner).upgradeWallet(wallet.contractAddress, await versionManager.lastVersion()); + await wallet.init(owner, [versionManager.address]); + await versionManager.from(owner).upgradeWallet(wallet.address, await versionManager.lastVersion()); }); describe("(Un)Lock by EOA guardians", () => { beforeEach(async () => { - await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardian1); - const count = (await guardianManager.guardianCount(wallet.contractAddress)).toNumber(); + await guardianManager.from(owner).addGuardian(wallet.address, guardian1); + const count = (await guardianManager.guardianCount(wallet.address)).toNumber(); assert.equal(count, 1, "1 guardian should be added"); - const isGuardian = await guardianManager.isGuardian(wallet.contractAddress, guardian1); + const isGuardian = await guardianManager.isGuardian(wallet.address, guardian1); assert.isTrue(isGuardian, "guardian1 should be a guardian of the wallet"); - const isLocked = await lockManager.isLocked(wallet.contractAddress); + const isLocked = await lockManager.isLocked(wallet.address); assert.isFalse(isLocked, "should be unlocked by default"); }); it("should be locked/unlocked by EOA guardians (blockchain transaction)", async () => { // lock - await lockManager.from(guardian1).lock(wallet.contractAddress); - let state = await lockManager.isLocked(wallet.contractAddress); + await lockManager.from(guardian1).lock(wallet.address); + let state = await lockManager.isLocked(wallet.address); assert.isTrue(state, "should be locked by guardian"); - let releaseTime = await lockManager.getLock(wallet.contractAddress); + let releaseTime = await lockManager.getLock(wallet.address); assert.isTrue(releaseTime > 0, "releaseTime should be positive"); - const guardianStorageLock = await guardianStorage.getLock(wallet.contractAddress); - const guardianStorageLocker = await guardianStorage.getLocker(wallet.contractAddress); + const guardianStorageLock = await guardianStorage.getLock(wallet.address); + const guardianStorageLocker = await guardianStorage.getLocker(wallet.address); assert.isTrue(guardianStorageLock.eq(0), "legacy guardianStorage's lock should be unused"); assert.isTrue(guardianStorageLocker === ethers.constants.AddressZero, "legacy guardianStorage's locker should be unused"); // unlock - await lockManager.from(guardian1).unlock(wallet.contractAddress); - state = await lockManager.isLocked(wallet.contractAddress); + await lockManager.from(guardian1).unlock(wallet.address); + state = await lockManager.isLocked(wallet.address); assert.isFalse(state, "should be unlocked by guardian"); - releaseTime = await lockManager.getLock(wallet.contractAddress); + releaseTime = await lockManager.getLock(wallet.address); assert.equal(releaseTime, 0, "releaseTime should be zero"); }); it("should be locked/unlocked by EOA guardians (relayed transaction)", async () => { - await manager.relay(lockManager, "lock", [wallet.contractAddress], wallet, [guardian1]); - let state = await lockManager.isLocked(wallet.contractAddress); + await manager.relay(lockManager, "lock", [wallet.address], wallet, [guardian1]); + let state = await lockManager.isLocked(wallet.address); assert.isTrue(state, "should be locked by guardian"); - await manager.relay(lockManager, "unlock", [wallet.contractAddress], wallet, [guardian1]); - state = await lockManager.isLocked(wallet.contractAddress); + await manager.relay(lockManager, "unlock", [wallet.address], wallet, [guardian1]); + state = await lockManager.isLocked(wallet.address); assert.isFalse(state, "should be unlocked by guardian"); }); it("should fail to lock/unlock by non-guardian EOAs (blockchain transaction)", async () => { - await assert.revert(lockManager.from(nonguardian).lock(wallet.contractAddress), "locking from non-guardian should fail"); + await assert.revert(lockManager.from(nonguardian).lock(wallet.address), "locking from non-guardian should fail"); - await lockManager.from(guardian1).lock(wallet.contractAddress); - const state = await lockManager.isLocked(wallet.contractAddress); + await lockManager.from(guardian1).lock(wallet.address); + const state = await lockManager.isLocked(wallet.address); assert.isTrue(state, "should be locked by guardian1"); - await assert.revert(lockManager.from(nonguardian).unlock(wallet.contractAddress)); + await assert.revert(lockManager.from(nonguardian).unlock(wallet.address)); }); }); describe("(Un)Lock by Smart Contract guardians", () => { beforeEach(async () => { - const proxy = await deployer.deploy(Proxy, {}, walletImplementation.contractAddress); - const guardianWallet = deployer.wrapDeployedContract(BaseWallet, proxy.contractAddress); + const proxy = await Proxy.at(walletImplementation.address); + const guardianWallet = await BaseWallet.at(proxy.address); - await guardianWallet.init(guardian1, [versionManager.contractAddress]); - await versionManager.from(guardian1).upgradeWallet(guardianWallet.contractAddress, await versionManager.lastVersion()); - await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardianWallet.contractAddress); - const count = (await guardianManager.guardianCount(wallet.contractAddress)).toNumber(); + await guardianWallet.init(guardian1, [versionManager.address]); + await versionManager.from(guardian1).upgradeWallet(guardianWallet.address, await versionManager.lastVersion()); + await guardianManager.from(owner).addGuardian(wallet.address, guardianWallet.address); + const count = (await guardianManager.guardianCount(wallet.address)).toNumber(); assert.equal(count, 1, "1 guardian should be added"); - const isGuardian = await guardianManager.isGuardian(wallet.contractAddress, guardianWallet.contractAddress); + const isGuardian = await guardianManager.isGuardian(wallet.address, guardianWallet.address); assert.isTrue(isGuardian, "guardian1 should be a guardian of the wallet"); - const isLocked = await lockManager.isLocked(wallet.contractAddress); + const isLocked = await lockManager.isLocked(wallet.address); assert.isFalse(isLocked, "should be unlocked by default"); }); it("should be locked/unlocked by Smart Contract guardians (relayed transaction)", async () => { - await manager.relay(lockManager, "lock", [wallet.contractAddress], wallet, [guardian1]); - let state = await lockManager.isLocked(wallet.contractAddress); + await manager.relay(lockManager, "lock", [wallet.address], wallet, [guardian1]); + let state = await lockManager.isLocked(wallet.address); assert.isTrue(state, "should be locked by guardian"); - await manager.relay(lockManager, "unlock", [wallet.contractAddress], wallet, [guardian1]); - state = await lockManager.isLocked(wallet.contractAddress); + await manager.relay(lockManager, "unlock", [wallet.address], wallet, [guardian1]); + state = await lockManager.isLocked(wallet.address); assert.isFalse(state, "should be unlocked by locker"); }); it("should fail to lock/unlock by Smart Contract guardians when signer is not authorized (relayed transaction)", async () => { - await assert.revertWith(manager.relay(lockManager, "lock", [wallet.contractAddress], wallet, [nonguardian]), "RM: Invalid signatures"); + await assert.revertWith(manager.relay(lockManager, "lock", [wallet.address], wallet, [nonguardian]), "RM: Invalid signatures"); }); }); describe("Auto-unlock", () => { it("should auto-unlock after lock period", async () => { - await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardian1); - await lockManager.from(guardian1).lock(wallet.contractAddress); - let state = await lockManager.isLocked(wallet.contractAddress); + await guardianManager.from(owner).addGuardian(wallet.address, guardian1); + await lockManager.from(guardian1).lock(wallet.address); + let state = await lockManager.isLocked(wallet.address); assert.isTrue(state, "should be locked by guardian"); - let releaseTime = await lockManager.getLock(wallet.contractAddress); + let releaseTime = await lockManager.getLock(wallet.address); assert.isTrue(releaseTime > 0, "releaseTime should be positive"); await manager.increaseTime(24 * 5 + 5); - state = await lockManager.isLocked(wallet.contractAddress); + state = await lockManager.isLocked(wallet.address); assert.isFalse(state, "should be unlocked by guardian"); - releaseTime = await lockManager.getLock(wallet.contractAddress); + releaseTime = await lockManager.getLock(wallet.address); assert.equal(releaseTime, 0, "releaseTime should be zero"); }); }); describe("Unlocking wallets", () => { beforeEach(async () => { - await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardian1); + await guardianManager.from(owner).addGuardian(wallet.address, guardian1); }); it("should not be able to unlock, an already unlocked wallet", async () => { // lock - await lockManager.from(guardian1).lock(wallet.contractAddress); + await lockManager.from(guardian1).lock(wallet.address); // unlock - await lockManager.from(guardian1).unlock(wallet.contractAddress); + await lockManager.from(guardian1).unlock(wallet.address); // try to unlock again - await assert.revertWith(lockManager.from(guardian1).unlock(wallet.contractAddress), + await assert.revertWith(lockManager.from(guardian1).unlock(wallet.address), "VM Exception while processing transaction: revert LM: wallet must be locked"); }); it("should not be able to unlock a wallet, locked by another feature", async () => { // lock by putting the wallet in recovery mode - await manager.relay(recoveryManager, "executeRecovery", [wallet.contractAddress, accounts[5]], wallet, [guardian1]); + await manager.relay(recoveryManager, "executeRecovery", [wallet.address, accounts[5]], wallet, [guardian1]); // try to unlock - await assert.revertWith(lockManager.from(guardian1).unlock(wallet.contractAddress), + await assert.revertWith(lockManager.from(guardian1).unlock(wallet.address), "LM: cannot unlock a wallet that was locked by another feature"); }); }); diff --git a/test/makerV2Manager_invest.js b/test/makerV2Manager_invest.js index c4f8f559b..658ccc669 100644 --- a/test/makerV2Manager_invest.js +++ b/test/makerV2Manager_invest.js @@ -33,7 +33,7 @@ contract("MakerV2Invest", (accounts) => { let dai; before(async () => { - const m = await deployMaker(deployer, infrastructure); + const m = await deployMaker(infrastructure); [sai, dai] = [m.sai, m.dai]; const { migration, @@ -43,59 +43,57 @@ contract("MakerV2Invest", (accounts) => { gov, } = m; - const registry = await deployer.deploy(Registry); - const guardianStorage = await deployer.deploy(GuardianStorage); - const lockStorage = await deployer.deploy(LockStorage); - versionManager = await deployer.deploy(VersionManager, {}, - registry.contractAddress, - lockStorage.contractAddress, - guardianStorage.contractAddress, + const registry = await Registry.new(); + const guardianStorage = await GuardianStorage.new(); + const lockStorage = await LockStorage.new(); + versionManager = await VersionManager.new( + registry.address, + lockStorage.address, + guardianStorage.address, ethers.constants.AddressZero, ethers.constants.AddressZero); - const makerRegistry = await deployer.deploy(MakerRegistry, {}, vat.contractAddress); + const makerRegistry = await MakerRegistry.new(vat.address); // Deploy Uniswap - const uni = await deployUniswap(deployer, manager, infrastructure, [gov, dai], [ETH_PER_MKR, ETH_PER_DAI]); - - makerV2 = await deployer.deploy( - MakerV2Manager, - {}, - lockStorage.contractAddress, - migration.contractAddress, - pot.contractAddress, - jug.contractAddress, - makerRegistry.contractAddress, - uni.uniswapFactory.contractAddress, - versionManager.contractAddress, + const uni = await deployUniswap(manager, infrastructure, [gov, dai], [ETH_PER_MKR, ETH_PER_DAI]); + + makerV2 = await MakerV2Manager.new( + lockStorage.address, + migration.address, + pot.address, + jug.address, + makerRegistry.address, + uni.uniswapFactory.address, + versionManager.address, ); - walletImplementation = await deployer.deploy(BaseWallet); + walletImplementation = await BaseWallet.new(); - relayerManager = await deployer.deploy(RelayerManager, {}, - lockStorage.contractAddress, - guardianStorage.contractAddress, + relayerManager = await RelayerManager.new( + lockStorage.address, + guardianStorage.address, ethers.constants.AddressZero, ethers.constants.AddressZero, - versionManager.contractAddress); + versionManager.address); manager.setRelayerManager(relayerManager); - await versionManager.addVersion([makerV2.contractAddress, relayerManager.contractAddress], []); + await versionManager.addVersion([makerV2.address, relayerManager.address], []); }); beforeEach(async () => { - const proxy = await deployer.deploy(Proxy, {}, walletImplementation.contractAddress); - wallet = deployer.wrapDeployedContract(BaseWallet, proxy.contractAddress); + const proxy = await Proxy.new(walletImplementation.address); + wallet = await BaseWallet.at(proxy.address); - await wallet.init(owner, [versionManager.contractAddress]); - await versionManager.from(owner).upgradeWallet(wallet.contractAddress, await versionManager.lastVersion()); - await sai["mint(address,uint256)"](wallet.contractAddress, DAI_SENT.mul(20)); - await dai["mint(address,uint256)"](wallet.contractAddress, DAI_SENT.mul(20)); + await wallet.init(owner, [versionManager.address]); + await versionManager.from(owner).upgradeWallet(wallet.address, await versionManager.lastVersion()); + await sai["mint(address,uint256)"](wallet.address, DAI_SENT.mul(20)); + await dai["mint(address,uint256)"](wallet.address, DAI_SENT.mul(20)); }); async function exchangeWithPot({ toPot, relayed, all = false }) { - const walletBefore = (await dai.balanceOf(wallet.contractAddress)).add(await sai.balanceOf(wallet.contractAddress)); - const investedBefore = await makerV2.dsrBalance(wallet.contractAddress); + const walletBefore = (await dai.balanceOf(wallet.address)).add(await sai.balanceOf(wallet.address)); + const investedBefore = await makerV2.dsrBalance(wallet.address); let method; if (toPot) { method = "joinDsr"; @@ -104,14 +102,14 @@ contract("MakerV2Invest", (accounts) => { } else { method = "exitDsr"; } - const params = [wallet.contractAddress].concat(all ? [] : [DAI_SENT]); + const params = [wallet.address].concat(all ? [] : [DAI_SENT]); if (relayed) { await manager.relay(makerV2, method, params, wallet, [owner]); } else { await (await makerV2.from(owner)[method](...params, { gasLimit: 2000000 })).wait(); } - const walletAfter = (await dai.balanceOf(wallet.contractAddress)).add(await sai.balanceOf(wallet.contractAddress)); - const investedAfter = await makerV2.dsrBalance(wallet.contractAddress); + const walletAfter = (await dai.balanceOf(wallet.address)).add(await sai.balanceOf(wallet.address)); + const investedAfter = await makerV2.dsrBalance(wallet.address); const deltaInvested = toPot ? investedAfter.sub(investedBefore) : investedBefore.sub(investedAfter); const deltaWallet = toPot ? walletBefore.sub(walletAfter) : walletAfter.sub(walletBefore); assert.isTrue(deltaInvested.gt(0), "DAI in DSR should have changed."); diff --git a/test/makerV2Manager_loan.js b/test/makerV2Manager_loan.js index 239c42379..c03d4340b 100644 --- a/test/makerV2Manager_loan.js +++ b/test/makerV2Manager_loan.js @@ -64,32 +64,30 @@ contract("MakerV2Loan", (accounts) => { before(async () => { // Deploy Maker - const mk = await deployMaker(deployer, infrastructure); + const mk = await deployMaker(infrastructure); [sai, dai, gov, bat, weth, vat, batJoin, cdpManager, pot, jug, migration] = [ mk.sai, mk.dai, mk.gov, mk.bat, mk.weth, mk.vat, mk.batJoin, mk.cdpManager, mk.pot, mk.jug, mk.migration, ]; const { wethJoin } = mk; // Deploy Uniswap - const uni = await deployUniswap(deployer, manager, infrastructure, [gov, dai], [ETH_PER_MKR, ETH_PER_DAI]); + const uni = await deployUniswap(manager, infrastructure, [gov, dai], [ETH_PER_MKR, ETH_PER_DAI]); uniswapFactory = uni.uniswapFactory; // Deploy MakerV2Manager - const registry = await deployer.deploy(Registry); - guardianStorage = await deployer.deploy(GuardianStorage); - lockStorage = await deployer.deploy(LockStorage); - versionManager = await deployer.deploy(VersionManager, {}, + const registry = await Registry.new(); + guardianStorage = await GuardianStorage.new(); + lockStorage = await LockStorage.new(); + versionManager = await VersionManager.new( registry.contractAddress, lockStorage.contractAddress, guardianStorage.contractAddress, ethers.constants.AddressZero, ethers.constants.AddressZero); - makerRegistry = await deployer.deploy(MakerRegistry, {}, vat.contractAddress); + makerRegistry = await MakerRegistry.new(vat.contractAddress); await makerRegistry.addCollateral(wethJoin.contractAddress); - makerV2 = await deployer.deploy( - MakerV2Manager, - {}, + makerV2 = await MakerV2Manager.new( lockStorage.contractAddress, migration.contractAddress, pot.contractAddress, @@ -100,10 +98,10 @@ contract("MakerV2Loan", (accounts) => { ); // Deploy TransferManager - const transferStorage = await deployer.deploy(TransferStorage); - const limitStorage = await deployer.deploy(LimitStorage); - const tokenPriceRegistry = await deployer.deploy(TokenPriceRegistry); - transferManager = await deployer.deploy(TransferManager, {}, + const transferStorage = await TransferStorage.new(); + const limitStorage = await LimitStorage.new(); + const tokenPriceRegistry = await TokenPriceRegistry.new(); + transferManager = await TransferManager.new( lockStorage.contractAddress, transferStorage.contractAddress, limitStorage.contractAddress, @@ -115,9 +113,9 @@ contract("MakerV2Loan", (accounts) => { AddressZero, AddressZero); - walletImplementation = await deployer.deploy(BaseWallet); + walletImplementation = await BaseWallet.new(); - relayerManager = await deployer.deploy(RelayerManager, {}, + relayerManager = await RelayerManager.new( lockStorage.contractAddress, guardianStorage.contractAddress, ethers.constants.AddressZero, @@ -133,8 +131,8 @@ contract("MakerV2Loan", (accounts) => { }); beforeEach(async () => { - const proxy = await deployer.deploy(Proxy, {}, walletImplementation.contractAddress); - wallet = deployer.wrapDeployedContract(BaseWallet, proxy.contractAddress); + const proxy = await Proxy.new(walletImplementation.address); + wallet = await BaseWallet.at(proxy.address); await wallet.init(owner, [versionManager.contractAddress]); await versionManager.from(owner).upgradeWallet(wallet.contractAddress, await versionManager.lastVersion()); @@ -144,7 +142,7 @@ contract("MakerV2Loan", (accounts) => { }); async function getTestAmounts(tokenAddress) { - const tokenAddress_ = (tokenAddress === ETH_TOKEN) ? weth.contractAddress : tokenAddress; + const tokenAddress_ = (tokenAddress === ETH_TOKEN) ? weth.address : tokenAddress; const { ilk } = await makerRegistry.collaterals(tokenAddress_); const { spot, dust } = await vat.ilks(ilk); const daiAmount = dust.div(RAY); @@ -155,7 +153,7 @@ contract("MakerV2Loan", (accounts) => { async function testOpenLoan({ collateralAmount, daiAmount, relayed, collateral = { contractAddress: ETH_TOKEN }, }) { - const beforeCollateral = (collateral.contractAddress === ETH_TOKEN) + const beforeCollateral = (collateral.address === ETH_TOKEN) ? await deployer.provider.getBalance(walletAddress) : await collateral.balanceOf(walletAddress); @@ -163,7 +161,7 @@ contract("MakerV2Loan", (accounts) => { const beforeDAISupply = await dai.totalSupply(); const method = "openLoan"; - const params = [walletAddress, collateral.contractAddress, collateralAmount, dai.contractAddress, daiAmount]; + const params = [walletAddress, collateral.address, collateralAmount, dai.address, daiAmount]; let txReceipt; if (relayed) { txReceipt = await manager.relay(makerV2, method, params, wallet, [owner]); @@ -175,7 +173,7 @@ contract("MakerV2Loan", (accounts) => { const loanId = (await parseLogs(txReceipt, makerV2, "LoanOpened"))[0]._loanId; assert.isDefined(loanId, "Loan ID should be defined"); - const afterCollateral = (collateral.contractAddress === ETH_TOKEN) + const afterCollateral = (collateral.address === ETH_TOKEN) ? await deployer.provider.getBalance(walletAddress) : await collateral.balanceOf(walletAddress); const afterDAI = await dai.balanceOf(walletAddress); @@ -231,14 +229,14 @@ contract("MakerV2Loan", (accounts) => { it("should not open a loan for the wrong debt token", async () => { await assert.revertWith( - makerV2.from(owner).openLoan(walletAddress, ETH_TOKEN, collateralAmount, sai.contractAddress, daiAmount), + makerV2.from(owner).openLoan(walletAddress, ETH_TOKEN, collateralAmount, sai.address, daiAmount), "MV2: debt token not DAI", ); }); it("should not open a loan for an unsupported collateral token", async () => { await assert.revertWith( - makerV2.from(owner).openLoan(walletAddress, sai.contractAddress, collateralAmount, dai.contractAddress, daiAmount), + makerV2.from(owner).openLoan(walletAddress, sai.address, collateralAmount, dai.address, daiAmount), "MV2: unsupported collateral", ); }); @@ -247,12 +245,12 @@ contract("MakerV2Loan", (accounts) => { async function testChangeCollateral({ loanId, collateralAmount, add, relayed, collateral = { contractAddress: ETH_TOKEN }, makerV2Manager = makerV2, }) { - const beforeCollateral = (collateral.contractAddress === ETH_TOKEN) + const beforeCollateral = (collateral.address === ETH_TOKEN) ? await deployer.provider.getBalance(walletAddress) : await collateral.balanceOf(walletAddress); const method = add ? "addCollateral" : "removeCollateral"; - const params = [wallet.contractAddress, loanId, collateral.contractAddress, collateralAmount]; + const params = [wallet.address, loanId, collateral.address, collateralAmount]; if (relayed) { const txR = await manager.relay(makerV2Manager, method, params, wallet, [owner]); assert.isTrue(txR.events.find((e) => e.event === "TransactionExecuted").args.success, "Relayed tx should succeed"); @@ -260,7 +258,7 @@ contract("MakerV2Loan", (accounts) => { await makerV2Manager.from(owner)[method](...params, { gasLimit: 2000000 }); } - const afterCollateral = (collateral.contractAddress === ETH_TOKEN) + const afterCollateral = (collateral.address === ETH_TOKEN) ? await deployer.provider.getBalance(walletAddress) : await collateral.balanceOf(walletAddress); @@ -298,12 +296,12 @@ contract("MakerV2Loan", (accounts) => { it("should not add collateral for the wrong loan owner", async () => { const loanId = await testOpenLoan({ collateralAmount, daiAmount, relayed: false }); - const proxy = await deployer.deploy(Proxy, {}, walletImplementation.contractAddress); - const wallet2 = deployer.wrapDeployedContract(BaseWallet, proxy.contractAddress); + const proxy = await Proxy.new(walletImplementation.address); + const wallet2 = await BaseWallet.at(proxy.address); await wallet2.init(owner2, [versionManager.contractAddress]); await assert.revertWith( - makerV2.from(owner2).addCollateral(wallet2.contractAddress, loanId, ETH_TOKEN, parseEther("0.010")), + makerV2.from(owner2).addCollateral(wallet2.address, loanId, ETH_TOKEN, parseEther("0.010")), "MV2: unauthorized loanId", ); }); @@ -332,12 +330,12 @@ contract("MakerV2Loan", (accounts) => { it("should not remove collateral for the wrong loan owner", async () => { const loanId = await testOpenLoan({ collateralAmount, daiAmount, relayed: false }); - const proxy = await deployer.deploy(Proxy, {}, walletImplementation.contractAddress); - const wallet2 = deployer.wrapDeployedContract(BaseWallet, proxy.contractAddress); + const proxy = await Proxy.new(walletImplementation.address); + const wallet2 = await BaseWallet.at(proxy.address); await wallet2.init(owner2, [versionManager.contractAddress]); await assert.revertWith( - makerV2.from(owner2).removeCollateral(wallet2.contractAddress, loanId, ETH_TOKEN, parseEther("0.010")), + makerV2.from(owner2).removeCollateral(wallet2.address, loanId, ETH_TOKEN, parseEther("0.010")), "MV2: unauthorized loanId", ); }); @@ -346,18 +344,18 @@ contract("MakerV2Loan", (accounts) => { async function testChangeDebt({ loanId, daiAmount, add, relayed, }) { - const beforeDAI = await dai.balanceOf(wallet.contractAddress); - const beforeETH = await deployer.provider.getBalance(wallet.contractAddress); + const beforeDAI = await dai.balanceOf(wallet.address); + const beforeETH = await deployer.provider.getBalance(wallet.address); const method = add ? "addDebt" : "removeDebt"; - const params = [wallet.contractAddress, loanId, dai.contractAddress, daiAmount]; + const params = [wallet.address, loanId, dai.address, daiAmount]; if (relayed) { const txR = await manager.relay(makerV2, method, params, { contractAddress: walletAddress }, [owner]); assert.isTrue(txR.events.find((e) => e.event === "TransactionExecuted").args.success, "Relayed tx should succeed"); } else { await makerV2.from(owner)[method](...params, { gasLimit: 2000000 }); } - const afterDAI = await dai.balanceOf(wallet.contractAddress); - const afterETH = await deployer.provider.getBalance(wallet.contractAddress); + const afterDAI = await dai.balanceOf(wallet.address); + const afterETH = await deployer.provider.getBalance(wallet.address); if (add) { assert.equal( afterDAI.sub(beforeDAI).toString(), @@ -398,12 +396,12 @@ contract("MakerV2Loan", (accounts) => { it("should not increase debt for the wrong loan owner", async () => { const loanId = await testOpenLoan({ collateralAmount, daiAmount, relayed: false }); - const proxy = await deployer.deploy(Proxy, {}, walletImplementation.contractAddress); - const wallet2 = deployer.wrapDeployedContract(BaseWallet, proxy.contractAddress); + const proxy = await Proxy.new(walletImplementation.address); + const wallet2 = await BaseWallet.at(proxy.address); await wallet2.init(owner2, [versionManager.contractAddress]); await assert.revertWith( - makerV2.from(owner2).addDebt(wallet2.contractAddress, loanId, ETH_TOKEN, parseEther("0.010")), + makerV2.from(owner2).addDebt(wallet2.address, loanId, ETH_TOKEN, parseEther("0.010")), "MV2: unauthorized loanId", ); }); @@ -415,14 +413,14 @@ contract("MakerV2Loan", (accounts) => { const loanId = await testOpenLoan({ collateralAmount, daiAmount, relayed }); await manager.increaseTime(3); // wait 3 seconds - const beforeDAI = await dai.balanceOf(wallet.contractAddress); - const beforeETH = await deployer.provider.getBalance(wallet.contractAddress); + const beforeDAI = await dai.balanceOf(wallet.address); + const beforeETH = await deployer.provider.getBalance(wallet.address); await testChangeDebt({ loanId, daiAmount: parseEther("0.2"), add: false, relayed, }); - const afterDAI = await dai.balanceOf(wallet.contractAddress); - const afterETH = await deployer.provider.getBalance(wallet.contractAddress); + const afterDAI = await dai.balanceOf(wallet.address); + const afterETH = await deployer.provider.getBalance(wallet.address); assert.isTrue(afterDAI.lt(beforeDAI) && afterETH.eq(beforeETH), "should have less DAI"); } @@ -440,7 +438,7 @@ contract("MakerV2Loan", (accounts) => { const { collateralAmount, daiAmount } = await getTestAmounts(ETH_TOKEN); const loanId = await testOpenLoan({ collateralAmount, daiAmount, relayed: false }); await assert.revertWith( - makerV2.from(owner).removeDebt(walletAddress, loanId, dai.contractAddress, daiAmount.sub(1)), + makerV2.from(owner).removeDebt(walletAddress, loanId, dai.address, daiAmount.sub(1)), "MV2: repay less or full", ); }); @@ -448,12 +446,12 @@ contract("MakerV2Loan", (accounts) => { it("should not repay debt for the wrong loan owner", async () => { const { collateralAmount, daiAmount } = await getTestAmounts(ETH_TOKEN); const loanId = await testOpenLoan({ collateralAmount, daiAmount, relayed: false }); - const proxy = await deployer.deploy(Proxy, {}, walletImplementation.contractAddress); - const wallet2 = deployer.wrapDeployedContract(BaseWallet, proxy.contractAddress); + const proxy = await Proxy.new(walletImplementation.address); + const wallet2 = await BaseWallet.at(proxy.address); await wallet2.init(owner2, [versionManager.contractAddress]); await assert.revertWith( - makerV2.from(owner2).removeDebt(wallet2.contractAddress, loanId, ETH_TOKEN, parseEther("0.010")), + makerV2.from(owner2).removeDebt(wallet2.address, loanId, ETH_TOKEN, parseEther("0.010")), "MV2: unauthorized loanId", ); }); @@ -467,7 +465,7 @@ contract("MakerV2Loan", (accounts) => { await manager.increaseTime(3); // wait 3 seconds const beforeDAI = await dai.balanceOf(wallet.contractAddress); const method = "closeLoan"; - const params = [wallet.contractAddress, loanId]; + const params = [wallet.address, loanId]; if (relayed) { const txR = await manager.relay(makerV2, method, params, { contractAddress: walletAddress }, [owner]); assert.isTrue(txR.events.find((e) => e.event === "TransactionExecuted").args.success, "Relayed tx should succeed"); @@ -491,12 +489,12 @@ contract("MakerV2Loan", (accounts) => { it("should not close a vault for the wrong loan owner", async () => { const { collateralAmount, daiAmount } = await getTestAmounts(ETH_TOKEN); const loanId = await testOpenLoan({ collateralAmount, daiAmount, relayed: false }); - const proxy = await deployer.deploy(Proxy, {}, walletImplementation.contractAddress); - const wallet2 = deployer.wrapDeployedContract(BaseWallet, proxy.contractAddress); + const proxy = await Proxy.new(walletImplementation.address); + const wallet2 = await BaseWallet.at(proxy.address); await wallet2.init(owner2, [versionManager.contractAddress]); await assert.revertWith( - makerV2.from(owner2).closeLoan(wallet2.contractAddress, loanId), + makerV2.from(owner2).closeLoan(wallet2.address, loanId), "MV2: unauthorized loanId", ); }); @@ -505,43 +503,43 @@ contract("MakerV2Loan", (accounts) => { describe("MakerRegistry", () => { it("should add a new collateral token", async () => { const numCollateralBefore = (await makerRegistry.getCollateralTokens()).length; - await makerRegistry.addCollateral(batJoin.contractAddress); + await makerRegistry.addCollateral(batJoin.address); const numCollateralAfter = (await makerRegistry.getCollateralTokens()).length; assert.equal(numCollateralAfter, numCollateralBefore + 1, "A new collateral should have been added"); - await makerRegistry.removeCollateral(bat.contractAddress); // cleanup + await makerRegistry.removeCollateral(bat.address); // cleanup }); it("should open a loan with a newly added collateral token", async () => { - await makerRegistry.addCollateral(batJoin.contractAddress); - const { daiAmount, collateralAmount } = await getTestAmounts(bat.contractAddress); + await makerRegistry.addCollateral(batJoin.address); + const { daiAmount, collateralAmount } = await getTestAmounts(bat.address); await bat["mint(address,uint256)"](walletAddress, collateralAmount); await testOpenLoan({ collateralAmount, daiAmount, collateral: bat, relayed: false, }); - await makerRegistry.removeCollateral(bat.contractAddress); // cleanup + await makerRegistry.removeCollateral(bat.address); // cleanup }); it("should not add a collateral when Join is not in the Vat", async () => { - const badJoin = await deployer.deploy(GemJoin, {}, vat.contractAddress, formatBytes32String("BAD"), bat.contractAddress); - await assert.revertWith(makerRegistry.addCollateral(badJoin.contractAddress), "MR: _joinAdapter not authorised in vat"); + const badJoin = await GemJoin.new(vat.address, formatBytes32String("BAD"), bat.address); + await assert.revertWith(makerRegistry.addCollateral(badJoin.address), "MR: _joinAdapter not authorised in vat"); }); it("should not add a duplicate collateral", async () => { - await makerRegistry.addCollateral(batJoin.contractAddress); - await assert.revertWith(makerRegistry.addCollateral(batJoin.contractAddress), "MR: collateral already added"); - await makerRegistry.removeCollateral(bat.contractAddress); // cleanup + await makerRegistry.addCollateral(batJoin.address); + await assert.revertWith(makerRegistry.addCollateral(batJoin.address), "MR: collateral already added"); + await makerRegistry.removeCollateral(bat.address); // cleanup }); it("should remove a collateral", async () => { const numCollateralBefore = (await makerRegistry.getCollateralTokens()).length; - await makerRegistry.addCollateral(batJoin.contractAddress); - await makerRegistry.removeCollateral(bat.contractAddress); + await makerRegistry.addCollateral(batJoin.address); + await makerRegistry.removeCollateral(bat.address); const numCollateralAfter = (await makerRegistry.getCollateralTokens()).length; assert.equal(numCollateralAfter, numCollateralBefore, "The added collateral should have been removed"); }); it("should not remove a non-existing collateral", async () => { - await assert.revertWith(makerRegistry.removeCollateral(bat.contractAddress), "MR: collateral does not exist"); + await assert.revertWith(makerRegistry.removeCollateral(bat.address), "MR: collateral does not exist"); }); }); @@ -589,7 +587,7 @@ contract("MakerV2Loan", (accounts) => { it("should not transfer a vault that is not owned by the wallet", async () => { // Create the vault with `owner` as owner - const { ilk } = await makerRegistry.collaterals(weth.contractAddress); + const { ilk } = await makerRegistry.collaterals(weth.address); const txR = await (await cdpManager.from(owner).open(ilk, owner)).wait(); const vaultId = txR.events.find((e) => e.event === "NewCdp").args.cdp; const loanId = bigNumToBytes32(vaultId); @@ -601,18 +599,18 @@ contract("MakerV2Loan", (accounts) => { it("should not transfer a vault that is not given to the feature", async () => { // Deploy a fake wallet - const fakeWallet = await deployer.deploy(FakeWallet, {}, false, AddressZero, 0, "0x00"); + const fakeWallet = await FakeWallet.new(false, AddressZero, 0, "0x00"); await fakeWallet.init(owner, [versionManager.contractAddress]); await versionManager.from(owner).upgradeWallet(fakeWallet.contractAddress, await versionManager.lastVersion()); // Create the vault with `owner` as owner - const { ilk } = await makerRegistry.collaterals(weth.contractAddress); + const { ilk } = await makerRegistry.collaterals(weth.address); const txR = await (await cdpManager.from(owner).open(ilk, owner)).wait(); const vaultId = txR.events.find((e) => e.event === "NewCdp").args.cdp; const loanId = bigNumToBytes32(vaultId); // Transfer the vault to the fake wallet - await cdpManager.from(owner).give(vaultId, fakeWallet.contractAddress); + await cdpManager.from(owner).give(vaultId, fakeWallet.address); await assert.revertWith( - makerV2.from(owner).acquireLoan(fakeWallet.contractAddress, loanId), "MV2: failed give", + makerV2.from(owner).acquireLoan(fakeWallet.address, loanId), "MV2: failed give", ); }); @@ -631,18 +629,18 @@ contract("MakerV2Loan", (accounts) => { it("should not allow reentrancy in acquireLoan", async () => { // Deploy a fake wallet capable of reentrancy const acquireLoanCallData = makerV2.contract.interface.functions.acquireLoan.encode([AddressZero, bigNumToBytes32(ethers.BigNumber.from(0))]); - const fakeWallet = await deployer.deploy(FakeWallet, {}, true, makerV2.contractAddress, 0, acquireLoanCallData); + const fakeWallet = await FakeWallet.new(true, makerV2.contractAddress, 0, acquireLoanCallData); await fakeWallet.init(owner, [versionManager.contractAddress]); await versionManager.from(owner).upgradeWallet(fakeWallet.contractAddress, await versionManager.lastVersion()); // Create the vault with `owner` as owner - const { ilk } = await makerRegistry.collaterals(weth.contractAddress); + const { ilk } = await makerRegistry.collaterals(weth.address); const txR = await (await cdpManager.from(owner).open(ilk, owner)).wait(); const vaultId = txR.events.find((e) => e.event === "NewCdp").args.cdp; const loanId = bigNumToBytes32(vaultId); // Transfer the vault to the fake wallet - await cdpManager.from(owner).give(vaultId, fakeWallet.contractAddress); + await cdpManager.from(owner).give(vaultId, fakeWallet.address); await assert.revertWith( - makerV2.from(owner).acquireLoan(fakeWallet.contractAddress, loanId), "MV2: reentrant call", + makerV2.from(owner).acquireLoan(fakeWallet.address, loanId), "MV2: reentrant call", ); }); }); @@ -659,9 +657,7 @@ contract("MakerV2Loan", (accounts) => { collateralAmount = testAmounts.collateralAmount; // Deploy and register the upgraded MakerV2 feature - upgradedMakerV2 = await deployer.deploy( - UpgradedMakerV2Manager, - {}, + upgradedMakerV2 = await UpgradedMakerV2Manager.new( lockStorage.contractAddress, migration.contractAddress, pot.contractAddress, @@ -674,8 +670,8 @@ contract("MakerV2Loan", (accounts) => { ); // Adding BAT to the registry of supported collateral tokens - if (!(await makerRegistry.collaterals(bat.contractAddress)).exists) { - await makerRegistry.addCollateral(batJoin.contractAddress); + if (!(await makerRegistry.collaterals(bat.address)).exists) { + await makerRegistry.addCollateral(batJoin.address); } }); @@ -762,7 +758,7 @@ contract("MakerV2Loan", (accounts) => { it("should not allow (fake) feature to give unowned vault", async () => { // Deploy a (fake) bad feature - const badFeature = await deployer.deploy(BadFeature, {}, lockStorage.contractAddress, versionManager.contractAddress, 0); + const badFeature = await BadFeaturenew(lockStorage.contractAddress, versionManager.contractAddress, 0); // Add the bad feature to the wallet await versionManager.addVersion([ diff --git a/test/multisig.js b/test/multisig.js index 0cb7f21dd..67efcec36 100644 --- a/test/multisig.js +++ b/test/multisig.js @@ -29,14 +29,14 @@ contract("MultiSigWallet", (accounts) => { }); beforeEach(async () => { - multisig = await deployer.deploy(MultiSigWallet, {}, 2, owners); + multisig = await MultiSigWallet.new(2, owners); - reg = await deployer.deploy(TestRegistry, {}); + reg = await TestRegistry.new(); // Fund the multisig await multisig.send(value); - const bal = await deployer.provider.getBalance(multisig.contractAddress); + const bal = await deployer.provider.getBalance(multisig.address); assert.equal(bal.toNumber(), value); }); @@ -62,17 +62,17 @@ contract("MultiSigWallet", (accounts) => { async function executeSendSuccess(signers) { let nonce = await multisig.nonce(); const data = reg.contract.interface.functions.register.encode([number]); - const signedData = MultisigExecutor.signHash(multisig.contractAddress, reg.contractAddress, value, data, nonce.toNumber()); + const signedData = MultisigExecutor.signHash(multisig.address, reg.address, value, data, nonce.toNumber()); const signatures = await getSignatures(signedData, signers); - await multisig.execute(reg.contractAddress, value, data, signatures); + await multisig.execute(reg.address, value, data, signatures); // Check that number has been set in registry - const numFromRegistry = await reg.registry(multisig.contractAddress); + const numFromRegistry = await reg.registry(multisig.address); assert.equal(numFromRegistry.toNumber(), number); // Check funds in registry - const bal = await deployer.provider.getBalance(reg.contractAddress); + const bal = await deployer.provider.getBalance(reg.address); assert.equal(bal.toString(), value.toString()); // Check nonce updated @@ -85,27 +85,27 @@ contract("MultiSigWallet", (accounts) => { nonce = nonce.toNumber() + nonceOffset; const data = reg.contract.interface.functions.register.encode([number]); - const signedData = MultisigExecutor.signHash(multisig.contractAddress, reg.contractAddress, value, data, nonce); + const signedData = MultisigExecutor.signHash(multisig.address, reg.address, value, data, nonce); const signatures = await getSignatures(signedData, signers, sortSigners, returnBadSignatures); - await assert.revertWith(multisig.execute(reg.contractAddress, value, data, signatures), errorMessage); + await assert.revertWith(multisig.execute(reg.address, value, data, signatures), errorMessage); } async function getMultiSigParams(functioName, params) { const nonce = await multisig.nonce(); const data = multisig.contract.interface.functions[functioName].encode([...params]); - const signedData = MultisigExecutor.signHash(multisig.contractAddress, multisig.contractAddress, 0, data, nonce.toNumber()); + const signedData = MultisigExecutor.signHash(multisig.address, multisig.address, 0, data, nonce.toNumber()); const signatures = await getSignatures(signedData, [owner1, owner2]); return { data, signatures }; } describe("Creating and changing the multisig", () => { it("should not be able to instantiate without owners", async () => { - await assert.revertWith(deployer.deploy(MultiSigWallet, {}, 2, []), "MSW: Not enough or too many owners"); + await assert.revertWith(MultiSigWallet.new(2, []), "MSW: Not enough or too many owners"); }); it("should not be able to instantiate with 0 threshold", async () => { - await assert.revertWith(deployer.deploy(MultiSigWallet, {}, 0, owners), "MSW: Invalid threshold"); + await assert.revertWith(MultiSigWallet.new(0, owners), "MSW: Invalid threshold"); }); it("should store owners correctly", async () => { @@ -137,7 +137,7 @@ contract("MultiSigWallet", (accounts) => { it("should be able to add new owner", async () => { const { data, signatures } = await getMultiSigParams("addOwner", [newowner]); - await multisig.execute(multisig.contractAddress, 0, data, signatures); + await multisig.execute(multisig.address, 0, data, signatures); const isOwner = await multisig.isOwner(newowner); assert.isTrue(isOwner); @@ -149,7 +149,7 @@ contract("MultiSigWallet", (accounts) => { for (let i = 4; i <= 10; i += 1) { const randomAddress = await utils.getRandomAddress(); const { data, signatures } = await getMultiSigParams("addOwner", [randomAddress]); - await multisig.execute(multisig.contractAddress, 0, data, signatures); + await multisig.execute(multisig.address, 0, data, signatures); } const ownersCount = await multisig.ownersCount(); @@ -157,17 +157,17 @@ contract("MultiSigWallet", (accounts) => { const randomAddress = await utils.getRandomAddress(); const { data, signatures } = await getMultiSigParams("addOwner", [randomAddress]); - await assert.revertWith(multisig.execute(multisig.contractAddress, 0, data, signatures), "MSW: External call failed"); + await assert.revertWith(multisig.execute(multisig.address, 0, data, signatures), "MSW: External call failed"); }); it("should not be able to add owner twice", async () => { const { data, signatures } = await getMultiSigParams("addOwner", [owner1]); - await assert.revertWith(multisig.execute(multisig.contractAddress, 0, data, signatures), "MSW: External call failed"); + await assert.revertWith(multisig.execute(multisig.address, 0, data, signatures), "MSW: External call failed"); }); it("should be able to remove existing owner", async () => { const { data, signatures } = await getMultiSigParams("removeOwner", [owner1]); - await multisig.execute(multisig.contractAddress, 0, data, signatures); + await multisig.execute(multisig.address, 0, data, signatures); const isOwner = await multisig.isOwner(owner1); assert.isFalse(isOwner); @@ -175,16 +175,16 @@ contract("MultiSigWallet", (accounts) => { it("should not be able to remove owner if remaining owners are at the threshold count", async () => { const values1 = await getMultiSigParams("removeOwner", [owner3]); - await multisig.execute(multisig.contractAddress, 0, values1.data, values1.signatures); + await multisig.execute(multisig.address, 0, values1.data, values1.signatures); const values2 = await getMultiSigParams("removeOwner", [owner2]); - await assert.revertWith(multisig.execute(multisig.contractAddress, 0, values2.data, values2.signatures), "MSW: External call failed"); + await assert.revertWith(multisig.execute(multisig.address, 0, values2.data, values2.signatures), "MSW: External call failed"); }); it("should not be able to remove a nonexisting owner", async () => { const randomAddress = await utils.getRandomAddress(); const { data, signatures } = await getMultiSigParams("removeOwner", [randomAddress]); - await assert.revertWith(multisig.execute(multisig.contractAddress, 0, data, signatures), "MSW: External call failed"); + await assert.revertWith(multisig.execute(multisig.address, 0, data, signatures), "MSW: External call failed"); }); it("should be able to change the threshold", async () => { @@ -192,7 +192,7 @@ contract("MultiSigWallet", (accounts) => { assert.equal(threshold.toNumber(), 2); const { data, signatures } = await getMultiSigParams("changeThreshold", [3]); - await multisig.execute(multisig.contractAddress, 0, data, signatures); + await multisig.execute(multisig.address, 0, data, signatures); threshold = await multisig.threshold(); assert.equal(threshold.toNumber(), 3); @@ -200,7 +200,7 @@ contract("MultiSigWallet", (accounts) => { it("should not be able to change the threshold to be more than the current number of owners", async () => { const { data, signatures } = await getMultiSigParams("changeThreshold", [4]); - await assert.revertWith(multisig.execute(multisig.contractAddress, 0, data, signatures), "MSW: External call failed"); + await assert.revertWith(multisig.execute(multisig.address, 0, data, signatures), "MSW: External call failed"); }); }); diff --git a/test/nftTransfer.js b/test/nftTransfer.js index ab1787f8f..2d3c65382 100644 --- a/test/nftTransfer.js +++ b/test/nftTransfer.js @@ -8,7 +8,7 @@ const VersionManager = artifacts.require("VersionManager"); const RelayerManager = artifacts.require("RelayerManager"); const LockStorage = artifacts.require("LockStorage"); const GuardianStorage = artifacts.require("GuardianStorage"); -const NftModule = artifacts.require("NftTransfer"); +const NftTransfer = artifacts.require("NftTransfer"); const TokenPriceRegistry = artifacts.require("TokenPriceRegistry"); const ERC721 = artifacts.require("TestERC721"); @@ -30,7 +30,6 @@ contract("NftTransfer", (accounts) => { const eoaRecipient = accounts[3]; const tokenId = 1; - let deployer; let nftFeature; let walletImplementation; let relayerManager; @@ -46,63 +45,62 @@ contract("NftTransfer", (accounts) => { let versionManager; before(async () => { - deployer = manager.newDeployer(); - const registry = await deployer.deploy(Registry); - walletImplementation = await deployer.deploy(BaseWallet); - - const guardianStorage = await deployer.deploy(GuardianStorage); - lockStorage = await deployer.deploy(LockStorage); - versionManager = await deployer.deploy(VersionManager, {}, - registry.contractAddress, - lockStorage.contractAddress, + const registry = await Registry.new(); + walletImplementation = await BaseWallet.new(); + + const guardianStorage = await GuardianStorage.new(); + lockStorage = await LockStorage.new(); + versionManager = await VersionManager.new( + registry.address, + lockStorage.address, ethers.constants.AddressZero, ethers.constants.AddressZero, ethers.constants.AddressZero); - relayerManager = await deployer.deploy(RelayerManager, {}, - lockStorage.contractAddress, - guardianStorage.contractAddress, + relayerManager = await RelayerManager.new( + lockStorage.address, + guardianStorage.address, ethers.constants.AddressZero, ethers.constants.AddressZero, - versionManager.contractAddress); + versionManager.address); manager.setRelayerManager(relayerManager); - ck = await deployer.deploy(CK); - tokenPriceRegistry = await deployer.deploy(TokenPriceRegistry); + ck = await CK.new(); + tokenPriceRegistry = await TokenPriceRegistry.new(); await tokenPriceRegistry.addManager(infrastructure); - nftFeature = await deployer.deploy(NftTransfer, {}, - lockStorage.contractAddress, - tokenPriceRegistry.contractAddress, - versionManager.contractAddress, - ck.contractAddress); - erc20Approver = await deployer.deploy(ERC20Approver, {}, versionManager.contractAddress); - - await versionManager.addVersion([erc20Approver.contractAddress, nftFeature.contractAddress, relayerManager.contractAddress], []); + nftFeature = await NftTransfer.new( + lockStorage.address, + tokenPriceRegistry.address, + versionManager.address, + ck.address); + erc20Approver = await ERC20Approver.new(versionManager.address); + + await versionManager.addVersion([erc20Approver.address, nftFeature.address, relayerManager.address], []); }); beforeEach(async () => { - const proxy1 = await deployer.deploy(Proxy, {}, walletImplementation.contractAddress); - wallet1 = deployer.wrapDeployedContract(BaseWallet, proxy1.contractAddress); - const proxy2 = await deployer.deploy(Proxy, {}, walletImplementation.contractAddress); - wallet2 = deployer.wrapDeployedContract(BaseWallet, proxy2.contractAddress); - - await wallet1.init(owner1, [versionManager.contractAddress]); - await wallet2.init(owner2, [versionManager.contractAddress]); - await versionManager.from(owner1).upgradeWallet(wallet1.contractAddress, await versionManager.lastVersion()); - await versionManager.from(owner2).upgradeWallet(wallet2.contractAddress, await versionManager.lastVersion()); - - erc721 = await deployer.deploy(ERC721); - await erc721.mint(wallet1.contractAddress, tokenId); + const proxy1 = await Proxy.new(walletImplementation.address); + wallet1 = await BaseWallet.at(proxy1.address); + const proxy2 = await Proxy.new(walletImplementation.address); + wallet2 = await BaseWallet.at(proxy2.address); + + await wallet1.init(owner1, [versionManager.address]); + await wallet2.init(owner2, [versionManager.address]); + await versionManager.from(owner1).upgradeWallet(wallet1.address, await versionManager.lastVersion()); + await versionManager.from(owner2).upgradeWallet(wallet2.address, await versionManager.lastVersion()); + + erc721 = await ERC721.new(); + await erc721.mint(wallet1.address, tokenId); }); describe("NFT transfers", () => { async function testNftTransfer({ safe = true, relayed, recipientAddress, nftContract = erc721, nftId = tokenId, shouldSucceed = true, expectedError, }) { - const beforeWallet1 = await nftContract.balanceOf(wallet1.contractAddress); + const beforeWallet1 = await nftContract.balanceOf(wallet1.address); const beforeRecipient = await nftContract.balanceOf(recipientAddress); if (relayed) { const txReceipt = await manager.relay(nftFeature, "transferNFT", - [wallet1.contractAddress, nftContract.contractAddress, recipientAddress, nftId, safe, ZERO_BYTES32], wallet1, [owner1]); + [wallet1.address, nftContract.address, recipientAddress, nftId, safe, ZERO_BYTES32], wallet1, [owner1]); const { success, error } = parseRelayReceipt(txReceipt); assert.equal(success, shouldSucceed); if (!shouldSucceed) { @@ -110,7 +108,7 @@ contract("NftTransfer", (accounts) => { } } else { const txPromise = nftFeature.from(owner1) - .transferNFT(wallet1.contractAddress, nftContract.contractAddress, recipientAddress, nftId, safe, ZERO_BYTES32, { gasLimit: 300000 }); + .transferNFT(wallet1.address, nftContract.address, recipientAddress, nftId, safe, ZERO_BYTES32, { gasLimit: 300000 }); if (shouldSucceed) { await txPromise; } else { @@ -118,7 +116,7 @@ contract("NftTransfer", (accounts) => { } } if (shouldSucceed) { - const afterWallet1 = await nftContract.balanceOf(wallet1.contractAddress); + const afterWallet1 = await nftContract.balanceOf(wallet1.address); const afterRecipient = await nftContract.balanceOf(recipientAddress); assert.equal(beforeWallet1.sub(afterWallet1).toNumber(), 1, `wallet1 should have one less NFT (safe: ${safe}, relayed: ${relayed})`); assert.equal(afterRecipient.sub(beforeRecipient).toNumber(), 1, `recipient should have one more NFT (safe: ${safe}, relayed: ${relayed})`); @@ -145,37 +143,37 @@ contract("NftTransfer", (accounts) => { describe("transfer to other wallet", () => { it("should allow unsafe NFT transfer from wallet1 to wallet2", async () => { - await testNftTransfer({ safe: false, relayed: false, recipientAddress: wallet2.contractAddress }); + await testNftTransfer({ safe: false, relayed: false, recipientAddress: wallet2.address }); }); it("should allow safe NFT transfer from wallet1 to wallet2", async () => { - await testNftTransfer({ safe: true, relayed: false, recipientAddress: wallet2.contractAddress }); + await testNftTransfer({ safe: true, relayed: false, recipientAddress: wallet2.address }); }); it("should allow unsafe NFT transfer from wallet1 to wallet2 (relayed)", async () => { - await testNftTransfer({ safe: false, relayed: true, recipientAddress: wallet2.contractAddress }); + await testNftTransfer({ safe: false, relayed: true, recipientAddress: wallet2.address }); }); it("should allow safe NFT transfer from wallet1 to wallet2 (relayed)", async () => { - await testNftTransfer({ safe: true, relayed: true, recipientAddress: wallet2.contractAddress }); + await testNftTransfer({ safe: true, relayed: true, recipientAddress: wallet2.address }); }); }); describe("CK transfer", () => { beforeEach(async () => { - await ck.createDumbKitty(wallet1.contractAddress); + await ck.createDumbKitty(wallet1.address); ckId = (ckId === undefined) ? 0 : ckId + 1; // update the id of the CryptoKitty that was just created }); it("should allow CK transfer from wallet1 to wallet2", async () => { await testNftTransfer({ - relayed: false, nftId: ckId, nftContract: ck, recipientAddress: wallet2.contractAddress, + relayed: false, nftId: ckId, nftContract: ck, recipientAddress: wallet2.address, }); }); it("should allow CK transfer from wallet1 to wallet2 (relayed)", async () => { await testNftTransfer({ - relayed: true, nftId: ckId, nftContract: ck, recipientAddress: wallet2.contractAddress, + relayed: true, nftId: ckId, nftContract: ck, recipientAddress: wallet2.address, }); }); @@ -194,12 +192,12 @@ contract("NftTransfer", (accounts) => { describe("Protecting from transferFrom hijacking", () => { beforeEach(async () => { - erc20 = await deployer.deploy(ERC20, {}, [wallet1.contractAddress], 1000, 18); - tokenPriceRegistry.setPriceForTokenList([erc20.contractAddress], [1]); + erc20 = await ERC20.new([wallet1.address], 1000, 18); + tokenPriceRegistry.setPriceForTokenList([erc20.address], [1]); await erc20Approver.from(owner1).approveERC20( - wallet1.contractAddress, - erc20.contractAddress, - wallet1.contractAddress, // spender + wallet1.address, + erc20.address, + wallet1.address, // spender 100, ); // amount }); @@ -212,7 +210,7 @@ contract("NftTransfer", (accounts) => { relayed: false, nftId: 100, nftContract: erc20, - recipientAddress: wallet2.contractAddress, + recipientAddress: wallet2.address, }); }); @@ -224,7 +222,7 @@ contract("NftTransfer", (accounts) => { relayed: true, nftId: 100, nftContract: erc20, - recipientAddress: wallet2.contractAddress, + recipientAddress: wallet2.address, }); }); }); diff --git a/test/proxy.js b/test/proxy.js index d60a1b52d..a796e0516 100644 --- a/test/proxy.js +++ b/test/proxy.js @@ -21,7 +21,7 @@ contract("Proxy", (accounts) => { let registry; async function deployTestModule() { - const module = await deployer.deploy(VersionManager, {}, + const module = await VersionManager.new( registry.contractAddress, ethers.constants.AddressZero, ethers.constants.AddressZero, @@ -34,40 +34,40 @@ contract("Proxy", (accounts) => { before(async () => { const manager = new TestManager(); deployer = manager.newDeployer(); - registry = await deployer.deploy(Registry); - walletImplementation = await deployer.deploy(BaseWallet); + registry = await Registry.new(); + walletImplementation = await BaseWallet.new(); module1 = await deployTestModule(); module2 = await deployTestModule(); module3 = await deployTestModule(); }); beforeEach(async () => { - proxy = await deployer.deploy(Proxy, {}, walletImplementation.contractAddress); - wallet = deployer.wrapDeployedContract(BaseWallet, proxy.contractAddress); + proxy = await Proxy.new(walletImplementation.address); + wallet = await BaseWallet.at(proxy.address); }); it("should init the wallet with the correct owner", async () => { let walletOwner = await wallet.owner(); assert.equal(walletOwner, ethers.constants.AddressZero, "owner should be null before init"); - await wallet.init(owner, [module1.contractAddress]); + await wallet.init(owner, [module1.address]); walletOwner = await wallet.owner(); assert.equal(walletOwner, owner, "owner should be the owner after init"); }); it("should init a wallet with the correct modules", async () => { - await wallet.init(owner, [module1.contractAddress, module2.contractAddress]); - const module1IsAuthorised = await wallet.authorised(module1.contractAddress); - const module2IsAuthorised = await wallet.authorised(module2.contractAddress); - const module3IsAuthorised = await wallet.authorised(module3.contractAddress); + await wallet.init(owner, [module1.address, module2.address]); + const module1IsAuthorised = await wallet.authorised(module1.address); + const module2IsAuthorised = await wallet.authorised(module2.address); + const module3IsAuthorised = await wallet.authorised(module3.address); assert.equal(module1IsAuthorised, true, "module1 should be authorised"); assert.equal(module2IsAuthorised, true, "module2 should be authorised"); assert.equal(module3IsAuthorised, false, "module3 should not be authorised"); }); it("should accept ETH", async () => { - const before = await deployer.provider.getBalance(wallet.contractAddress); + const before = await deployer.provider.getBalance(wallet.address); await wallet.send(50000000); - const after = await deployer.provider.getBalance(wallet.contractAddress); + const after = await deployer.provider.getBalance(wallet.address); assert.equal(after.sub(before).toNumber(), 50000000, "should have received ETH"); }); }); diff --git a/test/recoveryManager.js b/test/recoveryManager.js index 99042beb8..aabe534a7 100644 --- a/test/recoveryManager.js +++ b/test/recoveryManager.js @@ -34,7 +34,6 @@ contract("RecoveryManager", (accounts) => { const nonowner = accounts[6]; const nonowner2 = accounts[9]; - let deployer; let guardianManager; let lockStorage; let guardianStorage; @@ -47,75 +46,74 @@ contract("RecoveryManager", (accounts) => { let versionManager; before(async () => { - deployer = manager.newDeployer(); - walletImplementation = await deployer.deploy(BaseWallet); + walletImplementation = await BaseWallet.new(); }); beforeEach(async () => { - const registry = await deployer.deploy(Registry); - guardianStorage = await deployer.deploy(GuardianStorage); - lockStorage = await deployer.deploy(LockStorage); - versionManager = await deployer.deploy(VersionManager, {}, - registry.contractAddress, - lockStorage.contractAddress, - guardianStorage.contractAddress, + const registry = await Registry.new(); + guardianStorage = await GuardianStorage.new(); + lockStorage = await LockStorage.new(); + versionManager = await VersionManager.new( + registry.address, + lockStorage.address, + guardianStorage.address, ethers.constants.AddressZero, ethers.constants.AddressZero); - guardianManager = await deployer.deploy(GuardianManager, {}, - lockStorage.contractAddress, - guardianStorage.contractAddress, - versionManager.contractAddress, + guardianManager = await GuardianManager.new( + lockStorage.address, + guardianStorage.address, + versionManager.address, 24, 12); - lockManager = await deployer.deploy(LockManager, {}, - lockStorage.contractAddress, - guardianStorage.contractAddress, - versionManager.contractAddress, + lockManager = await LockManager.new( + lockStorage.address, + guardianStorage.address, + versionManager.address, 24 * 5); - recoveryManager = await deployer.deploy(RecoveryManager, {}, - lockStorage.contractAddress, - guardianStorage.contractAddress, - versionManager.contractAddress, + recoveryManager = await RecoveryManager.new( + lockStorage.address, + guardianStorage.address, + versionManager.address, 36, 24 * 5); recoveryPeriod = await recoveryManager.recoveryPeriod(); - relayerManager = await deployer.deploy(RelayerManager, {}, - lockStorage.contractAddress, - guardianStorage.contractAddress, + relayerManager = await RelayerManager.new( + lockStorage.address, + guardianStorage.address, ethers.constants.AddressZero, ethers.constants.AddressZero, - versionManager.contractAddress); + versionManager.address); manager.setRelayerManager(relayerManager); - const proxy = await deployer.deploy(Proxy, {}, walletImplementation.contractAddress); - wallet = deployer.wrapDeployedContract(BaseWallet, proxy.contractAddress); + const proxy = await Proxy.new(walletImplementation.address); + wallet = await BaseWallet.at(proxy.address); await versionManager.addVersion([ - guardianManager.contractAddress, - lockManager.contractAddress, - recoveryManager.contractAddress, - relayerManager.contractAddress, + guardianManager.address, + lockManager.address, + recoveryManager.address, + relayerManager.address, ], []); - await wallet.init(owner, [versionManager.contractAddress]); - await versionManager.from(owner).upgradeWallet(wallet.contractAddress, await versionManager.lastVersion()); + await wallet.init(owner, [versionManager.address]); + await versionManager.from(owner).upgradeWallet(wallet.address, await versionManager.lastVersion()); }); async function addGuardians(guardians) { // guardians can be BaseWallet or ContractWrapper objects const guardianAddresses = guardians.map((guardian) => { if (guardian) return guardian; - return guardian.contractAddress; + return guardian.address; }); for (const address of guardianAddresses) { - await guardianManager.from(owner).addGuardian(wallet.contractAddress, address); + await guardianManager.from(owner).addGuardian(wallet.address, address); } await manager.increaseTime(30); for (let i = 1; i < guardianAddresses.length; i += 1) { - await guardianManager.confirmGuardianAddition(wallet.contractAddress, guardianAddresses[i]); + await guardianManager.confirmGuardianAddition(wallet.address, guardianAddresses[i]); } - const count = (await guardianManager.guardianCount(wallet.contractAddress)).toNumber(); + const count = (await guardianManager.guardianCount(wallet.address)).toNumber(); assert.equal(count, guardians.length, `${guardians.length} guardians should be added`); } @@ -123,10 +121,10 @@ contract("RecoveryManager", (accounts) => { const wallets = []; let g; for (g of guardians) { - const proxy = await deployer.deploy(Proxy, {}, walletImplementation.contractAddress); - const guardianWallet = deployer.wrapDeployedContract(BaseWallet, proxy.contractAddress); - await guardianWallet.init(g, [versionManager.contractAddress]); - await versionManager.from(g).upgradeWallet(guardianWallet.contractAddress, await versionManager.lastVersion()); + const proxy = await Proxy.at(walletImplementation.address); + const guardianWallet = await BaseWallet.at(proxy.address); + await guardianWallet.init(g, [versionManager.address]); + await versionManager.from(g).upgradeWallet(guardianWallet.address, await versionManager.lastVersion()); wallets.push(guardianWallet); } return wallets; @@ -135,13 +133,13 @@ contract("RecoveryManager", (accounts) => { function testExecuteRecovery(guardians) { it("should let a majority of guardians execute the recovery procedure", async () => { const majority = guardians.slice(0, Math.ceil((guardians.length) / 2)); - await manager.relay(recoveryManager, "executeRecovery", [wallet.contractAddress, newowner], wallet, sortWalletByAddress(majority)); + await manager.relay(recoveryManager, "executeRecovery", [wallet.address, newowner], wallet, sortWalletByAddress(majority)); const currentBlock = await manager.getCurrentBlock(); const timestamp = await manager.getTimestamp(currentBlock); - const isLocked = await lockManager.isLocked(wallet.contractAddress); + const isLocked = await lockManager.isLocked(wallet.address); assert.isTrue(isLocked, "should be locked by recovery"); - const recoveryConfig = await recoveryManager.getRecovery(wallet.contractAddress); + const recoveryConfig = await recoveryManager.getRecovery(wallet.address); assert.equal(recoveryConfig._address, newowner); assert.closeTo(recoveryConfig._executeAfter.toNumber(), recoveryPeriod.add(timestamp).toNumber(), 1); assert.equal(recoveryConfig._guardianCount, guardians.length); @@ -153,7 +151,7 @@ contract("RecoveryManager", (accounts) => { manager.relay( recoveryManager, "executeRecovery", - [wallet.contractAddress, newowner], + [wallet.address, newowner], wallet, [owner], ), expectedRevertMsg, @@ -166,13 +164,13 @@ contract("RecoveryManager", (accounts) => { manager.relay( recoveryManager, "executeRecovery", - [wallet.contractAddress, newowner], + [wallet.address, newowner], wallet, [owner, ...sortWalletByAddress(majority)], ), INVALID_SIGNATURES_REVERT_MSG, ); - const isLocked = await lockManager.isLocked(wallet.contractAddress); + const isLocked = await lockManager.isLocked(wallet.address); assert.isFalse(isLocked, "should not be locked"); }); @@ -182,13 +180,13 @@ contract("RecoveryManager", (accounts) => { manager.relay( recoveryManager, "executeRecovery", - [wallet.contractAddress, newowner], + [wallet.address, newowner], wallet, sortWalletByAddress(minority), ), WRONG_SIGNATURE_NUMBER_REVERT_MSG, ); - const isLocked = await lockManager.isLocked(wallet.contractAddress); + const isLocked = await lockManager.isLocked(wallet.address); assert.isFalse(isLocked, "should not be locked"); }); } @@ -196,54 +194,54 @@ contract("RecoveryManager", (accounts) => { function testFinalizeRecovery() { it("should let anyone finalize the recovery procedure after the recovery period", async () => { await manager.increaseTime(40); // moving time to after the end of the recovery period - await manager.relay(recoveryManager, "finalizeRecovery", [wallet.contractAddress], wallet, []); - const isLocked = await lockManager.isLocked(wallet.contractAddress); + await manager.relay(recoveryManager, "finalizeRecovery", [wallet.address], wallet, []); + const isLocked = await lockManager.isLocked(wallet.address); assert.isFalse(isLocked, "should no longer be locked after finalization of recovery"); const walletOwner = await wallet.owner(); assert.equal(walletOwner, newowner, "wallet owner should have been changed"); - const recoveryConfig = await recoveryManager.getRecovery(wallet.contractAddress); + const recoveryConfig = await recoveryManager.getRecovery(wallet.address); assert.equal(recoveryConfig._address, ethers.constants.AddressZero); assert.equal(recoveryConfig._executeAfter.toNumber(), 0); assert.equal(recoveryConfig._guardianCount, 0); }); it("should not let anyone finalize the recovery procedure before the end of the recovery period", async () => { - const txReceipt = await manager.relay(recoveryManager, "finalizeRecovery", [wallet.contractAddress], wallet, []); + const txReceipt = await manager.relay(recoveryManager, "finalizeRecovery", [wallet.address], wallet, []); const { success, error } = parseRelayReceipt(txReceipt); assert.isFalse(success); assert.equal(error, "RM: the recovery period is not over yet"); - const isLocked = await lockManager.isLocked(wallet.contractAddress); + const isLocked = await lockManager.isLocked(wallet.address); assert.isTrue(isLocked, "should still be locked"); }); } function testCancelRecovery() { it("should let 2 guardians cancel the recovery procedure", async () => { - await manager.relay(recoveryManager, "cancelRecovery", [wallet.contractAddress], wallet, sortWalletByAddress([guardian1, guardian2])); - const isLocked = await lockManager.isLocked(wallet.contractAddress); + await manager.relay(recoveryManager, "cancelRecovery", [wallet.address], wallet, sortWalletByAddress([guardian1, guardian2])); + const isLocked = await lockManager.isLocked(wallet.address); assert.isFalse(isLocked, "should no longer be locked by recovery"); await manager.increaseTime(40); // moving time to after the end of the recovery period - const txReceipt = await manager.relay(recoveryManager, "finalizeRecovery", [wallet.contractAddress], wallet, []); + const txReceipt = await manager.relay(recoveryManager, "finalizeRecovery", [wallet.address], wallet, []); const { success, error } = parseRelayReceipt(txReceipt); assert.isFalse(success); assert.equal(error, "RM: there must be an ongoing recovery"); const walletOwner = await wallet.owner(); assert.equal(walletOwner, owner, "wallet owner should not have been changed"); - const recoveryConfig = await recoveryManager.getRecovery(wallet.contractAddress); + const recoveryConfig = await recoveryManager.getRecovery(wallet.address); assert.equal(recoveryConfig._address, ethers.constants.AddressZero); assert.equal(recoveryConfig._executeAfter.toNumber(), 0); assert.equal(recoveryConfig._guardianCount, 0); }); it("should let 1 guardian + owner cancel the recovery procedure", async () => { - await manager.relay(recoveryManager, "cancelRecovery", [wallet.contractAddress], wallet, [owner, guardian1]); - const isLocked = await lockManager.isLocked(wallet.contractAddress); + await manager.relay(recoveryManager, "cancelRecovery", [wallet.address], wallet, [owner, guardian1]); + const isLocked = await lockManager.isLocked(wallet.address); assert.isFalse(isLocked, "should no longer be locked by recovery"); await manager.increaseTime(40); // moving time to after the end of the recovery period - const txReceipt = await manager.relay(recoveryManager, "finalizeRecovery", [wallet.contractAddress], wallet, []); + const txReceipt = await manager.relay(recoveryManager, "finalizeRecovery", [wallet.address], wallet, []); const { success, error } = parseRelayReceipt(txReceipt); assert.isFalse(success, "finalization should have failed"); assert.equal(error, "RM: there must be an ongoing recovery"); @@ -256,13 +254,13 @@ contract("RecoveryManager", (accounts) => { manager.relay( recoveryManager, "cancelRecovery", - [wallet.contractAddress], + [wallet.address], wallet, [guardian1], ), WRONG_SIGNATURE_NUMBER_REVERT_MSG, ); - const isLocked = await lockManager.isLocked(wallet.contractAddress); + const isLocked = await lockManager.isLocked(wallet.address); assert.isTrue(isLocked, "should still be locked"); }); @@ -271,13 +269,13 @@ contract("RecoveryManager", (accounts) => { manager.relay( recoveryManager, "cancelRecovery", - [wallet.contractAddress], + [wallet.address], wallet, [owner], ), WRONG_SIGNATURE_NUMBER_REVERT_MSG, ); - const isLocked = await lockManager.isLocked(wallet.contractAddress); + const isLocked = await lockManager.isLocked(wallet.address); assert.isTrue(isLocked, "should still be locked"); }); @@ -286,13 +284,13 @@ contract("RecoveryManager", (accounts) => { manager.relay( recoveryManager, "cancelRecovery", - [wallet.contractAddress], + [wallet.address], wallet, [guardian1, guardian1], ), INVALID_SIGNATURES_REVERT_MSG, ); - const isLocked = await lockManager.isLocked(wallet.contractAddress); + const isLocked = await lockManager.isLocked(wallet.address); assert.isTrue(isLocked, "should still be locked"); }); @@ -301,13 +299,13 @@ contract("RecoveryManager", (accounts) => { manager.relay( recoveryManager, "cancelRecovery", - [wallet.contractAddress], + [wallet.address], wallet, sortWalletByAddress([guardian1, nonowner]), ), INVALID_SIGNATURES_REVERT_MSG, ); - const isLocked = await lockManager.isLocked(wallet.contractAddress); + const isLocked = await lockManager.isLocked(wallet.address); assert.isTrue(isLocked, "should still be locked"); }); } @@ -317,7 +315,7 @@ contract("RecoveryManager", (accounts) => { const majority = guardians.slice(0, Math.ceil((guardians.length) / 2)); await manager.relay(recoveryManager, "transferOwnership", - [wallet.contractAddress, newowner], wallet, [owner, ...sortWalletByAddress(majority)]); + [wallet.address, newowner], wallet, [owner, ...sortWalletByAddress(majority)]); const walletOwner = await wallet.owner(); assert.equal(walletOwner, newowner, "owner should have been changed"); }); @@ -328,7 +326,7 @@ contract("RecoveryManager", (accounts) => { manager.relay( recoveryManager, "transferOwnership", - [wallet.contractAddress, newowner], + [wallet.address, newowner], wallet, [owner, ...sortWalletByAddress(minority)], ), WRONG_SIGNATURE_NUMBER_REVERT_MSG, @@ -344,7 +342,7 @@ contract("RecoveryManager", (accounts) => { manager.relay( recoveryManager, "transferOwnership", - [wallet.contractAddress, newowner], + [wallet.address, newowner], wallet, [...sortWalletByAddress(majority)], ), WRONG_SIGNATURE_NUMBER_REVERT_MSG, @@ -357,10 +355,10 @@ contract("RecoveryManager", (accounts) => { describe("RecoveryManager high level logic", () => { it("should not be able to instantiate the RecoveryManager with lock period shorter than the recovery period", async () => { - await assert.revertWith(deployer.deploy(RecoveryManager, {}, - lockStorage.contractAddress, - guardianStorage.contractAddress, - versionManager.contractAddress, + await assert.revertWith(RecoveryManager.new( + lockStorage.address, + guardianStorage.address, + versionManager.address, 36, 35), "RM: insecure security periods"); }); @@ -372,12 +370,12 @@ contract("RecoveryManager", (accounts) => { await assert.revertWith(manager.relay( recoveryManager, "executeRecovery", - [wallet.contractAddress, newowner], + [wallet.address, newowner], wallet, noGuardians, ), "RM: no guardians set on wallet"); - const isLocked = await lockManager.isLocked(wallet.contractAddress); + const isLocked = await lockManager.isLocked(wallet.address); assert.isFalse(isLocked, "should not be locked by recovery"); const walletOwner = await wallet.owner(); @@ -405,7 +403,7 @@ contract("RecoveryManager", (accounts) => { manager.relay( recoveryManager, "executeRecovery", - [wallet.contractAddress, newowner], + [wallet.address, newowner], wallet, [...sortWalletByAddress(badMajority)], ), INVALID_SIGNATURES_REVERT_MSG, @@ -440,7 +438,7 @@ contract("RecoveryManager", (accounts) => { it("should not be able to call ExecuteRecovery with an empty recovery address", async () => { const txReceipt = await manager.relay(recoveryManager, "executeRecovery", - [wallet.contractAddress, ethers.constants.AddressZero], wallet, [guardian1]); + [wallet.address, ethers.constants.AddressZero], wallet, [guardian1]); const { success, error } = parseRelayReceipt(txReceipt); assert.isFalse(success, "executeRecovery should fail"); assert.equal(error, "RM: new owner address cannot be null"); @@ -448,7 +446,7 @@ contract("RecoveryManager", (accounts) => { it("should not be able to call ExecuteRecovery with a guardian address", async () => { const txReceipt = await manager.relay(recoveryManager, "executeRecovery", - [wallet.contractAddress, guardian1], wallet, [guardian1]); + [wallet.address, guardian1], wallet, [guardian1]); const { success, error } = parseRelayReceipt(txReceipt); assert.isFalse(success, "executeRecovery should fail"); assert.equal(error, "RM: new owner address cannot be a guardian"); @@ -456,10 +454,10 @@ contract("RecoveryManager", (accounts) => { it("should not be able to call ExecuteRecovery if already in the process of Recovery", async () => { await manager.relay(recoveryManager, "executeRecovery", - [wallet.contractAddress, newowner], wallet, sortWalletByAddress([guardian1])); + [wallet.address, newowner], wallet, sortWalletByAddress([guardian1])); const txReceipt = await manager.relay(recoveryManager, "executeRecovery", - [wallet.contractAddress, ethers.constants.AddressZero], wallet, [guardian1]); + [wallet.address, ethers.constants.AddressZero], wallet, [guardian1]); const { success, error } = parseRelayReceipt(txReceipt); assert.isFalse(success, "executeRecovery should fail"); assert.equal(error, "RM: there cannot be an ongoing recovery"); @@ -468,14 +466,14 @@ contract("RecoveryManager", (accounts) => { it("should revert if an unknown method is executed", async () => { const nonce = await manager.getNonceForRelay(); const chainId = await manager.getChainId(); - let methodData = recoveryManager.contract.interface.functions.executeRecovery.encode([wallet.contractAddress, ethers.constants.AddressZero]); + let methodData = recoveryManager.contract.interface.functions.executeRecovery.encode([wallet.address, ethers.constants.AddressZero]); // Replace the `executeRecovery` method signature: b0ba4da0 with a non-existent one: e0b6fcfc methodData = methodData.replace("b0ba4da0", "e0b6fcfc"); const signatures = await signOffchain( [guardian1], - relayerManager.contractAddress, - recoveryManager.contractAddress, + relayerManager.address, + recoveryManager.address, 0, methodData, chainId, @@ -487,8 +485,8 @@ contract("RecoveryManager", (accounts) => { ); await assert.revertWith( relayerManager.from(nonowner2).execute( - wallet.contractAddress, - recoveryManager.contractAddress, + wallet.address, + recoveryManager.address, methodData, nonce, signatures, @@ -510,7 +508,7 @@ contract("RecoveryManager", (accounts) => { await manager.relay( recoveryManager, "executeRecovery", - [wallet.contractAddress, newowner], + [wallet.address, newowner], wallet, sortWalletByAddress([guardian1, guardian2]), ); @@ -526,7 +524,7 @@ contract("RecoveryManager", (accounts) => { await manager.relay( recoveryManager, "executeRecovery", - [wallet.contractAddress, newowner], + [wallet.address, newowner], wallet, sortWalletByAddress([guardian1, guardian2]), ); @@ -540,7 +538,7 @@ contract("RecoveryManager", (accounts) => { await manager.relay( recoveryManager, "executeRecovery", - [wallet.contractAddress, newowner], + [wallet.address, newowner], wallet, sortWalletByAddress([guardian1, guardian2]), ); @@ -556,7 +554,7 @@ contract("RecoveryManager", (accounts) => { const txReceipt = await manager.relay( recoveryManager, "transferOwnership", - [wallet.contractAddress, ethers.constants.AddressZero], wallet, [owner, guardian1], + [wallet.address, ethers.constants.AddressZero], wallet, [owner, guardian1], ); const { success, error } = parseRelayReceipt(txReceipt); assert.isFalse(success, "transferOwnership should fail"); @@ -568,7 +566,7 @@ contract("RecoveryManager", (accounts) => { const txReceipt = await manager.relay( recoveryManager, "transferOwnership", - [wallet.contractAddress, guardian1], wallet, [owner, guardian1], + [wallet.address, guardian1], wallet, [owner, guardian1], ); const { success, error } = parseRelayReceipt(txReceipt); assert.isFalse(success, "transferOwnership should fail"); @@ -579,7 +577,7 @@ contract("RecoveryManager", (accounts) => { const txReceipt = await manager.relay( recoveryManager, "transferOwnership", - [wallet.contractAddress, newowner], + [wallet.address, newowner], wallet, [owner], ); @@ -593,7 +591,7 @@ contract("RecoveryManager", (accounts) => { manager.relay( recoveryManager, "transferOwnership", - [wallet.contractAddress, newowner], + [wallet.address, newowner], wallet, [nonowner, guardian1], ), INVALID_SIGNATURES_REVERT_MSG, @@ -606,7 +604,7 @@ contract("RecoveryManager", (accounts) => { manager.relay( recoveryManager, "transferOwnership", - [wallet.contractAddress, newowner], + [wallet.address, newowner], wallet, [owner, owner], ), INVALID_SIGNATURES_REVERT_MSG, @@ -619,7 +617,7 @@ contract("RecoveryManager", (accounts) => { manager.relay( recoveryManager, "transferOwnership", - [wallet.contractAddress, newowner], + [wallet.address, newowner], wallet, [owner, guardian1, guardian1], ), INVALID_SIGNATURES_REVERT_MSG, @@ -632,7 +630,7 @@ contract("RecoveryManager", (accounts) => { manager.relay( recoveryManager, "transferOwnership", - [wallet.contractAddress, newowner], + [wallet.address, newowner], wallet, [owner, nonowner], ), INVALID_SIGNATURES_REVERT_MSG, diff --git a/test/relayer.js b/test/relayer.js index c789b4df2..7ce5261ae 100644 --- a/test/relayer.js +++ b/test/relayer.js @@ -61,78 +61,78 @@ contract("RelayerManager", (accounts) => { let versionManagerV2; before(async () => { - registry = await deployer.deploy(Registry); - guardianStorage = await deployer.deploy(GuardianStorage); - lockStorage = await deployer.deploy(LockStorage); - limitStorage = await deployer.deploy(LimitStorage); - versionManager = await deployer.deploy(VersionManager, {}, - registry.contractAddress, - lockStorage.contractAddress, - guardianStorage.contractAddress, + registry = await Registry.new(); + guardianStorage = await GuardianStorage.new(); + lockStorage = await LockStorage.new(); + limitStorage = await LimitStorage.new(); + versionManager = await VersionManager.new( + registry.address, + lockStorage.address, + guardianStorage.address, ethers.constants.AddressZero, - limitStorage.contractAddress); - versionManagerV2 = await deployer.deploy(VersionManager, {}, - registry.contractAddress, - lockStorage.contractAddress, - guardianStorage.contractAddress, + limitStorage.address); + versionManagerV2 = await VersionManager.new( + registry.address, + lockStorage.address, + guardianStorage.address, ethers.constants.AddressZero, - limitStorage.contractAddress); + limitStorage.address); - tokenPriceRegistry = await deployer.deploy(TokenPriceRegistry); + tokenPriceRegistry = await TokenPriceRegistry.new(); await tokenPriceRegistry.addManager(infrastructure); - relayerManager = await deployer.deploy(RelayerManager, {}, - lockStorage.contractAddress, - guardianStorage.contractAddress, - limitStorage.contractAddress, - tokenPriceRegistry.contractAddress, - versionManager.contractAddress); + relayerManager = await RelayerManager.new( + lockStorage.address, + guardianStorage.address, + limitStorage.address, + tokenPriceRegistry.address, + versionManager.address); manager.setRelayerManager(relayerManager); }); beforeEach(async () => { - approvedTransfer = await deployer.deploy(ApprovedTransfer, {}, - lockStorage.contractAddress, - guardianStorage.contractAddress, - limitStorage.contractAddress, - versionManager.contractAddress, + approvedTransfer = await ApprovedTransfer.new( + lockStorage.address, + guardianStorage.address, + limitStorage.address, + versionManager.address, ethers.constants.AddressZero); - guardianManager = await deployer.deploy(GuardianManager, {}, - lockStorage.contractAddress, - guardianStorage.contractAddress, - versionManager.contractAddress, + guardianManager = await GuardianManager.new( + lockStorage.address, + guardianStorage.address, + versionManager.address, 24, 12); - recoveryManager = await deployer.deploy(RecoveryManager, {}, - lockStorage.contractAddress, - guardianStorage.contractAddress, - versionManager.contractAddress, + recoveryManager = await RecoveryManager.new( + lockStorage.address, + guardianStorage.address, + versionManager.address, 36, 24 * 5); - testFeature = await deployer.deploy(TestFeature, {}, lockStorage.contractAddress, versionManager.contractAddress, 0); - testFeatureNew = await deployer.deploy(TestFeature, {}, lockStorage.contractAddress, versionManager.contractAddress, 0); + testFeature = await TestFeature.new(lockStorage.address, versionManager.address, 0); + testFeatureNew = await TestFeature.new(lockStorage.address, versionManager.address, 0); - limitFeature = await deployer.deploy(TestLimitFeature, {}, - lockStorage.contractAddress, limitStorage.contractAddress, versionManager.contractAddress); - badFeature = await deployer.deploy(BadFeature, {}, lockStorage.contractAddress, versionManager.contractAddress); + limitFeature = await TestLimitFeature.new( + lockStorage.address, limitStorage.address, versionManager.address); + badFeature = await BadFeature.new(lockStorage.address, versionManager.address); - const walletImplementation = await deployer.deploy(BaseWallet); - const proxy = await deployer.deploy(Proxy, {}, walletImplementation.contractAddress); - wallet = deployer.wrapDeployedContract(BaseWallet, proxy.contractAddress); + const walletImplementation = await BaseWallet.new(); + const proxy = await Proxy.new(walletImplementation.address); + wallet = await BaseWallet.at(proxy.address); for (const vm of [versionManager, versionManagerV2]) { await vm.addVersion([ - relayerManager.contractAddress, - approvedTransfer.contractAddress, - guardianManager.contractAddress, - recoveryManager.contractAddress, - testFeature.contractAddress, - limitFeature.contractAddress, - badFeature.contractAddress, + relayerManager.address, + approvedTransfer.address, + guardianManager.address, + recoveryManager.address, + testFeature.address, + limitFeature.address, + badFeature.address, ], []); } - await wallet.init(owner, [versionManager.contractAddress]); - await versionManager.from(owner).upgradeWallet(wallet.contractAddress, await versionManager.lastVersion()); + await wallet.init(owner, [versionManager.address]); + await versionManager.from(owner).upgradeWallet(wallet.address, await versionManager.lastVersion()); }); describe("relaying feature transactions", () => { @@ -144,31 +144,31 @@ contract("RelayerManager", (accounts) => { }); it("should fail when feature is not authorised", async () => { - const params = [wallet.contractAddress, 2]; + const params = [wallet.address, 2]; await assert.revertWith( manager.relay(testFeatureNew, "setIntOwnerOnly", params, wallet, [owner]), FEATURE_NOT_AUTHORISED_FOR_WALLET, ); }); it("should fail when the RelayerManager is not authorised", async () => { - await versionManager.addVersion([testFeature.contractAddress], []); + await versionManager.addVersion([testFeature.address], []); const wrongWallet = await deployer.deploy(BaseWallet); - await wrongWallet.init(owner, [versionManager.contractAddress]); - await versionManager.from(owner).upgradeWallet(wrongWallet.contractAddress, await versionManager.lastVersion()); - const params = [wrongWallet.contractAddress, 2]; + await wrongWallet.init(owner, [versionManager.address]); + await versionManager.from(owner).upgradeWallet(wrongWallet.address, await versionManager.lastVersion()); + const params = [wrongWallet.address, 2]; const txReceipt = await manager.relay(testFeature, "setIntOwnerOnly", params, wrongWallet, [owner]); const { success, error } = parseRelayReceipt(txReceipt); assert.isFalse(success); assert.equal(error, RELAYER_NOT_AUTHORISED_FOR_WALLET); // reset last version to default bundle await versionManager.addVersion([ - relayerManager.contractAddress, - approvedTransfer.contractAddress, - guardianManager.contractAddress, - recoveryManager.contractAddress, - testFeature.contractAddress, - limitFeature.contractAddress, - badFeature.contractAddress, + relayerManager.address, + approvedTransfer.address, + guardianManager.address, + recoveryManager.address, + testFeature.address, + limitFeature.address, + badFeature.address, ], []); }); @@ -180,7 +180,7 @@ contract("RelayerManager", (accounts) => { }); it("should fail when the gas of the transaction is less then the gasLimit ", async () => { - const params = [wallet.contractAddress, 2]; + const params = [wallet.address, 2]; const nonce = await getNonceForRelay(); const gasLimit = 2000000; const relayParams = [ @@ -201,13 +201,13 @@ contract("RelayerManager", (accounts) => { }); it("should fail when a wrong number of signatures is provided", async () => { - const params = [wallet.contractAddress, 2]; + const params = [wallet.address, 2]; const relayParams = [testFeature, "setIntOwnerOnly", params, wallet, [owner, recipient]]; await assert.revertWith(manager.relay(...relayParams), WRONG_NUMBER_SIGNATURES); }); it("should fail a duplicate transaction", async () => { - const params = [wallet.contractAddress, 2]; + const params = [wallet.address, 2]; const nonce = await getNonceForRelay(); const relayParams = [testFeature, "setIntOwnerOnly", params, wallet, [owner], accounts[9], false, 2000000, nonce]; @@ -219,11 +219,11 @@ contract("RelayerManager", (accounts) => { it("should fail when relaying to itself", async () => { const dataMethod = "setIntOwnerOnly"; - const dataParam = [wallet.contractAddress, 2]; + const dataParam = [wallet.address, 2]; const methodData = testFeature.contract.interface.functions[dataMethod].encode(dataParam); const params = [ - wallet.contractAddress, - testFeature.contractAddress, + wallet.address, + testFeature.address, methodData, 0, ethers.constants.HashZero, @@ -239,10 +239,10 @@ contract("RelayerManager", (accounts) => { it("should update the nonce after the transaction", async () => { const nonce = await getNonceForRelay(); - await manager.relay(testFeature, "setIntOwnerOnly", [wallet.contractAddress, 2], wallet, [owner], + await manager.relay(testFeature, "setIntOwnerOnly", [wallet.address, 2], wallet, [owner], accounts[9], false, 2000000, nonce); - const updatedNonce = await relayerManager.getNonce(wallet.contractAddress); + const updatedNonce = await relayerManager.getNonce(wallet.address); const updatedNonceHex = await ethers.utils.hexZeroPad(updatedNonce.toHexString(), 32); assert.equal(nonce, updatedNonceHex); }); @@ -253,9 +253,9 @@ contract("RelayerManager", (accounts) => { beforeEach(async () => { const decimals = 12; // number of decimal for TOKN contract const tokenRate = new BN(10).pow(new BN(19)).muln(51); // 1 TOKN = 0.00051 ETH = 0.00051*10^18 ETH wei => *10^(18-decimals) = 0.00051*10^18 * 10^6 = 0.00051*10^24 = 51*10^19 - erc20 = await deployer.deploy(ERC20, {}, [infrastructure], 10000000, decimals); // TOKN contract with 10M tokens (10M TOKN for account[0]) - await tokenPriceRegistry.setPriceForTokenList([erc20.contractAddress], [tokenRate.toString()]); - await limitFeature.setLimitAndDailySpent(wallet.contractAddress, 10000000000, 0); + erc20 = await ERC20.new([infrastructure], 10000000, decimals); // TOKN contract with 10M tokens (10M TOKN for account[0]) + await tokenPriceRegistry.setPriceForTokenList([erc20.address], [tokenRate.toString()]); + await limitFeature.setLimitAndDailySpent(wallet.address, 10000000000, 0); }); async function provisionFunds(ethAmount, erc20Amount) { @@ -263,7 +263,7 @@ contract("RelayerManager", (accounts) => { await wallet.send(ethAmount); } if (erc20Amount) { - await erc20.transfer(wallet.contractAddress, erc20Amount); + await erc20.transfer(wallet.address, erc20Amount); } } @@ -272,7 +272,7 @@ contract("RelayerManager", (accounts) => { const relayParams = [ testFeature, "setIntOwnerOnly", - [wallet.contractAddress, 2], + [wallet.address, 2], wallet, [owner], accounts[9], @@ -287,15 +287,15 @@ contract("RelayerManager", (accounts) => { } async function setLimitAndDailySpent({ limit, alreadySpent }) { - await limitFeature.setLimitAndDailySpent(wallet.contractAddress, limit, alreadySpent); + await limitFeature.setLimitAndDailySpent(wallet.address, limit, alreadySpent); } it("should refund in ETH", async () => { await provisionFunds(ethers.BigNumber.from("100000000000000"), 0); - const wBalanceStart = await deployer.provider.getBalance(wallet.contractAddress); + const wBalanceStart = await deployer.provider.getBalance(wallet.address); const rBalanceStart = await deployer.provider.getBalance(recipient); await callAndRefund({ refundToken: ETH_TOKEN }); - const wBalanceEnd = await deployer.provider.getBalance(wallet.contractAddress); + const wBalanceEnd = await deployer.provider.getBalance(wallet.address); const rBalanceEnd = await deployer.provider.getBalance(recipient); const refund = wBalanceStart.sub(wBalanceEnd); assert.isTrue(refund.gt(0), "should have refunded ETH"); @@ -304,10 +304,10 @@ contract("RelayerManager", (accounts) => { it("should refund in ERC20", async () => { await provisionFunds(0, ethers.BigNumber.from("100000000000000")); - const wBalanceStart = await erc20.balanceOf(wallet.contractAddress); + const wBalanceStart = await erc20.balanceOf(wallet.address); const rBalanceStart = await erc20.balanceOf(recipient); - await callAndRefund({ refundToken: erc20.contractAddress }); - const wBalanceEnd = await erc20.balanceOf(wallet.contractAddress); + await callAndRefund({ refundToken: erc20.address }); + const wBalanceEnd = await erc20.balanceOf(wallet.address); const rBalanceEnd = await erc20.balanceOf(recipient); const refund = wBalanceStart.sub(wBalanceEnd); assert.isTrue(refund.gt(0), "should have refunded ERC20"); @@ -327,16 +327,16 @@ contract("RelayerManager", (accounts) => { it("should fail the transaction when when there is not enough ERC20 for the refund", async () => { await provisionFunds(0, ethers.BigNumber.from("10")); - await assert.revertWith(callAndRefund({ refundToken: erc20.contractAddress }), "ERC20: transfer amount exceeds balance"); + await assert.revertWith(callAndRefund({ refundToken: erc20.address }), "ERC20: transfer amount exceeds balance"); }); it("should include the refund in the daily limit", async () => { await provisionFunds(ethers.BigNumber.from("100000000000"), 0); await setLimitAndDailySpent({ limit: 1000000000, alreadySpent: 10 }); - let dailySpent = await limitFeature.getDailySpent(wallet.contractAddress); + let dailySpent = await limitFeature.getDailySpent(wallet.address); assert.isTrue(dailySpent.toNumber() === 10, "initial daily spent should be 10"); await callAndRefund({ refundToken: ETH_TOKEN }); - dailySpent = await limitFeature.getDailySpent(wallet.contractAddress); + dailySpent = await limitFeature.getDailySpent(wallet.address); assert.isTrue(dailySpent > 10, "Daily spent should be greater then 10"); }); @@ -344,13 +344,13 @@ contract("RelayerManager", (accounts) => { // set funds and limit/daily spent await provisionFunds(ethers.BigNumber.from("100000000000"), 0); await setLimitAndDailySpent({ limit: 1000000000, alreadySpent: 10 }); - let dailySpent = await limitFeature.getDailySpent(wallet.contractAddress); + let dailySpent = await limitFeature.getDailySpent(wallet.address); assert.isTrue(dailySpent.toNumber() === 10, "initial daily spent should be 10"); const rBalanceStart = await deployer.provider.getBalance(recipient); // add a guardian - await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardian); + await guardianManager.from(owner).addGuardian(wallet.address, guardian); // call approvedTransfer - const params = [wallet.contractAddress, ETH_TOKEN, recipient, 1000, ethers.constants.HashZero]; + const params = [wallet.address, ETH_TOKEN, recipient, 1000, ethers.constants.HashZero]; const nonce = await getNonceForRelay(); const gasLimit = 2000000; const relayParams = [ @@ -368,7 +368,7 @@ contract("RelayerManager", (accounts) => { ethers.constants.AddressZero, gasLimit * 1.1]; await manager.relay(...relayParams); - dailySpent = await limitFeature.getDailySpent(wallet.contractAddress); + dailySpent = await limitFeature.getDailySpent(wallet.address); assert.isTrue(dailySpent.toNumber() === 0, "daily spent should be reset"); const rBalanceEnd = await deployer.provider.getBalance(recipient); assert.isTrue(rBalanceEnd.gt(rBalanceStart), "should have refunded the recipient"); @@ -376,14 +376,14 @@ contract("RelayerManager", (accounts) => { it("should fail if required signatures is 0 and OwnerRequirement is not Anyone", async () => { await assert.revertWith( - manager.relay(badFeature, "setIntOwnerOnly", [wallet.contractAddress, 2], wallet, [owner]), "RM: Wrong signature requirement", + manager.relay(badFeature, "setIntOwnerOnly", [wallet.address, 2], wallet, [owner]), "RM: Wrong signature requirement", ); }); it("should fail the transaction when the refund is over the daily limit", async () => { await provisionFunds(ethers.BigNumber.from("100000000000"), 0); await setLimitAndDailySpent({ limit: 1000000000, alreadySpent: 999999990 }); - const dailySpent = await limitFeature.getDailySpent(wallet.contractAddress); + const dailySpent = await limitFeature.getDailySpent(wallet.address); assert.isTrue(dailySpent.toNumber() === 999999990, "initial daily spent should be 999999990"); await assert.revertWith(callAndRefund({ refundToken: ETH_TOKEN }), "RM: refund is above daily limit"); }); @@ -391,26 +391,26 @@ contract("RelayerManager", (accounts) => { describe("addModule transactions", () => { it("should succeed when relayed on VersionManager", async () => { - await registry.registerModule(versionManagerV2.contractAddress, formatBytes32String("versionManagerV2")); - const params = [wallet.contractAddress, versionManagerV2.contractAddress]; + await registry.registerModule(versionManagerV2.address, formatBytes32String("versionManagerV2")); + const params = [wallet.address, versionManagerV2.address]; await manager.relay(versionManager, "addModule", params, wallet, [owner]); - const isModuleAuthorised = await wallet.authorised(versionManagerV2.contractAddress); + const isModuleAuthorised = await wallet.authorised(versionManagerV2.address); assert.isTrue(isModuleAuthorised); - await registry.deregisterModule(versionManagerV2.contractAddress); + await registry.deregisterModule(versionManagerV2.address); }); it("should succeed when called directly on VersionManager", async () => { - await registry.registerModule(versionManagerV2.contractAddress, formatBytes32String("versionManagerV2")); - await versionManager.from(owner).addModule(wallet.contractAddress, versionManagerV2.contractAddress); + await registry.registerModule(versionManagerV2.address, formatBytes32String("versionManagerV2")); + await versionManager.from(owner).addModule(wallet.address, versionManagerV2.address); - const isModuleAuthorised = await wallet.authorised(versionManagerV2.contractAddress); + const isModuleAuthorised = await wallet.authorised(versionManagerV2.address); assert.isTrue(isModuleAuthorised); - await registry.deregisterModule(versionManagerV2.contractAddress); + await registry.deregisterModule(versionManagerV2.address); }); it("should fail to add module which is not registered", async () => { - await assert.revertWith(versionManager.from(owner).addModule(wallet.contractAddress, versionManagerV2.contractAddress), + await assert.revertWith(versionManager.from(owner).addModule(wallet.address, versionManagerV2.address), "VM: module is not registered"); }); }); diff --git a/test/simpleUpgrader.js b/test/simpleUpgrader.js index 98a423604..b968180b5 100644 --- a/test/simpleUpgrader.js +++ b/test/simpleUpgrader.js @@ -22,7 +22,6 @@ contract("SimpleUpgrader", (accounts) => { const manager = new TestManager(); const owner = accounts[1]; - let deployer; let registry; let guardianStorage; let lockStorage; @@ -30,33 +29,32 @@ contract("SimpleUpgrader", (accounts) => { let wallet; before(async () => { - deployer = manager.newDeployer(); - walletImplementation = await deployer.deploy(BaseWallet); + walletImplementation = await BaseWallet.new(); }); beforeEach(async () => { - registry = await deployer.deploy(Registry); - guardianStorage = await deployer.deploy(GuardianStorage); - lockStorage = await deployer.deploy(LockStorage); + registry = await Registry.new(); + guardianStorage = await GuardianStorage.new(); + lockStorage = await LockStorage.new(); - const proxy = await deployer.deploy(Proxy, {}, walletImplementation.contractAddress); - wallet = deployer.wrapDeployedContract(BaseWallet, proxy.contractAddress); + const proxy = await Proxy.new(walletImplementation.address); + wallet = await BaseWallet.at(proxy.address); }); async function deployTestModule() { - const module = await deployer.deploy(VersionManager, {}, - registry.contractAddress, - lockStorage.contractAddress, - guardianStorage.contractAddress, + const module = await VersionManager.new( + registry.address, + lockStorage.address, + guardianStorage.address, ethers.constants.AddressZero, ethers.constants.AddressZero); - const relayer = await deployer.deploy(RelayerManager, {}, - lockStorage.contractAddress, - guardianStorage.contractAddress, + const relayer = await RelayerManager.new( + lockStorage.address, + guardianStorage.address, ethers.constants.AddressZero, ethers.constants.AddressZero, - module.contractAddress); - await module.addVersion([relayer.contractAddress], []); + module.address); + await module.addVersion([relayer.address], []); return { module, relayer }; } @@ -64,14 +62,14 @@ contract("SimpleUpgrader", (accounts) => { it("should register modules in the registry", async () => { const name = "test_1.1"; const { module: initialModule } = await deployTestModule(); - await registry.registerModule(initialModule.contractAddress, formatBytes32String(name)); + await registry.registerModule(initialModule.address, formatBytes32String(name)); // Here we adjust how we call isRegisteredModule which has 2 overlaods, one accepting a single address // and a second accepting an array of addresses. Behaviour as to which overload is selected to run // differs between CI and Coverage environments, adjusted for this here - const isRegistered = await registry["isRegisteredModule(address)"](initialModule.contractAddress); + const isRegistered = await registry["isRegisteredModule(address)"](initialModule.address); assert.equal(isRegistered, true, "module1 should be registered"); - const info = await registry.moduleInfo(initialModule.contractAddress); + const info = await registry.moduleInfo(initialModule.address); assert.equal(parseBytes32String(info), name, "module1 should be registered with the correct name"); }); @@ -80,17 +78,17 @@ contract("SimpleUpgrader", (accounts) => { const { module: initialModule } = await deployTestModule(); const { module: moduleToAdd } = await deployTestModule(); // register module - await registry.registerModule(initialModule.contractAddress, formatBytes32String("initial")); - await registry.registerModule(moduleToAdd.contractAddress, formatBytes32String("added")); + await registry.registerModule(initialModule.address, formatBytes32String("initial")); + await registry.registerModule(moduleToAdd.address, formatBytes32String("added")); - await wallet.init(owner, [initialModule.contractAddress]); - await initialModule.from(owner).upgradeWallet(wallet.contractAddress, await initialModule.lastVersion()); - let isAuthorised = await wallet.authorised(initialModule.contractAddress); + await wallet.init(owner, [initialModule.address]); + await initialModule.from(owner).upgradeWallet(wallet.address, await initialModule.lastVersion()); + let isAuthorised = await wallet.authorised(initialModule.address); assert.equal(isAuthorised, true, "initial module should be authorised"); // add module to wallet - await initialModule.from(owner).addModule(wallet.contractAddress, moduleToAdd.contractAddress); + await initialModule.from(owner).addModule(wallet.address, moduleToAdd.address); - isAuthorised = await wallet.authorised(moduleToAdd.contractAddress); + isAuthorised = await wallet.authorised(moduleToAdd.address); assert.equal(isAuthorised, true, "added module should be authorised"); }); @@ -99,15 +97,15 @@ contract("SimpleUpgrader", (accounts) => { const { module: initialModule } = await deployTestModule(); const { module: moduleToAdd } = await deployTestModule(); // register initial module only - await registry.registerModule(initialModule.contractAddress, formatBytes32String("initial")); + await registry.registerModule(initialModule.address, formatBytes32String("initial")); - await wallet.init(owner, [initialModule.contractAddress]); - await initialModule.from(owner).upgradeWallet(wallet.contractAddress, await initialModule.lastVersion()); - let isAuthorised = await wallet.authorised(initialModule.contractAddress); + await wallet.init(owner, [initialModule.address]); + await initialModule.from(owner).upgradeWallet(wallet.address, await initialModule.lastVersion()); + let isAuthorised = await wallet.authorised(initialModule.address); assert.equal(isAuthorised, true, "initial module should be authorised"); // try (and fail) to add moduleToAdd to wallet - await assert.revert(initialModule.from(owner).addModule(wallet.contractAddress, moduleToAdd.contractAddress)); - isAuthorised = await wallet.authorised(moduleToAdd.contractAddress); + await assert.revert(initialModule.from(owner).addModule(wallet.address, moduleToAdd.address)); + isAuthorised = await wallet.authorised(moduleToAdd.address); assert.equal(isAuthorised, false, "unregistered module should not be authorised"); }); @@ -115,28 +113,28 @@ contract("SimpleUpgrader", (accounts) => { // create module V1 const { module: moduleV1 } = await deployTestModule(); // register module V1 - await registry.registerModule(moduleV1.contractAddress, formatBytes32String("V1")); + await registry.registerModule(moduleV1.address, formatBytes32String("V1")); - await wallet.init(owner, [moduleV1.contractAddress]); - await moduleV1.from(owner).upgradeWallet(wallet.contractAddress, await moduleV1.lastVersion()); + await wallet.init(owner, [moduleV1.address]); + await moduleV1.from(owner).upgradeWallet(wallet.address, await moduleV1.lastVersion()); // create module V2 const { module: moduleV2 } = await deployTestModule(); // create upgrader - const upgrader = await deployer.deploy(SimpleUpgrader, {}, - registry.contractAddress, lockStorage.contractAddress, [moduleV1.contractAddress], [moduleV2.contractAddress]); - await registry.registerModule(upgrader.contractAddress, formatBytes32String("V1toV2")); + const upgrader = await SimpleUpgrader.new( + registry.address, lockStorage.address, [moduleV1.address], [moduleV2.address]); + await registry.registerModule(upgrader.address, formatBytes32String("V1toV2")); // check we can't upgrade from V1 to V2 - await assert.revertWith(moduleV1.from(owner).addModule(wallet.contractAddress, upgrader.contractAddress), "SU: Not all modules are registered"); + await assert.revertWith(moduleV1.from(owner).addModule(wallet.address, upgrader.address), "SU: Not all modules are registered"); // register module V2 - await registry.registerModule(moduleV2.contractAddress, formatBytes32String("V2")); + await registry.registerModule(moduleV2.address, formatBytes32String("V2")); // now we can upgrade - await moduleV1.from(owner).addModule(wallet.contractAddress, upgrader.contractAddress); + await moduleV1.from(owner).addModule(wallet.address, upgrader.address); // test if the upgrade worked - const isV1Authorised = await wallet.authorised(moduleV1.contractAddress); - const isV2Authorised = await wallet.authorised(moduleV2.contractAddress); - const isUpgraderAuthorised = await wallet.authorised(upgrader.contractAddress); + const isV1Authorised = await wallet.authorised(moduleV1.address); + const isV2Authorised = await wallet.authorised(moduleV2.address); + const isUpgraderAuthorised = await wallet.authorised(upgrader.address); const numModules = await wallet.modules(); assert.isFalse(isV1Authorised, "moduleV1 should be unauthorised"); assert.isTrue(isV2Authorised, "moduleV2 should be authorised"); @@ -151,30 +149,30 @@ contract("SimpleUpgrader", (accounts) => { const { module: moduleV1, relayer: relayerV1 } = await deployTestModule(); manager.setRelayerManager(relayerV1); // register module V1 - await registry.registerModule(moduleV1.contractAddress, formatBytes32String("V1")); + await registry.registerModule(moduleV1.address, formatBytes32String("V1")); // create wallet with module V1 and relayer feature - const proxy = await deployer.deploy(Proxy, {}, walletImplementation.contractAddress); - wallet = deployer.wrapDeployedContract(BaseWallet, proxy.contractAddress); - await wallet.init(owner, [moduleV1.contractAddress]); - await moduleV1.from(owner).upgradeWallet(wallet.contractAddress, await moduleV1.lastVersion()); + const proxy = await Proxy.new(walletImplementation.address); + wallet = await BaseWallet.at(proxy.address); + await wallet.init(owner, [moduleV1.address]); + await moduleV1.from(owner).upgradeWallet(wallet.address, await moduleV1.lastVersion()); // create module V2 const { module: moduleV2 } = await deployTestModule(); // register module V2 - await registry.registerModule(moduleV2.contractAddress, formatBytes32String("V2")); + await registry.registerModule(moduleV2.address, formatBytes32String("V2")); // create upgraders - const toAdd = modulesToAdd(moduleV2.contractAddress); - const upgrader1 = await deployer.deploy(SimpleUpgrader, {}, - registry.contractAddress, lockStorage.contractAddress, [moduleV1.contractAddress], toAdd); - const upgrader2 = await deployer.deploy(SimpleUpgrader, {}, - registry.contractAddress, lockStorage.contractAddress, [moduleV1.contractAddress], toAdd); - await registry.registerModule(upgrader1.contractAddress, formatBytes32String("V1toV2_1")); - await registry.registerModule(upgrader2.contractAddress, formatBytes32String("V1toV2_2")); + const toAdd = modulesToAdd(moduleV2.address); + const upgrader1 = await SimpleUpgrader.new( + registry.address, lockStorage.address, [moduleV1.address], toAdd); + const upgrader2 = await SimpleUpgrader.new( + registry.address, lockStorage.address, [moduleV1.address], toAdd); + await registry.registerModule(upgrader1.address, formatBytes32String("V1toV2_1")); + await registry.registerModule(upgrader2.address, formatBytes32String("V1toV2_2")); // upgrade from V1 to V2 let txReceipt; - const params1 = [wallet.contractAddress, upgrader1.contractAddress]; - const params2 = [wallet.contractAddress, upgrader2.contractAddress]; + const params1 = [wallet.address, upgrader1.address]; + const params2 = [wallet.address, upgrader2.address]; // if no module is added and all modules are removed, the upgrade should fail if (toAdd.length === 0) { if (relayed) { @@ -197,15 +195,15 @@ contract("SimpleUpgrader", (accounts) => { // test event ordering const logs = utils.parseLogs(txReceipt, wallet, "AuthorisedModule"); - const upgraderAuthorisedLogIndex = logs.findIndex((e) => e.module === upgrader1.contractAddress && e.value === true); - const upgraderUnauthorisedLogIndex = logs.findIndex((e) => e.module === upgrader1.contractAddress && e.value === false); + const upgraderAuthorisedLogIndex = logs.findIndex((e) => e.module === upgrader1.address && e.value === true); + const upgraderUnauthorisedLogIndex = logs.findIndex((e) => e.module === upgrader1.address && e.value === false); assert.isBelow(upgraderAuthorisedLogIndex, upgraderUnauthorisedLogIndex, "AuthorisedModule(upgrader, false) should come after AuthorisedModule(upgrader, true)"); // test if the upgrade worked - const isV1Authorised = await wallet.authorised(moduleV1.contractAddress); - const isV2Authorised = await wallet.authorised(moduleV2.contractAddress); - const isUpgraderAuthorised = await wallet.authorised(upgrader1.contractAddress); + const isV1Authorised = await wallet.authorised(moduleV1.address); + const isV2Authorised = await wallet.authorised(moduleV2.address); + const isUpgraderAuthorised = await wallet.authorised(upgrader1.address); const numModules = await wallet.modules(); assert.equal(isV1Authorised, false, "moduleV1 should be unauthorised"); assert.equal(isV2Authorised, true, "moduleV2 should be authorised"); @@ -240,100 +238,98 @@ contract("SimpleUpgrader", (accounts) => { beforeEach(async () => { // Setup the module for wallet - versionManager = await deployer.deploy(VersionManager, {}, - registry.contractAddress, - lockStorage.contractAddress, - guardianStorage.contractAddress, + versionManager = await VersionManager.new( + registry.address, + lockStorage.address, + guardianStorage.address, ethers.constants.AddressZero, ethers.constants.AddressZero); - guardianManager = await deployer.deploy(GuardianManager, {}, - lockStorage.contractAddress, - guardianStorage.contractAddress, - versionManager.contractAddress, + guardianManager = await GuardianManager.new( + lockStorage.address, + guardianStorage.address, + versionManager.address, 24, 12); - lockManager = await deployer.deploy(LockManager, {}, - lockStorage.contractAddress, - guardianStorage.contractAddress, - versionManager.contractAddress, + lockManager = await LockManager.new( + lockStorage.address, + guardianStorage.address, + versionManager.address, 24 * 5); - recoveryManager = await deployer.deploy(RecoveryManager, {}, - lockStorage.contractAddress, - guardianStorage.contractAddress, - versionManager.contractAddress, + recoveryManager = await RecoveryManager.new( + lockStorage.address, + guardianStorage.address, + versionManager.address, 36, 24 * 5); - relayerManager = await deployer.deploy(RelayerManager, {}, - lockStorage.contractAddress, - guardianStorage.contractAddress, + relayerManager = await RelayerManager.new( + lockStorage.address, + guardianStorage.address, ethers.constants.AddressZero, ethers.constants.AddressZero, - versionManager.contractAddress); + versionManager.address); manager.setRelayerManager(relayerManager); // Setup the wallet with the initial set of modules await versionManager.addVersion([ - guardianManager.contractAddress, - lockManager.contractAddress, - recoveryManager.contractAddress, - relayerManager.contractAddress, + guardianManager.address, + lockManager.address, + recoveryManager.address, + relayerManager.address, ], []); - await wallet.init(owner, [versionManager.contractAddress]); - await versionManager.from(owner).upgradeWallet(wallet.contractAddress, await versionManager.lastVersion()); - await guardianManager.from(owner).addGuardian(wallet.contractAddress, guardian); + await wallet.init(owner, [versionManager.address]); + await versionManager.from(owner).upgradeWallet(wallet.address, await versionManager.lastVersion()); + await guardianManager.from(owner).addGuardian(wallet.address, guardian); // Setup module v2 for the upgrade const { module } = await deployTestModule(); moduleV2 = module; - await registry.registerModule(moduleV2.contractAddress, formatBytes32String("V2")); + await registry.registerModule(moduleV2.address, formatBytes32String("V2")); }); it("should not be able to upgrade if wallet is locked by guardian", async () => { - const upgrader = await deployer.deploy(SimpleUpgrader, {}, - lockStorage.contractAddress, registry.contractAddress, [versionManager.contractAddress], [moduleV2.contractAddress]); - await registry.registerModule(upgrader.contractAddress, formatBytes32String("V1toV2")); + const upgrader = await SimpleUpgrader.new( + lockStorage.address, registry.address, [versionManager.address], [moduleV2.address]); + await registry.registerModule(upgrader.address, formatBytes32String("V1toV2")); // Guardian locks the wallet - await lockManager.from(guardian).lock(wallet.contractAddress); + await lockManager.from(guardian).lock(wallet.address); // Try to upgrade while wallet is locked - await assert.revertWith(versionManager.from(owner).addModule(wallet.contractAddress, upgrader.contractAddress), "BF: wallet locked"); + await assert.revertWith(versionManager.from(owner).addModule(wallet.address, upgrader.address), "BF: wallet locked"); // Check wallet is still locked - const locked = await lockManager.isLocked(wallet.contractAddress); + const locked = await lockManager.isLocked(wallet.address); assert.isTrue(locked); // Check upgrade failed - const isV1Authorised = await wallet.authorised(versionManager.contractAddress); - const isV2Authorised = await wallet.authorised(moduleV2.contractAddress); + const isV1Authorised = await wallet.authorised(versionManager.address); + const isV2Authorised = await wallet.authorised(moduleV2.address); assert.isTrue(isV1Authorised); assert.isFalse(isV2Authorised); }); it("should not be able to upgrade if wallet is under recovery", async () => { - const upgrader = await deployer.deploy( - SimpleUpgrader, - {}, - lockStorage.contractAddress, - registry.contractAddress, - [versionManager.contractAddress], - [moduleV2.contractAddress], + const upgrader = await SimpleUpgrader.new( + lockStorage.address, + registry.address, + [versionManager.address], + [moduleV2.address], ); - await registry.registerModule(upgrader.contractAddress, formatBytes32String("V1toV2")); + await registry.registerModule(upgrader.address, formatBytes32String("V1toV2")); // Put the wallet under recovery - await manager.relay(recoveryManager, "executeRecovery", [wallet.contractAddress, newowner], wallet, [guardian]); + await manager.relay(recoveryManager, "executeRecovery", [wallet.address, newowner], wallet, [guardian]); // check that the wallet is locked - let locked = await lockManager.isLocked(wallet.contractAddress); + let locked = await lockManager.isLocked(wallet.address); assert.isTrue(locked, "wallet should be locked"); // Try to upgrade while wallet is under recovery - await assert.revertWith(versionManager.from(owner).addModule(wallet.contractAddress, upgrader.contractAddress), "BF: wallet locked"); + await assert.revertWith(versionManager.from(owner).addModule(wallet.address, upgrader.address), "BF: wallet locked"); // Check wallet is still locked - locked = await lockManager.isLocked(wallet.contractAddress); + locked = await lockManager.isLocked(wallet.address); assert.isTrue(locked, "wallet should still be locked"); // Check upgrade failed - const isV1Authorised = await wallet.authorised(versionManager.contractAddress); - const isV2Authorised = await wallet.authorised(moduleV2.contractAddress); + const isV1Authorised = await wallet.authorised(versionManager.address); + const isV2Authorised = await wallet.authorised(moduleV2.address); assert.isTrue(isV1Authorised); assert.isFalse(isV2Authorised); }); diff --git a/test/tokenExchanger.js b/test/tokenExchanger.js index 9f322049a..7c63df95e 100644 --- a/test/tokenExchanger.js +++ b/test/tokenExchanger.js @@ -75,50 +75,48 @@ contract("TokenExchanger", (accounts) => { before(async () => { deployer = manager.newDeployer(); - const registry = await deployer.deploy(ModuleRegistry); - dexRegistry = await deployer.deploy(DexRegistry); - guardianStorage = await deployer.deploy(GuardianStorage); - lockStorage = await deployer.deploy(LockStorage); - versionManager = await deployer.deploy(VersionManager, {}, - registry.contractAddress, - lockStorage.contractAddress, - guardianStorage.contractAddress, + const registry = await ModuleRegistry.new(); + dexRegistry = await DexRegistry.new(); + guardianStorage = await GuardianStorage.new(); + lockStorage = await LockStorage.new(); + versionManager = await VersionManager.new( + registry.address, + lockStorage.address, + guardianStorage.address, ethers.constants.AddressZero, ethers.constants.AddressZero); - relayerManager = await deployer.deploy( - RelayerManager, - {}, - lockStorage.contractAddress, - guardianStorage.contractAddress, + relayerManager = await RelayerManager.new( + lockStorage.address, + guardianStorage.address, ethers.constants.AddressZero, ethers.constants.AddressZero, - versionManager.contractAddress, + versionManager.address, ); manager.setRelayerManager(relayerManager); // Deploy test tokens - tokenA = await deployer.deploy(ERC20, {}, [infrastructure], parseEther("1000"), DECIMALS); - tokenB = await deployer.deploy(ERC20, {}, [infrastructure], parseEther("1000"), DECIMALS); + tokenA = await ERC20.new([infrastructure], parseEther("1000"), DECIMALS); + tokenB = await ERC20.new([infrastructure], parseEther("1000"), DECIMALS); // Deploy and fund Kyber - kyberNetwork = await deployer.deploy(KyberNetwork); - await tokenA.mint(kyberNetwork.contractAddress, parseEther("1000")); - await tokenB.mint(kyberNetwork.contractAddress, parseEther("1000")); - await kyberNetwork.addToken(tokenA.contractAddress, TOKEN_A_RATE, DECIMALS); - await kyberNetwork.addToken(tokenB.contractAddress, TOKEN_B_RATE, DECIMALS); + kyberNetwork = await KyberNetwork.new(); + await tokenA.mint(kyberNetwork.address, parseEther("1000")); + await tokenB.mint(kyberNetwork.address, parseEther("1000")); + await kyberNetwork.addToken(tokenA.address, TOKEN_A_RATE, DECIMALS); + await kyberNetwork.addToken(tokenB.address, TOKEN_B_RATE, DECIMALS); await kyberNetwork.send(parseEther("10")); // Deploy and fund UniswapV2 - const uniswapFactory = await deployer.deploy(UniswapV2Factory, {}, AddressZero); - const weth = await deployer.deploy(WETH); - uniswapRouter = await deployer.deploy(UniswapV2Router01, {}, uniswapFactory.contractAddress, weth.contractAddress); - await tokenA.approve(uniswapRouter.contractAddress, parseEther("300")); - await tokenB.approve(uniswapRouter.contractAddress, parseEther("600")); + const uniswapFactory = await UniswapV2Factory.new(AddressZero); + const weth = await WETH.new(); + uniswapRouter = await UniswapV2Router01.new(uniswapFactory.address, weth.address); + await tokenA.approve(uniswapRouter.address, parseEther("300")); + await tokenB.approve(uniswapRouter.address, parseEther("600")); const timestamp = await manager.getTimestamp(await manager.getCurrentBlock()); await uniswapRouter.addLiquidity( - tokenA.contractAddress, - tokenB.contractAddress, + tokenA.address, + tokenB.address, parseEther("300"), parseEther("600"), 1, @@ -128,47 +126,43 @@ contract("TokenExchanger", (accounts) => { ); // Deploy Paraswap - const whitelist = await deployer.deploy(Whitelisted); - const partnerDeployer = await deployer.deploy(PartnerDeployer); - const partnerRegistry = await deployer.deploy(PartnerRegistry, {}, partnerDeployer.contractAddress); - paraswap = await deployer.deploy( - AugustusSwapper, - {}, - whitelist.contractAddress, + const whitelist = await Whitelisted.new(); + const partnerDeployer = await PartnerDeployer.new(); + const partnerRegistry = await PartnerRegistry.new(partnerDeployer.address); + paraswap = await AugustusSwapper.new( + whitelist.address, infrastructure, - partnerRegistry.contractAddress, + partnerRegistry.address, infrastructure, infrastructure, ); - kyberAdapter = await deployer.deploy(Kyber, {}, infrastructure); - uniswapV2Adapter = await deployer.deploy(UniswapV2, {}, weth.contractAddress); - await whitelist.addWhitelisted(kyberAdapter.contractAddress); - await whitelist.addWhitelisted(uniswapV2Adapter.contractAddress); + kyberAdapter = await Kyber.new(infrastructure); + uniswapV2Adapter = await UniswapV2.new(weth.address); + await whitelist.addWhitelisted(kyberAdapter.address); + await whitelist.addWhitelisted(uniswapV2Adapter.address); // Deploy exchanger module - tokenPriceRegistry = await deployer.deploy(TokenPriceRegistry); - await tokenPriceRegistry.setTradableForTokenList([tokenA.contractAddress, tokenB.contractAddress], [true, true]); - await dexRegistry.setAuthorised([kyberAdapter.contractAddress, uniswapV2Adapter.contractAddress], [true, true]); - exchanger = await deployer.deploy( - TokenExchanger, - {}, - lockStorage.contractAddress, - tokenPriceRegistry.contractAddress, - versionManager.contractAddress, - dexRegistry.contractAddress, - paraswap.contractAddress, + tokenPriceRegistry = await TokenPriceRegistry.new(); + await tokenPriceRegistry.setTradableForTokenList([tokenA.address, tokenB.address], [true, true]); + await dexRegistry.setAuthorised([kyberAdapter.address, uniswapV2Adapter.address], [true, true]); + exchanger = await TokenExchanger.new( + lockStorage.address, + tokenPriceRegistry.address, + versionManager.address, + dexRegistry.address, + paraswap.address, "argent", ); // Deploy TransferManager module - const transferStorage = await deployer.deploy(TransferStorage); - const limitStorage = await deployer.deploy(LimitStorage); - transferManager = await deployer.deploy(TransferManager, {}, - lockStorage.contractAddress, - transferStorage.contractAddress, - limitStorage.contractAddress, - tokenPriceRegistry.contractAddress, - versionManager.contractAddress, + const transferStorage = await TransferStorage.new(); + const limitStorage = await LimitStorage.new(); + transferManager = await TransferManager.new( + lockStorage.address, + transferStorage.address, + limitStorage.address, + tokenPriceRegistry.address, + versionManager.address, 3600, 3600, 10000, @@ -176,36 +170,36 @@ contract("TokenExchanger", (accounts) => { AddressZero); // Deploy wallet implementation - walletImplementation = await deployer.deploy(BaseWallet); + walletImplementation = await BaseWallet.new(); await versionManager.addVersion([ - exchanger.contractAddress, - transferManager.contractAddress, - relayerManager.contractAddress, + exchanger.address, + transferManager.address, + relayerManager.address, ], []); }); beforeEach(async () => { // create wallet - const proxy = await deployer.deploy(Proxy, {}, walletImplementation.contractAddress); - wallet = deployer.wrapDeployedContract(BaseWallet, proxy.contractAddress); - await wallet.init(owner, [versionManager.contractAddress]); - await versionManager.from(owner).upgradeWallet(wallet.contractAddress, await versionManager.lastVersion()); + const proxy = await Proxy.new(walletImplementation.address); + wallet = await BaseWallet.at(proxy.address); + await wallet.init(owner, [versionManager.address]); + await versionManager.from(owner).upgradeWallet(wallet.address, await versionManager.lastVersion()); // fund wallet await wallet.send(parseEther("0.1")); - await tokenA.mint(wallet.contractAddress, parseEther("1000")); - await tokenB.mint(wallet.contractAddress, parseEther("1000")); + await tokenA.mint(wallet.address, parseEther("1000")); + await tokenB.mint(wallet.address, parseEther("1000")); }); async function getBalance(tokenAddress, _wallet) { let balance; if (tokenAddress === ETH_TOKEN) { - balance = await deployer.provider.getBalance(_wallet.contractAddress); - } else if (tokenAddress === tokenA.contractAddress) { - balance = await tokenA.balanceOf(_wallet.contractAddress); + balance = await deployer.provider.getBalance(_wallet.address); + } else if (tokenAddress === tokenA.address) { + balance = await tokenA.balanceOf(_wallet.address); } else { - balance = await tokenB.balanceOf(_wallet.contractAddress); + balance = await tokenB.balanceOf(_wallet.address); } return balance; } @@ -242,8 +236,8 @@ contract("TokenExchanger", (accounts) => { const routes = getRoutes({ fromToken, toToken, srcAmount, destAmount, }); - const exchanges = { kyber: kyberAdapter.contractAddress, uniswapv2: uniswapV2Adapter.contractAddress }; - const targetExchanges = { kyber: kyberNetwork.contractAddress, uniswapv2: uniswapRouter.contractAddress }; + const exchanges = { kyber: kyberAdapter.address, uniswapv2: uniswapV2Adapter.address }; + const targetExchanges = { kyber: kyberNetwork.address, uniswapv2: uniswapRouter.address }; return makePathes(fromToken, toToken, routes, exchanges, targetExchanges, false); } @@ -253,8 +247,8 @@ contract("TokenExchanger", (accounts) => { const routes = getRoutes({ fromToken, toToken, srcAmount, destAmount, }); - const exchanges = { kyber: kyberAdapter.contractAddress, uniswapv2: uniswapV2Adapter.contractAddress }; - const targetExchanges = { kyber: kyberNetwork.contractAddress, uniswapv2: uniswapRouter.contractAddress }; + const exchanges = { kyber: kyberAdapter.address, uniswapv2: uniswapV2Adapter.address }; + const targetExchanges = { kyber: kyberNetwork.address, uniswapv2: uniswapRouter.address }; return makeRoutes(fromToken, toToken, routes, exchanges, targetExchanges); } @@ -279,7 +273,7 @@ contract("TokenExchanger", (accounts) => { } else { throw new Error("Unsupported method:", method); } - const params = [_wallet.contractAddress, fromToken, toToken, srcAmount.toString(), destAmount.toString(), expectedDestAmount, routes, 0]; + const params = [_wallet.address, fromToken, toToken, srcAmount.toString(), destAmount.toString(), expectedDestAmount, routes, 0]; return params; } @@ -329,38 +323,38 @@ contract("TokenExchanger", (accounts) => { function testsForMethod(method) { it("trades ETH to ERC20 (blockchain tx)", async () => { await testTrade({ - method, fromToken: ETH_TOKEN, toToken: tokenA.contractAddress, relayed: false, + method, fromToken: ETH_TOKEN, toToken: tokenA.address, relayed: false, }); }); it("trades ETH to ERC20 (relayed tx)", async () => { await testTrade({ - method, fromToken: ETH_TOKEN, toToken: tokenA.contractAddress, relayed: true, + method, fromToken: ETH_TOKEN, toToken: tokenA.address, relayed: true, }); }); it("trades ERC20 to ETH (blockchain tx)", async () => { await testTrade({ - method, fromToken: tokenA.contractAddress, toToken: ETH_TOKEN, relayed: false, + method, fromToken: tokenA.address, toToken: ETH_TOKEN, relayed: false, }); }); it("trades ERC20 to ETH (relayed tx)", async () => { await testTrade({ - method, fromToken: tokenA.contractAddress, toToken: ETH_TOKEN, relayed: true, + method, fromToken: tokenA.address, toToken: ETH_TOKEN, relayed: true, }); }); it("trades ERC20 to ERC20 (blockchain tx)", async () => { await testTrade({ - method, fromToken: tokenA.contractAddress, toToken: tokenB.contractAddress, relayed: false, + method, fromToken: tokenA.address, toToken: tokenB.address, relayed: false, }); }); it("trades ERC20 to ERC20 (relayed tx)", async () => { await testTrade({ - method, fromToken: tokenA.contractAddress, toToken: tokenB.contractAddress, relayed: true, + method, fromToken: tokenA.address, toToken: tokenB.address, relayed: true, }); }); it("can exclude non tradable tokens", async () => { - const fromToken = tokenA.contractAddress; - const toToken = tokenB.contractAddress; + const fromToken = tokenA.address; + const toToken = tokenB.address; const fixedAmount = parseEther("0.01"); const variableAmount = method === "sell" ? "1" : await getBalance(fromToken, wallet); const params = getParams({ @@ -376,10 +370,10 @@ contract("TokenExchanger", (accounts) => { }); it("can exclude exchanges", async () => { - const fromToken = tokenA.contractAddress; - const toToken = tokenB.contractAddress; + const fromToken = tokenA.address; + const toToken = tokenB.address; // whitelist no exchange - await dexRegistry.setAuthorised([kyberAdapter.contractAddress, uniswapV2Adapter.contractAddress], [false, false]); + await dexRegistry.setAuthorised([kyberAdapter.address, uniswapV2Adapter.address], [false, false]); const fixedAmount = parseEther("0.01"); const variableAmount = method === "sell" ? "1" : await getBalance(fromToken, wallet); const params = getParams({ @@ -391,23 +385,23 @@ contract("TokenExchanger", (accounts) => { }); await assert.revertWith(exchanger.from(owner)[method](...params, { gasLimit: 2000000 }), "DR: Unauthorised DEX"); // reset whitelist - await dexRegistry.setAuthorised([kyberAdapter.contractAddress, uniswapV2Adapter.contractAddress], [true, true]); + await dexRegistry.setAuthorised([kyberAdapter.address, uniswapV2Adapter.address], [true, true]); }); it(`lets old wallets call ${method} successfully`, async () => { // create wallet - const oldWalletImplementation = await deployer.deploy(OldWallet); - const proxy = await deployer.deploy(Proxy, {}, oldWalletImplementation.contractAddress); - const oldWallet = deployer.wrapDeployedContract(OldWallet, proxy.contractAddress); - await oldWallet.init(owner, [versionManager.contractAddress]); - await versionManager.from(owner).upgradeWallet(oldWallet.contractAddress, await versionManager.lastVersion()); + const oldWalletImplementation = await OldWallet.new(); + const proxy = await Proxy.new(oldWalletImplementation.address); + const oldWallet = await OldWallet.at(proxy.address); + await oldWallet.init(owner, [versionManager.address]); + await versionManager.from(owner).upgradeWallet(oldWallet.address, await versionManager.lastVersion()); // fund wallet await oldWallet.send(parseEther("0.1")); // call sell/buy await testTrade({ method, fromToken: ETH_TOKEN, - toToken: tokenA.contractAddress, + toToken: tokenA.address, _wallet: oldWallet, relayed: false, }); @@ -415,13 +409,13 @@ contract("TokenExchanger", (accounts) => { const testTradeWithPreExistingAllowance = async (allowance) => { const spender = await paraswap.getTokenTransferProxy(); - await transferManager.from(owner).approveToken(wallet.contractAddress, tokenA.contractAddress, spender, allowance); + await transferManager.from(owner).approveToken(wallet.address, tokenA.address, spender, allowance); // call sell await testTrade({ - method, fromToken: tokenA.contractAddress, toToken: ETH_TOKEN, relayed: false, + method, fromToken: tokenA.address, toToken: ETH_TOKEN, relayed: false, }); // check that the pre-existing allowance is restored - const newAllowance = await tokenA.allowance(wallet.contractAddress, spender); + const newAllowance = await tokenA.allowance(wallet.address, spender); assert.equal(newAllowance.toString(), allowance.toString(), "Pre-existing allowance not restored"); }; diff --git a/test/transferManager.js b/test/transferManager.js index 44373af03..aa18cdf99 100644 --- a/test/transferManager.js +++ b/test/transferManager.js @@ -64,72 +64,72 @@ contract("TransferManager", (accounts) => { before(async () => { deployer = manager.newDeployer(); - weth = await deployer.deploy(WETH); - const registry = await deployer.deploy(Registry); - priceProvider = await deployer.deploy(LegacyTokenPriceProvider, {}, ethers.constants.AddressZero); + weth = await WETH.new(); + const registry = await Registry.new(); + priceProvider = await LegacyTokenPriceProvider.new(ethers.constants.AddressZero); await priceProvider.addManager(infrastructure); - transferStorage = await deployer.deploy(TransferStorage); - lockStorage = await deployer.deploy(LockStorage); - guardianStorage = await deployer.deploy(GuardianStorage); - limitStorage = await deployer.deploy(LimitStorage); - tokenPriceRegistry = await deployer.deploy(TokenPriceRegistry); + transferStorage = await TransferStorage.new(); + lockStorage = await LockStorage.new(); + guardianStorage = await GuardianStorage.new(); + limitStorage = await LimitStorage.new(); + tokenPriceRegistry = await TokenPriceRegistry.new(); await tokenPriceRegistry.addManager(infrastructure); - versionManager = await deployer.deploy(VersionManager, {}, - registry.contractAddress, - lockStorage.contractAddress, - guardianStorage.contractAddress, - transferStorage.contractAddress, - limitStorage.contractAddress); - - previousTransferManager = await deployer.deploy(LegacyTransferManager, {}, - registry.contractAddress, - transferStorage.contractAddress, - guardianStorage.contractAddress, - priceProvider.contractAddress, + versionManager = await VersionManager.new( + registry.address, + lockStorage.address, + guardianStorage.address, + transferStorage.address, + limitStorage.address); + + previousTransferManager = await LegacyTransferManager.new( + registry.address, + transferStorage.address, + guardianStorage.address, + priceProvider.address, SECURITY_PERIOD, SECURITY_WINDOW, ETH_LIMIT, ethers.constants.AddressZero); - transferManager = await deployer.deploy(TransferManager, {}, - lockStorage.contractAddress, - transferStorage.contractAddress, - limitStorage.contractAddress, - tokenPriceRegistry.contractAddress, - versionManager.contractAddress, + transferManager = await TransferManager.new( + lockStorage.address, + transferStorage.address, + limitStorage.address, + tokenPriceRegistry.address, + versionManager.address, SECURITY_PERIOD, SECURITY_WINDOW, ETH_LIMIT, - weth.contractAddress, - previousTransferManager.contractAddress); + weth.address, + previousTransferManager.address); - await registry.registerModule(versionManager.contractAddress, ethers.utils.formatBytes32String("VersionManager")); + await registry.registerModule(versionManager.address, ethers.utils.formatBytes32String("VersionManager")); - walletImplementation = await deployer.deploy(BaseWallet); + walletImplementation = await BaseWallet.new(); - relayerManager = await deployer.deploy(RelayerManager, {}, - lockStorage.contractAddress, - guardianStorage.contractAddress, - limitStorage.contractAddress, - tokenPriceRegistry.contractAddress, - versionManager.contractAddress); + relayerManager = await RelayerManager.new( + lockStorage.address, + guardianStorage.address, + limitStorage.address, + tokenPriceRegistry.address, + versionManager.address); manager.setRelayerManager(relayerManager); - await versionManager.addVersion([transferManager.contractAddress, relayerManager.contractAddress], [transferManager.contractAddress]); + await versionManager.addVersion([transferManager.address, relayerManager.address], [transferManager.address]); }); beforeEach(async () => { - const proxy = await deployer.deploy(Proxy, {}, walletImplementation.contractAddress); - wallet = deployer.wrapDeployedContract(BaseWallet, proxy.contractAddress); - await wallet.init(owner, [versionManager.contractAddress]); - await versionManager.from(owner).upgradeWallet(wallet.contractAddress, await versionManager.lastVersion()); + const proxy = await Proxy.new(walletImplementation.address); + wallet = deployer.wrapDeployedContract(BaseWallet, proxy.address); + await wallet.init(owner, [versionManager.address]); + await versionManager.from(owner).upgradeWallet(wallet.address, await versionManager.lastVersion()); const decimals = 12; // number of decimal for TOKN contract const tokenRate = new BN(10).pow(new BN(19)).muln(51); // 1 TOKN = 0.00051 ETH = 0.00051*10^18 ETH wei => *10^(18-decimals) = 0.00051*10^18 * 10^6 = 0.00051*10^24 = 51*10^19 - erc20 = await deployer.deploy(ERC20, {}, [infrastructure, wallet.contractAddress], 10000000, decimals); // TOKN contract with 10M tokens (5M TOKN for wallet and 5M TOKN for account[0]) - await tokenPriceRegistry.setPriceForTokenList([erc20.contractAddress], [tokenRate.toString()]); + erc20 = await RC20.new([infrastructure, wallet.address], 10000000, decimals); // TOKN contract with 10M tokens (5M TOKN for wallet and 5M TOKN for account[0]) + await tokenPriceRegistry.setPriceForTokenList([erc20.address], [tokenRate.toString()]); await wallet.send(ethers.BigNumber.from("1000000000000000000")); }); @@ -144,59 +144,59 @@ contract("TransferManager", (accounts) => { describe("Initialising the module", () => { it("when no previous transfer manager is passed, should initialise with default limit", async () => { - const transferManager1 = await deployer.deploy(TransferManager, {}, - lockStorage.contractAddress, - transferStorage.contractAddress, - limitStorage.contractAddress, - tokenPriceRegistry.contractAddress, - versionManager.contractAddress, + const transferManager1 = await TransferManager.new( + lockStorage.address, + transferStorage.address, + limitStorage.address, + tokenPriceRegistry.address, + versionManager.address, SECURITY_PERIOD, SECURITY_WINDOW, 10, ethers.constants.AddressZero, ethers.constants.AddressZero); - await versionManager.addVersion([transferManager1.contractAddress], [transferManager1.contractAddress]); - const proxy = await deployer.deploy(Proxy, {}, walletImplementation.contractAddress); - const existingWallet = deployer.wrapDeployedContract(BaseWallet, proxy.contractAddress); - await existingWallet.init(owner, [versionManager.contractAddress]); - await versionManager.from(owner).upgradeWallet(existingWallet.contractAddress, await versionManager.lastVersion()); + await versionManager.addVersion([transferManager1.address], [transferManager1.address]); + const proxy = await Proxy.new(walletImplementation.address); + const existingWallet = deployer.wrapDeployedContract(BaseWallet, proxy.address); + await existingWallet.init(owner, [versionManager.address]); + await versionManager.from(owner).upgradeWallet(existingWallet.address, await versionManager.lastVersion()); const defautlimit = await transferManager1.defaultLimit(); - const limit = await transferManager1.getCurrentLimit(existingWallet.contractAddress); + const limit = await transferManager1.getCurrentLimit(existingWallet.address); assert.equal(limit.toNumber(), defautlimit.toNumber()); // reset the last version to the default bundle - await versionManager.addVersion([transferManager.contractAddress, relayerManager.contractAddress], [transferManager.contractAddress]); + await versionManager.addVersion([transferManager.address, relayerManager.address], [transferManager.address]); }); }); describe("Managing the whitelist", () => { it("should add/remove an account to/from the whitelist", async () => { - await transferManager.from(owner).addToWhitelist(wallet.contractAddress, recipient); - let isTrusted = await transferManager.isWhitelisted(wallet.contractAddress, recipient); + await transferManager.from(owner).addToWhitelist(wallet.address, recipient); + let isTrusted = await transferManager.isWhitelisted(wallet.address, recipient); assert.equal(isTrusted, false, "should not be trusted during the security period"); await manager.increaseTime(3); - isTrusted = await transferManager.isWhitelisted(wallet.contractAddress, recipient); + isTrusted = await transferManager.isWhitelisted(wallet.address, recipient); assert.equal(isTrusted, true, "should be trusted after the security period"); - await transferManager.from(owner).removeFromWhitelist(wallet.contractAddress, recipient); - isTrusted = await transferManager.isWhitelisted(wallet.contractAddress, recipient); + await transferManager.from(owner).removeFromWhitelist(wallet.address, recipient); + isTrusted = await transferManager.isWhitelisted(wallet.address, recipient); assert.equal(isTrusted, false, "should no removed from whitelist immediately"); }); it("should not be able to whitelist a token twice", async () => { - await transferManager.from(owner).addToWhitelist(wallet.contractAddress, recipient); + await transferManager.from(owner).addToWhitelist(wallet.address, recipient); await manager.increaseTime(3); await assert.revertWith( - transferManager.from(owner).addToWhitelist(wallet.contractAddress, recipient), "TT: target already whitelisted", + transferManager.from(owner).addToWhitelist(wallet.address, recipient), "TT: target already whitelisted", ); }); it("should be able to remove a whitelisted token from the whitelist during the security period", async () => { - await transferManager.from(owner).addToWhitelist(wallet.contractAddress, recipient); - await transferManager.from(owner).removeFromWhitelist(wallet.contractAddress, recipient); + await transferManager.from(owner).addToWhitelist(wallet.address, recipient); + await transferManager.from(owner).removeFromWhitelist(wallet.address, recipient); await manager.increaseTime(3); - const isTrusted = await transferManager.isWhitelisted(wallet.contractAddress, recipient); + const isTrusted = await transferManager.isWhitelisted(wallet.address, recipient); assert.equal(isTrusted, false); }); }); @@ -207,44 +207,44 @@ contract("TransferManager", (accounts) => { let erc20ZeroDecimals; beforeEach(async () => { - erc20First = await deployer.deploy(ERC20, {}, [infrastructure], 10000000, 18); - erc20Second = await deployer.deploy(ERC20, {}, [infrastructure], 10000000, 18); - erc20ZeroDecimals = await deployer.deploy(ERC20, {}, [infrastructure], 10000000, 0); + erc20First = await ERC20.new([infrastructure], 10000000, 18); + erc20Second = await ERC20.new([infrastructure], 10000000, 18); + erc20ZeroDecimals = await ERC20.new([infrastructure], 10000000, 0); }); it("should get a token price correctly", async () => { const tokenPrice = new BN(10).pow(new BN(18)).muln(1800); - await tokenPriceRegistry.from(infrastructure).setPriceForTokenList([erc20First.contractAddress], [tokenPrice.toString()]); - const tokenPriceSet = await tokenPriceRegistry.getTokenPrice(erc20First.contractAddress); + await tokenPriceRegistry.from(infrastructure).setPriceForTokenList([erc20First.address], [tokenPrice.toString()]); + const tokenPriceSet = await tokenPriceRegistry.getTokenPrice(erc20First.address); expect(tokenPrice).to.eq.BN(tokenPriceSet.toString()); }); it("should get multiple token prices correctly", async () => { - await tokenPriceRegistry.from(infrastructure).setPriceForTokenList([erc20First.contractAddress, erc20Second.contractAddress], [1800, 1900]); - const tokenPricesSet = await tokenPriceRegistry.getPriceForTokenList([erc20First.contractAddress, erc20Second.contractAddress]); + await tokenPriceRegistry.from(infrastructure).setPriceForTokenList([erc20First.address, erc20Second.address], [1800, 1900]); + const tokenPricesSet = await tokenPriceRegistry.getPriceForTokenList([erc20First.address, erc20Second.address]); expect(1800).to.eq.BN(tokenPricesSet[0].toString()); expect(1900).to.eq.BN(tokenPricesSet[1].toString()); }); it("should set token price correctly", async () => { const tokenPrice = new BN(10).pow(new BN(18)).muln(1800); - await tokenPriceRegistry.from(infrastructure).setPriceForTokenList([erc20First.contractAddress], [tokenPrice.toString()]); - const tokenPriceSet = await tokenPriceRegistry.getTokenPrice(erc20First.contractAddress); + await tokenPriceRegistry.from(infrastructure).setPriceForTokenList([erc20First.address], [tokenPrice.toString()]); + const tokenPriceSet = await tokenPriceRegistry.getTokenPrice(erc20First.address); expect(tokenPrice).to.eq.BN(tokenPriceSet.toString()); }); it("should set multiple token prices correctly", async () => { - await tokenPriceRegistry.from(infrastructure).setPriceForTokenList([erc20First.contractAddress, erc20Second.contractAddress], [1800, 1900]); - const tokenPrice1Set = await tokenPriceRegistry.getTokenPrice(erc20First.contractAddress); + await tokenPriceRegistry.from(infrastructure).setPriceForTokenList([erc20First.address, erc20Second.address], [1800, 1900]); + const tokenPrice1Set = await tokenPriceRegistry.getTokenPrice(erc20First.address); expect(1800).to.eq.BN(tokenPrice1Set.toString()); - const tokenPrice2Set = await tokenPriceRegistry.getTokenPrice(erc20Second.contractAddress); + const tokenPrice2Set = await tokenPriceRegistry.getTokenPrice(erc20Second.address); expect(1900).to.eq.BN(tokenPrice2Set.toString()); }); it("should be able to get the ether value of a given amount of tokens", async () => { const tokenPrice = new BN(10).pow(new BN(18)).muln(1800); - await tokenPriceRegistry.from(infrastructure).setPriceForTokenList([erc20First.contractAddress], [tokenPrice.toString()]); - const etherValue = await getEtherValue("15000000000000000000", erc20First.contractAddress); + await tokenPriceRegistry.from(infrastructure).setPriceForTokenList([erc20First.address], [tokenPrice.toString()]); + const etherValue = await getEtherValue("15000000000000000000", erc20First.address); // expectedValue = 1800*10^18/10^18 (price for 1 token wei) * 15*10^18 (amount) = 1800 * 15*10^18 = 27,000 * 10^18 const expectedValue = new BN(10).pow(new BN(18)).muln(27000); expect(expectedValue).to.eq.BN(etherValue); @@ -252,16 +252,16 @@ contract("TransferManager", (accounts) => { it("should be able to get the ether value for a token with 0 decimals", async () => { const tokenPrice = new BN(10).pow(new BN(36)).muln(23000); - await tokenPriceRegistry.from(infrastructure).setPriceForTokenList([erc20ZeroDecimals.contractAddress], [tokenPrice.toString()]); - const etherValue = await getEtherValue(100, erc20ZeroDecimals.contractAddress); + await tokenPriceRegistry.from(infrastructure).setPriceForTokenList([erc20ZeroDecimals.address], [tokenPrice.toString()]); + const etherValue = await getEtherValue(100, erc20ZeroDecimals.address); // expectedValue = 23000*10^36 * 100 / 10^18 = 2,300,000 * 10^18 const expectedValue = new BN(10).pow(new BN(18)).muln(2300000); expect(expectedValue).to.eq.BN(etherValue); }); it("should return 0 as the ether value for a low priced token", async () => { - await tokenPriceRegistry.from(infrastructure).setPriceForTokenList([erc20First.contractAddress], [23000]); - const etherValue = await getEtherValue(100, erc20First.contractAddress); + await tokenPriceRegistry.from(infrastructure).setPriceForTokenList([erc20First.address], [23000]); + const etherValue = await getEtherValue(100, erc20First.address); assert.equal(etherValue.toString(), 0); // 2,300,000 }); }); @@ -269,106 +269,106 @@ contract("TransferManager", (accounts) => { describe("Daily limit", () => { it("should migrate daily limit for existing wallets", async () => { // create wallet with previous module and funds - const proxy = await deployer.deploy(Proxy, {}, walletImplementation.contractAddress); - const existingWallet = deployer.wrapDeployedContract(BaseWallet, proxy.contractAddress); + const proxy = await Proxy.new(walletImplementation.address); + const existingWallet = await BaseWallet.at(proxy.address); - await existingWallet.init(owner, [previousTransferManager.contractAddress]); + await existingWallet.init(owner, [previousTransferManager.address]); await existingWallet.send(ethers.BigNumber.from("100000000")); // change the limit - await previousTransferManager.from(owner).changeLimit(existingWallet.contractAddress, 4000000); + await previousTransferManager.from(owner).changeLimit(existingWallet.address, 4000000); await manager.increaseTime(SECURITY_PERIOD + 1); - let limit = await previousTransferManager.getCurrentLimit(existingWallet.contractAddress); + let limit = await previousTransferManager.getCurrentLimit(existingWallet.address); assert.equal(limit.toNumber(), 4000000, "limit should be changed"); // transfer some funds - await previousTransferManager.from(owner).transferToken(existingWallet.contractAddress, ETH_TOKEN, recipient, 1000000, ZERO_BYTES32); + await previousTransferManager.from(owner).transferToken(existingWallet.address, ETH_TOKEN, recipient, 1000000, ZERO_BYTES32); // add new module - await previousTransferManager.from(owner).addModule(existingWallet.contractAddress, versionManager.contractAddress); - const tx = await versionManager.from(owner).upgradeWallet(existingWallet.contractAddress, await versionManager.lastVersion()); + await previousTransferManager.from(owner).addModule(existingWallet.address, versionManager.address); + const tx = await versionManager.from(owner).upgradeWallet(existingWallet.address, await versionManager.lastVersion()); const txReceipt = await previousTransferManager.verboseWaitForTransaction(tx); assert.isTrue(utils.hasEvent(txReceipt, transferManager, "DailyLimitMigrated")); // check result - limit = await transferManager.getCurrentLimit(existingWallet.contractAddress); + limit = await transferManager.getCurrentLimit(existingWallet.address); assert.equal(limit.toNumber(), 4000000, "limit should have been migrated"); - const unspent = await transferManager.getDailyUnspent(existingWallet.contractAddress); + const unspent = await transferManager.getDailyUnspent(existingWallet.address); assert.equal(unspent[0].toNumber(), 4000000 - 1000000, "unspent should have been migrated"); }); it("should set the default limit for new wallets", async () => { - const limit = await transferManager.getCurrentLimit(wallet.contractAddress); + const limit = await transferManager.getCurrentLimit(wallet.address); assert.equal(limit.toNumber(), ETH_LIMIT, "limit should be ETH_LIMIT"); }); it("should only increase the limit after the security period", async () => { - await transferManager.from(owner).changeLimit(wallet.contractAddress, 4000000); - let limit = await transferManager.getCurrentLimit(wallet.contractAddress); + await transferManager.from(owner).changeLimit(wallet.address, 4000000); + let limit = await transferManager.getCurrentLimit(wallet.address); assert.equal(limit.toNumber(), ETH_LIMIT, "limit should be ETH_LIMIT"); await manager.increaseTime(SECURITY_PERIOD + 1); - limit = await transferManager.getCurrentLimit(wallet.contractAddress); + limit = await transferManager.getCurrentLimit(wallet.address); assert.equal(limit.toNumber(), 4000000, "limit should be changed"); }); it("should decrease the limit immediately", async () => { - let limit = await transferManager.getCurrentLimit(wallet.contractAddress); + let limit = await transferManager.getCurrentLimit(wallet.address); assert.equal(limit.toNumber(), ETH_LIMIT, "limit should be ETH_LIMIT"); - await transferManager.from(owner).changeLimit(wallet.contractAddress, ETH_LIMIT / 2); - limit = await transferManager.getCurrentLimit(wallet.contractAddress); + await transferManager.from(owner).changeLimit(wallet.address, ETH_LIMIT / 2); + limit = await transferManager.getCurrentLimit(wallet.address); assert.equal(limit.toNumber(), ETH_LIMIT / 2, "limit should be decreased immediately"); }); it("should change the limit via relayed transaction", async () => { - await manager.relay(transferManager, "changeLimit", [wallet.contractAddress, 4000000], wallet, [owner]); + await manager.relay(transferManager, "changeLimit", [wallet.address, 4000000], wallet, [owner]); await manager.increaseTime(SECURITY_PERIOD + 1); - const limit = await transferManager.getCurrentLimit(wallet.contractAddress); + const limit = await transferManager.getCurrentLimit(wallet.address); assert.equal(limit.toNumber(), 4000000, "limit should be changed"); }); it("should correctly set the pending limit", async () => { - const tx = await transferManager.from(owner).changeLimit(wallet.contractAddress, 4000000); + const tx = await transferManager.from(owner).changeLimit(wallet.address, 4000000); const txReceipt = await transferManager.verboseWaitForTransaction(tx); const timestamp = await manager.getTimestamp(txReceipt.block); - const { _pendingLimit, _changeAfter } = await transferManager.getPendingLimit(wallet.contractAddress); + const { _pendingLimit, _changeAfter } = await transferManager.getPendingLimit(wallet.address); assert.equal(_pendingLimit.toNumber(), 4000000); assert.closeTo(_changeAfter.toNumber(), timestamp + SECURITY_PERIOD, 1); // timestamp is sometimes off by 1 }); it("should be able to disable the limit", async () => { - const tx = await transferManager.from(owner).disableLimit(wallet.contractAddress); + const tx = await transferManager.from(owner).disableLimit(wallet.address); const txReceipt = await transferManager.verboseWaitForTransaction(tx); assert.isTrue(utils.hasEvent(txReceipt, transferManager, "DailyLimitDisabled")); - let limitDisabled = await transferManager.isLimitDisabled(wallet.contractAddress); + let limitDisabled = await transferManager.isLimitDisabled(wallet.address); assert.isFalse(limitDisabled); await manager.increaseTime(SECURITY_PERIOD + 1); - limitDisabled = await transferManager.isLimitDisabled(wallet.contractAddress); + limitDisabled = await transferManager.isLimitDisabled(wallet.address); assert.isTrue(limitDisabled); }); it("should return the correct unspent daily limit amount", async () => { await wallet.send(ethers.BigNumber.from(ETH_LIMIT)); const transferAmount = ETH_LIMIT - 100; - await transferManager.from(owner).transferToken(wallet.contractAddress, ETH_TOKEN, recipient, transferAmount, ZERO_BYTES32); - const { _unspent } = await transferManager.getDailyUnspent(wallet.contractAddress); + await transferManager.from(owner).transferToken(wallet.address, ETH_TOKEN, recipient, transferAmount, ZERO_BYTES32); + const { _unspent } = await transferManager.getDailyUnspent(wallet.address); assert.equal(_unspent.toNumber(), 100); }); it("should return the correct spent daily limit amount", async () => { await wallet.send(ethers.BigNumber.from(ETH_LIMIT)); // Transfer 100 wei - const tx = await transferManager.from(owner).transferToken(wallet.contractAddress, ETH_TOKEN, recipient, 100, ZERO_BYTES32); + const tx = await transferManager.from(owner).transferToken(wallet.address, ETH_TOKEN, recipient, 100, ZERO_BYTES32); const txReceipt = await transferManager.verboseWaitForTransaction(tx); const timestamp = await manager.getTimestamp(txReceipt.block); // Then transfer 200 wei more - await transferManager.from(owner).transferToken(wallet.contractAddress, ETH_TOKEN, recipient, 200, ZERO_BYTES32); + await transferManager.from(owner).transferToken(wallet.address, ETH_TOKEN, recipient, 200, ZERO_BYTES32); - const dailySpent = await limitStorage.getDailySpent(wallet.contractAddress); + const dailySpent = await limitStorage.getDailySpent(wallet.address); assert.equal(dailySpent[0].toNumber(), 300); assert.closeTo(dailySpent[1].toNumber(), timestamp + (3600 * 24), 1); // timestamp is sometimes off by 1 }); it("should return 0 if the entire daily limit amount has been spent", async () => { - await infrastructure.sendTransaction({ to: wallet.contractAddress, value: ethers.BigNumber.from(ETH_LIMIT) }); - await transferManager.from(owner).transferToken(wallet.contractAddress, ETH_TOKEN, recipient, ETH_LIMIT, ZERO_BYTES32); - const { _unspent } = await transferManager.getDailyUnspent(wallet.contractAddress); + await infrastructure.sendTransaction({ to: wallet.address, value: ethers.BigNumber.from(ETH_LIMIT) }); + await transferManager.from(owner).transferToken(wallet.address, ETH_TOKEN, recipient, ETH_LIMIT, ZERO_BYTES32); + const { _unspent } = await transferManager.getDailyUnspent(wallet.address); assert.equal(_unspent.toNumber(), 0); }); }); @@ -378,8 +378,8 @@ contract("TransferManager", (accounts) => { token, signer = owner, to, amount, relayed = false, }) { const fundsBefore = (token === ETH_TOKEN ? await deployer.provider.getBalance(to) : await token.balanceOf(to)); - const unspentBefore = await transferManager.getDailyUnspent(wallet.contractAddress); - const params = [wallet.contractAddress, token === ETH_TOKEN ? ETH_TOKEN : token.contractAddress, to, amount, ZERO_BYTES32]; + const unspentBefore = await transferManager.getDailyUnspent(wallet.address); + const params = [wallet.address, token === ETH_TOKEN ? ETH_TOKEN : token.address, to, amount, ZERO_BYTES32]; let txReceipt; if (relayed) { txReceipt = await manager.relay(transferManager, "transferToken", params, wallet, [signer]); @@ -389,9 +389,9 @@ contract("TransferManager", (accounts) => { } assert.isTrue(await utils.hasEvent(txReceipt, transferManager, "Transfer"), "should have generated Transfer event"); const fundsAfter = (token === ETH_TOKEN ? await deployer.provider.getBalance(to) : await token.balanceOf(to)); - const unspentAfter = await transferManager.getDailyUnspent(wallet.contractAddress); + const unspentAfter = await transferManager.getDailyUnspent(wallet.address); assert.equal(fundsAfter.sub(fundsBefore).toNumber(), amount, "should have transfered amount"); - const ethValue = (token === ETH_TOKEN ? amount : (await getEtherValue(amount, token.contractAddress)).toNumber()); + const ethValue = (token === ETH_TOKEN ? amount : (await getEtherValue(amount, token.address)).toNumber()); if (ethValue < ETH_LIMIT) { assert.equal(unspentBefore[0].sub(unspentAfter[0]).toNumber(), ethValue, "should have updated the daily spent in ETH"); } @@ -401,9 +401,9 @@ contract("TransferManager", (accounts) => { async function doPendingTransfer({ token, to, amount, delay, relayed = false, }) { - const tokenAddress = token === ETH_TOKEN ? ETH_TOKEN : token.contractAddress; + const tokenAddress = token === ETH_TOKEN ? ETH_TOKEN : token.address; const fundsBefore = (token === ETH_TOKEN ? await deployer.provider.getBalance(to) : await token.balanceOf(to)); - const params = [wallet.contractAddress, tokenAddress, to, amount, ZERO_BYTES32]; + const params = [wallet.address, tokenAddress, to, amount, ZERO_BYTES32]; let txReceipt; let tx; if (relayed) { @@ -421,7 +421,7 @@ contract("TransferManager", (accounts) => { return id; } await manager.increaseTime(delay); - tx = await transferManager.executePendingTransfer(wallet.contractAddress, + tx = await transferManager.executePendingTransfer(wallet.address, tokenAddress, recipient, amount, ZERO_BYTES32, txReceipt.blockNumber); txReceipt = await transferManager.verboseWaitForTransaction(tx); assert.isTrue(await utils.hasEvent(txReceipt, transferManager, "PendingTransferExecuted"), @@ -463,19 +463,19 @@ contract("TransferManager", (accounts) => { }); it("should calculate the daily unspent when the owner send ETH", async () => { - let unspent = await transferManager.getDailyUnspent(wallet.contractAddress); + let unspent = await transferManager.getDailyUnspent(wallet.address); assert.equal(unspent[0].toNumber(), ETH_LIMIT, "unspent should be the limit at the beginning of a period"); await doDirectTransfer({ token: ETH_TOKEN, to: recipient, amount: 10000 }); - unspent = await transferManager.getDailyUnspent(wallet.contractAddress); + unspent = await transferManager.getDailyUnspent(wallet.address); assert.equal(unspent[0].toNumber(), ETH_LIMIT - 10000, "should be the limit minus the transfer"); }); it("should calculate the daily unspent in ETH when the owner send ERC20", async () => { - let unspent = await transferManager.getDailyUnspent(wallet.contractAddress); + let unspent = await transferManager.getDailyUnspent(wallet.address); assert.equal(unspent[0].toNumber(), ETH_LIMIT, "unspent should be the limit at the beginning of a period"); await doDirectTransfer({ token: erc20, to: recipient, amount: 10 }); - unspent = await transferManager.getDailyUnspent(wallet.contractAddress); - const ethValue = await getEtherValue(10, erc20.contractAddress); + unspent = await transferManager.getDailyUnspent(wallet.address); + const ethValue = await getEtherValue(10, erc20.address); assert.equal(unspent[0].toNumber(), ETH_LIMIT - ethValue.toNumber(), "should be the limit minus the transfer"); }); }); @@ -550,11 +550,11 @@ contract("TransferManager", (accounts) => { token: ETH_TOKEN, to: recipient, amount: ETH_LIMIT * 2, delay: 0, }); await manager.increaseTime(1); - const tx = await transferManager.from(owner).cancelPendingTransfer(wallet.contractAddress, id); + const tx = await transferManager.from(owner).cancelPendingTransfer(wallet.address, id); const txReceipt = await transferManager.verboseWaitForTransaction(tx); assert.isTrue(await utils.hasEvent(txReceipt, transferManager, "PendingTransferCanceled"), "should have generated PendingTransferCanceled event"); - const executeAfter = await transferManager.getPendingTransfer(wallet.contractAddress, id); + const executeAfter = await transferManager.getPendingTransfer(wallet.address, id); assert.equal(executeAfter, 0, "should have cancelled the pending transfer"); }); @@ -563,22 +563,22 @@ contract("TransferManager", (accounts) => { token: erc20, to: recipient, amount: ETH_LIMIT * 2, delay: 0, }); await manager.increaseTime(1); - const tx = await transferManager.from(owner).cancelPendingTransfer(wallet.contractAddress, id); + const tx = await transferManager.from(owner).cancelPendingTransfer(wallet.address, id); const txReceipt = await transferManager.verboseWaitForTransaction(tx); assert.isTrue(await utils.hasEvent(txReceipt, transferManager, "PendingTransferCanceled"), "should have generated PendingTransferCanceled event"); - const executeAfter = await transferManager.getPendingTransfer(wallet.contractAddress, id); + const executeAfter = await transferManager.getPendingTransfer(wallet.address, id); assert.equal(executeAfter, 0, "should have cancelled the pending transfer"); }); it("should send immediately ETH to a whitelisted address", async () => { - await transferManager.from(owner).addToWhitelist(wallet.contractAddress, recipient); + await transferManager.from(owner).addToWhitelist(wallet.address, recipient); await manager.increaseTime(3); await doDirectTransfer({ token: ETH_TOKEN, to: recipient, amount: ETH_LIMIT * 2 }); }); it("should send immediately ERC20 to a whitelisted address", async () => { - await transferManager.from(owner).addToWhitelist(wallet.contractAddress, recipient); + await transferManager.from(owner).addToWhitelist(wallet.address, recipient); await manager.increaseTime(3); await doDirectTransfer({ token: erc20, to: recipient, amount: ETH_LIMIT * 2 }); }); @@ -587,8 +587,8 @@ contract("TransferManager", (accounts) => { describe("Token Approvals", () => { async function doDirectApprove({ signer = owner, amount, relayed = false }) { - const unspentBefore = await transferManager.getDailyUnspent(wallet.contractAddress); - const params = [wallet.contractAddress, erc20.contractAddress, spender, amount]; + const unspentBefore = await transferManager.getDailyUnspent(wallet.address); + const params = [wallet.address, erc20.address, spender, amount]; let txReceipt; if (relayed) { txReceipt = await manager.relay(transferManager, "approveToken", params, wallet, [signer]); @@ -597,13 +597,13 @@ contract("TransferManager", (accounts) => { txReceipt = await transferManager.verboseWaitForTransaction(tx); } assert.isTrue(await utils.hasEvent(txReceipt, transferManager, "Approved"), "should have generated Approved event"); - const unspentAfter = await transferManager.getDailyUnspent(wallet.contractAddress); + const unspentAfter = await transferManager.getDailyUnspent(wallet.address); - const amountInEth = await getEtherValue(amount, erc20.contractAddress); + const amountInEth = await getEtherValue(amount, erc20.address); if (amountInEth < ETH_LIMIT) { assert.equal(unspentBefore[0].sub(unspentAfter[0]).toNumber(), amountInEth, "should have updated the daily limit"); } - const approval = await erc20.allowance(wallet.contractAddress, spender); + const approval = await erc20.allowance(wallet.address, spender); assert.equal(approval.toNumber(), amount, "should have approved the amount"); return txReceipt; @@ -619,8 +619,8 @@ contract("TransferManager", (accounts) => { it("should approve an ERC20 immediately when the amount is under the existing approved amount", async () => { await doDirectApprove({ amount: 100 }); - await transferManager.from(owner).approveToken(wallet.contractAddress, erc20.contractAddress, spender, 10); - const approval = await erc20.allowance(wallet.contractAddress, spender); + await transferManager.from(owner).approveToken(wallet.address, erc20.address, spender, 10); + const approval = await erc20.allowance(wallet.address, spender); assert.equal(approval.toNumber(), 10); }); @@ -634,7 +634,7 @@ contract("TransferManager", (accounts) => { }); it("should approve an ERC20 immediately when the spender is whitelisted ", async () => { - await transferManager.from(owner).addToWhitelist(wallet.contractAddress, spender); + await transferManager.from(owner).addToWhitelist(wallet.address, spender); await manager.increaseTime(3); await doDirectApprove({ amount: ETH_LIMIT + 10000 }); }); @@ -652,14 +652,14 @@ contract("TransferManager", (accounts) => { let contract; beforeEach(async () => { - contract = await deployer.deploy(TestContract); + contract = await TestContract.new(); assert.equal(await contract.state(), 0, "initial contract state should be 0"); }); async function doCallContract({ value, state, relayed = false }) { const dataToTransfer = contract.contract.interface.functions.setState.encode([state]); - const unspentBefore = await transferManager.getDailyUnspent(wallet.contractAddress); - const params = [wallet.contractAddress, contract.contractAddress, value, dataToTransfer]; + const unspentBefore = await transferManager.getDailyUnspent(wallet.address); + const params = [wallet.address, contract.address, value, dataToTransfer]; let txReceipt; if (relayed) { txReceipt = await manager.relay(transferManager, "callContract", params, wallet, [owner]); @@ -668,7 +668,7 @@ contract("TransferManager", (accounts) => { txReceipt = await transferManager.verboseWaitForTransaction(tx); } assert.isTrue(await utils.hasEvent(txReceipt, transferManager, "CalledContract"), "should have generated CalledContract event"); - const unspentAfter = await transferManager.getDailyUnspent(wallet.contractAddress); + const unspentAfter = await transferManager.getDailyUnspent(wallet.address); if (value < ETH_LIMIT) { assert.equal(unspentBefore[0].sub(unspentAfter[0]).toNumber(), value, "should have updated the daily limit"); } @@ -678,27 +678,27 @@ contract("TransferManager", (accounts) => { it("should not be able to call the wallet itselt", async () => { const dataToTransfer = contract.contract.interface.functions.setState.encode([4]); - const params = [wallet.contractAddress, wallet.contractAddress, 10, dataToTransfer]; + const params = [wallet.address, wallet.address, 10, dataToTransfer]; await assert.revertWith(transferManager.from(owner).callContract(...params), "BT: Forbidden contract"); }); it("should not be able to call a feature of the wallet", async () => { const dataToTransfer = contract.contract.interface.functions.setState.encode([4]); - const params = [wallet.contractAddress, transferManager.contractAddress, 10, dataToTransfer]; + const params = [wallet.address, transferManager.address, 10, dataToTransfer]; await assert.revertWith(transferManager.from(owner).callContract(...params), "BT: Forbidden contract"); }); it("should not be able to call a supported ERC20 token contract", async () => { const dataToTransfer = contract.contract.interface.functions.setState.encode([4]); - const params = [wallet.contractAddress, erc20.contractAddress, 10, dataToTransfer]; + const params = [wallet.address, erc20.address, 10, dataToTransfer]; await assert.revertWith(transferManager.from(owner).callContract(...params), "TM: Forbidden contract"); }); it("should be able to call a supported token contract which is whitelisted", async () => { - await transferManager.from(owner).addToWhitelist(wallet.contractAddress, erc20.contractAddress); + await transferManager.from(owner).addToWhitelist(wallet.address, erc20.address); await manager.increaseTime(3); const dataToTransfer = erc20.contract.interface.functions.transfer.encode([infrastructure, 4]); - const params = [wallet.contractAddress, erc20.contractAddress, 0, dataToTransfer]; + const params = [wallet.address, erc20.address, 0, dataToTransfer]; await transferManager.from(owner).callContract(...params); }); @@ -711,7 +711,7 @@ contract("TransferManager", (accounts) => { }); it("should call a contract and transfer ETH value above the daily limit when the contract is whitelisted", async () => { - await transferManager.from(owner).addToWhitelist(wallet.contractAddress, contract.contractAddress); + await transferManager.from(owner).addToWhitelist(wallet.address, contract.address); await manager.increaseTime(3); await doCallContract({ value: ETH_LIMIT + 10000, state: 6 }); }); @@ -725,20 +725,20 @@ contract("TransferManager", (accounts) => { let contract; beforeEach(async () => { - contract = await deployer.deploy(TestContract); + contract = await TestContract.new(); assert.equal(await contract.state(), 0, "initial contract state should be 0"); }); async function doApproveTokenAndCallContract({ - signer = owner, consumer = contract.contractAddress, amount, state, relayed = false, wrapEth = false, + signer = owner, consumer = contract.address, amount, state, relayed = false, wrapEth = false, }) { - const fun = consumer === contract.contractAddress ? "setStateAndPayToken" : "setStateAndPayTokenWithConsumer"; + const fun = consumer === contract.address ? "setStateAndPayToken" : "setStateAndPayTokenWithConsumer"; const token = wrapEth ? weth : erc20; - const dataToTransfer = contract.contract.interface.functions[fun].encode([state, token.contractAddress, amount]); - const unspentBefore = await transferManager.getDailyUnspent(wallet.contractAddress); - const params = [wallet.contractAddress] - .concat(wrapEth ? [] : [erc20.contractAddress]) - .concat([consumer, amount, contract.contractAddress, dataToTransfer]); + const dataToTransfer = contract.contract.interface.functions[fun].encode([state, token.address, amount]); + const unspentBefore = await transferManager.getDailyUnspent(wallet.address); + const params = [wallet.address] + .concat(wrapEth ? [] : [erc20.address]) + .concat([consumer, amount, contract.address, dataToTransfer]); const method = wrapEth ? "approveWethAndCallContract" : "approveTokenAndCallContract"; let txReceipt; if (relayed) { @@ -748,14 +748,14 @@ contract("TransferManager", (accounts) => { txReceipt = await transferManager.verboseWaitForTransaction(tx); } assert.isTrue(await utils.hasEvent(txReceipt, transferManager, "ApprovedAndCalledContract"), "should have generated CalledContract event"); - const unspentAfter = await transferManager.getDailyUnspent(wallet.contractAddress); - const amountInEth = wrapEth ? amount : await getEtherValue(amount, erc20.contractAddress); + const unspentAfter = await transferManager.getDailyUnspent(wallet.address); + const amountInEth = wrapEth ? amount : await getEtherValue(amount, erc20.address); if (amountInEth < ETH_LIMIT) { assert.equal(unspentBefore[0].sub(unspentAfter[0]).toNumber(), amountInEth, "should have updated the daily limit"); } assert.equal((await contract.state()).toNumber(), state, "the state of the external contract should have been changed"); - const tokenBalance = await token.balanceOf(contract.contractAddress); + const tokenBalance = await token.balanceOf(contract.address); assert.equal(tokenBalance.toNumber(), amount, "the contract should have transfered the tokens"); return txReceipt; } @@ -771,59 +771,59 @@ contract("TransferManager", (accounts) => { }); it("should restore existing approved amount after call", async () => { - await transferManager.from(owner).approveToken(wallet.contractAddress, erc20.contractAddress, contract.contractAddress, 10); - const dataToTransfer = contract.contract.interface.functions.setStateAndPayToken.encode([3, erc20.contractAddress, 5]); + await transferManager.from(owner).approveToken(wallet.address, erc20.address, contract.address, 10); + const dataToTransfer = contract.contract.interface.functions.setStateAndPayToken.encode([3, erc20.address, 5]); await transferManager.from(owner).approveTokenAndCallContract( - wallet.contractAddress, - erc20.contractAddress, - contract.contractAddress, + wallet.address, + erc20.address, + contract.address, 5, - contract.contractAddress, + contract.address, dataToTransfer, ); - const approval = await erc20.allowance(wallet.contractAddress, contract.contractAddress); + const approval = await erc20.allowance(wallet.address, contract.address); // Initial approval of 10 is restored, after approving and spending 5 assert.equal(approval.toNumber(), 10); - const erc20Balance = await erc20.balanceOf(contract.contractAddress); + const erc20Balance = await erc20.balanceOf(contract.address); assert.equal(erc20Balance.toNumber(), 5, "the contract should have transfered the tokens"); }); it("should be able to spend less than approved in call", async () => { - await transferManager.from(owner).approveToken(wallet.contractAddress, erc20.contractAddress, contract.contractAddress, 10); - const dataToTransfer = contract.contract.interface.functions.setStateAndPayToken.encode([3, erc20.contractAddress, 4]); + await transferManager.from(owner).approveToken(wallet.address, erc20.address, contract.address, 10); + const dataToTransfer = contract.contract.interface.functions.setStateAndPayToken.encode([3, erc20.address, 4]); await transferManager.from(owner).approveTokenAndCallContract( - wallet.contractAddress, - erc20.contractAddress, - contract.contractAddress, + wallet.address, + erc20.address, + contract.address, 5, - contract.contractAddress, + contract.address, dataToTransfer, ); - const approval = await erc20.allowance(wallet.contractAddress, contract.contractAddress); + const approval = await erc20.allowance(wallet.address, contract.address); // Initial approval of 10 is restored, after approving and spending 4 assert.equal(approval.toNumber(), 10); - const erc20Balance = await erc20.balanceOf(contract.contractAddress); + const erc20Balance = await erc20.balanceOf(contract.address); assert.equal(erc20Balance.toNumber(), 4, "the contract should have transfered the tokens"); }); it("should not be able to spend more than approved in call", async () => { - await transferManager.from(owner).approveToken(wallet.contractAddress, erc20.contractAddress, contract.contractAddress, 10); - const dataToTransfer = contract.contract.interface.functions.setStateAndPayToken.encode([3, erc20.contractAddress, 6]); + await transferManager.from(owner).approveToken(wallet.address, erc20.address, contract.address, 10); + const dataToTransfer = contract.contract.interface.functions.setStateAndPayToken.encode([3, erc20.address, 6]); await assert.revertWith(transferManager.from(owner).approveTokenAndCallContract( - wallet.contractAddress, - erc20.contractAddress, - contract.contractAddress, + wallet.address, + erc20.address, + contract.address, 5, - contract.contractAddress, + contract.address, dataToTransfer, ), "BT: insufficient amount for call"); }); it("should approve the token and call the contract when the token is above the limit and the contract is whitelisted ", async () => { - await transferManager.from(owner).addToWhitelist(wallet.contractAddress, contract.contractAddress); + await transferManager.from(owner).addToWhitelist(wallet.address, contract.address); await manager.increaseTime(3); await doApproveTokenAndCallContract({ amount: ETH_LIMIT + 10000, state: 6 }); }); @@ -835,7 +835,7 @@ contract("TransferManager", (accounts) => { it("should approve token and call contract when contract != spender, amount > limit and contract is whitelisted", async () => { const consumer = await contract.tokenConsumer(); - await transferManager.from(owner).addToWhitelist(wallet.contractAddress, contract.contractAddress); + await transferManager.from(owner).addToWhitelist(wallet.address, contract.address); await manager.increaseTime(3); await doApproveTokenAndCallContract({ amount: ETH_LIMIT + 10000, state: 6, consumer }); }); @@ -843,12 +843,12 @@ contract("TransferManager", (accounts) => { it("should fail to approve token and call contract when contract != spender, amount > limit and spender is whitelisted", async () => { const amount = ETH_LIMIT + 10000; const consumer = await contract.tokenConsumer(); - await transferManager.from(owner).addToWhitelist(wallet.contractAddress, consumer); + await transferManager.from(owner).addToWhitelist(wallet.address, consumer); await manager.increaseTime(3); - const dataToTransfer = contract.contract.interface.functions.setStateAndPayTokenWithConsumer.encode([6, erc20.contractAddress, amount]); + const dataToTransfer = contract.contract.interface.functions.setStateAndPayTokenWithConsumer.encode([6, erc20.address, amount]); await assert.revertWith( transferManager.from(owner).approveTokenAndCallContract( - wallet.contractAddress, erc20.contractAddress, consumer, amount, contract.contractAddress, dataToTransfer, + wallet.address, erc20.address, consumer, amount, contract.address, dataToTransfer, ), "TM: Approve above daily limit", ); @@ -863,15 +863,15 @@ contract("TransferManager", (accounts) => { }); it("should fail to approve token if the amount to be approved is greater than the current balance", async () => { - const startingBalance = await erc20.balanceOf(wallet.contractAddress); - await erc20.burn(wallet.contractAddress, startingBalance); - const dataToTransfer = contract.contract.interface.functions.setStateAndPayToken.encode([3, erc20.contractAddress, 1]); + const startingBalance = await erc20.balanceOf(wallet.address); + await erc20.burn(wallet.address, startingBalance); + const dataToTransfer = contract.contract.interface.functions.setStateAndPayToken.encode([3, erc20.address, 1]); await assert.revertWith(transferManager.from(owner).approveTokenAndCallContract( - wallet.contractAddress, - erc20.contractAddress, - contract.contractAddress, + wallet.address, + erc20.address, + contract.address, 1, - contract.contractAddress, + contract.address, dataToTransfer, ), "BT: insufficient balance"); }); @@ -885,7 +885,7 @@ contract("TransferManager", (accounts) => { it("should approve WETH and call the contract under the limit when already holding the WETH", async () => { const amount = 10; await weth.from(infrastructure).deposit({ value: amount }); - await weth.from(infrastructure).transfer(wallet.contractAddress, amount); + await weth.from(infrastructure).transfer(wallet.address, amount); await doApproveTokenAndCallContract({ amount, state: 3, wrapEth: true }); }); }); diff --git a/utils/abi-uploader.js b/utils/abi-uploader.js index f87a29da4..e1aa968f3 100644 --- a/utils/abi-uploader.js +++ b/utils/abi-uploader.js @@ -13,7 +13,7 @@ class ABIUploaderS3 { async upload(contractWrapper, folder) { const { contractName } = contractWrapper._contract; - const filename = contractWrapper.contractAddress; + const filename = contractWrapper.address; console.log(`Uploading ${contractName} ABI to AWS...`); diff --git a/utils/defi-deployer.js b/utils/defi-deployer.js index aa3a739a9..d120bacd5 100644 --- a/utils/defi-deployer.js +++ b/utils/defi-deployer.js @@ -37,49 +37,49 @@ module.exports = { ETH_PER_MKR, ETH_PER_DAI, - deployUniswap: async (deployer, manager, infrastructure, tokens = [], ethPerToken = [], ethLiquidity = parseEther("10")) => { - const uniswapFactory = await deployer.deploy(UniswapFactory); - const uniswapTemplateExchange = await deployer.deploy(UniswapExchange); - await uniswapFactory.initializeFactory(uniswapTemplateExchange.contractAddress); + deployUniswap: async (manager, infrastructure, tokens = [], ethPerToken = [], ethLiquidity = parseEther("10")) => { + const uniswapFactory = await UniswapFactory.new(); + const uniswapTemplateExchange = await UniswapExchange.new(); + await uniswapFactory.initializeFactory(uniswapTemplateExchange.address); for (let i = 0; i < tokens.length; i += 1) { const token = tokens[i]; - await uniswapFactory.from(infrastructure).createExchange(token.contractAddress); - const tokenExchange = await etherlime.ContractAt(UniswapExchange, await uniswapFactory.getExchange(token.contractAddress)); + await uniswapFactory.from(infrastructure).createExchange(token.address); + const tokenExchange = await etherlime.ContractAt(UniswapExchange, await uniswapFactory.getExchange(token.address)); const tokenLiquidity = ethLiquidity.mul(WAD).div(ethPerToken[i]); await token["mint(address,uint256)"](infrastructure, tokenLiquidity); - await token.from(infrastructure).approve(tokenExchange.contractAddress, tokenLiquidity); + await token.from(infrastructure).approve(tokenExchange.address, tokenLiquidity); const timestamp = await manager.getTimestamp(await manager.getCurrentBlock()); await tokenExchange.from(infrastructure).addLiquidity(1, tokenLiquidity, timestamp + 300, { value: ethLiquidity, gasLimit: 150000 }); } return { uniswapFactory }; }, - deployMaker: async (deployer, infrastructure) => { + deployMaker: async (infrastructure) => { // // Deploy and setup SCD // - const sai = await deployer.deploy(DSToken, {}, formatBytes32String("SAI")); - const dai = await deployer.deploy(Dai, {}, 42); - const gov = await deployer.deploy(DSToken, {}, formatBytes32String("MKR")); - const weth = await deployer.deploy(WETH); - const vox = await deployer.deploy(Vox, {}, USD_PER_DAI); - const sin = await deployer.deploy(DSToken, {}, formatBytes32String("SIN")); - const skr = await deployer.deploy(DSToken, {}, formatBytes32String("PETH")); - const pip = await deployer.deploy(DSValue); - const pep = await deployer.deploy(DSValue); - const tub = await deployer.deploy(Tub, {}, - sai.contractAddress, - sin.contractAddress, - skr.contractAddress, - weth.contractAddress, - gov.contractAddress, - pip.contractAddress, - pep.contractAddress, - vox.contractAddress, + const sai = await DSToken.new(formatBytes32String("SAI")); + const dai = await Dai.new(42); + const gov = await DSToken.new(formatBytes32String("MKR")); + const weth = await WETH.new(); + const vox = await Vox.new(USD_PER_DAI); + const sin = await DSToken.new(formatBytes32String("SIN")); + const skr = await DSToken.new(formatBytes32String("PETH")); + const pip = await DSValue.new(); + const pep = await DSValue.new(); + const tub = await Tub.new( + sai.address, + sin.address, + skr.address, + weth.address, + gov.address, + pip.address, + pep.address, + vox.address, infrastructure); // Let the Tub mint PETH and DAI - await skr.setOwner(tub.contractAddress); - await sai.setOwner(tub.contractAddress); + await skr.setOwner(tub.address); + await sai.setOwner(tub.address); // Setup USD/ETH oracle with a convertion rate of 100 USD/ETH await pip.poke(`0x${USD_PER_ETH.toHexString().slice(2).padStart(64, "0")}`); // Setup USD/MKR oracle with a convertion rate of 400 USD/MKR @@ -96,19 +96,19 @@ module.exports = { // // Vat setup - const vat = await deployer.deploy(Vat); + const vat = await Vat.new(); // Setting the debt ceiling await vat["file(bytes32,uint256)"](formatBytes32String("Line"), "138000000000000000000000000000000000000000000000000000"); - const cdpManager = await deployer.deploy(CdpManager, {}, vat.contractAddress); + const cdpManager = await CdpManager.new(vat.address); // Pot setup - const pot = await deployer.deploy(Pot, {}, vat.contractAddress); - await vat.rely(pot.contractAddress); + const pot = await Pot.new(vat.address); + await vat.rely(pot.address); // Jug setup - const jug = await deployer.deploy(Jug, {}, vat.contractAddress); - await vat.rely(jug.contractAddress); + const jug = await Jug.new(vat.address); + await vat.rely(jug.address); // SAI collateral setup const saiIlk = formatBytes32String("SAI"); @@ -117,8 +117,8 @@ module.exports = { await vat.file(saiIlk, formatBytes32String("spot"), "100000000000000000000000000000000000000000000000000"); await vat.file(saiIlk, formatBytes32String("line"), "100000000000000000000000000000000000000000000000000000"); await vat.file(saiIlk, formatBytes32String("dust"), "0"); - const saiJoin = await deployer.deploy(GemJoin, {}, vat.contractAddress, saiIlk, sai.contractAddress); - await vat.rely(saiJoin.contractAddress); + const saiJoin = await GemJoin.new(vat.address, saiIlk, sai.address); + await vat.rely(saiJoin.address); // WETH collateral setup const wethIlk = formatBytes32String("ETH-A"); @@ -127,41 +127,39 @@ module.exports = { await vat.file(wethIlk, formatBytes32String("spot"), "88050000000000000000000000000"); await vat.file(wethIlk, formatBytes32String("line"), "50000000000000000000000000000000000000000000000000000"); await vat.file(wethIlk, formatBytes32String("dust"), "20000000000000000000000000000000000000000000000"); - const wethJoin = await deployer.deploy(GemJoin, {}, vat.contractAddress, wethIlk, weth.contractAddress); - await vat.rely(wethJoin.contractAddress); + const wethJoin = await GemJoin.new(vat.address, wethIlk, weth.address); + await vat.rely(wethJoin.address); // BAT collateral setup - const bat = await deployer.deploy(DSToken, {}, formatBytes32String("BAT")); + const bat = await DSToken.new(formatBytes32String("BAT")); const batIlk = formatBytes32String("BAT-A"); await jug.init(batIlk); await vat.init(batIlk); await vat.file(batIlk, formatBytes32String("spot"), "88050000000000000000000000000"); await vat.file(batIlk, formatBytes32String("line"), "50000000000000000000000000000000000000000000000000000"); await vat.file(batIlk, formatBytes32String("dust"), "20000000000000000000000000000000000000000000000"); - const batJoin = await deployer.deploy(GemJoin, {}, vat.contractAddress, batIlk, bat.contractAddress); - await vat.rely(batJoin.contractAddress); + const batJoin = await GemJoin.new(vat.address, batIlk, bat.address); + await vat.rely(batJoin.address); // DAI debt setup - const daiJoin = await deployer.deploy(DaiJoin, {}, vat.contractAddress, dai.contractAddress); + const daiJoin = await DaiJoin.new(vat.address, dai.address); // Allow daiJoin to mint DAI - await dai.rely(daiJoin.contractAddress); + await dai.rely(daiJoin.address); // Give daiJoin some internal DAI in the vat - await vat.suck(daiJoin.contractAddress, daiJoin.contractAddress, RAD.mul(1000000)); + await vat.suck(daiJoin.address, daiJoin.address, RAD.mul(1000000)); // Deploy and setup SCD to MCD Migration - const migration = await deployer.deploy( - ScdMcdMigration, - {}, - tub.contractAddress, - cdpManager.contractAddress, - saiJoin.contractAddress, - wethJoin.contractAddress, - daiJoin.contractAddress, + const migration = await ScdMcdMigration.new( + tub.address, + cdpManager.address, + saiJoin.address, + wethJoin.address, + daiJoin.address, ); // Setting up the common migration vault used by ScdMcdMigration const initialSaiAmountInMigrationVault = parseEther("1000"); await sai["mint(address,uint256)"](infrastructure, initialSaiAmountInMigrationVault); - await sai.from(infrastructure).approve(migration.contractAddress, initialSaiAmountInMigrationVault); + await sai.from(infrastructure).approve(migration.address, initialSaiAmountInMigrationVault); await migration.from(infrastructure).swapSaiToDai(initialSaiAmountInMigrationVault); return { diff --git a/utils/multisigexecutor.js b/utils/multisigexecutor.js index 341400f24..e628d540b 100644 --- a/utils/multisigexecutor.js +++ b/utils/multisigexecutor.js @@ -21,7 +21,7 @@ class MultisigExecutor { const nonce = (await this._multisigWrapper.contract.nonce()).toNumber(); // Get the sign Hash - const signHash = MultisigExecutor.signHash(this._multisigWrapper.contractAddress, contractAddress, 0, data, nonce); + const signHash = MultisigExecutor.signHash(this._multisigWrapper.address, contractAddress, 0, data, nonce); if (this._autoSign === true) { // Get the off chain signature @@ -43,7 +43,7 @@ class MultisigExecutor { console.log("******* MultisigExecutor *******"); console.log(`Signing data for transaction to ${contractWrapper._contract.contractName} located at ${contractAddress}:`); - console.log(`multisig: ${this._multisigWrapper.contractAddress}`); + console.log(`multisig: ${this._multisigWrapper.address}`); console.log(`to: ${contractAddress}`); console.log("value: 0"); console.log(`data: ${data}`); diff --git a/utils/test-manager.js b/utils/test-manager.js index 08a7d6456..ffe451145 100644 --- a/utils/test-manager.js +++ b/utils/test-manager.js @@ -60,8 +60,8 @@ class TestManager { const methodData = _module.contract.interface.functions[_method].encode(_params); const signatures = await signOffchain( _signers, - this.relayerManager.contractAddress, - _module.contractAddress, + this.relayerManager.address, + _module.address, 0, methodData, this.getChainId(), @@ -73,8 +73,8 @@ class TestManager { ); if (_estimate === true) { const gasUsed = await this.relayerManager.estimate.execute( - _wallet.contractAddress, - _module.contractAddress, + _wallet.address, + _module.address, methodData, nonce, signatures, @@ -87,8 +87,8 @@ class TestManager { return gasUsed; } const tx = await this.relayerManager.from(_relayer).execute( - _wallet.contractAddress, - _module.contractAddress, + _wallet.address, + _module.address, methodData, nonce, signatures, From 7dcc003a8bc88d6512d1395b02ddaa861b7f6b80 Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Thu, 13 Aug 2020 12:21:21 +0300 Subject: [PATCH 014/113] Fix linting issues including the removal of obsoleted testmanager and deployer instances --- package-lock.json | 21 --------------------- package.json | 1 - test/baseContracts.js | 9 --------- test/baseModule.js | 5 ----- test/compoundManager_invest.js | 10 ++++++---- test/ens.js | 5 ----- test/factory.js | 3 --- test/guardianManager.js | 2 -- test/lockManager.js | 2 -- test/makerV2Manager_invest.js | 5 +++++ test/makerV2Manager_loan.js | 3 ++- test/tokenExchanger.js | 3 ++- test/transferManager.js | 20 +++++++++++--------- utils/test-manager.js | 20 -------------------- 14 files changed, 26 insertions(+), 83 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9c762b117..8aee3f72e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3184,11 +3184,6 @@ "integrity": "sha512-KbS1Y0jMtyPgIxjO7ZzMAuUpAKMt1SzCL9fsrKsX6b0zJPTaT0SiSPmewwVZg9UAO83HVIlEhZF84LIjZ0lmAw==", "dev": true }, - "connected-domain": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/connected-domain/-/connected-domain-1.0.0.tgz", - "integrity": "sha1-v+dyOMdL5FOnnwy2BY3utPI1jpM=" - }, "contains-path": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/contains-path/-/contains-path-0.1.0.tgz", @@ -8715,14 +8710,6 @@ "ipaddr.js": "1.9.1" } }, - "ps-node": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/ps-node/-/ps-node-0.1.6.tgz", - "integrity": "sha1-mvZ6mdex0BMuUaUDCZ04qNKs4sM=", - "requires": { - "table-parser": "^0.1.3" - } - }, "pseudomap": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", @@ -11635,14 +11622,6 @@ } } }, - "table-parser": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/table-parser/-/table-parser-0.1.3.tgz", - "integrity": "sha1-BEHPzhallIFoTCfRtaZ/8VpDx7A=", - "requires": { - "connected-domain": "^1.0.0" - } - }, "taffydb": { "version": "2.7.3", "resolved": "https://registry.npmjs.org/taffydb/-/taffydb-2.7.3.tgz", diff --git a/package.json b/package.json index eaf96953d..e8c167d71 100644 --- a/package.json +++ b/package.json @@ -79,7 +79,6 @@ "lint-staged": "^10.2.11", "node-fetch": "^2.6.1", "openzeppelin-solidity": "2.3", - "ps-node": "^0.1.6", "semver": "^7.1.3", "solc": "0.6.12", "solhint": "^3.1.0", diff --git a/test/baseContracts.js b/test/baseContracts.js index de27aab3d..aaad65902 100644 --- a/test/baseContracts.js +++ b/test/baseContracts.js @@ -3,23 +3,14 @@ const ethers = require("ethers"); const Managed = artifacts.require("Managed"); -const TestManager = require("../utils/test-manager"); - contract("Managed and Owned", (accounts) => { - const manager = new TestManager(); - const infrastructure = accounts[0]; const manager1 = accounts[1]; const manager2 = accounts[2]; const nonOwner = accounts[3]; - let deployer; let managed; - before(async () => { - deployer = manager.newDeployer(); - }); - beforeEach(async () => { managed = await Managed.new(); }); diff --git a/test/baseModule.js b/test/baseModule.js index af8a90906..d74c3763f 100644 --- a/test/baseModule.js +++ b/test/baseModule.js @@ -7,12 +7,7 @@ const BaseModule = artifacts.require("TestOnlyOwnerModule"); const ERC20 = artifacts.require("TestERC20"); const NonCompliantERC20 = artifacts.require("NonCompliantERC20"); -const TestManager = require("../utils/test-manager"); - contract("BaseModule", (accounts) => { - const manager = new TestManager(); - const { deployer } = manager; - const owner = accounts[1]; let registry; diff --git a/test/compoundManager_invest.js b/test/compoundManager_invest.js index 122b2a9dc..504d54872 100644 --- a/test/compoundManager_invest.js +++ b/test/compoundManager_invest.js @@ -38,7 +38,6 @@ contract("Invest Manager with Compound", (accounts) => { const liquidityProvider = accounts[2]; const borrower = accounts[3]; - let deployer; let wallet; let walletImplementation; let investManager; @@ -52,12 +51,10 @@ contract("Invest Manager with Compound", (accounts) => { let versionManager; before(async () => { - deployer = manager.newDeployer(); - /* Deploy Compound V2 Architecture */ // deploy price oracle - const oracle = await PriceOracle); + const oracle = await PriceOracle.new(); // deploy comptroller const comptrollerProxy = await Unitroller.new(); @@ -135,6 +132,7 @@ contract("Invest Manager with Compound", (accounts) => { guardianStorage.address, ethers.constants.AddressZero, ethers.constants.AddressZero, +<<<<<<< HEAD versionManager.address); manager.setRelayerManager(relayerManager); @@ -142,6 +140,10 @@ contract("Invest Manager with Compound", (accounts) => { investManager.address, relayerManager.address, ], []); +======= + ); + manager.setRelayerModule(relayerModule); +>>>>>>> 58b95d01... Fix linting issues including the removal of obsoleted testmanager and deployer instances }); beforeEach(async () => { diff --git a/test/ens.js b/test/ens.js index e8a4cb870..d95ef7141 100644 --- a/test/ens.js +++ b/test/ens.js @@ -7,14 +7,11 @@ const ENSManager = artifacts.require("ArgentENSManager"); const ENSResolver = artifacts.require("ArgentENSResolver"); const ENSReverseRegistrar = artifacts.require("ReverseRegistrar"); -const TestManager = require("../utils/test-manager"); const utilities = require("../utils/utilities.js"); const ZERO_BYTES32 = ethers.constants.HashZero; contract("ENS contracts", (accounts) => { - const manager = new TestManager(); - const infrastructure = accounts[0]; const owner = accounts[1]; const amanager = accounts[2]; @@ -24,14 +21,12 @@ contract("ENS contracts", (accounts) => { const subnameWallet = "argent"; const walletNode = ethers.utils.namehash(`${subnameWallet}.${root}`); - let deployer; let ensRegistry; let ensResolver; let ensReverse; let ensManager; beforeEach(async () => { - deployer = manager.newDeployer(); const ensRegistryWithoutFallback = await ENSRegistry.new(); ensRegistry = await ENSRegistryWithFallback.new(ensRegistryWithoutFallback.address); ensResolver = await ENSResolver.new(); diff --git a/test/factory.js b/test/factory.js index b694517ee..fb53f3509 100644 --- a/test/factory.js +++ b/test/factory.js @@ -7,14 +7,11 @@ const ModuleRegistry = artifacts.require("ModuleRegistry"); const Factory = artifacts.require("WalletFactory"); const GuardianStorage = artifacts.require("GuardianStorage"); -const TestManager = require("../utils/test-manager"); const utils = require("../utils/utilities.js"); const ZERO_ADDRESS = ethers.constants.AddressZero; contract("WalletFactory", (accounts) => { - const manager = new TestManager(); - const infrastructure = accounts[0]; const owner = accounts[1]; const guardian = accounts[4]; diff --git a/test/guardianManager.js b/test/guardianManager.js index 09a795def..ed7d8e9b8 100644 --- a/test/guardianManager.js +++ b/test/guardianManager.js @@ -25,7 +25,6 @@ contract("GuardianManager", (accounts) => { const guardian5 = accounts[6]; const nonowner = accounts[7]; - let deployer; let wallet; let walletImplementation; let lockStorage; @@ -35,7 +34,6 @@ contract("GuardianManager", (accounts) => { let versionManager; before(async () => { - deployer = manager.newDeployer(); walletImplementation = await BaseWallet.new(); }); diff --git a/test/lockManager.js b/test/lockManager.js index 03e11ef32..4ce79e017 100644 --- a/test/lockManager.js +++ b/test/lockManager.js @@ -20,7 +20,6 @@ contract("LockManager", (accounts) => { const guardian1 = accounts[2]; const nonguardian = accounts[3]; - let deployer; let guardianManager; let guardianStorage; let lockStorage; @@ -32,7 +31,6 @@ contract("LockManager", (accounts) => { let versionManager; before(async () => { - deployer = manager.newDeployer(); walletImplementation = await BaseWallet.new(); }); diff --git a/test/makerV2Manager_invest.js b/test/makerV2Manager_invest.js index 658ccc669..98e478e7e 100644 --- a/test/makerV2Manager_invest.js +++ b/test/makerV2Manager_invest.js @@ -75,10 +75,15 @@ contract("MakerV2Invest", (accounts) => { guardianStorage.address, ethers.constants.AddressZero, ethers.constants.AddressZero, +<<<<<<< HEAD versionManager.address); manager.setRelayerManager(relayerManager); await versionManager.addVersion([makerV2.address, relayerManager.address], []); +======= + ); + manager.setRelayerModule(relayerModule); +>>>>>>> 58b95d01... Fix linting issues including the removal of obsoleted testmanager and deployer instances }); beforeEach(async () => { diff --git a/test/makerV2Manager_loan.js b/test/makerV2Manager_loan.js index c03d4340b..b5503348e 100644 --- a/test/makerV2Manager_loan.js +++ b/test/makerV2Manager_loan.js @@ -111,7 +111,8 @@ contract("MakerV2Loan", (accounts) => { 3600, 10000, AddressZero, - AddressZero); + AddressZero, + ); walletImplementation = await BaseWallet.new(); diff --git a/test/tokenExchanger.js b/test/tokenExchanger.js index 7c63df95e..7609a7f67 100644 --- a/test/tokenExchanger.js +++ b/test/tokenExchanger.js @@ -167,7 +167,8 @@ contract("TokenExchanger", (accounts) => { 3600, 10000, AddressZero, - AddressZero); + AddressZero, + ); // Deploy wallet implementation walletImplementation = await BaseWallet.new(); diff --git a/test/transferManager.js b/test/transferManager.js index aa18cdf99..a15058f6c 100644 --- a/test/transferManager.js +++ b/test/transferManager.js @@ -5,6 +5,7 @@ const chai = require("chai"); const BN = require("bn.js"); const bnChai = require("bn-chai"); +const { assert } = chai; const { expect } = chai; chai.use(bnChai(BN)); @@ -90,7 +91,8 @@ contract("TransferManager", (accounts) => { SECURITY_PERIOD, SECURITY_WINDOW, ETH_LIMIT, - ethers.constants.AddressZero); + ethers.constants.AddressZero, + ); transferManager = await TransferManager.new( lockStorage.address, @@ -458,7 +460,7 @@ contract("TransferManager", (accounts) => { }); assert.fail("transfer should have failed"); } catch (error) { - assert.ok(await manager.isRevertReason(error, "BF: must be owner or feature")); + assert.equal(error, "BM: must be owner or feature"); } }); @@ -511,7 +513,7 @@ contract("TransferManager", (accounts) => { token: ETH_TOKEN, to: recipient, amount: ETH_LIMIT * 2, delay: 1, relayed: false, }); } catch (error) { - assert.isTrue(await manager.isRevertReason(error, "outside of the execution window"), "should throw "); + assert.equal(error, "outside of the execution window"); } }); @@ -521,7 +523,7 @@ contract("TransferManager", (accounts) => { token: ETH_TOKEN, to: recipient, amount: ETH_LIMIT * 2, delay: 1, relayed: true, }); } catch (error) { - assert.isTrue(await manager.isRevertReason(error, "outside of the execution window"), "should throw "); + assert.equal(error, "outside of the execution window"); } }); @@ -531,7 +533,7 @@ contract("TransferManager", (accounts) => { token: ETH_TOKEN, to: recipient, amount: ETH_LIMIT * 2, delay: 10, relayed: false, }); } catch (error) { - assert.isTrue(await manager.isRevertReason(error, "outside of the execution window"), "should throw "); + assert.equal(error, "outside of the execution window"); } }); @@ -541,7 +543,7 @@ contract("TransferManager", (accounts) => { token: ETH_TOKEN, to: recipient, amount: ETH_LIMIT * 2, delay: 10, relayed: true, }); } catch (error) { - assert.isTrue(await manager.isRevertReason(error, "outside of the execution window"), "should throw "); + assert.equal(error, "outside of the execution window"); } }); @@ -629,7 +631,7 @@ contract("TransferManager", (accounts) => { await doDirectApprove({ signer: nonowner, amount: 10 }); assert.fail("approve should have failed"); } catch (error) { - assert.ok(await manager.isRevertReason(error, "BF: must be owner or feature")); + assert.equal(error, "BM: must be owner or module"); } }); @@ -643,7 +645,7 @@ contract("TransferManager", (accounts) => { try { await doDirectApprove({ amount: ETH_LIMIT + 10000 }); } catch (error) { - assert.ok(await manager.isRevertReason(error, "above daily limit")); + assert.equal(error, "above daily limit"); } }); }); @@ -858,7 +860,7 @@ contract("TransferManager", (accounts) => { try { await doApproveTokenAndCallContract({ amount: ETH_LIMIT + 10000, state: 6 }); } catch (error) { - assert.ok(await manager.isRevertReason(error, "above daily limit")); + assert.equal(error, "above daily limit"); } }); diff --git a/utils/test-manager.js b/utils/test-manager.js index ffe451145..68d2fc44c 100644 --- a/utils/test-manager.js +++ b/utils/test-manager.js @@ -1,6 +1,5 @@ const etherlime = require("etherlime-lib"); const ethers = require("ethers"); -const ps = require("ps-node"); const { signOffchain, ETH_TOKEN } = require("./utilities.js"); class TestManager { @@ -111,25 +110,6 @@ class TestManager { } return null; } - - async runningEtherlimeGanache() { // eslint-disable-line class-methods-use-this - return new Promise((res) => { - ps.lookup({ arguments: ["etherlime", "ganache"] }, (err, processes) => { - const runningEthGanache = !err && processes.reduce((etherlimeGanacheFound, p) => etherlimeGanacheFound - || (p.command + p.arguments.join("-")).includes("etherlime-ganache"), false); - return res(runningEthGanache); - }); - }); - } - - async isRevertReason(error, reason) { - const runningEthGanache = await this.runningEtherlimeGanache(); - // by default, we match the error with a generic "revert" keyword - // but if we are running etherlime ganache (and not e.g. ganache-cli), - // we can match the error with the exact reason message - const expectedReason = runningEthGanache ? reason : "revert"; - return (error.message || error.toString()).includes(expectedReason); - } } module.exports = TestManager; From d44f40a855a280c3c4b568af7fc874ebc6a46509 Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Mon, 17 Aug 2020 09:08:14 +0300 Subject: [PATCH 015/113] Migrate away from deployer.deploy syntax and to .new() --- deployment/1_setup_test_environment.js | 24 +++++------ deployment/2_deploy_contracts.js | 28 ++++++------- deployment/4_finalise_test_environment.js | 2 +- deployment/5_deploy_modules.js | 50 +++++++++++++++++++++++ scripts/deploy_custom_upgrader.js | 4 +- scripts/deploy_defi.js | 22 +++++----- test/compoundManager_invest.js | 5 --- test/makerV2Manager_invest.js | 5 --- truffle-config-contracts-legacy-1.3.js | 1 + truffle-config-contracts-legacy-1.6.js | 1 + truffle-config-contracts-test.js | 1 + truffle-config-infrastructure-0.5.js | 1 + truffle-config-infrastructure.js | 1 + truffle-config-lib.js | 1 + truffle-config-modules.js | 1 + truffle-config-wallet.js | 1 + truffle-config.js | 1 + utils/defi-deployer.js | 3 +- utils/test-manager.js | 11 +---- utils/utilities.js | 1 + 20 files changed, 100 insertions(+), 64 deletions(-) diff --git a/deployment/1_setup_test_environment.js b/deployment/1_setup_test_environment.js index e7dba6ffc..830ca54dc 100644 --- a/deployment/1_setup_test_environment.js +++ b/deployment/1_setup_test_environment.js @@ -22,8 +22,8 @@ const BYTES32_NULL = "0x00000000000000000000000000000000000000000000000000000000 async function deployENSRegistry(deployer, owner, domain) { const { gasPrice } = deployer.defaultOverrides; // Deploy the public ENS registry - const ensRegistryWithoutFallback = await deployer.deploy(ENSRegistry); - const ENSWrapper = await deployer.deploy(ENSRegistryWithFallback, {}, ensRegistryWithoutFallback.address); + const ensRegistryWithoutFallback = await ENSRegistry.new(); + const ENSWrapper = await ENSRegistryWithFallback.new(ensRegistryWithoutFallback.address); // ENS domain const parts = domain.split("."); @@ -43,19 +43,17 @@ async function deployENSRegistry(deployer, owner, domain) { async function deployParaswap(deployer) { const deploymentAccount = await deployer.signer.getAddress(); - const whitelist = await deployer.deploy(Whitelisted); - const partnerDeployer = await deployer.deploy(PartnerDeployer); - const partnerRegistry = await deployer.deploy(PartnerRegistry, {}, partnerDeployer.address); - const paraswap = await deployer.deploy( - AugustusSwapper, - {}, + const whitelist = await Whitelisted.new(); + const partnerDeployer = await PartnerDeployer.new(); + const partnerRegistry = await PartnerRegistry.new(partnerDeployer.address); + const paraswap = await AugustusSwapper.new( whitelist.address, deploymentAccount, partnerRegistry.address, deploymentAccount, deploymentAccount, ); - const kyberAdapter = await deployer.deploy(KyberAdapter, {}, deploymentAccount); + const kyberAdapter = await KyberAdapter.new(deploymentAccount); await whitelist.addWhitelisted(kyberAdapter.address); return { paraswap: paraswap.address, kyberAdapter: kyberAdapter.address }; } @@ -84,18 +82,16 @@ const deploy = async (network) => { } if (config.defi.uniswap.deployOwn) { - const UniswapFactoryWrapper = await deployer.deploy(UniswapFactory); + const UniswapFactoryWrapper = await UniswapFactory.new(); configurator.updateUniswapFactory(UniswapFactoryWrapper.address); - const UniswapExchangeTemplateWrapper = await deployer.deploy(UniswapExchange); + const UniswapExchangeTemplateWrapper = await UniswapExchange.new(); const initializeFactoryTx = await UniswapFactoryWrapper.contract.initializeFactory(UniswapExchangeTemplateWrapper.address, { gasPrice }); await UniswapFactoryWrapper.verboseWaitForTransaction(initializeFactoryTx, "Initializing UniswapFactory"); } if (config.defi.maker.deployOwn) { // Deploy Maker's mock Migration contract if needed - const MakerMigrationWrapper = await deployer.deploy( - MakerMigration, - {}, + const MakerMigrationWrapper = await MakerMigration.new( config.defi.maker.vat || "0x0000000000000000000000000000000000000000", config.defi.maker.daiJoin || "0x0000000000000000000000000000000000000000", config.defi.maker.wethJoin || "0x0000000000000000000000000000000000000000", diff --git a/deployment/2_deploy_contracts.js b/deployment/2_deploy_contracts.js index cef2c6545..56990f85c 100644 --- a/deployment/2_deploy_contracts.js +++ b/deployment/2_deploy_contracts.js @@ -62,32 +62,32 @@ const deploy = async (network) => { // ////////////////////////////////// // Deploy the Base Wallet Library - const BaseWalletWrapper = await deployer.deploy(BaseWallet); + const BaseWalletWrapper = await BaseWallet.new(); // Deploy the MultiSig - const MultiSigWrapper = await deployer.deploy(MultiSig, {}, newConfig.multisig.threshold, newConfig.multisig.owners); + const MultiSigWrapper = await MultiSig.new(newConfig.multisig.threshold, newConfig.multisig.owners); // Deploy the new TokenPriceRegistry - const TokenPriceRegistryWrapper = await deployer.deploy(TokenPriceRegistry); + const TokenPriceRegistryWrapper = await TokenPriceRegistry.new(); // Deploy the DexRegistry - const DexRegistryWrapper = await deployer.deploy(DexRegistry); + const DexRegistryWrapper = await DexRegistry.new(); // Deploy Module Registry - const ModuleRegistryWrapper = await deployer.deploy(ModuleRegistry); + const ModuleRegistryWrapper = await ModuleRegistry.new(); // Deploy Compound Registry - const CompoundRegistryWrapper = await deployer.deploy(CompoundRegistry); + const CompoundRegistryWrapper = await CompoundRegistry.new(); // Deploy the ENS Resolver - const ENSResolverWrapper = await deployer.deploy(ENSResolver); + const ENSResolverWrapper = await ENSResolver.new(); // Deploy the ENS Manager - const ENSManagerWrapper = await deployer.deploy(ENSManager, {}, + const ENSManagerWrapper = await ENSManager.new( walletRootEns, utils.namehash(walletRootEns), newConfig.ENS.ensRegistry, ENSResolverWrapper.address); // Deploy the Wallet Factory - const WalletFactoryWrapper = await deployer.deploy(WalletFactory, {}, + const WalletFactoryWrapper = await WalletFactory.new( ModuleRegistryWrapper.address, BaseWalletWrapper.address, GuardianStorageWrapper.address); // Deploy and configure Maker Registry - const ScdMcdMigrationWrapper = await deployer.wrapDeployedContract(ScdMcdMigration, newConfig.defi.maker.migration); + const ScdMcdMigrationWrapper = await ScdMcdMigration.at(newConfig.defi.maker.migration); const vatAddress = await ScdMcdMigrationWrapper.vat(); - const MakerRegistryWrapper = await deployer.deploy(MakerRegistry, {}, vatAddress); + const MakerRegistryWrapper = await MakerRegistry.new(vatAddress); const wethJoinAddress = await ScdMcdMigrationWrapper.wethJoin(); const addCollateralTransaction = await MakerRegistryWrapper.contract.addCollateral(wethJoinAddress, { gasPrice }); await MakerRegistryWrapper.verboseWaitForTransaction(addCollateralTransaction, `Adding join adapter ${wethJoinAddress} to the MakerRegistry`); @@ -98,7 +98,7 @@ const deploy = async (network) => { // Making ENSManager owner of the root wallet ENS // ///////////////////////////////////////////////// - const ENSRegistryWrapper = deployer.wrapDeployedContract(ENS, newConfig.ENS.ensRegistry); + const ENSRegistryWrapper = await ENS.at(newConfig.ENS.ensRegistry); // Get the address of the previous owner of the root wallet ENS (e.g. argent.xyz) const previousWalletEnsOwner = await ENSRegistryWrapper.contract.owner(utils.namehash(walletRootEns)); @@ -111,8 +111,8 @@ const deploy = async (network) => { } else if (previousWalletEnsOwner.toLowerCase() === prevConfig.contracts.ENSManager.toLowerCase()) { // change the owner from the previous ENSManager.address to the new one console.log("change the owner from the previous ENSManager to the new one"); - const previousMultiSigWrapper = deployer.wrapDeployedContract(MultiSig, prevConfig.contracts.MultiSigWallet); - const previousENSManagerWrapper = deployer.wrapDeployedContract(ENSManager, prevConfig.contracts.ENSManager); + const previousMultiSigWrapper = await MultiSig.at(prevConfig.contracts.MultiSigWallet); + const previousENSManagerWrapper = await ENSManager.at(prevConfig.contracts.ENSManager); const multisigExecutor = new MultisigExecutor(previousMultiSigWrapper, deploymentWallet, prevConfig.multisig.autosign, { gasPrice }); console.log(`Owner of ${walletRootEns} changed from old ENSManager to new ENSManager...`); diff --git a/deployment/4_finalise_test_environment.js b/deployment/4_finalise_test_environment.js index 982710e4b..60ae636bd 100644 --- a/deployment/4_finalise_test_environment.js +++ b/deployment/4_finalise_test_environment.js @@ -10,7 +10,7 @@ const BYTES32_NULL = "0x00000000000000000000000000000000000000000000000000000000 async function deployENSReverseRegistrar(deployer, config, owner, overrides) { const ENSRegistryWrapper = deployer.wrapDeployedContract(ENS, config.ENS.ensRegistry); - const ENSReverseRegistrarWrapper = await deployer.deploy(ENSReverseRegistrar, {}, config.ENS.ensRegistry, config.contracts.ENSResolver); + const ENSReverseRegistrarWrapper = await ENSReverseRegistrar.new(config.ENS.ensRegistry, config.contracts.ENSResolver); const setSubnodeOwnerTx1 = await ENSRegistryWrapper.contract.setSubnodeOwner(BYTES32_NULL, utils.sha3("reverse"), owner, overrides); await ENSRegistryWrapper.verboseWaitForTransaction(setSubnodeOwnerTx1, "Create the reverse namespace"); diff --git a/deployment/5_deploy_modules.js b/deployment/5_deploy_modules.js index 3200e07c9..12d272460 100644 --- a/deployment/5_deploy_modules.js +++ b/deployment/5_deploy_modules.js @@ -53,51 +53,78 @@ const deploy = async (network) => { // Deploy the GuardianManager module const GuardianManagerWrapper = await deployer.deploy( GuardianManager, +<<<<<<< HEAD {}, config.modules.LockStorage, config.modules.GuardianStorage, VersionManagerWrapper.address, +======= + config.contracts.ModuleRegistry, + GuardianStorageWrapper.address, +>>>>>>> b79932ef... Migrate away from deployer.deploy syntax and to .new() config.settings.securityPeriod || 0, config.settings.securityWindow || 0, ); // Deploy the LockManager module const LockManagerWrapper = await deployer.deploy( LockManager, +<<<<<<< HEAD {}, config.modules.LockStorage, config.modules.GuardianStorage, VersionManagerWrapper.address, +======= + config.contracts.ModuleRegistry, + GuardianStorageWrapper.address, +>>>>>>> b79932ef... Migrate away from deployer.deploy syntax and to .new() config.settings.lockPeriod || 0, ); // Deploy the RecoveryManager module const RecoveryManagerWrapper = await deployer.deploy( RecoveryManager, +<<<<<<< HEAD {}, config.modules.LockStorage, config.modules.GuardianStorage, VersionManagerWrapper.address, +======= + config.contracts.ModuleRegistry, + GuardianStorageWrapper.address, +>>>>>>> b79932ef... Migrate away from deployer.deploy syntax and to .new() config.settings.recoveryPeriod || 0, config.settings.lockPeriod || 0, ); // Deploy the ApprovedTransfer module const ApprovedTransferWrapper = await deployer.deploy( ApprovedTransfer, +<<<<<<< HEAD {}, config.modules.LockStorage, config.modules.GuardianStorage, config.modules.LimitStorage, VersionManagerWrapper.address, config.defi.weth, +======= + config.contracts.ModuleRegistry, + GuardianStorageWrapper.address, +>>>>>>> b79932ef... Migrate away from deployer.deploy syntax and to .new() ); // Deploy the TransferManager module const TransferManagerWrapper = await deployer.deploy( TransferManager, +<<<<<<< HEAD {}, config.modules.LockStorage, config.modules.TransferStorage, config.modules.LimitStorage, config.modules.TokenPriceRegistry, VersionManagerWrapper.address, +======= + config.contracts.ModuleRegistry, + TransferStorageWrapper.address, + GuardianStorageWrapper.address, + config.contracts.TokenPriceProvider, +>>>>>>> b79932ef... Migrate away from deployer.deploy syntax and to .new() config.settings.securityPeriod || 0, config.settings.securityWindow || 0, config.settings.defaultLimit || "1000000000000000000", @@ -107,6 +134,7 @@ const deploy = async (network) => { // Deploy the TokenExchanger module const TokenExchangerWrapper = await deployer.deploy( TokenExchanger, +<<<<<<< HEAD {}, config.modules.LockStorage, config.modules.TokenPriceRegistry, @@ -114,21 +142,38 @@ const deploy = async (network) => { config.contracts.DexRegistry, config.defi.paraswap.contract, "argent", +======= + config.contracts.ModuleRegistry, + GuardianStorageWrapper.address, + config.Kyber ? config.Kyber.contract : "0x0000000000000000000000000000000000000000", + config.contracts.MultiSigWallet, + config.settings.feeRatio || 0, +>>>>>>> b79932ef... Migrate away from deployer.deploy syntax and to .new() ); // Deploy the NFTTransfer module const NftTransferWrapper = await deployer.deploy( NftTransfer, +<<<<<<< HEAD {}, config.modules.LockStorage, config.modules.TokenPriceRegistry, VersionManagerWrapper.address, +======= + config.contracts.ModuleRegistry, + GuardianStorageWrapper.address, +>>>>>>> b79932ef... Migrate away from deployer.deploy syntax and to .new() config.CryptoKitties.contract, ); // Deploy the CompoundManager module const CompoundManagerWrapper = await deployer.deploy( CompoundManager, +<<<<<<< HEAD {}, config.modules.LockStorage, +======= + config.contracts.ModuleRegistry, + GuardianStorageWrapper.address, +>>>>>>> b79932ef... Migrate away from deployer.deploy syntax and to .new() config.defi.compound.comptroller, config.contracts.CompoundRegistry, VersionManagerWrapper.address, @@ -136,8 +181,13 @@ const deploy = async (network) => { // Deploy MakerManagerV2 const MakerV2ManagerWrapper = await deployer.deploy( MakerV2Manager, +<<<<<<< HEAD {}, config.modules.LockStorage, +======= + config.contracts.ModuleRegistry, + GuardianStorageWrapper.address, +>>>>>>> b79932ef... Migrate away from deployer.deploy syntax and to .new() config.defi.maker.migration, config.defi.maker.pot, config.defi.maker.jug, diff --git a/scripts/deploy_custom_upgrader.js b/scripts/deploy_custom_upgrader.js index 7841b1b0c..1ec947de1 100644 --- a/scripts/deploy_custom_upgrader.js +++ b/scripts/deploy_custom_upgrader.js @@ -32,9 +32,7 @@ async function deploy() { const MultiSigWrapper = await MultiSig.at(config.contracts.MultiSigWallet); const multisigExecutor = new MultisigExecutor(MultiSigWrapper, deploymentWallet, config.multisig.autosign); - const UpgraderWrapper = await deployer.deploy( - Upgrader, - {}, + const UpgraderWrapper = await Upgrader.new( modulesToRemove, modulesToAdd, ); diff --git a/scripts/deploy_defi.js b/scripts/deploy_defi.js index d1846bbad..0a4618675 100644 --- a/scripts/deploy_defi.js +++ b/scripts/deploy_defi.js @@ -43,15 +43,15 @@ async function deploy() { const manager = deployer.signer; // the pit /* ************* Deploy Maker *************** */ - const vox = await deployer.deploy(Vox, {}, USD_PER_DAI); - const sai = await deployer.deploy(DSToken, {}, formatBytes32String("DAI")); - const gov = await deployer.deploy(DSToken, {}, formatBytes32String("MKR")); - const sin = await deployer.deploy(DSToken, {}, formatBytes32String("SIN")); - const skr = await deployer.deploy(DSToken, {}, formatBytes32String("PETH")); - const gem = await deployer.deploy(WETH); - const pip = await deployer.deploy(DSValue); - const pep = await deployer.deploy(DSValue); - const tub = await deployer.deploy(Tub, {}, + const vox = await Vox.new(USD_PER_DAI); + const sai = await DSToken.new(formatBytes32String("DAI")); + const gov = await DSToken.new(formatBytes32String("MKR")); + const sin = await DSToken.new(formatBytes32String("SIN")); + const skr = await DSToken.new(formatBytes32String("PETH")); + const gem = await WETH.new(); + const pip = await DSValue.new(); + const pep = await DSValue.new(); + const tub = await Tub.new( sai.address, sin.address, skr.address, @@ -80,8 +80,8 @@ async function deploy() { /* ************* Deploy Uniswap ****************** */ - const uniswapFactory = await deployer.deploy(UniswapFactory); - const uniswapTemplateExchange = await deployer.deploy(UniswapExchange); + const uniswapFactory = await UniswapFactory.new(); + const uniswapTemplateExchange = await UniswapExchange.new(); await uniswapFactory.initializeFactory(uniswapTemplateExchange.address); /* *************** create MKR exchange ***************** */ diff --git a/test/compoundManager_invest.js b/test/compoundManager_invest.js index 504d54872..c4e20fbc3 100644 --- a/test/compoundManager_invest.js +++ b/test/compoundManager_invest.js @@ -132,7 +132,6 @@ contract("Invest Manager with Compound", (accounts) => { guardianStorage.address, ethers.constants.AddressZero, ethers.constants.AddressZero, -<<<<<<< HEAD versionManager.address); manager.setRelayerManager(relayerManager); @@ -140,10 +139,6 @@ contract("Invest Manager with Compound", (accounts) => { investManager.address, relayerManager.address, ], []); -======= - ); - manager.setRelayerModule(relayerModule); ->>>>>>> 58b95d01... Fix linting issues including the removal of obsoleted testmanager and deployer instances }); beforeEach(async () => { diff --git a/test/makerV2Manager_invest.js b/test/makerV2Manager_invest.js index 98e478e7e..658ccc669 100644 --- a/test/makerV2Manager_invest.js +++ b/test/makerV2Manager_invest.js @@ -75,15 +75,10 @@ contract("MakerV2Invest", (accounts) => { guardianStorage.address, ethers.constants.AddressZero, ethers.constants.AddressZero, -<<<<<<< HEAD versionManager.address); manager.setRelayerManager(relayerManager); await versionManager.addVersion([makerV2.address, relayerManager.address], []); -======= - ); - manager.setRelayerModule(relayerModule); ->>>>>>> 58b95d01... Fix linting issues including the removal of obsoleted testmanager and deployer instances }); beforeEach(async () => { diff --git a/truffle-config-contracts-legacy-1.3.js b/truffle-config-contracts-legacy-1.3.js index bca58dc65..7b2945f69 100644 --- a/truffle-config-contracts-legacy-1.3.js +++ b/truffle-config-contracts-legacy-1.3.js @@ -47,6 +47,7 @@ module.exports = { host: "127.0.0.1", // Localhost (default: none) port: 8545, // Standard Ethereum port (default: none) network_id: "*", // Any network (default: none) + gas: 20700000 }, // Another network with more advanced options... diff --git a/truffle-config-contracts-legacy-1.6.js b/truffle-config-contracts-legacy-1.6.js index 68a34bab7..ae91aa08a 100644 --- a/truffle-config-contracts-legacy-1.6.js +++ b/truffle-config-contracts-legacy-1.6.js @@ -47,6 +47,7 @@ module.exports = { host: "127.0.0.1", // Localhost (default: none) port: 8545, // Standard Ethereum port (default: none) network_id: "*", // Any network (default: none) + gas: 20700000 }, // Another network with more advanced options... diff --git a/truffle-config-contracts-test.js b/truffle-config-contracts-test.js index 234196ffb..298b51210 100644 --- a/truffle-config-contracts-test.js +++ b/truffle-config-contracts-test.js @@ -46,6 +46,7 @@ module.exports = { host: "127.0.0.1", // Localhost (default: none) port: 8545, // Standard Ethereum port (default: none) network_id: "*", // Any network (default: none) + gas: 20700000 }, // Another network with more advanced options... diff --git a/truffle-config-infrastructure-0.5.js b/truffle-config-infrastructure-0.5.js index 76dc7a960..63d803fbe 100644 --- a/truffle-config-infrastructure-0.5.js +++ b/truffle-config-infrastructure-0.5.js @@ -46,6 +46,7 @@ module.exports = { host: "127.0.0.1", // Localhost (default: none) port: 8545, // Standard Ethereum port (default: none) network_id: "*", // Any network (default: none) + gas: 20700000 }, // Another network with more advanced options... diff --git a/truffle-config-infrastructure.js b/truffle-config-infrastructure.js index f651083f1..b1658a023 100644 --- a/truffle-config-infrastructure.js +++ b/truffle-config-infrastructure.js @@ -46,6 +46,7 @@ module.exports = { host: "127.0.0.1", // Localhost (default: none) port: 8545, // Standard Ethereum port (default: none) network_id: "*", // Any network (default: none) + gas: 20700000 }, // Another network with more advanced options... diff --git a/truffle-config-lib.js b/truffle-config-lib.js index cb0003c62..734d63da7 100644 --- a/truffle-config-lib.js +++ b/truffle-config-lib.js @@ -5,6 +5,7 @@ module.exports = { host: "127.0.0.1", port: 8545, network_id: "*", + gas: 20700000 }, }, diff --git a/truffle-config-modules.js b/truffle-config-modules.js index 128f69705..7fb8c1831 100644 --- a/truffle-config-modules.js +++ b/truffle-config-modules.js @@ -46,6 +46,7 @@ module.exports = { host: "127.0.0.1", // Localhost (default: none) port: 8545, // Standard Ethereum port (default: none) network_id: "*", // Any network (default: none) + gas: 20700000 }, // Another network with more advanced options... diff --git a/truffle-config-wallet.js b/truffle-config-wallet.js index 8d147c95c..20e29cb23 100644 --- a/truffle-config-wallet.js +++ b/truffle-config-wallet.js @@ -46,6 +46,7 @@ module.exports = { host: "127.0.0.1", // Localhost (default: none) port: 8545, // Standard Ethereum port (default: none) network_id: "*", // Any network (default: none) + gas: 20700000 }, // Another network with more advanced options... diff --git a/truffle-config.js b/truffle-config.js index 2d7c7bd2d..9374d6034 100644 --- a/truffle-config.js +++ b/truffle-config.js @@ -46,6 +46,7 @@ module.exports = { host: "127.0.0.1", // Localhost (default: none) port: 8545, // Standard Ethereum port (default: none) network_id: "*", // Any network (default: none) + gas: 20700000 }, // Another network with more advanced options... diff --git a/utils/defi-deployer.js b/utils/defi-deployer.js index d120bacd5..833f5fd29 100644 --- a/utils/defi-deployer.js +++ b/utils/defi-deployer.js @@ -44,7 +44,8 @@ module.exports = { for (let i = 0; i < tokens.length; i += 1) { const token = tokens[i]; await uniswapFactory.from(infrastructure).createExchange(token.address); - const tokenExchange = await etherlime.ContractAt(UniswapExchange, await uniswapFactory.getExchange(token.address)); + const uniswapExchangeAddress = await uniswapFactory.getExchange(token.address); + const tokenExchange = await UniswapExchange.at(uniswapExchangeAddress); const tokenLiquidity = ethLiquidity.mul(WAD).div(ethPerToken[i]); await token["mint(address,uint256)"](infrastructure, tokenLiquidity); await token.from(infrastructure).approve(tokenExchange.address, tokenLiquidity); diff --git a/utils/test-manager.js b/utils/test-manager.js index 68d2fc44c..1d3f86c18 100644 --- a/utils/test-manager.js +++ b/utils/test-manager.js @@ -5,19 +5,10 @@ const { signOffchain, ETH_TOKEN } = require("./utilities.js"); class TestManager { constructor(network = "ganache", deployer) { this.network = network; - this.deployer = deployer || this.newDeployer(); + console.log("network", network) this.provider = this.deployer.provider; } - static newDeployer() { - const defaultConfigs = { - gasLimit: ethers.BigNumber.from(20700000), - }; - const deployerInstance = new etherlime.EtherlimeGanacheDeployer("0x7ab741b57e8d94dd7e1a29055646bafde7010f38a900f55bbd7647880faa6ee8"); - deployerInstance.setDefaultOverrides(defaultConfigs); - return deployerInstance; - } - async getCurrentBlock() { const block = await this.provider.getBlockNumber(); return block; diff --git a/utils/utilities.js b/utils/utilities.js index fc07ce66c..504173c8d 100644 --- a/utils/utilities.js +++ b/utils/utilities.js @@ -1,5 +1,6 @@ const readline = require("readline"); const ethers = require("ethers"); +const web3 = require("web3"); const ETH_TOKEN = "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"; From ab806a1b91e785fa5cc53569211e5f6502be2d7d Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Mon, 17 Aug 2020 09:26:24 +0300 Subject: [PATCH 016/113] Move getting block timestamp function to utils --- .eslintrc | 4 +++- test/recoveryManager.js | 4 ++-- test/tokenExchanger.js | 4 ++-- utils/defi-deployer.js | 4 ++-- utils/test-manager.js | 14 +------------- utils/utilities.js | 6 ++++++ 6 files changed, 16 insertions(+), 20 deletions(-) diff --git a/.eslintrc b/.eslintrc index 1fc0f7680..def534a8d 100644 --- a/.eslintrc +++ b/.eslintrc @@ -17,7 +17,9 @@ "no-underscore-dangle": "off", "no-await-in-loop": "off", "no-restricted-syntax": "off", - "guard-for-in": "off" + "guard-for-in": "off", + "function-paren-newline": "off", + "comma-dangle": "off" }, "parserOptions": { "ecmaVersion": 2018 diff --git a/test/recoveryManager.js b/test/recoveryManager.js index aabe534a7..cf225f4fa 100644 --- a/test/recoveryManager.js +++ b/test/recoveryManager.js @@ -18,6 +18,7 @@ const { sortWalletByAddress, parseRelayReceipt, signOffchain, + getTimestamp } = require("../utils/utilities.js"); const WRONG_SIGNATURE_NUMBER_REVERT_MSG = "RM: Wrong number of signatures"; @@ -134,8 +135,7 @@ contract("RecoveryManager", (accounts) => { it("should let a majority of guardians execute the recovery procedure", async () => { const majority = guardians.slice(0, Math.ceil((guardians.length) / 2)); await manager.relay(recoveryManager, "executeRecovery", [wallet.address, newowner], wallet, sortWalletByAddress(majority)); - const currentBlock = await manager.getCurrentBlock(); - const timestamp = await manager.getTimestamp(currentBlock); + const timestamp = await getTimestamp(currentBlock); const isLocked = await lockManager.isLocked(wallet.address); assert.isTrue(isLocked, "should be locked by recovery"); diff --git a/test/tokenExchanger.js b/test/tokenExchanger.js index 7609a7f67..3c33b3fe4 100644 --- a/test/tokenExchanger.js +++ b/test/tokenExchanger.js @@ -41,7 +41,7 @@ const VersionManager = artifacts.require("VersionManager"); // Utils const { makePathes } = require("../utils/paraswap/sell-helper"); const { makeRoutes } = require("../utils/paraswap/buy-helper"); -const { ETH_TOKEN, parseLogs } = require("../utils/utilities.js"); +const { ETH_TOKEN, parseLogs, getTimestamp } = require("../utils/utilities.js"); const TestManager = require("../utils/test-manager"); // Constants @@ -113,7 +113,7 @@ contract("TokenExchanger", (accounts) => { uniswapRouter = await UniswapV2Router01.new(uniswapFactory.address, weth.address); await tokenA.approve(uniswapRouter.address, parseEther("300")); await tokenB.approve(uniswapRouter.address, parseEther("600")); - const timestamp = await manager.getTimestamp(await manager.getCurrentBlock()); + const timestamp = await getTimestamp(); await uniswapRouter.addLiquidity( tokenA.address, tokenB.address, diff --git a/utils/defi-deployer.js b/utils/defi-deployer.js index 833f5fd29..1594e3048 100644 --- a/utils/defi-deployer.js +++ b/utils/defi-deployer.js @@ -1,8 +1,8 @@ /* global artifacts */ const { parseEther, formatBytes32String } = require("ethers").utils; -const etherlime = require("etherlime-lib"); const ethers = require("ethers"); +const web3 = require("web3"); const UniswapFactory = require("../lib/uniswap/UniswapFactory"); const UniswapExchange = require("../lib/uniswap/UniswapExchange"); @@ -49,7 +49,7 @@ module.exports = { const tokenLiquidity = ethLiquidity.mul(WAD).div(ethPerToken[i]); await token["mint(address,uint256)"](infrastructure, tokenLiquidity); await token.from(infrastructure).approve(tokenExchange.address, tokenLiquidity); - const timestamp = await manager.getTimestamp(await manager.getCurrentBlock()); + const { timestamp } = await web3.eth.getBlock(blockN); await tokenExchange.from(infrastructure).addLiquidity(1, tokenLiquidity, timestamp + 300, { value: ethLiquidity, gasLimit: 150000 }); } return { uniswapFactory }; diff --git a/utils/test-manager.js b/utils/test-manager.js index 1d3f86c18..037e6dd87 100644 --- a/utils/test-manager.js +++ b/utils/test-manager.js @@ -1,24 +1,12 @@ -const etherlime = require("etherlime-lib"); const ethers = require("ethers"); const { signOffchain, ETH_TOKEN } = require("./utilities.js"); class TestManager { - constructor(network = "ganache", deployer) { + constructor(network = "ganache") { this.network = network; - console.log("network", network) this.provider = this.deployer.provider; } - async getCurrentBlock() { - const block = await this.provider.getBlockNumber(); - return block; - } - - async getTimestamp(blockNumber) { - const block = await this.provider.getBlock(blockNumber); - return block.timestamp; - } - async getNonceForRelay() { const block = await this.provider.getBlockNumber(); const timestamp = new Date().getTime(); diff --git a/utils/utilities.js b/utils/utilities.js index 504173c8d..97a9714d2 100644 --- a/utils/utilities.js +++ b/utils/utilities.js @@ -147,4 +147,10 @@ module.exports = { ); return contract.callStatic[method](...args); }, + + async getTimestamp(blockNumber) { + const blockN = !blockNumber ? "latest" : blockNumber; + const { timestamp } = await web3.eth.getBlock(blockN); + return timestamp; + } }; From 3cb3a07a884b0dd95c26a53b6ef6586f72d179db Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Mon, 17 Aug 2020 09:33:02 +0300 Subject: [PATCH 017/113] Move increasing time function to utils --- deployment/999_benchmark.js | 30 ++++++++++++++++++------- test/approvedTransfer.js | 4 ++-- test/compoundManager_invest.js | 4 ++-- test/guardianManager.js | 41 +++++++++++++++++----------------- test/lockManager.js | 4 +++- test/makerV2Manager_loan.js | 6 ++--- test/recoveryManager.js | 13 ++++++----- test/transferManager.js | 38 +++++++++++++++---------------- utils/defi-deployer.js | 2 +- utils/test-manager.js | 10 --------- utils/utilities.js | 10 +++++++++ 11 files changed, 90 insertions(+), 72 deletions(-) diff --git a/deployment/999_benchmark.js b/deployment/999_benchmark.js index e18be9495..00b89a4ff 100644 --- a/deployment/999_benchmark.js +++ b/deployment/999_benchmark.js @@ -29,7 +29,7 @@ const TestManager = require("../utils/test-manager"); const MultisigExecutor = require("../utils/multisigexecutor.js"); const ETH_TOKEN = "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"; -const { sortWalletByAddress } = require("../utils/utilities.js"); +const { sortWalletByAddress, increaseTime } = require("../utils/utilities.js"); class Logger { constructor() { @@ -326,7 +326,7 @@ class Benchmark { this._logger.addItem("Request add guardian (direct)", gasUsed); await this.GuardianManagerWrapper.addGuardian(this.walletAddress, this.accounts[2]); - await this.testManager.increaseTime(this.config.settings.securityPeriod + this.config.settings.securityWindow / 2); + await increaseTime(this.config.settings.securityPeriod + this.config.settings.securityWindow / 2); gasUsed = await this.GuardianManagerWrapper.estimate.confirmGuardianAddition(this.walletAddress, this.accounts[2]); this._logger.addItem("Confirm add guardian (direct)", gasUsed); @@ -337,7 +337,7 @@ class Benchmark { this._logger.addItem("Request revoke guardian (direct)", gasUsed); await this.GuardianManagerWrapper.revokeGuardian(this.walletAddress, this.accounts[1]); - await this.testManager.increaseTime(this.config.settings.securityPeriod + this.config.settings.securityWindow / 2); + await increaseTime(this.config.settings.securityPeriod + this.config.settings.securityWindow / 2); gasUsed = await this.GuardianManagerWrapper.estimate.confirmGuardianRevokation(this.walletAddress, this.accounts[1]); this._logger.addItem("Confirm revoke guardian (direct)", gasUsed); @@ -423,7 +423,7 @@ class Benchmark { async estimateETHTransferNoLimitDirect() { // disable limit await this.TransferManagerWrapper.disableLimit(this.walletAddress); - await this.testManager.increaseTime(this.config.settings.securityPeriod + 1); + await increaseTime(this.config.settings.securityPeriod + 1); // transfer const gasUsed = await this.TransferManagerWrapper.estimate.transferToken( @@ -435,7 +435,7 @@ class Benchmark { async estimateTransferNoLimitRelayed() { // disable limit await this.TransferManagerWrapper.disableLimit(this.walletAddress); - await this.testManager.increaseTime(this.config.settings.securityPeriod + 1); + await increaseTime(this.config.settings.securityPeriod + 1); // transfer const gasUsed = await this.relay( @@ -488,7 +488,7 @@ class Benchmark { async estimateETHTransferToWhitelistedAccountDirect() { await this.TransferManagerWrapper.addToWhitelist(this.walletAddress, this.accounts[3]); - await this.testManager.increaseTime(this.config.settings.securityPeriod + 1); + await increaseTime(this.config.settings.securityPeriod + 1); const gasUsed = await this.TransferManagerWrapper.estimate.transferToken( this.walletAddress, ETH_TOKEN, this.accounts[3], 2000000, "0x", @@ -498,7 +498,7 @@ class Benchmark { async estimateTransferToWhitelistedAccountRelayed() { await this.TransferManagerWrapper.addToWhitelist(this.walletAddress, this.accounts[3]); - await this.testManager.increaseTime(this.config.settings.securityPeriod + 1); + await increaseTime(this.config.settings.securityPeriod + 1); const gasUsed = await this.relay( this.TransferManagerWrapper, @@ -517,6 +517,20 @@ class Benchmark { this._logger.addItem("ETH large transfer to untrusted account", gasUsed); } +<<<<<<< HEAD +======= + // async estimateExecuteETHLargeTransferToUntrustedAccount() { + // const tx = await this.TokenTransferWrapper.transferToken(this.walletAddress, ETH_TOKEN, this.accounts[2], 2000000, "0x"); + // const result = await this.TokenTransferWrapper.verboseWaitForTransaction(tx, ''); + // const block = result.blockNumber; + // console.log(block); + + // await increaseTime(this.config.settings.securityPeriod + this.config.settings.securityWindow/2); + // const gasUsed = await this.TokenTransferWrapper.estimate.executePendingTransfer(this.walletAddress, ETH_TOKEN, this.accounts[2], 2000000, "0x", block); + // this._logger.addItem("Execute ETH large transfer to untrusted account", gasUsed); + // } + +>>>>>>> 7379fcce... Move increasing time function to utils async estimateLargeTransferApprovalByOneGuardian() { // estimate approve large transfer const gasUsed = await this.relay( @@ -534,7 +548,7 @@ class Benchmark { await this.GuardianManagerWrapper.addGuardian(this.walletAddress, this.accounts[2]); await this.GuardianManagerWrapper.addGuardian(this.walletAddress, this.accounts[3]); - await this.testManager.increaseTime(this.config.settings.securityPeriod + this.config.settings.securityWindow / 2); + await increaseTime(this.config.settings.securityPeriod + this.config.settings.securityWindow / 2); await this.GuardianManagerWrapper.confirmGuardianAddition(this.walletAddress, this.accounts[2]); await this.GuardianManagerWrapper.confirmGuardianAddition(this.walletAddress, this.accounts[3]); diff --git a/test/approvedTransfer.js b/test/approvedTransfer.js index fdbd68ced..f586f515f 100644 --- a/test/approvedTransfer.js +++ b/test/approvedTransfer.js @@ -17,7 +17,7 @@ const TestContract = artifacts.require("TestContract"); const TestLimitFeature = artifacts.require("TestLimitFeature"); const TestManager = require("../utils/test-manager"); -const { sortWalletByAddress, parseRelayReceipt, ETH_TOKEN } = require("../utils/utilities.js"); +const { sortWalletByAddress, parseRelayReceipt, ETH_TOKEN, increaseTime } = require("../utils/utilities.js"); const ZERO_BYTES32 = ethers.constants.HashZero; @@ -112,7 +112,7 @@ contract("ApprovedTransfer", (accounts) => { await guardianManager.from(owner).addGuardian(wallet.address, address); } - await manager.increaseTime(30); + await increaseTime(30); for (let i = 1; i < guardianAddresses.length; i += 1) { await guardianManager.confirmGuardianAddition(wallet.address, guardianAddresses[i]); } diff --git a/test/compoundManager_invest.js b/test/compoundManager_invest.js index c4e20fbc3..9ddd7e641 100644 --- a/test/compoundManager_invest.js +++ b/test/compoundManager_invest.js @@ -27,7 +27,7 @@ const ETH_EXCHANGE_RATE = ethers.BigNumber.from("200000000000000000000000000"); const ERC20 = artifacts.require("TestERC20"); -const { ETH_TOKEN } = require("../utils/utilities.js"); +const { ETH_TOKEN, increaseTime } = require("../utils/utilities.js"); const TestManager = require("../utils/test-manager"); contract("Invest Manager with Compound", (accounts) => { @@ -182,7 +182,7 @@ contract("Invest Manager with Compound", (accounts) => { assert.isTrue(await utils.hasEvent(txReceipt, cToken, "Borrow"), "should have generated Borrow event"); } // increase time to accumulate interests - await manager.increaseTime(3600 * 24 * days); + await increaseTime(3600 * 24 * days); await cToken.accrueInterest(); await cEther.accrueInterest(); } diff --git a/test/guardianManager.js b/test/guardianManager.js index ed7d8e9b8..2401bd782 100644 --- a/test/guardianManager.js +++ b/test/guardianManager.js @@ -13,6 +13,7 @@ const DumbContract = artifacts.require("TestContract"); const NonCompliantGuardian = artifacts.require("NonCompliantGuardian"); const TestManager = require("../utils/test-manager"); +const { increaseTime } = require("../utils/utilities.js"); contract("GuardianManager", (accounts) => { const manager = new TestManager(accounts); @@ -83,7 +84,7 @@ contract("GuardianManager", (accounts) => { assert.isFalse(active, "second guardian should not yet be active"); assert.equal(count, 1, "second guardian should be pending during security period"); - await manager.increaseTime(30); + await increaseTime(30); await guardianManager.confirmGuardianAddition(wallet.address, guardian2); count = (await guardianStorage.guardianCount(wallet.address)).toNumber(); active = await guardianManager.isGuardian(wallet.address, guardian2); @@ -98,7 +99,7 @@ contract("GuardianManager", (accounts) => { await guardianManager.from(owner).addGuardian(wallet.address, guardian1); await guardianManager.from(owner).addGuardian(wallet.address, guardian2); - await manager.increaseTime(48); // 42 == 2 * security_period + await increaseTime(48); // 42 == 2 * security_period await assert.revertWith(guardianManager.confirmGuardianAddition(wallet.address, guardian2), "GM: Too late to confirm guardian addition"); @@ -121,7 +122,7 @@ contract("GuardianManager", (accounts) => { // first time await guardianManager.from(owner).addGuardian(wallet.address, guardian2); - await manager.increaseTime(48); // 42 == 2 * security_period + await increaseTime(48); // 42 == 2 * security_period await assert.revertWith(guardianManager.confirmGuardianAddition(wallet.address, guardian2), "GM: Too late to confirm guardian addition"); @@ -132,7 +133,7 @@ contract("GuardianManager", (accounts) => { assert.isFalse(active, "second guardian should not yet be active"); assert.equal(count, 1, "second guardian should be pending during security period"); - await manager.increaseTime(30); + await increaseTime(30); await guardianManager.confirmGuardianAddition(wallet.address, guardian2); count = (await guardianStorage.guardianCount(wallet.address)).toNumber(); active = await guardianManager.isGuardian(wallet.address, guardian2); @@ -178,7 +179,7 @@ contract("GuardianManager", (accounts) => { for (let i = 1; i <= 5; i += 1) { await guardianManager.from(owner).addGuardian(wallet.address, guardians[i - 1]); if (i > 1) { - await manager.increaseTime(31); + await increaseTime(31); await guardianManager.confirmGuardianAddition(wallet.address, guardians[i - 1]); } count = (await guardianStorage.guardianCount(wallet.address)).toNumber(); @@ -195,7 +196,7 @@ contract("GuardianManager", (accounts) => { for (let i = 1; i <= 3; i += 1) { await manager.relay(guardianManager, "addGuardian", [wallet.address, guardians[i - 1]], wallet, [owner]); if (i > 1) { - await manager.increaseTime(30); + await increaseTime(30); await manager.relay(guardianManager, "confirmGuardianAddition", [wallet.address, guardians[i - 1]], wallet, []); } count = (await guardianStorage.guardianCount(wallet.address)).toNumber(); @@ -239,7 +240,7 @@ contract("GuardianManager", (accounts) => { assert.isFalse(active, "second guardian should not yet be active"); assert.equal(count, 1, "second guardian should be pending during security period"); - await manager.increaseTime(30); + await increaseTime(30); await guardianManager.confirmGuardianAddition(wallet.address, guardianWallet2.address); count = (await guardianStorage.guardianCount(wallet.address)).toNumber(); active = await guardianManager.isGuardian(wallet.address, guardian2); @@ -281,7 +282,7 @@ contract("GuardianManager", (accounts) => { beforeEach(async () => { await guardianManager.from(owner).addGuardian(wallet.address, guardian1); await guardianManager.from(owner).addGuardian(wallet.address, guardian2); - await manager.increaseTime(30); + await increaseTime(30); await guardianManager.confirmGuardianAddition(wallet.address, guardian2); const count = (await guardianStorage.guardianCount(wallet.address)).toNumber(); assert.equal(count, 2, "2 guardians should be added"); @@ -294,7 +295,7 @@ contract("GuardianManager", (accounts) => { assert.isTrue(active, "the revoked guardian should still be active during the security period"); assert.equal(count, 2, "the revoked guardian should go through a security period"); - await manager.increaseTime(30); + await increaseTime(30); await guardianManager.confirmGuardianRevokation(wallet.address, guardian1); count = (await guardianStorage.guardianCount(wallet.address)).toNumber(); active = await guardianManager.isGuardian(wallet.address, guardian1); @@ -316,7 +317,7 @@ contract("GuardianManager", (accounts) => { it("should not confirm a guardian revokation after two security periods (blockchain transaction)", async () => { await guardianManager.from(owner).revokeGuardian(wallet.address, guardian1); - await manager.increaseTime(48); // 48 == 2 * security_period + await increaseTime(48); // 48 == 2 * security_period await assert.revertWith(guardianManager.confirmGuardianRevokation(wallet.address, guardian1), "GM: Too late to confirm guardian revokation"); }); @@ -331,7 +332,7 @@ contract("GuardianManager", (accounts) => { // first time await guardianManager.from(owner).revokeGuardian(wallet.address, guardian1); - await manager.increaseTime(48); // 48 == 2 * security_period + await increaseTime(48); // 48 == 2 * security_period await assert.revertWith(guardianManager.confirmGuardianRevokation(wallet.address, guardian1), "GM: Too late to confirm guardian revokation"); @@ -342,7 +343,7 @@ contract("GuardianManager", (accounts) => { assert.isTrue(active, "the revoked guardian should still be active during the security period"); assert.equal(count, 2, "the revoked guardian should go through a security period"); - await manager.increaseTime(30); + await increaseTime(30); await guardianManager.confirmGuardianRevokation(wallet.address, guardian1); count = (await guardianStorage.guardianCount(wallet.address)).toNumber(); active = await guardianManager.isGuardian(wallet.address, guardian1); @@ -352,13 +353,13 @@ contract("GuardianManager", (accounts) => { it("should add a guardian after a revoke (blockchain transaction)", async () => { await guardianManager.from(owner).revokeGuardian(wallet.address, guardian1); - await manager.increaseTime(30); + await increaseTime(30); await guardianManager.confirmGuardianRevokation(wallet.address, guardian1); let count = (await guardianStorage.guardianCount(wallet.address)).toNumber(); assert.equal(count, 1, "there should be 1 guardian left"); await guardianManager.from(owner).addGuardian(wallet.address, guardian3); - await manager.increaseTime(30); + await increaseTime(30); await guardianManager.confirmGuardianAddition(wallet.address, guardian3); count = (await guardianStorage.guardianCount(wallet.address)).toNumber(); assert.equal(count, 2, "there should be 2 guardians again"); @@ -366,14 +367,14 @@ contract("GuardianManager", (accounts) => { it("should be able to remove a guardian that is the last in the list", async () => { await guardianManager.from(owner).addGuardian(wallet.address, guardian3); - await manager.increaseTime(30); + await increaseTime(30); await guardianManager.confirmGuardianAddition(wallet.address, guardian3); let count = await guardianStorage.guardianCount(wallet.address); assert.equal(count.toNumber(), 3, "there should be 3 guardians"); const guardians = await guardianStorage.getGuardians(wallet.address); await guardianManager.from(owner).revokeGuardian(wallet.address, guardians[2]); - await manager.increaseTime(30); + await increaseTime(30); await guardianManager.confirmGuardianRevokation(wallet.address, guardians[2]); count = await guardianStorage.guardianCount(wallet.address); assert.equal(count.toNumber(), 2, "there should be 2 guardians left"); @@ -391,7 +392,7 @@ contract("GuardianManager", (accounts) => { // Add guardian 2 and cancel its addition await guardianManager.from(owner).addGuardian(wallet.address, guardian2); await guardianManager.from(owner).cancelGuardianAddition(wallet.address, guardian2); - await manager.increaseTime(30); + await increaseTime(30); await assert.revertWith(guardianManager.confirmGuardianAddition(wallet.address, guardian2), "GM: no pending addition as guardian for target"); }); @@ -405,7 +406,7 @@ contract("GuardianManager", (accounts) => { // Revoke guardian 1 and cancel its revokation await guardianManager.from(owner).revokeGuardian(wallet.address, guardian1); await guardianManager.from(owner).cancelGuardianRevokation(wallet.address, guardian1); - await manager.increaseTime(30); + await increaseTime(30); await assert.revertWith(guardianManager.confirmGuardianRevokation(wallet.address, guardian1), "GM: no pending guardian revokation for target"); }); @@ -419,7 +420,7 @@ contract("GuardianManager", (accounts) => { // Add guardian 2 and cancel its addition await manager.relay(guardianManager, "addGuardian", [wallet.address, guardian2], wallet, [owner]); await manager.relay(guardianManager, "cancelGuardianAddition", [wallet.address, guardian2], wallet, [owner]); - await manager.increaseTime(30); + await increaseTime(30); await assert.revertWith(guardianManager.confirmGuardianAddition(wallet.address, guardian2), "GM: no pending addition as guardian for target"); }); @@ -428,7 +429,7 @@ contract("GuardianManager", (accounts) => { // Revoke guardian 1 and cancel its revokation await manager.relay(guardianManager, "revokeGuardian", [wallet.address, guardian1], wallet, [owner]); await manager.relay(guardianManager, "cancelGuardianRevokation", [wallet.address, guardian1], wallet, [owner]); - await manager.increaseTime(30); + await increaseTime(30); await assert.revertWith(guardianManager.confirmGuardianRevokation(wallet.address, guardian1), "GM: no pending guardian revokation for target"); }); diff --git a/test/lockManager.js b/test/lockManager.js index 4ce79e017..3f46819e7 100644 --- a/test/lockManager.js +++ b/test/lockManager.js @@ -13,6 +13,8 @@ const VersionManager = artifacts.require("VersionManager"); const TestManager = require("../utils/test-manager"); +const { increaseTime } = require("../utils/utilities.js"); + contract("LockManager", (accounts) => { const manager = new TestManager(); @@ -173,7 +175,7 @@ contract("LockManager", (accounts) => { let releaseTime = await lockManager.getLock(wallet.address); assert.isTrue(releaseTime > 0, "releaseTime should be positive"); - await manager.increaseTime(24 * 5 + 5); + await increaseTime(24 * 5 + 5); state = await lockManager.isLocked(wallet.address); assert.isFalse(state, "should be unlocked by guardian"); releaseTime = await lockManager.getLock(wallet.address); diff --git a/test/makerV2Manager_loan.js b/test/makerV2Manager_loan.js index b5503348e..2b4ffd3c9 100644 --- a/test/makerV2Manager_loan.js +++ b/test/makerV2Manager_loan.js @@ -2,7 +2,7 @@ const ethers = require("ethers"); const { - bigNumToBytes32, ETH_TOKEN, parseLogs, hasEvent, + bigNumToBytes32, ETH_TOKEN, parseLogs, hasEvent, increaseTime } = require("../utils/utilities.js"); const { deployMaker, deployUniswap, RAY, ETH_PER_DAI, ETH_PER_MKR, @@ -413,7 +413,7 @@ contract("MakerV2Loan", (accounts) => { const daiAmount = daiAmount_.add(parseEther("0.3")); const loanId = await testOpenLoan({ collateralAmount, daiAmount, relayed }); - await manager.increaseTime(3); // wait 3 seconds + await increaseTime(3); // wait 3 seconds const beforeDAI = await dai.balanceOf(wallet.address); const beforeETH = await deployer.provider.getBalance(wallet.address); await testChangeDebt({ @@ -463,7 +463,7 @@ contract("MakerV2Loan", (accounts) => { const loanId = await testOpenLoan({ collateralAmount, daiAmount, relayed }); // give some ETH to the wallet to be used for repayment await owner.send({ to: walletAddress, value: collateralAmount.mul(2) }); - await manager.increaseTime(3); // wait 3 seconds + await increaseTime(3); // wait 3 seconds const beforeDAI = await dai.balanceOf(wallet.contractAddress); const method = "closeLoan"; const params = [wallet.address, loanId]; diff --git a/test/recoveryManager.js b/test/recoveryManager.js index cf225f4fa..93c32670a 100644 --- a/test/recoveryManager.js +++ b/test/recoveryManager.js @@ -18,7 +18,8 @@ const { sortWalletByAddress, parseRelayReceipt, signOffchain, - getTimestamp + getTimestamp, + increaseTime } = require("../utils/utilities.js"); const WRONG_SIGNATURE_NUMBER_REVERT_MSG = "RM: Wrong number of signatures"; @@ -110,7 +111,7 @@ contract("RecoveryManager", (accounts) => { await guardianManager.from(owner).addGuardian(wallet.address, address); } - await manager.increaseTime(30); + await increaseTime(30); for (let i = 1; i < guardianAddresses.length; i += 1) { await guardianManager.confirmGuardianAddition(wallet.address, guardianAddresses[i]); } @@ -135,7 +136,7 @@ contract("RecoveryManager", (accounts) => { it("should let a majority of guardians execute the recovery procedure", async () => { const majority = guardians.slice(0, Math.ceil((guardians.length) / 2)); await manager.relay(recoveryManager, "executeRecovery", [wallet.address, newowner], wallet, sortWalletByAddress(majority)); - const timestamp = await getTimestamp(currentBlock); + const timestamp = await getTimestamp(); const isLocked = await lockManager.isLocked(wallet.address); assert.isTrue(isLocked, "should be locked by recovery"); @@ -193,7 +194,7 @@ contract("RecoveryManager", (accounts) => { function testFinalizeRecovery() { it("should let anyone finalize the recovery procedure after the recovery period", async () => { - await manager.increaseTime(40); // moving time to after the end of the recovery period + await increaseTime(40); // moving time to after the end of the recovery period await manager.relay(recoveryManager, "finalizeRecovery", [wallet.address], wallet, []); const isLocked = await lockManager.isLocked(wallet.address); assert.isFalse(isLocked, "should no longer be locked after finalization of recovery"); @@ -222,7 +223,7 @@ contract("RecoveryManager", (accounts) => { await manager.relay(recoveryManager, "cancelRecovery", [wallet.address], wallet, sortWalletByAddress([guardian1, guardian2])); const isLocked = await lockManager.isLocked(wallet.address); assert.isFalse(isLocked, "should no longer be locked by recovery"); - await manager.increaseTime(40); // moving time to after the end of the recovery period + await increaseTime(40); // moving time to after the end of the recovery period const txReceipt = await manager.relay(recoveryManager, "finalizeRecovery", [wallet.address], wallet, []); const { success, error } = parseRelayReceipt(txReceipt); assert.isFalse(success); @@ -240,7 +241,7 @@ contract("RecoveryManager", (accounts) => { await manager.relay(recoveryManager, "cancelRecovery", [wallet.address], wallet, [owner, guardian1]); const isLocked = await lockManager.isLocked(wallet.address); assert.isFalse(isLocked, "should no longer be locked by recovery"); - await manager.increaseTime(40); // moving time to after the end of the recovery period + await increaseTime(40); // moving time to after the end of the recovery period const txReceipt = await manager.relay(recoveryManager, "finalizeRecovery", [wallet.address], wallet, []); const { success, error } = parseRelayReceipt(txReceipt); assert.isFalse(success, "finalization should have failed"); diff --git a/test/transferManager.js b/test/transferManager.js index a15058f6c..b0eda14ce 100644 --- a/test/transferManager.js +++ b/test/transferManager.js @@ -27,7 +27,7 @@ const WETH = artifacts.require("WETH9"); const TestContract = artifacts.require("TestContract"); const utils = require("../utils/utilities.js"); -const { ETH_TOKEN } = require("../utils/utilities.js"); +const { ETH_TOKEN, increaseTime } = require("../utils/utilities.js"); const ETH_LIMIT = 1000000; const SECURITY_PERIOD = 2; @@ -177,7 +177,7 @@ contract("TransferManager", (accounts) => { await transferManager.from(owner).addToWhitelist(wallet.address, recipient); let isTrusted = await transferManager.isWhitelisted(wallet.address, recipient); assert.equal(isTrusted, false, "should not be trusted during the security period"); - await manager.increaseTime(3); + await increaseTime(3); isTrusted = await transferManager.isWhitelisted(wallet.address, recipient); assert.equal(isTrusted, true, "should be trusted after the security period"); await transferManager.from(owner).removeFromWhitelist(wallet.address, recipient); @@ -187,7 +187,7 @@ contract("TransferManager", (accounts) => { it("should not be able to whitelist a token twice", async () => { await transferManager.from(owner).addToWhitelist(wallet.address, recipient); - await manager.increaseTime(3); + await increaseTime(3); await assert.revertWith( transferManager.from(owner).addToWhitelist(wallet.address, recipient), "TT: target already whitelisted", ); @@ -197,7 +197,7 @@ contract("TransferManager", (accounts) => { await transferManager.from(owner).addToWhitelist(wallet.address, recipient); await transferManager.from(owner).removeFromWhitelist(wallet.address, recipient); - await manager.increaseTime(3); + await increaseTime(3); const isTrusted = await transferManager.isWhitelisted(wallet.address, recipient); assert.equal(isTrusted, false); }); @@ -279,7 +279,7 @@ contract("TransferManager", (accounts) => { // change the limit await previousTransferManager.from(owner).changeLimit(existingWallet.address, 4000000); - await manager.increaseTime(SECURITY_PERIOD + 1); + await increaseTime(SECURITY_PERIOD + 1); let limit = await previousTransferManager.getCurrentLimit(existingWallet.address); assert.equal(limit.toNumber(), 4000000, "limit should be changed"); // transfer some funds @@ -305,7 +305,7 @@ contract("TransferManager", (accounts) => { await transferManager.from(owner).changeLimit(wallet.address, 4000000); let limit = await transferManager.getCurrentLimit(wallet.address); assert.equal(limit.toNumber(), ETH_LIMIT, "limit should be ETH_LIMIT"); - await manager.increaseTime(SECURITY_PERIOD + 1); + await increaseTime(SECURITY_PERIOD + 1); limit = await transferManager.getCurrentLimit(wallet.address); assert.equal(limit.toNumber(), 4000000, "limit should be changed"); }); @@ -320,7 +320,7 @@ contract("TransferManager", (accounts) => { it("should change the limit via relayed transaction", async () => { await manager.relay(transferManager, "changeLimit", [wallet.address, 4000000], wallet, [owner]); - await manager.increaseTime(SECURITY_PERIOD + 1); + await increaseTime(SECURITY_PERIOD + 1); const limit = await transferManager.getCurrentLimit(wallet.address); assert.equal(limit.toNumber(), 4000000, "limit should be changed"); }); @@ -340,7 +340,7 @@ contract("TransferManager", (accounts) => { assert.isTrue(utils.hasEvent(txReceipt, transferManager, "DailyLimitDisabled")); let limitDisabled = await transferManager.isLimitDisabled(wallet.address); assert.isFalse(limitDisabled); - await manager.increaseTime(SECURITY_PERIOD + 1); + await increaseTime(SECURITY_PERIOD + 1); limitDisabled = await transferManager.isLimitDisabled(wallet.address); assert.isTrue(limitDisabled); }); @@ -422,7 +422,7 @@ contract("TransferManager", (accounts) => { [ACTION_TRANSFER, tokenAddress, recipient, amount, ZERO_BYTES32, txReceipt.blockNumber]); return id; } - await manager.increaseTime(delay); + await increaseTime(delay); tx = await transferManager.executePendingTransfer(wallet.address, tokenAddress, recipient, amount, ZERO_BYTES32, txReceipt.blockNumber); txReceipt = await transferManager.verboseWaitForTransaction(tx); @@ -551,7 +551,7 @@ contract("TransferManager", (accounts) => { const id = await doPendingTransfer({ token: ETH_TOKEN, to: recipient, amount: ETH_LIMIT * 2, delay: 0, }); - await manager.increaseTime(1); + await increaseTime(1); const tx = await transferManager.from(owner).cancelPendingTransfer(wallet.address, id); const txReceipt = await transferManager.verboseWaitForTransaction(tx); assert.isTrue(await utils.hasEvent(txReceipt, transferManager, "PendingTransferCanceled"), @@ -564,7 +564,7 @@ contract("TransferManager", (accounts) => { const id = await doPendingTransfer({ token: erc20, to: recipient, amount: ETH_LIMIT * 2, delay: 0, }); - await manager.increaseTime(1); + await increaseTime(1); const tx = await transferManager.from(owner).cancelPendingTransfer(wallet.address, id); const txReceipt = await transferManager.verboseWaitForTransaction(tx); assert.isTrue(await utils.hasEvent(txReceipt, transferManager, "PendingTransferCanceled"), @@ -575,13 +575,13 @@ contract("TransferManager", (accounts) => { it("should send immediately ETH to a whitelisted address", async () => { await transferManager.from(owner).addToWhitelist(wallet.address, recipient); - await manager.increaseTime(3); + await increaseTime(3); await doDirectTransfer({ token: ETH_TOKEN, to: recipient, amount: ETH_LIMIT * 2 }); }); it("should send immediately ERC20 to a whitelisted address", async () => { await transferManager.from(owner).addToWhitelist(wallet.address, recipient); - await manager.increaseTime(3); + await increaseTime(3); await doDirectTransfer({ token: erc20, to: recipient, amount: ETH_LIMIT * 2 }); }); }); @@ -637,7 +637,7 @@ contract("TransferManager", (accounts) => { it("should approve an ERC20 immediately when the spender is whitelisted ", async () => { await transferManager.from(owner).addToWhitelist(wallet.address, spender); - await manager.increaseTime(3); + await increaseTime(3); await doDirectApprove({ amount: ETH_LIMIT + 10000 }); }); @@ -698,7 +698,7 @@ contract("TransferManager", (accounts) => { it("should be able to call a supported token contract which is whitelisted", async () => { await transferManager.from(owner).addToWhitelist(wallet.address, erc20.address); - await manager.increaseTime(3); + await increaseTime(3); const dataToTransfer = erc20.contract.interface.functions.transfer.encode([infrastructure, 4]); const params = [wallet.address, erc20.address, 0, dataToTransfer]; await transferManager.from(owner).callContract(...params); @@ -714,7 +714,7 @@ contract("TransferManager", (accounts) => { it("should call a contract and transfer ETH value above the daily limit when the contract is whitelisted", async () => { await transferManager.from(owner).addToWhitelist(wallet.address, contract.address); - await manager.increaseTime(3); + await increaseTime(3); await doCallContract({ value: ETH_LIMIT + 10000, state: 6 }); }); @@ -826,7 +826,7 @@ contract("TransferManager", (accounts) => { it("should approve the token and call the contract when the token is above the limit and the contract is whitelisted ", async () => { await transferManager.from(owner).addToWhitelist(wallet.address, contract.address); - await manager.increaseTime(3); + await increaseTime(3); await doApproveTokenAndCallContract({ amount: ETH_LIMIT + 10000, state: 6 }); }); @@ -838,7 +838,7 @@ contract("TransferManager", (accounts) => { it("should approve token and call contract when contract != spender, amount > limit and contract is whitelisted", async () => { const consumer = await contract.tokenConsumer(); await transferManager.from(owner).addToWhitelist(wallet.address, contract.address); - await manager.increaseTime(3); + await increaseTime(3); await doApproveTokenAndCallContract({ amount: ETH_LIMIT + 10000, state: 6, consumer }); }); @@ -846,7 +846,7 @@ contract("TransferManager", (accounts) => { const amount = ETH_LIMIT + 10000; const consumer = await contract.tokenConsumer(); await transferManager.from(owner).addToWhitelist(wallet.address, consumer); - await manager.increaseTime(3); + await increaseTime(3); const dataToTransfer = contract.contract.interface.functions.setStateAndPayTokenWithConsumer.encode([6, erc20.address, amount]); await assert.revertWith( transferManager.from(owner).approveTokenAndCallContract( diff --git a/utils/defi-deployer.js b/utils/defi-deployer.js index 1594e3048..649e54d03 100644 --- a/utils/defi-deployer.js +++ b/utils/defi-deployer.js @@ -49,7 +49,7 @@ module.exports = { const tokenLiquidity = ethLiquidity.mul(WAD).div(ethPerToken[i]); await token["mint(address,uint256)"](infrastructure, tokenLiquidity); await token.from(infrastructure).approve(tokenExchange.address, tokenLiquidity); - const { timestamp } = await web3.eth.getBlock(blockN); + const { timestamp } = await web3.eth.getBlock("latest"); await tokenExchange.from(infrastructure).addLiquidity(1, tokenLiquidity, timestamp + 300, { value: ethLiquidity, gasLimit: 150000 }); } return { uniswapFactory }; diff --git a/utils/test-manager.js b/utils/test-manager.js index 037e6dd87..ae4758fd6 100644 --- a/utils/test-manager.js +++ b/utils/test-manager.js @@ -79,16 +79,6 @@ class TestManager { const txReceipt = await _module.verboseWaitForTransaction(tx); return txReceipt; } - - async increaseTime(seconds) { - if (this.network === "ganache") { - await this.provider.send("evm_increaseTime", seconds); - await this.provider.send("evm_mine"); - } else { - return new Promise((res) => { setTimeout(res, seconds * 1000); }); - } - return null; - } } module.exports = TestManager; diff --git a/utils/utilities.js b/utils/utilities.js index 97a9714d2..dbbd9908d 100644 --- a/utils/utilities.js +++ b/utils/utilities.js @@ -152,5 +152,15 @@ module.exports = { const blockN = !blockNumber ? "latest" : blockNumber; const { timestamp } = await web3.eth.getBlock(blockN); return timestamp; + }, + + async increaseTime(seconds) { + if (this.network === "ganache") { + await web3.currentProvider.send("evm_increaseTime", seconds); + await web3.currentProvider.send("evm_mine"); + } else { + return new Promise((res) => { setTimeout(res, seconds * 1000); }); + } + return null; } }; From 8fa002b18ed0e3d3b39eb98a1326f497c7fd2def Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Mon, 17 Aug 2020 09:38:54 +0300 Subject: [PATCH 018/113] Move getNonceForRelay function to utils --- deployment/999_benchmark.js | 4 ++-- test/recoveryManager.js | 5 +++-- test/relayer.js | 4 +--- utils/test-manager.js | 11 ++--------- utils/utilities.js | 7 +++++++ 5 files changed, 15 insertions(+), 16 deletions(-) diff --git a/deployment/999_benchmark.js b/deployment/999_benchmark.js index 00b89a4ff..eb6263b61 100644 --- a/deployment/999_benchmark.js +++ b/deployment/999_benchmark.js @@ -29,7 +29,7 @@ const TestManager = require("../utils/test-manager"); const MultisigExecutor = require("../utils/multisigexecutor.js"); const ETH_TOKEN = "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"; -const { sortWalletByAddress, increaseTime } = require("../utils/utilities.js"); +const { sortWalletByAddress, increaseTime, getNonceForRelay } = require("../utils/utilities.js"); class Logger { constructor() { @@ -467,7 +467,7 @@ class Benchmark { } async estimateSmallTransferRelayedWithRefund() { - const nonce = await this.testManager.getNonceForRelay(); + const nonce = await getNonceForRelay(); const relayParams = [ this.TransferManagerWrapper, "transferToken", diff --git a/test/recoveryManager.js b/test/recoveryManager.js index 93c32670a..741d82ade 100644 --- a/test/recoveryManager.js +++ b/test/recoveryManager.js @@ -19,7 +19,8 @@ const { parseRelayReceipt, signOffchain, getTimestamp, - increaseTime + increaseTime, + getNonceForRelay } = require("../utils/utilities.js"); const WRONG_SIGNATURE_NUMBER_REVERT_MSG = "RM: Wrong number of signatures"; @@ -465,7 +466,7 @@ contract("RecoveryManager", (accounts) => { }); it("should revert if an unknown method is executed", async () => { - const nonce = await manager.getNonceForRelay(); + const nonce = await getNonceForRelay(); const chainId = await manager.getChainId(); let methodData = recoveryManager.contract.interface.functions.executeRecovery.encode([wallet.address, ethers.constants.AddressZero]); // Replace the `executeRecovery` method signature: b0ba4da0 with a non-existent one: e0b6fcfc diff --git a/test/relayer.js b/test/relayer.js index 7ce5261ae..d2f2e186e 100644 --- a/test/relayer.js +++ b/test/relayer.js @@ -22,7 +22,7 @@ const VersionManager = artifacts.require("VersionManager"); const ERC20 = artifacts.require("TestERC20"); const TestManager = require("../utils/test-manager"); -const { ETH_TOKEN } = require("../utils/utilities.js"); +const { ETH_TOKEN, getNonceForRelay } = require("../utils/utilities.js"); const FEATURE_NOT_AUTHORISED_FOR_WALLET = "RM: feature not authorised"; const INVALID_DATA_REVERT_MSG = "RM: Invalid dataWallet"; @@ -35,8 +35,6 @@ const WRONG_NUMBER_SIGNATURES = "RM: Wrong number of signatures"; contract("RelayerManager", (accounts) => { const manager = new TestManager(); const { deployer } = manager; - let { getNonceForRelay } = manager; - getNonceForRelay = getNonceForRelay.bind(manager); const infrastructure = accounts[0]; const owner = accounts[1]; diff --git a/utils/test-manager.js b/utils/test-manager.js index ae4758fd6..2fddaa281 100644 --- a/utils/test-manager.js +++ b/utils/test-manager.js @@ -1,5 +1,5 @@ const ethers = require("ethers"); -const { signOffchain, ETH_TOKEN } = require("./utilities.js"); +const { signOffchain, ETH_TOKEN, getNonceForRelay } = require("./utilities.js"); class TestManager { constructor(network = "ganache") { @@ -7,13 +7,6 @@ class TestManager { this.provider = this.deployer.provider; } - async getNonceForRelay() { - const block = await this.provider.getBlockNumber(); - const timestamp = new Date().getTime(); - return `0x${ethers.utils.hexZeroPad(ethers.utils.hexlify(block), 16) - .slice(2)}${ethers.utils.hexZeroPad(ethers.utils.hexlify(timestamp), 16).slice(2)}`; - } - setRelayerManager(relayerManager) { this.relayerManager = relayerManager; } @@ -34,7 +27,7 @@ class TestManager { _refundToken = ETH_TOKEN, _refundAddress = ethers.constants.AddressZero, _gasLimitRelay = (_gasLimit * 1.1)) { - const nonce = _nonce || await this.getNonceForRelay(); + const nonce = _nonce || await getNonceForRelay(); const methodData = _module.contract.interface.functions[_method].encode(_params); const signatures = await signOffchain( _signers, diff --git a/utils/utilities.js b/utils/utilities.js index dbbd9908d..4e11bac1c 100644 --- a/utils/utilities.js +++ b/utils/utilities.js @@ -162,5 +162,12 @@ module.exports = { return new Promise((res) => { setTimeout(res, seconds * 1000); }); } return null; + }, + + async getNonceForRelay() { + const block = await web3.eth.getBlockNumber()(); + const timestamp = new Date().getTime(); + return `0x${ethers.utils.hexZeroPad(ethers.utils.hexlify(block), 16) + .slice(2)}${ethers.utils.hexZeroPad(ethers.utils.hexlify(timestamp), 16).slice(2)}`; } }; From 8498268964689063ed22f3bc55b62c92cea7920e Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Mon, 17 Aug 2020 10:06:10 +0300 Subject: [PATCH 019/113] Move network id functionality to utils --- test/recoveryManager.js | 5 +++-- utils/test-manager.js | 12 +++--------- utils/utilities.js | 13 ++++++++++++- 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/test/recoveryManager.js b/test/recoveryManager.js index 741d82ade..dbe16789c 100644 --- a/test/recoveryManager.js +++ b/test/recoveryManager.js @@ -20,7 +20,8 @@ const { signOffchain, getTimestamp, increaseTime, - getNonceForRelay + getNonceForRelay, + getNetworkId } = require("../utils/utilities.js"); const WRONG_SIGNATURE_NUMBER_REVERT_MSG = "RM: Wrong number of signatures"; @@ -467,7 +468,7 @@ contract("RecoveryManager", (accounts) => { it("should revert if an unknown method is executed", async () => { const nonce = await getNonceForRelay(); - const chainId = await manager.getChainId(); + const chainId = await getNetworkId(); let methodData = recoveryManager.contract.interface.functions.executeRecovery.encode([wallet.address, ethers.constants.AddressZero]); // Replace the `executeRecovery` method signature: b0ba4da0 with a non-existent one: e0b6fcfc methodData = methodData.replace("b0ba4da0", "e0b6fcfc"); diff --git a/utils/test-manager.js b/utils/test-manager.js index 2fddaa281..27c81f0bb 100644 --- a/utils/test-manager.js +++ b/utils/test-manager.js @@ -1,5 +1,5 @@ const ethers = require("ethers"); -const { signOffchain, ETH_TOKEN, getNonceForRelay } = require("./utilities.js"); +const { signOffchain, ETH_TOKEN, getNonceForRelay, getNetworkId } = require("./utilities.js"); class TestManager { constructor(network = "ganache") { @@ -11,13 +11,6 @@ class TestManager { this.relayerManager = relayerManager; } - getChainId() { - if (this.network === "ganache" || this.network.endsWith("-fork")) { - return 1; // ganache currently always uses 1 as chainId, see https://github.com/trufflesuite/ganache-core/issues/515 - } - return this.provider._network.chainId; - } - async relay(_module, _method, _params, _wallet, _signers, _relayer = this.accounts[9].signer, _estimate = false, @@ -29,13 +22,14 @@ class TestManager { _gasLimitRelay = (_gasLimit * 1.1)) { const nonce = _nonce || await getNonceForRelay(); const methodData = _module.contract.interface.functions[_method].encode(_params); + const networkId = await getNetworkId(); const signatures = await signOffchain( _signers, this.relayerManager.address, _module.address, 0, methodData, - this.getChainId(), + networkId, nonce, _gasPrice, _gasLimit, diff --git a/utils/utilities.js b/utils/utilities.js index 4e11bac1c..f0f092e77 100644 --- a/utils/utilities.js +++ b/utils/utilities.js @@ -154,8 +154,19 @@ module.exports = { return timestamp; }, + async getNetworkId() { + // if (this.network === "ganache" || this.network.endsWith("-fork")) { + // return 1; // ganache currently always uses 1 as chainId, see https://github.com/trufflesuite/ganache-core/issues/515 + // } + const networkId = await web3.eth.net.getId(); + return networkId; + }, + async increaseTime(seconds) { - if (this.network === "ganache") { + const networkId = await getNetworkId(); + console.log("networkId", networkId) + // TODO + if (networkId === "ganache") { await web3.currentProvider.send("evm_increaseTime", seconds); await web3.currentProvider.send("evm_mine"); } else { From c29e115679e84c26271b217c05b6832072761e5a Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Mon, 17 Aug 2020 10:16:57 +0300 Subject: [PATCH 020/113] Move getBalance function to utils --- .eslintrc | 3 ++- deployment/999_benchmark.js | 4 ++-- test/approvedTransfer.js | 20 ++++++++--------- test/baseWallet.js | 14 +++++------- test/compoundManager_invest.js | 4 ++-- test/compoundManager_loan.js | 25 +++++++++------------ test/guardianManager.js | 4 ++-- test/kyber.js | 15 +++++-------- test/lockManager.js | 4 ++-- test/makerV2Manager_invest.js | 3 +-- test/makerV2Manager_loan.js | 22 +++++++++--------- test/multisig.js | 8 ++----- test/nftTransfer.js | 4 ++-- test/proxy.js | 9 +++----- test/recoveryManager.js | 4 ++-- test/relayer.js | 19 ++++++++-------- test/simpleUpgrader.js | 4 ++-- test/tokenExchanger.js | 8 +++---- test/transferManager.js | 24 ++++++++++---------- test/upgraderToVersionManager.js | 4 ++-- test/versionManager.js | 4 ++-- utils/{test-manager.js => relay-manager.js} | 9 ++------ utils/utilities.js | 5 +++++ 23 files changed, 97 insertions(+), 123 deletions(-) rename utils/{test-manager.js => relay-manager.js} (91%) diff --git a/.eslintrc b/.eslintrc index def534a8d..146dd8d60 100644 --- a/.eslintrc +++ b/.eslintrc @@ -19,7 +19,8 @@ "no-restricted-syntax": "off", "guard-for-in": "off", "function-paren-newline": "off", - "comma-dangle": "off" + "comma-dangle": "off", + "object-curly-newline": "off" }, "parserOptions": { "ecmaVersion": 2018 diff --git a/deployment/999_benchmark.js b/deployment/999_benchmark.js index eb6263b61..b21324b29 100644 --- a/deployment/999_benchmark.js +++ b/deployment/999_benchmark.js @@ -25,7 +25,7 @@ const RelayerManager = artifacts.require("RelayerManager"); const VersionManager = require("../build/VersionManager"); const DeployManager = require("../utils/deploy-manager"); -const TestManager = require("../utils/test-manager"); +const RelayManager = require("../utils/relay-manager"); const MultisigExecutor = require("../utils/multisigexecutor.js"); const ETH_TOKEN = "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"; @@ -106,7 +106,7 @@ class Benchmark { this.accounts = this.signers.map((s) => s._address); this.config = config; - this.testManager = new TestManager(); + this.testManager = new RelayManager(); // Features this.GuardianManagerWrapper = await this.deployer.wrapDeployedContract(GuardianManager, config.modules.GuardianManager); diff --git a/test/approvedTransfer.js b/test/approvedTransfer.js index f586f515f..f26ee5ab8 100644 --- a/test/approvedTransfer.js +++ b/test/approvedTransfer.js @@ -16,8 +16,8 @@ const WETH = artifacts.require("WETH9"); const TestContract = artifacts.require("TestContract"); const TestLimitFeature = artifacts.require("TestLimitFeature"); -const TestManager = require("../utils/test-manager"); -const { sortWalletByAddress, parseRelayReceipt, ETH_TOKEN, increaseTime } = require("../utils/utilities.js"); +const RelayManager = require("../utils/relay-manager"); +const { sortWalletByAddress, parseRelayReceipt, ETH_TOKEN, increaseTime, getBalance } = require("../utils/utilities.js"); const ZERO_BYTES32 = ethers.constants.HashZero; @@ -25,7 +25,7 @@ const WRONG_SIGNATURE_NUMBER_REVERT_MSG = "RM: Wrong number of signatures"; const INVALID_SIGNATURES_REVERT_MSG = "RM: Invalid signatures"; contract("ApprovedTransfer", (accounts) => { - const manager = new TestManager(); + const manager = new RelayManager(); const infrastructure = accounts[0]; const owner = accounts[1]; @@ -34,7 +34,6 @@ contract("ApprovedTransfer", (accounts) => { const guardian3 = accounts[4]; const recipient = accounts[5]; - let deployer; let wallet; let walletImplementation; let guardianManager; @@ -48,7 +47,6 @@ contract("ApprovedTransfer", (accounts) => { let versionManager; before(async () => { - deployer = manager.newDeployer(); weth = await WETH.new() const registry = await Registry.new() const lockStorage = await LockStorage.new() @@ -123,7 +121,7 @@ contract("ApprovedTransfer", (accounts) => { async function createSmartContractGuardians(guardians) { const wallets = []; for (const g of guardians) { - const guardianWallet = await deployer.deploy(BaseWallet); + const guardianWallet = await BaseWallet.new(); await guardianWallet.init(g, [versionManager.address]); await versionManager.from(g).upgradeWallet(guardianWallet.address, await versionManager.lastVersion()); wallets.push(guardianWallet); @@ -133,20 +131,20 @@ contract("ApprovedTransfer", (accounts) => { async function transferToken(_token, _signers) { const to = recipient; - const before = _token === ETH_TOKEN ? await deployer.provider.getBalance(to) : await erc20.balanceOf(to); + const before = _token === ETH_TOKEN ? await getBalance(to) : await erc20.balanceOf(to); await manager.relay(approvedTransfer, "transferToken", [wallet.address, _token, to, amountToTransfer, ZERO_BYTES32], wallet, _signers); - const after = _token === ETH_TOKEN ? await deployer.provider.getBalance(to) : await erc20.balanceOf(to); + const after = _token === ETH_TOKEN ? await getBalance(to) : await erc20.balanceOf(to); assert.equal(after.sub(before).toNumber(), amountToTransfer, "should have transfered the amount"); } async function callContract(_signers) { - const before = await deployer.provider.getBalance(contract.address); + const before = await getBalance(contract.address); const newState = parseInt((await contract.state()).toString(), 10) + 1; const dataToTransfer = contract.contract.interface.functions.setState.encode([newState]); await manager.relay(approvedTransfer, "callContract", [wallet.address, contract.address, amountToTransfer, dataToTransfer], wallet, _signers); - const after = await deployer.provider.getBalance(contract.address); + const after = await getBalance(contract.address); assert.equal(after.sub(before).toNumber(), amountToTransfer, "should have transfered the ETH amount"); assert.equal((await contract.state()).toNumber(), newState, "the state of the external contract should have been changed"); } @@ -267,7 +265,7 @@ contract("ApprovedTransfer", (accounts) => { describe("Contract call", () => { it("should fail to call contract on a wallet with no guardian", async () => { - contract = await deployer.deploy(TestContract); + contract = await TestContract.new(); const dataToTransfer = contract.contract.interface.functions.setState.encode([1]); await assert.revertWith( diff --git a/test/baseWallet.js b/test/baseWallet.js index 098402ccd..4d34a5848 100644 --- a/test/baseWallet.js +++ b/test/baseWallet.js @@ -12,15 +12,12 @@ const GuardianStorage = artifacts.require("GuardianStorage"); const LockStorage = artifacts.require("LockStorage"); const TestFeature = artifacts.require("TestFeature"); -const TestManager = require("../utils/test-manager"); +const { getBalance } = require("../utils/utilities.js"); contract("BaseWallet", (accounts) => { - const manager = new TestManager(); - const owner = accounts[1]; const nonowner = accounts[2]; - let deployer; let wallet; let walletImplementation; let registry; @@ -47,7 +44,6 @@ contract("BaseWallet", (accounts) => { } before(async () => { - deployer = manager.newDeployer(); registry = await Registry.new(); guardianStorage = await GuardianStorage.new(); lockStorage = await LockStorage.new(); @@ -143,16 +139,16 @@ contract("BaseWallet", (accounts) => { describe("Receiving ETH", () => { it("should accept ETH", async () => { - const before = await deployer.provider.getBalance(wallet.address); + const before = await getBalance(wallet.address); await wallet.send(50000000); - const after = await deployer.provider.getBalance(wallet.address); + const after = await getBalance(wallet.address); assert.equal(after.sub(before).toNumber(), 50000000, "should have received ETH"); }); it("should accept ETH with data", async () => { - const before = await deployer.provider.getBalance(wallet.address); + const before = await getBalance(wallet.address); await wallet.send(50000000, { data: 0x1234 }); - const after = await deployer.provider.getBalance(wallet.address); + const after = await getBalance(wallet.address); assert.equal(after.sub(before).toNumber(), 50000000, "should have received ETH"); }); }); diff --git a/test/compoundManager_invest.js b/test/compoundManager_invest.js index 9ddd7e641..7b257d8a3 100644 --- a/test/compoundManager_invest.js +++ b/test/compoundManager_invest.js @@ -28,10 +28,10 @@ const ETH_EXCHANGE_RATE = ethers.BigNumber.from("200000000000000000000000000"); const ERC20 = artifacts.require("TestERC20"); const { ETH_TOKEN, increaseTime } = require("../utils/utilities.js"); -const TestManager = require("../utils/test-manager"); +const RelayManager = require("../utils/relay-manager"); contract("Invest Manager with Compound", (accounts) => { - const manager = new TestManager(); + const manager = new RelayManager(); const infrastructure = accounts[0]; const owner = accounts[1]; diff --git a/test/compoundManager_loan.js b/test/compoundManager_loan.js index e1234a9c0..9c5f08fc8 100644 --- a/test/compoundManager_loan.js +++ b/test/compoundManager_loan.js @@ -29,20 +29,19 @@ const ETH_EXCHANGE_RATE = ethers.BigNumber.from("200000000000000000000000000"); const ERC20 = artifacts.require("TestERC20"); -const { ETH_TOKEN } = require("../utils/utilities.js"); -const TestManager = require("../utils/test-manager"); +const { ETH_TOKEN, getBalance } = require("../utils/utilities.js"); +const RelayManager = require("../utils/relay-manager"); const ZERO_BYTES32 = ethers.constants.HashZero; contract("Loan Module", (accounts) => { - const manager = new TestManager(); + const manager = new RelayManager(); const infrastructure = accounts[0]; const owner = accounts[1]; const liquidityProvider = accounts[2]; const borrower = accounts[3]; - let deployer; let wallet; let walletImplementation; let loanManager; @@ -59,8 +58,6 @@ contract("Loan Module", (accounts) => { let versionManager; before(async () => { - deployer = manager.newDeployer(); - /* Deploy Compound V2 Architecture */ // deploy price oracle @@ -184,9 +181,9 @@ contract("Loan Module", (accounts) => { async function testOpenLoan({ collateral, collateralAmount, debt, debtAmount, relayed, }) { - const collateralBefore = (collateral === ETH_TOKEN) ? await deployer.provider.getBalance(wallet.address) + const collateralBefore = (collateral === ETH_TOKEN) ? await getBalance(wallet.address) : await collateral.balanceOf(wallet.address); - const debtBefore = (debt === ETH_TOKEN) ? await deployer.provider.getBalance(wallet.address) + const debtBefore = (debt === ETH_TOKEN) ? await getBalance(wallet.address) : await debt.balanceOf(wallet.address); const params = [ @@ -206,9 +203,9 @@ contract("Loan Module", (accounts) => { const loanId = (await utils.parseLogs(txReceipt, loanManager, "LoanOpened"))[0]._loanId; assert.isDefined(loanId, "Loan ID should be defined"); - const collateralAfter = (collateral === ETH_TOKEN) ? await deployer.provider.getBalance(wallet.address) + const collateralAfter = (collateral === ETH_TOKEN) ? await getBalance(wallet.address) : await collateral.balanceOf(wallet.address); - const debtAfter = (debt === ETH_TOKEN) ? await deployer.provider.getBalance(wallet.address) + const debtAfter = (debt === ETH_TOKEN) ? await getBalance(wallet.address) : await debt.balanceOf(wallet.address); assert.isTrue(collateralBefore.sub(collateralAfter).eq(collateralAmount), @@ -221,7 +218,7 @@ contract("Loan Module", (accounts) => { async function testChangeCollateral({ loanId, collateral, amount, add, relayed, }) { - const collateralBalanceBefore = (collateral === ETH_TOKEN) ? await deployer.provider.getBalance(wallet.address) + const collateralBalanceBefore = (collateral === ETH_TOKEN) ? await getBalance(wallet.address) : await collateral.balanceOf(wallet.address); const method = add ? "addCollateral" : "removeCollateral"; @@ -237,7 +234,7 @@ contract("Loan Module", (accounts) => { const tx = await loanManager.from(owner)[method](...params); txReceipt = await loanManager.verboseWaitForTransaction(tx); } - const collateralBalanceAfter = (collateral === ETH_TOKEN) ? await deployer.provider.getBalance(wallet.address) + const collateralBalanceAfter = (collateral === ETH_TOKEN) ? await getBalance(wallet.address) : await collateral.balanceOf(wallet.address); if (add) { assert.isTrue(await utils.hasEvent(txReceipt, loanManager, "CollateralAdded"), "should have generated CollateralAdded event"); @@ -253,7 +250,7 @@ contract("Loan Module", (accounts) => { async function testChangeDebt({ loanId, debtToken, amount, add, relayed, }) { - const debtBalanceBefore = (debtToken === ETH_TOKEN) ? await deployer.provider.getBalance(wallet.address) + const debtBalanceBefore = (debtToken === ETH_TOKEN) ? await getBalance(wallet.address) : await debtToken.balanceOf(wallet.address); const method = add ? "addDebt" : "removeDebt"; @@ -269,7 +266,7 @@ contract("Loan Module", (accounts) => { const tx = await loanManager.from(owner)[method](...params); txReceipt = await loanManager.verboseWaitForTransaction(tx); } - const debtBalanceAfter = (debtToken === ETH_TOKEN) ? await deployer.provider.getBalance(wallet.address) + const debtBalanceAfter = (debtToken === ETH_TOKEN) ? await getBalance(wallet.address) : await debtToken.balanceOf(wallet.address); if (add) { assert.isTrue(await utils.hasEvent(txReceipt, loanManager, "DebtAdded"), "should have generated DebtAdded event"); diff --git a/test/guardianManager.js b/test/guardianManager.js index 2401bd782..8531b516a 100644 --- a/test/guardianManager.js +++ b/test/guardianManager.js @@ -12,11 +12,11 @@ const Registry = artifacts.require("ModuleRegistry"); const DumbContract = artifacts.require("TestContract"); const NonCompliantGuardian = artifacts.require("NonCompliantGuardian"); -const TestManager = require("../utils/test-manager"); +const RelayManager = require("../utils/relay-manager"); const { increaseTime } = require("../utils/utilities.js"); contract("GuardianManager", (accounts) => { - const manager = new TestManager(accounts); + const manager = new RelayManager(); const owner = accounts[1]; const guardian1 = accounts[2]; diff --git a/test/kyber.js b/test/kyber.js index bde090cb7..c04c7d260 100644 --- a/test/kyber.js +++ b/test/kyber.js @@ -4,24 +4,19 @@ const ethers = require("ethers"); const KyberNetwork = artifacts.require("KyberNetworkTest"); const ERC20 = artifacts.require("TestERC20"); -const TestManager = require("../utils/test-manager"); -const { ETH_TOKEN } = require("../utils/utilities.js"); +const { ETH_TOKEN, getBalance } = require("../utils/utilities.js"); const ERC20_SUPPLY = 10000000; const ERC20_DECIMALS = 18; const ERC20_RATE = 51 * 10 ** 13; // 1 ERC20 = 0.00051 ETH contract("KyberNetwork", (accounts) => { - const manager = new TestManager(); - const trader = accounts[1]; - let deployer; let erc20; let kyber; beforeEach(async () => { - deployer = manager.newDeployer(); kyber = await KyberNetwork.new(); erc20 = await ERC20.new([kyber.address], ERC20_SUPPLY, ERC20_DECIMALS); await kyber.addToken(erc20.address, ERC20_RATE, ERC20_DECIMALS); @@ -34,12 +29,12 @@ contract("KyberNetwork", (accounts) => { it("should exchange ETH for ERC20", async () => { const beforeERC20 = await erc20.balanceOf(trader); - const beforeETH = await deployer.provider.getBalance(trader); + const beforeETH = await getBalance(trader); assert.equal(beforeERC20.toNumber(), 0, "trader should have no ERC20"); await kyber.from(trader).trade(ETH_TOKEN, 10000, erc20.address, trader, ethers.BigNumber.from("10000000000000000000000"), 1, "0x0000000000000000000000000000000000000000", { value: 10000 }); const afterERC20 = await erc20.balanceOf(trader); - const afterETH = await deployer.provider.getBalance(trader); + const afterETH = await getBalance(trader); assert.equal(beforeETH.sub(afterETH).gt(10000), true, "trader should have exchanged 10000 wei"); assert.equal(afterERC20.gt(0), true, "trader should have received ERC20"); }); @@ -57,7 +52,7 @@ contract("KyberNetwork", (accounts) => { { value: ethers.BigNumber.from("1000000000000000000") }, ); const beforeERC20 = await erc20.balanceOf(trader); - const beforeETH = await deployer.provider.getBalance(trader); + const beforeETH = await getBalance(trader); assert.equal(beforeERC20 > 0, true, "trader should have some ERC20"); // exchange ERC20 const srcAmount = beforeERC20.div(ethers.BigNumber.from(2)); @@ -65,7 +60,7 @@ contract("KyberNetwork", (accounts) => { await kyber.from(trader).trade(erc20.address, srcAmount, ETH_TOKEN, trader, ethers.BigNumber.from("10000000000000000000000"), 1, "0x0000000000000000000000000000000000000000"); const afterERC20 = await erc20.balanceOf(trader); - const afterETH = await deployer.provider.getBalance(trader); + const afterETH = await getBalance(trader); assert.equal(beforeERC20.sub(afterERC20).eq(srcAmount), true, "trader should have exchanged ERC20"); assert.equal(afterETH.sub(beforeETH).gt(0), true, "trader should have received wei"); }); diff --git a/test/lockManager.js b/test/lockManager.js index 3f46819e7..c569d49f6 100644 --- a/test/lockManager.js +++ b/test/lockManager.js @@ -11,12 +11,12 @@ const Registry = artifacts.require("ModuleRegistry"); const RecoveryManager = artifacts.require("RecoveryManager"); const VersionManager = artifacts.require("VersionManager"); -const TestManager = require("../utils/test-manager"); +const RelayManager = require("../utils/relay-manager"); const { increaseTime } = require("../utils/utilities.js"); contract("LockManager", (accounts) => { - const manager = new TestManager(); + const manager = new RelayManager(); const owner = accounts[1]; const guardian1 = accounts[2]; diff --git a/test/makerV2Manager_invest.js b/test/makerV2Manager_invest.js index 658ccc669..04690ccf1 100644 --- a/test/makerV2Manager_invest.js +++ b/test/makerV2Manager_invest.js @@ -4,7 +4,6 @@ const ethers = require("ethers"); const { deployMaker, deployUniswap, WAD, ETH_PER_DAI, ETH_PER_MKR, } = require("../utils/defi-deployer"); -const TestManager = require("../utils/test-manager"); const Registry = artifacts.require("ModuleRegistry"); const MakerV2Manager = artifacts.require("MakerV2Manager"); const Proxy = artifacts.require("Proxy"); @@ -18,7 +17,7 @@ const VersionManager = artifacts.require("VersionManager"); const DAI_SENT = WAD.div(100000000); contract("MakerV2Invest", (accounts) => { - const manager = new TestManager(); + const manager = new RelayManager(); const { deployer } = manager; const infrastructure = accounts[0]; diff --git a/test/makerV2Manager_loan.js b/test/makerV2Manager_loan.js index 2b4ffd3c9..653d3fa3c 100644 --- a/test/makerV2Manager_loan.js +++ b/test/makerV2Manager_loan.js @@ -2,7 +2,7 @@ const ethers = require("ethers"); const { - bigNumToBytes32, ETH_TOKEN, parseLogs, hasEvent, increaseTime + bigNumToBytes32, ETH_TOKEN, parseLogs, hasEvent, increaseTime, getBalance } = require("../utils/utilities.js"); const { deployMaker, deployUniswap, RAY, ETH_PER_DAI, ETH_PER_MKR, @@ -11,7 +11,6 @@ const { const { parseEther, formatBytes32String } = ethers.utils; const { AddressZero } = ethers.constants; -const TestManager = require("../utils/test-manager"); const GemJoin = artifacts.require("GemJoin"); const Registry = artifacts.require("ModuleRegistry"); @@ -32,8 +31,7 @@ const RelayerManager = artifacts.require("RelayerManager"); const VersionManager = artifacts.require("VersionManager"); contract("MakerV2Loan", (accounts) => { - const manager = new TestManager(); - const { deployer } = manager; + const manager = new RelayManager(); const infrastructure = accounts[0]; const owner = accounts[1]; @@ -155,7 +153,7 @@ contract("MakerV2Loan", (accounts) => { collateralAmount, daiAmount, relayed, collateral = { contractAddress: ETH_TOKEN }, }) { const beforeCollateral = (collateral.address === ETH_TOKEN) - ? await deployer.provider.getBalance(walletAddress) + ? await getBalance(walletAddress) : await collateral.balanceOf(walletAddress); const beforeDAI = await dai.balanceOf(walletAddress); @@ -175,7 +173,7 @@ contract("MakerV2Loan", (accounts) => { assert.isDefined(loanId, "Loan ID should be defined"); const afterCollateral = (collateral.address === ETH_TOKEN) - ? await deployer.provider.getBalance(walletAddress) + ? await getBalance(walletAddress) : await collateral.balanceOf(walletAddress); const afterDAI = await dai.balanceOf(walletAddress); const afterDAISupply = await dai.totalSupply(); @@ -247,7 +245,7 @@ contract("MakerV2Loan", (accounts) => { loanId, collateralAmount, add, relayed, collateral = { contractAddress: ETH_TOKEN }, makerV2Manager = makerV2, }) { const beforeCollateral = (collateral.address === ETH_TOKEN) - ? await deployer.provider.getBalance(walletAddress) + ? await getBalance(walletAddress) : await collateral.balanceOf(walletAddress); const method = add ? "addCollateral" : "removeCollateral"; @@ -260,7 +258,7 @@ contract("MakerV2Loan", (accounts) => { } const afterCollateral = (collateral.address === ETH_TOKEN) - ? await deployer.provider.getBalance(walletAddress) + ? await getBalance(walletAddress) : await collateral.balanceOf(walletAddress); const expectedCollateralChange = collateralAmount.mul(add ? -1 : 1).toString(); @@ -346,7 +344,7 @@ contract("MakerV2Loan", (accounts) => { loanId, daiAmount, add, relayed, }) { const beforeDAI = await dai.balanceOf(wallet.address); - const beforeETH = await deployer.provider.getBalance(wallet.address); + const beforeETH = await getBalance(wallet.address); const method = add ? "addDebt" : "removeDebt"; const params = [wallet.address, loanId, dai.address, daiAmount]; if (relayed) { @@ -356,7 +354,7 @@ contract("MakerV2Loan", (accounts) => { await makerV2.from(owner)[method](...params, { gasLimit: 2000000 }); } const afterDAI = await dai.balanceOf(wallet.address); - const afterETH = await deployer.provider.getBalance(wallet.address); + const afterETH = await getBalance(wallet.address); if (add) { assert.equal( afterDAI.sub(beforeDAI).toString(), @@ -415,13 +413,13 @@ contract("MakerV2Loan", (accounts) => { const loanId = await testOpenLoan({ collateralAmount, daiAmount, relayed }); await increaseTime(3); // wait 3 seconds const beforeDAI = await dai.balanceOf(wallet.address); - const beforeETH = await deployer.provider.getBalance(wallet.address); + const beforeETH = await getBalance(wallet.address); await testChangeDebt({ loanId, daiAmount: parseEther("0.2"), add: false, relayed, }); const afterDAI = await dai.balanceOf(wallet.address); - const afterETH = await deployer.provider.getBalance(wallet.address); + const afterETH = await getBalance(wallet.address); assert.isTrue(afterDAI.lt(beforeDAI) && afterETH.eq(beforeETH), "should have less DAI"); } diff --git a/test/multisig.js b/test/multisig.js index 67efcec36..a84890d73 100644 --- a/test/multisig.js +++ b/test/multisig.js @@ -2,19 +2,16 @@ const MultiSigWallet = artifacts.require("MultiSigWallet"); const TestRegistry = artifacts.require("TestRegistry"); -const TestManager = require("../utils/test-manager"); const MultisigExecutor = require("../utils/multisigexecutor.js"); const utils = require("../utils/utilities.js"); contract("MultiSigWallet", (accounts) => { - const manager = new TestManager(); const owner = accounts[0]; const owner1 = accounts[1]; const owner2 = accounts[2]; const owner3 = accounts[3]; const newowner = accounts[4]; - let deployer; let multisig; let reg; let value; @@ -22,7 +19,6 @@ contract("MultiSigWallet", (accounts) => { let owners; before(async () => { - deployer = manager.newDeployer(); number = 12345; value = 10000000000; owners = utils.sortWalletByAddress([owner1, owner2, owner3]); @@ -36,7 +32,7 @@ contract("MultiSigWallet", (accounts) => { // Fund the multisig await multisig.send(value); - const bal = await deployer.provider.getBalance(multisig.address); + const bal = await utils.getBalance(multisig.address); assert.equal(bal.toNumber(), value); }); @@ -72,7 +68,7 @@ contract("MultiSigWallet", (accounts) => { assert.equal(numFromRegistry.toNumber(), number); // Check funds in registry - const bal = await deployer.provider.getBalance(reg.address); + const bal = await utils.getBalance(reg.address); assert.equal(bal.toString(), value.toString()); // Check nonce updated diff --git a/test/nftTransfer.js b/test/nftTransfer.js index 2d3c65382..8d5d6065b 100644 --- a/test/nftTransfer.js +++ b/test/nftTransfer.js @@ -18,11 +18,11 @@ const ERC20Approver = artifacts.require("ERC20Approver"); const ZERO_BYTES32 = ethers.constants.HashZero; -const TestManager = require("../utils/test-manager"); +const RelayManager = require("../utils/relay-manager"); const { parseRelayReceipt, callStatic } = require("../utils/utilities.js"); contract("NftTransfer", (accounts) => { - const manager = new TestManager(); + const manager = new RelayManager(); const infrastructure = accounts[0]; const owner1 = accounts[1]; diff --git a/test/proxy.js b/test/proxy.js index a796e0516..4d5e891b8 100644 --- a/test/proxy.js +++ b/test/proxy.js @@ -1,7 +1,7 @@ /* global artifacts */ const ethers = require("ethers"); -const TestManager = require("../utils/test-manager"); +const { getBalance } = require("../utils/utilities.js"); const Proxy = artifacts.require("Proxy"); const BaseWallet = artifacts.require("BaseWallet"); @@ -11,7 +11,6 @@ const Registry = artifacts.require("ModuleRegistry"); contract("Proxy", (accounts) => { const owner = accounts[1]; - let deployer; let walletImplementation; let wallet; let proxy; @@ -32,8 +31,6 @@ contract("Proxy", (accounts) => { } before(async () => { - const manager = new TestManager(); - deployer = manager.newDeployer(); registry = await Registry.new(); walletImplementation = await BaseWallet.new(); module1 = await deployTestModule(); @@ -65,9 +62,9 @@ contract("Proxy", (accounts) => { }); it("should accept ETH", async () => { - const before = await deployer.provider.getBalance(wallet.address); + const before = await getBalance(wallet.address); await wallet.send(50000000); - const after = await deployer.provider.getBalance(wallet.address); + const after = await getBalance(wallet.address); assert.equal(after.sub(before).toNumber(), 50000000, "should have received ETH"); }); }); diff --git a/test/recoveryManager.js b/test/recoveryManager.js index dbe16789c..1d368f0c9 100644 --- a/test/recoveryManager.js +++ b/test/recoveryManager.js @@ -12,7 +12,7 @@ const Registry = artifacts.require("ModuleRegistry"); const RelayerManager = artifacts.require("RelayerManager"); const VersionManager = artifacts.require("VersionManager"); -const TestManager = require("../utils/test-manager"); +const RelayManager = require("../utils/relay-manager"); const { ETH_TOKEN, sortWalletByAddress, @@ -28,7 +28,7 @@ const WRONG_SIGNATURE_NUMBER_REVERT_MSG = "RM: Wrong number of signatures"; const INVALID_SIGNATURES_REVERT_MSG = "RM: Invalid signatures"; contract("RecoveryManager", (accounts) => { - const manager = new TestManager(); + const manager = new RelayManager(); const owner = accounts[1]; const guardian1 = accounts[2]; diff --git a/test/relayer.js b/test/relayer.js index d2f2e186e..851f6f6f4 100644 --- a/test/relayer.js +++ b/test/relayer.js @@ -2,7 +2,7 @@ const ethers = require("ethers"); const BN = require("bn.js"); const { formatBytes32String } = require("ethers").utils; -const { parseRelayReceipt, hasEvent } = require("../utils/utilities.js"); +const { parseRelayReceipt, hasEvent, getBalance } = require("../utils/utilities.js"); const Proxy = artifacts.require("Proxy"); const BaseWallet = artifacts.require("BaseWallet"); @@ -21,7 +21,7 @@ const RecoveryManager = artifacts.require("RecoveryManager"); // non-owner only const VersionManager = artifacts.require("VersionManager"); const ERC20 = artifacts.require("TestERC20"); -const TestManager = require("../utils/test-manager"); +const RelayManager = require("../utils/relay-manager"); const { ETH_TOKEN, getNonceForRelay } = require("../utils/utilities.js"); const FEATURE_NOT_AUTHORISED_FOR_WALLET = "RM: feature not authorised"; @@ -33,8 +33,7 @@ const GAS_LESS_THAN_GASLIMIT = "RM: not enough gas provided"; const WRONG_NUMBER_SIGNATURES = "RM: Wrong number of signatures"; contract("RelayerManager", (accounts) => { - const manager = new TestManager(); - const { deployer } = manager; + const manager = new RelayManager(); const infrastructure = accounts[0]; const owner = accounts[1]; @@ -290,11 +289,11 @@ contract("RelayerManager", (accounts) => { it("should refund in ETH", async () => { await provisionFunds(ethers.BigNumber.from("100000000000000"), 0); - const wBalanceStart = await deployer.provider.getBalance(wallet.address); - const rBalanceStart = await deployer.provider.getBalance(recipient); + const wBalanceStart = await getBalance(wallet.address); + const rBalanceStart = await getBalance(recipient); await callAndRefund({ refundToken: ETH_TOKEN }); - const wBalanceEnd = await deployer.provider.getBalance(wallet.address); - const rBalanceEnd = await deployer.provider.getBalance(recipient); + const wBalanceEnd = await getBalance(wallet.address); + const rBalanceEnd = await getBalance(recipient); const refund = wBalanceStart.sub(wBalanceEnd); assert.isTrue(refund.gt(0), "should have refunded ETH"); assert.isTrue(refund.eq(rBalanceEnd.sub(rBalanceStart)), "should have refunded the recipient"); @@ -344,7 +343,7 @@ contract("RelayerManager", (accounts) => { await setLimitAndDailySpent({ limit: 1000000000, alreadySpent: 10 }); let dailySpent = await limitFeature.getDailySpent(wallet.address); assert.isTrue(dailySpent.toNumber() === 10, "initial daily spent should be 10"); - const rBalanceStart = await deployer.provider.getBalance(recipient); + const rBalanceStart = await getBalance(recipient); // add a guardian await guardianManager.from(owner).addGuardian(wallet.address, guardian); // call approvedTransfer @@ -368,7 +367,7 @@ contract("RelayerManager", (accounts) => { await manager.relay(...relayParams); dailySpent = await limitFeature.getDailySpent(wallet.address); assert.isTrue(dailySpent.toNumber() === 0, "daily spent should be reset"); - const rBalanceEnd = await deployer.provider.getBalance(recipient); + const rBalanceEnd = await getBalance(recipient); assert.isTrue(rBalanceEnd.gt(rBalanceStart), "should have refunded the recipient"); }); diff --git a/test/simpleUpgrader.js b/test/simpleUpgrader.js index b968180b5..6ec2e60b2 100644 --- a/test/simpleUpgrader.js +++ b/test/simpleUpgrader.js @@ -16,10 +16,10 @@ const RecoveryManager = artifacts.require("RecoveryManager"); const VersionManager = artifacts.require("VersionManager"); const RelayerManager = artifacts.require("RelayerManager"); -const TestManager = artifacts.require("test-manager"); +const RelayManager = require("../utils/relay-manager"); contract("SimpleUpgrader", (accounts) => { - const manager = new TestManager(); + const manager = new RelayManager(); const owner = accounts[1]; let registry; diff --git a/test/tokenExchanger.js b/test/tokenExchanger.js index 3c33b3fe4..6d7b8b9f8 100644 --- a/test/tokenExchanger.js +++ b/test/tokenExchanger.js @@ -42,7 +42,7 @@ const VersionManager = artifacts.require("VersionManager"); const { makePathes } = require("../utils/paraswap/sell-helper"); const { makeRoutes } = require("../utils/paraswap/buy-helper"); const { ETH_TOKEN, parseLogs, getTimestamp } = require("../utils/utilities.js"); -const TestManager = require("../utils/test-manager"); +const RelayManager = require("../utils/relay-manager"); // Constants const DECIMALS = 18; // number of decimal for TOKEN_A, TOKEN_B contracts @@ -50,10 +50,9 @@ const TOKEN_A_RATE = parseEther("0.06"); const TOKEN_B_RATE = parseEther("0.03"); contract("TokenExchanger", (accounts) => { - const manager = new TestManager(); + const manager = new RelayManager(); const infrastructure = accounts[0]; const owner = accounts[1]; - let deployer; let lockStorage; let guardianStorage; @@ -74,7 +73,6 @@ contract("TokenExchanger", (accounts) => { let versionManager; before(async () => { - deployer = manager.newDeployer(); const registry = await ModuleRegistry.new(); dexRegistry = await DexRegistry.new(); guardianStorage = await GuardianStorage.new(); @@ -196,7 +194,7 @@ contract("TokenExchanger", (accounts) => { async function getBalance(tokenAddress, _wallet) { let balance; if (tokenAddress === ETH_TOKEN) { - balance = await deployer.provider.getBalance(_wallet.address); + balance = await getBalance(_wallet.address); } else if (tokenAddress === tokenA.address) { balance = await tokenA.balanceOf(_wallet.address); } else { diff --git a/test/transferManager.js b/test/transferManager.js index b0eda14ce..b4732b790 100644 --- a/test/transferManager.js +++ b/test/transferManager.js @@ -36,10 +36,10 @@ const ZERO_BYTES32 = ethers.constants.HashZero; const ACTION_TRANSFER = 0; -const TestManager = require("../utils/test-manager"); +const RelayManager = require("../utils/relay-manager"); contract("TransferManager", (accounts) => { - const manager = new TestManager(); + const manager = new RelayManager(); const infrastructure = accounts[0]; const owner = accounts[1]; @@ -47,7 +47,7 @@ contract("TransferManager", (accounts) => { const recipient = accounts[3]; const spender = accounts[4]; - let deployer; + let registry; let priceProvider; let transferStorage; let lockStorage; @@ -64,7 +64,6 @@ contract("TransferManager", (accounts) => { let versionManager; before(async () => { - deployer = manager.newDeployer(); weth = await WETH.new(); const registry = await Registry.new(); priceProvider = await LegacyTokenPriceProvider.new(ethers.constants.AddressZero); @@ -123,7 +122,7 @@ contract("TransferManager", (accounts) => { beforeEach(async () => { const proxy = await Proxy.new(walletImplementation.address); - wallet = deployer.wrapDeployedContract(BaseWallet, proxy.address); + wallet = await BaseWallet.at(proxy.address); await wallet.init(owner, [versionManager.address]); await versionManager.from(owner).upgradeWallet(wallet.address, await versionManager.lastVersion()); @@ -159,7 +158,7 @@ contract("TransferManager", (accounts) => { ethers.constants.AddressZero); await versionManager.addVersion([transferManager1.address], [transferManager1.address]); const proxy = await Proxy.new(walletImplementation.address); - const existingWallet = deployer.wrapDeployedContract(BaseWallet, proxy.address); + const existingWallet = await BaseWallet.at(proxy.address); await existingWallet.init(owner, [versionManager.address]); await versionManager.from(owner).upgradeWallet(existingWallet.address, await versionManager.lastVersion()); @@ -379,7 +378,7 @@ contract("TransferManager", (accounts) => { async function doDirectTransfer({ token, signer = owner, to, amount, relayed = false, }) { - const fundsBefore = (token === ETH_TOKEN ? await deployer.provider.getBalance(to) : await token.balanceOf(to)); + const fundsBefore = (token === ETH_TOKEN ? await utils.getBalance(to) : await token.balanceOf(to)); const unspentBefore = await transferManager.getDailyUnspent(wallet.address); const params = [wallet.address, token === ETH_TOKEN ? ETH_TOKEN : token.address, to, amount, ZERO_BYTES32]; let txReceipt; @@ -390,7 +389,7 @@ contract("TransferManager", (accounts) => { txReceipt = await transferManager.verboseWaitForTransaction(tx); } assert.isTrue(await utils.hasEvent(txReceipt, transferManager, "Transfer"), "should have generated Transfer event"); - const fundsAfter = (token === ETH_TOKEN ? await deployer.provider.getBalance(to) : await token.balanceOf(to)); + const fundsAfter = (token === ETH_TOKEN ? await utils.getBalance(to) : await token.balanceOf(to)); const unspentAfter = await transferManager.getDailyUnspent(wallet.address); assert.equal(fundsAfter.sub(fundsBefore).toNumber(), amount, "should have transfered amount"); const ethValue = (token === ETH_TOKEN ? amount : (await getEtherValue(amount, token.address)).toNumber()); @@ -404,8 +403,8 @@ contract("TransferManager", (accounts) => { token, to, amount, delay, relayed = false, }) { const tokenAddress = token === ETH_TOKEN ? ETH_TOKEN : token.address; - const fundsBefore = (token === ETH_TOKEN ? await deployer.provider.getBalance(to) : await token.balanceOf(to)); - const params = [wallet.address, tokenAddress, to, amount, ZERO_BYTES32]; + const fundsBefore = (token === ETH_TOKEN ? await utils.getBalance(to.address) : await token.balanceOf(to.address)); + const params = [wallet.address, tokenAddress, to.address, amount, ZERO_BYTES32]; let txReceipt; let tx; if (relayed) { @@ -414,8 +413,9 @@ contract("TransferManager", (accounts) => { tx = await transferManager.from(owner).transferToken(...params); txReceipt = await transferManager.verboseWaitForTransaction(tx); } + assert.isTrue(await utils.hasEvent(txReceipt, transferManager, "PendingTransferCreated"), "should have generated PendingTransferCreated event"); - let fundsAfter = (token === ETH_TOKEN ? await deployer.provider.getBalance(to) : await token.balanceOf(to)); + let fundsAfter = (token === ETH_TOKEN ? await utils.getBalance(to.address) : await token.balanceOf(to.address)); assert.equal(fundsAfter.sub(fundsBefore).toNumber(), 0, "should not have transfered amount"); if (delay === 0) { const id = ethers.utils.solidityKeccak256(["uint8", "address", "address", "uint256", "bytes", "uint256"], @@ -428,7 +428,7 @@ contract("TransferManager", (accounts) => { txReceipt = await transferManager.verboseWaitForTransaction(tx); assert.isTrue(await utils.hasEvent(txReceipt, transferManager, "PendingTransferExecuted"), "should have generated PendingTransferExecuted event"); - fundsAfter = (token === ETH_TOKEN ? await deployer.provider.getBalance(to) : await token.balanceOf(to)); + fundsAfter = (token === ETH_TOKEN ? await utils.getBalance(to.address) : await token.balanceOf(to.address)); return assert.equal(fundsAfter.sub(fundsBefore).toNumber(), amount, "should have transfered amount"); } diff --git a/test/upgraderToVersionManager.js b/test/upgraderToVersionManager.js index f97852640..0db607235 100644 --- a/test/upgraderToVersionManager.js +++ b/test/upgraderToVersionManager.js @@ -18,12 +18,12 @@ const SECURITY_PERIOD = 3600; const SECURITY_WINDOW = 3600; const ETH_LIMIT = 1000000; -const TestManager = require("../utils/test-manager"); +const RelayManager = require("../utils/relay-manager"); describe("UpgraderToVersionManager", function () { this.timeout(100000); - const manager = new TestManager(); + const manager = new RelayManager(); const owner = accounts[1].signer; const recipient = accounts[2].signer; diff --git a/test/versionManager.js b/test/versionManager.js index 9891c97e0..0e7432421 100644 --- a/test/versionManager.js +++ b/test/versionManager.js @@ -16,12 +16,12 @@ const Registry = require("../build/ModuleRegistry"); const TestFeature = require("../build/TestFeature"); const UpgraderToVersionManager = require("../build/UpgraderToVersionManager"); -const TestManager = require("../utils/test-manager"); +const RelayManager = require("../utils/relay-manager"); describe("VersionManager", function () { this.timeout(100000); - const manager = new TestManager(accounts); + const manager = new RelayManager(accounts); const owner = accounts[1].signer; diff --git a/utils/test-manager.js b/utils/relay-manager.js similarity index 91% rename from utils/test-manager.js rename to utils/relay-manager.js index 27c81f0bb..23a4749f6 100644 --- a/utils/test-manager.js +++ b/utils/relay-manager.js @@ -1,12 +1,7 @@ const ethers = require("ethers"); const { signOffchain, ETH_TOKEN, getNonceForRelay, getNetworkId } = require("./utilities.js"); -class TestManager { - constructor(network = "ganache") { - this.network = network; - this.provider = this.deployer.provider; - } - +class RelayManager { setRelayerManager(relayerManager) { this.relayerManager = relayerManager; } @@ -68,4 +63,4 @@ class TestManager { } } -module.exports = TestManager; +module.exports = RelayManager; diff --git a/utils/utilities.js b/utils/utilities.js index f0f092e77..9ee005ef2 100644 --- a/utils/utilities.js +++ b/utils/utilities.js @@ -147,6 +147,11 @@ module.exports = { ); return contract.callStatic[method](...args); }, + + async getBalance(account) { + const balance = await web3.eth.getBalance(account); + return balance; + }, async getTimestamp(blockNumber) { const blockN = !blockNumber ? "latest" : blockNumber; From c19d325930e5bcdbe3a9a5aa03b970eba47c3252 Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Mon, 17 Aug 2020 11:29:56 +0300 Subject: [PATCH 021/113] Remove etherlime package used in tests Only remains to be stripped from deployment --- .gitignore | 4 +- package-lock.json | 16890 ++++++++++++-------------------------------- package.json | 1 - 3 files changed, 4569 insertions(+), 12326 deletions(-) diff --git a/.gitignore b/.gitignore index 5ba08359e..bcec0dc79 100644 --- a/.gitignore +++ b/.gitignore @@ -33,9 +33,7 @@ utils/config/*.json !utils/config/kovan-fork.json ganache-accounts.json -## Etherlime -**/.etherlime-store -flat +## solidity-coverage .coverage_artifacts .coverage_contracts .coverage_tests diff --git a/package-lock.json b/package-lock.json index 8aee3f72e..80b2aeab8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -25,96 +25,124 @@ "@babel/helper-validator-identifier": "^7.10.4", "chalk": "^2.0.0", "js-tokens": "^4.0.0" + } + }, + "@eslint/eslintrc": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.1.3.tgz", + "integrity": "sha512-4YVwPkANLeNtRjMekzux1ci8hIaH5eGKktGqR0d3LWsKNn5B2X/1Z6Trxy7jQXl9EBGE6Yj02O+t09FMeRllaA==", + "dev": true, + "requires": { + "ajv": "^6.12.4", + "debug": "^4.1.1", + "espree": "^7.3.0", + "globals": "^12.1.0", + "ignore": "^4.0.6", + "import-fresh": "^3.2.1", + "js-yaml": "^3.13.1", + "lodash": "^4.17.19", + "minimatch": "^3.0.4", + "strip-json-comments": "^3.1.1" }, "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "requires": { - "color-convert": "^1.9.0" - } + "acorn": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", + "dev": true }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "espree": { + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.0.tgz", + "integrity": "sha512-dksIWsvKCixn1yrEXO8UosNSxaDoSYpq9reEjZSbHLpT5hpaCAKTLBwq0RHtLrIr+c0ByiYzWT8KTMRzoRCNlw==", + "dev": true, "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "acorn": "^7.4.0", + "acorn-jsx": "^5.2.0", + "eslint-visitor-keys": "^1.3.0" } }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "globals": { + "version": "12.4.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", + "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "dev": true, "requires": { - "has-flag": "^3.0.0" + "type-fest": "^0.8.1" } + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true + }, + "strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true + }, + "type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true } } }, - "@babel/runtime": { - "version": "7.10.5", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.10.5.tgz", - "integrity": "sha512-otddXKhdNn7d0ptoFRHtMLa8LqDxLYwTjB4nYgM1yy5N6gU/MUf8zqyyLltCH3yAVitBzmwK4us+DD0l/MauAg==", - "requires": { - "regenerator-runtime": "^0.13.4" - } - }, "@ethersproject/abi": { - "version": "5.0.0-beta.153", - "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.0.0-beta.153.tgz", - "integrity": "sha512-aXweZ1Z7vMNzJdLpR1CZUAIgnwjrZeUSvN9syCwlBaEBUFJmFY+HHnfuTI5vIhVs/mRkfJVrbEyl51JZQqyjAg==", + "version": "5.0.7", + "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.0.7.tgz", + "integrity": "sha512-Cqktk+hSIckwP/W8O47Eef60VwmoSC/L3lY0+dIBhQPCNn9E4V7rwmm2aFrNRRDJfFlGuZ1khkQUOc3oBX+niw==", "requires": { - "@ethersproject/address": ">=5.0.0-beta.128", - "@ethersproject/bignumber": ">=5.0.0-beta.130", - "@ethersproject/bytes": ">=5.0.0-beta.129", - "@ethersproject/constants": ">=5.0.0-beta.128", - "@ethersproject/hash": ">=5.0.0-beta.128", - "@ethersproject/keccak256": ">=5.0.0-beta.127", - "@ethersproject/logger": ">=5.0.0-beta.129", - "@ethersproject/properties": ">=5.0.0-beta.131", - "@ethersproject/strings": ">=5.0.0-beta.130" + "@ethersproject/address": "^5.0.4", + "@ethersproject/bignumber": "^5.0.7", + "@ethersproject/bytes": "^5.0.4", + "@ethersproject/constants": "^5.0.4", + "@ethersproject/hash": "^5.0.4", + "@ethersproject/keccak256": "^5.0.3", + "@ethersproject/logger": "^5.0.5", + "@ethersproject/properties": "^5.0.3", + "@ethersproject/strings": "^5.0.4" } }, "@ethersproject/abstract-provider": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@ethersproject/abstract-provider/-/abstract-provider-5.0.2.tgz", - "integrity": "sha512-U1s60+nG02x8FKNMoVNI6MG8SguWCoG9HJtwOqWZ38LBRMsDV4c0w4izKx98kcsN3wXw4U2/YAyJ9LlH7+/hkg==", + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/@ethersproject/abstract-provider/-/abstract-provider-5.0.5.tgz", + "integrity": "sha512-i/CjElAkzV7vQBAeoz+IpjGfcFYEP9eD7j3fzZ0fzTq03DO7PPnR+xkEZ1IoDXGwDS+55aLM1xvLDwB/Lx6IOQ==", "requires": { - "@ethersproject/bignumber": "^5.0.0", - "@ethersproject/bytes": "^5.0.0", - "@ethersproject/logger": "^5.0.0", - "@ethersproject/networks": "^5.0.0", - "@ethersproject/properties": "^5.0.0", - "@ethersproject/transactions": "^5.0.0", - "@ethersproject/web": "^5.0.0" + "@ethersproject/bignumber": "^5.0.7", + "@ethersproject/bytes": "^5.0.4", + "@ethersproject/logger": "^5.0.5", + "@ethersproject/networks": "^5.0.3", + "@ethersproject/properties": "^5.0.3", + "@ethersproject/transactions": "^5.0.5", + "@ethersproject/web": "^5.0.6" } }, "@ethersproject/abstract-signer": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@ethersproject/abstract-signer/-/abstract-signer-5.0.2.tgz", - "integrity": "sha512-CzzXbeqKlgayE4YTnvvreGBG3n+HxakGXrxaGM6LjBZnOOIVSYi6HMFG8ZXls7UspRY4hvMrtnKEJKDCOngSBw==", + "version": "5.0.7", + "resolved": "https://registry.npmjs.org/@ethersproject/abstract-signer/-/abstract-signer-5.0.7.tgz", + "integrity": "sha512-8W8gy/QutEL60EoMEpvxZ8MFAEWs/JvH5nmZ6xeLXoZvmBCasGmxqHdYjo2cxg0nevkPkq9SeenSsBBZSCx+SQ==", "requires": { - "@ethersproject/abstract-provider": "^5.0.0", - "@ethersproject/bignumber": "^5.0.0", - "@ethersproject/bytes": "^5.0.0", - "@ethersproject/logger": "^5.0.0", - "@ethersproject/properties": "^5.0.0" + "@ethersproject/abstract-provider": "^5.0.4", + "@ethersproject/bignumber": "^5.0.7", + "@ethersproject/bytes": "^5.0.4", + "@ethersproject/logger": "^5.0.5", + "@ethersproject/properties": "^5.0.3" } }, "@ethersproject/address": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@ethersproject/address/-/address-5.0.2.tgz", - "integrity": "sha512-+rz26RKj7ujGfQynys4V9VJRbR+wpC6eL8F22q3raWMH3152Ha31GwJPWzxE/bEA+43M/zTNVwY0R53gn53L2Q==", - "requires": { - "@ethersproject/bignumber": "^5.0.0", - "@ethersproject/bytes": "^5.0.0", - "@ethersproject/keccak256": "^5.0.0", - "@ethersproject/logger": "^5.0.0", - "@ethersproject/rlp": "^5.0.0", + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/@ethersproject/address/-/address-5.0.5.tgz", + "integrity": "sha512-DpkQ6rwk9jTefrRsJzEm6nhRiJd9pvhn1xN0rw5N/jswXG5r7BLk/GVA0mMAVWAsYfvi2xSc5L41FMox43RYEA==", + "requires": { + "@ethersproject/bignumber": "^5.0.7", + "@ethersproject/bytes": "^5.0.4", + "@ethersproject/keccak256": "^5.0.3", + "@ethersproject/logger": "^5.0.5", + "@ethersproject/rlp": "^5.0.3", "bn.js": "^4.4.0" }, "dependencies": { @@ -126,29 +154,29 @@ } }, "@ethersproject/base64": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@ethersproject/base64/-/base64-5.0.2.tgz", - "integrity": "sha512-0FE5RH5cUDddOiQEDpWtyHjkSW4D5/rdJzA3KTZo8Fk5ab/Y8vdzqbamsXPyPsXU3gS+zCE5Qq4EKVOWlWLLTA==", + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/@ethersproject/base64/-/base64-5.0.4.tgz", + "integrity": "sha512-4KRykQ7BQMeOXfvio1YITwHjxwBzh92UoXIdzxDE1p53CK28bbHPdsPNYo0wl0El7lJAMpT2SOdL0hhbWRnyIA==", "requires": { - "@ethersproject/bytes": "^5.0.0" + "@ethersproject/bytes": "^5.0.4" } }, "@ethersproject/basex": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@ethersproject/basex/-/basex-5.0.2.tgz", - "integrity": "sha512-p4m2CeQqI9vma3XipRbP2iDf6zTsbroE0MEXBAYXidsoJQSvePKrC6MVRKfTzfcHej1b9wfmjVBzqhqn3FRhIA==", + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/@ethersproject/basex/-/basex-5.0.4.tgz", + "integrity": "sha512-ixIr/kKiAoSzOnSc777AGIOAhKai5Ivqr4HO/Gz+YG+xkfv6kqD6AW4ga9vM20Wwb0QBhh3LoRWTu4V1K+x9Ew==", "requires": { - "@ethersproject/bytes": "^5.0.0", - "@ethersproject/properties": "^5.0.0" + "@ethersproject/bytes": "^5.0.4", + "@ethersproject/properties": "^5.0.3" } }, "@ethersproject/bignumber": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.0.5.tgz", - "integrity": "sha512-24ln7PV0g8ZzjcVZiLW9Wod0i+XCmK6zKkAaxw5enraTIT1p7gVOcSXFSzNQ9WYAwtiFQPvvA+TIO2oEITZNJA==", + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.0.8.tgz", + "integrity": "sha512-KXFVAFKS1jdTXYN8BE5Oj+ZfPMh28iRdFeNGBVT6cUFdtiPVqeXqc0ggvBqA3A1VoFFGgM7oAeaagA393aORHA==", "requires": { - "@ethersproject/bytes": "^5.0.0", - "@ethersproject/logger": "^5.0.0", + "@ethersproject/bytes": "^5.0.4", + "@ethersproject/logger": "^5.0.5", "bn.js": "^4.4.0" }, "dependencies": { @@ -160,2418 +188,1656 @@ } }, "@ethersproject/bytes": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.0.3.tgz", - "integrity": "sha512-AyPMAlY+Amaw4Zfp8OAivm1xYPI8mqiUYmEnSUk1CnS2NrQGHEMmFJFiOJdS3gDDpgSOFhWIjZwxKq2VZpqNTA==", + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.0.5.tgz", + "integrity": "sha512-IEj9HpZB+ACS6cZ+QQMTqmu/cnUK2fYNE6ms/PVxjoBjoxc6HCraLpam1KuRvreMy0i523PLmjN8OYeikRdcUQ==", "requires": { - "@ethersproject/logger": "^5.0.0" + "@ethersproject/logger": "^5.0.5" } }, "@ethersproject/constants": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.0.2.tgz", - "integrity": "sha512-nNoVlNP6bgpog7pQ2EyD1xjlaXcy1Cl4kK5v1KoskHj58EtB6TK8M8AFGi3GgHTdMldfT4eN3OsoQ/CdOTVNFA==", + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.0.5.tgz", + "integrity": "sha512-foaQVmxp2+ik9FrLUCtVrLZCj4M3Ibgkqvh+Xw/vFRSerkjVSYePApaVE5essxhoSlF1U9oXfWY09QI2AXtgKA==", "requires": { - "@ethersproject/bignumber": "^5.0.0" + "@ethersproject/bignumber": "^5.0.7" } }, "@ethersproject/contracts": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@ethersproject/contracts/-/contracts-5.0.2.tgz", - "integrity": "sha512-Ud3oW8mBNIWE+WHRjvwVEwfvshn7lfYWSSKG0fPSb6baRN9mLOoNguX+VIv3W5Sne9w2utnBmxLF2ESXitw64A==", - "requires": { - "@ethersproject/abi": "^5.0.0", - "@ethersproject/abstract-provider": "^5.0.0", - "@ethersproject/abstract-signer": "^5.0.0", - "@ethersproject/address": "^5.0.0", - "@ethersproject/bignumber": "^5.0.0", - "@ethersproject/bytes": "^5.0.0", - "@ethersproject/constants": "^5.0.0", - "@ethersproject/logger": "^5.0.0", - "@ethersproject/properties": "^5.0.0" - }, - "dependencies": { - "@ethersproject/abi": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.0.2.tgz", - "integrity": "sha512-Z+5f7xOgtRLu/W2l9Ry5xF7ehh9QVQ0m1vhynmTcS7DMfHgqTd1/PDFC62aw91ZPRCRZsYdZJu8ymokC5e1JSw==", - "requires": { - "@ethersproject/address": "^5.0.0", - "@ethersproject/bignumber": "^5.0.0", - "@ethersproject/bytes": "^5.0.0", - "@ethersproject/constants": "^5.0.0", - "@ethersproject/hash": "^5.0.0", - "@ethersproject/keccak256": "^5.0.0", - "@ethersproject/logger": "^5.0.0", - "@ethersproject/properties": "^5.0.0", - "@ethersproject/strings": "^5.0.0" - } - } + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/@ethersproject/contracts/-/contracts-5.0.5.tgz", + "integrity": "sha512-tFI255lFbmbqMkgnuyhDWHl3yWqttPlReplYuVvDCT/SuvBjLR4ad2uipBlh1fh5X1ipK9ettAoV4S0HKim4Kw==", + "requires": { + "@ethersproject/abi": "^5.0.5", + "@ethersproject/abstract-provider": "^5.0.4", + "@ethersproject/abstract-signer": "^5.0.4", + "@ethersproject/address": "^5.0.4", + "@ethersproject/bignumber": "^5.0.7", + "@ethersproject/bytes": "^5.0.4", + "@ethersproject/constants": "^5.0.4", + "@ethersproject/logger": "^5.0.5", + "@ethersproject/properties": "^5.0.3" } }, "@ethersproject/hash": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@ethersproject/hash/-/hash-5.0.2.tgz", - "integrity": "sha512-dWGvNwmVRX2bxoQQ3ciMw46Vzl1nqfL+5R8+2ZxsRXD3Cjgw1dL2mdjJF7xMMWPvPdrlhKXWSK0gb8VLwHZ8Cw==", + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/@ethersproject/hash/-/hash-5.0.6.tgz", + "integrity": "sha512-Gvh57v6BWhwnud6l7tMfQm32PRQ2DYx2WaAAQmAxAfYvmzUkpQCBstnGeNMXIL8/2wdkvcB2u+WZRWaZtsFuUQ==", "requires": { - "@ethersproject/bytes": "^5.0.0", - "@ethersproject/keccak256": "^5.0.0", - "@ethersproject/logger": "^5.0.0", - "@ethersproject/strings": "^5.0.0" + "@ethersproject/abstract-signer": "^5.0.6", + "@ethersproject/address": "^5.0.5", + "@ethersproject/bignumber": "^5.0.8", + "@ethersproject/bytes": "^5.0.4", + "@ethersproject/keccak256": "^5.0.3", + "@ethersproject/logger": "^5.0.5", + "@ethersproject/properties": "^5.0.4", + "@ethersproject/strings": "^5.0.4" } }, "@ethersproject/hdnode": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@ethersproject/hdnode/-/hdnode-5.0.2.tgz", - "integrity": "sha512-QAUI5tfseTFqv00Vnbwzofqse81wN9TaL+x5GufTHIHJXgVdguxU+l39E3VYDCmO+eVAA6RCn5dJgeyra+PU2g==", - "requires": { - "@ethersproject/abstract-signer": "^5.0.0", - "@ethersproject/basex": "^5.0.0", - "@ethersproject/bignumber": "^5.0.0", - "@ethersproject/bytes": "^5.0.0", - "@ethersproject/logger": "^5.0.0", - "@ethersproject/pbkdf2": "^5.0.0", - "@ethersproject/properties": "^5.0.0", - "@ethersproject/sha2": "^5.0.0", - "@ethersproject/signing-key": "^5.0.0", - "@ethersproject/strings": "^5.0.0", - "@ethersproject/transactions": "^5.0.0", - "@ethersproject/wordlists": "^5.0.0" + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/@ethersproject/hdnode/-/hdnode-5.0.5.tgz", + "integrity": "sha512-Ho4HZaK+KijE5adayvjAGusWMnT0mgwGa5hGMBofBOgX9nqiKf6Wxx68SXBGI1/L3rmKo6mlAjxUd8gefs0teQ==", + "requires": { + "@ethersproject/abstract-signer": "^5.0.4", + "@ethersproject/basex": "^5.0.3", + "@ethersproject/bignumber": "^5.0.7", + "@ethersproject/bytes": "^5.0.4", + "@ethersproject/logger": "^5.0.5", + "@ethersproject/pbkdf2": "^5.0.3", + "@ethersproject/properties": "^5.0.3", + "@ethersproject/sha2": "^5.0.3", + "@ethersproject/signing-key": "^5.0.4", + "@ethersproject/strings": "^5.0.4", + "@ethersproject/transactions": "^5.0.5", + "@ethersproject/wordlists": "^5.0.4" } }, "@ethersproject/json-wallets": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/@ethersproject/json-wallets/-/json-wallets-5.0.3.tgz", - "integrity": "sha512-VfDXn5ylugkfiM6SrvQfhX9oAHVU5dsNpRw8PjjTCn4k5E2JuVRO5A8sibkYXDhcBmRISZIWqclIxka6FI/chg==", - "requires": { - "@ethersproject/abstract-signer": "^5.0.0", - "@ethersproject/address": "^5.0.0", - "@ethersproject/bytes": "^5.0.0", - "@ethersproject/hdnode": "^5.0.0", - "@ethersproject/keccak256": "^5.0.0", - "@ethersproject/logger": "^5.0.0", - "@ethersproject/pbkdf2": "^5.0.0", - "@ethersproject/properties": "^5.0.0", - "@ethersproject/random": "^5.0.0", - "@ethersproject/strings": "^5.0.0", - "@ethersproject/transactions": "^5.0.0", + "version": "5.0.7", + "resolved": "https://registry.npmjs.org/@ethersproject/json-wallets/-/json-wallets-5.0.7.tgz", + "integrity": "sha512-dgOn9JtGgjT28mDXs4LYY2rT4CzS6bG/rxoYuPq3TLHIf6nmvBcr33Fee6RrM/y8UAx4gyIkf6wb2cXsOctvQQ==", + "requires": { + "@ethersproject/abstract-signer": "^5.0.4", + "@ethersproject/address": "^5.0.4", + "@ethersproject/bytes": "^5.0.4", + "@ethersproject/hdnode": "^5.0.4", + "@ethersproject/keccak256": "^5.0.3", + "@ethersproject/logger": "^5.0.5", + "@ethersproject/pbkdf2": "^5.0.3", + "@ethersproject/properties": "^5.0.3", + "@ethersproject/random": "^5.0.3", + "@ethersproject/strings": "^5.0.4", + "@ethersproject/transactions": "^5.0.5", "aes-js": "3.0.0", "scrypt-js": "3.0.1" }, "dependencies": { - "aes-js": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz", - "integrity": "sha1-4h3xCtbCBTKVvLuNq0Cwnb6ofk0=" + "scrypt-js": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz", + "integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==" } } }, "@ethersproject/keccak256": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.0.2.tgz", - "integrity": "sha512-MbroXutc0gPNYIrUjS4Aw0lDuXabdzI7+l7elRWr1G6G+W0v00e/3gbikWkCReGtt2Jnt4lQSgnflhDwQGcIhA==", + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.0.4.tgz", + "integrity": "sha512-GNpiOUm9PGUxFNqOxYKDQBM0u68bG9XC9iOulEQ8I0tOx/4qUpgVzvgXL6ugxr0RY554Gz/NQsVqknqPzUcxpQ==", "requires": { - "@ethersproject/bytes": "^5.0.0", + "@ethersproject/bytes": "^5.0.4", "js-sha3": "0.5.7" } }, "@ethersproject/logger": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.0.4.tgz", - "integrity": "sha512-alA2LiAy1LdQ/L1SA9ajUC7MvGAEQLsICEfKK4erX5qhkXE1LwLSPIzobtOWFsMHf2yrXGKBLnnpuVHprI3sAw==" + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.0.6.tgz", + "integrity": "sha512-FrX0Vnb3JZ1md/7GIZfmJ06XOAA8r3q9Uqt9O5orr4ZiksnbpXKlyDzQtlZ5Yv18RS8CAUbiKH9vwidJg1BPmQ==" }, "@ethersproject/networks": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@ethersproject/networks/-/networks-5.0.2.tgz", - "integrity": "sha512-T7HVd62D4izNU2tDHf6xUDo7k4JOGX4Lk7vDmVcDKrepSWwL2OmGWrqSlkRe2a1Dnz4+1VPE6fb6+KsmSRe82g==", + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/@ethersproject/networks/-/networks-5.0.4.tgz", + "integrity": "sha512-/wHDTRms5mpJ09BoDrbNdFWINzONe05wZRgohCXvEv39rrH/Gd/yAnct8wC0RsW3tmFOgjgQxuBvypIxuUynTw==", "requires": { - "@ethersproject/logger": "^5.0.0" + "@ethersproject/logger": "^5.0.5" } }, "@ethersproject/pbkdf2": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@ethersproject/pbkdf2/-/pbkdf2-5.0.2.tgz", - "integrity": "sha512-OJFxdX/VtGI5M04lAzXKEOb76XBzjCOzGyko3/bMWat3ePAw7RveBOLyhm79SBs2fh21MSYgdG6JScEMHoSImw==", + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/@ethersproject/pbkdf2/-/pbkdf2-5.0.4.tgz", + "integrity": "sha512-9jVBjHXQKfr9+3bkCg01a8Cd1H9e+7Kw3ZMIvAxD0lZtuzrXsJxm1hVwY9KA+PRUvgS/9tTP4viXQYwLAax7zg==", "requires": { - "@ethersproject/bytes": "^5.0.0", - "@ethersproject/sha2": "^5.0.0" + "@ethersproject/bytes": "^5.0.4", + "@ethersproject/sha2": "^5.0.3" } }, "@ethersproject/properties": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.0.2.tgz", - "integrity": "sha512-FxAisPGAOACQjMJzewl9OJG6lsGCPTm5vpUMtfeoxzAlAb2lv+kHzQPUh9h4jfAILzE8AR1jgXMzRmlhwyra1Q==", + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.0.4.tgz", + "integrity": "sha512-UdyX3GqBxFt15B0uSESdDNmhvEbK3ACdDXl2soshoPcneXuTswHDeA0LoPlnaZzhbgk4p6jqb4GMms5C26Qu6A==", "requires": { - "@ethersproject/logger": "^5.0.0" + "@ethersproject/logger": "^5.0.5" } }, "@ethersproject/providers": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@ethersproject/providers/-/providers-5.0.5.tgz", - "integrity": "sha512-ZR3yFg/m8qDl7317yXOHE7tKeGfoyZIZ/imhVC4JqAH+SX1rb6bdZcSjhJfet7rLmnJSsnYLTgIiVIT85aVLgg==", - "requires": { - "@ethersproject/abstract-provider": "^5.0.0", - "@ethersproject/abstract-signer": "^5.0.0", - "@ethersproject/address": "^5.0.0", - "@ethersproject/bignumber": "^5.0.0", - "@ethersproject/bytes": "^5.0.0", - "@ethersproject/constants": "^5.0.0", - "@ethersproject/hash": "^5.0.0", - "@ethersproject/logger": "^5.0.0", - "@ethersproject/networks": "^5.0.0", - "@ethersproject/properties": "^5.0.0", - "@ethersproject/random": "^5.0.0", - "@ethersproject/rlp": "^5.0.0", - "@ethersproject/strings": "^5.0.0", - "@ethersproject/transactions": "^5.0.0", - "@ethersproject/web": "^5.0.0", + "version": "5.0.13", + "resolved": "https://registry.npmjs.org/@ethersproject/providers/-/providers-5.0.13.tgz", + "integrity": "sha512-5jsuk1FwXxmoQApGs8LSQyS43KP01pHA+6cQ1OPov5pT5Pcqe6ffh6UD1//BZ9Vjf+5e9AQqIk8w7FkGyROuCA==", + "requires": { + "@ethersproject/abstract-provider": "^5.0.4", + "@ethersproject/abstract-signer": "^5.0.4", + "@ethersproject/address": "^5.0.4", + "@ethersproject/basex": "^5.0.3", + "@ethersproject/bignumber": "^5.0.7", + "@ethersproject/bytes": "^5.0.4", + "@ethersproject/constants": "^5.0.4", + "@ethersproject/hash": "^5.0.4", + "@ethersproject/logger": "^5.0.5", + "@ethersproject/networks": "^5.0.3", + "@ethersproject/properties": "^5.0.3", + "@ethersproject/random": "^5.0.3", + "@ethersproject/rlp": "^5.0.3", + "@ethersproject/sha2": "^5.0.3", + "@ethersproject/strings": "^5.0.4", + "@ethersproject/transactions": "^5.0.5", + "@ethersproject/web": "^5.0.6", + "bech32": "1.1.4", "ws": "7.2.3" - }, - "dependencies": { - "ws": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.2.3.tgz", - "integrity": "sha512-HTDl9G9hbkNDk98naoR/cHDws7+EyYMOdL1BmjsZXRUjf7d+MficC4B7HLUPlSiho0vg+CWKrGIt/VJBd1xunQ==" - } } }, "@ethersproject/random": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@ethersproject/random/-/random-5.0.2.tgz", - "integrity": "sha512-kLeS+6bwz37WR2zbe69gudyoGVoUzljQO0LhifnATsZ7rW0JZ9Zgt0h5aXY7tqFDo9TvdqeCwUFdp1t3T5Fkhg==", + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/@ethersproject/random/-/random-5.0.4.tgz", + "integrity": "sha512-AIZJhqs6Ba4/+U3lOjt3QZbP6b/kuuGLJUYFUonAgWmkTHwqsCwYnFvnHKQSUuHbXHvErp7WFXFlztx+yMn3kQ==", "requires": { - "@ethersproject/bytes": "^5.0.0", - "@ethersproject/logger": "^5.0.0" + "@ethersproject/bytes": "^5.0.4", + "@ethersproject/logger": "^5.0.5" } }, "@ethersproject/rlp": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.0.2.tgz", - "integrity": "sha512-oE0M5jqQ67fi2SuMcrpoewOpEuoXaD8M9JeR9md1bXRMvDYgKXUtDHs22oevpEOdnO2DPIRabp6MVHa4aDuWmw==", + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.0.4.tgz", + "integrity": "sha512-5qrrZad7VTjofxSsm7Zg/7Dr4ZOln4S2CqiDdOuTv6MBKnXj0CiBojXyuDy52M8O3wxH0CyE924hXWTDV1PQWQ==", "requires": { - "@ethersproject/bytes": "^5.0.0", - "@ethersproject/logger": "^5.0.0" + "@ethersproject/bytes": "^5.0.4", + "@ethersproject/logger": "^5.0.5" } }, "@ethersproject/sha2": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@ethersproject/sha2/-/sha2-5.0.2.tgz", - "integrity": "sha512-VFl4qSStjQZaygpqoAHswaCY59qBm1Sm0rf8iv0tmgVsRf0pBg2nJaNf9NXXvcuJ9AYPyXl57dN8kozdC4z5Cg==", + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/@ethersproject/sha2/-/sha2-5.0.4.tgz", + "integrity": "sha512-0yFhf1mspxAfWdXXoPtK94adUeu1R7/FzAa+DfEiZTc76sz/vHXf0LSIazoR3znYKFny6haBxME+usbvvEcF3A==", "requires": { - "@ethersproject/bytes": "^5.0.0", - "@ethersproject/logger": "^5.0.0", + "@ethersproject/bytes": "^5.0.4", + "@ethersproject/logger": "^5.0.5", "hash.js": "1.1.3" - }, - "dependencies": { - "hash.js": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", - "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", - "requires": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.0" - } - } } }, "@ethersproject/signing-key": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/@ethersproject/signing-key/-/signing-key-5.0.3.tgz", - "integrity": "sha512-5QPZaBRGCLzfVMbFb3LcVjNR0UbTXnwDHASnQYfbzwUOnFYHKxHsrcbl/5ONGoppgi8yXgOocKqlPCFycJJVWQ==", + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/@ethersproject/signing-key/-/signing-key-5.0.5.tgz", + "integrity": "sha512-Z1wY7JC1HVO4CvQWY2TyTTuAr8xK3bJijZw1a9G92JEmKdv1j255R/0YLBBcFTl2J65LUjtXynNJ2GbArPGi5g==", "requires": { - "@ethersproject/bytes": "^5.0.0", - "@ethersproject/logger": "^5.0.0", - "@ethersproject/properties": "^5.0.0", + "@ethersproject/bytes": "^5.0.4", + "@ethersproject/logger": "^5.0.5", + "@ethersproject/properties": "^5.0.3", "elliptic": "6.5.3" + }, + "dependencies": { + "bn.js": { + "version": "4.11.9", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" + }, + "elliptic": { + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz", + "integrity": "sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==", + "requires": { + "bn.js": "^4.4.0", + "brorand": "^1.0.1", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.0" + } + } } }, "@ethersproject/solidity": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@ethersproject/solidity/-/solidity-5.0.2.tgz", - "integrity": "sha512-RygurUe1hPW1LDYAPXy4471AklGWNnxgFWc3YUE6H11gzkit26jr6AyZH4Yyjw38eBBL6j0AOfQzMWm+NhxZ9g==", + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/@ethersproject/solidity/-/solidity-5.0.5.tgz", + "integrity": "sha512-DMFQ0ouXmNVoKWbGEUFGi8Urli4SJip9jXafQyFHWPRr5oJUqDVkNfwcyC37k+mhBG93k7qrYXCH2xJnGEOxHg==", "requires": { - "@ethersproject/bignumber": "^5.0.0", - "@ethersproject/bytes": "^5.0.0", - "@ethersproject/keccak256": "^5.0.0", - "@ethersproject/sha2": "^5.0.0", - "@ethersproject/strings": "^5.0.0" + "@ethersproject/bignumber": "^5.0.7", + "@ethersproject/bytes": "^5.0.4", + "@ethersproject/keccak256": "^5.0.3", + "@ethersproject/sha2": "^5.0.3", + "@ethersproject/strings": "^5.0.4" } }, "@ethersproject/strings": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.0.2.tgz", - "integrity": "sha512-oNa+xvSqsFU96ndzog0IBTtsRFGOqGpzrXJ7shXLBT7juVeSEyZA/sYs0DMZB5mJ9FEjHdZKxR/rTyBY91vuXg==", + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.0.5.tgz", + "integrity": "sha512-JED6WaIV00xM/gvj8vSnd+0VWtDYdidTmavFRCTQakqfz+4tDo6Jz5LHgG+dd45h7ah7ykCHW0C7ZXWEDROCXQ==", "requires": { - "@ethersproject/bytes": "^5.0.0", - "@ethersproject/constants": "^5.0.0", - "@ethersproject/logger": "^5.0.0" + "@ethersproject/bytes": "^5.0.4", + "@ethersproject/constants": "^5.0.4", + "@ethersproject/logger": "^5.0.5" } }, "@ethersproject/transactions": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@ethersproject/transactions/-/transactions-5.0.2.tgz", - "integrity": "sha512-jZp0ZbbJlq4JLZY6qoMzNtp2HQsX6USQposi3ns0MPUdn3OdZJBDtrcO15r/2VS5t/K1e1GE5MI1HmMKlcTbbQ==", + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/@ethersproject/transactions/-/transactions-5.0.6.tgz", + "integrity": "sha512-htsFhOD+NMBxx676A8ehSuwVV49iqpSB+CkjPZ02tpNew0K6p8g0CZ46Z1ZP946gIHAU80xQ0NACHYrjIUaCFA==", "requires": { - "@ethersproject/address": "^5.0.0", - "@ethersproject/bignumber": "^5.0.0", - "@ethersproject/bytes": "^5.0.0", - "@ethersproject/constants": "^5.0.0", - "@ethersproject/keccak256": "^5.0.0", - "@ethersproject/logger": "^5.0.0", - "@ethersproject/properties": "^5.0.0", - "@ethersproject/rlp": "^5.0.0", - "@ethersproject/signing-key": "^5.0.0" + "@ethersproject/address": "^5.0.4", + "@ethersproject/bignumber": "^5.0.7", + "@ethersproject/bytes": "^5.0.4", + "@ethersproject/constants": "^5.0.4", + "@ethersproject/keccak256": "^5.0.3", + "@ethersproject/logger": "^5.0.5", + "@ethersproject/properties": "^5.0.3", + "@ethersproject/rlp": "^5.0.3", + "@ethersproject/signing-key": "^5.0.4" } }, "@ethersproject/units": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@ethersproject/units/-/units-5.0.2.tgz", - "integrity": "sha512-PSuzycBA1zmRysTtKtp+XYZ3HIJfbmfRdZchOUxdyeGo5siUi9H6mYQcxdJHv82oKp/FniMj8qS8qtLQThhOEg==", + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/@ethersproject/units/-/units-5.0.6.tgz", + "integrity": "sha512-tsJuy4mipppdmooukRfhXt8fGx9nxvfvG6Xdy0RDm7LzHsjghjwQ69m2bCpId6SDSR1Uq1cQ9irPiUBSyWolUA==", "requires": { - "@ethersproject/bignumber": "^5.0.0", - "@ethersproject/constants": "^5.0.0", - "@ethersproject/logger": "^5.0.0" + "@ethersproject/bignumber": "^5.0.7", + "@ethersproject/constants": "^5.0.4", + "@ethersproject/logger": "^5.0.5" } }, "@ethersproject/wallet": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@ethersproject/wallet/-/wallet-5.0.2.tgz", - "integrity": "sha512-gg86ynLV5k5caNnYpJoYc6WyIUHKMTjOITCk5zXGyVbbkXE07y/fGql4A51W0C6mWkeb5Mzz8AKqzHZECdH30w==", - "requires": { - "@ethersproject/abstract-provider": "^5.0.0", - "@ethersproject/abstract-signer": "^5.0.0", - "@ethersproject/address": "^5.0.0", - "@ethersproject/bignumber": "^5.0.0", - "@ethersproject/bytes": "^5.0.0", - "@ethersproject/hash": "^5.0.0", - "@ethersproject/hdnode": "^5.0.0", - "@ethersproject/json-wallets": "^5.0.0", - "@ethersproject/keccak256": "^5.0.0", - "@ethersproject/logger": "^5.0.0", - "@ethersproject/properties": "^5.0.0", - "@ethersproject/random": "^5.0.0", - "@ethersproject/signing-key": "^5.0.0", - "@ethersproject/transactions": "^5.0.0", - "@ethersproject/wordlists": "^5.0.0" + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/@ethersproject/wallet/-/wallet-5.0.6.tgz", + "integrity": "sha512-dRqx3+Degc5pvjaeeTHuk2EuTRM3b6ce/TiV0HRZhRXYnKyyjg0iYXEZo/b6p3rnV+Xhwxkc0+I/ISPkNpictA==", + "requires": { + "@ethersproject/abstract-provider": "^5.0.4", + "@ethersproject/abstract-signer": "^5.0.4", + "@ethersproject/address": "^5.0.4", + "@ethersproject/bignumber": "^5.0.7", + "@ethersproject/bytes": "^5.0.4", + "@ethersproject/hash": "^5.0.4", + "@ethersproject/hdnode": "^5.0.4", + "@ethersproject/json-wallets": "^5.0.6", + "@ethersproject/keccak256": "^5.0.3", + "@ethersproject/logger": "^5.0.5", + "@ethersproject/properties": "^5.0.3", + "@ethersproject/random": "^5.0.3", + "@ethersproject/signing-key": "^5.0.4", + "@ethersproject/transactions": "^5.0.5", + "@ethersproject/wordlists": "^5.0.4" } }, "@ethersproject/web": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@ethersproject/web/-/web-5.0.2.tgz", - "integrity": "sha512-uAlcxdrAWB9PXZlb5NPzbOOt5/m9EJP2c6eLw15/PXPkNNohEIKvdXXOWdcQgTjZ0pcAaD/9mnJ6HXg7NbqXiw==", + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/@ethersproject/web/-/web-5.0.9.tgz", + "integrity": "sha512-//QNlv1MSkOII1hv3+HQwWoiVFS+BMVGI0KYeUww4cyrEktnx1QIez5bTSab9s9fWTFaWKNmQNBwMbxAqPuYDw==", "requires": { - "@ethersproject/base64": "^5.0.0", - "@ethersproject/logger": "^5.0.0", - "@ethersproject/properties": "^5.0.0", - "@ethersproject/strings": "^5.0.0" + "@ethersproject/base64": "^5.0.3", + "@ethersproject/bytes": "^5.0.4", + "@ethersproject/logger": "^5.0.5", + "@ethersproject/properties": "^5.0.3", + "@ethersproject/strings": "^5.0.4" } }, "@ethersproject/wordlists": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@ethersproject/wordlists/-/wordlists-5.0.2.tgz", - "integrity": "sha512-6vKDQcjjpnfdSCr0+jNxpFH3ieKxUPkm29tQX2US7a3zT/sJU/BGlKBR7D8oOpwdE0hpkHhJyMlypRBK+A2avA==", + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/@ethersproject/wordlists/-/wordlists-5.0.5.tgz", + "integrity": "sha512-XA3ycFltVrCTQt04w5nHu3Xq5Z6HjqWsXaAYQHFdqtugyUsIumaO9S5MOwFFuUYTNkZUoT3jCRa/OBS+K4tLfA==", "requires": { - "@ethersproject/bytes": "^5.0.0", - "@ethersproject/hash": "^5.0.0", - "@ethersproject/logger": "^5.0.0", - "@ethersproject/properties": "^5.0.0", - "@ethersproject/strings": "^5.0.0" + "@ethersproject/bytes": "^5.0.4", + "@ethersproject/hash": "^5.0.4", + "@ethersproject/logger": "^5.0.5", + "@ethersproject/properties": "^5.0.3", + "@ethersproject/strings": "^5.0.4" } }, - "@nodelib/fs.scandir": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz", - "integrity": "sha512-eGmwYQn3gxo4r7jdQnkrrN6bY478C3P+a/y72IJukF8LjB6ZHeB3c+Ehacj3sYeSmUXGlnA67/PmbM9CVwL7Dw==", + "@openzeppelin/contracts": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-3.0.1.tgz", + "integrity": "sha512-uSrD7hZ0ViuHGqHZbeHawZBi/uy7aBiNramXAt2dFFuSuoU4u9insS3V3zdVfOnYSPreUo636xSOuQIFN4//HA==" + }, + "@solidity-parser/parser": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.8.1.tgz", + "integrity": "sha512-DF7H6T8I4lo2IZOE2NZwt3631T8j1gjpQLjmvY2xBNK50c4ltslR4XPKwT6RkeSd4+xCAK0GHC/k7sbRDBE4Yw==" + }, + "@types/json5": { + "version": "0.0.29", + "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=", + "dev": true + }, + "@types/parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==" + }, + "@uniswap/lib": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@uniswap/lib/-/lib-1.1.4.tgz", + "integrity": "sha512-5una/3a2dPzPN0moDBsa9LfTxCjZjEiLEkN75wjwplmDU4oFqneVAzVA3Heq+DadEk3k17cszAbSMcaIu7hLfg==" + }, + "@uniswap/v2-core": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@uniswap/v2-core/-/v2-core-1.0.1.tgz", + "integrity": "sha512-MtybtkUPSyysqLY2U210NBDeCHX+ltHt3oADGdjqoThZaFRDKwM6k1Nb3F0A3hk5hwuQvytFWhrWHOEq6nVJ8Q==" + }, + "abbrev": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz", + "integrity": "sha1-kbR5JYinc4wl813W9jdSovh3YTU=" + }, + "acorn": { + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.2.tgz", + "integrity": "sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ==" + }, + "acorn-jsx": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.1.tgz", + "integrity": "sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng==" + }, + "aes-js": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz", + "integrity": "sha1-4h3xCtbCBTKVvLuNq0Cwnb6ofk0=" + }, + "aggregate-error": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", + "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", "requires": { - "@nodelib/fs.stat": "2.0.3", - "run-parallel": "^1.1.9" + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" } }, - "@nodelib/fs.stat": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.3.tgz", - "integrity": "sha512-bQBFruR2TAwoevBEd/NWMoAAtNGzTRgdrqnYCc7dhzfoNvqPzLyqlEQnzZ3kVnNrSp25iyxE00/3h2fqGAGArA==" - }, - "@nodelib/fs.walk": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.4.tgz", - "integrity": "sha512-1V9XOY4rDW0rehzbrcqAmHnz8e7SKvX27gh8Gt2WgB0+pdzdiLV83p72kZPU+jvMbS1qU5mauP2iOvO8rhmurQ==", + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "requires": { - "@nodelib/fs.scandir": "2.1.3", - "fastq": "^1.6.0" + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" } }, - "@openzeppelin/contracts": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-3.0.1.tgz", - "integrity": "sha512-uSrD7hZ0ViuHGqHZbeHawZBi/uy7aBiNramXAt2dFFuSuoU4u9insS3V3zdVfOnYSPreUo636xSOuQIFN4//HA==" + "amdefine": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", + "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", + "optional": true }, - "@redux-saga/core": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@redux-saga/core/-/core-1.1.3.tgz", - "integrity": "sha512-8tInBftak8TPzE6X13ABmEtRJGjtK17w7VUs7qV17S8hCO5S3+aUTWZ/DBsBJPdE8Z5jOPwYALyvofgq1Ws+kg==", - "requires": { - "@babel/runtime": "^7.6.3", - "@redux-saga/deferred": "^1.1.2", - "@redux-saga/delay-p": "^1.1.2", - "@redux-saga/is": "^1.1.2", - "@redux-saga/symbols": "^1.1.2", - "@redux-saga/types": "^1.1.0", - "redux": "^4.0.4", - "typescript-tuple": "^2.2.1" - }, - "dependencies": { - "redux": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/redux/-/redux-4.0.5.tgz", - "integrity": "sha512-VSz1uMAH24DM6MF72vcojpYPtrTUu3ByVWfPL1nPfVRb5mZVTve5GnNCUV53QM/BZ66xfWrm0CTWoM+Xlz8V1w==", - "requires": { - "loose-envify": "^1.4.0", - "symbol-observable": "^1.2.0" - } - } + "ansi-colors": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==" + }, + "ansi-escapes": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.1.tgz", + "integrity": "sha512-JWF7ocqNrp8u9oqpgV+wH5ftbt+cfvv+PTjOvKLT3AdYly/LmORARfEVT1iyjwN+4MqE5UmVKoAdIBqeoCHgLA==", + "requires": { + "type-fest": "^0.11.0" } }, - "@redux-saga/deferred": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@redux-saga/deferred/-/deferred-1.1.2.tgz", - "integrity": "sha512-908rDLHFN2UUzt2jb4uOzj6afpjgJe3MjICaUNO3bvkV/kN/cNeI9PMr8BsFXB/MR8WTAZQq/PlTq8Kww3TBSQ==" + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" }, - "@redux-saga/delay-p": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@redux-saga/delay-p/-/delay-p-1.1.2.tgz", - "integrity": "sha512-ojc+1IoC6OP65Ts5+ZHbEYdrohmIw1j9P7HS9MOJezqMYtCDgpkoqB5enAAZrNtnbSL6gVCWPHaoaTY5KeO0/g==", + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "requires": { - "@redux-saga/symbols": "^1.1.2" + "color-convert": "^1.9.0" } }, - "@redux-saga/is": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@redux-saga/is/-/is-1.1.2.tgz", - "integrity": "sha512-OLbunKVsCVNTKEf2cH4TYyNbbPgvmZ52iaxBD4I1fTif4+MTXMa4/Z07L83zW/hTCXwpSZvXogqMqLfex2Tg6w==", + "antlr4": { + "version": "4.7.1", + "resolved": "https://registry.npmjs.org/antlr4/-/antlr4-4.7.1.tgz", + "integrity": "sha512-haHyTW7Y9joE5MVs37P2lNYfU2RWBLfcRDD8OWldcdZm5TiCE91B5Xl1oWSwiDUSd4rlExpt2pu1fksYQjRBYQ==" + }, + "anymatch": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", + "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==", "requires": { - "@redux-saga/symbols": "^1.1.2", - "@redux-saga/types": "^1.1.0" + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" } }, - "@redux-saga/symbols": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@redux-saga/symbols/-/symbols-1.1.2.tgz", - "integrity": "sha512-EfdGnF423glv3uMwLsGAtE6bg+R9MdqlHEzExnfagXPrIiuxwr3bdiAwz3gi+PsrQ3yBlaBpfGLtDG8rf3LgQQ==" + "app-module-path": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/app-module-path/-/app-module-path-2.2.0.tgz", + "integrity": "sha1-ZBqlXft9am8KgUHEucCqULbCTdU=" }, - "@redux-saga/types": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@redux-saga/types/-/types-1.1.0.tgz", - "integrity": "sha512-afmTuJrylUU/0OtqzaRkbyYFFNgCF73Bvel/sw90pvGrWIZ+vyoIJqA6eMSoA6+nb443kTmulmBtC9NerXboNg==" + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "requires": { + "sprintf-js": "~1.0.2" + } }, - "@sindresorhus/is": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", - "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==" + "array-includes": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.1.tgz", + "integrity": "sha512-c2VXaCHl7zPsvpkFsw4nxvFie4fh1ur9bpcgsVkIjqn0H/Xwdg+7fv3n2r/isyS8EBj5b06M9kHyZuIr4El6WQ==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0", + "is-string": "^1.0.5" + } }, - "@solidity-parser/parser": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.6.2.tgz", - "integrity": "sha512-kUVUvrqttndeprLoXjI5arWHeiP3uh4XODAKbG+ZaWHCVQeelxCbnXBeWxZ2BPHdXgH0xR9dU1b916JhDhbgAA==" + "array.prototype.flat": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.3.tgz", + "integrity": "sha512-gBlRZV0VSmfPIeWfuuy56XZMvbVfbEUnOXUvt3F/eUUUSyzlgLxhEX4YAEpxNAogRGehPSnfXyPtYyKAhkzQhQ==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0-next.1" + } }, - "@szmarczak/http-timer": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz", - "integrity": "sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==", + "array.prototype.map": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array.prototype.map/-/array.prototype.map-1.0.2.tgz", + "integrity": "sha512-Az3OYxgsa1g7xDYp86l0nnN4bcmuEITGe1rbdEBVkrqkzMgDcbdQ2R7r41pNzti+4NMces3H8gMmuioZUilLgw==", "requires": { - "defer-to-connect": "^1.0.1" + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0-next.1", + "es-array-method-boxes-properly": "^1.0.0", + "is-string": "^1.0.4" } }, - "@truffle/error": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/@truffle/error/-/error-0.0.7.tgz", - "integrity": "sha512-UIfVKsXSXocKnn5+RNklUXNoGd/JVj7V8KmC48TQzmjU33HQI86PX0JDS7SpHMHasI3w9X//1q7Lu7nZtj3Zzg==" + "assertion-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==" }, - "@truffle/interface-adapter": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@truffle/interface-adapter/-/interface-adapter-0.3.3.tgz", - "integrity": "sha512-l3I4WFTfnBSIfG96IOBRtAIE6AHDAxcOUJE7W5zh9hocQwzQlGWc2yEyyTcLa0656TTM8RxaZZ2S/KdHHMvCaw==", + "assured": { + "version": "1.0.15", + "resolved": "https://registry.npmjs.org/assured/-/assured-1.0.15.tgz", + "integrity": "sha512-EVb4T+6m5VdlTJ6gbv4WjBM1rHfzXP2BspsQ6VLswcnIQSabjJy7A9YEuG4/KmfF+9OEuT5xhqVJ+V1tClD5ww==", "requires": { - "bn.js": "^4.11.8", - "ethers": "^4.0.32", - "lodash": "^4.17.13", - "web3": "1.2.2" + "noop6": "^1.0.1", + "sliced": "^1.0.1" + } + }, + "ast-parents": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/ast-parents/-/ast-parents-0.0.1.tgz", + "integrity": "sha1-UI/Q8F0MSHddnszaLhdEIyYejdM=" + }, + "astral-regex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", + "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==" + }, + "async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=" + }, + "aws-sdk": { + "version": "2.774.0", + "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.774.0.tgz", + "integrity": "sha512-3a/fM1E3nCPwT4AVbysOWCMmsu/TOdJDD3urjywWE/qO1JShxRwLSdRLD1xRkacR9JcnydfkmdU0qk+VsM3nqg==", + "requires": { + "buffer": "4.9.2", + "events": "1.1.1", + "ieee754": "1.1.13", + "jmespath": "0.15.0", + "querystring": "0.2.0", + "sax": "1.2.1", + "url": "0.10.3", + "uuid": "3.3.2", + "xml2js": "0.4.19" + } + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + }, + "base64-js": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz", + "integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==" + }, + "bech32": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz", + "integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==" + }, + "binary-extensions": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.1.0.tgz", + "integrity": "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==" + }, + "bn-chai": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/bn-chai/-/bn-chai-1.0.1.tgz", + "integrity": "sha512-7rJXt21DwYiLLpvzLaACixBBoUGkRV1iuFD3wElEhw8Ji9IiY/QsJRtvW+c7ChRgEOyLQkGaSGFUUqBKm21SNA==" + }, + "bn.js": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.1.3.tgz", + "integrity": "sha512-GkTiFpjFtUzU9CbMeJ5iazkCzGL3jrhzerzZIuqLABjbwRaFt33I9tUdSNryIptM+RxDet6OKm2WnLXzW51KsQ==" + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "requires": { + "fill-range": "^7.0.1" + } + }, + "brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" + }, + "browser-stdout": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==" + }, + "buffer": { + "version": "4.9.2", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz", + "integrity": "sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==", + "requires": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4", + "isarray": "^1.0.0" + } + }, + "buffer-to-arraybuffer": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/buffer-to-arraybuffer/-/buffer-to-arraybuffer-0.0.5.tgz", + "integrity": "sha1-YGSkD6dutDxyOrqe+PbhIW0QURo=" + }, + "caller-callsite": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/caller-callsite/-/caller-callsite-2.0.0.tgz", + "integrity": "sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ=", + "requires": { + "callsites": "^2.0.0" }, "dependencies": { - "@types/node": { - "version": "12.12.51", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.51.tgz", - "integrity": "sha512-6ILqt8iNThALrxDv2Q4LyYFQxULQz96HKNIFd4s9QRQaiHINYeUpLqeU/2IU7YMtvipG1fQVAy//vY8/fX1Y9w==" + "callsites": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz", + "integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=" + } + } + }, + "caller-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-2.0.0.tgz", + "integrity": "sha1-Ro+DBE42mrIBD6xfBs7uFbsssfQ=", + "requires": { + "caller-callsite": "^2.0.0" + } + }, + "callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==" + }, + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" + }, + "chai": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.2.0.tgz", + "integrity": "sha512-XQU3bhBukrOsQCuwZndwGcCVQHyZi53fQ6Ys1Fym7E4olpIqqZZhhoFJoaKVvV17lWQoXYwgWN2nF5crA8J2jw==", + "requires": { + "assertion-error": "^1.1.0", + "check-error": "^1.0.2", + "deep-eql": "^3.0.1", + "get-func-name": "^2.0.0", + "pathval": "^1.1.0", + "type-detect": "^4.0.5" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==" + }, + "check-error": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", + "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=" + }, + "chokidar": { + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.2.tgz", + "integrity": "sha512-IZHaDeBeI+sZJRX7lGcXsdzgvZqKv6sECqsbErJA4mHWfpRrD8B97kSFN4cQz6nGBGiuFia1MKR4d6c1o8Cv7A==", + "requires": { + "anymatch": "~3.1.1", + "braces": "~3.0.2", + "fsevents": "~2.1.2", + "glob-parent": "~5.1.0", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.4.0" + } + }, + "ci-info": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", + "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==" + }, + "clean-stack": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==" + }, + "cli-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "requires": { + "restore-cursor": "^3.1.0" + } + }, + "cli-table2": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/cli-table2/-/cli-table2-0.2.0.tgz", + "integrity": "sha1-LR738hig54biFFQFYtS9F3/jLZc=", + "requires": { + "colors": "^1.1.2", + "lodash": "^3.10.1", + "string-width": "^1.0.1" + } + }, + "cli-truncate": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-2.1.0.tgz", + "integrity": "sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg==", + "requires": { + "slice-ansi": "^3.0.0", + "string-width": "^4.2.0" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==" }, - "aes-js": { + "is-fullwidth-code-point": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz", - "integrity": "sha1-4h3xCtbCBTKVvLuNq0Cwnb6ofk0=" - }, - "bn.js": { - "version": "4.11.9", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" }, - "buffer": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.6.0.tgz", - "integrity": "sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw==", + "string-width": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", + "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", "requires": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4" + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" } }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", "requires": { - "ms": "2.0.0" + "ansi-regex": "^5.0.0" } + } + } + }, + "cli-width": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz", + "integrity": "sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==" + }, + "cliui": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "requires": { + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" }, - "ethers": { - "version": "4.0.47", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-4.0.47.tgz", - "integrity": "sha512-hssRYhngV4hiDNeZmVU/k5/E8xmLG8UpcNUzg6mb7lqhgpFPH/t7nuv20RjRrEf0gblzvi2XwR5Te+V3ZFc9pQ==", - "requires": { - "aes-js": "3.0.0", - "bn.js": "^4.4.0", - "elliptic": "6.5.2", - "hash.js": "1.1.3", - "js-sha3": "0.5.7", - "scrypt-js": "2.0.4", - "setimmediate": "1.0.4", - "uuid": "2.0.1", - "xmlhttprequest": "1.8.0" - }, - "dependencies": { - "elliptic": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.2.tgz", - "integrity": "sha512-f4x70okzZbIQl/NSRLkI/+tteV/9WqL98zx+SQ69KbXxmVrmjwsNUPn/gYJJ0sHvEak24cZgHIPegRePAtA/xw==", - "requires": { - "bn.js": "^4.4.0", - "brorand": "^1.0.1", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.0" - } - }, - "scrypt-js": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-2.0.4.tgz", - "integrity": "sha512-4KsaGcPnuhtCZQCxFxN3GVYIhKFPTdLd8PLC552XwbMndtD0cjRFAhDuuydXQ0h08ZfPgzqe6EKHozpuH74iDw==" - }, - "setimmediate": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.4.tgz", - "integrity": "sha1-IOgd5iLUoCWIzgyNqJc8vPHTE48=" - } - } - }, - "eventemitter3": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.2.tgz", - "integrity": "sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q==" - }, - "fs-extra": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz", - "integrity": "sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==", - "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - }, - "got": { - "version": "9.6.0", - "resolved": "https://registry.npmjs.org/got/-/got-9.6.0.tgz", - "integrity": "sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==", - "requires": { - "@sindresorhus/is": "^0.14.0", - "@szmarczak/http-timer": "^1.1.2", - "cacheable-request": "^6.0.0", - "decompress-response": "^3.3.0", - "duplexer3": "^0.1.4", - "get-stream": "^4.1.0", - "lowercase-keys": "^1.0.1", - "mimic-response": "^1.0.1", - "p-cancelable": "^1.0.0", - "to-readable-stream": "^1.0.0", - "url-parse-lax": "^3.0.0" - } - }, - "hash.js": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", - "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", - "requires": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.0" - } - }, - "lodash": { - "version": "4.17.19", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", - "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==" - }, - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" - }, - "mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", - "requires": { - "minimist": "^1.2.5" - } - }, - "nan": { - "version": "2.14.1", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.1.tgz", - "integrity": "sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw==" - }, - "oboe": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/oboe/-/oboe-2.1.4.tgz", - "integrity": "sha1-IMiM2wwVNxuwQRklfU/dNLCqSfY=", - "requires": { - "http-https": "^1.0.0" - } - }, - "p-cancelable": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz", - "integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==" + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==" }, - "prepend-http": { + "is-fullwidth-code-point": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", - "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=" - }, - "scrypt-js": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-2.0.3.tgz", - "integrity": "sha1-uwBAvgMEPamgEqLOqfyfhSz8h9Q=" - }, - "swarm-js": { - "version": "0.1.39", - "resolved": "https://registry.npmjs.org/swarm-js/-/swarm-js-0.1.39.tgz", - "integrity": "sha512-QLMqL2rzF6n5s50BptyD6Oi0R1aWlJC5Y17SRIVXRj6OR1DRIPM7nepvrxxkjA1zNzFz6mUOMjfeqeDaWB7OOg==", - "requires": { - "bluebird": "^3.5.0", - "buffer": "^5.0.5", - "decompress": "^4.0.0", - "eth-lib": "^0.1.26", - "fs-extra": "^4.0.2", - "got": "^7.1.0", - "mime-types": "^2.1.16", - "mkdirp-promise": "^5.0.1", - "mock-fs": "^4.1.0", - "setimmediate": "^1.0.5", - "tar": "^4.0.2", - "xhr-request-promise": "^0.1.2" - }, - "dependencies": { - "get-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=" - }, - "got": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/got/-/got-7.1.0.tgz", - "integrity": "sha512-Y5WMo7xKKq1muPsxD+KmrR8DH5auG7fBdDVueZwETwV6VytKyU9OX/ddpq2/1hp1vIPvVb4T81dKQz3BivkNLw==", - "requires": { - "decompress-response": "^3.2.0", - "duplexer3": "^0.1.4", - "get-stream": "^3.0.0", - "is-plain-obj": "^1.1.0", - "is-retry-allowed": "^1.0.0", - "is-stream": "^1.0.0", - "isurl": "^1.0.0-alpha5", - "lowercase-keys": "^1.0.0", - "p-cancelable": "^0.3.0", - "p-timeout": "^1.1.1", - "safe-buffer": "^5.0.1", - "timed-out": "^4.0.0", - "url-parse-lax": "^1.0.0", - "url-to-options": "^1.0.1" - } - }, - "p-cancelable": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.3.0.tgz", - "integrity": "sha512-RVbZPLso8+jFeq1MfNvgXtCRED2raz/dKpacfTNxsx6pLEpEomM7gah6VeHSYV3+vo0OAi4MkArtQcWWXuQoyw==" - }, - "prepend-http": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", - "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=" - }, - "url-parse-lax": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", - "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", - "requires": { - "prepend-http": "^1.0.1" - } - } - } - }, - "tar": { - "version": "4.4.13", - "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.13.tgz", - "integrity": "sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA==", - "requires": { - "chownr": "^1.1.1", - "fs-minipass": "^1.2.5", - "minipass": "^2.8.6", - "minizlib": "^1.2.1", - "mkdirp": "^0.5.0", - "safe-buffer": "^5.1.2", - "yallist": "^3.0.3" - } - }, - "underscore": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.9.1.tgz", - "integrity": "sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg==" - }, - "url-parse-lax": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", - "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", - "requires": { - "prepend-http": "^2.0.0" - } - }, - "uuid": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.1.tgz", - "integrity": "sha1-wqMN7bPlNdcsz4LjQ5QaULqFM6w=" - }, - "web3": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/web3/-/web3-1.2.2.tgz", - "integrity": "sha512-/ChbmB6qZpfGx6eNpczt5YSUBHEA5V2+iUCbn85EVb3Zv6FVxrOo5Tv7Lw0gE2tW7EEjASbCyp3mZeiZaCCngg==", - "requires": { - "@types/node": "^12.6.1", - "web3-bzz": "1.2.2", - "web3-core": "1.2.2", - "web3-eth": "1.2.2", - "web3-eth-personal": "1.2.2", - "web3-net": "1.2.2", - "web3-shh": "1.2.2", - "web3-utils": "1.2.2" - } - }, - "web3-bzz": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.2.2.tgz", - "integrity": "sha512-b1O2ObsqUN1lJxmFSjvnEC4TsaCbmh7Owj3IAIWTKqL9qhVgx7Qsu5O9cD13pBiSPNZJ68uJPaKq380QB4NWeA==", - "requires": { - "@types/node": "^10.12.18", - "got": "9.6.0", - "swarm-js": "0.1.39", - "underscore": "1.9.1" - }, - "dependencies": { - "@types/node": { - "version": "10.17.27", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.27.tgz", - "integrity": "sha512-J0oqm9ZfAXaPdwNXMMgAhylw5fhmXkToJd06vuDUSAgEDZ/n/69/69UmyBZbc+zT34UnShuDSBqvim3SPnozJg==" - } - } - }, - "web3-core": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.2.2.tgz", - "integrity": "sha512-miHAX3qUgxV+KYfaOY93Hlc3kLW2j5fH8FJy6kSxAv+d4d5aH0wwrU2IIoJylQdT+FeenQ38sgsCnFu9iZ1hCQ==", - "requires": { - "@types/bn.js": "^4.11.4", - "@types/node": "^12.6.1", - "web3-core-helpers": "1.2.2", - "web3-core-method": "1.2.2", - "web3-core-requestmanager": "1.2.2", - "web3-utils": "1.2.2" - } - }, - "web3-core-helpers": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.2.2.tgz", - "integrity": "sha512-HJrRsIGgZa1jGUIhvGz4S5Yh6wtOIo/TMIsSLe+Xay+KVnbseJpPprDI5W3s7H2ODhMQTbogmmUFquZweW2ImQ==", - "requires": { - "underscore": "1.9.1", - "web3-eth-iban": "1.2.2", - "web3-utils": "1.2.2" - } - }, - "web3-core-method": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.2.2.tgz", - "integrity": "sha512-szR4fDSBxNHaF1DFqE+j6sFR/afv9Aa36OW93saHZnrh+iXSrYeUUDfugeNcRlugEKeUCkd4CZylfgbK2SKYJA==", - "requires": { - "underscore": "1.9.1", - "web3-core-helpers": "1.2.2", - "web3-core-promievent": "1.2.2", - "web3-core-subscriptions": "1.2.2", - "web3-utils": "1.2.2" - } - }, - "web3-core-promievent": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.2.2.tgz", - "integrity": "sha512-tKvYeT8bkUfKABcQswK6/X79blKTKYGk949urZKcLvLDEaWrM3uuzDwdQT3BNKzQ3vIvTggFPX9BwYh0F1WwqQ==", - "requires": { - "any-promise": "1.3.0", - "eventemitter3": "3.1.2" - } - }, - "web3-core-requestmanager": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.2.2.tgz", - "integrity": "sha512-a+gSbiBRHtHvkp78U2bsntMGYGF2eCb6219aMufuZWeAZGXJ63Wc2321PCbA8hF9cQrZI4EoZ4kVLRI4OF15Hw==", - "requires": { - "underscore": "1.9.1", - "web3-core-helpers": "1.2.2", - "web3-providers-http": "1.2.2", - "web3-providers-ipc": "1.2.2", - "web3-providers-ws": "1.2.2" - } - }, - "web3-core-subscriptions": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.2.2.tgz", - "integrity": "sha512-QbTgigNuT4eicAWWr7ahVpJyM8GbICsR1Ys9mJqzBEwpqS+RXTRVSkwZ2IsxO+iqv6liMNwGregbJLq4urMFcQ==", - "requires": { - "eventemitter3": "3.1.2", - "underscore": "1.9.1", - "web3-core-helpers": "1.2.2" - } - }, - "web3-eth": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.2.2.tgz", - "integrity": "sha512-UXpC74mBQvZzd4b+baD4Ocp7g+BlwxhBHumy9seyE/LMIcMlePXwCKzxve9yReNpjaU16Mmyya6ZYlyiKKV8UA==", - "requires": { - "underscore": "1.9.1", - "web3-core": "1.2.2", - "web3-core-helpers": "1.2.2", - "web3-core-method": "1.2.2", - "web3-core-subscriptions": "1.2.2", - "web3-eth-abi": "1.2.2", - "web3-eth-accounts": "1.2.2", - "web3-eth-contract": "1.2.2", - "web3-eth-ens": "1.2.2", - "web3-eth-iban": "1.2.2", - "web3-eth-personal": "1.2.2", - "web3-net": "1.2.2", - "web3-utils": "1.2.2" - } - }, - "web3-eth-abi": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.2.2.tgz", - "integrity": "sha512-Yn/ZMgoOLxhTVxIYtPJ0eS6pnAnkTAaJgUJh1JhZS4ekzgswMfEYXOwpMaD5eiqPJLpuxmZFnXnBZlnQ1JMXsw==", - "requires": { - "ethers": "4.0.0-beta.3", - "underscore": "1.9.1", - "web3-utils": "1.2.2" - }, - "dependencies": { - "@types/node": { - "version": "10.17.27", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.27.tgz", - "integrity": "sha512-J0oqm9ZfAXaPdwNXMMgAhylw5fhmXkToJd06vuDUSAgEDZ/n/69/69UmyBZbc+zT34UnShuDSBqvim3SPnozJg==" - }, - "elliptic": { - "version": "6.3.3", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.3.3.tgz", - "integrity": "sha1-VILZZG1UvLif19mU/J4ulWiHbj8=", - "requires": { - "bn.js": "^4.4.0", - "brorand": "^1.0.1", - "hash.js": "^1.0.0", - "inherits": "^2.0.1" - } - }, - "ethers": { - "version": "4.0.0-beta.3", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-4.0.0-beta.3.tgz", - "integrity": "sha512-YYPogooSknTwvHg3+Mv71gM/3Wcrx+ZpCzarBj3mqs9njjRkrOo2/eufzhHloOCo3JSoNI4TQJJ6yU5ABm3Uog==", - "requires": { - "@types/node": "^10.3.2", - "aes-js": "3.0.0", - "bn.js": "^4.4.0", - "elliptic": "6.3.3", - "hash.js": "1.1.3", - "js-sha3": "0.5.7", - "scrypt-js": "2.0.3", - "setimmediate": "1.0.4", - "uuid": "2.0.1", - "xmlhttprequest": "1.8.0" - } - }, - "setimmediate": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.4.tgz", - "integrity": "sha1-IOgd5iLUoCWIzgyNqJc8vPHTE48=" - } - } - }, - "web3-eth-accounts": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.2.2.tgz", - "integrity": "sha512-KzHOEyXOEZ13ZOkWN3skZKqSo5f4Z1ogPFNn9uZbKCz+kSp+gCAEKxyfbOsB/JMAp5h7o7pb6eYsPCUBJmFFiA==", - "requires": { - "any-promise": "1.3.0", - "crypto-browserify": "3.12.0", - "eth-lib": "0.2.7", - "ethereumjs-common": "^1.3.2", - "ethereumjs-tx": "^2.1.1", - "scrypt-shim": "github:web3-js/scrypt-shim", - "underscore": "1.9.1", - "uuid": "3.3.2", - "web3-core": "1.2.2", - "web3-core-helpers": "1.2.2", - "web3-core-method": "1.2.2", - "web3-utils": "1.2.2" - }, - "dependencies": { - "eth-lib": { - "version": "0.2.7", - "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.7.tgz", - "integrity": "sha1-L5Pxex4jrsN1nNSj/iDBKGo/wco=", - "requires": { - "bn.js": "^4.11.6", - "elliptic": "^6.4.0", - "xhr-request-promise": "^0.1.2" - } - }, - "uuid": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", - "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==" - } - } - }, - "web3-eth-contract": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.2.2.tgz", - "integrity": "sha512-EKT2yVFws3FEdotDQoNsXTYL798+ogJqR2//CaGwx3p0/RvQIgfzEwp8nbgA6dMxCsn9KOQi7OtklzpnJMkjtA==", - "requires": { - "@types/bn.js": "^4.11.4", - "underscore": "1.9.1", - "web3-core": "1.2.2", - "web3-core-helpers": "1.2.2", - "web3-core-method": "1.2.2", - "web3-core-promievent": "1.2.2", - "web3-core-subscriptions": "1.2.2", - "web3-eth-abi": "1.2.2", - "web3-utils": "1.2.2" - } - }, - "web3-eth-ens": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/web3-eth-ens/-/web3-eth-ens-1.2.2.tgz", - "integrity": "sha512-CFjkr2HnuyMoMFBoNUWojyguD4Ef+NkyovcnUc/iAb9GP4LHohKrODG4pl76R5u61TkJGobC2ij6TyibtsyVYg==", - "requires": { - "eth-ens-namehash": "2.0.8", - "underscore": "1.9.1", - "web3-core": "1.2.2", - "web3-core-helpers": "1.2.2", - "web3-core-promievent": "1.2.2", - "web3-eth-abi": "1.2.2", - "web3-eth-contract": "1.2.2", - "web3-utils": "1.2.2" - } - }, - "web3-eth-iban": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.2.2.tgz", - "integrity": "sha512-gxKXBoUhaTFHr0vJB/5sd4i8ejF/7gIsbM/VvemHT3tF5smnmY6hcwSMmn7sl5Gs+83XVb/BngnnGkf+I/rsrQ==", - "requires": { - "bn.js": "4.11.8", - "web3-utils": "1.2.2" - }, - "dependencies": { - "bn.js": { - "version": "4.11.8", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", - "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==" - } - } - }, - "web3-eth-personal": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.2.2.tgz", - "integrity": "sha512-4w+GLvTlFqW3+q4xDUXvCEMU7kRZ+xm/iJC8gm1Li1nXxwwFbs+Y+KBK6ZYtoN1qqAnHR+plYpIoVo27ixI5Rg==", - "requires": { - "@types/node": "^12.6.1", - "web3-core": "1.2.2", - "web3-core-helpers": "1.2.2", - "web3-core-method": "1.2.2", - "web3-net": "1.2.2", - "web3-utils": "1.2.2" - } - }, - "web3-net": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.2.2.tgz", - "integrity": "sha512-K07j2DXq0x4UOJgae65rWZKraOznhk8v5EGSTdFqASTx7vWE/m+NqBijBYGEsQY1lSMlVaAY9UEQlcXK5HzXTw==", - "requires": { - "web3-core": "1.2.2", - "web3-core-method": "1.2.2", - "web3-utils": "1.2.2" - } - }, - "web3-providers-http": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.2.2.tgz", - "integrity": "sha512-BNZ7Hguy3eBszsarH5gqr9SIZNvqk9eKwqwmGH1LQS1FL3NdoOn7tgPPdddrXec4fL94CwgNk4rCU+OjjZRNDg==", - "requires": { - "web3-core-helpers": "1.2.2", - "xhr2-cookies": "1.1.0" - } - }, - "web3-providers-ipc": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.2.2.tgz", - "integrity": "sha512-t97w3zi5Kn/LEWGA6D9qxoO0LBOG+lK2FjlEdCwDQatffB/+vYrzZ/CLYVQSoyFZAlsDoBasVoYSWZK1n39aHA==", - "requires": { - "oboe": "2.1.4", - "underscore": "1.9.1", - "web3-core-helpers": "1.2.2" - } - }, - "web3-providers-ws": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.2.2.tgz", - "integrity": "sha512-Wb1mrWTGMTXOpJkL0yGvL/WYLt8fUIXx8k/l52QB2IiKzvyd42dTWn4+j8IKXGSYYzOm7NMqv6nhA5VDk12VfA==", - "requires": { - "underscore": "1.9.1", - "web3-core-helpers": "1.2.2", - "websocket": "github:web3-js/WebSocket-Node#polyfill/globalThis" - } + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" }, - "web3-shh": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/web3-shh/-/web3-shh-1.2.2.tgz", - "integrity": "sha512-og258NPhlBn8yYrDWjoWBBb6zo1OlBgoWGT+LL5/LPqRbjPe09hlOYHgscAAr9zZGtohTOty7RrxYw6Z6oDWCg==", + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", "requires": { - "web3-core": "1.2.2", - "web3-core-method": "1.2.2", - "web3-core-subscriptions": "1.2.2", - "web3-net": "1.2.2" + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" } }, - "web3-utils": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.2.2.tgz", - "integrity": "sha512-joF+s3243TY5cL7Z7y4h1JsJpUCf/kmFmj+eJar7Y2yNIGVcW961VyrAms75tjUysSuHaUQ3eQXjBEUJueT52A==", + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", "requires": { - "bn.js": "4.11.8", - "eth-lib": "0.2.7", - "ethereum-bloom-filters": "^1.0.6", - "ethjs-unit": "0.1.6", - "number-to-bn": "1.7.0", - "randombytes": "^2.1.0", - "underscore": "1.9.1", - "utf8": "3.0.0" - }, - "dependencies": { - "bn.js": { - "version": "4.11.8", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", - "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==" - }, - "eth-lib": { - "version": "0.2.7", - "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.7.tgz", - "integrity": "sha1-L5Pxex4jrsN1nNSj/iDBKGo/wco=", - "requires": { - "bn.js": "^4.11.6", - "elliptic": "^6.4.0", - "xhr-request-promise": "^0.1.2" - } - } + "ansi-regex": "^4.1.0" } }, - "websocket": { - "version": "github:web3-js/WebSocket-Node#ef5ea2f41daf4a2113b80c9223df884b4d56c400", - "from": "github:web3-js/WebSocket-Node#polyfill/globalThis", + "wrap-ansi": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", "requires": { - "debug": "^2.2.0", - "es5-ext": "^0.10.50", - "nan": "^2.14.0", - "typedarray-to-buffer": "^3.1.5", - "yaeti": "^0.0.6" + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" } } } }, - "@truffle/provider": { - "version": "0.1.19", - "resolved": "https://registry.npmjs.org/@truffle/provider/-/provider-0.1.19.tgz", - "integrity": "sha512-ke8iQmzW4Y99+8iff8xQcc+mCNU4AkwtaZ/iSpmVD8qpLytw8/DSNCm0RiEz9/+I93Q1zqI4Jnij/rXnkS2Njw==", + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" + }, + "colors": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", + "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", + "optional": true + }, + "command-exists": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/command-exists/-/command-exists-1.2.9.tgz", + "integrity": "sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w==" + }, + "commander": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-6.1.0.tgz", + "integrity": "sha512-wl7PNrYWd2y5mp1OK/LhTlv8Ff4kQJQRXXAvF+uU/TPNiVJUxZLRYGj/B0y/lPGAVcSbJqH2Za/cvHmrPMC8mA==" + }, + "compare-versions": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-3.6.0.tgz", + "integrity": "sha512-W6Af2Iw1z4CB7q4uU4hv646dW9GQuBM+YpC0UvUCWSD8w90SJjp+ujJuXaEMtAXBtSqGfMPuFOVn4/+FlaqfBA==" + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "confusing-browser-globals": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/confusing-browser-globals/-/confusing-browser-globals-1.0.9.tgz", + "integrity": "sha512-KbS1Y0jMtyPgIxjO7ZzMAuUpAKMt1SzCL9fsrKsX6b0zJPTaT0SiSPmewwVZg9UAO83HVIlEhZF84LIjZ0lmAw==", + "dev": true + }, + "contains-path": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/contains-path/-/contains-path-0.1.0.tgz", + "integrity": "sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo=", + "dev": true + }, + "cosmiconfig": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.0.0.tgz", + "integrity": "sha512-pondGvTuVYDk++upghXJabWzL6Kxu6f26ljFw64Swq9v6sQPUL3EUlVDV56diOjpCayKihL6hVe8exIACU4XcA==", + "requires": { + "@types/parse-json": "^4.0.0", + "import-fresh": "^3.2.1", + "parse-json": "^5.0.0", + "path-type": "^4.0.0", + "yaml": "^1.10.0" + } + }, + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "requires": { - "@truffle/error": "^0.0.7", - "@truffle/interface-adapter": "^0.3.0", - "web3": "1.2.1" + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" }, "dependencies": { - "@types/node": { - "version": "10.17.27", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.27.tgz", - "integrity": "sha512-J0oqm9ZfAXaPdwNXMMgAhylw5fhmXkToJd06vuDUSAgEDZ/n/69/69UmyBZbc+zT34UnShuDSBqvim3SPnozJg==" - }, - "aes-js": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz", - "integrity": "sha1-4h3xCtbCBTKVvLuNq0Cwnb6ofk0=" - }, - "bn.js": { - "version": "4.11.8", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", - "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==" - }, - "buffer": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.6.0.tgz", - "integrity": "sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw==", - "requires": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4" - } - }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "requires": { - "ms": "2.0.0" - } - }, - "ethers": { - "version": "4.0.0-beta.3", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-4.0.0-beta.3.tgz", - "integrity": "sha512-YYPogooSknTwvHg3+Mv71gM/3Wcrx+ZpCzarBj3mqs9njjRkrOo2/eufzhHloOCo3JSoNI4TQJJ6yU5ABm3Uog==", - "requires": { - "@types/node": "^10.3.2", - "aes-js": "3.0.0", - "bn.js": "^4.4.0", - "elliptic": "6.3.3", - "hash.js": "1.1.3", - "js-sha3": "0.5.7", - "scrypt-js": "2.0.3", - "setimmediate": "1.0.4", - "uuid": "2.0.1", - "xmlhttprequest": "1.8.0" - }, - "dependencies": { - "elliptic": { - "version": "6.3.3", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.3.3.tgz", - "integrity": "sha1-VILZZG1UvLif19mU/J4ulWiHbj8=", - "requires": { - "bn.js": "^4.4.0", - "brorand": "^1.0.1", - "hash.js": "^1.0.0", - "inherits": "^2.0.1" - } - }, - "setimmediate": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.4.tgz", - "integrity": "sha1-IOgd5iLUoCWIzgyNqJc8vPHTE48=" - } - } - }, - "eventemitter3": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.2.tgz", - "integrity": "sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q==" - }, - "fs-extra": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz", - "integrity": "sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==", - "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - }, - "got": { - "version": "9.6.0", - "resolved": "https://registry.npmjs.org/got/-/got-9.6.0.tgz", - "integrity": "sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==", - "requires": { - "@sindresorhus/is": "^0.14.0", - "@szmarczak/http-timer": "^1.1.2", - "cacheable-request": "^6.0.0", - "decompress-response": "^3.3.0", - "duplexer3": "^0.1.4", - "get-stream": "^4.1.0", - "lowercase-keys": "^1.0.1", - "mimic-response": "^1.0.1", - "p-cancelable": "^1.0.0", - "to-readable-stream": "^1.0.0", - "url-parse-lax": "^3.0.0" - } - }, - "hash.js": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", - "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", - "requires": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.0" - } - }, - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" - }, - "mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", - "requires": { - "minimist": "^1.2.5" - } - }, - "nan": { - "version": "2.14.1", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.1.tgz", - "integrity": "sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw==" - }, - "oboe": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/oboe/-/oboe-2.1.4.tgz", - "integrity": "sha1-IMiM2wwVNxuwQRklfU/dNLCqSfY=", - "requires": { - "http-https": "^1.0.0" - } - }, - "p-cancelable": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz", - "integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==" - }, - "prepend-http": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", - "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=" - }, - "scrypt-js": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-2.0.3.tgz", - "integrity": "sha1-uwBAvgMEPamgEqLOqfyfhSz8h9Q=" - }, - "scryptsy": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/scryptsy/-/scryptsy-2.1.0.tgz", - "integrity": "sha512-1CdSqHQowJBnMAFyPEBRfqag/YP9OF394FV+4YREIJX4ljD7OxvQRDayyoyyCk+senRjSkP6VnUNQmVQqB6g7w==" - }, - "semver": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.2.0.tgz", - "integrity": "sha512-jdFC1VdUGT/2Scgbimf7FSx9iJLXoqfglSF+gJeuNWVpiE37OIbc1jywR/GJyFdz3mnkz2/id0L0J/cr0izR5A==" - }, - "swarm-js": { - "version": "0.1.39", - "resolved": "https://registry.npmjs.org/swarm-js/-/swarm-js-0.1.39.tgz", - "integrity": "sha512-QLMqL2rzF6n5s50BptyD6Oi0R1aWlJC5Y17SRIVXRj6OR1DRIPM7nepvrxxkjA1zNzFz6mUOMjfeqeDaWB7OOg==", - "requires": { - "bluebird": "^3.5.0", - "buffer": "^5.0.5", - "decompress": "^4.0.0", - "eth-lib": "^0.1.26", - "fs-extra": "^4.0.2", - "got": "^7.1.0", - "mime-types": "^2.1.16", - "mkdirp-promise": "^5.0.1", - "mock-fs": "^4.1.0", - "setimmediate": "^1.0.5", - "tar": "^4.0.2", - "xhr-request-promise": "^0.1.2" - }, - "dependencies": { - "get-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=" - }, - "got": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/got/-/got-7.1.0.tgz", - "integrity": "sha512-Y5WMo7xKKq1muPsxD+KmrR8DH5auG7fBdDVueZwETwV6VytKyU9OX/ddpq2/1hp1vIPvVb4T81dKQz3BivkNLw==", - "requires": { - "decompress-response": "^3.2.0", - "duplexer3": "^0.1.4", - "get-stream": "^3.0.0", - "is-plain-obj": "^1.1.0", - "is-retry-allowed": "^1.0.0", - "is-stream": "^1.0.0", - "isurl": "^1.0.0-alpha5", - "lowercase-keys": "^1.0.0", - "p-cancelable": "^0.3.0", - "p-timeout": "^1.1.1", - "safe-buffer": "^5.0.1", - "timed-out": "^4.0.0", - "url-parse-lax": "^1.0.0", - "url-to-options": "^1.0.1" - } - }, - "p-cancelable": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.3.0.tgz", - "integrity": "sha512-RVbZPLso8+jFeq1MfNvgXtCRED2raz/dKpacfTNxsx6pLEpEomM7gah6VeHSYV3+vo0OAi4MkArtQcWWXuQoyw==" - }, - "prepend-http": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", - "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=" - }, - "url-parse-lax": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", - "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", - "requires": { - "prepend-http": "^1.0.1" - } - } - } - }, - "tar": { - "version": "4.4.13", - "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.13.tgz", - "integrity": "sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA==", - "requires": { - "chownr": "^1.1.1", - "fs-minipass": "^1.2.5", - "minipass": "^2.8.6", - "minizlib": "^1.2.1", - "mkdirp": "^0.5.0", - "safe-buffer": "^5.1.2", - "yallist": "^3.0.3" - } - }, - "underscore": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.9.1.tgz", - "integrity": "sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg==" - }, - "url-parse-lax": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", - "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", - "requires": { - "prepend-http": "^2.0.0" - } - }, - "uuid": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.1.tgz", - "integrity": "sha1-wqMN7bPlNdcsz4LjQ5QaULqFM6w=" - }, - "web3": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/web3/-/web3-1.2.1.tgz", - "integrity": "sha512-nNMzeCK0agb5i/oTWNdQ1aGtwYfXzHottFP2Dz0oGIzavPMGSKyVlr8ibVb1yK5sJBjrWVnTdGaOC2zKDFuFRw==", - "requires": { - "web3-bzz": "1.2.1", - "web3-core": "1.2.1", - "web3-eth": "1.2.1", - "web3-eth-personal": "1.2.1", - "web3-net": "1.2.1", - "web3-shh": "1.2.1", - "web3-utils": "1.2.1" - } - }, - "web3-bzz": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.2.1.tgz", - "integrity": "sha512-LdOO44TuYbGIPfL4ilkuS89GQovxUpmLz6C1UC7VYVVRILeZS740FVB3j9V4P4FHUk1RenaDfKhcntqgVCHtjw==", - "requires": { - "got": "9.6.0", - "swarm-js": "0.1.39", - "underscore": "1.9.1" - } - }, - "web3-core": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.2.1.tgz", - "integrity": "sha512-5ODwIqgl8oIg/0+Ai4jsLxkKFWJYE0uLuE1yUKHNVCL4zL6n3rFjRMpKPokd6id6nJCNgeA64KdWQ4XfpnjdMg==", - "requires": { - "web3-core-helpers": "1.2.1", - "web3-core-method": "1.2.1", - "web3-core-requestmanager": "1.2.1", - "web3-utils": "1.2.1" - } - }, - "web3-core-helpers": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.2.1.tgz", - "integrity": "sha512-Gx3sTEajD5r96bJgfuW377PZVFmXIH4TdqDhgGwd2lZQCcMi+DA4TgxJNJGxn0R3aUVzyyE76j4LBrh412mXrw==", - "requires": { - "underscore": "1.9.1", - "web3-eth-iban": "1.2.1", - "web3-utils": "1.2.1" - } - }, - "web3-core-method": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.2.1.tgz", - "integrity": "sha512-Ghg2WS23qi6Xj8Od3VCzaImLHseEA7/usvnOItluiIc5cKs00WYWsNy2YRStzU9a2+z8lwQywPYp0nTzR/QXdQ==", - "requires": { - "underscore": "1.9.1", - "web3-core-helpers": "1.2.1", - "web3-core-promievent": "1.2.1", - "web3-core-subscriptions": "1.2.1", - "web3-utils": "1.2.1" - } - }, - "web3-core-promievent": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.2.1.tgz", - "integrity": "sha512-IVUqgpIKoeOYblwpex4Hye6npM0aMR+kU49VP06secPeN0rHMyhGF0ZGveWBrGvf8WDPI7jhqPBFIC6Jf3Q3zw==", - "requires": { - "any-promise": "1.3.0", - "eventemitter3": "3.1.2" - } - }, - "web3-core-requestmanager": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.2.1.tgz", - "integrity": "sha512-xfknTC69RfYmLKC+83Jz73IC3/sS2ZLhGtX33D4Q5nQ8yc39ElyAolxr9sJQS8kihOcM6u4J+8gyGMqsLcpIBg==", - "requires": { - "underscore": "1.9.1", - "web3-core-helpers": "1.2.1", - "web3-providers-http": "1.2.1", - "web3-providers-ipc": "1.2.1", - "web3-providers-ws": "1.2.1" - } - }, - "web3-core-subscriptions": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.2.1.tgz", - "integrity": "sha512-nmOwe3NsB8V8UFsY1r+sW6KjdOS68h8nuh7NzlWxBQT/19QSUGiERRTaZXWu5BYvo1EoZRMxCKyCQpSSXLc08g==", - "requires": { - "eventemitter3": "3.1.2", - "underscore": "1.9.1", - "web3-core-helpers": "1.2.1" - } - }, - "web3-eth": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.2.1.tgz", - "integrity": "sha512-/2xly4Yry5FW1i+uygPjhfvgUP/MS/Dk+PDqmzp5M88tS86A+j8BzKc23GrlA8sgGs0645cpZK/999LpEF5UdA==", - "requires": { - "underscore": "1.9.1", - "web3-core": "1.2.1", - "web3-core-helpers": "1.2.1", - "web3-core-method": "1.2.1", - "web3-core-subscriptions": "1.2.1", - "web3-eth-abi": "1.2.1", - "web3-eth-accounts": "1.2.1", - "web3-eth-contract": "1.2.1", - "web3-eth-ens": "1.2.1", - "web3-eth-iban": "1.2.1", - "web3-eth-personal": "1.2.1", - "web3-net": "1.2.1", - "web3-utils": "1.2.1" - } - }, - "web3-eth-abi": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.2.1.tgz", - "integrity": "sha512-jI/KhU2a/DQPZXHjo2GW0myEljzfiKOn+h1qxK1+Y9OQfTcBMxrQJyH5AP89O6l6NZ1QvNdq99ThAxBFoy5L+g==", - "requires": { - "ethers": "4.0.0-beta.3", - "underscore": "1.9.1", - "web3-utils": "1.2.1" - } - }, - "web3-eth-accounts": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.2.1.tgz", - "integrity": "sha512-26I4qq42STQ8IeKUyur3MdQ1NzrzCqPsmzqpux0j6X/XBD7EjZ+Cs0lhGNkSKH5dI3V8CJasnQ5T1mNKeWB7nQ==", - "requires": { - "any-promise": "1.3.0", - "crypto-browserify": "3.12.0", - "eth-lib": "0.2.7", - "scryptsy": "2.1.0", - "semver": "6.2.0", - "underscore": "1.9.1", - "uuid": "3.3.2", - "web3-core": "1.2.1", - "web3-core-helpers": "1.2.1", - "web3-core-method": "1.2.1", - "web3-utils": "1.2.1" - }, - "dependencies": { - "eth-lib": { - "version": "0.2.7", - "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.7.tgz", - "integrity": "sha1-L5Pxex4jrsN1nNSj/iDBKGo/wco=", - "requires": { - "bn.js": "^4.11.6", - "elliptic": "^6.4.0", - "xhr-request-promise": "^0.1.2" - } - }, - "uuid": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", - "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==" - } - } - }, - "web3-eth-contract": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.2.1.tgz", - "integrity": "sha512-kYFESbQ3boC9bl2rYVghj7O8UKMiuKaiMkxvRH5cEDHil8V7MGEGZNH0slSdoyeftZVlaWSMqkRP/chfnKND0g==", - "requires": { - "underscore": "1.9.1", - "web3-core": "1.2.1", - "web3-core-helpers": "1.2.1", - "web3-core-method": "1.2.1", - "web3-core-promievent": "1.2.1", - "web3-core-subscriptions": "1.2.1", - "web3-eth-abi": "1.2.1", - "web3-utils": "1.2.1" - } - }, - "web3-eth-ens": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/web3-eth-ens/-/web3-eth-ens-1.2.1.tgz", - "integrity": "sha512-lhP1kFhqZr2nnbu3CGIFFrAnNxk2veXpOXBY48Tub37RtobDyHijHgrj+xTh+mFiPokyrapVjpFsbGa+Xzye4Q==", - "requires": { - "eth-ens-namehash": "2.0.8", - "underscore": "1.9.1", - "web3-core": "1.2.1", - "web3-core-helpers": "1.2.1", - "web3-core-promievent": "1.2.1", - "web3-eth-abi": "1.2.1", - "web3-eth-contract": "1.2.1", - "web3-utils": "1.2.1" - } - }, - "web3-eth-iban": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.2.1.tgz", - "integrity": "sha512-9gkr4QPl1jCU+wkgmZ8EwODVO3ovVj6d6JKMos52ggdT2YCmlfvFVF6wlGLwi0VvNa/p+0BjJzaqxnnG/JewjQ==", - "requires": { - "bn.js": "4.11.8", - "web3-utils": "1.2.1" - } - }, - "web3-eth-personal": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.2.1.tgz", - "integrity": "sha512-RNDVSiaSoY4aIp8+Hc7z+X72H7lMb3fmAChuSBADoEc7DsJrY/d0R5qQDK9g9t2BO8oxgLrLNyBP/9ub2Hc6Bg==", - "requires": { - "web3-core": "1.2.1", - "web3-core-helpers": "1.2.1", - "web3-core-method": "1.2.1", - "web3-net": "1.2.1", - "web3-utils": "1.2.1" - } - }, - "web3-net": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.2.1.tgz", - "integrity": "sha512-Yt1Bs7WgnLESPe0rri/ZoPWzSy55ovioaP35w1KZydrNtQ5Yq4WcrAdhBzcOW7vAkIwrsLQsvA+hrOCy7mNauw==", - "requires": { - "web3-core": "1.2.1", - "web3-core-method": "1.2.1", - "web3-utils": "1.2.1" - } - }, - "web3-providers-http": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.2.1.tgz", - "integrity": "sha512-BDtVUVolT9b3CAzeGVA/np1hhn7RPUZ6YYGB/sYky+GjeO311Yoq8SRDUSezU92x8yImSC2B+SMReGhd1zL+bQ==", - "requires": { - "web3-core-helpers": "1.2.1", - "xhr2-cookies": "1.1.0" - } - }, - "web3-providers-ipc": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.2.1.tgz", - "integrity": "sha512-oPEuOCwxVx8L4CPD0TUdnlOUZwGBSRKScCz/Ws2YHdr9Ium+whm+0NLmOZjkjQp5wovQbyBzNa6zJz1noFRvFA==", - "requires": { - "oboe": "2.1.4", - "underscore": "1.9.1", - "web3-core-helpers": "1.2.1" - } - }, - "web3-providers-ws": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.2.1.tgz", - "integrity": "sha512-oqsQXzu+ejJACVHy864WwIyw+oB21nw/pI65/sD95Zi98+/HQzFfNcIFneF1NC4bVF3VNX4YHTNq2I2o97LAiA==", - "requires": { - "underscore": "1.9.1", - "web3-core-helpers": "1.2.1", - "websocket": "github:web3-js/WebSocket-Node#polyfill/globalThis" - } - }, - "web3-shh": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/web3-shh/-/web3-shh-1.2.1.tgz", - "integrity": "sha512-/3Cl04nza5kuFn25bV3FJWa0s3Vafr5BlT933h26xovQ6HIIz61LmvNQlvX1AhFL+SNJOTcQmK1SM59vcyC8bA==", - "requires": { - "web3-core": "1.2.1", - "web3-core-method": "1.2.1", - "web3-core-subscriptions": "1.2.1", - "web3-net": "1.2.1" - } - }, - "web3-utils": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.2.1.tgz", - "integrity": "sha512-Mrcn3l58L+yCKz3zBryM6JZpNruWuT0OCbag8w+reeNROSGVlXzUQkU+gtAwc9JCZ7tKUyg67+2YUGqUjVcyBA==", - "requires": { - "bn.js": "4.11.8", - "eth-lib": "0.2.7", - "ethjs-unit": "0.1.6", - "number-to-bn": "1.7.0", - "randomhex": "0.1.5", - "underscore": "1.9.1", - "utf8": "3.0.0" - }, - "dependencies": { - "eth-lib": { - "version": "0.2.7", - "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.7.tgz", - "integrity": "sha1-L5Pxex4jrsN1nNSj/iDBKGo/wco=", - "requires": { - "bn.js": "^4.11.6", - "elliptic": "^6.4.0", - "xhr-request-promise": "^0.1.2" - } - } - } - }, - "websocket": { - "version": "github:web3-js/WebSocket-Node#ef5ea2f41daf4a2113b80c9223df884b4d56c400", - "from": "github:web3-js/WebSocket-Node#polyfill/globalThis", - "requires": { - "debug": "^2.2.0", - "es5-ext": "^0.10.50", - "nan": "^2.14.0", - "typedarray-to-buffer": "^3.1.5", - "yaeti": "^0.0.6" + "isexe": "^2.0.0" } } } }, - "@types/blue-tape": { - "version": "0.1.33", - "resolved": "https://registry.npmjs.org/@types/blue-tape/-/blue-tape-0.1.33.tgz", - "integrity": "sha512-l5cQcLM3aPh55bBQ4geWQ8hZ4Ew+s4RvyhMaBpgW3aJ2HUfRgwd8ENKrk/utC4Hz1dJAiehyIa4vN6emxBMaog==", + "debug": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", "requires": { - "@types/node": "*", - "@types/tape": "*" + "ms": "2.1.2" } }, - "@types/bn.js": { - "version": "4.11.6", - "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-4.11.6.tgz", - "integrity": "sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg==", - "requires": { - "@types/node": "*" - } + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" }, - "@types/color-name": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz", - "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==" + "decode-uri-component": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=" }, - "@types/glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-SEYeGAIQIQX8NN6LDKprLjbrd5dARM5EXsd8GI/A5l0apYI1fGMWgPHSe4ZKL4eozlAyI+doUE9XbYS4xCkQ1w==", + "decompress-response": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", + "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", "requires": { - "@types/minimatch": "*", - "@types/node": "*" + "mimic-response": "^1.0.0" } }, - "@types/json5": { - "version": "0.0.29", - "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", - "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=", - "dev": true - }, - "@types/lodash": { - "version": "4.14.119", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.119.tgz", - "integrity": "sha512-Z3TNyBL8Vd/M9D9Ms2S3LmFq2sSMzahodD6rCS9V2N44HUMINb75jNkSuwAx7eo2ufqTdfOdtGQpNbieUjPQmw==" - }, - "@types/minimatch": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz", - "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==" + "dedent": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", + "integrity": "sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw=" }, - "@types/node": { - "version": "11.11.6", - "resolved": "https://registry.npmjs.org/@types/node/-/node-11.11.6.tgz", - "integrity": "sha512-Exw4yUWMBXM3X+8oqzJNRqZSwUAaS4+7NdvHqQuFi/d+synz++xmX3QIf+BFqneW8N31R8Ky+sikfZUXq07ggQ==" + "deep-eql": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", + "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", + "requires": { + "type-detect": "^4.0.0" + } }, - "@types/parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==" + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=" }, - "@types/pbkdf2": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@types/pbkdf2/-/pbkdf2-3.1.0.tgz", - "integrity": "sha512-Cf63Rv7jCQ0LaL8tNXmEyqTHuIJxRdlS5vMh1mj5voN4+QFhVZnlZruezqpWYDiJ8UTzhP0VmeLXCmBk66YrMQ==", + "deffy": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/deffy/-/deffy-2.2.4.tgz", + "integrity": "sha512-pLc9lsbsWjr6RxmJ2OLyvm+9l4j1yK69h+TML/gUit/t3vTijpkNGh8LioaJYTGO7F25m6HZndADcUOo2PsiUg==", "requires": { - "@types/node": "*" + "typpy": "^2.0.0" } }, - "@types/secp256k1": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@types/secp256k1/-/secp256k1-4.0.1.tgz", - "integrity": "sha512-+ZjSA8ELlOp8SlKi0YLB2tz9d5iPNEmOBd+8Rz21wTMdaXQIa9b6TEnD6l5qKOCypE7FSyPyck12qZJxSDNoog==", + "define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", "requires": { - "@types/node": "*" + "object-keys": "^1.0.12" } }, - "@types/tape": { - "version": "4.13.0", - "resolved": "https://registry.npmjs.org/@types/tape/-/tape-4.13.0.tgz", - "integrity": "sha512-0V8cKowBdsiA9nbxAg7531sF2cdPZNiUogcfIUeUGm+bejUBE/bvibz3rH36iQP9bQjO/sOzFwU97/uC5mCyoA==", + "diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==" + }, + "doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", "requires": { - "@types/node": "*" + "esutils": "^2.0.2" } }, - "@uniswap/lib": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@uniswap/lib/-/lib-1.1.2.tgz", - "integrity": "sha512-FTV/3/qqAz28avfhh4vkupu96qcnLS6tw5G1W6JuOb8foEdNN/279rnuvAXoQM4oBubZmpJXlRZazR2+XTkaww==" + "dom-walk": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/dom-walk/-/dom-walk-0.1.2.tgz", + "integrity": "sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w==" }, - "@uniswap/v2-core": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@uniswap/v2-core/-/v2-core-1.0.1.tgz", - "integrity": "sha512-MtybtkUPSyysqLY2U210NBDeCHX+ltHt3oADGdjqoThZaFRDKwM6k1Nb3F0A3hk5hwuQvytFWhrWHOEq6nVJ8Q==" + "dotenv": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-6.2.0.tgz", + "integrity": "sha512-HygQCKUBSFl8wKQZBSemMywRWcEDNidvNbjGVyZu3nbZ8qq9ubiPoGLMdRDpfSrpkkm9BXYFkpKxxFX38o/76w==" }, - "@web3-js/scrypt-shim": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/@web3-js/scrypt-shim/-/scrypt-shim-0.1.0.tgz", - "integrity": "sha512-ZtZeWCc/s0nMcdx/+rZwY1EcuRdemOK9ag21ty9UsHkFxsNb/AaoucUz0iPuyGe0Ku+PFuRmWZG7Z7462p9xPw==", + "elliptic": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.2.tgz", + "integrity": "sha512-f4x70okzZbIQl/NSRLkI/+tteV/9WqL98zx+SQ69KbXxmVrmjwsNUPn/gYJJ0sHvEak24cZgHIPegRePAtA/xw==", "requires": { - "scryptsy": "^2.1.0", - "semver": "^6.3.0" + "bn.js": "^4.4.0", + "brorand": "^1.0.1", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.0" }, "dependencies": { - "scryptsy": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/scryptsy/-/scryptsy-2.1.0.tgz", - "integrity": "sha512-1CdSqHQowJBnMAFyPEBRfqag/YP9OF394FV+4YREIJX4ljD7OxvQRDayyoyyCk+senRjSkP6VnUNQmVQqB6g7w==" - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + "bn.js": { + "version": "4.11.9", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" } } }, - "@web3-js/websocket": { - "version": "1.0.30", - "resolved": "https://registry.npmjs.org/@web3-js/websocket/-/websocket-1.0.30.tgz", - "integrity": "sha512-fDwrD47MiDrzcJdSeTLF75aCcxVVt8B1N74rA+vh2XCAvFy4tEWJjtnUtj2QG7/zlQ6g9cQ88bZFBxwd9/FmtA==", - "requires": { - "debug": "^2.2.0", - "es5-ext": "^0.10.50", - "nan": "^2.14.0", - "typedarray-to-buffer": "^3.1.5", - "yaeti": "^0.0.6" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - }, - "nan": { - "version": "2.14.1", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.1.tgz", - "integrity": "sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw==" - } - } - }, - "abab": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/abab/-/abab-1.0.4.tgz", - "integrity": "sha1-X6rZwsB/YN12dw9xzwJbYqY8/U4=", - "optional": true - }, - "abbrev": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz", - "integrity": "sha1-kbR5JYinc4wl813W9jdSovh3YTU=" - }, - "abi-decoder": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/abi-decoder/-/abi-decoder-1.2.0.tgz", - "integrity": "sha512-y2OKSEW4gf2838Eavc56vQY9V46zaXkf3Jl1WpTfUBbzAVrXSr4JRZAAWv55Tv9s5WNz1rVgBgz5d2aJIL1QCg==", - "requires": { - "web3": "^0.18.4" - }, - "dependencies": { - "utf8": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/utf8/-/utf8-2.1.2.tgz", - "integrity": "sha1-H6DZJw6b6FDZsFAn9jUZv0ZFfZY=" - }, - "web3": { - "version": "0.18.4", - "resolved": "https://registry.npmjs.org/web3/-/web3-0.18.4.tgz", - "integrity": "sha1-gewXhBRUkfLqqJVbMcBgSeB8Xn0=", - "requires": { - "bignumber.js": "git+https://github.com/debris/bignumber.js.git#94d7146671b9719e00a09c29b01a691bc85048c2", - "crypto-js": "^3.1.4", - "utf8": "^2.1.1", - "xhr2": "*", - "xmlhttprequest": "*" - } - } - } - }, - "accepts": { - "version": "1.3.7", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", - "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", - "requires": { - "mime-types": "~2.1.24", - "negotiator": "0.6.2" - } - }, - "acorn": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-2.7.0.tgz", - "integrity": "sha1-q259nYhqrKiwhbwzEreaGYQz8Oc=", - "optional": true - }, - "acorn-globals": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-1.0.9.tgz", - "integrity": "sha1-VbtemGkVB7dFedBRNBMhfDgMVM8=", - "optional": true, - "requires": { - "acorn": "^2.1.0" - } - }, - "acorn-jsx": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.2.0.tgz", - "integrity": "sha512-HiUX/+K2YpkpJ+SzBffkM/AQ2YE03S0U1kjTLVpoJdhZMOWy8qvXVN9JdLqv2QsaQ6MPYQIuNmwD8zOiYUofLQ==" - }, - "address": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/address/-/address-1.1.2.tgz", - "integrity": "sha512-aT6camzM4xEA54YVJYSqxz1kv4IHnQZRtThJJHhUMRExaU5spC7jX5ugSwTaTgJliIgs4VhZOk7htClvQ/LmRA==" - }, - "aggregate-error": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.0.1.tgz", - "integrity": "sha512-quoaXsZ9/BLNae5yiNoUz+Nhkwz83GhWwtYFglcjEQB2NDHCIpApbqXxIFnm4Pq/Nvhrsq5sYJFyohrrxnTGAA==", - "requires": { - "clean-stack": "^2.0.0", - "indent-string": "^4.0.0" - } - }, - "ajv": { - "version": "6.12.3", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.3.tgz", - "integrity": "sha512-4K0cK3L1hsqk9xIb2z9vs/XU+PGJZ9PNpJRDS9YLzmNdX6jmVPfamLvTJr0aDAusnHyCHO6MjzlkAsgtqp9teA==", - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "amdefine": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", - "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", - "optional": true - }, - "ansi-colors": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==" - }, - "ansi-escapes": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", - "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==" - }, - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" - }, - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" - }, - "antlr4": { - "version": "4.7.1", - "resolved": "https://registry.npmjs.org/antlr4/-/antlr4-4.7.1.tgz", - "integrity": "sha512-haHyTW7Y9joE5MVs37P2lNYfU2RWBLfcRDD8OWldcdZm5TiCE91B5Xl1oWSwiDUSd4rlExpt2pu1fksYQjRBYQ==" - }, - "any-promise": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", - "integrity": "sha1-q8av7tzqUugJzcA3au0845Y10X8=" - }, - "anymatch": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", - "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==", - "requires": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - } - }, - "app-module-path": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/app-module-path/-/app-module-path-2.2.0.tgz", - "integrity": "sha1-ZBqlXft9am8KgUHEucCqULbCTdU=" - }, - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "requires": { - "sprintf-js": "~1.0.2" - } - }, - "array-flatten": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" - }, - "array-includes": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.1.tgz", - "integrity": "sha512-c2VXaCHl7zPsvpkFsw4nxvFie4fh1ur9bpcgsVkIjqn0H/Xwdg+7fv3n2r/isyS8EBj5b06M9kHyZuIr4El6WQ==", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.0", - "is-string": "^1.0.5" - } - }, - "array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==" + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" }, - "array.prototype.flat": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.3.tgz", - "integrity": "sha512-gBlRZV0VSmfPIeWfuuy56XZMvbVfbEUnOXUvt3F/eUUUSyzlgLxhEX4YAEpxNAogRGehPSnfXyPtYyKAhkzQhQ==", - "dev": true, + "end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1" + "once": "^1.4.0" } }, - "array.prototype.map": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array.prototype.map/-/array.prototype.map-1.0.2.tgz", - "integrity": "sha512-Az3OYxgsa1g7xDYp86l0nnN4bcmuEITGe1rbdEBVkrqkzMgDcbdQ2R7r41pNzti+4NMces3H8gMmuioZUilLgw==", + "enquirer": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", + "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1", - "es-array-method-boxes-properly": "^1.0.0", - "is-string": "^1.0.4" + "ansi-colors": "^4.1.1" } }, - "asn1": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", - "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", + "error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", "requires": { - "safer-buffer": "~2.1.0" + "is-arrayish": "^0.2.1" } }, - "asn1.js": { - "version": "4.10.1", - "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", - "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", + "es-abstract": { + "version": "1.17.7", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.7.tgz", + "integrity": "sha512-VBl/gnfcJ7OercKA9MVaegWsBHFjV492syMudcnQZvt/Dw8ezpcOHYZXa/J96O8vx+g4x65YKhxOwDUh63aS5g==", "requires": { - "bn.js": "^4.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1", + "is-callable": "^1.2.2", + "is-regex": "^1.1.1", + "object-inspect": "^1.8.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.1", + "string.prototype.trimend": "^1.0.1", + "string.prototype.trimstart": "^1.0.1" }, "dependencies": { - "bn.js": { - "version": "4.11.9", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" + "es-abstract": { + "version": "1.18.0-next.1", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz", + "integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==", + "requires": { + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1", + "is-callable": "^1.2.2", + "is-regex": "^1.1.1", + "object-inspect": "^1.8.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.1", + "string.prototype.trimend": "^1.0.1", + "string.prototype.trimstart": "^1.0.1" + } + }, + "object.assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.1.tgz", + "integrity": "sha512-VT/cxmx5yaoHSOTSyrCygIDFco+RsibY2NM0a4RdEeY/4KgqezwFtK1yr3U67xYhqJSlASm2pKhLVzPj2lr4bA==", + "requires": { + "define-properties": "^1.1.3", + "has-symbols": "^1.0.1", + "object-keys": "^1.1.1" + } } } }, - "assert-plus": { + "es-array-method-boxes-properly": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + "resolved": "https://registry.npmjs.org/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz", + "integrity": "sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA==" }, - "assertion-error": { + "es-get-iterator": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", - "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==" - }, - "assured": { - "version": "1.0.14", - "resolved": "https://registry.npmjs.org/assured/-/assured-1.0.14.tgz", - "integrity": "sha512-srUv3dc59TE0cAwERnbh9f5vIqjitF39dCSBB8C3cqnHKjYkEpKAPUouGcfpM489V+n6cw12Ipgx8AMd1FvYBw==", - "requires": { - "noop6": "^1.0.1", - "sliced": "^1.0.1" - } - }, - "ast-parents": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/ast-parents/-/ast-parents-0.0.1.tgz", - "integrity": "sha1-UI/Q8F0MSHddnszaLhdEIyYejdM=" - }, - "astral-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", - "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==" - }, - "async": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", - "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", + "resolved": "https://registry.npmjs.org/es-get-iterator/-/es-get-iterator-1.1.0.tgz", + "integrity": "sha512-UfrmHuWQlNMTs35e1ypnvikg6jCz3SK8v8ImvmDsh36fCVUR1MqoFDiyn0/k52C8NqO3YsO8Oe0azeesNuqSsQ==", "requires": { - "lodash": "^4.17.14" + "es-abstract": "^1.17.4", + "has-symbols": "^1.0.1", + "is-arguments": "^1.0.4", + "is-map": "^2.0.1", + "is-set": "^2.0.1", + "is-string": "^1.0.5", + "isarray": "^2.0.5" }, "dependencies": { - "lodash": { - "version": "4.17.19", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", - "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==" + "isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==" } } }, - "async-eventemitter": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/async-eventemitter/-/async-eventemitter-0.2.4.tgz", - "integrity": "sha512-pd20BwL7Yt1zwDFy+8MX8F1+WCT8aQeKj0kQnTrH9WaeRETlRamVhD0JtRPmrV4GfOJ2F9CvdQkZeZhnh2TuHw==", - "requires": { - "async": "^2.4.0" - } - }, - "async-limiter": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz", - "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==" - }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" - }, - "aws-sdk": { - "version": "2.716.0", - "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.716.0.tgz", - "integrity": "sha512-/tl65GnyU+vIBKdLALJzKUldr4W0zIjAFOOGgusGPjLPI7XZM8aIw04trQPfK+dcTrv/k7E1fceiEvTX0f+OOQ==", + "es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", "requires": { - "buffer": "4.9.2", - "events": "1.1.1", - "ieee754": "1.1.13", - "jmespath": "0.15.0", - "querystring": "0.2.0", - "sax": "1.2.1", - "url": "0.10.3", - "uuid": "3.3.2", - "xml2js": "0.4.19" + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" } }, - "aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" - }, - "aws4": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.10.0.tgz", - "integrity": "sha512-3YDiu347mtVtjpyV3u5kVqQLP242c06zwDOgpeRnybmXlYYsLbtTrUBUm8i8srONt+FWobl5aibnU1030PeeuA==" - }, - "axios": { - "version": "0.18.1", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.18.1.tgz", - "integrity": "sha512-0BfJq4NSfQXd+SkFdrvFbG7addhYSBA2mQwISr46pD6E5iqkWg02RAs8vyTT/j0RTnoYmeXauBuSv1qKwR179g==", - "requires": { - "follow-redirects": "1.5.10", - "is-buffer": "^2.0.2" - } + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" }, - "babel-code-frame": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", - "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", + "escodegen": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.8.1.tgz", + "integrity": "sha1-WltTr0aTEQvrsIZ6o0MN07cKEBg=", "requires": { - "chalk": "^1.1.3", + "esprima": "^2.7.1", + "estraverse": "^1.9.1", "esutils": "^2.0.2", - "js-tokens": "^3.0.2" - }, - "dependencies": { - "js-tokens": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", - "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=" - } + "optionator": "^0.8.1", + "source-map": "~0.2.0" } }, - "babel-generator": { - "version": "6.26.1", - "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.1.tgz", - "integrity": "sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==", + "eslint": { + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.11.0.tgz", + "integrity": "sha512-G9+qtYVCHaDi1ZuWzBsOWo2wSwd70TXnU6UHA3cTYHp7gCTXZcpggWFoUVAMRarg68qtPoNfFbzPh+VdOgmwmw==", + "dev": true, "requires": { - "babel-messages": "^6.23.0", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "detect-indent": "^4.0.0", - "jsesc": "^1.3.0", - "lodash": "^4.17.4", - "source-map": "^0.5.7", - "trim-right": "^1.0.1" - }, + "@babel/code-frame": "^7.0.0", + "@eslint/eslintrc": "^0.1.3", + "ajv": "^6.10.0", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.0.1", + "doctrine": "^3.0.0", + "enquirer": "^2.3.5", + "eslint-scope": "^5.1.1", + "eslint-utils": "^2.1.0", + "eslint-visitor-keys": "^2.0.0", + "espree": "^7.3.0", + "esquery": "^1.2.0", + "esutils": "^2.0.2", + "file-entry-cache": "^5.0.1", + "functional-red-black-tree": "^1.0.1", + "glob-parent": "^5.0.0", + "globals": "^12.1.0", + "ignore": "^4.0.6", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "js-yaml": "^3.13.1", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash": "^4.17.19", + "minimatch": "^3.0.4", + "natural-compare": "^1.4.0", + "optionator": "^0.9.1", + "progress": "^2.0.0", + "regexpp": "^3.1.0", + "semver": "^7.2.1", + "strip-ansi": "^6.0.0", + "strip-json-comments": "^3.1.0", + "table": "^5.2.3", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" + }, "dependencies": { + "acorn": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", + "dev": true + }, + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, + "requires": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + } + }, + "eslint-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", + "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^1.1.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true + } + } + }, + "eslint-visitor-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz", + "integrity": "sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==", + "dev": true + }, + "espree": { + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.0.tgz", + "integrity": "sha512-dksIWsvKCixn1yrEXO8UosNSxaDoSYpq9reEjZSbHLpT5hpaCAKTLBwq0RHtLrIr+c0ByiYzWT8KTMRzoRCNlw==", + "dev": true, + "requires": { + "acorn": "^7.4.0", + "acorn-jsx": "^5.2.0", + "eslint-visitor-keys": "^1.3.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true + } + } + }, + "estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true + }, + "globals": { + "version": "12.4.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", + "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "dev": true, + "requires": { + "type-fest": "^0.8.1" + } + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "requires": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + } + }, "lodash": { - "version": "4.17.19", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", - "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==" + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true + }, + "optionator": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", + "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "dev": true, + "requires": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" + } + }, + "prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true + }, + "regexpp": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz", + "integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==", + "dev": true + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + }, + "strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "requires": { + "prelude-ls": "^1.2.1" + } + }, + "type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true } } }, - "babel-messages": { - "version": "6.23.0", - "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", - "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", + "eslint-config-airbnb-base": { + "version": "14.2.0", + "resolved": "https://registry.npmjs.org/eslint-config-airbnb-base/-/eslint-config-airbnb-base-14.2.0.tgz", + "integrity": "sha512-Snswd5oC6nJaevs3nZoLSTvGJBvzTfnBqOIArkf3cbyTyq9UD79wOk8s+RiL6bhca0p/eRO6veczhf6A/7Jy8Q==", + "dev": true, "requires": { - "babel-runtime": "^6.22.0" + "confusing-browser-globals": "^1.0.9", + "object.assign": "^4.1.0", + "object.entries": "^1.1.2" } }, - "babel-runtime": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", - "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", + "eslint-import-resolver-node": { + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.4.tgz", + "integrity": "sha512-ogtf+5AB/O+nM6DIeBUNr2fuT7ot9Qg/1harBfBtaP13ekEWFQEEMP94BCB7zaNW3gyY+8SHYF00rnqYwXKWOA==", + "dev": true, "requires": { - "core-js": "^2.4.0", - "regenerator-runtime": "^0.11.0" - }, - "dependencies": { - "regenerator-runtime": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", - "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==" - } - } - }, - "babel-traverse": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz", - "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", - "requires": { - "babel-code-frame": "^6.26.0", - "babel-messages": "^6.23.0", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "debug": "^2.6.8", - "globals": "^9.18.0", - "invariant": "^2.2.2", - "lodash": "^4.17.4" + "debug": "^2.6.9", + "resolve": "^1.13.1" }, "dependencies": { "debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, "requires": { "ms": "2.0.0" } }, - "lodash": { - "version": "4.17.19", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", - "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==" + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "resolve": { + "version": "1.18.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.18.1.tgz", + "integrity": "sha512-lDfCPaMKfOJXjy0dPayzPdF1phampNWr3qFCjAu+rw/qbQmr5jWH5xN2hwh9QKfw9E5v4hwV7A+jrCmL8yjjqA==", + "dev": true, + "requires": { + "is-core-module": "^2.0.0", + "path-parse": "^1.0.6" + } } } }, - "babel-types": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz", - "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", + "eslint-module-utils": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.6.0.tgz", + "integrity": "sha512-6j9xxegbqe8/kZY8cYpcp0xhbK0EgJlg3g9mib3/miLaExuuwc3n5UEfSnU6hWMbT0FAYVvDbL9RrRgpUeQIvA==", + "dev": true, "requires": { - "babel-runtime": "^6.26.0", - "esutils": "^2.0.2", - "lodash": "^4.17.4", - "to-fast-properties": "^1.0.3" + "debug": "^2.6.9", + "pkg-dir": "^2.0.0" }, "dependencies": { - "lodash": { - "version": "4.17.19", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", - "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==" - } - } - }, - "babylon": { - "version": "6.18.0", - "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", - "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==" - }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" - }, - "base-x": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.8.tgz", - "integrity": "sha512-Rl/1AWP4J/zRrk54hhlxH4drNxPJXYUaKffODVI53/dAsV4t9fBxyxYKAVPU1XBHxYwOWP9h9H0hM2MVw4YfJA==", - "requires": { - "safe-buffer": "^5.0.1" - } - }, - "base64-js": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz", - "integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==" - }, - "bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", - "requires": { - "tweetnacl": "^0.14.3" - } - }, - "big-integer": { - "version": "1.6.48", - "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.48.tgz", - "integrity": "sha512-j51egjPa7/i+RdiRuJbPdJ2FIUYYPhvYLjzoYbcMMm62ooO6F94fETG4MTs46zPAF9Brs04OajboA/qTGuz78w==" - }, - "bignumber.js": { - "version": "git+https://github.com/debris/bignumber.js.git#94d7146671b9719e00a09c29b01a691bc85048c2", - "from": "git+https://github.com/debris/bignumber.js.git#94d7146671b9719e00a09c29b01a691bc85048c2" - }, - "binary-extensions": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.1.0.tgz", - "integrity": "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==" - }, - "bl": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.2.tgz", - "integrity": "sha512-e8tQYnZodmebYDWGH7KMRvtzKXaJHx3BbilrgZCfvyLUYdKpK1t5PSPmpkny/SgiTSCnjfLW7v5rlONXVFkQEA==", - "requires": { - "readable-stream": "^2.3.5", - "safe-buffer": "^5.1.1" - }, - "dependencies": { - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - }, - "dependencies": { - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - } + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" } }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, "requires": { - "safe-buffer": "~5.1.0" - }, - "dependencies": { - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - } + "locate-path": "^2.0.0" + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, + "pkg-dir": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", + "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", + "dev": true, + "requires": { + "find-up": "^2.1.0" } } } }, - "blakejs": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/blakejs/-/blakejs-1.1.0.tgz", - "integrity": "sha1-ad+S75U6qIylGjLfarHFShVfx6U=" - }, - "block-stream": { - "version": "0.0.9", - "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz", - "integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=", + "eslint-plugin-import": { + "version": "2.22.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.22.1.tgz", + "integrity": "sha512-8K7JjINHOpH64ozkAhpT3sd+FswIZTfMZTjdx052pnWrgRCVfp8op9tbjpAk3DdUeI/Ba4C8OjdC0r90erHEOw==", + "dev": true, "requires": { - "inherits": "~2.0.0" - } - }, - "bluebird": { - "version": "3.7.2", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", - "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==" - }, - "bn": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/bn/-/bn-1.0.5.tgz", - "integrity": "sha512-7TvGbqbZb6lDzsBtNz1VkdXXV0BVmZKPPViPmo2IpvwaryF7P+QKYKACyVkwo2mZPr2CpFiz7EtgPEcc3o/JFQ==" - }, - "bn-chai": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/bn-chai/-/bn-chai-1.0.1.tgz", - "integrity": "sha512-7rJXt21DwYiLLpvzLaACixBBoUGkRV1iuFD3wElEhw8Ji9IiY/QsJRtvW+c7ChRgEOyLQkGaSGFUUqBKm21SNA==" - }, - "bn.js": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.1.2.tgz", - "integrity": "sha512-40rZaf3bUNKTVYu9sIeeEGOg7g14Yvnj9kH7b50EiwX0Q7A6umbvfI5tvHaOERH0XigqKkfLkFQxzb4e6CIXnA==" - }, - "body-parser": { - "version": "1.19.0", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", - "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==", - "requires": { - "bytes": "3.1.0", - "content-type": "~1.0.4", - "debug": "2.6.9", - "depd": "~1.1.2", - "http-errors": "1.7.2", - "iconv-lite": "0.4.24", - "on-finished": "~2.3.0", - "qs": "6.7.0", - "raw-body": "2.4.0", - "type-is": "~1.6.17" + "array-includes": "^3.1.1", + "array.prototype.flat": "^1.2.3", + "contains-path": "^0.1.0", + "debug": "^2.6.9", + "doctrine": "1.5.0", + "eslint-import-resolver-node": "^0.3.4", + "eslint-module-utils": "^2.6.0", + "has": "^1.0.3", + "minimatch": "^3.0.4", + "object.values": "^1.1.1", + "read-pkg-up": "^2.0.0", + "resolve": "^1.17.0", + "tsconfig-paths": "^3.9.0" }, "dependencies": { "debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, "requires": { "ms": "2.0.0" } }, - "qs": { - "version": "6.7.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", - "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==" + "doctrine": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz", + "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", + "dev": true, + "requires": { + "esutils": "^2.0.2", + "isarray": "^1.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "resolve": { + "version": "1.18.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.18.1.tgz", + "integrity": "sha512-lDfCPaMKfOJXjy0dPayzPdF1phampNWr3qFCjAu+rw/qbQmr5jWH5xN2hwh9QKfw9E5v4hwV7A+jrCmL8yjjqA==", + "dev": true, + "requires": { + "is-core-module": "^2.0.0", + "path-parse": "^1.0.6" + } } } }, - "boolbase": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", - "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=" - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "eslint-scope": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz", + "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==", "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + }, + "dependencies": { + "estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==" + } } }, - "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "eslint-utils": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.3.tgz", + "integrity": "sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==", "requires": { - "fill-range": "^7.0.1" + "eslint-visitor-keys": "^1.1.0" } }, - "brorand": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", - "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" - }, - "browser-stdout": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", - "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==" + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==" }, - "browserify-aes": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", - "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", + "espree": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-5.0.1.tgz", + "integrity": "sha512-qWAZcWh4XE/RwzLJejfcofscgMc9CamR6Tn1+XRXNzrvUSSbiAjGOI/fggztjIi7y9VLPqnICMIPiGyr8JaZ0A==", "requires": { - "buffer-xor": "^1.0.3", - "cipher-base": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.3", - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" + "acorn": "^6.0.7", + "acorn-jsx": "^5.0.0", + "eslint-visitor-keys": "^1.0.0" } }, - "browserify-cipher": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", - "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", + "esprima": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", + "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=" + }, + "esquery": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.3.1.tgz", + "integrity": "sha512-olpvt9QG0vniUBZspVRN6lwB7hOZoTRtT+jzR+tS4ffYx2mzbw+z0XCOk44aaLYKApNX5nMm+E+P6o25ip/DHQ==", "requires": { - "browserify-aes": "^1.0.4", - "browserify-des": "^1.0.0", - "evp_bytestokey": "^1.0.0" + "estraverse": "^5.1.0" + }, + "dependencies": { + "estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==" + } } }, - "browserify-des": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", - "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", + "esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", "requires": { - "cipher-base": "^1.0.1", - "des.js": "^1.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" + "estraverse": "^5.2.0" + }, + "dependencies": { + "estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==" + } } }, - "browserify-rsa": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", - "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", + "estraverse": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz", + "integrity": "sha1-r2fy3JIlgkFZUJJgkaQAXSnJu0Q=" + }, + "esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==" + }, + "eth-lib": { + "version": "0.2.8", + "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.8.tgz", + "integrity": "sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw==", "requires": { - "bn.js": "^4.1.0", - "randombytes": "^2.0.1" + "bn.js": "^4.11.6", + "elliptic": "^6.4.0", + "xhr-request-promise": "^0.1.2" }, "dependencies": { "bn.js": { @@ -2581,9268 +1847,2850 @@ } } }, - "browserify-sha3": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/browserify-sha3/-/browserify-sha3-0.0.4.tgz", - "integrity": "sha1-CGxHuMgjFsnUcCLCYYWVRXbdjiY=", + "ethereum-bloom-filters": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/ethereum-bloom-filters/-/ethereum-bloom-filters-1.0.7.tgz", + "integrity": "sha512-cDcJJSJ9GMAcURiAWO3DxIEhTL/uWqlQnvgKpuYQzYPrt/izuGU+1ntQmHt0IRq6ADoSYHFnB+aCEFIldjhkMQ==", "requires": { - "js-sha3": "^0.6.1", - "safe-buffer": "^5.1.1" + "js-sha3": "^0.8.0" }, "dependencies": { "js-sha3": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.6.1.tgz", - "integrity": "sha1-W4n3enR3Z5h39YxKB1JAk0sflcA=" + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", + "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==" } } }, - "browserify-sign": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.0.tgz", - "integrity": "sha512-hEZC1KEeYuoHRqhGhTy6gWrpJA3ZDjFWv0DE61643ZnOXAKJb3u7yWcrU0mMc9SwAqK1n7myPGndkp0dFG7NFA==", - "requires": { - "bn.js": "^5.1.1", - "browserify-rsa": "^4.0.1", - "create-hash": "^1.2.0", - "create-hmac": "^1.1.7", - "elliptic": "^6.5.2", - "inherits": "^2.0.4", - "parse-asn1": "^5.1.5", - "readable-stream": "^3.6.0", - "safe-buffer": "^5.2.0" - } - }, - "bs58": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", - "integrity": "sha1-vhYedsNU9veIrkBx9j806MTwpCo=", - "requires": { - "base-x": "^3.0.2" - } - }, - "bs58check": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-2.1.2.tgz", - "integrity": "sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==", - "requires": { - "bs58": "^4.0.0", - "create-hash": "^1.1.0", - "safe-buffer": "^5.1.2" - } + "etherlime-config": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/etherlime-config/-/etherlime-config-1.0.0.tgz", + "integrity": "sha512-Z0heb7c7qA4pxqhV63neqmJNR/Cux9JXrERSOvP+KuiJ9Z5tn/MG0eHArBWiR7U3kPu8AXZIJaAvBoeyJkN7VQ==" }, - "buffer": { - "version": "4.9.2", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz", - "integrity": "sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==", + "etherlime-lib": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/etherlime-lib/-/etherlime-lib-1.1.3.tgz", + "integrity": "sha512-0H5hH7GG/3/2VxGJTjZth9zUUTsRAlDG+IY8ePZ95d276/N0GkPIdXjPdHmM+yQc/mMObMOuf/zmxPUP+wlq2g==", "requires": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4", - "isarray": "^1.0.0" - } - }, - "buffer-alloc": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz", - "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==", - "requires": { - "buffer-alloc-unsafe": "^1.1.0", - "buffer-fill": "^1.0.0" - } - }, - "buffer-alloc-unsafe": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz", - "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==" - }, - "buffer-crc32": { - "version": "0.2.13", - "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", - "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=" - }, - "buffer-fill": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz", - "integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=" - }, - "buffer-from": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", - "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==" - }, - "buffer-to-arraybuffer": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/buffer-to-arraybuffer/-/buffer-to-arraybuffer-0.0.5.tgz", - "integrity": "sha1-YGSkD6dutDxyOrqe+PbhIW0QURo=" - }, - "buffer-xor": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", - "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=" - }, - "bytes": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", - "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==" - }, - "cacheable-request": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz", - "integrity": "sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==", - "requires": { - "clone-response": "^1.0.2", - "get-stream": "^5.1.0", - "http-cache-semantics": "^4.0.0", - "keyv": "^3.0.0", - "lowercase-keys": "^2.0.0", - "normalize-url": "^4.1.0", - "responselike": "^1.0.2" + "etherlime-config": "^1.0.0", + "etherlime-logger": "^1.1.2", + "etherlime-utils": "^1.1.2", + "ethers": "git+https://github.com/LimeChain/ethers.js.git#master", + "typescript": "^3.5.1" }, "dependencies": { - "get-stream": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.1.0.tgz", - "integrity": "sha512-EXr1FOzrzTfGeL0gQdeFEvOMm2mzMOglyiOXSTpPC+iAjAKftbr3jpCMWynogwYnM+eSj9sHGc6wjIcDvYiygw==", + "bn.js": { + "version": "4.11.9", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" + }, + "ethers": { + "version": "git+https://github.com/LimeChain/ethers.js.git#7eceb12e0a05ed1e44834556f6a32e20918abf1b", + "from": "git+https://github.com/LimeChain/ethers.js.git#master", "requires": { - "pump": "^3.0.0" + "aes-js": "3.0.0", + "bn.js": "^4.4.0", + "elliptic": "6.5.2", + "hash.js": "1.1.3", + "js-sha3": "0.5.7", + "scrypt-js": "2.0.4", + "setimmediate": "1.0.4", + "uuid": "2.0.1", + "xmlhttprequest": "1.8.0" } }, - "lowercase-keys": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", - "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==" + "uuid": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.1.tgz", + "integrity": "sha1-wqMN7bPlNdcsz4LjQ5QaULqFM6w=" } } }, - "caller-callsite": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/caller-callsite/-/caller-callsite-2.0.0.tgz", - "integrity": "sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ=", + "etherlime-logger": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/etherlime-logger/-/etherlime-logger-1.2.1.tgz", + "integrity": "sha512-BnrU4NpwT5fsmk1v3v3z9fB45wxhbKIJJ5i7LOxxMUf9zg9iDfmNbQaX6QJ7Q6zmaKEoszF8u/fRwrAUt8G78Q==", "requires": { - "callsites": "^2.0.0" + "fs-extra": "7.0.1" + } + }, + "etherlime-utils": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/etherlime-utils/-/etherlime-utils-1.1.4.tgz", + "integrity": "sha512-kzvjA9f7e7mlOIY4pUve5+ynoVYIqThIzU6ENQjF/d6ZyIyEA3LR7MLTHwkuVHyJq6iV7nKnMTPZZfGlW9I71Q==", + "requires": { + "chalk": "2.4.1" + } + }, + "ethers": { + "version": "5.0.18", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.0.18.tgz", + "integrity": "sha512-WCiKGfAt09hBS1HZspu+JTgeunFcUCVRhCXO8X+VadBJGTRlG722XXib79Vz2oyBperz90CcjkBPdNly61Ah4A==", + "requires": { + "@ethersproject/abi": "5.0.7", + "@ethersproject/abstract-provider": "5.0.5", + "@ethersproject/abstract-signer": "5.0.7", + "@ethersproject/address": "5.0.5", + "@ethersproject/base64": "5.0.4", + "@ethersproject/basex": "5.0.4", + "@ethersproject/bignumber": "5.0.8", + "@ethersproject/bytes": "5.0.5", + "@ethersproject/constants": "5.0.5", + "@ethersproject/contracts": "5.0.5", + "@ethersproject/hash": "5.0.6", + "@ethersproject/hdnode": "5.0.5", + "@ethersproject/json-wallets": "5.0.7", + "@ethersproject/keccak256": "5.0.4", + "@ethersproject/logger": "5.0.6", + "@ethersproject/networks": "5.0.4", + "@ethersproject/pbkdf2": "5.0.4", + "@ethersproject/properties": "5.0.4", + "@ethersproject/providers": "5.0.13", + "@ethersproject/random": "5.0.4", + "@ethersproject/rlp": "5.0.4", + "@ethersproject/sha2": "5.0.4", + "@ethersproject/signing-key": "5.0.5", + "@ethersproject/solidity": "5.0.5", + "@ethersproject/strings": "5.0.5", + "@ethersproject/transactions": "5.0.6", + "@ethersproject/units": "5.0.6", + "@ethersproject/wallet": "5.0.6", + "@ethersproject/web": "5.0.9", + "@ethersproject/wordlists": "5.0.5" + } + }, + "ethjs-unit": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/ethjs-unit/-/ethjs-unit-0.1.6.tgz", + "integrity": "sha1-xmWSHkduh7ziqdWIpv4EBbLEFpk=", + "requires": { + "bn.js": "4.11.6", + "number-to-bn": "1.7.0" }, "dependencies": { - "callsites": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz", - "integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=" + "bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=" } } }, - "caller-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-2.0.0.tgz", - "integrity": "sha1-Ro+DBE42mrIBD6xfBs7uFbsssfQ=", + "events": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", + "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=" + }, + "execa": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/execa/-/execa-4.0.3.tgz", + "integrity": "sha512-WFDXGHckXPWZX19t1kCsXzOpqX9LWYNqn4C+HqZlk/V0imTkzJZqf87ZBhvpHaftERYknpk0fjSylnXVlVgI0A==", "requires": { - "caller-callsite": "^2.0.0" + "cross-spawn": "^7.0.0", + "get-stream": "^5.0.0", + "human-signals": "^1.1.1", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.0", + "onetime": "^5.1.0", + "signal-exit": "^3.0.2", + "strip-final-newline": "^2.0.0" } }, - "callsites": { + "external-editor": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==" + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "requires": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + } }, - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + }, + "fast-diff": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz", + "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==" }, - "caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" + "fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" }, - "chai": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.2.0.tgz", - "integrity": "sha512-XQU3bhBukrOsQCuwZndwGcCVQHyZi53fQ6Ys1Fym7E4olpIqqZZhhoFJoaKVvV17lWQoXYwgWN2nF5crA8J2jw==", + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=" + }, + "figures": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", + "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", "requires": { - "assertion-error": "^1.1.0", - "check-error": "^1.0.2", - "deep-eql": "^3.0.1", - "get-func-name": "^2.0.0", - "pathval": "^1.1.0", - "type-detect": "^4.0.5" + "escape-string-regexp": "^1.0.5" } }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "file-entry-cache": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", + "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" + "flat-cache": "^2.0.1" } }, - "chardet": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", - "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==" - }, - "check-error": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", - "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=" - }, - "cheerio": { - "version": "1.0.0-rc.2", - "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.2.tgz", - "integrity": "sha1-S59TqBsn5NXawxwP/Qz6A8xoMNs=", - "requires": { - "css-select": "~1.2.0", - "dom-serializer": "~0.1.0", - "entities": "~1.1.1", - "htmlparser2": "^3.9.1", - "lodash": "^4.15.0", - "parse5": "^3.0.1" - }, - "dependencies": { - "lodash": { - "version": "4.17.19", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", - "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==" - } + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "requires": { + "to-regex-range": "^5.0.1" } }, - "chokidar": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.3.1.tgz", - "integrity": "sha512-4QYCEWOcK3OJrxwvyyAOxFuhpvOVCYkr33LPfFNBjAD/w3sEzWsp2BUOkI4l9bHvWioAd0rc6NlHUOEaWkTeqg==", + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", "requires": { - "anymatch": "~3.1.1", - "braces": "~3.0.2", - "fsevents": "~2.1.2", - "glob-parent": "~5.1.0", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.3.0" + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" } }, - "chownr": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", - "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==" - }, - "ci-info": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", - "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==" + "find-versions": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/find-versions/-/find-versions-3.2.0.tgz", + "integrity": "sha512-P8WRou2S+oe222TOCHitLy8zj+SIsVJh52VP4lvXkaFVnOFFdoWv1H1Jjvel1aI6NCFOAaeAVm8qrI0odiLcww==", + "requires": { + "semver-regex": "^2.0.0" + } }, - "cipher-base": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", - "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "flat": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.1.tgz", + "integrity": "sha512-FmTtBsHskrU6FJ2VxCnsDb84wu9zhmO3cUX2kGFb5tuwhfXxGciiT0oRY+cck35QmG+NmGh5eLz6lLCpWTqwpA==", "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" + "is-buffer": "~2.0.3" } }, - "circom": { - "version": "github:LimeChain/circom#4ae2447b97d558820a7c7817d602185478ad0b92", - "from": "github:LimeChain/circom", + "flat-cache": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", + "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", "requires": { - "big-integer": "^1.6.32", - "optimist": "^0.6.1", - "yargs": "^12.0.2" + "flatted": "^2.0.0", + "rimraf": "2.6.3", + "write": "1.0.3" }, "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", "requires": { - "ansi-regex": "^3.0.0" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" } }, - "yargs": { - "version": "12.0.5", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.5.tgz", - "integrity": "sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw==", + "rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", "requires": { - "cliui": "^4.0.0", - "decamelize": "^1.2.0", - "find-up": "^3.0.0", - "get-caller-file": "^1.0.1", - "os-locale": "^3.0.0", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^2.0.0", - "which-module": "^2.0.0", - "y18n": "^3.2.1 || ^4.0.0", - "yargs-parser": "^11.1.1" + "glob": "^7.1.3" } } } }, - "clean-stack": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", - "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==" + "flatted": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz", + "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==" }, - "cli-analytics-sdk": { - "version": "github:LimeChain/cli-analytics-sdk#a6889825b171d1a146936b13287357c93b5535b9", - "from": "github:LimeChain/cli-analytics-sdk", - "requires": { - "axios": "^0.19.0", - "typescript": "^3.6.4" - }, - "dependencies": { - "axios": { - "version": "0.19.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.19.2.tgz", - "integrity": "sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA==", - "requires": { - "follow-redirects": "1.5.10" - } - } - } + "follow-redirects": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.0.tgz", + "integrity": "sha512-aq6gF1BEKje4a9i9+5jimNFIpq4Q1WiwBToeRK5NvZBd/TRsmW8BsJfOEGkr76TbOyPVD3OVDN910EcUNtRYEA==" }, - "cli-cursor": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", - "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", + "fs-extra": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", "requires": { - "restore-cursor": "^2.0.0" + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" } }, - "cli-table": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/cli-table/-/cli-table-0.3.1.tgz", - "integrity": "sha1-9TsFJmqLGguTSz0IIebi3FkUriM=", - "requires": { - "colors": "1.0.3" - }, - "dependencies": { - "colors": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz", - "integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs=" - } - } + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "fsevents": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", + "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", + "optional": true + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" }, - "cli-table-2-json": { + "function.name": { "version": "1.0.13", - "resolved": "https://registry.npmjs.org/cli-table-2-json/-/cli-table-2-json-1.0.13.tgz", - "integrity": "sha512-CpUj9dubfuIZSEezwUPycAJqM2dlATyyRUyBkfGeK2KNfrqK3XrdaBohMt0XlkEvsZyDfUEmPWCNvUO+a/7Wsw==", + "resolved": "https://registry.npmjs.org/function.name/-/function.name-1.0.13.tgz", + "integrity": "sha512-mVrqdoy5npWZyoXl4DxCeuVF6delDcQjVS9aPdvLYlBxtMTZDR2B5GVEQEoM1jJyspCqg3C0v4ABkLE7tp9xFA==", "requires": { - "@types/blue-tape": "^0.1.30", - "@types/lodash": "4.14.119", - "lodash": "^4.17.15" - }, - "dependencies": { - "lodash": { - "version": "4.17.19", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", - "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==" - } + "noop6": "^1.0.1" } }, - "cli-table2": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/cli-table2/-/cli-table2-0.2.0.tgz", - "integrity": "sha1-LR738hig54biFFQFYtS9F3/jLZc=", - "requires": { - "colors": "^1.1.2", - "lodash": "^3.10.1", - "string-width": "^1.0.1" - } + "functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=" }, - "cli-truncate": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-2.1.0.tgz", - "integrity": "sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg==", + "ganache-cli": { + "version": "6.12.0", + "resolved": "https://registry.npmjs.org/ganache-cli/-/ganache-cli-6.12.0.tgz", + "integrity": "sha512-WV354mOSCbVH+qR609ftpz/1zsZPRsHMaQ4jo9ioBQAkguYNVU5arfgIE0+0daU0Vl9WJ/OMhRyl0XRswd/j9A==", "requires": { - "slice-ansi": "^3.0.0", - "string-width": "^4.2.0" + "ethereumjs-util": "6.2.1", + "source-map-support": "0.5.12", + "yargs": "13.2.4" }, "dependencies": { + "@types/bn.js": { + "version": "4.11.6", + "bundled": true, + "requires": { + "@types/node": "*" + } + }, + "@types/node": { + "version": "14.11.2", + "bundled": true + }, + "@types/pbkdf2": { + "version": "3.1.0", + "bundled": true, + "requires": { + "@types/node": "*" + } + }, + "@types/secp256k1": { + "version": "4.0.1", + "bundled": true, + "requires": { + "@types/node": "*" + } + }, "ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==" + "version": "4.1.0", + "bundled": true }, "ansi-styles": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", - "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "version": "3.2.1", + "bundled": true, "requires": { - "@types/color-name": "^1.1.1", - "color-convert": "^2.0.1" + "color-convert": "^1.9.0" } }, - "astral-regex": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", - "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==" + "base-x": { + "version": "3.0.8", + "bundled": true, + "requires": { + "safe-buffer": "^5.0.1" + } }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "blakejs": { + "version": "1.1.0", + "bundled": true + }, + "bn.js": { + "version": "4.11.9", + "bundled": true + }, + "brorand": { + "version": "1.1.0", + "bundled": true + }, + "browserify-aes": { + "version": "1.2.0", + "bundled": true, "requires": { - "color-name": "~1.1.4" + "buffer-xor": "^1.0.3", + "cipher-base": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.3", + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" } }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + "bs58": { + "version": "4.0.1", + "bundled": true, + "requires": { + "base-x": "^3.0.2" + } }, - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + "bs58check": { + "version": "2.1.2", + "bundled": true, + "requires": { + "bs58": "^4.0.0", + "create-hash": "^1.1.0", + "safe-buffer": "^5.1.2" + } }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" + "buffer-from": { + "version": "1.1.1", + "bundled": true }, - "slice-ansi": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-3.0.0.tgz", - "integrity": "sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==", + "buffer-xor": { + "version": "1.0.3", + "bundled": true + }, + "camelcase": { + "version": "5.3.1", + "bundled": true + }, + "cipher-base": { + "version": "1.0.4", + "bundled": true, "requires": { - "ansi-styles": "^4.0.0", - "astral-regex": "^2.0.0", - "is-fullwidth-code-point": "^3.0.0" + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" } }, - "string-width": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", - "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", + "cliui": { + "version": "5.0.0", + "bundled": true, "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" } }, - "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "color-convert": { + "version": "1.9.3", + "bundled": true, "requires": { - "ansi-regex": "^5.0.0" + "color-name": "1.1.3" } - } - } - }, - "cli-width": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.1.tgz", - "integrity": "sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw==" - }, - "cliui": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", - "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", - "requires": { - "string-width": "^2.1.1", - "strip-ansi": "^4.0.0", - "wrap-ansi": "^2.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" + "color-name": { + "version": "1.1.3", + "bundled": true }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "create-hash": { + "version": "1.2.0", + "bundled": true, "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" } }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "create-hmac": { + "version": "1.1.7", + "bundled": true, "requires": { - "ansi-regex": "^3.0.0" + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" } - } - } - }, - "clone": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.1.tgz", - "integrity": "sha1-0hfR6WERjjrJpLi7oyhVU79kfNs=" - }, - "clone-response": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", - "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", - "requires": { - "mimic-response": "^1.0.0" - } - }, - "code-point-at": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "requires": { - "color-name": "1.1.3" - } - }, - "color-logger": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/color-logger/-/color-logger-0.0.6.tgz", - "integrity": "sha1-5WJF7ymCJlcRDHy3WpzXhstp7Rs=" - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" - }, - "colors": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", - "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==" - }, - "combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "requires": { - "delayed-stream": "~1.0.0" - } - }, - "command-exists": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/command-exists/-/command-exists-1.2.9.tgz", - "integrity": "sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w==" - }, - "commander": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.8.1.tgz", - "integrity": "sha1-Br42f+v9oMMwqh4qBy09yXYkJdQ=", - "requires": { - "graceful-readlink": ">= 1.0.0" - } - }, - "commondir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=" - }, - "compare-versions": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-3.6.0.tgz", - "integrity": "sha512-W6Af2Iw1z4CB7q4uU4hv646dW9GQuBM+YpC0UvUCWSD8w90SJjp+ujJuXaEMtAXBtSqGfMPuFOVn4/+FlaqfBA==" - }, - "component-emitter": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", - "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=" - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" - }, - "confusing-browser-globals": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/confusing-browser-globals/-/confusing-browser-globals-1.0.9.tgz", - "integrity": "sha512-KbS1Y0jMtyPgIxjO7ZzMAuUpAKMt1SzCL9fsrKsX6b0zJPTaT0SiSPmewwVZg9UAO83HVIlEhZF84LIjZ0lmAw==", - "dev": true - }, - "contains-path": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/contains-path/-/contains-path-0.1.0.tgz", - "integrity": "sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo=", - "dev": true - }, - "content-disposition": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", - "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==", - "requires": { - "safe-buffer": "5.1.2" - }, - "dependencies": { - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - } - } - }, - "content-type": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", - "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" - }, - "cookie": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", - "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==" - }, - "cookie-signature": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" - }, - "cookiejar": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.2.tgz", - "integrity": "sha512-Mw+adcfzPxcPeI+0WlvRrr/3lGVO0bD75SxX6811cxSh1Wbxx7xZBGK1eVtDf6si8rg2lhnUjsVLMFMfbRIuwA==" - }, - "core-js": { - "version": "2.6.11", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.11.tgz", - "integrity": "sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg==" - }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" - }, - "cors": { - "version": "2.8.5", - "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", - "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", - "requires": { - "object-assign": "^4", - "vary": "^1" - } - }, - "cosmiconfig": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-6.0.0.tgz", - "integrity": "sha512-xb3ZL6+L8b9JLLCx3ZdoZy4+2ECphCMo2PwqgP1tlfVq6M6YReyzBJtvWWtbDSpNr9hn96pkCiZqUcFEc+54Qg==", - "requires": { - "@types/parse-json": "^4.0.0", - "import-fresh": "^3.1.0", - "parse-json": "^5.0.0", - "path-type": "^4.0.0", - "yaml": "^1.7.2" - } - }, - "create-ecdh": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz", - "integrity": "sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw==", - "requires": { - "bn.js": "^4.1.0", - "elliptic": "^6.0.0" - }, - "dependencies": { - "bn.js": { - "version": "4.11.9", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" - } - } - }, - "create-hash": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", - "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", - "requires": { - "cipher-base": "^1.0.1", - "inherits": "^2.0.1", - "md5.js": "^1.3.4", - "ripemd160": "^2.0.1", - "sha.js": "^2.4.0" - } - }, - "create-hmac": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", - "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", - "requires": { - "cipher-base": "^1.0.3", - "create-hash": "^1.1.0", - "inherits": "^2.0.1", - "ripemd160": "^2.0.0", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - } - }, - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" - } - } - }, - "crypto-browserify": { - "version": "3.12.0", - "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", - "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", - "requires": { - "browserify-cipher": "^1.0.0", - "browserify-sign": "^4.0.0", - "create-ecdh": "^4.0.0", - "create-hash": "^1.1.0", - "create-hmac": "^1.1.0", - "diffie-hellman": "^5.0.0", - "inherits": "^2.0.1", - "pbkdf2": "^3.0.3", - "public-encrypt": "^4.0.0", - "randombytes": "^2.0.0", - "randomfill": "^1.0.3" - } - }, - "crypto-js": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-3.3.0.tgz", - "integrity": "sha512-DIT51nX0dCfKltpRiXV+/TVZq+Qq2NgF4644+K7Ttnla7zEzqc+kjJyiB96BHNyUTBxyjzRcZYpUdZa+QAqi6Q==" - }, - "css-select": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz", - "integrity": "sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg=", - "requires": { - "boolbase": "~1.0.0", - "css-what": "2.1", - "domutils": "1.5.1", - "nth-check": "~1.0.1" - } - }, - "css-what": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/css-what/-/css-what-2.1.3.tgz", - "integrity": "sha512-a+EPoD+uZiNfh+5fxw2nO9QwFa6nJe2Or35fGY6Ipw1R3R4AGz1d1TEZrCegvw2YTmZ0jXirGYlzxxpYSHwpEg==" - }, - "cssom": { - "version": "0.3.8", - "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz", - "integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==", - "optional": true - }, - "cssstyle": { - "version": "0.2.37", - "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-0.2.37.tgz", - "integrity": "sha1-VBCXI0yyUTyDzu06zdwn/yeYfVQ=", - "optional": true, - "requires": { - "cssom": "0.3.x" - } - }, - "d": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", - "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", - "requires": { - "es5-ext": "^0.10.50", - "type": "^1.0.1" - } - }, - "dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", - "requires": { - "assert-plus": "^1.0.0" - } - }, - "death": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/death/-/death-1.1.0.tgz", - "integrity": "sha1-AaqcQB7dknUFFEcLgmY5DGbGcxg=" - }, - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "requires": { - "ms": "2.0.0" - } - }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" - }, - "decode-uri-component": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", - "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=" - }, - "decompress": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/decompress/-/decompress-4.2.1.tgz", - "integrity": "sha512-e48kc2IjU+2Zw8cTb6VZcJQ3lgVbS4uuB1TfCHbiZIP/haNXm+SVyhu+87jts5/3ROpd82GSVCoNs/z8l4ZOaQ==", - "requires": { - "decompress-tar": "^4.0.0", - "decompress-tarbz2": "^4.0.0", - "decompress-targz": "^4.0.0", - "decompress-unzip": "^4.0.1", - "graceful-fs": "^4.1.10", - "make-dir": "^1.0.0", - "pify": "^2.3.0", - "strip-dirs": "^2.0.0" - } - }, - "decompress-response": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", - "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", - "requires": { - "mimic-response": "^1.0.0" - } - }, - "decompress-tar": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/decompress-tar/-/decompress-tar-4.1.1.tgz", - "integrity": "sha512-JdJMaCrGpB5fESVyxwpCx4Jdj2AagLmv3y58Qy4GE6HMVjWz1FeVQk1Ct4Kye7PftcdOo/7U7UKzYBJgqnGeUQ==", - "requires": { - "file-type": "^5.2.0", - "is-stream": "^1.1.0", - "tar-stream": "^1.5.2" - } - }, - "decompress-tarbz2": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/decompress-tarbz2/-/decompress-tarbz2-4.1.1.tgz", - "integrity": "sha512-s88xLzf1r81ICXLAVQVzaN6ZmX4A6U4z2nMbOwobxkLoIIfjVMBg7TeguTUXkKeXni795B6y5rnvDw7rxhAq9A==", - "requires": { - "decompress-tar": "^4.1.0", - "file-type": "^6.1.0", - "is-stream": "^1.1.0", - "seek-bzip": "^1.0.5", - "unbzip2-stream": "^1.0.9" - }, - "dependencies": { - "file-type": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-6.2.0.tgz", - "integrity": "sha512-YPcTBDV+2Tm0VqjybVd32MHdlEGAtuxS3VAYsumFokDSMG+ROT5wawGlnHDoz7bfMcMDt9hxuXvXwoKUx2fkOg==" - } - } - }, - "decompress-targz": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/decompress-targz/-/decompress-targz-4.1.1.tgz", - "integrity": "sha512-4z81Znfr6chWnRDNfFNqLwPvm4db3WuZkqV+UgXQzSngG3CEKdBkw5jrv3axjjL96glyiiKjsxJG3X6WBZwX3w==", - "requires": { - "decompress-tar": "^4.1.1", - "file-type": "^5.2.0", - "is-stream": "^1.1.0" - } - }, - "decompress-unzip": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/decompress-unzip/-/decompress-unzip-4.0.1.tgz", - "integrity": "sha1-3qrM39FK6vhVePczroIQ+bSEj2k=", - "requires": { - "file-type": "^3.8.0", - "get-stream": "^2.2.0", - "pify": "^2.3.0", - "yauzl": "^2.4.2" - }, - "dependencies": { - "file-type": { - "version": "3.9.0", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-3.9.0.tgz", - "integrity": "sha1-JXoHg4TR24CHvESdEH1SpSZyuek=" }, - "get-stream": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-2.3.1.tgz", - "integrity": "sha1-Xzj5PzRgCWZu4BUKBUFn+Rvdld4=", + "cross-spawn": { + "version": "6.0.5", + "bundled": true, "requires": { - "object-assign": "^4.0.1", - "pinkie-promise": "^2.0.0" + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" } - } - } - }, - "dedent": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", - "integrity": "sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw=" - }, - "deep-eql": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", - "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", - "requires": { - "type-detect": "^4.0.0" - } - }, - "deep-is": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", - "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=" - }, - "defer-to-connect": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz", - "integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==" - }, - "deffy": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/deffy/-/deffy-2.2.3.tgz", - "integrity": "sha512-c5JD8Z6V1aBWVzn1+aELL97R1pHCwEjXeU3hZXdigkZkxb9vhgFP162kAxGXl992TtAg0btwQyx7d54CqcQaXQ==", - "requires": { - "typpy": "^2.0.0" - } - }, - "define-properties": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", - "requires": { - "object-keys": "^1.0.12" - } - }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" - }, - "depd": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" - }, - "des.js": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz", - "integrity": "sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==", - "requires": { - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" - } - }, - "destroy": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", - "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" - }, - "detect-indent": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz", - "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=", - "requires": { - "repeating": "^2.0.0" - } - }, - "detect-port": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/detect-port/-/detect-port-1.3.0.tgz", - "integrity": "sha512-E+B1gzkl2gqxt1IhUzwjrxBKRqx1UzC3WLONHinn8S3T6lwV/agVCyitiFOsGJ/eYuEUBvD71MZHy3Pv1G9doQ==", - "requires": { - "address": "^1.0.1", - "debug": "^2.6.0" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + }, + "decamelize": { + "version": "1.2.0", + "bundled": true + }, + "elliptic": { + "version": "6.5.3", + "bundled": true, "requires": { - "ms": "2.0.0" + "bn.js": "^4.4.0", + "brorand": "^1.0.1", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.0" } - } - } - }, - "diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==" - }, - "diffie-hellman": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", - "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", - "requires": { - "bn.js": "^4.1.0", - "miller-rabin": "^4.0.0", - "randombytes": "^2.0.0" - }, - "dependencies": { - "bn.js": { - "version": "4.11.9", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" - } - } - }, - "dir-glob": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "requires": { - "path-type": "^4.0.0" - } - }, - "docker-cli-js": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/docker-cli-js/-/docker-cli-js-2.7.1.tgz", - "integrity": "sha512-x0MfLInVShMHXVg1WH1fA2KFdtLgpw1qoBOZrcU4pGU1wH/7YvrMpLFLH/nXdLUdMy+YEtBH4IiYbBZ/aKvPwA==", - "requires": { - "cli-table-2-json": "1.0.13", - "dockermachine-cli-js": "3.0.5", - "lodash.snakecase": "^4.1.1", - "nodeify-ts": "1.0.6" - } - }, - "dockermachine-cli-js": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/dockermachine-cli-js/-/dockermachine-cli-js-3.0.5.tgz", - "integrity": "sha512-oV9RRKGvWrvsGl8JW9TWKpjBJVGxn/1qMvhqwPJiOPfRES0+lrq/Q8Wzixb6qinuXPVBhlWqhXb/Oxrh6Vuf/g==", - "requires": { - "cli-table-2-json": "1.0.13", - "nodeify-ts": "1.0.6" - } - }, - "doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "requires": { - "esutils": "^2.0.2" - } - }, - "dom-serializer": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.1.tgz", - "integrity": "sha512-l0IU0pPzLWSHBcieZbpOKgkIn3ts3vAh7ZuFyXNwJxJXk/c4Gwj9xaTJwIDVQCXawWD0qb3IzMGH5rglQaO0XA==", - "requires": { - "domelementtype": "^1.3.0", - "entities": "^1.1.1" - } - }, - "dom-walk": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/dom-walk/-/dom-walk-0.1.2.tgz", - "integrity": "sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w==" - }, - "domelementtype": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz", - "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==" - }, - "domhandler": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.4.2.tgz", - "integrity": "sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA==", - "requires": { - "domelementtype": "1" - } - }, - "domutils": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", - "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", - "requires": { - "dom-serializer": "0", - "domelementtype": "1" - } - }, - "dotenv": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-6.2.0.tgz", - "integrity": "sha512-HygQCKUBSFl8wKQZBSemMywRWcEDNidvNbjGVyZu3nbZ8qq9ubiPoGLMdRDpfSrpkkm9BXYFkpKxxFX38o/76w==" - }, - "duplexer3": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", - "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=" - }, - "ecc-jsbn": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", - "requires": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" - } - }, - "ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" - }, - "elliptic": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz", - "integrity": "sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==", - "requires": { - "bn.js": "^4.4.0", - "brorand": "^1.0.1", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.0" - }, - "dependencies": { - "bn.js": { - "version": "4.11.9", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" - } - } - }, - "emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==" - }, - "encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" - }, - "end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", - "requires": { - "once": "^1.4.0" - } - }, - "enquirer": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", - "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", - "requires": { - "ansi-colors": "^4.1.1" - } - }, - "entities": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz", - "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==" - }, - "error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "requires": { - "is-arrayish": "^0.2.1" - } - }, - "es-abstract": { - "version": "1.17.6", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.6.tgz", - "integrity": "sha512-Fr89bON3WFyUi5EvAeI48QTWX0AyekGgLA8H+c+7fbfCkJwRWRMLd8CQedNEyJuoYYhmtEqY92pgte1FAhBlhw==", - "requires": { - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.2.0", - "is-regex": "^1.1.0", - "object-inspect": "^1.7.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.0", - "string.prototype.trimend": "^1.0.1", - "string.prototype.trimstart": "^1.0.1" - } - }, - "es-array-method-boxes-properly": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz", - "integrity": "sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA==" - }, - "es-get-iterator": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/es-get-iterator/-/es-get-iterator-1.1.0.tgz", - "integrity": "sha512-UfrmHuWQlNMTs35e1ypnvikg6jCz3SK8v8ImvmDsh36fCVUR1MqoFDiyn0/k52C8NqO3YsO8Oe0azeesNuqSsQ==", - "requires": { - "es-abstract": "^1.17.4", - "has-symbols": "^1.0.1", - "is-arguments": "^1.0.4", - "is-map": "^2.0.1", - "is-set": "^2.0.1", - "is-string": "^1.0.5", - "isarray": "^2.0.5" - }, - "dependencies": { - "isarray": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==" - } - } - }, - "es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", - "requires": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" - } - }, - "es5-ext": { - "version": "0.10.53", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.53.tgz", - "integrity": "sha512-Xs2Stw6NiNHWypzRTY1MtaG/uJlwCk8kH81920ma8mvN8Xq1gsfhZvpkImLQArw8AHnv8MT2I45J3c0R8slE+Q==", - "requires": { - "es6-iterator": "~2.0.3", - "es6-symbol": "~3.1.3", - "next-tick": "~1.0.0" - } - }, - "es6-iterator": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", - "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", - "requires": { - "d": "1", - "es5-ext": "^0.10.35", - "es6-symbol": "^3.1.1" - } - }, - "es6-symbol": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", - "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", - "requires": { - "d": "^1.0.1", - "ext": "^1.1.2" - } - }, - "escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" - }, - "escodegen": { - "version": "1.14.3", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.14.3.tgz", - "integrity": "sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw==", - "optional": true, - "requires": { - "esprima": "^4.0.1", - "estraverse": "^4.2.0", - "esutils": "^2.0.2", - "optionator": "^0.8.1", - "source-map": "~0.6.1" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "optional": true - } - } - }, - "esdoc": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/esdoc/-/esdoc-1.1.0.tgz", - "integrity": "sha512-vsUcp52XJkOWg9m1vDYplGZN2iDzvmjDL5M/Mp8qkoDG3p2s0yIQCIjKR5wfPBaM3eV14a6zhQNYiNTCVzPnxA==", - "requires": { - "babel-generator": "6.26.1", - "babel-traverse": "6.26.0", - "babylon": "6.18.0", - "cheerio": "1.0.0-rc.2", - "color-logger": "0.0.6", - "escape-html": "1.0.3", - "fs-extra": "5.0.0", - "ice-cap": "0.0.4", - "marked": "0.3.19", - "minimist": "1.2.0", - "taffydb": "2.7.3" - }, - "dependencies": { - "fs-extra": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-5.0.0.tgz", - "integrity": "sha512-66Pm4RYbjzdyeuqudYqhFiNBbCIuI9kgRqLPSHIlXHidW8NIQtVdkM1yeZ4lXwuhbTETv3EUGMNHAAw6hiundQ==", + }, + "emoji-regex": { + "version": "7.0.3", + "bundled": true + }, + "end-of-stream": { + "version": "1.4.4", + "bundled": true, "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" + "once": "^1.4.0" } }, - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" - } - } - }, - "eslint": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.5.0.tgz", - "integrity": "sha512-vlUP10xse9sWt9SGRtcr1LAC67BENcQMFeV+w5EvLEoFe3xJ8cF1Skd0msziRx/VMC+72B4DxreCE+OR12OA6Q==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "ajv": "^6.10.0", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.0.1", - "doctrine": "^3.0.0", - "enquirer": "^2.3.5", - "eslint-scope": "^5.1.0", - "eslint-utils": "^2.1.0", - "eslint-visitor-keys": "^1.3.0", - "espree": "^7.2.0", - "esquery": "^1.2.0", - "esutils": "^2.0.2", - "file-entry-cache": "^5.0.1", - "functional-red-black-tree": "^1.0.1", - "glob-parent": "^5.0.0", - "globals": "^12.1.0", - "ignore": "^4.0.6", - "import-fresh": "^3.0.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "js-yaml": "^3.13.1", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash": "^4.17.19", - "minimatch": "^3.0.4", - "natural-compare": "^1.4.0", - "optionator": "^0.9.1", - "progress": "^2.0.0", - "regexpp": "^3.1.0", - "semver": "^7.2.1", - "strip-ansi": "^6.0.0", - "strip-json-comments": "^3.1.0", - "table": "^5.2.3", - "text-table": "^0.2.0", - "v8-compile-cache": "^2.0.3" - }, - "dependencies": { - "acorn": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.3.1.tgz", - "integrity": "sha512-tLc0wSnatxAQHVHUapaHdz72pi9KUyHjq5KyHjGg9Y8Ifdc79pTh2XvI6I1/chZbnM7QtNKzh66ooDogPZSleA==", - "dev": true - }, - "ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", - "dev": true - }, - "ansi-styles": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", - "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", - "dev": true, + "ethereum-cryptography": { + "version": "0.1.3", + "bundled": true, "requires": { - "@types/color-name": "^1.1.1", - "color-convert": "^2.0.1" + "@types/pbkdf2": "^3.0.0", + "@types/secp256k1": "^4.0.1", + "blakejs": "^1.1.0", + "browserify-aes": "^1.2.0", + "bs58check": "^2.1.2", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "hash.js": "^1.1.7", + "keccak": "^3.0.0", + "pbkdf2": "^3.0.17", + "randombytes": "^2.1.0", + "safe-buffer": "^5.1.2", + "scrypt-js": "^3.0.0", + "secp256k1": "^4.0.1", + "setimmediate": "^1.0.5" } }, - "chalk": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", - "dev": true, + "ethereumjs-util": { + "version": "6.2.1", + "bundled": true, "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" + "@types/bn.js": "^4.11.3", + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "elliptic": "^6.5.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "0.1.6", + "rlp": "^2.2.3" } }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, + "ethjs-util": { + "version": "0.1.6", + "bundled": true, "requires": { - "color-name": "~1.1.4" + "is-hex-prefixed": "1.0.0", + "strip-hex-prefix": "1.0.0" } }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, + "evp_bytestokey": { + "version": "1.0.3", + "bundled": true, "requires": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" } }, - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "dev": true, + "execa": { + "version": "1.0.0", + "bundled": true, "requires": { - "ms": "^2.1.1" + "cross-spawn": "^6.0.0", + "get-stream": "^4.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" } }, - "eslint-scope": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.0.tgz", - "integrity": "sha512-iiGRvtxWqgtx5m8EyQUJihBloE4EnYeGE/bz1wSPwJE6tZuJUtHlhqDM4Xj2ukE8Dyy1+HCZ4hE0fzIVMzb58w==", - "dev": true, + "find-up": { + "version": "3.0.0", + "bundled": true, "requires": { - "esrecurse": "^4.1.0", - "estraverse": "^4.1.1" + "locate-path": "^3.0.0" } }, - "eslint-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", - "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", - "dev": true, + "get-caller-file": { + "version": "2.0.5", + "bundled": true + }, + "get-stream": { + "version": "4.1.0", + "bundled": true, "requires": { - "eslint-visitor-keys": "^1.1.0" + "pump": "^3.0.0" } }, - "espree": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-7.2.0.tgz", - "integrity": "sha512-H+cQ3+3JYRMEIOl87e7QdHX70ocly5iW4+dttuR8iYSPr/hXKFb+7dBsZ7+u1adC4VrnPlTkv0+OwuPnDop19g==", - "dev": true, + "hash-base": { + "version": "3.1.0", + "bundled": true, "requires": { - "acorn": "^7.3.1", - "acorn-jsx": "^5.2.0", - "eslint-visitor-keys": "^1.3.0" + "inherits": "^2.0.4", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" } }, - "globals": { - "version": "12.4.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", - "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", - "dev": true, + "hash.js": { + "version": "1.1.7", + "bundled": true, "requires": { - "type-fest": "^0.8.1" + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" } }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", - "dev": true, + "hmac-drbg": { + "version": "1.0.1", + "bundled": true, "requires": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" } }, - "lodash": { - "version": "4.17.19", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", - "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==", - "dev": true + "inherits": { + "version": "2.0.4", + "bundled": true }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true + "invert-kv": { + "version": "2.0.0", + "bundled": true }, - "optionator": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", - "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", - "dev": true, - "requires": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.3" - } + "is-fullwidth-code-point": { + "version": "2.0.0", + "bundled": true }, - "path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true + "is-hex-prefixed": { + "version": "1.0.0", + "bundled": true }, - "prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", - "dev": true + "is-stream": { + "version": "1.1.0", + "bundled": true }, - "regexpp": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz", - "integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==", - "dev": true + "isexe": { + "version": "2.0.0", + "bundled": true }, - "shebang-command": { + "keccak": { + "version": "3.0.1", + "bundled": true, + "requires": { + "node-addon-api": "^2.0.0", + "node-gyp-build": "^4.2.0" + } + }, + "lcid": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, + "bundled": true, "requires": { - "shebang-regex": "^3.0.0" + "invert-kv": "^2.0.0" } }, - "shebang-regex": { + "locate-path": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true - }, - "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "dev": true, + "bundled": true, "requires": { - "ansi-regex": "^5.0.0" + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" } }, - "strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true - }, - "supports-color": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", - "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", - "dev": true, + "map-age-cleaner": { + "version": "0.1.3", + "bundled": true, "requires": { - "has-flag": "^4.0.0" + "p-defer": "^1.0.0" } }, - "type-check": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", - "dev": true, + "md5.js": { + "version": "1.3.5", + "bundled": true, "requires": { - "prelude-ls": "^1.2.1" + "hash-base": "^3.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" } }, - "type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", - "dev": true - }, - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, + "mem": { + "version": "4.3.0", + "bundled": true, "requires": { - "isexe": "^2.0.0" - } - } - } - }, - "eslint-config-airbnb-base": { - "version": "14.2.0", - "resolved": "https://registry.npmjs.org/eslint-config-airbnb-base/-/eslint-config-airbnb-base-14.2.0.tgz", - "integrity": "sha512-Snswd5oC6nJaevs3nZoLSTvGJBvzTfnBqOIArkf3cbyTyq9UD79wOk8s+RiL6bhca0p/eRO6veczhf6A/7Jy8Q==", - "dev": true, - "requires": { - "confusing-browser-globals": "^1.0.9", - "object.assign": "^4.1.0", - "object.entries": "^1.1.2" - } - }, - "eslint-import-resolver-node": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.4.tgz", - "integrity": "sha512-ogtf+5AB/O+nM6DIeBUNr2fuT7ot9Qg/1harBfBtaP13ekEWFQEEMP94BCB7zaNW3gyY+8SHYF00rnqYwXKWOA==", - "dev": true, - "requires": { - "debug": "^2.6.9", - "resolve": "^1.13.1" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "resolve": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", - "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", - "dev": true, - "requires": { - "path-parse": "^1.0.6" - } - } - } - }, - "eslint-module-utils": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.6.0.tgz", - "integrity": "sha512-6j9xxegbqe8/kZY8cYpcp0xhbK0EgJlg3g9mib3/miLaExuuwc3n5UEfSnU6hWMbT0FAYVvDbL9RrRgpUeQIvA==", - "dev": true, - "requires": { - "debug": "^2.6.9", - "pkg-dir": "^2.0.0" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" + "map-age-cleaner": "^0.1.1", + "mimic-fn": "^2.0.0", + "p-is-promise": "^2.0.0" } }, - "find-up": { + "mimic-fn": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, - "requires": { - "locate-path": "^2.0.0" - } - }, - "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "dev": true, - "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - } - }, - "p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "dev": true, - "requires": { - "p-try": "^1.0.0" - } - }, - "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", - "dev": true, - "requires": { - "p-limit": "^1.1.0" - } - }, - "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", - "dev": true - }, - "pkg-dir": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", - "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", - "dev": true, - "requires": { - "find-up": "^2.1.0" - } - } - } - }, - "eslint-plugin-import": { - "version": "2.22.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.22.0.tgz", - "integrity": "sha512-66Fpf1Ln6aIS5Gr/55ts19eUuoDhAbZgnr6UxK5hbDx6l/QgQgx61AePq+BV4PP2uXQFClgMVzep5zZ94qqsxg==", - "dev": true, - "requires": { - "array-includes": "^3.1.1", - "array.prototype.flat": "^1.2.3", - "contains-path": "^0.1.0", - "debug": "^2.6.9", - "doctrine": "1.5.0", - "eslint-import-resolver-node": "^0.3.3", - "eslint-module-utils": "^2.6.0", - "has": "^1.0.3", - "minimatch": "^3.0.4", - "object.values": "^1.1.1", - "read-pkg-up": "^2.0.0", - "resolve": "^1.17.0", - "tsconfig-paths": "^3.9.0" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "doctrine": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz", - "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", - "dev": true, - "requires": { - "esutils": "^2.0.2", - "isarray": "^1.0.0" - } - }, - "resolve": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", - "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", - "dev": true, - "requires": { - "path-parse": "^1.0.6" - } - } - } - }, - "eslint-scope": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz", - "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==", - "requires": { - "esrecurse": "^4.1.0", - "estraverse": "^4.1.1" - } - }, - "eslint-utils": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.3.tgz", - "integrity": "sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==", - "requires": { - "eslint-visitor-keys": "^1.1.0" - } - }, - "eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==" - }, - "espree": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-5.0.1.tgz", - "integrity": "sha512-qWAZcWh4XE/RwzLJejfcofscgMc9CamR6Tn1+XRXNzrvUSSbiAjGOI/fggztjIi7y9VLPqnICMIPiGyr8JaZ0A==", - "requires": { - "acorn": "^6.0.7", - "acorn-jsx": "^5.0.0", - "eslint-visitor-keys": "^1.0.0" - }, - "dependencies": { - "acorn": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.1.tgz", - "integrity": "sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA==" - } - } - }, - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" - }, - "esquery": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.3.1.tgz", - "integrity": "sha512-olpvt9QG0vniUBZspVRN6lwB7hOZoTRtT+jzR+tS4ffYx2mzbw+z0XCOk44aaLYKApNX5nMm+E+P6o25ip/DHQ==", - "requires": { - "estraverse": "^5.1.0" - }, - "dependencies": { - "estraverse": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.1.0.tgz", - "integrity": "sha512-FyohXK+R0vE+y1nHLoBM7ZTyqRpqAlhdZHCWIWEviFLiGB8b04H6bQs8G+XTthacvT8VuwvteiP7RJSxMs8UEw==" - } - } - }, - "esrecurse": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", - "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", - "requires": { - "estraverse": "^4.1.0" - } - }, - "estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==" - }, - "esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==" - }, - "etag": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", - "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" - }, - "eth-ens-namehash": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/eth-ens-namehash/-/eth-ens-namehash-2.0.8.tgz", - "integrity": "sha1-IprEbsqG1S4MmR58sq74P/D2i88=", - "requires": { - "idna-uts46-hx": "^2.3.1", - "js-sha3": "^0.5.7" - } - }, - "eth-lib": { - "version": "0.1.29", - "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.1.29.tgz", - "integrity": "sha512-bfttrr3/7gG4E02HoWTDUcDDslN003OlOoBxk9virpAZQ1ja/jDgwkWB8QfJF7ojuEowrqy+lzp9VcJG7/k5bQ==", - "requires": { - "bn.js": "^4.11.6", - "elliptic": "^6.4.0", - "nano-json-stream-parser": "^0.1.2", - "servify": "^0.1.12", - "ws": "^3.0.0", - "xhr-request-promise": "^0.1.2" - }, - "dependencies": { - "bn.js": { - "version": "4.11.9", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - }, - "ws": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/ws/-/ws-3.3.3.tgz", - "integrity": "sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA==", - "requires": { - "async-limiter": "~1.0.0", - "safe-buffer": "~5.1.0", - "ultron": "~1.1.0" - } - } - } - }, - "ethereum-bloom-filters": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/ethereum-bloom-filters/-/ethereum-bloom-filters-1.0.7.tgz", - "integrity": "sha512-cDcJJSJ9GMAcURiAWO3DxIEhTL/uWqlQnvgKpuYQzYPrt/izuGU+1ntQmHt0IRq6ADoSYHFnB+aCEFIldjhkMQ==", - "requires": { - "js-sha3": "^0.8.0" - }, - "dependencies": { - "js-sha3": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", - "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==" - } - } - }, - "ethereum-cryptography": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", - "integrity": "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==", - "requires": { - "@types/pbkdf2": "^3.0.0", - "@types/secp256k1": "^4.0.1", - "blakejs": "^1.1.0", - "browserify-aes": "^1.2.0", - "bs58check": "^2.1.2", - "create-hash": "^1.2.0", - "create-hmac": "^1.1.7", - "hash.js": "^1.1.7", - "keccak": "^3.0.0", - "pbkdf2": "^3.0.17", - "randombytes": "^2.1.0", - "safe-buffer": "^5.1.2", - "scrypt-js": "^3.0.0", - "secp256k1": "^4.0.1", - "setimmediate": "^1.0.5" - } - }, - "ethereum-transaction-debugger": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/ethereum-transaction-debugger/-/ethereum-transaction-debugger-0.0.5.tgz", - "integrity": "sha512-ak0cOcblF9wK4zMlOTpkYMy/oRyeWwsnoX3ni+trE2QL+mNYd0idwV1T49+Q3kIv1qGnIyBIr1JGcgng6PnpxQ==", - "requires": { - "bn.js": "^4.11.8", - "debug": "^4.1.0", - "ethers": "^4.0.27", - "fast-levenshtein": "^2.0.6", - "json-pointer": "^0.6.0", - "json-stable-stringify": "^1.0.1", - "node-interval-tree": "^1.3.3", - "redux": "^3.7.2", - "redux-cli-logger": "^2.0.1", - "redux-saga": "1.0.0", - "remote-redux-devtools": "^0.5.12", - "reselect-tree": "^1.3.0", - "safe-eval": "^0.4.1", - "truffle-code-utils": "1.1.4", - "truffle-decode-utils": "1.0.4", - "truffle-decoder": "2.0.1", - "truffle-solidity-utils": "1.2.2" - }, - "dependencies": { - "aes-js": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz", - "integrity": "sha1-4h3xCtbCBTKVvLuNq0Cwnb6ofk0=" - }, - "bn.js": { - "version": "4.11.9", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" - }, - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "requires": { - "ms": "^2.1.1" - } - }, - "elliptic": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.2.tgz", - "integrity": "sha512-f4x70okzZbIQl/NSRLkI/+tteV/9WqL98zx+SQ69KbXxmVrmjwsNUPn/gYJJ0sHvEak24cZgHIPegRePAtA/xw==", - "requires": { - "bn.js": "^4.4.0", - "brorand": "^1.0.1", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.0" - } - }, - "ethers": { - "version": "4.0.47", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-4.0.47.tgz", - "integrity": "sha512-hssRYhngV4hiDNeZmVU/k5/E8xmLG8UpcNUzg6mb7lqhgpFPH/t7nuv20RjRrEf0gblzvi2XwR5Te+V3ZFc9pQ==", - "requires": { - "aes-js": "3.0.0", - "bn.js": "^4.4.0", - "elliptic": "6.5.2", - "hash.js": "1.1.3", - "js-sha3": "0.5.7", - "scrypt-js": "2.0.4", - "setimmediate": "1.0.4", - "uuid": "2.0.1", - "xmlhttprequest": "1.8.0" - } - }, - "hash.js": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", - "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", - "requires": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.0" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - }, - "scrypt-js": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-2.0.4.tgz", - "integrity": "sha512-4KsaGcPnuhtCZQCxFxN3GVYIhKFPTdLd8PLC552XwbMndtD0cjRFAhDuuydXQ0h08ZfPgzqe6EKHozpuH74iDw==" - }, - "setimmediate": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.4.tgz", - "integrity": "sha1-IOgd5iLUoCWIzgyNqJc8vPHTE48=" - }, - "uuid": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.1.tgz", - "integrity": "sha1-wqMN7bPlNdcsz4LjQ5QaULqFM6w=" - } - } - }, - "ethereumjs-common": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/ethereumjs-common/-/ethereumjs-common-1.5.1.tgz", - "integrity": "sha512-aVUPRLgmXORGXXEVkFYgPhr9TGtpBY2tGhZ9Uh0A3lIUzUDr1x6kQx33SbjPUkLkX3eniPQnIL/2psjkjrOfcQ==" - }, - "ethereumjs-tx": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ethereumjs-tx/-/ethereumjs-tx-2.1.2.tgz", - "integrity": "sha512-zZEK1onCeiORb0wyCXUvg94Ve5It/K6GD1K+26KfFKodiBiS6d9lfCXlUKGBBdQ+bv7Day+JK0tj1K+BeNFRAw==", - "requires": { - "ethereumjs-common": "^1.5.0", - "ethereumjs-util": "^6.0.0" - } - }, - "ethereumjs-util": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz", - "integrity": "sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw==", - "requires": { - "@types/bn.js": "^4.11.3", - "bn.js": "^4.11.0", - "create-hash": "^1.1.2", - "elliptic": "^6.5.2", - "ethereum-cryptography": "^0.1.3", - "ethjs-util": "0.1.6", - "rlp": "^2.2.3" - }, - "dependencies": { - "bn.js": { - "version": "4.11.9", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" - } - } - }, - "etherlime-argent": { - "version": "2.3.5", - "resolved": "https://registry.npmjs.org/etherlime-argent/-/etherlime-argent-2.3.5.tgz", - "integrity": "sha512-QIEeDdY7a3sdQsz4UUEG6zibAMsTuNuIPPgl1dVoPKHbUrtYKbD8pm925WPN4v2yRiYJAUuLLJk6coCIl+hLCw==", - "requires": { - "axios": "^0.18.0", - "bn": "^1.0.1", - "chai": "4.1.2", - "circom": "github:LimeChain/circom", - "cli-analytics-sdk": "github:LimeChain/cli-analytics-sdk", - "cli-table": "0.3.1", - "colors": "1.3.2", - "docker-cli-js": "^2.5.2", - "ethereum-transaction-debugger": "0.0.5", - "etherlime-config": "^1.0.0", - "etherlime-logger": "^1.2.1", - "etherlime-utils": "^1.1.4", - "ethers": "^4.0.27", - "find-cache-dir": "2.0.0", - "fs-extra": "7.0.1", - "ganache-cli": "6.9.1", - "mocha": "5.2.0", - "original-require": "1.0.1", - "require-from-string": "2.0.2", - "simple-git": "^1.107.0", - "snarkjs": "github:LimeChain/snarkjs", - "solc": "^0.6.1", - "solidity-coverage": "^0.7.7", - "tcp-port-used": "^1.0.1", - "yargs": "11.0.0" - }, - "dependencies": { - "aes-js": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz", - "integrity": "sha1-4h3xCtbCBTKVvLuNq0Cwnb6ofk0=" - }, - "bn.js": { - "version": "4.11.9", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" - }, - "chai": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.1.2.tgz", - "integrity": "sha1-D2RYS6ZC8PKs4oBiefTwbKI61zw=", - "requires": { - "assertion-error": "^1.0.1", - "check-error": "^1.0.1", - "deep-eql": "^3.0.0", - "get-func-name": "^2.0.0", - "pathval": "^1.0.0", - "type-detect": "^4.0.0" - } - }, - "colors": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.3.2.tgz", - "integrity": "sha512-rhP0JSBGYvpcNQj4s5AdShMeE5ahMop96cTeDl/v9qQQm2fYClE2QXZRi8wLzc+GmXSxdIqqbOIAhyObEXDbfQ==" - }, - "elliptic": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.2.tgz", - "integrity": "sha512-f4x70okzZbIQl/NSRLkI/+tteV/9WqL98zx+SQ69KbXxmVrmjwsNUPn/gYJJ0sHvEak24cZgHIPegRePAtA/xw==", - "requires": { - "bn.js": "^4.4.0", - "brorand": "^1.0.1", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.0" - } - }, - "ethers": { - "version": "4.0.47", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-4.0.47.tgz", - "integrity": "sha512-hssRYhngV4hiDNeZmVU/k5/E8xmLG8UpcNUzg6mb7lqhgpFPH/t7nuv20RjRrEf0gblzvi2XwR5Te+V3ZFc9pQ==", - "requires": { - "aes-js": "3.0.0", - "bn.js": "^4.4.0", - "elliptic": "6.5.2", - "hash.js": "1.1.3", - "js-sha3": "0.5.7", - "scrypt-js": "2.0.4", - "setimmediate": "1.0.4", - "uuid": "2.0.1", - "xmlhttprequest": "1.8.0" - } - }, - "hash.js": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", - "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", - "requires": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.0" - } - }, - "scrypt-js": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-2.0.4.tgz", - "integrity": "sha512-4KsaGcPnuhtCZQCxFxN3GVYIhKFPTdLd8PLC552XwbMndtD0cjRFAhDuuydXQ0h08ZfPgzqe6EKHozpuH74iDw==" - }, - "setimmediate": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.4.tgz", - "integrity": "sha1-IOgd5iLUoCWIzgyNqJc8vPHTE48=" - }, - "uuid": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.1.tgz", - "integrity": "sha1-wqMN7bPlNdcsz4LjQ5QaULqFM6w=" - } - } - }, - "etherlime-config": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/etherlime-config/-/etherlime-config-1.0.0.tgz", - "integrity": "sha512-Z0heb7c7qA4pxqhV63neqmJNR/Cux9JXrERSOvP+KuiJ9Z5tn/MG0eHArBWiR7U3kPu8AXZIJaAvBoeyJkN7VQ==" - }, - "etherlime-lib": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/etherlime-lib/-/etherlime-lib-1.1.3.tgz", - "integrity": "sha512-0H5hH7GG/3/2VxGJTjZth9zUUTsRAlDG+IY8ePZ95d276/N0GkPIdXjPdHmM+yQc/mMObMOuf/zmxPUP+wlq2g==", - "requires": { - "etherlime-config": "^1.0.0", - "etherlime-logger": "^1.1.2", - "etherlime-utils": "^1.1.2", - "ethers": "git+https://github.com/LimeChain/ethers.js.git#master", - "typescript": "^3.5.1" - }, - "dependencies": { - "aes-js": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz", - "integrity": "sha1-4h3xCtbCBTKVvLuNq0Cwnb6ofk0=" - }, - "bn.js": { - "version": "4.11.9", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" - }, - "elliptic": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.2.tgz", - "integrity": "sha512-f4x70okzZbIQl/NSRLkI/+tteV/9WqL98zx+SQ69KbXxmVrmjwsNUPn/gYJJ0sHvEak24cZgHIPegRePAtA/xw==", - "requires": { - "bn.js": "^4.4.0", - "brorand": "^1.0.1", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.0" - } - }, - "ethers": { - "version": "git+https://github.com/LimeChain/ethers.js.git#7eceb12e0a05ed1e44834556f6a32e20918abf1b", - "from": "git+https://github.com/LimeChain/ethers.js.git#master", - "requires": { - "aes-js": "3.0.0", - "bn.js": "^4.4.0", - "elliptic": "6.5.2", - "hash.js": "1.1.3", - "js-sha3": "0.5.7", - "scrypt-js": "2.0.4", - "setimmediate": "1.0.4", - "uuid": "2.0.1", - "xmlhttprequest": "1.8.0" - } - }, - "hash.js": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", - "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", - "requires": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.0" - } - }, - "scrypt-js": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-2.0.4.tgz", - "integrity": "sha512-4KsaGcPnuhtCZQCxFxN3GVYIhKFPTdLd8PLC552XwbMndtD0cjRFAhDuuydXQ0h08ZfPgzqe6EKHozpuH74iDw==" - }, - "setimmediate": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.4.tgz", - "integrity": "sha1-IOgd5iLUoCWIzgyNqJc8vPHTE48=" - }, - "uuid": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.1.tgz", - "integrity": "sha1-wqMN7bPlNdcsz4LjQ5QaULqFM6w=" - } - } - }, - "etherlime-logger": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/etherlime-logger/-/etherlime-logger-1.2.1.tgz", - "integrity": "sha512-BnrU4NpwT5fsmk1v3v3z9fB45wxhbKIJJ5i7LOxxMUf9zg9iDfmNbQaX6QJ7Q6zmaKEoszF8u/fRwrAUt8G78Q==", - "requires": { - "fs-extra": "7.0.1" - } - }, - "etherlime-utils": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/etherlime-utils/-/etherlime-utils-1.1.4.tgz", - "integrity": "sha512-kzvjA9f7e7mlOIY4pUve5+ynoVYIqThIzU6ENQjF/d6ZyIyEA3LR7MLTHwkuVHyJq6iV7nKnMTPZZfGlW9I71Q==", - "requires": { - "chalk": "2.4.1" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "ethers": { - "version": "5.0.7", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.0.7.tgz", - "integrity": "sha512-1Zu9s+z4BgsDAZcGIYACJdWBB6mVtCCmUonj68Njul7STcSdgwOyj0sCAxCUr2Nsmsamckr4E12q3ecvZPGAUw==", - "requires": { - "@ethersproject/abi": "^5.0.0", - "@ethersproject/abstract-provider": "^5.0.0", - "@ethersproject/abstract-signer": "^5.0.0", - "@ethersproject/address": "^5.0.0", - "@ethersproject/base64": "^5.0.0", - "@ethersproject/bignumber": "^5.0.0", - "@ethersproject/bytes": "^5.0.0", - "@ethersproject/constants": "^5.0.0", - "@ethersproject/contracts": "^5.0.0", - "@ethersproject/hash": "^5.0.0", - "@ethersproject/hdnode": "^5.0.0", - "@ethersproject/json-wallets": "^5.0.0", - "@ethersproject/keccak256": "^5.0.0", - "@ethersproject/logger": "^5.0.0", - "@ethersproject/networks": "^5.0.0", - "@ethersproject/pbkdf2": "^5.0.0", - "@ethersproject/properties": "^5.0.0", - "@ethersproject/providers": "^5.0.0", - "@ethersproject/random": "^5.0.0", - "@ethersproject/rlp": "^5.0.0", - "@ethersproject/sha2": "^5.0.0", - "@ethersproject/signing-key": "^5.0.0", - "@ethersproject/solidity": "^5.0.0", - "@ethersproject/strings": "^5.0.0", - "@ethersproject/transactions": "^5.0.0", - "@ethersproject/units": "^5.0.0", - "@ethersproject/wallet": "^5.0.0", - "@ethersproject/web": "^5.0.0", - "@ethersproject/wordlists": "^5.0.0" - }, - "dependencies": { - "@ethersproject/abi": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.0.2.tgz", - "integrity": "sha512-Z+5f7xOgtRLu/W2l9Ry5xF7ehh9QVQ0m1vhynmTcS7DMfHgqTd1/PDFC62aw91ZPRCRZsYdZJu8ymokC5e1JSw==", - "requires": { - "@ethersproject/address": "^5.0.0", - "@ethersproject/bignumber": "^5.0.0", - "@ethersproject/bytes": "^5.0.0", - "@ethersproject/constants": "^5.0.0", - "@ethersproject/hash": "^5.0.0", - "@ethersproject/keccak256": "^5.0.0", - "@ethersproject/logger": "^5.0.0", - "@ethersproject/properties": "^5.0.0", - "@ethersproject/strings": "^5.0.0" - } - } - } - }, - "ethjs-unit": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/ethjs-unit/-/ethjs-unit-0.1.6.tgz", - "integrity": "sha1-xmWSHkduh7ziqdWIpv4EBbLEFpk=", - "requires": { - "bn.js": "4.11.6", - "number-to-bn": "1.7.0" - }, - "dependencies": { - "bn.js": { - "version": "4.11.6", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", - "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=" - } - } - }, - "ethjs-util": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/ethjs-util/-/ethjs-util-0.1.6.tgz", - "integrity": "sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w==", - "requires": { - "is-hex-prefixed": "1.0.0", - "strip-hex-prefix": "1.0.0" - } - }, - "eventemitter3": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-1.1.1.tgz", - "integrity": "sha1-R3hr2qCHyvext15zq8XH1UAVjNA=" - }, - "events": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", - "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=" - }, - "evp_bytestokey": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", - "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", - "requires": { - "md5.js": "^1.3.4", - "safe-buffer": "^5.1.1" - } - }, - "execa": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", - "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", - "requires": { - "cross-spawn": "^6.0.0", - "get-stream": "^4.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - } - }, - "express": { - "version": "4.17.1", - "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz", - "integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==", - "requires": { - "accepts": "~1.3.7", - "array-flatten": "1.1.1", - "body-parser": "1.19.0", - "content-disposition": "0.5.3", - "content-type": "~1.0.4", - "cookie": "0.4.0", - "cookie-signature": "1.0.6", - "debug": "2.6.9", - "depd": "~1.1.2", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "finalhandler": "~1.1.2", - "fresh": "0.5.2", - "merge-descriptors": "1.0.1", - "methods": "~1.1.2", - "on-finished": "~2.3.0", - "parseurl": "~1.3.3", - "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.5", - "qs": "6.7.0", - "range-parser": "~1.2.1", - "safe-buffer": "5.1.2", - "send": "0.17.1", - "serve-static": "1.14.1", - "setprototypeof": "1.1.1", - "statuses": "~1.5.0", - "type-is": "~1.6.18", - "utils-merge": "1.0.1", - "vary": "~1.1.2" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - }, - "qs": { - "version": "6.7.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", - "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==" - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - } - } - }, - "ext": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/ext/-/ext-1.4.0.tgz", - "integrity": "sha512-Key5NIsUxdqKg3vIsdw9dSuXpPCQ297y6wBjL30edxwPgt2E44WcWBZey/ZvUc6sERLTxKdyCu4gZFmUbk1Q7A==", - "requires": { - "type": "^2.0.0" - }, - "dependencies": { - "type": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/type/-/type-2.0.0.tgz", - "integrity": "sha512-KBt58xCHry4Cejnc2ISQAF7QY+ORngsWfxezO68+12hKV6lQY8P/psIkcbjeHWn7MqcgciWJyCCevFMJdIXpow==" - } - } - }, - "extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" - }, - "external-editor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", - "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", - "requires": { - "chardet": "^0.7.0", - "iconv-lite": "^0.4.24", - "tmp": "^0.0.33" - } - }, - "extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" - }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" - }, - "fast-diff": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz", - "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==" - }, - "fast-glob": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.4.tgz", - "integrity": "sha512-kr/Oo6PX51265qeuCYsyGypiO5uJFgBS0jksyG7FUeCyQzNwYnzrNIMR1NXfkZXsMYXYLRAHgISHBz8gQcxKHQ==", - "requires": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.0", - "merge2": "^1.3.0", - "micromatch": "^4.0.2", - "picomatch": "^2.2.1" - } - }, - "fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" - }, - "fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=" - }, - "fastq": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.8.0.tgz", - "integrity": "sha512-SMIZoZdLh/fgofivvIkmknUXyPnvxRE3DhtZ5Me3Mrsk5gyPL42F0xr51TdRXskBxHfMp+07bcYzfsYEsSQA9Q==", - "requires": { - "reusify": "^1.0.4" - } - }, - "fd-slicer": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", - "integrity": "sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4=", - "requires": { - "pend": "~1.2.0" - } - }, - "figures": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", - "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", - "requires": { - "escape-string-regexp": "^1.0.5" - } - }, - "file-entry-cache": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", - "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", - "requires": { - "flat-cache": "^2.0.1" - } - }, - "file-type": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-5.2.0.tgz", - "integrity": "sha1-LdvqfHP/42No365J3DOMBYwritY=" - }, - "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "requires": { - "to-regex-range": "^5.0.1" - } - }, - "finalhandler": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", - "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", - "requires": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "~2.3.0", - "parseurl": "~1.3.3", - "statuses": "~1.5.0", - "unpipe": "~1.0.0" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - } - } - }, - "find-cache-dir": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.0.0.tgz", - "integrity": "sha512-LDUY6V1Xs5eFskUVYtIwatojt6+9xC9Chnlk/jYOOvn3FAFfSaWddxahDGyNHh0b2dMXa6YW2m0tk8TdVaXHlA==", - "requires": { - "commondir": "^1.0.1", - "make-dir": "^1.0.0", - "pkg-dir": "^3.0.0" - } - }, - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "requires": { - "locate-path": "^3.0.0" - } - }, - "find-versions": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/find-versions/-/find-versions-3.2.0.tgz", - "integrity": "sha512-P8WRou2S+oe222TOCHitLy8zj+SIsVJh52VP4lvXkaFVnOFFdoWv1H1Jjvel1aI6NCFOAaeAVm8qrI0odiLcww==", - "requires": { - "semver-regex": "^2.0.0" - } - }, - "flat": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.0.tgz", - "integrity": "sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw==", - "requires": { - "is-buffer": "~2.0.3" - } - }, - "flat-cache": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", - "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", - "requires": { - "flatted": "^2.0.0", - "rimraf": "2.6.3", - "write": "1.0.3" - }, - "dependencies": { - "rimraf": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", - "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", - "requires": { - "glob": "^7.1.3" - } - } - } - }, - "flatted": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz", - "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==" - }, - "follow-redirects": { - "version": "1.5.10", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz", - "integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==", - "requires": { - "debug": "=3.1.0" - } - }, - "foreach": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", - "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=" - }, - "forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" - }, - "form-data": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - } - }, - "forwarded": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", - "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=" - }, - "fresh": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" - }, - "fs-constants": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", - "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" - }, - "fs-extra": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", - "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", - "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - }, - "fs-minipass": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.7.tgz", - "integrity": "sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==", - "requires": { - "minipass": "^2.6.0" - } - }, - "fs-promise": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/fs-promise/-/fs-promise-2.0.3.tgz", - "integrity": "sha1-9k5PhUvPaJqovdy6JokW2z20aFQ=", - "requires": { - "any-promise": "^1.3.0", - "fs-extra": "^2.0.0", - "mz": "^2.6.0", - "thenify-all": "^1.6.0" - }, - "dependencies": { - "fs-extra": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-2.1.2.tgz", - "integrity": "sha1-BGxwFjzvmq1GsOSn+kZ/si1x3jU=", - "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^2.1.0" - } - }, - "jsonfile": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", - "integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=", - "requires": { - "graceful-fs": "^4.1.6" - } - } - } - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" - }, - "fsevents": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", - "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", - "optional": true - }, - "fstream": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.12.tgz", - "integrity": "sha512-WvJ193OHa0GHPEL+AycEJgxvBEwyfRkN1vhjca23OaPVMCaLCXTd5qAu82AjTcgP1UJmytkOKb63Ypde7raDIg==", - "requires": { - "graceful-fs": "^4.1.2", - "inherits": "~2.0.0", - "mkdirp": ">=0.5 0", - "rimraf": "2" - }, - "dependencies": { - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" - }, - "mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", - "requires": { - "minimist": "^1.2.5" - } - } - } - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" - }, - "function.name": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/function.name/-/function.name-1.0.12.tgz", - "integrity": "sha512-C7Tu+rAFrWW5RjXqtKtXp2xOdCujq+4i8ZH3w0uz/xrYHBwXZrPt96x8cDAEHrIjeyEv/Jm6iDGyqupbaVQTlw==", - "requires": { - "noop6": "^1.0.1" - } - }, - "functional-red-black-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=" - }, - "ganache-cli": { - "version": "6.9.1", - "resolved": "https://registry.npmjs.org/ganache-cli/-/ganache-cli-6.9.1.tgz", - "integrity": "sha512-VPBumkNUZzXDRQwVOby5YyQpd5t1clkr06xMgB28lZdEIn5ht1GMwUskOTFOAxdkQ4J12IWP0gdeacVRGowqbA==", - "requires": { - "ethereumjs-util": "6.1.0", - "source-map-support": "0.5.12", - "yargs": "13.2.4" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "bundled": true - }, - "ansi-styles": { - "version": "3.2.1", - "bundled": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "bindings": { - "version": "1.5.0", - "bundled": true, - "requires": { - "file-uri-to-path": "1.0.0" - } - }, - "bip66": { - "version": "1.1.5", - "bundled": true, - "requires": { - "safe-buffer": "^5.0.1" - } - }, - "bn.js": { - "version": "4.11.8", - "bundled": true - }, - "brorand": { - "version": "1.1.0", - "bundled": true - }, - "browserify-aes": { - "version": "1.2.0", - "bundled": true, - "requires": { - "buffer-xor": "^1.0.3", - "cipher-base": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.3", - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "buffer-from": { - "version": "1.1.1", - "bundled": true - }, - "buffer-xor": { - "version": "1.0.3", - "bundled": true - }, - "camelcase": { - "version": "5.3.1", - "bundled": true - }, - "cipher-base": { - "version": "1.0.4", - "bundled": true, - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "cliui": { - "version": "5.0.0", - "bundled": true, - "requires": { - "string-width": "^3.1.0", - "strip-ansi": "^5.2.0", - "wrap-ansi": "^5.1.0" - } - }, - "color-convert": { - "version": "1.9.3", - "bundled": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "bundled": true - }, - "create-hash": { - "version": "1.2.0", - "bundled": true, - "requires": { - "cipher-base": "^1.0.1", - "inherits": "^2.0.1", - "md5.js": "^1.3.4", - "ripemd160": "^2.0.1", - "sha.js": "^2.4.0" - } - }, - "create-hmac": { - "version": "1.1.7", - "bundled": true, - "requires": { - "cipher-base": "^1.0.3", - "create-hash": "^1.1.0", - "inherits": "^2.0.1", - "ripemd160": "^2.0.0", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - } - }, - "cross-spawn": { - "version": "6.0.5", - "bundled": true, - "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "decamelize": { - "version": "1.2.0", - "bundled": true - }, - "drbg.js": { - "version": "1.0.1", - "bundled": true, - "requires": { - "browserify-aes": "^1.0.6", - "create-hash": "^1.1.2", - "create-hmac": "^1.1.4" - } - }, - "elliptic": { - "version": "6.5.0", - "bundled": true, - "requires": { - "bn.js": "^4.4.0", - "brorand": "^1.0.1", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.0" - } - }, - "emoji-regex": { - "version": "7.0.3", - "bundled": true - }, - "end-of-stream": { - "version": "1.4.1", - "bundled": true, - "requires": { - "once": "^1.4.0" - } - }, - "ethereumjs-util": { - "version": "6.1.0", - "bundled": true, - "requires": { - "bn.js": "^4.11.0", - "create-hash": "^1.1.2", - "ethjs-util": "0.1.6", - "keccak": "^1.0.2", - "rlp": "^2.0.0", - "safe-buffer": "^5.1.1", - "secp256k1": "^3.0.1" - } - }, - "ethjs-util": { - "version": "0.1.6", - "bundled": true, - "requires": { - "is-hex-prefixed": "1.0.0", - "strip-hex-prefix": "1.0.0" - } - }, - "evp_bytestokey": { - "version": "1.0.3", - "bundled": true, - "requires": { - "md5.js": "^1.3.4", - "safe-buffer": "^5.1.1" - } - }, - "execa": { - "version": "1.0.0", - "bundled": true, - "requires": { - "cross-spawn": "^6.0.0", - "get-stream": "^4.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - } - }, - "file-uri-to-path": { - "version": "1.0.0", - "bundled": true - }, - "find-up": { - "version": "3.0.0", - "bundled": true, - "requires": { - "locate-path": "^3.0.0" - } - }, - "get-caller-file": { - "version": "2.0.5", - "bundled": true - }, - "get-stream": { - "version": "4.1.0", - "bundled": true, - "requires": { - "pump": "^3.0.0" - } - }, - "hash-base": { - "version": "3.0.4", - "bundled": true, - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "hash.js": { - "version": "1.1.7", - "bundled": true, - "requires": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" - } - }, - "hmac-drbg": { - "version": "1.0.1", - "bundled": true, - "requires": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "inherits": { - "version": "2.0.4", - "bundled": true - }, - "invert-kv": { - "version": "2.0.0", - "bundled": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "bundled": true - }, - "is-hex-prefixed": { - "version": "1.0.0", - "bundled": true - }, - "is-stream": { - "version": "1.1.0", - "bundled": true - }, - "isexe": { - "version": "2.0.0", - "bundled": true - }, - "keccak": { - "version": "1.4.0", - "bundled": true, - "requires": { - "bindings": "^1.2.1", - "inherits": "^2.0.3", - "nan": "^2.2.1", - "safe-buffer": "^5.1.0" - } - }, - "lcid": { - "version": "2.0.0", - "bundled": true, - "requires": { - "invert-kv": "^2.0.0" - } - }, - "locate-path": { - "version": "3.0.0", - "bundled": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "map-age-cleaner": { - "version": "0.1.3", - "bundled": true, - "requires": { - "p-defer": "^1.0.0" - } - }, - "md5.js": { - "version": "1.3.5", - "bundled": true, - "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "mem": { - "version": "4.3.0", - "bundled": true, - "requires": { - "map-age-cleaner": "^0.1.1", - "mimic-fn": "^2.0.0", - "p-is-promise": "^2.0.0" - } - }, - "mimic-fn": { - "version": "2.1.0", - "bundled": true - }, - "minimalistic-assert": { - "version": "1.0.1", - "bundled": true - }, - "minimalistic-crypto-utils": { - "version": "1.0.1", - "bundled": true - }, - "nan": { - "version": "2.14.0", - "bundled": true - }, - "nice-try": { - "version": "1.0.5", - "bundled": true - }, - "npm-run-path": { - "version": "2.0.2", - "bundled": true, - "requires": { - "path-key": "^2.0.0" - } - }, - "once": { - "version": "1.4.0", - "bundled": true, - "requires": { - "wrappy": "1" - } - }, - "os-locale": { - "version": "3.1.0", - "bundled": true, - "requires": { - "execa": "^1.0.0", - "lcid": "^2.0.0", - "mem": "^4.0.0" - } - }, - "p-defer": { - "version": "1.0.0", - "bundled": true - }, - "p-finally": { - "version": "1.0.0", - "bundled": true - }, - "p-is-promise": { - "version": "2.1.0", - "bundled": true - }, - "p-limit": { - "version": "2.2.0", - "bundled": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "bundled": true, - "requires": { - "p-limit": "^2.0.0" - } - }, - "p-try": { - "version": "2.2.0", - "bundled": true - }, - "path-exists": { - "version": "3.0.0", - "bundled": true - }, - "path-key": { - "version": "2.0.1", - "bundled": true - }, - "pump": { - "version": "3.0.0", - "bundled": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "require-directory": { - "version": "2.1.1", - "bundled": true - }, - "require-main-filename": { - "version": "2.0.0", - "bundled": true - }, - "ripemd160": { - "version": "2.0.2", - "bundled": true, - "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1" - } - }, - "rlp": { - "version": "2.2.3", - "bundled": true, - "requires": { - "bn.js": "^4.11.1", - "safe-buffer": "^5.1.1" - } - }, - "safe-buffer": { - "version": "5.2.0", - "bundled": true - }, - "secp256k1": { - "version": "3.7.1", - "bundled": true, - "requires": { - "bindings": "^1.5.0", - "bip66": "^1.1.5", - "bn.js": "^4.11.8", - "create-hash": "^1.2.0", - "drbg.js": "^1.0.1", - "elliptic": "^6.4.1", - "nan": "^2.14.0", - "safe-buffer": "^5.1.2" - } - }, - "semver": { - "version": "5.7.0", - "bundled": true - }, - "set-blocking": { - "version": "2.0.0", - "bundled": true - }, - "sha.js": { - "version": "2.4.11", - "bundled": true, - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "shebang-command": { - "version": "1.2.0", - "bundled": true, - "requires": { - "shebang-regex": "^1.0.0" - } - }, - "shebang-regex": { - "version": "1.0.0", - "bundled": true - }, - "signal-exit": { - "version": "3.0.2", - "bundled": true - }, - "source-map": { - "version": "0.6.1", - "bundled": true - }, - "source-map-support": { - "version": "0.5.12", - "bundled": true, - "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "string-width": { - "version": "3.1.0", - "bundled": true, - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } - }, - "strip-ansi": { - "version": "5.2.0", - "bundled": true, - "requires": { - "ansi-regex": "^4.1.0" - } - }, - "strip-eof": { - "version": "1.0.0", - "bundled": true - }, - "strip-hex-prefix": { - "version": "1.0.0", - "bundled": true, - "requires": { - "is-hex-prefixed": "1.0.0" - } - }, - "which": { - "version": "1.3.1", - "bundled": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "which-module": { - "version": "2.0.0", - "bundled": true - }, - "wrap-ansi": { - "version": "5.1.0", - "bundled": true, - "requires": { - "ansi-styles": "^3.2.0", - "string-width": "^3.0.0", - "strip-ansi": "^5.0.0" - } - }, - "wrappy": { - "version": "1.0.2", - "bundled": true - }, - "y18n": { - "version": "4.0.0", - "bundled": true - }, - "yargs": { - "version": "13.2.4", - "bundled": true, - "requires": { - "cliui": "^5.0.0", - "find-up": "^3.0.0", - "get-caller-file": "^2.0.1", - "os-locale": "^3.1.0", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^3.0.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^13.1.0" - } - }, - "yargs-parser": { - "version": "13.1.1", - "bundled": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } - } - } - }, - "get-caller-file": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", - "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==" - }, - "get-func-name": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", - "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=" - }, - "get-own-enumerable-property-symbols": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.2.tgz", - "integrity": "sha512-I0UBV/XOz1XkIJHEUDMZAbzCThU/H8DxmSfmdGcKPnVhu2VfFqr34jr9777IyaTYvxjedWhqVIilEDsCdP5G6g==" - }, - "get-params": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/get-params/-/get-params-0.1.2.tgz", - "integrity": "sha1-uuDfq6WIoMYNeDTA2Nwv9g7u8v4=" - }, - "get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", - "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", - "requires": { - "pump": "^3.0.0" - } - }, - "getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", - "requires": { - "assert-plus": "^1.0.0" - } - }, - "ghost-testrpc": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/ghost-testrpc/-/ghost-testrpc-0.0.2.tgz", - "integrity": "sha512-i08dAEgJ2g8z5buJIrCTduwPIhih3DP+hOCTyyryikfV8T0bNvHnGXO67i0DD1H4GBDETTclPy9njZbfluQYrQ==", - "requires": { - "chalk": "^2.4.2", - "node-emoji": "^1.10.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "glob-parent": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", - "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", - "requires": { - "is-glob": "^4.0.1" - } - }, - "global": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/global/-/global-4.3.2.tgz", - "integrity": "sha1-52mJJopsdMOJCLEwWxD8DjlOnQ8=", - "requires": { - "min-document": "^2.19.0", - "process": "~0.5.1" - } - }, - "global-modules": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-2.0.0.tgz", - "integrity": "sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A==", - "requires": { - "global-prefix": "^3.0.0" - } - }, - "global-prefix": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-3.0.0.tgz", - "integrity": "sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg==", - "requires": { - "ini": "^1.3.5", - "kind-of": "^6.0.2", - "which": "^1.3.1" - } - }, - "globals": { - "version": "9.18.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", - "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==" - }, - "globby": { - "version": "10.0.2", - "resolved": "https://registry.npmjs.org/globby/-/globby-10.0.2.tgz", - "integrity": "sha512-7dUi7RvCoT/xast/o/dLN53oqND4yk0nsHkhRgn9w65C4PofCLOoJ39iSOg+qVDdWQPIEj+eszMHQ+aLVwwQSg==", - "requires": { - "@types/glob": "^7.1.1", - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.0.3", - "glob": "^7.1.3", - "ignore": "^5.1.1", - "merge2": "^1.2.3", - "slash": "^3.0.0" - }, - "dependencies": { - "ignore": { - "version": "5.1.8", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", - "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==" - } - } - }, - "got": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/got/-/got-7.1.0.tgz", - "integrity": "sha512-Y5WMo7xKKq1muPsxD+KmrR8DH5auG7fBdDVueZwETwV6VytKyU9OX/ddpq2/1hp1vIPvVb4T81dKQz3BivkNLw==", - "requires": { - "decompress-response": "^3.2.0", - "duplexer3": "^0.1.4", - "get-stream": "^3.0.0", - "is-plain-obj": "^1.1.0", - "is-retry-allowed": "^1.0.0", - "is-stream": "^1.0.0", - "isurl": "^1.0.0-alpha5", - "lowercase-keys": "^1.0.0", - "p-cancelable": "^0.3.0", - "p-timeout": "^1.1.1", - "safe-buffer": "^5.0.1", - "timed-out": "^4.0.0", - "url-parse-lax": "^1.0.0", - "url-to-options": "^1.0.1" - }, - "dependencies": { - "get-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=" - } - } - }, - "graceful-fs": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", - "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==" - }, - "graceful-readlink": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz", - "integrity": "sha1-TK+tdrxi8C+gObL5Tpo906ORpyU=" - }, - "growl": { - "version": "1.10.5", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", - "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==" - }, - "handlebars": { - "version": "4.7.6", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.6.tgz", - "integrity": "sha512-1f2BACcBfiwAfStCKZNrUCgqNZkGsAT7UM3kkYtXuLo0KnaVfjKOyf7PRzB6++aK9STyT1Pd2ZCPe3EGOXleXA==", - "requires": { - "minimist": "^1.2.5", - "neo-async": "^2.6.0", - "source-map": "^0.6.1", - "uglify-js": "^3.1.4", - "wordwrap": "^1.0.0" - }, - "dependencies": { - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" - }, - "wordwrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=" - } - } - }, - "har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" - }, - "har-validator": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz", - "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", - "requires": { - "ajv": "^6.5.5", - "har-schema": "^2.0.0" - } - }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "requires": { - "function-bind": "^1.1.1" - } - }, - "has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" - }, - "has-symbol-support-x": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz", - "integrity": "sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw==" - }, - "has-symbols": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", - "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==" - }, - "has-to-string-tag-x": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz", - "integrity": "sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw==", - "requires": { - "has-symbol-support-x": "^1.4.1" - } - }, - "hash-base": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", - "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", - "requires": { - "inherits": "^2.0.4", - "readable-stream": "^3.6.0", - "safe-buffer": "^5.2.0" - } - }, - "hash.js": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", - "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", - "requires": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" - } - }, - "he": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz", - "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=" - }, - "hmac-drbg": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", - "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", - "requires": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "hosted-git-info": { - "version": "2.8.8", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz", - "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==", - "dev": true - }, - "htmlparser2": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.10.1.tgz", - "integrity": "sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ==", - "requires": { - "domelementtype": "^1.3.1", - "domhandler": "^2.3.0", - "domutils": "^1.5.1", - "entities": "^1.1.1", - "inherits": "^2.0.1", - "readable-stream": "^3.1.1" - } - }, - "http-cache-semantics": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", - "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==" - }, - "http-errors": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", - "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==", - "requires": { - "depd": "~1.1.2", - "inherits": "2.0.3", - "setprototypeof": "1.1.1", - "statuses": ">= 1.5.0 < 2", - "toidentifier": "1.0.0" - }, - "dependencies": { - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" - } - } - }, - "http-https": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/http-https/-/http-https-1.0.0.tgz", - "integrity": "sha1-L5CN1fHbQGjAWM1ubUzjkskTOJs=" - }, - "http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", - "requires": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - } - }, - "human-signals": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz", - "integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==" - }, - "husky": { - "version": "4.2.5", - "resolved": "https://registry.npmjs.org/husky/-/husky-4.2.5.tgz", - "integrity": "sha512-SYZ95AjKcX7goYVZtVZF2i6XiZcHknw50iXvY7b0MiGoj5RwdgRQNEHdb+gPDPCXKlzwrybjFjkL6FOj8uRhZQ==", - "requires": { - "chalk": "^4.0.0", - "ci-info": "^2.0.0", - "compare-versions": "^3.6.0", - "cosmiconfig": "^6.0.0", - "find-versions": "^3.2.0", - "opencollective-postinstall": "^2.0.2", - "pkg-dir": "^4.2.0", - "please-upgrade-node": "^3.2.0", - "slash": "^3.0.0", - "which-pm-runs": "^1.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", - "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", - "requires": { - "@types/color-name": "^1.1.1", - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" - }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "requires": { - "p-locate": "^4.1.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "requires": { - "p-limit": "^2.2.0" - } - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" - }, - "pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", - "requires": { - "find-up": "^4.0.0" - } - }, - "supports-color": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", - "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, - "ice-cap": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/ice-cap/-/ice-cap-0.0.4.tgz", - "integrity": "sha1-im0xq0ysjUtW3k+pRt8zUlYbbhg=", - "requires": { - "cheerio": "0.20.0", - "color-logger": "0.0.3" - }, - "dependencies": { - "cheerio": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-0.20.0.tgz", - "integrity": "sha1-XHEPK6uVZTJyhCugHG6mGzVF7DU=", - "requires": { - "css-select": "~1.2.0", - "dom-serializer": "~0.1.0", - "entities": "~1.1.1", - "htmlparser2": "~3.8.1", - "jsdom": "^7.0.2", - "lodash": "^4.1.0" - } - }, - "color-logger": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/color-logger/-/color-logger-0.0.3.tgz", - "integrity": "sha1-2bIt0dlz4Waxi/MT+fSBu6TfIBg=" - }, - "domhandler": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.3.0.tgz", - "integrity": "sha1-LeWaCCLVAn+r/28DLCsloqir5zg=", - "requires": { - "domelementtype": "1" - } - }, - "htmlparser2": { - "version": "3.8.3", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.8.3.tgz", - "integrity": "sha1-mWwosZFRaovoZQGn15dX5ccMEGg=", - "requires": { - "domelementtype": "1", - "domhandler": "2.3", - "domutils": "1.5", - "entities": "1.0", - "readable-stream": "1.1" - }, - "dependencies": { - "entities": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-1.0.0.tgz", - "integrity": "sha1-sph6o4ITR/zeZCsk/fyeT7cSvyY=" - } - } - }, - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" - }, - "lodash": { - "version": "4.17.19", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", - "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==" - }, - "readable-stream": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" - } - } - }, - "iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "idna-uts46-hx": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/idna-uts46-hx/-/idna-uts46-hx-2.3.1.tgz", - "integrity": "sha512-PWoF9Keq6laYdIRwwCdhTPl60xRqAloYNMQLiyUnG42VjT53oW07BXIRM+NK7eQjzXjAk2gUvX9caRxlnF9TAA==", - "requires": { - "punycode": "2.1.0" - }, - "dependencies": { - "punycode": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.0.tgz", - "integrity": "sha1-X4Y+3Im5bbCQdLrXlHvwkFbKTn0=" - } - } - }, - "ieee754": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz", - "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==" - }, - "ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==" - }, - "import-fresh": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.1.tgz", - "integrity": "sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ==", - "requires": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - } - }, - "imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=" - }, - "indent-string": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", - "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==" - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "ini": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", - "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==" - }, - "inquirer": { - "version": "7.3.2", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.3.2.tgz", - "integrity": "sha512-DF4osh1FM6l0RJc5YWYhSDB6TawiBRlbV9Cox8MWlidU218Tb7fm3lQTULyUJDfJ0tjbzl0W4q651mrCCEM55w==", - "requires": { - "ansi-escapes": "^4.2.1", - "chalk": "^4.1.0", - "cli-cursor": "^3.1.0", - "cli-width": "^3.0.0", - "external-editor": "^3.0.3", - "figures": "^3.0.0", - "lodash": "^4.17.16", - "mute-stream": "0.0.8", - "run-async": "^2.4.0", - "rxjs": "^6.6.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0", - "through": "^2.3.6" - }, - "dependencies": { - "ansi-escapes": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.1.tgz", - "integrity": "sha512-JWF7ocqNrp8u9oqpgV+wH5ftbt+cfvv+PTjOvKLT3AdYly/LmORARfEVT1iyjwN+4MqE5UmVKoAdIBqeoCHgLA==", - "requires": { - "type-fest": "^0.11.0" - } - }, - "ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==" - }, - "ansi-styles": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", - "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", - "requires": { - "@types/color-name": "^1.1.1", - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "cli-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", - "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", - "requires": { - "restore-cursor": "^3.1.0" - } - }, - "cli-width": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz", - "integrity": "sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==" - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" - }, - "figures": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", - "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", - "requires": { - "escape-string-regexp": "^1.0.5" - } - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" - }, - "lodash": { - "version": "4.17.19", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", - "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==" - }, - "mute-stream": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", - "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==" - }, - "onetime": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.0.tgz", - "integrity": "sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q==", - "requires": { - "mimic-fn": "^2.1.0" - } - }, - "restore-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", - "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", - "requires": { - "onetime": "^5.1.0", - "signal-exit": "^3.0.2" - } - }, - "string-width": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", - "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" - } - }, - "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "requires": { - "ansi-regex": "^5.0.0" - } - }, - "supports-color": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", - "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, - "interpret": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", - "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==" - }, - "invariant": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", - "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", - "requires": { - "loose-envify": "^1.0.0" - } - }, - "invert-kv": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", - "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==" - }, - "ip-regex": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-2.1.0.tgz", - "integrity": "sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk=" - }, - "ipaddr.js": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", - "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==" - }, - "is-arguments": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.0.4.tgz", - "integrity": "sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA==" - }, - "is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=" - }, - "is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "requires": { - "binary-extensions": "^2.0.0" - } - }, - "is-buffer": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz", - "integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==" - }, - "is-callable": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.0.tgz", - "integrity": "sha512-pyVD9AaGLxtg6srb2Ng6ynWJqkHU9bEM087AKck0w8QwDarTfNcpIYoU8x8Hv2Icm8u6kFJM18Dag8lyqGkviw==" - }, - "is-date-object": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", - "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==" - }, - "is-directory": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz", - "integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=" - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" - }, - "is-finite": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.1.0.tgz", - "integrity": "sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w==" - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "is-function": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-function/-/is-function-1.0.2.tgz", - "integrity": "sha512-lw7DUp0aWXYg+CBCN+JKkcE0Q2RayZnSvnZBlwgxHBQhqt5pZNVy4Ri7H9GmmXkdu7LUthszM+Tor1u/2iBcpQ==" - }, - "is-glob": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", - "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", - "requires": { - "is-extglob": "^2.1.1" - } - }, - "is-hex-prefixed": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz", - "integrity": "sha1-fY035q135dEnFIkTxXPggtd39VQ=" - }, - "is-map": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.1.tgz", - "integrity": "sha512-T/S49scO8plUiAOA2DBTBG3JHpn1yiw0kRp6dgiZ0v2/6twi5eiB0rHtHFH9ZIrvlWc6+4O+m4zg5+Z833aXgw==" - }, - "is-natural-number": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-natural-number/-/is-natural-number-4.0.1.tgz", - "integrity": "sha1-q5124dtM7VHjXeDHLr7PCfc0zeg=" - }, - "is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" - }, - "is-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", - "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=" - }, - "is-object": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-object/-/is-object-1.0.1.tgz", - "integrity": "sha1-iVJojF7C/9awPsyF52ngKQMINHA=" - }, - "is-plain-obj": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", - "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=" - }, - "is-regex": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.0.tgz", - "integrity": "sha512-iI97M8KTWID2la5uYXlkbSDQIg4F6o1sYboZKKTDpnDQMLtUL86zxhgDet3Q2SriaYsyGqZ6Mn2SjbRKeLHdqw==", - "requires": { - "has-symbols": "^1.0.1" - } - }, - "is-regexp": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-regexp/-/is-regexp-1.0.0.tgz", - "integrity": "sha1-/S2INUXEa6xaYz57mgnof6LLUGk=" - }, - "is-retry-allowed": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz", - "integrity": "sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg==" - }, - "is-set": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.1.tgz", - "integrity": "sha512-eJEzOtVyenDs1TMzSQ3kU3K+E0GUS9sno+F0OBT97xsgcJsF9nXMBtkT9/kut5JEpM7oL7X/0qxR17K3mcwIAA==" - }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" - }, - "is-string": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.5.tgz", - "integrity": "sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ==" - }, - "is-symbol": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", - "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", - "requires": { - "has-symbols": "^1.0.1" - } - }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" - }, - "is-url": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/is-url/-/is-url-1.2.4.tgz", - "integrity": "sha512-ITvGim8FhRiYe4IQ5uHSkj7pVaPDrCTkNd3yq3cV7iZAcJdHTUMPMEHcqSOy9xZ9qFenQCvi+2wjH9a1nXqHww==" - }, - "is2": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is2/-/is2-2.0.1.tgz", - "integrity": "sha512-+WaJvnaA7aJySz2q/8sLjMb2Mw14KTplHmSwcSpZ/fWJPkUmqw3YTzSWbPJ7OAwRvdYTWF2Wg+yYJ1AdP5Z8CA==", - "requires": { - "deep-is": "^0.1.3", - "ip-regex": "^2.1.0", - "is-url": "^1.2.2" - } - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" - }, - "isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" - }, - "istanbul": { - "version": "0.4.5", - "resolved": "https://registry.npmjs.org/istanbul/-/istanbul-0.4.5.tgz", - "integrity": "sha1-ZcfXPUxNqE1POsMQuRj7C4Azczs=", - "requires": { - "abbrev": "1.0.x", - "async": "1.x", - "escodegen": "1.8.x", - "esprima": "2.7.x", - "glob": "^5.0.15", - "handlebars": "^4.0.1", - "js-yaml": "3.x", - "mkdirp": "0.5.x", - "nopt": "3.x", - "once": "1.x", - "resolve": "1.1.x", - "supports-color": "^3.1.0", - "which": "^1.1.1", - "wordwrap": "^1.0.0" - }, - "dependencies": { - "async": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=" - }, - "escodegen": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.8.1.tgz", - "integrity": "sha1-WltTr0aTEQvrsIZ6o0MN07cKEBg=", - "requires": { - "esprima": "^2.7.1", - "estraverse": "^1.9.1", - "esutils": "^2.0.2", - "optionator": "^0.8.1", - "source-map": "~0.2.0" - } - }, - "esprima": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", - "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=" - }, - "estraverse": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz", - "integrity": "sha1-r2fy3JIlgkFZUJJgkaQAXSnJu0Q=" - }, - "glob": { - "version": "5.0.15", - "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", - "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", - "requires": { - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "2 || 3", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "has-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", - "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=" - }, - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" - }, - "mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", - "requires": { - "minimist": "^1.2.5" - } - }, - "source-map": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.2.0.tgz", - "integrity": "sha1-2rc/vPwrqBm03gO9b26qSBZLP50=", - "optional": true, - "requires": { - "amdefine": ">=0.0.4" - } - }, - "supports-color": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", - "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", - "requires": { - "has-flag": "^1.0.0" - } - }, - "wordwrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=" - } - } - }, - "isurl": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isurl/-/isurl-1.0.0.tgz", - "integrity": "sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w==", - "requires": { - "has-to-string-tag-x": "^1.2.0", - "is-object": "^1.0.1" - } - }, - "iterate-iterator": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/iterate-iterator/-/iterate-iterator-1.0.1.tgz", - "integrity": "sha512-3Q6tudGN05kbkDQDI4CqjaBf4qf85w6W6GnuZDtUVYwKgtC1q8yxYX7CZed7N+tLzQqS6roujWvszf13T+n9aw==" - }, - "iterate-value": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/iterate-value/-/iterate-value-1.0.2.tgz", - "integrity": "sha512-A6fMAio4D2ot2r/TYzr4yUWrmwNdsN5xL7+HUiyACE4DXm+q8HtPcnFTp+NnW3k4N05tZ7FVYFFb2CR13NxyHQ==", - "requires": { - "es-get-iterator": "^1.0.2", - "iterate-iterator": "^1.0.1" - } - }, - "jmespath": { - "version": "0.15.0", - "resolved": "https://registry.npmjs.org/jmespath/-/jmespath-0.15.0.tgz", - "integrity": "sha1-o/Iiqarp+Wb10nx5ZRDigJF2Qhc=" - }, - "js-sha3": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz", - "integrity": "sha1-DU/9gALVMzqrr0oj7tL2N0yfKOc=" - }, - "js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" - }, - "js-yaml": { - "version": "3.14.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.0.tgz", - "integrity": "sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A==", - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - }, - "jsan": { - "version": "3.1.13", - "resolved": "https://registry.npmjs.org/jsan/-/jsan-3.1.13.tgz", - "integrity": "sha512-9kGpCsGHifmw6oJet+y8HaCl14y7qgAsxVdV3pCHDySNR3BfDC30zgkssd7x5LRVAT22dnpbe9JdzzmXZnq9/g==" - }, - "jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" - }, - "jsdom": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-7.2.2.tgz", - "integrity": "sha1-QLQCdwwr2iNGkJa+6Rq2deOx/G4=", - "optional": true, - "requires": { - "abab": "^1.0.0", - "acorn": "^2.4.0", - "acorn-globals": "^1.0.4", - "cssom": ">= 0.3.0 < 0.4.0", - "cssstyle": ">= 0.2.29 < 0.3.0", - "escodegen": "^1.6.1", - "nwmatcher": ">= 1.3.7 < 2.0.0", - "parse5": "^1.5.1", - "request": "^2.55.0", - "sax": "^1.1.4", - "symbol-tree": ">= 3.1.0 < 4.0.0", - "tough-cookie": "^2.2.0", - "webidl-conversions": "^2.0.0", - "whatwg-url-compat": "~0.6.5", - "xml-name-validator": ">= 2.0.1 < 3.0.0" - }, - "dependencies": { - "parse5": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-1.5.1.tgz", - "integrity": "sha1-m387DeMr543CQBsXVzzK8Pb1nZQ=", - "optional": true - } - } - }, - "jsesc": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", - "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=" - }, - "json-buffer": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", - "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=" - }, - "json-parse-better-errors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", - "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==" - }, - "json-pointer": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/json-pointer/-/json-pointer-0.6.0.tgz", - "integrity": "sha1-jlAFUKaqxUZKRzN32leqbMIoKNc=", - "requires": { - "foreach": "^2.0.4" - } - }, - "json-schema": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" - }, - "json-stable-stringify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", - "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", - "requires": { - "jsonify": "~0.0.0" - } - }, - "json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=" - }, - "json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" - }, - "json5": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", - "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", - "dev": true, - "requires": { - "minimist": "^1.2.0" - }, - "dependencies": { - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", - "dev": true - } - } - }, - "jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", - "requires": { - "graceful-fs": "^4.1.6" - } - }, - "jsonify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", - "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=" - }, - "jsonschema": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/jsonschema/-/jsonschema-1.2.6.tgz", - "integrity": "sha512-SqhURKZG07JyKKeo/ir24QnS4/BV7a6gQy93bUSe4lUdNp0QNpIz2c9elWJQ9dpc5cQYY6cvCzgRwy0MQCLyqA==" - }, - "jsprim": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", - "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", - "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.2.3", - "verror": "1.10.0" - } - }, - "keccak": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/keccak/-/keccak-3.0.1.tgz", - "integrity": "sha512-epq90L9jlFWCW7+pQa6JOnKn2Xgl2mtI664seYR6MHskvI9agt7AnDqmAlp9TqU4/caMYbA08Hi5DMZAl5zdkA==", - "requires": { - "node-addon-api": "^2.0.0", - "node-gyp-build": "^4.2.0" - } - }, - "keccakjs": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/keccakjs/-/keccakjs-0.2.3.tgz", - "integrity": "sha512-BjLkNDcfaZ6l8HBG9tH0tpmDv3sS2mA7FNQxFHpCdzP3Gb2MVruXBSuoM66SnVxKJpAr5dKGdkHD+bDokt8fTg==", - "requires": { - "browserify-sha3": "^0.0.4", - "sha3": "^1.2.2" - } - }, - "keyv": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz", - "integrity": "sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==", - "requires": { - "json-buffer": "3.0.0" - } - }, - "kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==" - }, - "klaw": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz", - "integrity": "sha1-QIhDO0azsbolnXh4XY6W9zugJDk=", - "requires": { - "graceful-fs": "^4.1.9" - } - }, - "lcid": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", - "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", - "requires": { - "invert-kv": "^2.0.0" - } - }, - "levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", - "requires": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" - } - }, - "lines-and-columns": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz", - "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=" - }, - "linked-list": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/linked-list/-/linked-list-0.1.0.tgz", - "integrity": "sha1-eYsP+X0bkqT9CEgPVa6k6dSdN78=" - }, - "lint-staged": { - "version": "10.2.11", - "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-10.2.11.tgz", - "integrity": "sha512-LRRrSogzbixYaZItE2APaS4l2eJMjjf5MbclRZpLJtcQJShcvUzKXsNeZgsLIZ0H0+fg2tL4B59fU9wHIHtFIA==", - "requires": { - "chalk": "^4.0.0", - "cli-truncate": "2.1.0", - "commander": "^5.1.0", - "cosmiconfig": "^6.0.0", - "debug": "^4.1.1", - "dedent": "^0.7.0", - "enquirer": "^2.3.5", - "execa": "^4.0.1", - "listr2": "^2.1.0", - "log-symbols": "^4.0.0", - "micromatch": "^4.0.2", - "normalize-path": "^3.0.0", - "please-upgrade-node": "^3.2.0", - "string-argv": "0.3.1", - "stringify-object": "^3.3.0" - }, - "dependencies": { - "ansi-styles": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", - "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", - "requires": { - "@types/color-name": "^1.1.1", - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, - "commander": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz", - "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==" - }, - "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "requires": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - } - }, - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "requires": { - "ms": "^2.1.1" - } - }, - "execa": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/execa/-/execa-4.0.3.tgz", - "integrity": "sha512-WFDXGHckXPWZX19t1kCsXzOpqX9LWYNqn4C+HqZlk/V0imTkzJZqf87ZBhvpHaftERYknpk0fjSylnXVlVgI0A==", - "requires": { - "cross-spawn": "^7.0.0", - "get-stream": "^5.0.0", - "human-signals": "^1.1.1", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.0", - "onetime": "^5.1.0", - "signal-exit": "^3.0.2", - "strip-final-newline": "^2.0.0" - } - }, - "get-stream": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.1.0.tgz", - "integrity": "sha512-EXr1FOzrzTfGeL0gQdeFEvOMm2mzMOglyiOXSTpPC+iAjAKftbr3jpCMWynogwYnM+eSj9sHGc6wjIcDvYiygw==", - "requires": { - "pump": "^3.0.0" - } - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" - }, - "is-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", - "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==" - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - }, - "npm-run-path": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", - "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", - "requires": { - "path-key": "^3.0.0" - } - }, - "onetime": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.0.tgz", - "integrity": "sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q==", - "requires": { - "mimic-fn": "^2.1.0" - } - }, - "path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==" - }, - "shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "requires": { - "shebang-regex": "^3.0.0" - } - }, - "shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==" - }, - "supports-color": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", - "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", - "requires": { - "has-flag": "^4.0.0" - } - }, - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "requires": { - "isexe": "^2.0.0" - } - } - } - }, - "listr2": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/listr2/-/listr2-2.2.1.tgz", - "integrity": "sha512-WhuhT7xpVi2otpY/OzJJ8DQhf6da8MjGiEhMdA9oQquwtsSfzZt+YKlasUBer717Uocd0oPmbPeiTD7MvGzctw==", - "requires": { - "chalk": "^4.0.0", - "cli-truncate": "^2.1.0", - "figures": "^3.2.0", - "indent-string": "^4.0.0", - "log-update": "^4.0.0", - "p-map": "^4.0.0", - "rxjs": "^6.5.5", - "through": "^2.3.8" - }, - "dependencies": { - "ansi-styles": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", - "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", - "requires": { - "@types/color-name": "^1.1.1", - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, - "figures": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", - "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", - "requires": { - "escape-string-regexp": "^1.0.5" - } - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" - }, - "supports-color": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", - "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, - "load-json-file": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", - "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "strip-bom": "^3.0.0" - }, - "dependencies": { - "parse-json": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", - "dev": true, - "requires": { - "error-ex": "^1.2.0" - } - } - } - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "lodash": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz", - "integrity": "sha1-W/Rejkm6QYnhfUgnid/RW9FAt7Y=" - }, - "lodash-es": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.15.tgz", - "integrity": "sha512-rlrc3yU3+JNOpZ9zj5pQtxnx2THmvRykwL4Xlxoa8I9lHBlVbbyPhgyPMioxVZ4NqyxaVVtaJnzsyOidQIhyyQ==" - }, - "lodash.clonedeep": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", - "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=" - }, - "lodash.isequal": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", - "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=" - }, - "lodash.merge": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==" - }, - "lodash.range": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/lodash.range/-/lodash.range-3.2.0.tgz", - "integrity": "sha1-9GHliPZmg/fq3q3lE+OKaaVloV0=" - }, - "lodash.snakecase": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz", - "integrity": "sha1-OdcUo1NXFHg3rv1ktdy7Fr7Nj40=" - }, - "lodash.toarray": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.toarray/-/lodash.toarray-4.4.0.tgz", - "integrity": "sha1-JMS/zWsvuji/0FlNsRedjptlZWE=" - }, - "log-symbols": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.0.0.tgz", - "integrity": "sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA==", - "requires": { - "chalk": "^4.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", - "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", - "requires": { - "@types/color-name": "^1.1.1", - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" - }, - "supports-color": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", - "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, - "log-update": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/log-update/-/log-update-4.0.0.tgz", - "integrity": "sha512-9fkkDevMefjg0mmzWFBW8YkFP91OrizzkW3diF7CpG+S2EYdy4+TVfGwz1zeF8x7hCx1ovSPTOE9Ngib74qqUg==", - "requires": { - "ansi-escapes": "^4.3.0", - "cli-cursor": "^3.1.0", - "slice-ansi": "^4.0.0", - "wrap-ansi": "^6.2.0" - }, - "dependencies": { - "ansi-escapes": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.1.tgz", - "integrity": "sha512-JWF7ocqNrp8u9oqpgV+wH5ftbt+cfvv+PTjOvKLT3AdYly/LmORARfEVT1iyjwN+4MqE5UmVKoAdIBqeoCHgLA==", - "requires": { - "type-fest": "^0.11.0" - } - }, - "ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==" - }, - "ansi-styles": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", - "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", - "requires": { - "@types/color-name": "^1.1.1", - "color-convert": "^2.0.1" - } - }, - "astral-regex": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", - "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==" - }, - "cli-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", - "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", - "requires": { - "restore-cursor": "^3.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" - }, - "onetime": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.0.tgz", - "integrity": "sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q==", - "requires": { - "mimic-fn": "^2.1.0" - } - }, - "restore-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", - "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", - "requires": { - "onetime": "^5.1.0", - "signal-exit": "^3.0.2" - } - }, - "slice-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", - "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", - "requires": { - "ansi-styles": "^4.0.0", - "astral-regex": "^2.0.0", - "is-fullwidth-code-point": "^3.0.0" - } - }, - "string-width": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", - "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" - } - }, - "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "requires": { - "ansi-regex": "^5.0.0" - } - }, - "wrap-ansi": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", - "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", - "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - } - } - } - }, - "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==", - "requires": { - "js-tokens": "^3.0.0 || ^4.0.0" - } - }, - "lowercase-keys": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", - "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==" - }, - "lru-cache": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", - "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", - "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - }, - "dependencies": { - "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=" - } - } - }, - "make-dir": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", - "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", - "requires": { - "pify": "^3.0.0" - }, - "dependencies": { - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" - } - } - }, - "map-age-cleaner": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz", - "integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==", - "requires": { - "p-defer": "^1.0.0" - } - }, - "marked": { - "version": "0.3.19", - "resolved": "https://registry.npmjs.org/marked/-/marked-0.3.19.tgz", - "integrity": "sha512-ea2eGWOqNxPcXv8dyERdSr/6FmzvWwzjMxpfGB/sbMccXoct+xY+YukPD+QTUZwyvK7BZwcr4m21WBOW41pAkg==" - }, - "md5.js": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", - "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", - "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "media-typer": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" - }, - "mem": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz", - "integrity": "sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==", - "requires": { - "map-age-cleaner": "^0.1.1", - "mimic-fn": "^2.0.0", - "p-is-promise": "^2.0.0" - } - }, - "memorystream": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", - "integrity": "sha1-htcJCzDORV1j+64S3aUaR93K+bI=" - }, - "merge-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" - }, - "merge-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==" - }, - "merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==" - }, - "methods": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" - }, - "micromatch": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz", - "integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==", - "requires": { - "braces": "^3.0.1", - "picomatch": "^2.0.5" - } - }, - "miller-rabin": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", - "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", - "requires": { - "bn.js": "^4.0.0", - "brorand": "^1.0.1" - }, - "dependencies": { - "bn.js": { - "version": "4.11.9", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" - } - } - }, - "mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" - }, - "mime-db": { - "version": "1.44.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz", - "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==" - }, - "mime-types": { - "version": "2.1.27", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz", - "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==", - "requires": { - "mime-db": "1.44.0" - } - }, - "mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==" - }, - "mimic-response": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", - "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==" - }, - "min-document": { - "version": "2.19.0", - "resolved": "https://registry.npmjs.org/min-document/-/min-document-2.19.0.tgz", - "integrity": "sha1-e9KC4/WELtKVu3SM3Z8f+iyCRoU=", - "requires": { - "dom-walk": "^0.1.0" - } - }, - "minimalistic-assert": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", - "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" - }, - "minimalistic-crypto-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=" - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "0.0.10", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", - "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=" - }, - "minipass": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz", - "integrity": "sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==", - "requires": { - "safe-buffer": "^5.1.2", - "yallist": "^3.0.0" - } - }, - "minizlib": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.3.3.tgz", - "integrity": "sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q==", - "requires": { - "minipass": "^2.9.0" - } - }, - "mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==" - }, - "mkdirp-promise": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/mkdirp-promise/-/mkdirp-promise-5.0.1.tgz", - "integrity": "sha1-6bj2jlUsaKnBcTuEiD96HdA5uKE=", - "requires": { - "mkdirp": "*" - } - }, - "mocha": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-5.2.0.tgz", - "integrity": "sha512-2IUgKDhc3J7Uug+FxMXuqIyYzH7gJjXECKe/w43IGgQHTSj3InJi+yAA7T24L9bQMRKiUEHxEX37G5JpVUGLcQ==", - "requires": { - "browser-stdout": "1.3.1", - "commander": "2.15.1", - "debug": "3.1.0", - "diff": "3.5.0", - "escape-string-regexp": "1.0.5", - "glob": "7.1.2", - "growl": "1.10.5", - "he": "1.1.1", - "minimatch": "3.0.4", - "mkdirp": "0.5.1", - "supports-color": "5.4.0" - }, - "dependencies": { - "commander": { - "version": "2.15.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz", - "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==" - }, - "glob": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" - }, - "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "requires": { - "minimist": "0.0.8" - } - }, - "supports-color": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", - "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "mock-fs": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/mock-fs/-/mock-fs-4.12.0.tgz", - "integrity": "sha512-/P/HtrlvBxY4o/PzXY9cCNBrdylDNxg7gnrv2sMNxj+UJ2m8jSpl0/A6fuJeNAWr99ZvGWH8XCbE0vmnM5KupQ==" - }, - "mout": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/mout/-/mout-0.11.1.tgz", - "integrity": "sha1-ujYR318OWx/7/QEWa48C0fX6K5k=" - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - }, - "mute-stream": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", - "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=" - }, - "mz": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", - "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", - "requires": { - "any-promise": "^1.0.0", - "object-assign": "^4.0.1", - "thenify-all": "^1.0.0" - } - }, - "nan": { - "version": "2.13.2", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.13.2.tgz", - "integrity": "sha512-TghvYc72wlMGMVMluVo9WRJc0mB8KxxF/gZ4YYFy7V2ZQX9l7rgbPg7vjS9mt6U5HXODVFVI2bOduCzwOMv/lw==" - }, - "nano-json-stream-parser": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/nano-json-stream-parser/-/nano-json-stream-parser-0.1.2.tgz", - "integrity": "sha1-DMj20OK2IrR5xA1JnEbWS3Vcb18=" - }, - "nanoid": { - "version": "2.1.11", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-2.1.11.tgz", - "integrity": "sha512-s/snB+WGm6uwi0WjsZdaVcuf3KJXlfGl2LcxgwkEwJF0D/BWzVWAZW/XY4bFaiR7s0Jk3FPvlnepg1H1b1UwlA==" - }, - "natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=" - }, - "negotiator": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", - "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==" - }, - "neo-async": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", - "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==" - }, - "next-tick": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", - "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=" - }, - "nice-try": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", - "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==" - }, - "node-addon-api": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-2.0.2.tgz", - "integrity": "sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==" - }, - "node-emoji": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/node-emoji/-/node-emoji-1.10.0.tgz", - "integrity": "sha512-Yt3384If5H6BYGVHiHwTL+99OzJKHhgp82S8/dktEK73T26BazdgZ4JZh92xSVtGNJvz9UbXdNAc5hcrXV42vw==", - "requires": { - "lodash.toarray": "^4.4.0" - } - }, - "node-fetch": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", - "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==" - }, - "node-gyp-build": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.2.3.tgz", - "integrity": "sha512-MN6ZpzmfNCRM+3t57PTJHgHyw/h4OWnZ6mR8P5j/uZtqQr46RRuDE/P+g3n0YR/AiYXeWixZZzaip77gdICfRg==" - }, - "node-interval-tree": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/node-interval-tree/-/node-interval-tree-1.3.3.tgz", - "integrity": "sha512-K9vk96HdTK5fEipJwxSvIIqwTqr4e3HRJeJrNxBSeVMNSC/JWARRaX7etOLOuTmrRMeOI/K5TCJu3aWIwZiNTw==", - "requires": { - "shallowequal": "^1.0.2" - } - }, - "nodeify-ts": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/nodeify-ts/-/nodeify-ts-1.0.6.tgz", - "integrity": "sha512-jq+8sqVG1aLqy5maMTceL8NUJ1CvarWztlxvrYh3G0aao9BsVeoVmVedUnrUSBLetP7oLIAJrPrw4+iIo7v3GA==" - }, - "noop6": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/noop6/-/noop6-1.0.8.tgz", - "integrity": "sha512-+Al5csMVc40I8xRfJsyBcN1IbpyvebOuQmMfxdw+AL6ECELey12ANgNTRhMfTwNIDU4W9W0g8EHLcsb3+3qPFA==" - }, - "nopt": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", - "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", - "requires": { - "abbrev": "1" - } - }, - "normalize-package-data": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", - "dev": true, - "requires": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - }, - "dependencies": { - "resolve": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", - "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", - "dev": true, - "requires": { - "path-parse": "^1.0.6" - } - }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - } - } - }, - "normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" - }, - "normalize-url": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.0.tgz", - "integrity": "sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ==" - }, - "npm-run-path": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", - "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", - "requires": { - "path-key": "^2.0.0" - } - }, - "nth-check": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.2.tgz", - "integrity": "sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg==", - "requires": { - "boolbase": "~1.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" - }, - "number-to-bn": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/number-to-bn/-/number-to-bn-1.7.0.tgz", - "integrity": "sha1-uzYjWS9+X54AMLGXe9QaDFP+HqA=", - "requires": { - "bn.js": "4.11.6", - "strip-hex-prefix": "1.0.0" - }, - "dependencies": { - "bn.js": { - "version": "4.11.6", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", - "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=" - } - } - }, - "nwmatcher": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/nwmatcher/-/nwmatcher-1.4.4.tgz", - "integrity": "sha512-3iuY4N5dhgMpCUrOVnuAdGrgxVqV2cJpM+XNccjR2DKOB1RUP0aA+wGXEiNziG/UKboFyGBIoKOaNlJxx8bciQ==", - "optional": true - }, - "oauth-sign": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", - "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==" - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" - }, - "object-inspect": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.8.0.tgz", - "integrity": "sha512-jLdtEOB112fORuypAyl/50VRVIBIdVQOSUUGQHzJ4xBSbit81zRarz7GThkEFZy1RceYrWYcPcBFPQwHyAc1gA==" - }, - "object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==" - }, - "object.assign": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", - "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", - "requires": { - "define-properties": "^1.1.2", - "function-bind": "^1.1.1", - "has-symbols": "^1.0.0", - "object-keys": "^1.0.11" - } - }, - "object.entries": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.2.tgz", - "integrity": "sha512-BQdB9qKmb/HyNdMNWVr7O3+z5MUIx3aiegEIJqjMBbBf0YT9RRxTJSim4mzFqtyr7PDAHigq0N9dO0m0tRakQA==", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.5", - "has": "^1.0.3" - } - }, - "object.values": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.1.tgz", - "integrity": "sha512-WTa54g2K8iu0kmS/us18jEmdv1a4Wi//BZ/DTVYEcH0XhLM5NYdpDHja3gt57VrZLcNAO2WGA+KpWsDBaHt6eA==", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1", - "function-bind": "^1.1.1", - "has": "^1.0.3" - } - }, - "oboe": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/oboe/-/oboe-2.1.3.tgz", - "integrity": "sha1-K0hl29Rr6BIlcT9Om/5Lz09oCk8=", - "requires": { - "http-https": "^1.0.0" - } - }, - "on-finished": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", - "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", - "requires": { - "ee-first": "1.1.1" - } - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "requires": { - "wrappy": "1" - } - }, - "onetime": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", - "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", - "requires": { - "mimic-fn": "^1.0.0" - }, - "dependencies": { - "mimic-fn": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", - "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==" - } - } - }, - "opencollective-postinstall": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/opencollective-postinstall/-/opencollective-postinstall-2.0.3.tgz", - "integrity": "sha512-8AV/sCtuzUeTo8gQK5qDZzARrulB3egtLzFgteqB2tcT4Mw7B8Kt7JcDHmltjz6FOAHsvTevk70gZEbhM4ZS9Q==" - }, - "openzeppelin-solidity": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/openzeppelin-solidity/-/openzeppelin-solidity-2.3.0.tgz", - "integrity": "sha512-QYeiPLvB1oSbDt6lDQvvpx7k8ODczvE474hb2kLXZBPKMsxKT1WxTCHBYrCU7kS7hfAku4DcJ0jqOyL+jvjwQw==" - }, - "optimist": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", - "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", - "requires": { - "minimist": "~0.0.1", - "wordwrap": "~0.0.2" - } - }, - "optionator": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", - "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", - "requires": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.6", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "word-wrap": "~1.2.3" - } - }, - "original-require": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/original-require/-/original-require-1.0.1.tgz", - "integrity": "sha1-DxMEcVhM0zURxew4yNWSE/msXiA=" - }, - "os-locale": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", - "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", - "requires": { - "execa": "^1.0.0", - "lcid": "^2.0.0", - "mem": "^4.0.0" - } - }, - "os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" - }, - "p-cancelable": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.3.0.tgz", - "integrity": "sha512-RVbZPLso8+jFeq1MfNvgXtCRED2raz/dKpacfTNxsx6pLEpEomM7gah6VeHSYV3+vo0OAi4MkArtQcWWXuQoyw==" - }, - "p-defer": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz", - "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=" - }, - "p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=" - }, - "p-is-promise": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-2.1.0.tgz", - "integrity": "sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg==" - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "requires": { - "p-limit": "^2.0.0" - } - }, - "p-map": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", - "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", - "requires": { - "aggregate-error": "^3.0.0" - } - }, - "p-timeout": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-1.2.1.tgz", - "integrity": "sha1-XrOzU7f86Z8QGhA4iAuwVOu+o4Y=", - "requires": { - "p-finally": "^1.0.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" - }, - "parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "requires": { - "callsites": "^3.0.0" - } - }, - "parse-asn1": { - "version": "5.1.5", - "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.5.tgz", - "integrity": "sha512-jkMYn1dcJqF6d5CpU689bq7w/b5ALS9ROVSpQDPrZsqqesUJii9qutvoT5ltGedNXMO2e16YUWIghG9KxaViTQ==", - "requires": { - "asn1.js": "^4.0.0", - "browserify-aes": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.0", - "pbkdf2": "^3.0.3", - "safe-buffer": "^5.1.1" - } - }, - "parse-headers": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/parse-headers/-/parse-headers-2.0.3.tgz", - "integrity": "sha512-QhhZ+DCCit2Coi2vmAKbq5RGTRcQUOE2+REgv8vdyu7MnYx2eZztegqtTx99TZ86GTIwqiy3+4nQTWZ2tgmdCA==" - }, - "parse-json": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.0.0.tgz", - "integrity": "sha512-OOY5b7PAEFV0E2Fir1KOkxchnZNCdowAJgQ5NuxjpBKTRP3pQhwkrkxqQjeoKJ+fO7bCpmIZaogI4eZGDMEGOw==", - "requires": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1", - "lines-and-columns": "^1.1.6" - } - }, - "parse5": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-3.0.3.tgz", - "integrity": "sha512-rgO9Zg5LLLkfJF9E6CCmXlSE4UVceloys8JrFqCcHloC3usd/kJCyPDwH2SOlzix2j3xaP9sUX3e8+kvkuleAA==", - "requires": { - "@types/node": "*" - } - }, - "parseurl": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", - "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" - }, - "path-is-inside": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", - "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=" - }, - "path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=" - }, - "path-parse": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", - "dev": true - }, - "path-to-regexp": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" - }, - "path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==" - }, - "pathval": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.0.tgz", - "integrity": "sha1-uULm1L3mUwBe9rcTYd74cn0GReA=" - }, - "pbkdf2": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.1.tgz", - "integrity": "sha512-4Ejy1OPxi9f2tt1rRV7Go7zmfDQ+ZectEQz3VGUQhgq62HtIRPDyG/JtnwIxs6x3uNMwo2V7q1fMvKjb+Tnpqg==", - "requires": { - "create-hash": "^1.1.2", - "create-hmac": "^1.1.4", - "ripemd160": "^2.0.1", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - } - }, - "pend": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", - "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA=" - }, - "performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" - }, - "picomatch": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", - "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==" - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" - }, - "pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=" - }, - "pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", - "requires": { - "pinkie": "^2.0.0" - } - }, - "pkg-dir": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", - "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", - "requires": { - "find-up": "^3.0.0" - } - }, - "please-upgrade-node": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/please-upgrade-node/-/please-upgrade-node-3.2.0.tgz", - "integrity": "sha512-gQR3WpIgNIKwBMVLkpMUeR3e1/E1y42bqDQZfql+kDeXd8COYfM8PQA4X6y7a8u9Ua9FHmsrrmirW2vHs45hWg==", - "requires": { - "semver-compare": "^1.0.0" - } - }, - "prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=" - }, - "prepend-http": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", - "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=" - }, - "prettier": { - "version": "1.19.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.19.1.tgz", - "integrity": "sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==", - "optional": true - }, - "process": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/process/-/process-0.5.2.tgz", - "integrity": "sha1-FjjYqONML0QKkduVq5rrZ3/Bhc8=" - }, - "process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" - }, - "progress": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==" - }, - "promise.allsettled": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/promise.allsettled/-/promise.allsettled-1.0.2.tgz", - "integrity": "sha512-UpcYW5S1RaNKT6pd+s9jp9K9rlQge1UXKskec0j6Mmuq7UJCvlS2J2/s/yuPN8ehftf9HXMxWlKiPbGGUzpoRg==", - "requires": { - "array.prototype.map": "^1.0.1", - "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1", - "function-bind": "^1.1.1", - "iterate-value": "^1.0.0" - } - }, - "proxy-addr": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.6.tgz", - "integrity": "sha512-dh/frvCBVmSsDYzw6n926jv974gddhkFPfiN8hPOi30Wax25QZyZEGveluCgliBnqmuM+UJmBErbAUFIoDbjOw==", - "requires": { - "forwarded": "~0.1.2", - "ipaddr.js": "1.9.1" - } - }, - "pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" - }, - "psl": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", - "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==" - }, - "public-encrypt": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", - "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", - "requires": { - "bn.js": "^4.1.0", - "browserify-rsa": "^4.0.0", - "create-hash": "^1.1.0", - "parse-asn1": "^5.0.0", - "randombytes": "^2.0.1", - "safe-buffer": "^5.1.2" - }, - "dependencies": { - "bn.js": { - "version": "4.11.9", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" - } - } - }, - "pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" - }, - "qs": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", - "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" - }, - "query-string": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/query-string/-/query-string-5.1.1.tgz", - "integrity": "sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==", - "requires": { - "decode-uri-component": "^0.2.0", - "object-assign": "^4.1.0", - "strict-uri-encode": "^1.0.0" - } - }, - "querystring": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", - "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=" - }, - "randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "requires": { - "safe-buffer": "^5.1.0" - } - }, - "randomfill": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", - "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", - "requires": { - "randombytes": "^2.0.5", - "safe-buffer": "^5.1.0" - } - }, - "randomhex": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/randomhex/-/randomhex-0.1.5.tgz", - "integrity": "sha1-us7vmCMpCRQA8qKRLGzQLxCU9YU=" - }, - "range-parser": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", - "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==" - }, - "raw-body": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz", - "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==", - "requires": { - "bytes": "3.1.0", - "http-errors": "1.7.2", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" - } - }, - "read-pkg": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", - "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", - "dev": true, - "requires": { - "load-json-file": "^2.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^2.0.0" - }, - "dependencies": { - "path-type": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", - "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", - "dev": true, + "bundled": true + }, + "minimalistic-assert": { + "version": "1.0.1", + "bundled": true + }, + "minimalistic-crypto-utils": { + "version": "1.0.1", + "bundled": true + }, + "nice-try": { + "version": "1.0.5", + "bundled": true + }, + "node-addon-api": { + "version": "2.0.2", + "bundled": true + }, + "node-gyp-build": { + "version": "4.2.3", + "bundled": true + }, + "npm-run-path": { + "version": "2.0.2", + "bundled": true, "requires": { - "pify": "^2.0.0" + "path-key": "^2.0.0" } - } - } - }, - "read-pkg-up": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", - "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", - "dev": true, - "requires": { - "find-up": "^2.0.0", - "read-pkg": "^2.0.0" - }, - "dependencies": { - "find-up": { + }, + "once": { + "version": "1.4.0", + "bundled": true, + "requires": { + "wrappy": "1" + } + }, + "os-locale": { + "version": "3.1.0", + "bundled": true, + "requires": { + "execa": "^1.0.0", + "lcid": "^2.0.0", + "mem": "^4.0.0" + } + }, + "p-defer": { + "version": "1.0.0", + "bundled": true + }, + "p-finally": { + "version": "1.0.0", + "bundled": true + }, + "p-is-promise": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, + "bundled": true + }, + "p-limit": { + "version": "2.3.0", + "bundled": true, "requires": { - "locate-path": "^2.0.0" + "p-try": "^2.0.0" } }, - "locate-path": { + "p-locate": { + "version": "3.0.0", + "bundled": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "p-try": { + "version": "2.2.0", + "bundled": true + }, + "path-exists": { + "version": "3.0.0", + "bundled": true + }, + "path-key": { + "version": "2.0.1", + "bundled": true + }, + "pbkdf2": { + "version": "3.1.1", + "bundled": true, + "requires": { + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4", + "ripemd160": "^2.0.1", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "pump": { + "version": "3.0.0", + "bundled": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "randombytes": { + "version": "2.1.0", + "bundled": true, + "requires": { + "safe-buffer": "^5.1.0" + } + }, + "readable-stream": { + "version": "3.6.0", + "bundled": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, + "require-directory": { + "version": "2.1.1", + "bundled": true + }, + "require-main-filename": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "dev": true, + "bundled": true + }, + "ripemd160": { + "version": "2.0.2", + "bundled": true, "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" + "hash-base": "^3.0.0", + "inherits": "^2.0.1" } }, - "p-limit": { + "rlp": { + "version": "2.2.6", + "bundled": true, + "requires": { + "bn.js": "^4.11.1" + } + }, + "safe-buffer": { + "version": "5.2.1", + "bundled": true + }, + "scrypt-js": { + "version": "3.0.1", + "bundled": true + }, + "secp256k1": { + "version": "4.0.2", + "bundled": true, + "requires": { + "elliptic": "^6.5.2", + "node-addon-api": "^2.0.0", + "node-gyp-build": "^4.2.0" + } + }, + "semver": { + "version": "5.7.1", + "bundled": true + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true + }, + "setimmediate": { + "version": "1.0.5", + "bundled": true + }, + "sha.js": { + "version": "2.4.11", + "bundled": true, + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "shebang-command": { + "version": "1.2.0", + "bundled": true, + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "bundled": true + }, + "signal-exit": { + "version": "3.0.3", + "bundled": true + }, + "source-map": { + "version": "0.6.1", + "bundled": true + }, + "source-map-support": { + "version": "0.5.12", + "bundled": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "string-width": { + "version": "3.1.0", + "bundled": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "string_decoder": { "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "dev": true, + "bundled": true, "requires": { - "p-try": "^1.0.0" + "safe-buffer": "~5.2.0" } }, - "p-locate": { + "strip-ansi": { + "version": "5.2.0", + "bundled": true, + "requires": { + "ansi-regex": "^4.1.0" + } + }, + "strip-eof": { + "version": "1.0.0", + "bundled": true + }, + "strip-hex-prefix": { + "version": "1.0.0", + "bundled": true, + "requires": { + "is-hex-prefixed": "1.0.0" + } + }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true + }, + "which": { + "version": "1.3.1", + "bundled": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "which-module": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", - "dev": true, + "bundled": true + }, + "wrap-ansi": { + "version": "5.1.0", + "bundled": true, "requires": { - "p-limit": "^1.1.0" + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" } }, - "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", - "dev": true - } - } - }, - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - }, - "readdirp": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.3.0.tgz", - "integrity": "sha512-zz0pAkSPOXXm1viEwygWIPSPkcBYjW1xU5j/JBh5t9bGCJwa6f9+BJa6VaB2g+b55yVrmXzqkyLf4xaWYM0IkQ==", - "requires": { - "picomatch": "^2.0.7" - } - }, - "rechoir": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", - "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", - "requires": { - "resolve": "^1.1.6" - } - }, - "recursive-readdir": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/recursive-readdir/-/recursive-readdir-2.2.2.tgz", - "integrity": "sha512-nRCcW9Sj7NuZwa2XvH9co8NPeXUBhZP7CRKJtU+cS6PW9FpCIFoI5ib0NT1ZrbNuPoRy0ylyCaUL8Gih4LSyFg==", - "requires": { - "minimatch": "3.0.4" - } - }, - "redux": { - "version": "3.7.2", - "resolved": "https://registry.npmjs.org/redux/-/redux-3.7.2.tgz", - "integrity": "sha512-pNqnf9q1hI5HHZRBkj3bAngGZW/JMCmexDlOxw4XagXY2o1327nHH54LoTjiPJ0gizoqPDRqWyX/00g0hD6w+A==", - "requires": { - "lodash": "^4.2.1", - "lodash-es": "^4.2.1", - "loose-envify": "^1.1.0", - "symbol-observable": "^1.0.3" - }, - "dependencies": { - "lodash": { - "version": "4.17.19", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", - "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==" - } - } - }, - "redux-cli-logger": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/redux-cli-logger/-/redux-cli-logger-2.1.0.tgz", - "integrity": "sha512-75mVsggAJRSykWy2qxdGI7osocDWvc3RCMeN93hlvS/FxgdRww12NaXslez+W6gBOrSJKO7W16V0IzuISSfCxg==", - "requires": { - "colors": "^1.1.2" - } - }, - "redux-devtools-core": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/redux-devtools-core/-/redux-devtools-core-0.2.1.tgz", - "integrity": "sha512-RAGOxtUFdr/1USAvxrWd+Gq/Euzgw7quCZlO5TgFpDfG7rB5tMhZUrNyBjpzgzL2yMk0eHnPYIGm7NkIfRzHxQ==", - "requires": { - "get-params": "^0.1.2", - "jsan": "^3.1.13", - "lodash": "^4.17.11", - "nanoid": "^2.0.0", - "remotedev-serialize": "^0.1.8" - }, - "dependencies": { - "lodash": { - "version": "4.17.19", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", - "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==" - } - } - }, - "redux-devtools-instrument": { - "version": "1.9.6", - "resolved": "https://registry.npmjs.org/redux-devtools-instrument/-/redux-devtools-instrument-1.9.6.tgz", - "integrity": "sha512-MwvY4cLEB2tIfWWBzrUR02UM9qRG2i7daNzywRvabOSVdvAY7s9BxSwMmVRH1Y/7QWjplNtOwgT0apKhHg2Qew==", - "requires": { - "lodash": "^4.2.0", - "symbol-observable": "^1.0.2" - }, - "dependencies": { - "lodash": { - "version": "4.17.19", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", - "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==" - } - } - }, - "redux-saga": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/redux-saga/-/redux-saga-1.0.0.tgz", - "integrity": "sha512-GvJWs/SzMvEQgeaw6sRMXnS2FghlvEGsHiEtTLpJqc/FHF3I5EE/B+Hq5lyHZ8LSoT2r/X/46uWvkdCnK9WgHA==", - "requires": { - "@redux-saga/core": "^1.0.0" - } - }, - "regenerator-runtime": { - "version": "0.13.5", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.5.tgz", - "integrity": "sha512-ZS5w8CpKFinUzOwW3c83oPeVXoNsrLsaCoLtJvAClH135j/R77RuymhiSErhm2lKcwSCIpmvIWSbDkIfAqKQlA==" - }, - "regexpp": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", - "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==" - }, - "remote-redux-devtools": { - "version": "0.5.16", - "resolved": "https://registry.npmjs.org/remote-redux-devtools/-/remote-redux-devtools-0.5.16.tgz", - "integrity": "sha512-xZ2D1VRIWzat5nsvcraT6fKEX9Cfi+HbQBCwzNnUAM8Uicm/anOc60XGalcaDPrVmLug7nhDl2nimEa3bL3K9w==", - "requires": { - "jsan": "^3.1.13", - "querystring": "^0.2.0", - "redux-devtools-core": "^0.2.1", - "redux-devtools-instrument": "^1.9.4", - "rn-host-detect": "^1.1.5", - "socketcluster-client": "^14.2.1" - } - }, - "remotedev-serialize": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/remotedev-serialize/-/remotedev-serialize-0.1.8.tgz", - "integrity": "sha512-3YG/FDcOmiK22bl5oMRM8RRnbGrFEuPGjbcDG+z2xi5aQaNQNZ8lqoRnZTwXVfaZtutXuiAQOgPRrogzQk8edg==", - "requires": { - "jsan": "^3.1.13" - } - }, - "repeating": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", - "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", - "requires": { - "is-finite": "^1.0.0" - } - }, - "request": { - "version": "2.88.2", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", - "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", - "requires": { - "aws-sign2": "~0.7.0", - "aws4": "^1.8.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.6", - "extend": "~3.0.2", - "forever-agent": "~0.6.1", - "form-data": "~2.3.2", - "har-validator": "~5.1.3", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.19", - "oauth-sign": "~0.9.0", - "performance-now": "^2.1.0", - "qs": "~6.5.2", - "safe-buffer": "^5.1.2", - "tough-cookie": "~2.5.0", - "tunnel-agent": "^0.6.0", - "uuid": "^3.3.2" - } - }, - "require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" - }, - "require-from-string": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==" - }, - "require-main-filename": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", - "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=" - }, - "reselect": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/reselect/-/reselect-4.0.0.tgz", - "integrity": "sha512-qUgANli03jjAyGlnbYVAV5vvnOmJnODyABz51RdBN7M4WaVu8mecZWgyQNkG8Yqe3KRGRt0l4K4B3XVEULC4CA==" - }, - "reselect-tree": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/reselect-tree/-/reselect-tree-1.3.3.tgz", - "integrity": "sha512-sG5sRWghWuWx+E2GolRZIGTVVNkMMvJpjI36gQYSOEtwca11mHtfZre6A6HNztxQcZCYdIwOB6qXt7HrAHrx0w==", - "requires": { - "debug": "^3.1.0", - "esdoc": "^1.0.4", - "json-pointer": "^0.6.0", - "reselect": "^4.0.0", - "source-map-support": "^0.5.3" - } - }, - "resolve": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", - "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=" - }, - "resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==" - }, - "responselike": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", - "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", - "requires": { - "lowercase-keys": "^1.0.0" - } - }, - "restore-cursor": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", - "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", - "requires": { - "onetime": "^2.0.0", - "signal-exit": "^3.0.2" - } - }, - "reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==" - }, - "rimraf": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", - "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", - "requires": { - "glob": "^7.1.3" - } - }, - "ripemd160": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", - "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", - "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1" - } - }, - "rlp": { - "version": "2.2.6", - "resolved": "https://registry.npmjs.org/rlp/-/rlp-2.2.6.tgz", - "integrity": "sha512-HAfAmL6SDYNWPUOJNrM500x4Thn4PZsEy5pijPh40U9WfNk0z15hUYzO9xVIMAdIHdFtD8CBDHd75Td1g36Mjg==", - "requires": { - "bn.js": "^4.11.1" - }, - "dependencies": { - "bn.js": { - "version": "4.11.9", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" - } - } - }, - "rn-host-detect": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/rn-host-detect/-/rn-host-detect-1.2.0.tgz", - "integrity": "sha512-btNg5kzHcjZZ7t7mvvV/4wNJ9e3MPgrWivkRgWURzXL0JJ0pwWlU4zrbmdlz3HHzHOxhBhHB4D+/dbMFfu4/4A==" - }, - "run-async": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", - "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==" - }, - "run-parallel": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.1.9.tgz", - "integrity": "sha512-DEqnSRTDw/Tc3FXf49zedI638Z9onwUotBMiUFKmrO2sdFKIbXamXGQ3Axd4qgphxKB4kw/qP1w5kTxnfU1B9Q==" - }, - "rxjs": { - "version": "6.6.0", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.0.tgz", - "integrity": "sha512-3HMA8z/Oz61DUHe+SdOiQyzIf4tOx5oQHmMir7IZEu6TMqCLHT4LRcmNaUS0NwOz8VLvmmBduMsoaUvMaIiqzg==", - "requires": { - "tslib": "^1.9.0" - } - }, - "safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" - }, - "safe-eval": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/safe-eval/-/safe-eval-0.4.1.tgz", - "integrity": "sha512-wmiu4RSYVZ690RP1+cv/LxfPK1dIlEN35aW7iv4SMYdqDrHbkll4+NJcHmKm7PbCuI1df1otOcPwgcc2iFR85g==" - }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" - }, - "sax": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.1.tgz", - "integrity": "sha1-e45lYZCyKOgaZq6nSEgNgozS03o=" - }, - "sc-channel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/sc-channel/-/sc-channel-1.2.0.tgz", - "integrity": "sha512-M3gdq8PlKg0zWJSisWqAsMmTVxYRTpVRqw4CWAdKBgAfVKumFcTjoCV0hYu7lgUXccCtCD8Wk9VkkE+IXCxmZA==", - "requires": { - "component-emitter": "1.2.1" - } - }, - "sc-errors": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/sc-errors/-/sc-errors-2.0.1.tgz", - "integrity": "sha512-JoVhq3Ud+3Ujv2SIG7W0XtjRHsrNgl6iXuHHsh0s+Kdt5NwI6N2EGAZD4iteitdDv68ENBkpjtSvN597/wxPSQ==" - }, - "sc-formatter": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/sc-formatter/-/sc-formatter-3.0.2.tgz", - "integrity": "sha512-9PbqYBpCq+OoEeRQ3QfFIGE6qwjjBcd2j7UjgDlhnZbtSnuGgHdcRklPKYGuYFH82V/dwd+AIpu8XvA1zqTd+A==" - }, - "scrypt": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/scrypt/-/scrypt-6.0.3.tgz", - "integrity": "sha1-BOAUpWgrU/pQwtXM4WfXGcBthw0=", - "requires": { - "nan": "^2.0.8" - } - }, - "scrypt-js": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz", - "integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==" - }, - "scrypt-shim": { - "version": "github:web3-js/scrypt-shim#aafdadda13e660e25e1c525d1f5b2443f5eb1ebb", - "from": "github:web3-js/scrypt-shim", - "requires": { - "scryptsy": "^2.1.0", - "semver": "^6.3.0" - }, - "dependencies": { - "scryptsy": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/scryptsy/-/scryptsy-2.1.0.tgz", - "integrity": "sha512-1CdSqHQowJBnMAFyPEBRfqag/YP9OF394FV+4YREIJX4ljD7OxvQRDayyoyyCk+senRjSkP6VnUNQmVQqB6g7w==" + "wrappy": { + "version": "1.0.2", + "bundled": true }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" - } - } - }, - "scrypt.js": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/scrypt.js/-/scrypt.js-0.2.0.tgz", - "integrity": "sha1-r40UZbcemZARC+38WTuUeeA6ito=", - "requires": { - "scrypt": "^6.0.2", - "scryptsy": "^1.2.1" - } - }, - "scryptsy": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/scryptsy/-/scryptsy-1.2.1.tgz", - "integrity": "sha1-oyJfpLJST4AnAHYeKFW987LZIWM=", - "requires": { - "pbkdf2": "^3.0.3" - } - }, - "secp256k1": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-4.0.2.tgz", - "integrity": "sha512-UDar4sKvWAksIlfX3xIaQReADn+WFnHvbVujpcbr+9Sf/69odMwy2MUsz5CKLQgX9nsIyrjuxL2imVyoNHa3fg==", - "requires": { - "elliptic": "^6.5.2", - "node-addon-api": "^2.0.0", - "node-gyp-build": "^4.2.0" - } - }, - "seek-bzip": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/seek-bzip/-/seek-bzip-1.0.5.tgz", - "integrity": "sha1-z+kXyz0nS8/6x5J1ivUxc+sfq9w=", - "requires": { - "commander": "~2.8.1" - } - }, - "semver": { - "version": "7.3.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz", - "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==" - }, - "semver-compare": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz", - "integrity": "sha1-De4hahyUGrN+nvsXiPavxf9VN/w=" - }, - "semver-regex": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/semver-regex/-/semver-regex-2.0.0.tgz", - "integrity": "sha512-mUdIBBvdn0PLOeP3TEkMH7HHeUP3GjsXCwKarjv/kGmUFOYg1VqEemKhoQpWMu6X2I8kHeuVdGibLGkVK+/5Qw==" - }, - "send": { - "version": "0.17.1", - "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", - "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==", - "requires": { - "debug": "2.6.9", - "depd": "~1.1.2", - "destroy": "~1.0.4", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "fresh": "0.5.2", - "http-errors": "~1.7.2", - "mime": "1.6.0", - "ms": "2.1.1", - "on-finished": "~2.3.0", - "range-parser": "~1.2.1", - "statuses": "~1.5.0" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "y18n": { + "version": "4.0.0", + "bundled": true + }, + "yargs": { + "version": "13.2.4", + "bundled": true, "requires": { - "ms": "2.0.0" - }, - "dependencies": { - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - } + "cliui": "^5.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", + "os-locale": "^3.1.0", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^13.1.0" } }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" + "yargs-parser": { + "version": "13.1.2", + "bundled": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } } } }, - "serialize-javascript": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-3.0.0.tgz", - "integrity": "sha512-skZcHYw2vEX4bw90nAr2iTTsz6x2SrHEnfxgKYmZlvJYBEZrvbKtobJWlQ20zczKb3bsHHXXTYt48zBA7ni9cw==" + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" }, - "serve-static": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz", - "integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==", + "get-func-name": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", + "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=" + }, + "get-own-enumerable-property-symbols": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.2.tgz", + "integrity": "sha512-I0UBV/XOz1XkIJHEUDMZAbzCThU/H8DxmSfmdGcKPnVhu2VfFqr34jr9777IyaTYvxjedWhqVIilEDsCdP5G6g==" + }, + "get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", "requires": { - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "parseurl": "~1.3.3", - "send": "0.17.1" + "pump": "^3.0.0" } }, - "servify": { - "version": "0.1.12", - "resolved": "https://registry.npmjs.org/servify/-/servify-0.1.12.tgz", - "integrity": "sha512-/xE6GvsKKqyo1BAY+KxOWXcLpPsUUyji7Qg3bVD7hh1eRze5bR1uYiuDA/k3Gof1s9BTzQZEJK8sNcNGFIzeWw==", + "glob": { + "version": "5.0.15", + "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", + "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", "requires": { - "body-parser": "^1.16.0", - "cors": "^2.8.1", - "express": "^4.14.0", - "request": "^2.79.0", - "xhr": "^2.3.3" + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "2 || 3", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" } }, - "set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" - }, - "setimmediate": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", - "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=" - }, - "setprototypeof": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", - "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==" - }, - "sha.js": { - "version": "2.4.11", - "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", - "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "glob-parent": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", + "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" + "is-glob": "^4.0.1" } }, - "sha3": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/sha3/-/sha3-1.2.6.tgz", - "integrity": "sha512-KgLGmJGrmNB4JWVsAV11Yk6KbvsAiygWJc7t5IebWva/0NukNrjJqhtKhzy3Eiv2AKuGvhZZt7dt1mDo7HkoiQ==", + "global": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/global/-/global-4.3.2.tgz", + "integrity": "sha1-52mJJopsdMOJCLEwWxD8DjlOnQ8=", "requires": { - "nan": "2.13.2" + "min-document": "^2.19.0", + "process": "~0.5.1" } }, - "shallowequal": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz", - "integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==" + "globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==" }, - "shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "graceful-fs": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", + "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==" + }, + "growl": { + "version": "1.10.5", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", + "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==" + }, + "handlebars": { + "version": "4.7.6", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.6.tgz", + "integrity": "sha512-1f2BACcBfiwAfStCKZNrUCgqNZkGsAT7UM3kkYtXuLo0KnaVfjKOyf7PRzB6++aK9STyT1Pd2ZCPe3EGOXleXA==", "requires": { - "shebang-regex": "^1.0.0" + "minimist": "^1.2.5", + "neo-async": "^2.6.0", + "source-map": "^0.6.1", + "uglify-js": "^3.1.4", + "wordwrap": "^1.0.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + } } }, - "shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=" - }, - "shelljs": { - "version": "0.8.4", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.4.tgz", - "integrity": "sha512-7gk3UZ9kOfPLIAbslLzyWeGiEqx9e3rxwZM0KE6EL8GlGwjym9Mrlx5/p33bWTu9YG6vcS4MBxYZDHYr5lr8BQ==", + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", "requires": { - "glob": "^7.0.0", - "interpret": "^1.0.0", - "rechoir": "^0.6.2" + "function-bind": "^1.1.1" } }, - "signal-exit": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", - "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==" + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" }, - "simple-concat": { + "has-symbols": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", - "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==" + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", + "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==" }, - "simple-get": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-2.8.1.tgz", - "integrity": "sha512-lSSHRSw3mQNUGPAYRqo7xy9dhKmxFXIjLjp4KHpf99GEH2VH7C3AM+Qfx6du6jhfUi6Vm7XnbEVEf7Wb6N8jRw==", + "hash.js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", + "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", "requires": { - "decompress-response": "^3.3.0", - "once": "^1.3.1", - "simple-concat": "^1.0.0" + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.0" } }, - "simple-git": { - "version": "1.132.0", - "resolved": "https://registry.npmjs.org/simple-git/-/simple-git-1.132.0.tgz", - "integrity": "sha512-xauHm1YqCTom1sC9eOjfq3/9RKiUA9iPnxBbrY2DdL8l4ADMu0jjM5l5lphQP5YWNqAL2aXC/OeuQ76vHtW5fg==", + "he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==" + }, + "hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", "requires": { - "debug": "^4.0.1" - }, - "dependencies": { - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "requires": { - "ms": "^2.1.1" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - } + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" } }, - "slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==" + "hosted-git-info": { + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz", + "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==", + "dev": true }, - "slice-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", - "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", + "human-signals": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz", + "integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==" + }, + "husky": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/husky/-/husky-4.3.0.tgz", + "integrity": "sha512-tTMeLCLqSBqnflBZnlVDhpaIMucSGaYyX6855jM4AguGeWCeSzNdb1mfyWduTZ3pe3SJVvVWGL0jO1iKZVPfTA==", "requires": { - "ansi-styles": "^3.2.0", - "astral-regex": "^1.0.0", - "is-fullwidth-code-point": "^2.0.0" + "chalk": "^4.0.0", + "ci-info": "^2.0.0", + "compare-versions": "^3.6.0", + "cosmiconfig": "^7.0.0", + "find-versions": "^3.2.0", + "opencollective-postinstall": "^2.0.2", + "pkg-dir": "^4.2.0", + "please-upgrade-node": "^3.2.0", + "slash": "^3.0.0", + "which-pm-runs": "^1.0.0" }, "dependencies": { "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "requires": { - "color-convert": "^1.9.0" + "color-convert": "^2.0.1" } }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" + "chalk": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "requires": { + "has-flag": "^4.0.0" + } } } }, - "sliced": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/sliced/-/sliced-1.0.1.tgz", - "integrity": "sha1-CzpmK10Ewxd7GSa+qCsD+Dei70E=" + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "ieee754": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz", + "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==" + }, + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==" + }, + "import-fresh": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.1.tgz", + "integrity": "sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ==", + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=" + }, + "indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==" + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, - "snarkjs": { - "version": "github:LimeChain/snarkjs#f7036ebe9bfa3f3817077f050780c8ec1542e249", - "from": "github:LimeChain/snarkjs", + "inquirer": { + "version": "7.3.3", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.3.3.tgz", + "integrity": "sha512-JG3eIAj5V9CwcGvuOmoo6LB9kbAYT8HXffUl6memuszlwDC/qvFAJw49XJ5NROSFNPxp3iQg1GqkFhaY/CR0IA==", "requires": { - "big-integer": "^1.6.35", - "chai": "^4.1.2", - "escape-string-regexp": "^1.0.5", - "eslint": "^5.3.0", - "yargs": "^12.0.2" + "ansi-escapes": "^4.2.1", + "chalk": "^4.1.0", + "cli-cursor": "^3.1.0", + "cli-width": "^3.0.0", + "external-editor": "^3.0.3", + "figures": "^3.0.0", + "lodash": "^4.17.19", + "mute-stream": "0.0.8", + "run-async": "^2.4.0", + "rxjs": "^6.6.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0", + "through": "^2.3.6" }, "dependencies": { "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==" }, "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "requires": { - "color-convert": "^1.9.0" + "color-convert": "^2.0.1" } }, "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", "requires": { - "ms": "^2.1.1" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" } }, - "eslint": { - "version": "5.16.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.16.0.tgz", - "integrity": "sha512-S3Rz11i7c8AA5JPv7xAH+dOyq/Cu/VXHiHXBPOU1k/JAM5dXqQPt3qcrhpHSorXmrpu2g0gkIBVXAqCpzfoZIg==", + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "requires": { - "@babel/code-frame": "^7.0.0", - "ajv": "^6.9.1", - "chalk": "^2.1.0", - "cross-spawn": "^6.0.5", - "debug": "^4.0.1", - "doctrine": "^3.0.0", - "eslint-scope": "^4.0.3", - "eslint-utils": "^1.3.1", - "eslint-visitor-keys": "^1.0.0", - "espree": "^5.0.1", - "esquery": "^1.0.1", - "esutils": "^2.0.2", - "file-entry-cache": "^5.0.1", - "functional-red-black-tree": "^1.0.1", - "glob": "^7.1.2", - "globals": "^11.7.0", - "ignore": "^4.0.6", - "import-fresh": "^3.0.0", - "imurmurhash": "^0.1.4", - "inquirer": "^6.2.2", - "js-yaml": "^3.13.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.3.0", - "lodash": "^4.17.11", - "minimatch": "^3.0.4", - "mkdirp": "^0.5.1", - "natural-compare": "^1.4.0", - "optionator": "^0.8.2", - "path-is-inside": "^1.0.2", - "progress": "^2.0.0", - "regexpp": "^2.0.1", - "semver": "^5.5.1", - "strip-ansi": "^4.0.0", - "strip-json-comments": "^2.0.1", - "table": "^5.2.3", - "text-table": "^0.2.0" + "color-name": "~1.1.4" } }, - "globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==" + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, - "inquirer": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.5.2.tgz", - "integrity": "sha512-cntlB5ghuB0iuO65Ovoi8ogLHiWGs/5yNrtUcKjFhSSiVeAIVpD7koaSU9RM8mpXw5YDi9RdYXGQMaOURB7ycQ==", - "requires": { - "ansi-escapes": "^3.2.0", - "chalk": "^2.4.2", - "cli-cursor": "^2.1.0", - "cli-width": "^2.0.0", - "external-editor": "^3.0.3", - "figures": "^2.0.0", - "lodash": "^4.17.12", - "mute-stream": "0.0.7", - "run-async": "^2.2.0", - "rxjs": "^6.4.0", - "string-width": "^2.1.0", - "strip-ansi": "^5.1.0", - "through": "^2.3.6" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "requires": { - "ansi-regex": "^4.1.0" - } - } - } + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" }, "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" }, "lodash": { - "version": "4.17.19", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", - "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==" - }, - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" - }, - "mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", - "requires": { - "minimist": "^1.2.5" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==" }, "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", + "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" } }, "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", "requires": { - "ansi-regex": "^3.0.0" + "ansi-regex": "^5.0.0" } }, "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "requires": { - "has-flag": "^3.0.0" - } - }, - "yargs": { - "version": "12.0.5", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.5.tgz", - "integrity": "sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "requires": { - "cliui": "^4.0.0", - "decamelize": "^1.2.0", - "find-up": "^3.0.0", - "get-caller-file": "^1.0.1", - "os-locale": "^3.0.0", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^2.0.0", - "which-module": "^2.0.0", - "y18n": "^3.2.1 || ^4.0.0", - "yargs-parser": "^11.1.1" + "has-flag": "^4.0.0" } } } }, - "socketcluster-client": { - "version": "14.3.1", - "resolved": "https://registry.npmjs.org/socketcluster-client/-/socketcluster-client-14.3.1.tgz", - "integrity": "sha512-Sd/T0K/9UlqTfz+HUuFq90dshA5OBJPQbdkRzGtcKIOm52fkdsBTt0FYpiuzzxv5VrU7PWpRm6KIfNXyPwlLpw==", + "is-arguments": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.0.4.tgz", + "integrity": "sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA==" + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=" + }, + "is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "requires": { + "binary-extensions": "^2.0.0" + } + }, + "is-buffer": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz", + "integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==" + }, + "is-callable": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.2.tgz", + "integrity": "sha512-dnMqspv5nU3LoewK2N/y7KLtxtakvTuaCsU9FU50/QDmdbHNy/4/JuRtMHqRU22o3q+W89YQndQEeCVwK+3qrA==" + }, + "is-core-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.0.0.tgz", + "integrity": "sha512-jq1AH6C8MuteOoBPwkxHafmByhL9j5q4OaPGdbuD+ZtQJVzH+i6E3BJDQcBA09k57i2Hh2yQbEG8yObZ0jdlWw==", + "dev": true, + "requires": { + "has": "^1.0.3" + } + }, + "is-date-object": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", + "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==" + }, + "is-directory": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz", + "integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=" + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "is-function": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-function/-/is-function-1.0.2.tgz", + "integrity": "sha512-lw7DUp0aWXYg+CBCN+JKkcE0Q2RayZnSvnZBlwgxHBQhqt5pZNVy4Ri7H9GmmXkdu7LUthszM+Tor1u/2iBcpQ==" + }, + "is-glob": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", + "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-hex-prefixed": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz", + "integrity": "sha1-fY035q135dEnFIkTxXPggtd39VQ=" + }, + "is-map": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.1.tgz", + "integrity": "sha512-T/S49scO8plUiAOA2DBTBG3JHpn1yiw0kRp6dgiZ0v2/6twi5eiB0rHtHFH9ZIrvlWc6+4O+m4zg5+Z833aXgw==" + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" + }, + "is-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", + "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=" + }, + "is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=" + }, + "is-regex": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.1.tgz", + "integrity": "sha512-1+QkEcxiLlB7VEyFtyBg94e08OAsvq7FUBgApTq/w2ymCLyKJgDPsybBENVtA7XCQEgEXxKPonG+mvYRxh/LIg==", + "requires": { + "has-symbols": "^1.0.1" + } + }, + "is-regexp": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-regexp/-/is-regexp-1.0.0.tgz", + "integrity": "sha1-/S2INUXEa6xaYz57mgnof6LLUGk=" + }, + "is-set": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.1.tgz", + "integrity": "sha512-eJEzOtVyenDs1TMzSQ3kU3K+E0GUS9sno+F0OBT97xsgcJsF9nXMBtkT9/kut5JEpM7oL7X/0qxR17K3mcwIAA==" + }, + "is-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", + "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==" + }, + "is-string": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.5.tgz", + "integrity": "sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ==" + }, + "is-symbol": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", + "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", "requires": { - "buffer": "^5.2.1", - "clone": "2.1.1", - "component-emitter": "1.2.1", - "linked-list": "0.1.0", - "querystring": "0.2.0", - "sc-channel": "^1.2.0", - "sc-errors": "^2.0.1", - "sc-formatter": "^3.0.1", - "uuid": "3.2.1", - "ws": "7.1.0" + "has-symbols": "^1.0.1" + } + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" + }, + "istanbul": { + "version": "0.4.5", + "resolved": "https://registry.npmjs.org/istanbul/-/istanbul-0.4.5.tgz", + "integrity": "sha1-ZcfXPUxNqE1POsMQuRj7C4Azczs=", + "requires": { + "abbrev": "1.0.x", + "async": "1.x", + "escodegen": "1.8.x", + "esprima": "2.7.x", + "glob": "^5.0.15", + "handlebars": "^4.0.1", + "js-yaml": "3.x", + "mkdirp": "0.5.x", + "nopt": "3.x", + "once": "1.x", + "resolve": "1.1.x", + "supports-color": "^3.1.0", + "which": "^1.1.1", + "wordwrap": "^1.0.0" }, "dependencies": { - "buffer": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.6.0.tgz", - "integrity": "sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw==", + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=" + }, + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", "requires": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4" + "has-flag": "^1.0.0" } - }, - "uuid": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.2.1.tgz", - "integrity": "sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA==" } } }, - "solc": { - "version": "0.6.12", - "resolved": "https://registry.npmjs.org/solc/-/solc-0.6.12.tgz", - "integrity": "sha512-Lm0Ql2G9Qc7yPP2Ba+WNmzw2jwsrd3u4PobHYlSOxaut3TtUbj9+5ZrT6f4DUpNPEoBaFUOEg9Op9C0mk7ge9g==", + "iterate-iterator": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/iterate-iterator/-/iterate-iterator-1.0.1.tgz", + "integrity": "sha512-3Q6tudGN05kbkDQDI4CqjaBf4qf85w6W6GnuZDtUVYwKgtC1q8yxYX7CZed7N+tLzQqS6roujWvszf13T+n9aw==" + }, + "iterate-value": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/iterate-value/-/iterate-value-1.0.2.tgz", + "integrity": "sha512-A6fMAio4D2ot2r/TYzr4yUWrmwNdsN5xL7+HUiyACE4DXm+q8HtPcnFTp+NnW3k4N05tZ7FVYFFb2CR13NxyHQ==", "requires": { - "command-exists": "^1.2.8", - "commander": "3.0.2", - "fs-extra": "^0.30.0", - "js-sha3": "0.8.0", - "memorystream": "^0.3.1", - "require-from-string": "^2.0.0", - "semver": "^5.5.0", - "tmp": "0.0.33" + "es-get-iterator": "^1.0.2", + "iterate-iterator": "^1.0.1" + } + }, + "jmespath": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/jmespath/-/jmespath-0.15.0.tgz", + "integrity": "sha1-o/Iiqarp+Wb10nx5ZRDigJF2Qhc=" + }, + "js-sha3": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz", + "integrity": "sha1-DU/9gALVMzqrr0oj7tL2N0yfKOc=" + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" + }, + "js-yaml": { + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.0.tgz", + "integrity": "sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A==", + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" }, "dependencies": { - "commander": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/commander/-/commander-3.0.2.tgz", - "integrity": "sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow==" - }, - "fs-extra": { - "version": "0.30.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.30.0.tgz", - "integrity": "sha1-8jP/zAjU2n1DLapEl3aYnbHfk/A=", - "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^2.1.0", - "klaw": "^1.0.0", - "path-is-absolute": "^1.0.0", - "rimraf": "^2.2.8" - } - }, - "js-sha3": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", - "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==" - }, - "jsonfile": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", - "integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=", - "requires": { - "graceful-fs": "^4.1.6" - } - }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" } } }, - "solhint": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/solhint/-/solhint-3.1.0.tgz", - "integrity": "sha512-Cc0wqKzg0NviDF7H5zsrGJ/hVwwkGqi0Hkc3YtedTev4alkJv4YADdJg4y586MpfEvMX4QPp7LugsmJzoeChkQ==", + "json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==" + }, + "json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==" + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=" + }, + "json5": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "dev": true, "requires": { - "@solidity-parser/parser": "^0.6.0", - "ajv": "^6.6.1", - "antlr4": "4.7.1", - "ast-parents": "0.0.1", - "chalk": "^2.4.2", - "commander": "2.18.0", - "cosmiconfig": "^5.0.7", - "eslint": "^5.6.0", - "fast-diff": "^1.1.2", - "glob": "^7.1.3", - "ignore": "^4.0.6", - "js-yaml": "^3.12.0", - "lodash": "^4.17.11", - "prettier": "^1.14.3", - "semver": "^6.3.0" + "minimist": "^1.2.0" + } + }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "requires": { + "graceful-fs": "^4.1.6" + } + }, + "klaw": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz", + "integrity": "sha1-QIhDO0azsbolnXh4XY6W9zugJDk=", + "requires": { + "graceful-fs": "^4.1.9" + } + }, + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "requires": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + } + }, + "lines-and-columns": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz", + "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=" + }, + "lint-staged": { + "version": "10.4.2", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-10.4.2.tgz", + "integrity": "sha512-OLCA9K1hS+Sl179SO6kX0JtnsaKj/MZalEhUj5yAgXsb63qPI/Gfn6Ua1KuZdbfkZNEu3/n5C/obYCu70IMt9g==", + "requires": { + "chalk": "^4.1.0", + "cli-truncate": "^2.1.0", + "commander": "^6.0.0", + "cosmiconfig": "^7.0.0", + "debug": "^4.1.1", + "dedent": "^0.7.0", + "enquirer": "^2.3.6", + "execa": "^4.0.3", + "listr2": "^2.6.0", + "log-symbols": "^4.0.0", + "micromatch": "^4.0.2", + "normalize-path": "^3.0.0", + "please-upgrade-node": "^3.2.0", + "string-argv": "0.3.1", + "stringify-object": "^3.3.0" }, "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" - }, "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "requires": { - "color-convert": "^1.9.0" + "color-convert": "^2.0.1" } }, "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "commander": { - "version": "2.18.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.18.0.tgz", - "integrity": "sha512-6CYPa+JP2ftfRU2qkDK+UTVeQYosOg/2GbcjIcKPHfinyOLPVGXu/ovN86RP49Re5ndJK1N0kuiidFFuepc4ZQ==" - }, - "cosmiconfig": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.2.1.tgz", - "integrity": "sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA==", - "requires": { - "import-fresh": "^2.0.0", - "is-directory": "^0.3.1", - "js-yaml": "^3.13.1", - "parse-json": "^4.0.0" - } - }, - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "requires": { - "ms": "^2.1.1" - } - }, - "eslint": { - "version": "5.16.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.16.0.tgz", - "integrity": "sha512-S3Rz11i7c8AA5JPv7xAH+dOyq/Cu/VXHiHXBPOU1k/JAM5dXqQPt3qcrhpHSorXmrpu2g0gkIBVXAqCpzfoZIg==", - "requires": { - "@babel/code-frame": "^7.0.0", - "ajv": "^6.9.1", - "chalk": "^2.1.0", - "cross-spawn": "^6.0.5", - "debug": "^4.0.1", - "doctrine": "^3.0.0", - "eslint-scope": "^4.0.3", - "eslint-utils": "^1.3.1", - "eslint-visitor-keys": "^1.0.0", - "espree": "^5.0.1", - "esquery": "^1.0.1", - "esutils": "^2.0.2", - "file-entry-cache": "^5.0.1", - "functional-red-black-tree": "^1.0.1", - "glob": "^7.1.2", - "globals": "^11.7.0", - "ignore": "^4.0.6", - "import-fresh": "^3.0.0", - "imurmurhash": "^0.1.4", - "inquirer": "^6.2.2", - "js-yaml": "^3.13.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.3.0", - "lodash": "^4.17.11", - "minimatch": "^3.0.4", - "mkdirp": "^0.5.1", - "natural-compare": "^1.4.0", - "optionator": "^0.8.2", - "path-is-inside": "^1.0.2", - "progress": "^2.0.0", - "regexpp": "^2.0.1", - "semver": "^5.5.1", - "strip-ansi": "^4.0.0", - "strip-json-comments": "^2.0.1", - "table": "^5.2.3", - "text-table": "^0.2.0" - }, - "dependencies": { - "import-fresh": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.1.tgz", - "integrity": "sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ==", - "requires": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - } - }, - "resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==" - }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" - } - } - }, - "globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==" - }, - "import-fresh": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-2.0.0.tgz", - "integrity": "sha1-2BNVwVYS04bGH53dOSLUMEgipUY=", - "requires": { - "caller-path": "^2.0.0", - "resolve-from": "^3.0.0" - } - }, - "inquirer": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.5.2.tgz", - "integrity": "sha512-cntlB5ghuB0iuO65Ovoi8ogLHiWGs/5yNrtUcKjFhSSiVeAIVpD7koaSU9RM8mpXw5YDi9RdYXGQMaOURB7ycQ==", - "requires": { - "ansi-escapes": "^3.2.0", - "chalk": "^2.4.2", - "cli-cursor": "^2.1.0", - "cli-width": "^2.0.0", - "external-editor": "^3.0.3", - "figures": "^2.0.0", - "lodash": "^4.17.12", - "mute-stream": "0.0.7", - "run-async": "^2.2.0", - "rxjs": "^6.4.0", - "string-width": "^2.1.0", - "strip-ansi": "^5.1.0", - "through": "^2.3.6" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "requires": { - "ansi-regex": "^4.1.0" - } - } - } - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" - }, - "lodash": { - "version": "4.17.19", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", - "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==" - }, - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" - }, - "mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", "requires": { - "minimist": "^1.2.5" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" } }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - }, - "parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "requires": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" + "color-name": "~1.1.4" } }, - "resolve-from": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", - "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=" - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - } + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, - "strip-ansi": { + "has-flag": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "requires": { - "ansi-regex": "^3.0.0" - } + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" }, "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "requires": { - "has-flag": "^3.0.0" + "has-flag": "^4.0.0" } } } }, - "solidity-coverage": { - "version": "0.7.9", - "resolved": "https://registry.npmjs.org/solidity-coverage/-/solidity-coverage-0.7.9.tgz", - "integrity": "sha512-UWkl0iNmpjuVanPWvZzF6eCAKwbEmmolmzwbN8nU+MexOKO3eW6kVbxBkfEjVa8TuQcLb0F2wdgXJZBRbjpjnA==", + "listr2": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/listr2/-/listr2-2.6.2.tgz", + "integrity": "sha512-6x6pKEMs8DSIpA/tixiYY2m/GcbgMplMVmhQAaLFxEtNSKLeWTGjtmU57xvv6QCm2XcqzyNXL/cTSVf4IChCRA==", "requires": { - "@solidity-parser/parser": "^0.6.0", - "@truffle/provider": "^0.1.17", - "chalk": "^2.4.2", - "death": "^1.1.0", - "detect-port": "^1.3.0", - "fs-extra": "^8.1.0", - "ganache-cli": "6.9.0", - "ghost-testrpc": "^0.0.2", - "global-modules": "^2.0.0", - "globby": "^10.0.1", - "jsonschema": "^1.2.4", - "lodash": "^4.17.15", - "node-emoji": "^1.10.0", - "pify": "^4.0.1", - "recursive-readdir": "^2.2.2", - "sc-istanbul": "^0.4.5", - "shelljs": "^0.8.3", - "web3": "1.2.6" + "chalk": "^4.1.0", + "cli-truncate": "^2.1.0", + "figures": "^3.2.0", + "indent-string": "^4.0.0", + "log-update": "^4.0.0", + "p-map": "^4.0.0", + "rxjs": "^6.6.2", + "through": "^2.3.8" }, - "dependencies": { - "@types/node": { - "version": "12.12.51", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.51.tgz", - "integrity": "sha512-6ILqt8iNThALrxDv2Q4LyYFQxULQz96HKNIFd4s9QRQaiHINYeUpLqeU/2IU7YMtvipG1fQVAy//vY8/fX1Y9w==" - }, - "aes-js": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz", - "integrity": "sha1-4h3xCtbCBTKVvLuNq0Cwnb6ofk0=" - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "requires": { - "color-convert": "^1.9.0" - } - }, - "async": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=" - }, - "bn.js": { - "version": "4.11.8", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", - "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==" - }, - "buffer": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.6.0.tgz", - "integrity": "sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw==", - "requires": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "escodegen": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.8.1.tgz", - "integrity": "sha1-WltTr0aTEQvrsIZ6o0MN07cKEBg=", + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "requires": { - "esprima": "^2.7.1", - "estraverse": "^1.9.1", - "esutils": "^2.0.2", - "optionator": "^0.8.1", - "source-map": "~0.2.0" + "color-convert": "^2.0.1" } }, - "esprima": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", - "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=" - }, - "estraverse": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz", - "integrity": "sha1-r2fy3JIlgkFZUJJgkaQAXSnJu0Q=" - }, - "ethers": { - "version": "4.0.0-beta.3", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-4.0.0-beta.3.tgz", - "integrity": "sha512-YYPogooSknTwvHg3+Mv71gM/3Wcrx+ZpCzarBj3mqs9njjRkrOo2/eufzhHloOCo3JSoNI4TQJJ6yU5ABm3Uog==", + "chalk": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", "requires": { - "@types/node": "^10.3.2", - "aes-js": "3.0.0", - "bn.js": "^4.4.0", - "elliptic": "6.3.3", - "hash.js": "1.1.3", - "js-sha3": "0.5.7", - "scrypt-js": "2.0.3", - "setimmediate": "1.0.4", - "uuid": "2.0.1", - "xmlhttprequest": "1.8.0" - }, - "dependencies": { - "@types/node": { - "version": "10.17.27", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.27.tgz", - "integrity": "sha512-J0oqm9ZfAXaPdwNXMMgAhylw5fhmXkToJd06vuDUSAgEDZ/n/69/69UmyBZbc+zT34UnShuDSBqvim3SPnozJg==" - }, - "elliptic": { - "version": "6.3.3", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.3.3.tgz", - "integrity": "sha1-VILZZG1UvLif19mU/J4ulWiHbj8=", - "requires": { - "bn.js": "^4.4.0", - "brorand": "^1.0.1", - "hash.js": "^1.0.0", - "inherits": "^2.0.1" - } - }, - "setimmediate": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.4.tgz", - "integrity": "sha1-IOgd5iLUoCWIzgyNqJc8vPHTE48=" - } + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" } }, - "eventemitter3": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.2.tgz", - "integrity": "sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q==" - }, - "fs-extra": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", - "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "requires": { - "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" + "color-name": "~1.1.4" } }, - "ganache-cli": { - "version": "6.9.0", - "resolved": "https://registry.npmjs.org/ganache-cli/-/ganache-cli-6.9.0.tgz", - "integrity": "sha512-ZdL6kPrApXF/O+f6uU431OJcwxMk69H3KPDSHHrMP82ZvZRNpDHbR+rVv7XX/YUeoQ5q6nZ2AFiGiFAVn9pfzA==", - "requires": { - "ethereumjs-util": "6.1.0", - "source-map-support": "0.5.12", - "yargs": "13.2.4" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "bundled": true - }, - "ansi-styles": { - "version": "3.2.1", - "bundled": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "bindings": { - "version": "1.5.0", - "bundled": true, - "requires": { - "file-uri-to-path": "1.0.0" - } - }, - "bip66": { - "version": "1.1.5", - "bundled": true, - "requires": { - "safe-buffer": "^5.0.1" - } - }, - "bn.js": { - "version": "4.11.8", - "bundled": true - }, - "brorand": { - "version": "1.1.0", - "bundled": true - }, - "browserify-aes": { - "version": "1.2.0", - "bundled": true, - "requires": { - "buffer-xor": "^1.0.3", - "cipher-base": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.3", - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "buffer-from": { - "version": "1.1.1", - "bundled": true - }, - "buffer-xor": { - "version": "1.0.3", - "bundled": true - }, - "camelcase": { - "version": "5.3.1", - "bundled": true - }, - "cipher-base": { - "version": "1.0.4", - "bundled": true, - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "cliui": { - "version": "5.0.0", - "bundled": true, - "requires": { - "string-width": "^3.1.0", - "strip-ansi": "^5.2.0", - "wrap-ansi": "^5.1.0" - } - }, - "color-convert": { - "version": "1.9.3", - "bundled": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "bundled": true - }, - "create-hash": { - "version": "1.2.0", - "bundled": true, - "requires": { - "cipher-base": "^1.0.1", - "inherits": "^2.0.1", - "md5.js": "^1.3.4", - "ripemd160": "^2.0.1", - "sha.js": "^2.4.0" - } - }, - "create-hmac": { - "version": "1.1.7", - "bundled": true, - "requires": { - "cipher-base": "^1.0.3", - "create-hash": "^1.1.0", - "inherits": "^2.0.1", - "ripemd160": "^2.0.0", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - } - }, - "cross-spawn": { - "version": "6.0.5", - "bundled": true, - "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "decamelize": { - "version": "1.2.0", - "bundled": true - }, - "drbg.js": { - "version": "1.0.1", - "bundled": true, - "requires": { - "browserify-aes": "^1.0.6", - "create-hash": "^1.1.2", - "create-hmac": "^1.1.4" - } - }, - "elliptic": { - "version": "6.5.0", - "bundled": true, - "requires": { - "bn.js": "^4.4.0", - "brorand": "^1.0.1", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.0" - } - }, - "emoji-regex": { - "version": "7.0.3", - "bundled": true - }, - "end-of-stream": { - "version": "1.4.1", - "bundled": true, - "requires": { - "once": "^1.4.0" - } - }, - "ethereumjs-util": { - "version": "6.1.0", - "bundled": true, - "requires": { - "bn.js": "^4.11.0", - "create-hash": "^1.1.2", - "ethjs-util": "0.1.6", - "keccak": "^1.0.2", - "rlp": "^2.0.0", - "safe-buffer": "^5.1.1", - "secp256k1": "^3.0.1" - } - }, - "ethjs-util": { - "version": "0.1.6", - "bundled": true, - "requires": { - "is-hex-prefixed": "1.0.0", - "strip-hex-prefix": "1.0.0" - } - }, - "evp_bytestokey": { - "version": "1.0.3", - "bundled": true, - "requires": { - "md5.js": "^1.3.4", - "safe-buffer": "^5.1.1" - } - }, - "execa": { - "version": "1.0.0", - "bundled": true, - "requires": { - "cross-spawn": "^6.0.0", - "get-stream": "^4.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - } - }, - "file-uri-to-path": { - "version": "1.0.0", - "bundled": true - }, - "find-up": { - "version": "3.0.0", - "bundled": true, - "requires": { - "locate-path": "^3.0.0" - } - }, - "get-caller-file": { - "version": "2.0.5", - "bundled": true - }, - "get-stream": { - "version": "4.1.0", - "bundled": true, - "requires": { - "pump": "^3.0.0" - } - }, - "hash-base": { - "version": "3.0.4", - "bundled": true, - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "hash.js": { - "version": "1.1.7", - "bundled": true, - "requires": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" - } - }, - "hmac-drbg": { - "version": "1.0.1", - "bundled": true, - "requires": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "inherits": { - "version": "2.0.4", - "bundled": true - }, - "invert-kv": { - "version": "2.0.0", - "bundled": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "bundled": true - }, - "is-hex-prefixed": { - "version": "1.0.0", - "bundled": true - }, - "is-stream": { - "version": "1.1.0", - "bundled": true - }, - "isexe": { - "version": "2.0.0", - "bundled": true - }, - "keccak": { - "version": "1.4.0", - "bundled": true, - "requires": { - "bindings": "^1.2.1", - "inherits": "^2.0.3", - "nan": "^2.2.1", - "safe-buffer": "^5.1.0" - } - }, - "lcid": { - "version": "2.0.0", - "bundled": true, - "requires": { - "invert-kv": "^2.0.0" - } - }, - "locate-path": { - "version": "3.0.0", - "bundled": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "map-age-cleaner": { - "version": "0.1.3", - "bundled": true, - "requires": { - "p-defer": "^1.0.0" - } - }, - "md5.js": { - "version": "1.3.5", - "bundled": true, - "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "mem": { - "version": "4.3.0", - "bundled": true, - "requires": { - "map-age-cleaner": "^0.1.1", - "mimic-fn": "^2.0.0", - "p-is-promise": "^2.0.0" - } - }, - "mimic-fn": { - "version": "2.1.0", - "bundled": true - }, - "minimalistic-assert": { - "version": "1.0.1", - "bundled": true - }, - "minimalistic-crypto-utils": { - "version": "1.0.1", - "bundled": true - }, - "nan": { - "version": "2.14.0", - "bundled": true - }, - "nice-try": { - "version": "1.0.5", - "bundled": true - }, - "npm-run-path": { - "version": "2.0.2", - "bundled": true, - "requires": { - "path-key": "^2.0.0" - } - }, - "once": { - "version": "1.4.0", - "bundled": true, - "requires": { - "wrappy": "1" - } - }, - "os-locale": { - "version": "3.1.0", - "bundled": true, - "requires": { - "execa": "^1.0.0", - "lcid": "^2.0.0", - "mem": "^4.0.0" - } - }, - "p-defer": { - "version": "1.0.0", - "bundled": true - }, - "p-finally": { - "version": "1.0.0", - "bundled": true - }, - "p-is-promise": { - "version": "2.1.0", - "bundled": true - }, - "p-limit": { - "version": "2.2.0", - "bundled": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "bundled": true, - "requires": { - "p-limit": "^2.0.0" - } - }, - "p-try": { - "version": "2.2.0", - "bundled": true - }, - "path-exists": { - "version": "3.0.0", - "bundled": true - }, - "path-key": { - "version": "2.0.1", - "bundled": true - }, - "pump": { - "version": "3.0.0", - "bundled": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "require-directory": { - "version": "2.1.1", - "bundled": true - }, - "require-main-filename": { - "version": "2.0.0", - "bundled": true - }, - "ripemd160": { - "version": "2.0.2", - "bundled": true, - "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1" - } - }, - "rlp": { - "version": "2.2.3", - "bundled": true, - "requires": { - "bn.js": "^4.11.1", - "safe-buffer": "^5.1.1" - } - }, - "safe-buffer": { - "version": "5.2.0", - "bundled": true - }, - "secp256k1": { - "version": "3.7.1", - "bundled": true, - "requires": { - "bindings": "^1.5.0", - "bip66": "^1.1.5", - "bn.js": "^4.11.8", - "create-hash": "^1.2.0", - "drbg.js": "^1.0.1", - "elliptic": "^6.4.1", - "nan": "^2.14.0", - "safe-buffer": "^5.1.2" - } - }, - "semver": { - "version": "5.7.0", - "bundled": true - }, - "set-blocking": { - "version": "2.0.0", - "bundled": true - }, - "sha.js": { - "version": "2.4.11", - "bundled": true, - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "shebang-command": { - "version": "1.2.0", - "bundled": true, - "requires": { - "shebang-regex": "^1.0.0" - } - }, - "shebang-regex": { - "version": "1.0.0", - "bundled": true - }, - "signal-exit": { - "version": "3.0.2", - "bundled": true - }, - "source-map": { - "version": "0.6.1", - "bundled": true - }, - "source-map-support": { - "version": "0.5.12", - "bundled": true, - "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "string-width": { - "version": "3.1.0", - "bundled": true, - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } - }, - "strip-ansi": { - "version": "5.2.0", - "bundled": true, - "requires": { - "ansi-regex": "^4.1.0" - } - }, - "strip-eof": { - "version": "1.0.0", - "bundled": true - }, - "strip-hex-prefix": { - "version": "1.0.0", - "bundled": true, - "requires": { - "is-hex-prefixed": "1.0.0" - } - }, - "which": { - "version": "1.3.1", - "bundled": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "which-module": { - "version": "2.0.0", - "bundled": true - }, - "wrap-ansi": { - "version": "5.1.0", - "bundled": true, - "requires": { - "ansi-styles": "^3.2.0", - "string-width": "^3.0.0", - "strip-ansi": "^5.0.0" - } - }, - "wrappy": { - "version": "1.0.2", - "bundled": true - }, - "y18n": { - "version": "4.0.0", - "bundled": true - }, - "yargs": { - "version": "13.2.4", - "bundled": true, - "requires": { - "cliui": "^5.0.0", - "find-up": "^3.0.0", - "get-caller-file": "^2.0.1", - "os-locale": "^3.1.0", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^3.0.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^13.1.0" - } - }, - "yargs-parser": { - "version": "13.1.1", - "bundled": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } - } - } + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, - "glob": { - "version": "5.0.15", - "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", - "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "requires": { - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "2 || 3", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "has-flag": "^4.0.0" } - }, - "got": { - "version": "9.6.0", - "resolved": "https://registry.npmjs.org/got/-/got-9.6.0.tgz", - "integrity": "sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==", + } + } + }, + "load-json-file": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", + "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "strip-bom": "^3.0.0" + }, + "dependencies": { + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "dev": true, "requires": { - "@sindresorhus/is": "^0.14.0", - "@szmarczak/http-timer": "^1.1.2", - "cacheable-request": "^6.0.0", - "decompress-response": "^3.3.0", - "duplexer3": "^0.1.4", - "get-stream": "^4.1.0", - "lowercase-keys": "^1.0.1", - "mimic-response": "^1.0.1", - "p-cancelable": "^1.0.0", - "to-readable-stream": "^1.0.0", - "url-parse-lax": "^3.0.0" + "error-ex": "^1.2.0" } - }, - "hash.js": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", - "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", + } + } + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "requires": { + "p-locate": "^4.1.0" + } + }, + "lodash": { + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz", + "integrity": "sha1-W/Rejkm6QYnhfUgnid/RW9FAt7Y=" + }, + "log-symbols": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.0.0.tgz", + "integrity": "sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA==", + "requires": { + "chalk": "^4.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "requires": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.0" + "color-convert": "^2.0.1" } }, - "lodash": { - "version": "4.17.19", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", - "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==" - }, - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" - }, - "mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "chalk": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", "requires": { - "minimist": "^1.2.5" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" } }, - "oboe": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/oboe/-/oboe-2.1.4.tgz", - "integrity": "sha1-IMiM2wwVNxuwQRklfU/dNLCqSfY=", + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "requires": { - "http-https": "^1.0.0" - } - }, - "p-cancelable": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz", - "integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==" - }, - "pify": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==" - }, - "prepend-http": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", - "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=" - }, - "sc-istanbul": { - "version": "0.4.5", - "resolved": "https://registry.npmjs.org/sc-istanbul/-/sc-istanbul-0.4.5.tgz", - "integrity": "sha512-7wR5EZFLsC4w0wSm9BUuCgW+OGKAU7PNlW5L0qwVPbh+Q1sfVn2fyzfMXYCm6rkNA5ipaCOt94nApcguQwF5Gg==", - "requires": { - "abbrev": "1.0.x", - "async": "1.x", - "escodegen": "1.8.x", - "esprima": "2.7.x", - "glob": "^5.0.15", - "handlebars": "^4.0.1", - "js-yaml": "3.x", - "mkdirp": "0.5.x", - "nopt": "3.x", - "once": "1.x", - "resolve": "1.1.x", - "supports-color": "^3.1.0", - "which": "^1.1.1", - "wordwrap": "^1.0.0" - }, - "dependencies": { - "has-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", - "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=" - }, - "supports-color": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", - "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", - "requires": { - "has-flag": "^1.0.0" - } - } + "color-name": "~1.1.4" } }, - "scrypt-js": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-2.0.3.tgz", - "integrity": "sha1-uwBAvgMEPamgEqLOqfyfhSz8h9Q=" + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, - "source-map": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.2.0.tgz", - "integrity": "sha1-2rc/vPwrqBm03gO9b26qSBZLP50=", - "optional": true, - "requires": { - "amdefine": ">=0.0.4" - } + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" }, "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "requires": { - "has-flag": "^3.0.0" - } - }, - "swarm-js": { - "version": "0.1.39", - "resolved": "https://registry.npmjs.org/swarm-js/-/swarm-js-0.1.39.tgz", - "integrity": "sha512-QLMqL2rzF6n5s50BptyD6Oi0R1aWlJC5Y17SRIVXRj6OR1DRIPM7nepvrxxkjA1zNzFz6mUOMjfeqeDaWB7OOg==", - "requires": { - "bluebird": "^3.5.0", - "buffer": "^5.0.5", - "decompress": "^4.0.0", - "eth-lib": "^0.1.26", - "fs-extra": "^4.0.2", - "got": "^7.1.0", - "mime-types": "^2.1.16", - "mkdirp-promise": "^5.0.1", - "mock-fs": "^4.1.0", - "setimmediate": "^1.0.5", - "tar": "^4.0.2", - "xhr-request-promise": "^0.1.2" - }, - "dependencies": { - "fs-extra": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz", - "integrity": "sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==", - "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - }, - "get-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=" - }, - "got": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/got/-/got-7.1.0.tgz", - "integrity": "sha512-Y5WMo7xKKq1muPsxD+KmrR8DH5auG7fBdDVueZwETwV6VytKyU9OX/ddpq2/1hp1vIPvVb4T81dKQz3BivkNLw==", - "requires": { - "decompress-response": "^3.2.0", - "duplexer3": "^0.1.4", - "get-stream": "^3.0.0", - "is-plain-obj": "^1.1.0", - "is-retry-allowed": "^1.0.0", - "is-stream": "^1.0.0", - "isurl": "^1.0.0-alpha5", - "lowercase-keys": "^1.0.0", - "p-cancelable": "^0.3.0", - "p-timeout": "^1.1.1", - "safe-buffer": "^5.0.1", - "timed-out": "^4.0.0", - "url-parse-lax": "^1.0.0", - "url-to-options": "^1.0.1" - } - }, - "p-cancelable": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.3.0.tgz", - "integrity": "sha512-RVbZPLso8+jFeq1MfNvgXtCRED2raz/dKpacfTNxsx6pLEpEomM7gah6VeHSYV3+vo0OAi4MkArtQcWWXuQoyw==" - }, - "prepend-http": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", - "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=" - }, - "url-parse-lax": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", - "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", - "requires": { - "prepend-http": "^1.0.1" - } - } + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "requires": { + "has-flag": "^4.0.0" } - }, - "tar": { - "version": "4.4.13", - "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.13.tgz", - "integrity": "sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA==", + } + } + }, + "log-update": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/log-update/-/log-update-4.0.0.tgz", + "integrity": "sha512-9fkkDevMefjg0mmzWFBW8YkFP91OrizzkW3diF7CpG+S2EYdy4+TVfGwz1zeF8x7hCx1ovSPTOE9Ngib74qqUg==", + "requires": { + "ansi-escapes": "^4.3.0", + "cli-cursor": "^3.1.0", + "slice-ansi": "^4.0.0", + "wrap-ansi": "^6.2.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "requires": { - "chownr": "^1.1.1", - "fs-minipass": "^1.2.5", - "minipass": "^2.8.6", - "minizlib": "^1.2.1", - "mkdirp": "^0.5.0", - "safe-buffer": "^5.1.2", - "yallist": "^3.0.3" + "color-convert": "^2.0.1" } }, - "underscore": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.9.1.tgz", - "integrity": "sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg==" - }, - "url-parse-lax": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", - "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "requires": { - "prepend-http": "^2.0.0" + "color-name": "~1.1.4" } }, - "uuid": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.1.tgz", - "integrity": "sha1-wqMN7bPlNdcsz4LjQ5QaULqFM6w=" + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, - "web3": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/web3/-/web3-1.2.6.tgz", - "integrity": "sha512-tpu9fLIComgxGrFsD8LUtA4s4aCZk7px8UfcdEy6kS2uDi/ZfR07KJqpXZMij7Jvlq+cQrTAhsPSiBVvoMaivA==", - "requires": { - "@types/node": "^12.6.1", - "web3-bzz": "1.2.6", - "web3-core": "1.2.6", - "web3-eth": "1.2.6", - "web3-eth-personal": "1.2.6", - "web3-net": "1.2.6", - "web3-shh": "1.2.6", - "web3-utils": "1.2.6" - } - }, - "web3-bzz": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.2.6.tgz", - "integrity": "sha512-9NiHLlxdI1XeFtbPJAmi2jnnIHVF+GNy517wvOS72P7ZfuJTPwZaSNXfT01vWgPPE9R96/uAHDWHOg+T4WaDQQ==", - "requires": { - "@types/node": "^10.12.18", - "got": "9.6.0", - "swarm-js": "0.1.39", - "underscore": "1.9.1" - }, - "dependencies": { - "@types/node": { - "version": "10.17.27", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.27.tgz", - "integrity": "sha512-J0oqm9ZfAXaPdwNXMMgAhylw5fhmXkToJd06vuDUSAgEDZ/n/69/69UmyBZbc+zT34UnShuDSBqvim3SPnozJg==" - } - } + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" }, - "web3-core": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.2.6.tgz", - "integrity": "sha512-y/QNBFtr5cIR8vxebnotbjWJpOnO8LDYEAzZjeRRUJh2ijmhjoYk7dSNx9ExgC0UCfNFRoNCa9dGRu/GAxwRlw==", + "slice-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", + "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", "requires": { - "@types/bn.js": "^4.11.4", - "@types/node": "^12.6.1", - "web3-core-helpers": "1.2.6", - "web3-core-method": "1.2.6", - "web3-core-requestmanager": "1.2.6", - "web3-utils": "1.2.6" - } - }, - "web3-core-helpers": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.2.6.tgz", - "integrity": "sha512-gYKWmC2HmO7RcDzpo4L1K8EIoy5L8iubNDuTC6q69UxczwqKF/Io0kbK/1Z10Av++NlzOSiuyGp2gc4t4UOsDw==", - "requires": { - "underscore": "1.9.1", - "web3-eth-iban": "1.2.6", - "web3-utils": "1.2.6" - } - }, - "web3-core-method": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.2.6.tgz", - "integrity": "sha512-r2dzyPEonqkBg7Mugq5dknhV5PGaZTHBZlS/C+aMxNyQs3T3eaAsCTqlQDitwNUh/sUcYPEGF0Vo7ahYK4k91g==", - "requires": { - "underscore": "1.9.1", - "web3-core-helpers": "1.2.6", - "web3-core-promievent": "1.2.6", - "web3-core-subscriptions": "1.2.6", - "web3-utils": "1.2.6" - } - }, - "web3-core-promievent": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.2.6.tgz", - "integrity": "sha512-km72kJef/qtQNiSjDJJVHIZvoVOm6ytW3FCYnOcCs7RIkviAb5JYlPiye0o4pJOLzCXYID7DK7Q9bhY8qWb1lw==", - "requires": { - "any-promise": "1.3.0", - "eventemitter3": "3.1.2" - } - }, - "web3-core-requestmanager": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.2.6.tgz", - "integrity": "sha512-QU2cbsj9Dm0r6om40oSwk8Oqbp3wTa08tXuMpSmeOTkGZ3EMHJ1/4LiJ8shwg1AvPMrKVU0Nri6+uBNCdReZ+g==", - "requires": { - "underscore": "1.9.1", - "web3-core-helpers": "1.2.6", - "web3-providers-http": "1.2.6", - "web3-providers-ipc": "1.2.6", - "web3-providers-ws": "1.2.6" - } - }, - "web3-core-subscriptions": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.2.6.tgz", - "integrity": "sha512-M0PzRrP2Ct13x3wPulFtc5kENH4UtnPxO9YxkfQlX2WRKENWjt4Rfq+BCVGYEk3rTutDfWrjfzjmqMRvXqEY5Q==", - "requires": { - "eventemitter3": "3.1.2", - "underscore": "1.9.1", - "web3-core-helpers": "1.2.6" - } - }, - "web3-eth": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.2.6.tgz", - "integrity": "sha512-ROWlDPzh4QX6tlGGGlAK6X4kA2n0/cNj/4kb0nNVWkRouGmYO0R8k6s47YxYHvGiXt0s0++FUUv5vAbWovtUQw==", - "requires": { - "underscore": "1.9.1", - "web3-core": "1.2.6", - "web3-core-helpers": "1.2.6", - "web3-core-method": "1.2.6", - "web3-core-subscriptions": "1.2.6", - "web3-eth-abi": "1.2.6", - "web3-eth-accounts": "1.2.6", - "web3-eth-contract": "1.2.6", - "web3-eth-ens": "1.2.6", - "web3-eth-iban": "1.2.6", - "web3-eth-personal": "1.2.6", - "web3-net": "1.2.6", - "web3-utils": "1.2.6" - } - }, - "web3-eth-abi": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.2.6.tgz", - "integrity": "sha512-w9GAyyikn8nSifSDZxAvU9fxtQSX+W2xQWMmrtTXmBGCaE4/ywKOSPAO78gq8AoU4Wq5yqVGKZLLbfpt7/sHlA==", - "requires": { - "ethers": "4.0.0-beta.3", - "underscore": "1.9.1", - "web3-utils": "1.2.6" - } - }, - "web3-eth-accounts": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.2.6.tgz", - "integrity": "sha512-cDVtonHRgzqi/ZHOOf8kfCQWFEipcfQNAMzXIaKZwc0UUD9mgSI5oJrN45a89Ze+E6Lz9m77cDG5Ax9zscSkcw==", - "requires": { - "@web3-js/scrypt-shim": "^0.1.0", - "any-promise": "1.3.0", - "crypto-browserify": "3.12.0", - "eth-lib": "^0.2.8", - "ethereumjs-common": "^1.3.2", - "ethereumjs-tx": "^2.1.1", - "underscore": "1.9.1", - "uuid": "3.3.2", - "web3-core": "1.2.6", - "web3-core-helpers": "1.2.6", - "web3-core-method": "1.2.6", - "web3-utils": "1.2.6" - }, - "dependencies": { - "eth-lib": { - "version": "0.2.8", - "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.8.tgz", - "integrity": "sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw==", - "requires": { - "bn.js": "^4.11.6", - "elliptic": "^6.4.0", - "xhr-request-promise": "^0.1.2" - } - }, - "uuid": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", - "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==" - } + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" } - }, - "web3-eth-contract": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.2.6.tgz", - "integrity": "sha512-ak4xbHIhWgsbdPCkSN+HnQc1SH4c856y7Ly+S57J/DQVzhFZemK5HvWdpwadJrQTcHET3ZeId1vq3kmW7UYodw==", + } + } + }, + "memorystream": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", + "integrity": "sha1-htcJCzDORV1j+64S3aUaR93K+bI=" + }, + "merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==" + }, + "micromatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz", + "integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==", + "requires": { + "braces": "^3.0.1", + "picomatch": "^2.0.5" + } + }, + "mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==" + }, + "mimic-response": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", + "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==" + }, + "min-document": { + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/min-document/-/min-document-2.19.0.tgz", + "integrity": "sha1-e9KC4/WELtKVu3SM3Z8f+iyCRoU=", + "requires": { + "dom-walk": "^0.1.0" + } + }, + "minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" + }, + "minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=" + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" + }, + "mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "requires": { + "minimist": "^1.2.5" + } + }, + "mocha": { + "version": "8.1.2", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-8.1.2.tgz", + "integrity": "sha512-I8FRAcuACNMLQn3lS4qeWLxXqLvGf6r2CaLstDpZmMUUSmvW6Cnm1AuHxgbc7ctZVRcfwspCRbDHymPsi3dkJw==", + "requires": { + "ansi-colors": "4.1.1", + "browser-stdout": "1.3.1", + "chokidar": "3.4.2", + "debug": "4.1.1", + "diff": "4.0.2", + "escape-string-regexp": "4.0.0", + "find-up": "5.0.0", + "glob": "7.1.6", + "growl": "1.10.5", + "he": "1.2.0", + "js-yaml": "3.14.0", + "log-symbols": "4.0.0", + "minimatch": "3.0.4", + "ms": "2.1.2", + "object.assign": "4.1.0", + "promise.allsettled": "1.0.2", + "serialize-javascript": "4.0.0", + "strip-json-comments": "3.0.1", + "supports-color": "7.1.0", + "which": "2.0.2", + "wide-align": "1.1.3", + "workerpool": "6.0.0", + "yargs": "13.3.2", + "yargs-parser": "13.1.2", + "yargs-unparser": "1.6.1" + }, + "dependencies": { + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", "requires": { - "@types/bn.js": "^4.11.4", - "underscore": "1.9.1", - "web3-core": "1.2.6", - "web3-core-helpers": "1.2.6", - "web3-core-method": "1.2.6", - "web3-core-promievent": "1.2.6", - "web3-core-subscriptions": "1.2.6", - "web3-eth-abi": "1.2.6", - "web3-utils": "1.2.6" + "ms": "^2.1.1" } }, - "web3-eth-ens": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/web3-eth-ens/-/web3-eth-ens-1.2.6.tgz", - "integrity": "sha512-8UEqt6fqR/dji/jBGPFAyBs16OJjwi0t2dPWXPyGXmty/fH+osnXwWXE4HRUyj4xuafiM5P1YkXMsPhKEadjiw==", + "escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==" + }, + "find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "requires": { - "eth-ens-namehash": "2.0.8", - "underscore": "1.9.1", - "web3-core": "1.2.6", - "web3-core-helpers": "1.2.6", - "web3-core-promievent": "1.2.6", - "web3-eth-abi": "1.2.6", - "web3-eth-contract": "1.2.6", - "web3-utils": "1.2.6" + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" } }, - "web3-eth-iban": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.2.6.tgz", - "integrity": "sha512-TPMc3BW9Iso7H+9w+ytbqHK9wgOmtocyCD3PaAe5Eie50KQ/j7ThA60dGJnxItVo6yyRv5pZAYxPVob9x/fJlg==", + "glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", "requires": { - "bn.js": "4.11.8", - "web3-utils": "1.2.6" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" } }, - "web3-eth-personal": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.2.6.tgz", - "integrity": "sha512-T2NUkh1plY8d7wePXSoHnaiKOd8dLNFaQfgBl9JHU6S7IJrG9jnYD9bVxLEgRUfHs9gKf9tQpDf7AcPFdq/A8g==", + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + }, + "locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "requires": { - "@types/node": "^12.6.1", - "web3-core": "1.2.6", - "web3-core-helpers": "1.2.6", - "web3-core-method": "1.2.6", - "web3-net": "1.2.6", - "web3-utils": "1.2.6" + "p-locate": "^5.0.0" } }, - "web3-net": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.2.6.tgz", - "integrity": "sha512-hsNHAPddrhgjWLmbESW0KxJi2GnthPcow0Sqpnf4oB6+/+ZnQHU9OsIyHb83bnC1OmunrK2vf9Ye2mLPdFIu3A==", + "p-limit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.0.2.tgz", + "integrity": "sha512-iwqZSOoWIW+Ew4kAGUlN16J4M7OB3ysMLSZtnhmqx7njIHFPlxWBX8xo3lVTyFVq6mI/lL9qt2IsN1sHwaxJkg==", "requires": { - "web3-core": "1.2.6", - "web3-core-method": "1.2.6", - "web3-utils": "1.2.6" + "p-try": "^2.0.0" } }, - "web3-providers-http": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.2.6.tgz", - "integrity": "sha512-2+SaFCspb5f82QKuHB3nEPQOF9iSWxRf7c18fHtmnLNVkfG9SwLN1zh67bYn3tZGUdOI3gj8aX4Uhfpwx9Ezpw==", + "p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", "requires": { - "web3-core-helpers": "1.2.6", - "xhr2-cookies": "1.1.0" + "p-limit": "^3.0.2" } }, - "web3-providers-ipc": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.2.6.tgz", - "integrity": "sha512-b0Es+/GTZyk5FG3SgUDW+2/mBwJAXWt5LuppODptiOas8bB2khLjG6+Gm1K4uwOb+1NJGPt5mZZ8Wi7vibtQ+A==", - "requires": { - "oboe": "2.1.4", - "underscore": "1.9.1", - "web3-core-helpers": "1.2.6" - } + "strip-json-comments": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.0.1.tgz", + "integrity": "sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw==" }, - "web3-providers-ws": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.2.6.tgz", - "integrity": "sha512-20waSYX+gb5M5yKhug5FIwxBBvkKzlJH7sK6XEgdOx6BZ9YYamLmvg9wcRVtnSZO8hV/3cWenO/tRtTrHVvIgQ==", + "supports-color": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", "requires": { - "@web3-js/websocket": "^1.0.29", - "underscore": "1.9.1", - "web3-core-helpers": "1.2.6" + "has-flag": "^4.0.0" } }, - "web3-shh": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/web3-shh/-/web3-shh-1.2.6.tgz", - "integrity": "sha512-rouWyOOM6YMbLQd65grpj8BBezQfgNeRRX+cGyW4xsn6Xgu+B73Zvr6OtA/ftJwwa9bqHGpnLrrLMeWyy4YLUw==", + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "requires": { - "web3-core": "1.2.6", - "web3-core-method": "1.2.6", - "web3-core-subscriptions": "1.2.6", - "web3-net": "1.2.6" + "isexe": "^2.0.0" } - }, - "web3-utils": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.2.6.tgz", - "integrity": "sha512-8/HnqG/l7dGmKMgEL9JeKPTtjScxOePTzopv5aaKFExPfaBrYRkgoMqhoowCiAl/s16QaTn4DoIF1QC4YsT7Mg==", + } + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "mute-stream": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", + "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==" + }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=" + }, + "neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==" + }, + "nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==" + }, + "node-fetch": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", + "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==" + }, + "noop6": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/noop6/-/noop6-1.0.9.tgz", + "integrity": "sha512-DB3Hwyd89dPr5HqEPg3YHjzvwh/mCqizC1zZ8vyofqc+TQRyPDnT4wgXXbLGF4z9YAzwwTLi8pNLhGqcbSjgkA==" + }, + "nopt": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", + "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", + "requires": { + "abbrev": "1" + } + }, + "normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "requires": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + }, + "dependencies": { + "resolve": { + "version": "1.18.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.18.1.tgz", + "integrity": "sha512-lDfCPaMKfOJXjy0dPayzPdF1phampNWr3qFCjAu+rw/qbQmr5jWH5xN2hwh9QKfw9E5v4hwV7A+jrCmL8yjjqA==", + "dev": true, "requires": { - "bn.js": "4.11.8", - "eth-lib": "0.2.7", - "ethereum-bloom-filters": "^1.0.6", - "ethjs-unit": "0.1.6", - "number-to-bn": "1.7.0", - "randombytes": "^2.1.0", - "underscore": "1.9.1", - "utf8": "3.0.0" - }, - "dependencies": { - "eth-lib": { - "version": "0.2.7", - "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.7.tgz", - "integrity": "sha1-L5Pxex4jrsN1nNSj/iDBKGo/wco=", - "requires": { - "bn.js": "^4.11.6", - "elliptic": "^6.4.0", - "xhr-request-promise": "^0.1.2" - } - } + "is-core-module": "^2.0.0", + "path-parse": "^1.0.6" } }, - "wordwrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=" + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true } } }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" + }, + "npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "requires": { + "path-key": "^3.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" }, - "source-map-support": { - "version": "0.5.19", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", - "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", + "number-to-bn": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/number-to-bn/-/number-to-bn-1.7.0.tgz", + "integrity": "sha1-uzYjWS9+X54AMLGXe9QaDFP+HqA=", "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" + "bn.js": "4.11.6", + "strip-hex-prefix": "1.0.0" }, "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + "bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=" } } }, - "spdx-correct": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", - "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + }, + "object-inspect": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.8.0.tgz", + "integrity": "sha512-jLdtEOB112fORuypAyl/50VRVIBIdVQOSUUGQHzJ4xBSbit81zRarz7GThkEFZy1RceYrWYcPcBFPQwHyAc1gA==" + }, + "object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==" + }, + "object.assign": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", + "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", + "requires": { + "define-properties": "^1.1.2", + "function-bind": "^1.1.1", + "has-symbols": "^1.0.0", + "object-keys": "^1.0.11" + } + }, + "object.entries": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.2.tgz", + "integrity": "sha512-BQdB9qKmb/HyNdMNWVr7O3+z5MUIx3aiegEIJqjMBbBf0YT9RRxTJSim4mzFqtyr7PDAHigq0N9dO0m0tRakQA==", "dev": true, "requires": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5", + "has": "^1.0.3" } }, - "spdx-exceptions": { + "object.values": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.1.tgz", + "integrity": "sha512-WTa54g2K8iu0kmS/us18jEmdv1a4Wi//BZ/DTVYEcH0XhLM5NYdpDHja3gt57VrZLcNAO2WGA+KpWsDBaHt6eA==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0-next.1", + "function-bind": "^1.1.1", + "has": "^1.0.3" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1" + } + }, + "onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "requires": { + "mimic-fn": "^2.1.0" + } + }, + "opencollective-postinstall": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/opencollective-postinstall/-/opencollective-postinstall-2.0.3.tgz", + "integrity": "sha512-8AV/sCtuzUeTo8gQK5qDZzARrulB3egtLzFgteqB2tcT4Mw7B8Kt7JcDHmltjz6FOAHsvTevk70gZEbhM4ZS9Q==" + }, + "openzeppelin-solidity": { "version": "2.3.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", - "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", - "dev": true + "resolved": "https://registry.npmjs.org/openzeppelin-solidity/-/openzeppelin-solidity-2.3.0.tgz", + "integrity": "sha512-QYeiPLvB1oSbDt6lDQvvpx7k8ODczvE474hb2kLXZBPKMsxKT1WxTCHBYrCU7kS7hfAku4DcJ0jqOyL+jvjwQw==" }, - "spdx-expression-parse": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", - "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", - "dev": true, + "optionator": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", + "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "requires": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.6", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "word-wrap": "~1.2.3" + } + }, + "original-require": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/original-require/-/original-require-1.0.1.tgz", + "integrity": "sha1-DxMEcVhM0zURxew4yNWSE/msXiA=" + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "requires": { + "p-limit": "^2.2.0" + } + }, + "p-map": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", + "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", + "requires": { + "aggregate-error": "^3.0.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" + }, + "parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "requires": { + "callsites": "^3.0.0" + } + }, + "parse-headers": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/parse-headers/-/parse-headers-2.0.3.tgz", + "integrity": "sha512-QhhZ+DCCit2Coi2vmAKbq5RGTRcQUOE2+REgv8vdyu7MnYx2eZztegqtTx99TZ86GTIwqiy3+4nQTWZ2tgmdCA==" + }, + "parse-json": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.1.0.tgz", + "integrity": "sha512-+mi/lmVVNKFNVyLXV31ERiy2CY5E1/F6QtJFEzoChPRwwngMNXRDQ9GJ5WdE2Z2P4AujsOi0/+2qHID68KwfIQ==", "requires": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" } }, - "spdx-license-ids": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz", - "integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q==", - "dev": true + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" }, - "sshpk": { - "version": "1.16.1", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", - "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", - "requires": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "safer-buffer": "^2.0.2", - "tweetnacl": "~0.14.0" - } + "path-is-inside": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=" }, - "statuses": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", - "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==" }, - "strict-uri-encode": { + "path-parse": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "dev": true + }, + "path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==" + }, + "pathval": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", - "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=" + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.0.tgz", + "integrity": "sha1-uULm1L3mUwBe9rcTYd74cn0GReA=" }, - "string-argv": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.1.tgz", - "integrity": "sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg==" + "picomatch": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", + "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==" }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + }, + "pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" + "find-up": "^4.0.0" } }, - "string.prototype.trimend": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz", - "integrity": "sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g==", + "please-upgrade-node": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/please-upgrade-node/-/please-upgrade-node-3.2.0.tgz", + "integrity": "sha512-gQR3WpIgNIKwBMVLkpMUeR3e1/E1y42bqDQZfql+kDeXd8COYfM8PQA4X6y7a8u9Ua9FHmsrrmirW2vHs45hWg==", "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.5" + "semver-compare": "^1.0.0" } }, - "string.prototype.trimstart": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz", - "integrity": "sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw==", + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=" + }, + "prettier": { + "version": "1.19.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.19.1.tgz", + "integrity": "sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==", + "optional": true + }, + "process": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/process/-/process-0.5.2.tgz", + "integrity": "sha1-FjjYqONML0QKkduVq5rrZ3/Bhc8=" + }, + "progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==" + }, + "promise.allsettled": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/promise.allsettled/-/promise.allsettled-1.0.2.tgz", + "integrity": "sha512-UpcYW5S1RaNKT6pd+s9jp9K9rlQge1UXKskec0j6Mmuq7UJCvlS2J2/s/yuPN8ehftf9HXMxWlKiPbGGUzpoRg==", "requires": { + "array.prototype.map": "^1.0.1", "define-properties": "^1.1.3", - "es-abstract": "^1.17.5" + "es-abstract": "^1.17.0-next.1", + "function-bind": "^1.1.1", + "iterate-value": "^1.0.0" } }, - "string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", "requires": { - "safe-buffer": "~5.2.0" + "end-of-stream": "^1.1.0", + "once": "^1.3.1" } }, - "stringify-object": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/stringify-object/-/stringify-object-3.3.0.tgz", - "integrity": "sha512-rHqiFh1elqCQ9WPLIC8I0Q/g/wj5J1eMkyoiD6eoQApWHP0FtlK7rqnhmabL5VUY9JQCcqwwvlOaSuutekgyrw==", - "requires": { - "get-own-enumerable-property-symbols": "^3.0.0", - "is-obj": "^1.0.1", - "is-regexp": "^1.0.0" - } + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "query-string": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/query-string/-/query-string-5.1.1.tgz", + "integrity": "sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==", "requires": { - "ansi-regex": "^2.0.0" + "decode-uri-component": "^0.2.0", + "object-assign": "^4.1.0", + "strict-uri-encode": "^1.0.0" } }, - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", - "dev": true + "querystring": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=" }, - "strip-dirs": { + "randombytes": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/strip-dirs/-/strip-dirs-2.1.0.tgz", - "integrity": "sha512-JOCxOeKLm2CAS73y/U4ZeZPTkE+gNVCzKt7Eox84Iej1LT/2pTWYpZKJuxwQpvX1LiZb1xokNR7RLfuBAa7T3g==", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", "requires": { - "is-natural-number": "^4.0.1" + "safe-buffer": "^5.1.0" } }, - "strip-eof": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", - "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=" - }, - "strip-final-newline": { + "read-pkg": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", - "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==" - }, - "strip-hex-prefix": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz", - "integrity": "sha1-DF8VX+8RUTczd96du1iNoFUA428=", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", + "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", + "dev": true, "requires": { - "is-hex-prefixed": "1.0.0" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=" - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" - }, - "swarm-js": { - "version": "0.1.37", - "resolved": "https://registry.npmjs.org/swarm-js/-/swarm-js-0.1.37.tgz", - "integrity": "sha512-G8gi5fcXP/2upwiuOShJ258sIufBVztekgobr3cVgYXObZwJ5AXLqZn52AI+/ffft29pJexF9WNdUxjlkVehoQ==", - "requires": { - "bluebird": "^3.5.0", - "buffer": "^5.0.5", - "decompress": "^4.0.0", - "eth-lib": "^0.1.26", - "fs-extra": "^2.1.2", - "fs-promise": "^2.0.0", - "got": "^7.1.0", - "mime-types": "^2.1.16", - "mkdirp-promise": "^5.0.1", - "mock-fs": "^4.1.0", - "setimmediate": "^1.0.5", - "tar.gz": "^1.0.5", - "xhr-request-promise": "^0.1.2" + "load-json-file": "^2.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^2.0.0" }, "dependencies": { - "buffer": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.6.0.tgz", - "integrity": "sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw==", - "requires": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4" - } - }, - "fs-extra": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-2.1.2.tgz", - "integrity": "sha1-BGxwFjzvmq1GsOSn+kZ/si1x3jU=", - "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^2.1.0" - } - }, - "jsonfile": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", - "integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=", + "path-type": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", + "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", + "dev": true, "requires": { - "graceful-fs": "^4.1.6" + "pify": "^2.0.0" } } } }, - "symbol-observable": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.2.0.tgz", - "integrity": "sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ==" - }, - "symbol-tree": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", - "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", - "optional": true - }, - "table": { - "version": "5.4.6", - "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", - "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==", + "read-pkg-up": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", + "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", + "dev": true, "requires": { - "ajv": "^6.10.2", - "lodash": "^4.17.14", - "slice-ansi": "^2.1.0", - "string-width": "^3.0.0" + "find-up": "^2.0.0", + "read-pkg": "^2.0.0" }, "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } }, - "is-fullwidth-code-point": { + "locate-path": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" - }, - "lodash": { - "version": "4.17.19", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", - "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==" + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" + "p-try": "^1.0.0" } }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, "requires": { - "ansi-regex": "^4.1.0" + "p-limit": "^1.1.0" } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true } } }, - "taffydb": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/taffydb/-/taffydb-2.7.3.tgz", - "integrity": "sha1-KtNxaWKUmPylvIQkMJbTzeDsOjQ=" - }, - "tar": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.2.tgz", - "integrity": "sha512-FCEhQ/4rE1zYv9rYXJw/msRqsnmlje5jHP6huWeBZ704jUTy02c5AZyWujpMR1ax6mVw9NyJMfuK2CMDWVIfgA==", + "readdirp": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.4.0.tgz", + "integrity": "sha512-0xe001vZBnJEK+uKcj8qOhyAKPzIT+gStxWr3LCB0DwcXR5NZJ3IaC+yGnHCYzB/S7ov3m3EEbZI2zeNvX+hGQ==", "requires": { - "block-stream": "*", - "fstream": "^1.0.12", - "inherits": "2" + "picomatch": "^2.2.1" } }, - "tar-stream": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.2.tgz", - "integrity": "sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A==", - "requires": { - "bl": "^1.0.0", - "buffer-alloc": "^1.2.0", - "end-of-stream": "^1.0.0", - "fs-constants": "^1.0.0", - "readable-stream": "^2.3.0", - "to-buffer": "^1.1.1", - "xtend": "^4.0.0" - }, - "dependencies": { - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "requires": { - "safe-buffer": "~5.1.0" - } - } - } + "regexpp": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", + "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==" }, - "tar.gz": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/tar.gz/-/tar.gz-1.0.7.tgz", - "integrity": "sha512-uhGatJvds/3diZrETqMj4RxBR779LKlIE74SsMcn5JProZsfs9j0QBwWO1RW+IWNJxS2x8Zzra1+AW6OQHWphg==", - "requires": { - "bluebird": "^2.9.34", - "commander": "^2.8.1", - "fstream": "^1.0.8", - "mout": "^0.11.0", - "tar": "^2.1.1" - }, - "dependencies": { - "bluebird": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-2.11.0.tgz", - "integrity": "sha1-U0uQM8AiyVecVro7Plpcqvu2UOE=" - } + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" + }, + "require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==" + }, + "require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==" + }, + "resolve": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", + "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=" + }, + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==" + }, + "restore-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "requires": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" } }, - "tcp-port-used": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/tcp-port-used/-/tcp-port-used-1.0.1.tgz", - "integrity": "sha512-rwi5xJeU6utXoEIiMvVBMc9eJ2/ofzB+7nLOdnZuFTmNCLqRiQh2sMG9MqCxHU/69VC/Fwp5dV9306Qd54ll1Q==", + "rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", "requires": { - "debug": "4.1.0", - "is2": "2.0.1" + "glob": "^7.1.3" }, "dependencies": { - "debug": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.0.tgz", - "integrity": "sha512-heNPJUJIqC+xB6ayLAMHaIrmN9HKa7aQO8MGqKpvCA+uJYVcvR6l5kgdrhRuwPFHU7P5/A1w0BjByPHwpfTDKg==", + "glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", "requires": { - "ms": "^2.1.1" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" } } }, - "text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=" + "run-async": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", + "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==" }, - "thenify": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", - "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", + "rxjs": { + "version": "6.6.3", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.3.tgz", + "integrity": "sha512-trsQc+xYYXZ3urjOiJOuCOa5N3jAZ3eiSpQB5hIT8zGlL2QfnHLJ2r7GMkBGuIausdJN1OneaI6gQlsqNHHmZQ==", "requires": { - "any-promise": "^1.0.0" + "tslib": "^1.9.0" } }, - "thenify-all": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", - "integrity": "sha1-GhkY1ALY/D+Y+/I02wvMjMEOlyY=", - "requires": { - "thenify": ">= 3.1.0 < 4" - } + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" }, - "through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, - "timed-out": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", - "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=" + "sax": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.1.tgz", + "integrity": "sha1-e45lYZCyKOgaZq6nSEgNgozS03o=" }, - "tinyreq": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/tinyreq/-/tinyreq-3.4.1.tgz", - "integrity": "sha512-IeWK9x7AZHQfxqb5VpE1+Ime0iubDjgr9DCFHTLMXO55HjQTMmqBByxoJ0rhQRxXumtTwsMcq0/gTglZkB9+IA==", + "scrypt-js": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-2.0.4.tgz", + "integrity": "sha512-4KsaGcPnuhtCZQCxFxN3GVYIhKFPTdLd8PLC552XwbMndtD0cjRFAhDuuydXQ0h08ZfPgzqe6EKHozpuH74iDw==" + }, + "semver": { + "version": "7.3.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz", + "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==" + }, + "semver-compare": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz", + "integrity": "sha1-De4hahyUGrN+nvsXiPavxf9VN/w=" + }, + "semver-regex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/semver-regex/-/semver-regex-2.0.0.tgz", + "integrity": "sha512-mUdIBBvdn0PLOeP3TEkMH7HHeUP3GjsXCwKarjv/kGmUFOYg1VqEemKhoQpWMu6X2I8kHeuVdGibLGkVK+/5Qw==" + }, + "serialize-javascript": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-4.0.0.tgz", + "integrity": "sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==", "requires": { - "assured": "^1.0.12", - "follow-redirects": "^1.4.1", - "noop6": "^1.0.7", - "ul": "^5.2.13" + "randombytes": "^2.1.0" } }, - "tmp": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", - "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" + }, + "setimmediate": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.4.tgz", + "integrity": "sha1-IOgd5iLUoCWIzgyNqJc8vPHTE48=" + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "requires": { - "os-tmpdir": "~1.0.2" + "shebang-regex": "^3.0.0" } }, - "to-buffer": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.1.1.tgz", - "integrity": "sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==" + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==" }, - "to-fast-properties": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", - "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=" + "signal-exit": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", + "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==" }, - "to-readable-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz", - "integrity": "sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==" + "simple-concat": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", + "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==" }, - "to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "simple-get": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-2.8.1.tgz", + "integrity": "sha512-lSSHRSw3mQNUGPAYRqo7xy9dhKmxFXIjLjp4KHpf99GEH2VH7C3AM+Qfx6du6jhfUi6Vm7XnbEVEf7Wb6N8jRw==", "requires": { - "is-number": "^7.0.0" + "decompress-response": "^3.3.0", + "once": "^1.3.1", + "simple-concat": "^1.0.0" } }, - "toidentifier": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", - "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==" + "slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==" }, - "tough-cookie": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", - "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "slice-ansi": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-3.0.0.tgz", + "integrity": "sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==", + "requires": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" + } + } + }, + "sliced": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/sliced/-/sliced-1.0.1.tgz", + "integrity": "sha1-CzpmK10Ewxd7GSa+qCsD+Dei70E=" + }, + "solc": { + "version": "0.6.12", + "resolved": "https://registry.npmjs.org/solc/-/solc-0.6.12.tgz", + "integrity": "sha512-Lm0Ql2G9Qc7yPP2Ba+WNmzw2jwsrd3u4PobHYlSOxaut3TtUbj9+5ZrT6f4DUpNPEoBaFUOEg9Op9C0mk7ge9g==", "requires": { - "psl": "^1.1.28", - "punycode": "^2.1.1" + "command-exists": "^1.2.8", + "commander": "3.0.2", + "fs-extra": "^0.30.0", + "js-sha3": "0.8.0", + "memorystream": "^0.3.1", + "require-from-string": "^2.0.0", + "semver": "^5.5.0", + "tmp": "0.0.33" + }, + "dependencies": { + "commander": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/commander/-/commander-3.0.2.tgz", + "integrity": "sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow==" + }, + "fs-extra": { + "version": "0.30.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.30.0.tgz", + "integrity": "sha1-8jP/zAjU2n1DLapEl3aYnbHfk/A=", + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^2.1.0", + "klaw": "^1.0.0", + "path-is-absolute": "^1.0.0", + "rimraf": "^2.2.8" + } + }, + "js-sha3": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", + "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==" + }, + "jsonfile": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", + "integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=", + "requires": { + "graceful-fs": "^4.1.6" + } + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + } } }, - "tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=", - "optional": true - }, - "trim-right": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", - "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=" - }, - "truffle": { - "version": "5.1.36", - "resolved": "https://registry.npmjs.org/truffle/-/truffle-5.1.36.tgz", - "integrity": "sha512-BXfDrRJmxECsHFu1ZHeQNDdv3OA3vmwQ6Wp5m9yaE0swKcHS+gd8sBdxQBoliiAI0xvUAsD62PRGowqFfT1CLg==", + "solhint": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/solhint/-/solhint-3.2.2.tgz", + "integrity": "sha512-cd9AQhmbsIp6YhMc4ezSawx9VQEASEvl4iThGSRFFozmTRM7c0lSxYrcrSk04jHMuw0g3IdnbxwmQV6hpxNhqA==", "requires": { - "app-module-path": "^2.2.0", - "mocha": "8.0.1", - "original-require": "1.0.1" + "@solidity-parser/parser": "^0.8.1", + "ajv": "^6.6.1", + "antlr4": "4.7.1", + "ast-parents": "0.0.1", + "chalk": "^2.4.2", + "commander": "2.18.0", + "cosmiconfig": "^5.0.7", + "eslint": "^5.6.0", + "fast-diff": "^1.1.2", + "glob": "^7.1.3", + "ignore": "^4.0.6", + "js-yaml": "^3.12.0", + "lodash": "^4.17.11", + "prettier": "^1.14.3", + "semver": "^6.3.0" }, "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" + "ansi-escapes": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", + "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==" }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "requires": { - "color-convert": "^1.9.0" - } + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" }, "chalk": { "version": "2.4.2", @@ -11852,1212 +4700,706 @@ "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", "supports-color": "^5.3.0" - }, - "dependencies": { - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "requires": { - "has-flag": "^3.0.0" - } - } } }, - "cliui": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", - "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "cli-cursor": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", + "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", "requires": { - "string-width": "^3.1.0", - "strip-ansi": "^5.2.0", - "wrap-ansi": "^5.1.0" + "restore-cursor": "^2.0.0" } }, - "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "requires": { - "ms": "^2.1.1" - } + "cli-width": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.1.tgz", + "integrity": "sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw==" }, - "diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==" + "commander": { + "version": "2.18.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.18.0.tgz", + "integrity": "sha512-6CYPa+JP2ftfRU2qkDK+UTVeQYosOg/2GbcjIcKPHfinyOLPVGXu/ovN86RP49Re5ndJK1N0kuiidFFuepc4ZQ==" }, - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "cosmiconfig": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.2.1.tgz", + "integrity": "sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA==", "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" + "import-fresh": "^2.0.0", + "is-directory": "^0.3.1", + "js-yaml": "^3.13.1", + "parse-json": "^4.0.0" } }, - "get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + } + } }, - "he": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==" + "eslint": { + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.16.0.tgz", + "integrity": "sha512-S3Rz11i7c8AA5JPv7xAH+dOyq/Cu/VXHiHXBPOU1k/JAM5dXqQPt3qcrhpHSorXmrpu2g0gkIBVXAqCpzfoZIg==", + "requires": { + "@babel/code-frame": "^7.0.0", + "ajv": "^6.9.1", + "chalk": "^2.1.0", + "cross-spawn": "^6.0.5", + "debug": "^4.0.1", + "doctrine": "^3.0.0", + "eslint-scope": "^4.0.3", + "eslint-utils": "^1.3.1", + "eslint-visitor-keys": "^1.0.0", + "espree": "^5.0.1", + "esquery": "^1.0.1", + "esutils": "^2.0.2", + "file-entry-cache": "^5.0.1", + "functional-red-black-tree": "^1.0.1", + "glob": "^7.1.2", + "globals": "^11.7.0", + "ignore": "^4.0.6", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "inquirer": "^6.2.2", + "js-yaml": "^3.13.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.3.0", + "lodash": "^4.17.11", + "minimatch": "^3.0.4", + "mkdirp": "^0.5.1", + "natural-compare": "^1.4.0", + "optionator": "^0.8.2", + "path-is-inside": "^1.0.2", + "progress": "^2.0.0", + "regexpp": "^2.0.1", + "semver": "^5.5.1", + "strip-ansi": "^4.0.0", + "strip-json-comments": "^2.0.1", + "table": "^5.2.3", + "text-table": "^0.2.0" + }, + "dependencies": { + "import-fresh": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.1.tgz", + "integrity": "sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ==", + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + } + }, + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==" + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + } + } }, - "is-fullwidth-code-point": { + "figures": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" - }, - "js-yaml": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", - "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", + "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" + "escape-string-regexp": "^1.0.5" } }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", "requires": { - "p-locate": "^4.1.0" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" } }, - "log-symbols": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz", - "integrity": "sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ==", - "requires": { - "chalk": "^2.4.2" - } - }, - "mocha": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-8.0.1.tgz", - "integrity": "sha512-vefaXfdYI8+Yo8nPZQQi0QO2o+5q9UIMX1jZ1XMmK3+4+CQjc7+B0hPdUeglXiTlr8IHMVRo63IhO9Mzt6fxOg==", - "requires": { - "ansi-colors": "4.1.1", - "browser-stdout": "1.3.1", - "chokidar": "3.3.1", - "debug": "3.2.6", - "diff": "4.0.2", - "escape-string-regexp": "1.0.5", - "find-up": "4.1.0", - "glob": "7.1.6", - "growl": "1.10.5", - "he": "1.2.0", - "js-yaml": "3.13.1", - "log-symbols": "3.0.0", - "minimatch": "3.0.4", - "ms": "2.1.2", - "object.assign": "4.1.0", - "promise.allsettled": "1.0.2", - "serialize-javascript": "3.0.0", - "strip-json-comments": "3.0.1", - "supports-color": "7.1.0", - "which": "2.0.2", - "wide-align": "1.1.3", - "workerpool": "6.0.0", - "yargs": "13.3.2", - "yargs-parser": "13.1.2", - "yargs-unparser": "1.6.0" + "import-fresh": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-2.0.0.tgz", + "integrity": "sha1-2BNVwVYS04bGH53dOSLUMEgipUY=", + "requires": { + "caller-path": "^2.0.0", + "resolve-from": "^3.0.0" } }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "inquirer": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.5.2.tgz", + "integrity": "sha512-cntlB5ghuB0iuO65Ovoi8ogLHiWGs/5yNrtUcKjFhSSiVeAIVpD7koaSU9RM8mpXw5YDi9RdYXGQMaOURB7ycQ==", "requires": { - "p-limit": "^2.2.0" + "ansi-escapes": "^3.2.0", + "chalk": "^2.4.2", + "cli-cursor": "^2.1.0", + "cli-width": "^2.0.0", + "external-editor": "^3.0.3", + "figures": "^2.0.0", + "lodash": "^4.17.12", + "mute-stream": "0.0.7", + "run-async": "^2.2.0", + "rxjs": "^6.4.0", + "string-width": "^2.1.0", + "strip-ansi": "^5.1.0", + "through": "^2.3.6" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "requires": { + "ansi-regex": "^4.1.0" + } + } } }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==" + }, + "mimic-fn": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==" }, - "require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==" + "mute-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", + "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=" }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "onetime": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", + "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" + "mimic-fn": "^1.0.0" } }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", "requires": { - "ansi-regex": "^4.1.0" + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" } }, - "strip-json-comments": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.0.1.tgz", - "integrity": "sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw==" + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=" }, - "supports-color": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", - "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", - "requires": { - "has-flag": "^4.0.0" - }, - "dependencies": { - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" - } - } + "resolve-from": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", + "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=" }, - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "restore-cursor": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", + "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", "requires": { - "isexe": "^2.0.0" + "onetime": "^2.0.0", + "signal-exit": "^3.0.2" } }, - "wrap-ansi": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", - "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", - "requires": { - "ansi-styles": "^3.2.0", - "string-width": "^3.0.0", - "strip-ansi": "^5.0.0" - } + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" }, - "yargs": { - "version": "13.3.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", - "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", "requires": { - "cliui": "^5.0.0", - "find-up": "^3.0.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^3.0.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^13.1.2" - }, - "dependencies": { - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "requires": { - "locate-path": "^3.0.0" - } - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "requires": { - "p-limit": "^2.0.0" - } - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" - } + "shebang-regex": "^1.0.0" } }, - "yargs-parser": { - "version": "13.1.2", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", - "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } - } - } - }, - "truffle-code-utils": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/truffle-code-utils/-/truffle-code-utils-1.1.4.tgz", - "integrity": "sha512-tTMFU9NIQeHrppBZgWBTh1Xp28uTNxKDFIgrgOFDsKwHX/5z+7mLtSxXEErXqkBBK/MNVF5LhOT0mvT3eMPo2w==" - }, - "truffle-decode-utils": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/truffle-decode-utils/-/truffle-decode-utils-1.0.4.tgz", - "integrity": "sha512-mYfkDUd7asIdgtrc6tjQ/PaBwJkpRdHrySnARBJjdnFPadEinaawYp1SkGKGEjkgFe/RSqwYwXo4MJXFq8ZsTQ==", - "requires": { - "bn.js": "^4.11.8", - "lodash.clonedeep": "^4.5.0", - "web3": "1.0.0-beta.37" - }, - "dependencies": { - "bn.js": { - "version": "4.11.9", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" - } - } - }, - "truffle-decoder": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/truffle-decoder/-/truffle-decoder-2.0.1.tgz", - "integrity": "sha512-9X0a+N74kJXcgjbk+z7foceeD0lWRfFkN210M3nw4UCRLduY6cz+aIEcVAaIY2XR41zePkQHpX7PU8J+m0Q/XQ==", - "requires": { - "abi-decoder": "^1.2.0", - "async-eventemitter": "^0.2.4", - "bn.js": "^4.11.8", - "debug": "^4.1.0", - "lodash.clonedeep": "^4.5.0", - "lodash.isequal": "^4.5.0", - "lodash.merge": "^4.6.1", - "lodash.range": "^3.2.0", - "truffle-decode-utils": "^1.0.4", - "web3": "1.0.0-beta.37" - }, - "dependencies": { - "bn.js": { - "version": "4.11.9", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=" }, - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "requires": { - "ms": "^2.1.1" + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" } }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - } - } - }, - "truffle-solidity-utils": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/truffle-solidity-utils/-/truffle-solidity-utils-1.2.2.tgz", - "integrity": "sha512-27Eos1o33x+tdRogeR8WwWuhRXatHwbp9AHANGSCm46ZhRzSWcObW8Ctm2kKdAP0jZehDLT2e7l5oZ4NJofLMg==" - }, - "tsconfig-paths": { - "version": "3.9.0", - "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.9.0.tgz", - "integrity": "sha512-dRcuzokWhajtZWkQsDVKbWyY+jgcLC5sqJhg2PSgf4ZkH2aHPvaOY8YWGhmjb68b5qqTfasSsDO9k7RUiEmZAw==", - "dev": true, - "requires": { - "@types/json5": "^0.0.29", - "json5": "^1.0.1", - "minimist": "^1.2.0", - "strip-bom": "^3.0.0" - }, - "dependencies": { - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", - "dev": true - } - } - }, - "tslib": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.13.0.tgz", - "integrity": "sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q==" - }, - "tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", - "requires": { - "safe-buffer": "^5.0.1" - } - }, - "tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" - }, - "type": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", - "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==" - }, - "type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", - "requires": { - "prelude-ls": "~1.1.2" - } - }, - "type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==" - }, - "type-fest": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.11.0.tgz", - "integrity": "sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ==" - }, - "type-is": { - "version": "1.6.18", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", - "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", - "requires": { - "media-typer": "0.3.0", - "mime-types": "~2.1.24" - } - }, - "typedarray-to-buffer": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", - "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", - "requires": { - "is-typedarray": "^1.0.0" - } - }, - "typescript": { - "version": "3.9.7", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.7.tgz", - "integrity": "sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw==" - }, - "typescript-compare": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/typescript-compare/-/typescript-compare-0.0.2.tgz", - "integrity": "sha512-8ja4j7pMHkfLJQO2/8tut7ub+J3Lw2S3061eJLFQcvs3tsmJKp8KG5NtpLn7KcY2w08edF74BSVN7qJS0U6oHA==", - "requires": { - "typescript-logic": "^0.0.0" - } - }, - "typescript-logic": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/typescript-logic/-/typescript-logic-0.0.0.tgz", - "integrity": "sha512-zXFars5LUkI3zP492ls0VskH3TtdeHCqu0i7/duGt60i5IGPIpAHE/DWo5FqJ6EjQ15YKXrt+AETjv60Dat34Q==" - }, - "typescript-tuple": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/typescript-tuple/-/typescript-tuple-2.2.1.tgz", - "integrity": "sha512-Zcr0lbt8z5ZdEzERHAMAniTiIKerFCMgd7yjq1fPnDJ43et/k9twIFQMUYff9k5oXcsQ0WpvFcgzK2ZKASoW6Q==", - "requires": { - "typescript-compare": "^0.0.2" - } - }, - "typpy": { - "version": "2.3.11", - "resolved": "https://registry.npmjs.org/typpy/-/typpy-2.3.11.tgz", - "integrity": "sha512-Jh/fykZSaxeKO0ceMAs6agki9T5TNA9kiIR6fzKbvafKpIw8UlNlHhzuqKyi5lfJJ5VojJOx9tooIbyy7vHV/g==", - "requires": { - "function.name": "^1.0.3" - } - }, - "uglify-js": { - "version": "3.10.0", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.10.0.tgz", - "integrity": "sha512-Esj5HG5WAyrLIdYU74Z3JdG2PxdIusvj6IWHMtlyESxc7kcDz7zYlYjpnSokn1UbpV0d/QX9fan7gkCNd/9BQA==", - "optional": true - }, - "ul": { - "version": "5.2.14", - "resolved": "https://registry.npmjs.org/ul/-/ul-5.2.14.tgz", - "integrity": "sha512-VaIRQZ5nkEd8VtI3OYo5qNbhHQuBtPtu5k5GrYaKCmcP1H+FkuWtS+XFTSU1oz5GiuAg2FJL5ka8ufr9zdm8eg==", - "requires": { - "deffy": "^2.2.2", - "typpy": "^2.3.4" - } - }, - "ultron": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz", - "integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==" - }, - "unbzip2-stream": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz", - "integrity": "sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==", - "requires": { - "buffer": "^5.2.1", - "through": "^2.3.8" - }, - "dependencies": { - "buffer": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.6.0.tgz", - "integrity": "sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw==", - "requires": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4" - } - } - } - }, - "underscore": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", - "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=" - }, - "universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" - }, - "unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" - }, - "uri-js": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", - "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", - "requires": { - "punycode": "^2.1.0" - } - }, - "url": { - "version": "0.10.3", - "resolved": "https://registry.npmjs.org/url/-/url-0.10.3.tgz", - "integrity": "sha1-Ah5NnHcF8hu/N9A861h2dAJ3TGQ=", - "requires": { - "punycode": "1.3.2", - "querystring": "0.2.0" - }, - "dependencies": { - "punycode": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", - "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=" + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "requires": { + "ansi-regex": "^3.0.0" + } } } }, - "url-parse-lax": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", - "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", + "source-map": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.2.0.tgz", + "integrity": "sha1-2rc/vPwrqBm03gO9b26qSBZLP50=", + "optional": true, "requires": { - "prepend-http": "^1.0.1" + "amdefine": ">=0.0.4" } }, - "url-set-query": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/url-set-query/-/url-set-query-1.0.0.tgz", - "integrity": "sha1-AW6M/Xwg7gXK/neV6JK9BwL6ozk=" - }, - "url-to-options": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/url-to-options/-/url-to-options-1.0.1.tgz", - "integrity": "sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k=" - }, - "utf8": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/utf8/-/utf8-3.0.0.tgz", - "integrity": "sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ==" - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" - }, - "utils-merge": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" - }, - "uuid": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", - "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==" - }, - "v8-compile-cache": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.1.1.tgz", - "integrity": "sha512-8OQ9CL+VWyt3JStj7HX7/ciTL2V3Rl1Wf5OL+SNTm0yK1KvtReVulksyeRnCANHHuUxHlQig+JJDlUhBt1NQDQ==", - "dev": true - }, - "validate-npm-package-license": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "spdx-correct": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", + "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", "dev": true, "requires": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, - "vary": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" - }, - "verror": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", - "requires": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" } }, - "web3": { - "version": "1.0.0-beta.37", - "resolved": "https://registry.npmjs.org/web3/-/web3-1.0.0-beta.37.tgz", - "integrity": "sha512-8XLgUspdzicC/xHG82TLrcF/Fxzj2XYNJ1KTYnepOI77bj5rvpsxxwHYBWQ6/JOjk0HkZqoBfnXWgcIHCDhZhQ==", - "requires": { - "web3-bzz": "1.0.0-beta.37", - "web3-core": "1.0.0-beta.37", - "web3-eth": "1.0.0-beta.37", - "web3-eth-personal": "1.0.0-beta.37", - "web3-net": "1.0.0-beta.37", - "web3-shh": "1.0.0-beta.37", - "web3-utils": "1.0.0-beta.37" - } + "spdx-exceptions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", + "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", + "dev": true }, - "web3-bzz": { - "version": "1.0.0-beta.37", - "resolved": "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.0.0-beta.37.tgz", - "integrity": "sha512-E+dho49Nsm/QpQvYWOF35YDsQrMvLB19AApENxhlQsu6HpWQt534DQul0t3Y/aAh8rlKD6Kanxt8LhHDG3vejQ==", + "spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dev": true, "requires": { - "got": "7.1.0", - "swarm-js": "0.1.37", - "underscore": "1.8.3" + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" } }, - "web3-core": { - "version": "1.0.0-beta.37", - "resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.0.0-beta.37.tgz", - "integrity": "sha512-cIwEqCj7OJyefQNauI0HOgW4sSaOQ98V99H2/HEIlnCZylsDzfw7gtQUdwnRFiIyIxjbWy3iWsjwDPoXNPZBYg==", - "requires": { - "web3-core-helpers": "1.0.0-beta.37", - "web3-core-method": "1.0.0-beta.37", - "web3-core-requestmanager": "1.0.0-beta.37", - "web3-utils": "1.0.0-beta.37" - } + "spdx-license-ids": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.6.tgz", + "integrity": "sha512-+orQK83kyMva3WyPf59k1+Y525csj5JejicWut55zeTWANuN17qSiSLUXWtzHeNWORSvT7GLDJ/E/XiIWoXBTw==", + "dev": true }, - "web3-core-helpers": { - "version": "1.0.0-beta.37", - "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.0.0-beta.37.tgz", - "integrity": "sha512-efaLOzN28RMnbugnyelgLwPWWaSwElQzcAJ/x3PZu+uPloM/lE5x0YuBKvIh7/PoSMlHqtRWj1B8CpuQOUQ5Ew==", - "requires": { - "underscore": "1.8.3", - "web3-eth-iban": "1.0.0-beta.37", - "web3-utils": "1.0.0-beta.37" - } + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" }, - "web3-core-method": { - "version": "1.0.0-beta.37", - "resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.0.0-beta.37.tgz", - "integrity": "sha512-pKWFUeqnVmzx3VrZg+CseSdrl/Yrk2ioid/HzolNXZE6zdoITZL0uRjnsbqXGEzgRRd1Oe/pFndpTlRsnxXloA==", - "requires": { - "underscore": "1.8.3", - "web3-core-helpers": "1.0.0-beta.37", - "web3-core-promievent": "1.0.0-beta.37", - "web3-core-subscriptions": "1.0.0-beta.37", - "web3-utils": "1.0.0-beta.37" - } + "strict-uri-encode": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", + "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=" }, - "web3-core-promievent": { - "version": "1.0.0-beta.37", - "resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.0.0-beta.37.tgz", - "integrity": "sha512-GTF2r1lP8nJBeA5Gxq5yZpJy9l8Fb9CXGZPfF8jHvaRdQHtm2Z+NDhqYmF833lcdkokRSyfPcXlz1mlWeClFpg==", - "requires": { - "any-promise": "1.3.0", - "eventemitter3": "1.1.1" - } + "string-argv": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.1.tgz", + "integrity": "sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg==" }, - "web3-core-requestmanager": { - "version": "1.0.0-beta.37", - "resolved": "https://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.0.0-beta.37.tgz", - "integrity": "sha512-66VUqye5BGp1Zz1r8psCxdNH+GtTjaFwroum2Osx+wbC5oRjAiXkkadiitf6wRb+edodjEMPn49u7B6WGNuewQ==", + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "requires": { - "underscore": "1.8.3", - "web3-core-helpers": "1.0.0-beta.37", - "web3-providers-http": "1.0.0-beta.37", - "web3-providers-ipc": "1.0.0-beta.37", - "web3-providers-ws": "1.0.0-beta.37" + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" } }, - "web3-core-subscriptions": { - "version": "1.0.0-beta.37", - "resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.0.0-beta.37.tgz", - "integrity": "sha512-FdXl8so9kwkRRWziuCSpFsAuAdg9KvpXa1fQlT16uoGcYYfxwFO/nkwyBGQzkZt7emShI2IRugcazyPCZDwkOA==", + "string.prototype.trimend": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz", + "integrity": "sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g==", "requires": { - "eventemitter3": "1.1.1", - "underscore": "1.8.3", - "web3-core-helpers": "1.0.0-beta.37" + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5" } }, - "web3-eth": { - "version": "1.0.0-beta.37", - "resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.0.0-beta.37.tgz", - "integrity": "sha512-Eb3aGtkz3G9q+Z9DKgSQNbn/u8RtcZQQ0R4sW9hy5KK47GoT6vab5c6DiD3QWzI0BzitHzR5Ji+3VHf/hPUGgw==", + "string.prototype.trimstart": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz", + "integrity": "sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw==", "requires": { - "underscore": "1.8.3", - "web3-core": "1.0.0-beta.37", - "web3-core-helpers": "1.0.0-beta.37", - "web3-core-method": "1.0.0-beta.37", - "web3-core-subscriptions": "1.0.0-beta.37", - "web3-eth-abi": "1.0.0-beta.37", - "web3-eth-accounts": "1.0.0-beta.37", - "web3-eth-contract": "1.0.0-beta.37", - "web3-eth-ens": "1.0.0-beta.37", - "web3-eth-iban": "1.0.0-beta.37", - "web3-eth-personal": "1.0.0-beta.37", - "web3-net": "1.0.0-beta.37", - "web3-utils": "1.0.0-beta.37" - }, - "dependencies": { - "@types/node": { - "version": "10.17.27", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.27.tgz", - "integrity": "sha512-J0oqm9ZfAXaPdwNXMMgAhylw5fhmXkToJd06vuDUSAgEDZ/n/69/69UmyBZbc+zT34UnShuDSBqvim3SPnozJg==" - }, - "aes-js": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz", - "integrity": "sha1-4h3xCtbCBTKVvLuNq0Cwnb6ofk0=" - }, - "bn.js": { - "version": "4.11.9", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" - }, - "elliptic": { - "version": "6.3.3", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.3.3.tgz", - "integrity": "sha1-VILZZG1UvLif19mU/J4ulWiHbj8=", - "requires": { - "bn.js": "^4.4.0", - "brorand": "^1.0.1", - "hash.js": "^1.0.0", - "inherits": "^2.0.1" - } - }, - "ethers": { - "version": "4.0.0-beta.1", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-4.0.0-beta.1.tgz", - "integrity": "sha512-SoYhktEbLxf+fiux5SfCEwdzWENMvgIbMZD90I62s4GZD9nEjgEWy8ZboI3hck193Vs0bDoTohDISx84f2H2tw==", - "requires": { - "@types/node": "^10.3.2", - "aes-js": "3.0.0", - "bn.js": "^4.4.0", - "elliptic": "6.3.3", - "hash.js": "1.1.3", - "js-sha3": "0.5.7", - "scrypt-js": "2.0.3", - "setimmediate": "1.0.4", - "uuid": "2.0.1", - "xmlhttprequest": "1.8.0" - } - }, - "hash.js": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", - "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", - "requires": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.0" - } - }, - "scrypt-js": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-2.0.3.tgz", - "integrity": "sha1-uwBAvgMEPamgEqLOqfyfhSz8h9Q=" - }, - "setimmediate": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.4.tgz", - "integrity": "sha1-IOgd5iLUoCWIzgyNqJc8vPHTE48=" - }, - "uuid": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.1.tgz", - "integrity": "sha1-wqMN7bPlNdcsz4LjQ5QaULqFM6w=" - }, - "web3-eth-abi": { - "version": "1.0.0-beta.37", - "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.0.0-beta.37.tgz", - "integrity": "sha512-g9DKZGM2OqwKp/tX3W/yihcj7mQCtJ6CXyZXEIZfuDyRBED/iSEIFfieDOd+yo16sokLMig6FG7ADhhu+19hdA==", - "requires": { - "ethers": "4.0.0-beta.1", - "underscore": "1.8.3", - "web3-utils": "1.0.0-beta.37" - } - } + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5" } }, - "web3-eth-abi": { - "version": "1.2.11", - "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.2.11.tgz", - "integrity": "sha512-PkRYc0+MjuLSgg03QVWqWlQivJqRwKItKtEpRUaxUAeLE7i/uU39gmzm2keHGcQXo3POXAbOnMqkDvOep89Crg==", + "stringify-object": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/stringify-object/-/stringify-object-3.3.0.tgz", + "integrity": "sha512-rHqiFh1elqCQ9WPLIC8I0Q/g/wj5J1eMkyoiD6eoQApWHP0FtlK7rqnhmabL5VUY9JQCcqwwvlOaSuutekgyrw==", "requires": { - "@ethersproject/abi": "5.0.0-beta.153", - "underscore": "1.9.1", - "web3-utils": "1.2.11" - }, - "dependencies": { - "bn.js": { - "version": "4.11.9", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" - }, - "eth-lib": { - "version": "0.2.8", - "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.8.tgz", - "integrity": "sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw==", - "requires": { - "bn.js": "^4.11.6", - "elliptic": "^6.4.0", - "xhr-request-promise": "^0.1.2" - } - }, - "underscore": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.9.1.tgz", - "integrity": "sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg==" - }, - "web3-utils": { - "version": "1.2.11", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.2.11.tgz", - "integrity": "sha512-3Tq09izhD+ThqHEaWYX4VOT7dNPdZiO+c/1QMA0s5X2lDFKK/xHJb7cyTRRVzN2LvlHbR7baS1tmQhSua51TcQ==", - "requires": { - "bn.js": "^4.11.9", - "eth-lib": "0.2.8", - "ethereum-bloom-filters": "^1.0.6", - "ethjs-unit": "0.1.6", - "number-to-bn": "1.7.0", - "randombytes": "^2.1.0", - "underscore": "1.9.1", - "utf8": "3.0.0" - } - } - } - }, - "web3-eth-accounts": { - "version": "1.0.0-beta.37", - "resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.0.0-beta.37.tgz", - "integrity": "sha512-uvbHL62/zwo4GDmwKdqH9c/EgYd8QVnAfpVw8D3epSISpgbONNY7Hr4MRMSd/CqAP12l2Ls9JVQGLhhC83bW6g==", - "requires": { - "any-promise": "1.3.0", - "crypto-browserify": "3.12.0", - "eth-lib": "0.2.7", - "scrypt.js": "0.2.0", - "underscore": "1.8.3", - "uuid": "2.0.1", - "web3-core": "1.0.0-beta.37", - "web3-core-helpers": "1.0.0-beta.37", - "web3-core-method": "1.0.0-beta.37", - "web3-utils": "1.0.0-beta.37" - }, - "dependencies": { - "bn.js": { - "version": "4.11.9", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" - }, - "eth-lib": { - "version": "0.2.7", - "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.7.tgz", - "integrity": "sha1-L5Pxex4jrsN1nNSj/iDBKGo/wco=", - "requires": { - "bn.js": "^4.11.6", - "elliptic": "^6.4.0", - "xhr-request-promise": "^0.1.2" - } - }, - "uuid": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.1.tgz", - "integrity": "sha1-wqMN7bPlNdcsz4LjQ5QaULqFM6w=" - } + "get-own-enumerable-property-symbols": "^3.0.0", + "is-obj": "^1.0.1", + "is-regexp": "^1.0.0" } }, - "web3-eth-contract": { - "version": "1.0.0-beta.37", - "resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.0.0-beta.37.tgz", - "integrity": "sha512-h1B3A8Z/C7BlnTCHkrWbXZQTViDxfR12lKMeTkT8Sqj5phFmxrBlPE4ORy4lf1Dk5b23mZYE0r/IRACx4ThCrQ==", + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "requires": { - "underscore": "1.8.3", - "web3-core": "1.0.0-beta.37", - "web3-core-helpers": "1.0.0-beta.37", - "web3-core-method": "1.0.0-beta.37", - "web3-core-promievent": "1.0.0-beta.37", - "web3-core-subscriptions": "1.0.0-beta.37", - "web3-eth-abi": "1.0.0-beta.37", - "web3-utils": "1.0.0-beta.37" - }, - "dependencies": { - "@types/node": { - "version": "10.17.27", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.27.tgz", - "integrity": "sha512-J0oqm9ZfAXaPdwNXMMgAhylw5fhmXkToJd06vuDUSAgEDZ/n/69/69UmyBZbc+zT34UnShuDSBqvim3SPnozJg==" - }, - "aes-js": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz", - "integrity": "sha1-4h3xCtbCBTKVvLuNq0Cwnb6ofk0=" - }, - "bn.js": { - "version": "4.11.9", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" - }, - "elliptic": { - "version": "6.3.3", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.3.3.tgz", - "integrity": "sha1-VILZZG1UvLif19mU/J4ulWiHbj8=", - "requires": { - "bn.js": "^4.4.0", - "brorand": "^1.0.1", - "hash.js": "^1.0.0", - "inherits": "^2.0.1" - } - }, - "ethers": { - "version": "4.0.0-beta.1", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-4.0.0-beta.1.tgz", - "integrity": "sha512-SoYhktEbLxf+fiux5SfCEwdzWENMvgIbMZD90I62s4GZD9nEjgEWy8ZboI3hck193Vs0bDoTohDISx84f2H2tw==", - "requires": { - "@types/node": "^10.3.2", - "aes-js": "3.0.0", - "bn.js": "^4.4.0", - "elliptic": "6.3.3", - "hash.js": "1.1.3", - "js-sha3": "0.5.7", - "scrypt-js": "2.0.3", - "setimmediate": "1.0.4", - "uuid": "2.0.1", - "xmlhttprequest": "1.8.0" - } - }, - "hash.js": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", - "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", - "requires": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.0" - } - }, - "scrypt-js": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-2.0.3.tgz", - "integrity": "sha1-uwBAvgMEPamgEqLOqfyfhSz8h9Q=" - }, - "setimmediate": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.4.tgz", - "integrity": "sha1-IOgd5iLUoCWIzgyNqJc8vPHTE48=" - }, - "uuid": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.1.tgz", - "integrity": "sha1-wqMN7bPlNdcsz4LjQ5QaULqFM6w=" - }, - "web3-eth-abi": { - "version": "1.0.0-beta.37", - "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.0.0-beta.37.tgz", - "integrity": "sha512-g9DKZGM2OqwKp/tX3W/yihcj7mQCtJ6CXyZXEIZfuDyRBED/iSEIFfieDOd+yo16sokLMig6FG7ADhhu+19hdA==", - "requires": { - "ethers": "4.0.0-beta.1", - "underscore": "1.8.3", - "web3-utils": "1.0.0-beta.37" - } - } + "ansi-regex": "^2.0.0" } }, - "web3-eth-ens": { - "version": "1.0.0-beta.37", - "resolved": "https://registry.npmjs.org/web3-eth-ens/-/web3-eth-ens-1.0.0-beta.37.tgz", - "integrity": "sha512-dR3UkrVzdRrJhfP57xBPx0CMiVnCcYFvh+u2XMkGydrhHgupSUkjqGr89xry/j1T0BkuN9mikpbyhdCVMXqMbg==", + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true + }, + "strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==" + }, + "strip-hex-prefix": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz", + "integrity": "sha1-DF8VX+8RUTczd96du1iNoFUA428=", + "requires": { + "is-hex-prefixed": "1.0.0" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=" + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "requires": { + "has-flag": "^3.0.0" + } + }, + "table": { + "version": "5.4.6", + "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", + "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==", "requires": { - "eth-ens-namehash": "2.0.8", - "underscore": "1.8.3", - "web3-core": "1.0.0-beta.37", - "web3-core-helpers": "1.0.0-beta.37", - "web3-core-promievent": "1.0.0-beta.37", - "web3-eth-abi": "1.0.0-beta.37", - "web3-eth-contract": "1.0.0-beta.37", - "web3-utils": "1.0.0-beta.37" + "ajv": "^6.10.2", + "lodash": "^4.17.14", + "slice-ansi": "^2.1.0", + "string-width": "^3.0.0" }, "dependencies": { - "@types/node": { - "version": "10.17.27", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.27.tgz", - "integrity": "sha512-J0oqm9ZfAXaPdwNXMMgAhylw5fhmXkToJd06vuDUSAgEDZ/n/69/69UmyBZbc+zT34UnShuDSBqvim3SPnozJg==" + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" }, - "aes-js": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz", - "integrity": "sha1-4h3xCtbCBTKVvLuNq0Cwnb6ofk0=" + "astral-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", + "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==" }, - "bn.js": { - "version": "4.11.9", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==" }, - "elliptic": { - "version": "6.3.3", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.3.3.tgz", - "integrity": "sha1-VILZZG1UvLif19mU/J4ulWiHbj8=", - "requires": { - "bn.js": "^4.4.0", - "brorand": "^1.0.1", - "hash.js": "^1.0.0", - "inherits": "^2.0.1" - } + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" }, - "ethers": { - "version": "4.0.0-beta.1", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-4.0.0-beta.1.tgz", - "integrity": "sha512-SoYhktEbLxf+fiux5SfCEwdzWENMvgIbMZD90I62s4GZD9nEjgEWy8ZboI3hck193Vs0bDoTohDISx84f2H2tw==", + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==" + }, + "slice-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", + "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", "requires": { - "@types/node": "^10.3.2", - "aes-js": "3.0.0", - "bn.js": "^4.4.0", - "elliptic": "6.3.3", - "hash.js": "1.1.3", - "js-sha3": "0.5.7", - "scrypt-js": "2.0.3", - "setimmediate": "1.0.4", - "uuid": "2.0.1", - "xmlhttprequest": "1.8.0" + "ansi-styles": "^3.2.0", + "astral-regex": "^1.0.0", + "is-fullwidth-code-point": "^2.0.0" } }, - "hash.js": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", - "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", "requires": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.0" + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" } }, - "scrypt-js": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-2.0.3.tgz", - "integrity": "sha1-uwBAvgMEPamgEqLOqfyfhSz8h9Q=" - }, - "setimmediate": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.4.tgz", - "integrity": "sha1-IOgd5iLUoCWIzgyNqJc8vPHTE48=" - }, - "uuid": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.1.tgz", - "integrity": "sha1-wqMN7bPlNdcsz4LjQ5QaULqFM6w=" - }, - "web3-eth-abi": { - "version": "1.0.0-beta.37", - "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.0.0-beta.37.tgz", - "integrity": "sha512-g9DKZGM2OqwKp/tX3W/yihcj7mQCtJ6CXyZXEIZfuDyRBED/iSEIFfieDOd+yo16sokLMig6FG7ADhhu+19hdA==", + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", "requires": { - "ethers": "4.0.0-beta.1", - "underscore": "1.8.3", - "web3-utils": "1.0.0-beta.37" + "ansi-regex": "^4.1.0" } } } }, - "web3-eth-iban": { - "version": "1.0.0-beta.37", - "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.0.0-beta.37.tgz", - "integrity": "sha512-WQRniGJFxH/XCbd7miO6+jnUG+6bvuzfeufPIiOtCbeIC1ypp1kSqER8YVBDrTyinU1xnf1U5v0KBZ2yiWBJxQ==", + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=" + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" + }, + "timed-out": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", + "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=" + }, + "tinyreq": { + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/tinyreq/-/tinyreq-3.4.2.tgz", + "integrity": "sha512-VHl9n2w2t1HD9ftvbmYMA99g/yeioIRhpxT5cazb/jo2Vld5ZtPEVW4PhBFgNXjdL2ch8j6z0cawDCF7eIFZsQ==", "requires": { - "bn.js": "4.11.6", - "web3-utils": "1.0.0-beta.37" - }, - "dependencies": { - "bn.js": { - "version": "4.11.6", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", - "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=" - } + "assured": "^1.0.12", + "follow-redirects": "^1.4.1", + "noop6": "^1.0.7", + "ul": "^5.2.13" + } + }, + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "requires": { + "os-tmpdir": "~1.0.2" } }, - "web3-eth-personal": { - "version": "1.0.0-beta.37", - "resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.0.0-beta.37.tgz", - "integrity": "sha512-B4dZpGbD+nGnn48i6nJBqrQ+HB7oDmd+Q3wGRKOsHSK5HRWO/KwYeA7wgwamMAElkut50lIsT9EJl4Apfk3G5Q==", + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "requires": { - "web3-core": "1.0.0-beta.37", - "web3-core-helpers": "1.0.0-beta.37", - "web3-core-method": "1.0.0-beta.37", - "web3-net": "1.0.0-beta.37", - "web3-utils": "1.0.0-beta.37" + "is-number": "^7.0.0" } }, - "web3-net": { - "version": "1.0.0-beta.37", - "resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.0.0-beta.37.tgz", - "integrity": "sha512-xG/uBtMdDa1UMXw9KjDUgf3fXA/fDEJUYUS0TDn+U9PMgngA+UVECHNNvQTrVVDxEky38V3sahwIDiopNsQdsw==", + "truffle": { + "version": "5.1.49", + "resolved": "https://registry.npmjs.org/truffle/-/truffle-5.1.49.tgz", + "integrity": "sha512-SkCfYRPhruowxH+qpJBAvM0u5+j/LK51U85ErXeiuRhyCNEWMNjUtISHTlEZ0KLr0Kki68iXk+o2UekN4Nlp5g==", "requires": { - "web3-core": "1.0.0-beta.37", - "web3-core-method": "1.0.0-beta.37", - "web3-utils": "1.0.0-beta.37" + "app-module-path": "^2.2.0", + "mocha": "8.1.2", + "original-require": "1.0.1" } }, - "web3-providers-http": { - "version": "1.0.0-beta.37", - "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.0.0-beta.37.tgz", - "integrity": "sha512-FM/1YDB1jtZuTo78habFj7S9tNHoqt0UipdyoQV29b8LkGKZV9Vs3is8L24hzuj1j/tbwkcAH+ewIseHwu0DTg==", + "tsconfig-paths": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.9.0.tgz", + "integrity": "sha512-dRcuzokWhajtZWkQsDVKbWyY+jgcLC5sqJhg2PSgf4ZkH2aHPvaOY8YWGhmjb68b5qqTfasSsDO9k7RUiEmZAw==", + "dev": true, "requires": { - "web3-core-helpers": "1.0.0-beta.37", - "xhr2-cookies": "1.1.0" + "@types/json5": "^0.0.29", + "json5": "^1.0.1", + "minimist": "^1.2.0", + "strip-bom": "^3.0.0" } }, - "web3-providers-ipc": { - "version": "1.0.0-beta.37", - "resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.0.0-beta.37.tgz", - "integrity": "sha512-NdRPRxYMIU0C3u18NI8u4bwbhI9pCg5nRgDGYcmSAx5uOBxiYcQy+hb0WkJRRhBoyIXJmy+s26FoH8904+UnPg==", + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, + "type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", "requires": { - "oboe": "2.1.3", - "underscore": "1.8.3", - "web3-core-helpers": "1.0.0-beta.37" + "prelude-ls": "~1.1.2" } }, - "web3-providers-ws": { - "version": "1.0.0-beta.37", - "resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.0.0-beta.37.tgz", - "integrity": "sha512-8p6ZLv+1JYa5Vs8oBn33Nn3VGFBbF+wVfO+b78RJS1Qf1uIOzjFVDk3XwYDD7rlz9G5BKpxhaQw+6EGQ7L02aw==", + "type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==" + }, + "type-fest": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.11.0.tgz", + "integrity": "sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ==" + }, + "typescript": { + "version": "3.9.7", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.7.tgz", + "integrity": "sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw==" + }, + "typpy": { + "version": "2.3.12", + "resolved": "https://registry.npmjs.org/typpy/-/typpy-2.3.12.tgz", + "integrity": "sha512-VginyZYxadNyFnB763lvFGNUqsIRtJt2V33pLfdnjRreObbKaxexUC+39EVb3MavWU9ggekvT1ojEU0kvtumfA==", "requires": { - "underscore": "1.8.3", - "web3-core-helpers": "1.0.0-beta.37", - "websocket": "git://github.com/frozeman/WebSocket-Node.git#browserifyCompatible" + "function.name": "^1.0.3" } }, - "web3-shh": { - "version": "1.0.0-beta.37", - "resolved": "https://registry.npmjs.org/web3-shh/-/web3-shh-1.0.0-beta.37.tgz", - "integrity": "sha512-h5STG/xqZNQWtCLYOu7NiMqwqPea8SfkKQUPUFxXKIPVCFVKpHuQEwW1qcPQRJMLhlQIv17xuoUe1A+RzDNbrw==", + "uglify-js": { + "version": "3.11.3", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.11.3.tgz", + "integrity": "sha512-wDRziHG94mNj2n3R864CvYw/+pc9y/RNImiTyrrf8BzgWn75JgFSwYvXrtZQMnMnOp/4UTrf3iCSQxSStPiByA==", + "optional": true + }, + "ul": { + "version": "5.2.15", + "resolved": "https://registry.npmjs.org/ul/-/ul-5.2.15.tgz", + "integrity": "sha512-svLEUy8xSCip5IWnsRa0UOg+2zP0Wsj4qlbjTmX6GJSmvKMHADBuHOm1dpNkWqWPIGuVSqzUkV3Cris5JrlTRQ==", "requires": { - "web3-core": "1.0.0-beta.37", - "web3-core-method": "1.0.0-beta.37", - "web3-core-subscriptions": "1.0.0-beta.37", - "web3-net": "1.0.0-beta.37" + "deffy": "^2.2.2", + "typpy": "^2.3.4" } }, - "web3-utils": { - "version": "1.0.0-beta.37", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.0.0-beta.37.tgz", - "integrity": "sha512-kA1fyhO8nKgU21wi30oJQ/ssvu+9srMdjOTKbHYbQe4ATPcr5YNwwrxG3Bcpbu1bEwRUVKHCkqi+wTvcAWBdlQ==", + "underscore": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.9.1.tgz", + "integrity": "sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg==" + }, + "universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" + }, + "uri-js": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.0.tgz", + "integrity": "sha512-B0yRTzYdUCCn9n+F4+Gh4yIDtMQcaJsmYBDsTSG8g/OejKBodLQ2IHfN3bM7jUsRXndopT7OIXWdYqc1fjmV6g==", "requires": { - "bn.js": "4.11.6", - "eth-lib": "0.1.27", - "ethjs-unit": "0.1.6", - "number-to-bn": "1.7.0", - "randomhex": "0.1.5", - "underscore": "1.8.3", - "utf8": "2.1.1" + "punycode": "^2.1.0" + } + }, + "url": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/url/-/url-0.10.3.tgz", + "integrity": "sha1-Ah5NnHcF8hu/N9A861h2dAJ3TGQ=", + "requires": { + "punycode": "1.3.2", + "querystring": "0.2.0" }, "dependencies": { - "bn.js": { - "version": "4.11.6", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", - "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=" - }, - "eth-lib": { - "version": "0.1.27", - "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.1.27.tgz", - "integrity": "sha512-B8czsfkJYzn2UIEMwjc7Mbj+Cy72V+/OXH/tb44LV8jhrjizQJJ325xMOMyk3+ETa6r6oi0jsUY14+om8mQMWA==", - "requires": { - "bn.js": "^4.11.6", - "elliptic": "^6.4.0", - "keccakjs": "^0.2.1", - "nano-json-stream-parser": "^0.1.2", - "servify": "^0.1.12", - "ws": "^3.0.0", - "xhr-request-promise": "^0.1.2" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - }, - "utf8": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/utf8/-/utf8-2.1.1.tgz", - "integrity": "sha1-LgHbAvfY0JRPdxBPFgnrDDBM92g=" - }, - "ws": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/ws/-/ws-3.3.3.tgz", - "integrity": "sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA==", - "requires": { - "async-limiter": "~1.0.0", - "safe-buffer": "~5.1.0", - "ultron": "~1.1.0" - } + "punycode": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=" } } }, - "webidl-conversions": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-2.0.1.tgz", - "integrity": "sha1-O/glj30xjHRDw28uFpQCoaZwNQY=", - "optional": true + "url-set-query": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/url-set-query/-/url-set-query-1.0.0.tgz", + "integrity": "sha1-AW6M/Xwg7gXK/neV6JK9BwL6ozk=" + }, + "utf8": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/utf8/-/utf8-3.0.0.tgz", + "integrity": "sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ==" + }, + "uuid": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", + "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==" + }, + "v8-compile-cache": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.1.1.tgz", + "integrity": "sha512-8OQ9CL+VWyt3JStj7HX7/ciTL2V3Rl1Wf5OL+SNTm0yK1KvtReVulksyeRnCANHHuUxHlQig+JJDlUhBt1NQDQ==", + "dev": true + }, + "validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } }, - "websocket": { - "version": "git://github.com/frozeman/WebSocket-Node.git#6c72925e3f8aaaea8dc8450f97627e85263999f2", - "from": "git://github.com/frozeman/WebSocket-Node.git#browserifyCompatible", + "web3-eth-abi": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.3.0.tgz", + "integrity": "sha512-1OrZ9+KGrBeBRd3lO8upkpNua9+7cBsQAgor9wbA25UrcUYSyL8teV66JNRu9gFxaTbkpdrGqM7J/LXpraXWrg==", "requires": { - "debug": "^2.2.0", - "nan": "^2.3.3", - "typedarray-to-buffer": "^3.1.2", - "yaeti": "^0.0.6" + "@ethersproject/abi": "5.0.0-beta.153", + "underscore": "1.9.1", + "web3-utils": "1.3.0" }, "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "@ethersproject/abi": { + "version": "5.0.0-beta.153", + "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.0.0-beta.153.tgz", + "integrity": "sha512-aXweZ1Z7vMNzJdLpR1CZUAIgnwjrZeUSvN9syCwlBaEBUFJmFY+HHnfuTI5vIhVs/mRkfJVrbEyl51JZQqyjAg==", "requires": { - "ms": "2.0.0" + "@ethersproject/address": ">=5.0.0-beta.128", + "@ethersproject/bignumber": ">=5.0.0-beta.130", + "@ethersproject/bytes": ">=5.0.0-beta.129", + "@ethersproject/constants": ">=5.0.0-beta.128", + "@ethersproject/hash": ">=5.0.0-beta.128", + "@ethersproject/keccak256": ">=5.0.0-beta.127", + "@ethersproject/logger": ">=5.0.0-beta.129", + "@ethersproject/properties": ">=5.0.0-beta.131", + "@ethersproject/strings": ">=5.0.0-beta.130" } } } }, - "whatwg-url-compat": { - "version": "0.6.5", - "resolved": "https://registry.npmjs.org/whatwg-url-compat/-/whatwg-url-compat-0.6.5.tgz", - "integrity": "sha1-AImBEa9om7CXVBzVpFymyHmERb8=", - "optional": true, + "web3-utils": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.3.0.tgz", + "integrity": "sha512-2mS5axFCbkhicmoDRuJeuo0TVGQDgC2sPi/5dblfVC+PMtX0efrb8Xlttv/eGkq7X4E83Pds34FH98TP2WOUZA==", "requires": { - "tr46": "~0.0.1" + "bn.js": "^4.11.9", + "eth-lib": "0.2.8", + "ethereum-bloom-filters": "^1.0.6", + "ethjs-unit": "0.1.6", + "number-to-bn": "1.7.0", + "randombytes": "^2.1.0", + "underscore": "1.9.1", + "utf8": "3.0.0" + }, + "dependencies": { + "bn.js": { + "version": "4.11.9", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" + } } }, "which": { @@ -13092,9 +5434,9 @@ "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==" }, "wordwrap": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", - "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=" + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=" }, "workerpool": { "version": "6.0.0", @@ -13102,12 +5444,64 @@ "integrity": "sha512-fU2OcNA/GVAJLLyKUoHkAgIhKb0JoCpSjLC/G2vYKxUjVmQwGbRVeoPJ1a8U4pnVofz4AQV5Y/NEw8oKqxEBtA==" }, "wrap-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", - "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==" + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" + }, + "string-width": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", + "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + } + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "requires": { + "ansi-regex": "^5.0.0" + } + } } }, "wrappy": { @@ -13121,30 +5515,12 @@ "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", "requires": { "mkdirp": "^0.5.1" - }, - "dependencies": { - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" - }, - "mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", - "requires": { - "minimist": "^1.2.5" - } - } } }, "ws": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.1.0.tgz", - "integrity": "sha512-Swie2C4fs7CkwlHu1glMePLYJJsWjzhl1vm3ZaLplD0h7OMkZyZ6kLTB/OagiU923bZrPFXuDTeEqaEN4NWG4g==", - "requires": { - "async-limiter": "^1.0.0" - } + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.2.3.tgz", + "integrity": "sha512-HTDl9G9hbkNDk98naoR/cHDws7+EyYMOdL1BmjsZXRUjf7d+MficC4B7HLUPlSiho0vg+CWKrGIt/VJBd1xunQ==" }, "xhr": { "version": "2.5.0", @@ -13179,25 +5555,6 @@ "xhr-request": "^1.1.0" } }, - "xhr2": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/xhr2/-/xhr2-0.2.0.tgz", - "integrity": "sha512-BDtiD0i2iKPK/S8OAZfpk6tyzEDnKKSjxWHcMBVmh+LuqJ8A32qXTyOx+TVOg2dKvq6zGBq2sgKPkEeRs1qTRA==" - }, - "xhr2-cookies": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/xhr2-cookies/-/xhr2-cookies-1.1.0.tgz", - "integrity": "sha1-fXdEnQmZGX8VXLc7I99yUF7YnUg=", - "requires": { - "cookiejar": "^2.1.1" - } - }, - "xml-name-validator": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-2.0.1.tgz", - "integrity": "sha1-TYuPHszTQZqjYgYb7O9RXh5VljU=", - "optional": true - }, "xml2js": { "version": "0.4.19", "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz", @@ -13227,207 +5584,112 @@ "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==" }, - "yaeti": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/yaeti/-/yaeti-0.0.6.tgz", - "integrity": "sha1-8m9ITXJoTPQr7ft2lwqhYI+/lXc=" - }, - "yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" - }, "yaml": { "version": "1.10.0", "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.0.tgz", "integrity": "sha512-yr2icI4glYaNG+KWONODapy2/jDdMSDnrONSjblABjD9B4Z5LgiircSt8m8sRZFNi08kG9Sm0uSHtEmP3zaEGg==" }, "yargs": { - "version": "11.0.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-11.0.0.tgz", - "integrity": "sha512-Rjp+lMYQOWtgqojx1dEWorjCofi1YN7AoFvYV7b1gx/7dAAeuI4kN5SZiEvr0ZmsZTOpDRcCqrpI10L31tFkBw==", - "requires": { - "cliui": "^4.0.0", - "decamelize": "^1.1.1", - "find-up": "^2.1.0", - "get-caller-file": "^1.0.1", - "os-locale": "^2.0.0", + "version": "13.3.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", + "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", + "requires": { + "cliui": "^5.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", + "require-main-filename": "^2.0.0", "set-blocking": "^2.0.0", - "string-width": "^2.0.0", + "string-width": "^3.0.0", "which-module": "^2.0.0", - "y18n": "^3.2.1", - "yargs-parser": "^9.0.2" + "y18n": "^4.0.0", + "yargs-parser": "^13.1.2" }, "dependencies": { "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" - }, - "camelcase": { "version": "4.1.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=" - }, - "cross-spawn": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", - "requires": { - "lru-cache": "^4.0.1", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" }, - "execa": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", - "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", - "requires": { - "cross-spawn": "^5.0.1", - "get-stream": "^3.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - } + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==" }, "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", "requires": { - "locate-path": "^2.0.0" + "locate-path": "^3.0.0" } }, - "get-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=" - }, - "invert-kv": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", - "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=" - }, "is-fullwidth-code-point": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" }, - "lcid": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", - "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", - "requires": { - "invert-kv": "^1.0.0" - } - }, "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", "requires": { - "p-locate": "^2.0.0", + "p-locate": "^3.0.0", "path-exists": "^3.0.0" } }, - "mem": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz", - "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", - "requires": { - "mimic-fn": "^1.0.0" - } - }, - "mimic-fn": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", - "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==" - }, - "os-locale": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz", - "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", - "requires": { - "execa": "^0.7.0", - "lcid": "^1.0.0", - "mem": "^1.1.0" - } - }, - "p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "requires": { - "p-try": "^1.0.0" - } - }, "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", "requires": { - "p-limit": "^1.1.0" + "p-limit": "^2.0.0" } }, - "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=" + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" }, "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", "requires": { + "emoji-regex": "^7.0.1", "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" + "strip-ansi": "^5.1.0" } }, "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "requires": { - "ansi-regex": "^3.0.0" - } - }, - "y18n": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", - "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=" - }, - "yargs-parser": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-9.0.2.tgz", - "integrity": "sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc=", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", "requires": { - "camelcase": "^4.1.0" + "ansi-regex": "^4.1.0" } } } }, "yargs-parser": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-11.1.1.tgz", - "integrity": "sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ==", + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", "requires": { "camelcase": "^5.0.0", "decamelize": "^1.2.0" } }, "yargs-unparser": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.0.tgz", - "integrity": "sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw==", + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.1.tgz", + "integrity": "sha512-qZV14lK9MWsGCmcr7u5oXGH0dbGqZAIxTDrWXZDo5zUr6b6iUmelNKO6x6R1dQT24AH3LgRxJpr8meWy2unolA==", "requires": { + "camelcase": "^5.3.1", + "decamelize": "^1.2.0", "flat": "^4.1.0", - "lodash": "^4.17.15", - "yargs": "^13.3.0" + "is-plain-obj": "^1.1.0", + "yargs": "^14.2.3" }, "dependencies": { "ansi-regex": { @@ -13435,43 +5697,45 @@ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "requires": { - "color-convert": "^1.9.0" - } + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==" }, - "cliui": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", - "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", "requires": { - "string-width": "^3.1.0", - "strip-ansi": "^5.2.0", - "wrap-ansi": "^5.1.0" + "locate-path": "^3.0.0" } }, - "get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" - }, "is-fullwidth-code-point": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" }, - "lodash": { - "version": "4.17.19", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", - "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==" + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } }, - "require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==" + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "requires": { + "p-limit": "^2.0.0" + } + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" }, "string-width": { "version": "3.1.0", @@ -13491,22 +5755,13 @@ "ansi-regex": "^4.1.0" } }, - "wrap-ansi": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", - "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", - "requires": { - "ansi-styles": "^3.2.0", - "string-width": "^3.0.0", - "strip-ansi": "^5.0.0" - } - }, "yargs": { - "version": "13.3.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", - "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", + "version": "14.2.3", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-14.2.3.tgz", + "integrity": "sha512-ZbotRWhF+lkjijC/VhmOT9wSgyBQ7+zr13+YLkhfsSiTriYsMzkTUFP18pFhWwBeMa5gUc1MzbhrO6/VB7c9Xg==", "requires": { "cliui": "^5.0.0", + "decamelize": "^1.2.0", "find-up": "^3.0.0", "get-caller-file": "^2.0.1", "require-directory": "^2.1.1", @@ -13515,28 +5770,19 @@ "string-width": "^3.0.0", "which-module": "^2.0.0", "y18n": "^4.0.0", - "yargs-parser": "^13.1.2" + "yargs-parser": "^15.0.1" } }, "yargs-parser": { - "version": "13.1.2", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", - "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", + "version": "15.0.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-15.0.1.tgz", + "integrity": "sha512-0OAMV2mAZQrs3FkNpDQcBk1x5HXb8X4twADss4S0Iuk+2dGnLOE/fRHrsYm542GduMveyA77OF4wrNJuanRCWw==", "requires": { "camelcase": "^5.0.0", "decamelize": "^1.2.0" } } } - }, - "yauzl": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", - "integrity": "sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=", - "requires": { - "buffer-crc32": "~0.2.3", - "fd-slicer": "~1.1.0" - } } } } diff --git a/package.json b/package.json index e8c167d71..b9fc91a77 100644 --- a/package.json +++ b/package.json @@ -69,7 +69,6 @@ "chai": "^4.2.0", "cli-table2": "^0.2.0", "dotenv": "^6.2.0", - "etherlime-argent": "2.3.5", "etherlime-lib": "1.1.3", "ethers": "^5.0.7", "ganache-cli": "^6.9.1", From edd8449caf4868b42c4166db3d4148023abad248 Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Mon, 17 Aug 2020 14:00:09 +0300 Subject: [PATCH 022/113] Add web3 dependency as used by truffle --- package-lock.json | 2212 ++++++++++++++++++++++++++++++++++++++++++++- package.json | 1 + 2 files changed, 2210 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 80b2aeab8..5fcf56b2f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -504,22 +504,64 @@ "resolved": "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-3.0.1.tgz", "integrity": "sha512-uSrD7hZ0ViuHGqHZbeHawZBi/uy7aBiNramXAt2dFFuSuoU4u9insS3V3zdVfOnYSPreUo636xSOuQIFN4//HA==" }, + "@sindresorhus/is": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", + "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==" + }, "@solidity-parser/parser": { "version": "0.8.1", "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.8.1.tgz", "integrity": "sha512-DF7H6T8I4lo2IZOE2NZwt3631T8j1gjpQLjmvY2xBNK50c4ltslR4XPKwT6RkeSd4+xCAK0GHC/k7sbRDBE4Yw==" }, + "@szmarczak/http-timer": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz", + "integrity": "sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==", + "requires": { + "defer-to-connect": "^1.0.1" + } + }, + "@types/bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg==", + "requires": { + "@types/node": "*" + } + }, "@types/json5": { "version": "0.0.29", "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=", "dev": true }, + "@types/node": { + "version": "12.12.68", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.68.tgz", + "integrity": "sha512-3RW2s24ewB7F9dAHvgb9FRvNHn6nO9IK6Eaknbz7HTOe2a5GVne5XbUh5+YA+kcCn67glyHhClUUdFP73LWrgQ==" + }, "@types/parse-json": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz", "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==" }, + "@types/pbkdf2": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@types/pbkdf2/-/pbkdf2-3.1.0.tgz", + "integrity": "sha512-Cf63Rv7jCQ0LaL8tNXmEyqTHuIJxRdlS5vMh1mj5voN4+QFhVZnlZruezqpWYDiJ8UTzhP0VmeLXCmBk66YrMQ==", + "requires": { + "@types/node": "*" + } + }, + "@types/secp256k1": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@types/secp256k1/-/secp256k1-4.0.1.tgz", + "integrity": "sha512-+ZjSA8ELlOp8SlKi0YLB2tz9d5iPNEmOBd+8Rz21wTMdaXQIa9b6TEnD6l5qKOCypE7FSyPyck12qZJxSDNoog==", + "requires": { + "@types/node": "*" + } + }, "@uniswap/lib": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/@uniswap/lib/-/lib-1.1.4.tgz", @@ -535,6 +577,15 @@ "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz", "integrity": "sha1-kbR5JYinc4wl813W9jdSovh3YTU=" }, + "accepts": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", + "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", + "requires": { + "mime-types": "~2.1.24", + "negotiator": "0.6.2" + } + }, "acorn": { "version": "6.4.2", "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.2.tgz", @@ -629,6 +680,11 @@ "sprintf-js": "~1.0.2" } }, + "array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" + }, "array-includes": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.1.tgz", @@ -661,6 +717,37 @@ "is-string": "^1.0.4" } }, + "asn1": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", + "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", + "requires": { + "safer-buffer": "~2.1.0" + } + }, + "asn1.js": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.4.1.tgz", + "integrity": "sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==", + "requires": { + "bn.js": "^4.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "safer-buffer": "^2.1.0" + }, + "dependencies": { + "bn.js": { + "version": "4.11.9", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" + } + } + }, + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + }, "assertion-error": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", @@ -690,6 +777,16 @@ "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=" }, + "async-limiter": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz", + "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==" + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + }, "aws-sdk": { "version": "2.774.0", "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.774.0.tgz", @@ -706,26 +803,67 @@ "xml2js": "0.4.19" } }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" + }, + "aws4": { + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.10.1.tgz", + "integrity": "sha512-zg7Hz2k5lI8kb7U32998pRRFin7zJlkfezGJjUc2heaD4Pw2wObakCDVzkKztTm/Ln7eiVvYsjqak0Ed4LkMDA==" + }, "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" }, + "base-x": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.8.tgz", + "integrity": "sha512-Rl/1AWP4J/zRrk54hhlxH4drNxPJXYUaKffODVI53/dAsV4t9fBxyxYKAVPU1XBHxYwOWP9h9H0hM2MVw4YfJA==", + "requires": { + "safe-buffer": "^5.0.1" + } + }, "base64-js": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz", "integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==" }, + "bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "requires": { + "tweetnacl": "^0.14.3" + } + }, "bech32": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz", "integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==" }, + "bignumber.js": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.1.tgz", + "integrity": "sha512-IdZR9mh6ahOBv/hYGiXyVuyCetmGJhtYkqLBpTStdhEGjegpPlUawydyaF3pbIOFynJTpllEs+NP+CS9jKFLjA==" + }, "binary-extensions": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.1.0.tgz", "integrity": "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==" }, + "blakejs": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/blakejs/-/blakejs-1.1.0.tgz", + "integrity": "sha1-ad+S75U6qIylGjLfarHFShVfx6U=" + }, + "bluebird": { + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==" + }, "bn-chai": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/bn-chai/-/bn-chai-1.0.1.tgz", @@ -736,6 +874,38 @@ "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.1.3.tgz", "integrity": "sha512-GkTiFpjFtUzU9CbMeJ5iazkCzGL3jrhzerzZIuqLABjbwRaFt33I9tUdSNryIptM+RxDet6OKm2WnLXzW51KsQ==" }, + "body-parser": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", + "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==", + "requires": { + "bytes": "3.1.0", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "~1.1.2", + "http-errors": "1.7.2", + "iconv-lite": "0.4.24", + "on-finished": "~2.3.0", + "qs": "6.7.0", + "raw-body": "2.4.0", + "type-is": "~1.6.17" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + } + } + }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -763,6 +933,113 @@ "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==" }, + "browserify-aes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", + "requires": { + "buffer-xor": "^1.0.3", + "cipher-base": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.3", + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "browserify-cipher": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", + "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", + "requires": { + "browserify-aes": "^1.0.4", + "browserify-des": "^1.0.0", + "evp_bytestokey": "^1.0.0" + } + }, + "browserify-des": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", + "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", + "requires": { + "cipher-base": "^1.0.1", + "des.js": "^1.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "browserify-rsa": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", + "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", + "requires": { + "bn.js": "^4.1.0", + "randombytes": "^2.0.1" + }, + "dependencies": { + "bn.js": { + "version": "4.11.9", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" + } + } + }, + "browserify-sign": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.1.tgz", + "integrity": "sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg==", + "requires": { + "bn.js": "^5.1.1", + "browserify-rsa": "^4.0.1", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "elliptic": "^6.5.3", + "inherits": "^2.0.4", + "parse-asn1": "^5.1.5", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + }, + "dependencies": { + "elliptic": { + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz", + "integrity": "sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==", + "requires": { + "bn.js": "^4.4.0", + "brorand": "^1.0.1", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.0" + }, + "dependencies": { + "bn.js": { + "version": "4.11.9", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" + } + } + } + } + }, + "bs58": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", + "integrity": "sha1-vhYedsNU9veIrkBx9j806MTwpCo=", + "requires": { + "base-x": "^3.0.2" + } + }, + "bs58check": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-2.1.2.tgz", + "integrity": "sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==", + "requires": { + "bs58": "^4.0.0", + "create-hash": "^1.1.0", + "safe-buffer": "^5.1.2" + } + }, "buffer": { "version": "4.9.2", "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz", @@ -778,6 +1055,45 @@ "resolved": "https://registry.npmjs.org/buffer-to-arraybuffer/-/buffer-to-arraybuffer-0.0.5.tgz", "integrity": "sha1-YGSkD6dutDxyOrqe+PbhIW0QURo=" }, + "buffer-xor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=" + }, + "bufferutil": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.1.tgz", + "integrity": "sha512-xowrxvpxojqkagPcWRQVXZl0YXhRhAtBEIq3VoER1NH5Mw1n1o0ojdspp+GS2J//2gCVyrzQDApQ4unGF+QOoA==", + "requires": { + "node-gyp-build": "~3.7.0" + } + }, + "bytes": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", + "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==" + }, + "cacheable-request": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz", + "integrity": "sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==", + "requires": { + "clone-response": "^1.0.2", + "get-stream": "^5.1.0", + "http-cache-semantics": "^4.0.0", + "keyv": "^3.0.0", + "lowercase-keys": "^2.0.0", + "normalize-url": "^4.1.0", + "responselike": "^1.0.2" + }, + "dependencies": { + "lowercase-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", + "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==" + } + } + }, "caller-callsite": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/caller-callsite/-/caller-callsite-2.0.0.tgz", @@ -811,6 +1127,11 @@ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" + }, "chai": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/chai/-/chai-4.2.0.tgz", @@ -859,11 +1180,62 @@ "readdirp": "~3.4.0" } }, + "chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==" + }, "ci-info": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==" }, + "cids": { + "version": "0.7.5", + "resolved": "https://registry.npmjs.org/cids/-/cids-0.7.5.tgz", + "integrity": "sha512-zT7mPeghoWAu+ppn8+BS1tQ5qGmbMfB4AregnQjA/qHY3GC1m1ptI9GkWNlgeu38r7CuRdXB47uY2XgAYt6QVA==", + "requires": { + "buffer": "^5.5.0", + "class-is": "^1.1.0", + "multibase": "~0.6.0", + "multicodec": "^1.0.0", + "multihashes": "~0.4.15" + }, + "dependencies": { + "buffer": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.6.0.tgz", + "integrity": "sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw==", + "requires": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4" + } + }, + "multicodec": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-1.0.4.tgz", + "integrity": "sha512-NDd7FeS3QamVtbgfvu5h7fd1IlbaC4EQ0/pgU4zqE2vdHCmBGsUa0TiM8/TdSeG6BMPC92OOCf8F1ocE/Wkrrg==", + "requires": { + "buffer": "^5.6.0", + "varint": "^5.0.0" + } + } + } + }, + "cipher-base": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "class-is": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/class-is/-/class-is-1.1.0.tgz", + "integrity": "sha512-rhjH9AG1fvabIDoGRVH587413LPjTZgmDF9fOFCbFJQV4yuocX1mHxxvXI4g3cGwbVY9wAYIoKlg1N79frJKQw==" + }, "clean-stack": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", @@ -986,6 +1358,14 @@ } } }, + "clone-response": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", + "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", + "requires": { + "mimic-response": "^1.0.0" + } + }, "code-point-at": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", @@ -1010,6 +1390,14 @@ "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", "optional": true }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "requires": { + "delayed-stream": "~1.0.0" + } + }, "command-exists": { "version": "1.2.9", "resolved": "https://registry.npmjs.org/command-exists/-/command-exists-1.2.9.tgz", @@ -1042,6 +1430,65 @@ "integrity": "sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo=", "dev": true }, + "content-disposition": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", + "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==", + "requires": { + "safe-buffer": "5.1.2" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + } + } + }, + "content-hash": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/content-hash/-/content-hash-2.5.2.tgz", + "integrity": "sha512-FvIQKy0S1JaWV10sMsA7TRx8bpU+pqPkhbsfvOJAdjRXvYxEckAwQWGwtRjiaJfh+E0DvcWUGqcdjwMGFjsSdw==", + "requires": { + "cids": "^0.7.1", + "multicodec": "^0.5.5", + "multihashes": "^0.4.15" + } + }, + "content-type": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", + "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" + }, + "cookie": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", + "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==" + }, + "cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" + }, + "cookiejar": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.2.tgz", + "integrity": "sha512-Mw+adcfzPxcPeI+0WlvRrr/3lGVO0bD75SxX6811cxSh1Wbxx7xZBGK1eVtDf6si8rg2lhnUjsVLMFMfbRIuwA==" + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "cors": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", + "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", + "requires": { + "object-assign": "^4", + "vary": "^1" + } + }, "cosmiconfig": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.0.0.tgz", @@ -1054,6 +1501,61 @@ "yaml": "^1.10.0" } }, + "create-ecdh": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz", + "integrity": "sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==", + "requires": { + "bn.js": "^4.1.0", + "elliptic": "^6.5.3" + }, + "dependencies": { + "bn.js": { + "version": "4.11.9", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" + }, + "elliptic": { + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz", + "integrity": "sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==", + "requires": { + "bn.js": "^4.4.0", + "brorand": "^1.0.1", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.0" + } + } + } + }, + "create-hash": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "requires": { + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" + } + }, + "create-hmac": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", + "requires": { + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, "cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -1074,6 +1576,41 @@ } } }, + "crypto-browserify": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", + "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", + "requires": { + "browserify-cipher": "^1.0.0", + "browserify-sign": "^4.0.0", + "create-ecdh": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.0", + "diffie-hellman": "^5.0.0", + "inherits": "^2.0.1", + "pbkdf2": "^3.0.3", + "public-encrypt": "^4.0.0", + "randombytes": "^2.0.0", + "randomfill": "^1.0.3" + } + }, + "d": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", + "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", + "requires": { + "es5-ext": "^0.10.50", + "type": "^1.0.1" + } + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "requires": { + "assert-plus": "^1.0.0" + } + }, "debug": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", @@ -1118,6 +1655,11 @@ "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=" }, + "defer-to-connect": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz", + "integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==" + }, "deffy": { "version": "2.2.4", "resolved": "https://registry.npmjs.org/deffy/-/deffy-2.2.4.tgz", @@ -1134,11 +1676,52 @@ "object-keys": "^1.0.12" } }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" + }, + "depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" + }, + "des.js": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz", + "integrity": "sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==", + "requires": { + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, + "destroy": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", + "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" + }, "diff": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==" }, + "diffie-hellman": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", + "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", + "requires": { + "bn.js": "^4.1.0", + "miller-rabin": "^4.0.0", + "randombytes": "^2.0.0" + }, + "dependencies": { + "bn.js": { + "version": "4.11.9", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" + } + } + }, "doctrine": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", @@ -1157,6 +1740,25 @@ "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-6.2.0.tgz", "integrity": "sha512-HygQCKUBSFl8wKQZBSemMywRWcEDNidvNbjGVyZu3nbZ8qq9ubiPoGLMdRDpfSrpkkm9BXYFkpKxxFX38o/76w==" }, + "duplexer3": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", + "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=" + }, + "ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "requires": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" + }, "elliptic": { "version": "6.5.2", "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.2.tgz", @@ -1183,6 +1785,11 @@ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" }, + "encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" + }, "end-of-stream": { "version": "1.4.4", "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", @@ -1291,6 +1898,40 @@ "is-symbol": "^1.0.2" } }, + "es5-ext": { + "version": "0.10.53", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.53.tgz", + "integrity": "sha512-Xs2Stw6NiNHWypzRTY1MtaG/uJlwCk8kH81920ma8mvN8Xq1gsfhZvpkImLQArw8AHnv8MT2I45J3c0R8slE+Q==", + "requires": { + "es6-iterator": "~2.0.3", + "es6-symbol": "~3.1.3", + "next-tick": "~1.0.0" + } + }, + "es6-iterator": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", + "requires": { + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" + } + }, + "es6-symbol": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", + "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", + "requires": { + "d": "^1.0.1", + "ext": "^1.1.2" + } + }, + "escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" + }, "escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", @@ -1830,13 +2471,30 @@ "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==" }, + "etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" + }, + "eth-ens-namehash": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/eth-ens-namehash/-/eth-ens-namehash-2.0.8.tgz", + "integrity": "sha1-IprEbsqG1S4MmR58sq74P/D2i88=", + "requires": { + "idna-uts46-hx": "^2.3.1", + "js-sha3": "^0.5.7" + } + }, "eth-lib": { - "version": "0.2.8", - "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.8.tgz", - "integrity": "sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw==", + "version": "0.1.29", + "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.1.29.tgz", + "integrity": "sha512-bfttrr3/7gG4E02HoWTDUcDDslN003OlOoBxk9virpAZQ1ja/jDgwkWB8QfJF7ojuEowrqy+lzp9VcJG7/k5bQ==", "requires": { "bn.js": "^4.11.6", "elliptic": "^6.4.0", + "nano-json-stream-parser": "^0.1.2", + "servify": "^0.1.12", + "ws": "^3.0.0", "xhr-request-promise": "^0.1.2" }, "dependencies": { @@ -1844,6 +2502,21 @@ "version": "4.11.9", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "ws": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-3.3.3.tgz", + "integrity": "sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA==", + "requires": { + "async-limiter": "~1.0.0", + "safe-buffer": "~5.1.0", + "ultron": "~1.1.0" + } } } }, @@ -1862,6 +2535,84 @@ } } }, + "ethereum-cryptography": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", + "integrity": "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==", + "requires": { + "@types/pbkdf2": "^3.0.0", + "@types/secp256k1": "^4.0.1", + "blakejs": "^1.1.0", + "browserify-aes": "^1.2.0", + "bs58check": "^2.1.2", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "hash.js": "^1.1.7", + "keccak": "^3.0.0", + "pbkdf2": "^3.0.17", + "randombytes": "^2.1.0", + "safe-buffer": "^5.1.2", + "scrypt-js": "^3.0.0", + "secp256k1": "^4.0.1", + "setimmediate": "^1.0.5" + }, + "dependencies": { + "hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "scrypt-js": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz", + "integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==" + }, + "setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=" + } + } + }, + "ethereumjs-common": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/ethereumjs-common/-/ethereumjs-common-1.5.2.tgz", + "integrity": "sha512-hTfZjwGX52GS2jcVO6E2sx4YuFnf0Fhp5ylo4pEPhEffNln7vS59Hr5sLnp3/QCazFLluuBZ+FZ6J5HTp0EqCA==" + }, + "ethereumjs-tx": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ethereumjs-tx/-/ethereumjs-tx-2.1.2.tgz", + "integrity": "sha512-zZEK1onCeiORb0wyCXUvg94Ve5It/K6GD1K+26KfFKodiBiS6d9lfCXlUKGBBdQ+bv7Day+JK0tj1K+BeNFRAw==", + "requires": { + "ethereumjs-common": "^1.5.0", + "ethereumjs-util": "^6.0.0" + } + }, + "ethereumjs-util": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz", + "integrity": "sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw==", + "requires": { + "@types/bn.js": "^4.11.3", + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "elliptic": "^6.5.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "0.1.6", + "rlp": "^2.2.3" + }, + "dependencies": { + "bn.js": { + "version": "4.11.9", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" + } + } + }, "etherlime-config": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/etherlime-config/-/etherlime-config-1.0.0.tgz", @@ -1975,11 +2726,34 @@ } } }, + "ethjs-util": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/ethjs-util/-/ethjs-util-0.1.6.tgz", + "integrity": "sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w==", + "requires": { + "is-hex-prefixed": "1.0.0", + "strip-hex-prefix": "1.0.0" + } + }, + "eventemitter3": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.4.tgz", + "integrity": "sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ==" + }, "events": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=" }, + "evp_bytestokey": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "requires": { + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" + } + }, "execa": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/execa/-/execa-4.0.3.tgz", @@ -1996,6 +2770,83 @@ "strip-final-newline": "^2.0.0" } }, + "express": { + "version": "4.17.1", + "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz", + "integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==", + "requires": { + "accepts": "~1.3.7", + "array-flatten": "1.1.1", + "body-parser": "1.19.0", + "content-disposition": "0.5.3", + "content-type": "~1.0.4", + "cookie": "0.4.0", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "~1.1.2", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "~1.1.2", + "fresh": "0.5.2", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.5", + "qs": "6.7.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.1.2", + "send": "0.17.1", + "serve-static": "1.14.1", + "setprototypeof": "1.1.1", + "statuses": "~1.5.0", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + } + } + }, + "ext": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/ext/-/ext-1.4.0.tgz", + "integrity": "sha512-Key5NIsUxdqKg3vIsdw9dSuXpPCQ297y6wBjL30edxwPgt2E44WcWBZey/ZvUc6sERLTxKdyCu4gZFmUbk1Q7A==", + "requires": { + "type": "^2.0.0" + }, + "dependencies": { + "type": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/type/-/type-2.1.0.tgz", + "integrity": "sha512-G9absDWvhAWCV2gmF1zKud3OyC61nZDwWvBL2DApaVFogI07CprggiQAOOjvp2NRjYWFzPyu7vwtDrQFq8jeSA==" + } + } + }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + }, "external-editor": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", @@ -2006,6 +2857,11 @@ "tmp": "^0.0.33" } }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" + }, "fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -2050,6 +2906,35 @@ "to-regex-range": "^5.0.1" } }, + "finalhandler": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", + "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", + "requires": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "statuses": "~1.5.0", + "unpipe": "~1.0.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + } + } + }, "find-up": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", @@ -2118,6 +3003,31 @@ "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.0.tgz", "integrity": "sha512-aq6gF1BEKje4a9i9+5jimNFIpq4Q1WiwBToeRK5NvZBd/TRsmW8BsJfOEGkr76TbOyPVD3OVDN910EcUNtRYEA==" }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" + }, + "form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, + "forwarded": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", + "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=" + }, + "fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" + }, "fs-extra": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", @@ -2128,6 +3038,14 @@ "universalify": "^0.1.0" } }, + "fs-minipass": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.7.tgz", + "integrity": "sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==", + "requires": { + "minipass": "^2.6.0" + } + }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -2854,6 +3772,14 @@ "pump": "^3.0.0" } }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "requires": { + "assert-plus": "^1.0.0" + } + }, "glob": { "version": "5.0.15", "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", @@ -2888,6 +3814,34 @@ "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==" }, + "got": { + "version": "9.6.0", + "resolved": "https://registry.npmjs.org/got/-/got-9.6.0.tgz", + "integrity": "sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==", + "requires": { + "@sindresorhus/is": "^0.14.0", + "@szmarczak/http-timer": "^1.1.2", + "cacheable-request": "^6.0.0", + "decompress-response": "^3.3.0", + "duplexer3": "^0.1.4", + "get-stream": "^4.1.0", + "lowercase-keys": "^1.0.1", + "mimic-response": "^1.0.1", + "p-cancelable": "^1.0.0", + "to-readable-stream": "^1.0.0", + "url-parse-lax": "^3.0.0" + }, + "dependencies": { + "get-stream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "requires": { + "pump": "^3.0.0" + } + } + } + }, "graceful-fs": { "version": "4.2.4", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", @@ -2917,6 +3871,20 @@ } } }, + "har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" + }, + "har-validator": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", + "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", + "requires": { + "ajv": "^6.12.3", + "har-schema": "^2.0.0" + } + }, "has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", @@ -2930,11 +3898,34 @@ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" }, + "has-symbol-support-x": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz", + "integrity": "sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw==" + }, "has-symbols": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==" }, + "has-to-string-tag-x": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz", + "integrity": "sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw==", + "requires": { + "has-symbol-support-x": "^1.4.1" + } + }, + "hash-base": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", + "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", + "requires": { + "inherits": "^2.0.4", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + } + }, "hash.js": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", @@ -2965,6 +3956,45 @@ "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==", "dev": true }, + "http-cache-semantics": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", + "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==" + }, + "http-errors": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", + "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==", + "requires": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.1", + "statuses": ">= 1.5.0 < 2", + "toidentifier": "1.0.0" + }, + "dependencies": { + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + } + } + }, + "http-https": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/http-https/-/http-https-1.0.0.tgz", + "integrity": "sha1-L5CN1fHbQGjAWM1ubUzjkskTOJs=" + }, + "http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "requires": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + } + }, "human-signals": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz", @@ -3040,6 +4070,21 @@ "safer-buffer": ">= 2.1.2 < 3" } }, + "idna-uts46-hx": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/idna-uts46-hx/-/idna-uts46-hx-2.3.1.tgz", + "integrity": "sha512-PWoF9Keq6laYdIRwwCdhTPl60xRqAloYNMQLiyUnG42VjT53oW07BXIRM+NK7eQjzXjAk2gUvX9caRxlnF9TAA==", + "requires": { + "punycode": "2.1.0" + }, + "dependencies": { + "punycode": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.0.tgz", + "integrity": "sha1-X4Y+3Im5bbCQdLrXlHvwkFbKTn0=" + } + } + }, "ieee754": { "version": "1.1.13", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz", @@ -3181,6 +4226,11 @@ } } }, + "ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==" + }, "is-arguments": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.0.4.tgz", @@ -3274,6 +4324,11 @@ "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=" }, + "is-object": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-object/-/is-object-1.0.1.tgz", + "integrity": "sha1-iVJojF7C/9awPsyF52ngKQMINHA=" + }, "is-plain-obj": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", @@ -3292,6 +4347,11 @@ "resolved": "https://registry.npmjs.org/is-regexp/-/is-regexp-1.0.0.tgz", "integrity": "sha1-/S2INUXEa6xaYz57mgnof6LLUGk=" }, + "is-retry-allowed": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz", + "integrity": "sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg==" + }, "is-set": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.1.tgz", @@ -3315,6 +4375,11 @@ "has-symbols": "^1.0.1" } }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" + }, "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", @@ -3325,6 +4390,11 @@ "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" + }, "istanbul": { "version": "0.4.5", "resolved": "https://registry.npmjs.org/istanbul/-/istanbul-0.4.5.tgz", @@ -3361,6 +4431,15 @@ } } }, + "isurl": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isurl/-/isurl-1.0.0.tgz", + "integrity": "sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w==", + "requires": { + "has-to-string-tag-x": "^1.2.0", + "is-object": "^1.0.1" + } + }, "iterate-iterator": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/iterate-iterator/-/iterate-iterator-1.0.1.tgz", @@ -3406,6 +4485,16 @@ } } }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" + }, + "json-buffer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", + "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=" + }, "json-parse-better-errors": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", @@ -3416,6 +4505,11 @@ "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==" }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" + }, "json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", @@ -3426,6 +4520,11 @@ "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=" }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" + }, "json5": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", @@ -3443,6 +4542,41 @@ "graceful-fs": "^4.1.6" } }, + "jsprim": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + } + }, + "keccak": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/keccak/-/keccak-3.0.1.tgz", + "integrity": "sha512-epq90L9jlFWCW7+pQa6JOnKn2Xgl2mtI664seYR6MHskvI9agt7AnDqmAlp9TqU4/caMYbA08Hi5DMZAl5zdkA==", + "requires": { + "node-addon-api": "^2.0.0", + "node-gyp-build": "^4.2.0" + }, + "dependencies": { + "node-gyp-build": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.2.3.tgz", + "integrity": "sha512-MN6ZpzmfNCRM+3t57PTJHgHyw/h4OWnZ6mR8P5j/uZtqQr46RRuDE/P+g3n0YR/AiYXeWixZZzaip77gdICfRg==" + } + } + }, + "keyv": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz", + "integrity": "sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==", + "requires": { + "json-buffer": "3.0.0" + } + }, "klaw": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz", @@ -3730,16 +4864,46 @@ } } }, + "lowercase-keys": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", + "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==" + }, + "md5.js": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", + "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" + }, "memorystream": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", "integrity": "sha1-htcJCzDORV1j+64S3aUaR93K+bI=" }, + "merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" + }, "merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==" }, + "methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" + }, "micromatch": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz", @@ -3749,6 +4913,40 @@ "picomatch": "^2.0.5" } }, + "miller-rabin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", + "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", + "requires": { + "bn.js": "^4.0.0", + "brorand": "^1.0.1" + }, + "dependencies": { + "bn.js": { + "version": "4.11.9", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" + } + } + }, + "mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" + }, + "mime-db": { + "version": "1.44.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz", + "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==" + }, + "mime-types": { + "version": "2.1.27", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz", + "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==", + "requires": { + "mime-db": "1.44.0" + } + }, "mimic-fn": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", @@ -3790,6 +4988,23 @@ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" }, + "minipass": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz", + "integrity": "sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==", + "requires": { + "safe-buffer": "^5.1.2", + "yallist": "^3.0.0" + } + }, + "minizlib": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.3.3.tgz", + "integrity": "sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q==", + "requires": { + "minipass": "^2.9.0" + } + }, "mkdirp": { "version": "0.5.5", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", @@ -3798,6 +5013,14 @@ "minimist": "^1.2.5" } }, + "mkdirp-promise": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/mkdirp-promise/-/mkdirp-promise-5.0.1.tgz", + "integrity": "sha1-6bj2jlUsaKnBcTuEiD96HdA5uKE=", + "requires": { + "mkdirp": "*" + } + }, "mocha": { "version": "8.1.2", "resolved": "https://registry.npmjs.org/mocha/-/mocha-8.1.2.tgz", @@ -3917,36 +5140,124 @@ } } }, + "mock-fs": { + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/mock-fs/-/mock-fs-4.13.0.tgz", + "integrity": "sha512-DD0vOdofJdoaRNtnWcrXe6RQbpHkPPmtqGq14uRX0F8ZKJ5nv89CVTYl/BZdppDxBDaV0hl75htg3abpEWlPZA==" + }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, + "multibase": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/multibase/-/multibase-0.6.1.tgz", + "integrity": "sha512-pFfAwyTjbbQgNc3G7D48JkJxWtoJoBMaR4xQUOuB8RnCgRqaYmWNFeJTTvrJ2w51bjLq2zTby6Rqj9TQ9elSUw==", + "requires": { + "base-x": "^3.0.8", + "buffer": "^5.5.0" + }, + "dependencies": { + "buffer": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.6.0.tgz", + "integrity": "sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw==", + "requires": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4" + } + } + } + }, + "multicodec": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-0.5.7.tgz", + "integrity": "sha512-PscoRxm3f+88fAtELwUnZxGDkduE2HD9Q6GHUOywQLjOGT/HAdhjLDYNZ1e7VR0s0TP0EwZ16LNUTFpoBGivOA==", + "requires": { + "varint": "^5.0.0" + } + }, + "multihashes": { + "version": "0.4.21", + "resolved": "https://registry.npmjs.org/multihashes/-/multihashes-0.4.21.tgz", + "integrity": "sha512-uVSvmeCWf36pU2nB4/1kzYZjsXD9vofZKpgudqkceYY5g2aZZXJ5r9lxuzoRLl1OAp28XljXsEJ/X/85ZsKmKw==", + "requires": { + "buffer": "^5.5.0", + "multibase": "^0.7.0", + "varint": "^5.0.0" + }, + "dependencies": { + "buffer": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.6.0.tgz", + "integrity": "sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw==", + "requires": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4" + } + }, + "multibase": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/multibase/-/multibase-0.7.0.tgz", + "integrity": "sha512-TW8q03O0f6PNFTQDvh3xxH03c8CjGaaYrjkl9UQPG6rz53TQzzxJVCIWVjzcbN/Q5Y53Zd0IBQBMVktVgNx4Fg==", + "requires": { + "base-x": "^3.0.8", + "buffer": "^5.5.0" + } + } + } + }, "mute-stream": { "version": "0.0.8", "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==" }, + "nano-json-stream-parser": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/nano-json-stream-parser/-/nano-json-stream-parser-0.1.2.tgz", + "integrity": "sha1-DMj20OK2IrR5xA1JnEbWS3Vcb18=" + }, "natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=" }, + "negotiator": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", + "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==" + }, "neo-async": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==" }, + "next-tick": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", + "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=" + }, "nice-try": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==" }, + "node-addon-api": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-2.0.2.tgz", + "integrity": "sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==" + }, "node-fetch": { "version": "2.6.1", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==" }, + "node-gyp-build": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-3.7.0.tgz", + "integrity": "sha512-L/Eg02Epx6Si2NXmedx+Okg+4UHqmaf3TNcxd50SF9NQGcJaON3AtU++kax69XV7YWz4tUspqZSAsVofhFKG2w==" + }, "noop6": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/noop6/-/noop6-1.0.9.tgz", @@ -3995,6 +5306,11 @@ "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" }, + "normalize-url": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.0.tgz", + "integrity": "sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ==" + }, "npm-run-path": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", @@ -4024,6 +5340,11 @@ } } }, + "oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==" + }, "object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", @@ -4073,6 +5394,22 @@ "has": "^1.0.3" } }, + "oboe": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/oboe/-/oboe-2.1.5.tgz", + "integrity": "sha1-VVQoTFQ6ImbXo48X4HOCH73jk80=", + "requires": { + "http-https": "^1.0.0" + } + }, + "on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "requires": { + "ee-first": "1.1.1" + } + }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -4122,6 +5459,16 @@ "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" }, + "p-cancelable": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz", + "integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==" + }, + "p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=" + }, "p-limit": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", @@ -4146,6 +5493,14 @@ "aggregate-error": "^3.0.0" } }, + "p-timeout": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-1.2.1.tgz", + "integrity": "sha1-XrOzU7f86Z8QGhA4iAuwVOu+o4Y=", + "requires": { + "p-finally": "^1.0.0" + } + }, "p-try": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", @@ -4159,6 +5514,18 @@ "callsites": "^3.0.0" } }, + "parse-asn1": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.6.tgz", + "integrity": "sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw==", + "requires": { + "asn1.js": "^5.2.0", + "browserify-aes": "^1.0.0", + "evp_bytestokey": "^1.0.0", + "pbkdf2": "^3.0.3", + "safe-buffer": "^5.1.1" + } + }, "parse-headers": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/parse-headers/-/parse-headers-2.0.3.tgz", @@ -4175,6 +5542,11 @@ "lines-and-columns": "^1.1.6" } }, + "parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" + }, "path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -4201,6 +5573,11 @@ "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", "dev": true }, + "path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" + }, "path-type": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", @@ -4211,6 +5588,23 @@ "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.0.tgz", "integrity": "sha1-uULm1L3mUwBe9rcTYd74cn0GReA=" }, + "pbkdf2": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.1.tgz", + "integrity": "sha512-4Ejy1OPxi9f2tt1rRV7Go7zmfDQ+ZectEQz3VGUQhgq62HtIRPDyG/JtnwIxs6x3uNMwo2V7q1fMvKjb+Tnpqg==", + "requires": { + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4", + "ripemd160": "^2.0.1", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" + }, "picomatch": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", @@ -4243,6 +5637,11 @@ "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=" }, + "prepend-http": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", + "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=" + }, "prettier": { "version": "1.19.1", "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.19.1.tgz", @@ -4271,6 +5670,40 @@ "iterate-value": "^1.0.0" } }, + "proxy-addr": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.6.tgz", + "integrity": "sha512-dh/frvCBVmSsDYzw6n926jv974gddhkFPfiN8hPOi30Wax25QZyZEGveluCgliBnqmuM+UJmBErbAUFIoDbjOw==", + "requires": { + "forwarded": "~0.1.2", + "ipaddr.js": "1.9.1" + } + }, + "psl": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", + "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==" + }, + "public-encrypt": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", + "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", + "requires": { + "bn.js": "^4.1.0", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "parse-asn1": "^5.0.0", + "randombytes": "^2.0.1", + "safe-buffer": "^5.1.2" + }, + "dependencies": { + "bn.js": { + "version": "4.11.9", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" + } + } + }, "pump": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", @@ -4285,6 +5718,11 @@ "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" }, + "qs": { + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", + "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==" + }, "query-string": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/query-string/-/query-string-5.1.1.tgz", @@ -4308,6 +5746,31 @@ "safe-buffer": "^5.1.0" } }, + "randomfill": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", + "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", + "requires": { + "randombytes": "^2.0.5", + "safe-buffer": "^5.1.0" + } + }, + "range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==" + }, + "raw-body": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz", + "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==", + "requires": { + "bytes": "3.1.0", + "http-errors": "1.7.2", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + } + }, "read-pkg": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", @@ -4391,6 +5854,16 @@ } } }, + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, "readdirp": { "version": "3.4.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.4.0.tgz", @@ -4404,6 +5877,40 @@ "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==" }, + "request": { + "version": "2.88.2", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", + "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.3", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.5.0", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + }, + "dependencies": { + "qs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" + } + } + }, "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -4429,6 +5936,14 @@ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==" }, + "responselike": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", + "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", + "requires": { + "lowercase-keys": "^1.0.0" + } + }, "restore-cursor": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", @@ -4461,6 +5976,30 @@ } } }, + "ripemd160": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", + "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, + "rlp": { + "version": "2.2.6", + "resolved": "https://registry.npmjs.org/rlp/-/rlp-2.2.6.tgz", + "integrity": "sha512-HAfAmL6SDYNWPUOJNrM500x4Thn4PZsEy5pijPh40U9WfNk0z15hUYzO9xVIMAdIHdFtD8CBDHd75Td1g36Mjg==", + "requires": { + "bn.js": "^4.11.1" + }, + "dependencies": { + "bn.js": { + "version": "4.11.9", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" + } + } + }, "run-async": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", @@ -4494,6 +6033,23 @@ "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-2.0.4.tgz", "integrity": "sha512-4KsaGcPnuhtCZQCxFxN3GVYIhKFPTdLd8PLC552XwbMndtD0cjRFAhDuuydXQ0h08ZfPgzqe6EKHozpuH74iDw==" }, + "secp256k1": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-4.0.2.tgz", + "integrity": "sha512-UDar4sKvWAksIlfX3xIaQReADn+WFnHvbVujpcbr+9Sf/69odMwy2MUsz5CKLQgX9nsIyrjuxL2imVyoNHa3fg==", + "requires": { + "elliptic": "^6.5.2", + "node-addon-api": "^2.0.0", + "node-gyp-build": "^4.2.0" + }, + "dependencies": { + "node-gyp-build": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.2.3.tgz", + "integrity": "sha512-MN6ZpzmfNCRM+3t57PTJHgHyw/h4OWnZ6mR8P5j/uZtqQr46RRuDE/P+g3n0YR/AiYXeWixZZzaip77gdICfRg==" + } + } + }, "semver": { "version": "7.3.2", "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz", @@ -4509,6 +6065,48 @@ "resolved": "https://registry.npmjs.org/semver-regex/-/semver-regex-2.0.0.tgz", "integrity": "sha512-mUdIBBvdn0PLOeP3TEkMH7HHeUP3GjsXCwKarjv/kGmUFOYg1VqEemKhoQpWMu6X2I8kHeuVdGibLGkVK+/5Qw==" }, + "send": { + "version": "0.17.1", + "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", + "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==", + "requires": { + "debug": "2.6.9", + "depd": "~1.1.2", + "destroy": "~1.0.4", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "~1.7.2", + "mime": "1.6.0", + "ms": "2.1.1", + "on-finished": "~2.3.0", + "range-parser": "~1.2.1", + "statuses": "~1.5.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + }, + "dependencies": { + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + } + } + }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" + } + } + }, "serialize-javascript": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-4.0.0.tgz", @@ -4517,6 +6115,29 @@ "randombytes": "^2.1.0" } }, + "serve-static": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz", + "integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==", + "requires": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.17.1" + } + }, + "servify": { + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/servify/-/servify-0.1.12.tgz", + "integrity": "sha512-/xE6GvsKKqyo1BAY+KxOWXcLpPsUUyji7Qg3bVD7hh1eRze5bR1uYiuDA/k3Gof1s9BTzQZEJK8sNcNGFIzeWw==", + "requires": { + "body-parser": "^1.16.0", + "cors": "^2.8.1", + "express": "^4.14.0", + "request": "^2.79.0", + "xhr": "^2.3.3" + } + }, "set-blocking": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", @@ -4527,6 +6148,20 @@ "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.4.tgz", "integrity": "sha1-IOgd5iLUoCWIzgyNqJc8vPHTE48=" }, + "setprototypeof": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", + "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==" + }, + "sha.js": { + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, "shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -5018,6 +6653,27 @@ "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" }, + "sshpk": { + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", + "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", + "requires": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + } + }, + "statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" + }, "strict-uri-encode": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", @@ -5056,6 +6712,14 @@ "es-abstract": "^1.17.5" } }, + "string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "requires": { + "safe-buffer": "~5.2.0" + } + }, "stringify-object": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/stringify-object/-/stringify-object-3.3.0.tgz", @@ -5106,6 +6770,99 @@ "has-flag": "^3.0.0" } }, + "swarm-js": { + "version": "0.1.40", + "resolved": "https://registry.npmjs.org/swarm-js/-/swarm-js-0.1.40.tgz", + "integrity": "sha512-yqiOCEoA4/IShXkY3WKwP5PvZhmoOOD8clsKA7EEcRILMkTEYHCQ21HDCAcVpmIxZq4LyZvWeRJ6quIyHk1caA==", + "requires": { + "bluebird": "^3.5.0", + "buffer": "^5.0.5", + "eth-lib": "^0.1.26", + "fs-extra": "^4.0.2", + "got": "^7.1.0", + "mime-types": "^2.1.16", + "mkdirp-promise": "^5.0.1", + "mock-fs": "^4.1.0", + "setimmediate": "^1.0.5", + "tar": "^4.0.2", + "xhr-request": "^1.0.1" + }, + "dependencies": { + "buffer": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.6.0.tgz", + "integrity": "sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw==", + "requires": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4" + } + }, + "fs-extra": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz", + "integrity": "sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==", + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "get-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=" + }, + "got": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/got/-/got-7.1.0.tgz", + "integrity": "sha512-Y5WMo7xKKq1muPsxD+KmrR8DH5auG7fBdDVueZwETwV6VytKyU9OX/ddpq2/1hp1vIPvVb4T81dKQz3BivkNLw==", + "requires": { + "decompress-response": "^3.2.0", + "duplexer3": "^0.1.4", + "get-stream": "^3.0.0", + "is-plain-obj": "^1.1.0", + "is-retry-allowed": "^1.0.0", + "is-stream": "^1.0.0", + "isurl": "^1.0.0-alpha5", + "lowercase-keys": "^1.0.0", + "p-cancelable": "^0.3.0", + "p-timeout": "^1.1.1", + "safe-buffer": "^5.0.1", + "timed-out": "^4.0.0", + "url-parse-lax": "^1.0.0", + "url-to-options": "^1.0.1" + } + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" + }, + "p-cancelable": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.3.0.tgz", + "integrity": "sha512-RVbZPLso8+jFeq1MfNvgXtCRED2raz/dKpacfTNxsx6pLEpEomM7gah6VeHSYV3+vo0OAi4MkArtQcWWXuQoyw==" + }, + "prepend-http": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", + "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=" + }, + "setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=" + }, + "url-parse-lax": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", + "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", + "requires": { + "prepend-http": "^1.0.1" + } + } + } + }, "table": { "version": "5.4.6", "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", @@ -5172,6 +6929,20 @@ } } }, + "tar": { + "version": "4.4.13", + "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.13.tgz", + "integrity": "sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA==", + "requires": { + "chownr": "^1.1.1", + "fs-minipass": "^1.2.5", + "minipass": "^2.8.6", + "minizlib": "^1.2.1", + "mkdirp": "^0.5.0", + "safe-buffer": "^5.1.2", + "yallist": "^3.0.3" + } + }, "text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", @@ -5206,6 +6977,11 @@ "os-tmpdir": "~1.0.2" } }, + "to-readable-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz", + "integrity": "sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==" + }, "to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -5214,6 +6990,20 @@ "is-number": "^7.0.0" } }, + "toidentifier": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", + "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==" + }, + "tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "requires": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + } + }, "truffle": { "version": "5.1.49", "resolved": "https://registry.npmjs.org/truffle/-/truffle-5.1.49.tgz", @@ -5241,6 +7031,24 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" + }, + "type": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", + "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==" + }, "type-check": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", @@ -5259,6 +7067,23 @@ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.11.0.tgz", "integrity": "sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ==" }, + "type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "requires": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + } + }, + "typedarray-to-buffer": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", + "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", + "requires": { + "is-typedarray": "^1.0.0" + } + }, "typescript": { "version": "3.9.7", "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.7.tgz", @@ -5287,6 +7112,11 @@ "typpy": "^2.3.4" } }, + "ultron": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz", + "integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==" + }, "underscore": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.9.1.tgz", @@ -5297,6 +7127,11 @@ "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" }, + "unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" + }, "uri-js": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.0.tgz", @@ -5321,16 +7156,47 @@ } } }, + "url-parse-lax": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", + "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", + "requires": { + "prepend-http": "^2.0.0" + } + }, "url-set-query": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/url-set-query/-/url-set-query-1.0.0.tgz", "integrity": "sha1-AW6M/Xwg7gXK/neV6JK9BwL6ozk=" }, + "url-to-options": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/url-to-options/-/url-to-options-1.0.1.tgz", + "integrity": "sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k=" + }, + "utf-8-validate": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.2.tgz", + "integrity": "sha512-SwV++i2gTD5qh2XqaPzBnNX88N6HdyhQrNNRykvcS0QKvItV9u3vPEJr+X5Hhfb1JC0r0e1alL0iB09rY8+nmw==", + "requires": { + "node-gyp-build": "~3.7.0" + } + }, "utf8": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/utf8/-/utf8-3.0.0.tgz", "integrity": "sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ==" }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" + }, "uuid": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", @@ -5352,6 +7218,138 @@ "spdx-expression-parse": "^3.0.0" } }, + "varint": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/varint/-/varint-5.0.2.tgz", + "integrity": "sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow==" + }, + "vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" + }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "requires": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "web3": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/web3/-/web3-1.3.0.tgz", + "integrity": "sha512-4q9dna0RecnrlgD/bD1C5S+81Untbd6Z/TBD7rb+D5Bvvc0Wxjr4OP70x+LlnwuRDjDtzBwJbNUblh2grlVArw==", + "requires": { + "web3-bzz": "1.3.0", + "web3-core": "1.3.0", + "web3-eth": "1.3.0", + "web3-eth-personal": "1.3.0", + "web3-net": "1.3.0", + "web3-shh": "1.3.0", + "web3-utils": "1.3.0" + } + }, + "web3-bzz": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.3.0.tgz", + "integrity": "sha512-ibYAnKab+sgTo/UdfbrvYfWblXjjgSMgyy9/FHa6WXS14n/HVB+HfWqGz2EM3fok8Wy5XoKGMvdqvERQ/mzq1w==", + "requires": { + "@types/node": "^12.12.6", + "got": "9.6.0", + "swarm-js": "^0.1.40", + "underscore": "1.9.1" + } + }, + "web3-core": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.3.0.tgz", + "integrity": "sha512-BwWvAaKJf4KFG9QsKRi3MNoNgzjI6szyUlgme1qNPxUdCkaS3Rdpa0VKYNHP7M/YTk82/59kNE66mH5vmoaXjA==", + "requires": { + "@types/bn.js": "^4.11.5", + "@types/node": "^12.12.6", + "bignumber.js": "^9.0.0", + "web3-core-helpers": "1.3.0", + "web3-core-method": "1.3.0", + "web3-core-requestmanager": "1.3.0", + "web3-utils": "1.3.0" + } + }, + "web3-core-helpers": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.3.0.tgz", + "integrity": "sha512-+MFb1kZCrRctf7UYE7NCG4rGhSXaQJ/KF07di9GVK1pxy1K0+rFi61ZobuV1ky9uQp+uhhSPts4Zp55kRDB5sw==", + "requires": { + "underscore": "1.9.1", + "web3-eth-iban": "1.3.0", + "web3-utils": "1.3.0" + } + }, + "web3-core-method": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.3.0.tgz", + "integrity": "sha512-h0yFDrYVzy5WkLxC/C3q+hiMnzxdWm9p1T1rslnuHgOp6nYfqzu/6mUIXrsS4h/OWiGJt+BZ0xVZmtC31HDWtg==", + "requires": { + "@ethersproject/transactions": "^5.0.0-beta.135", + "underscore": "1.9.1", + "web3-core-helpers": "1.3.0", + "web3-core-promievent": "1.3.0", + "web3-core-subscriptions": "1.3.0", + "web3-utils": "1.3.0" + } + }, + "web3-core-promievent": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.3.0.tgz", + "integrity": "sha512-blv69wrXw447TP3iPvYJpllkhW6B18nfuEbrfcr3n2Y0v1Jx8VJacNZFDFsFIcgXcgUIVCtOpimU7w9v4+rtaw==", + "requires": { + "eventemitter3": "4.0.4" + } + }, + "web3-core-requestmanager": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.3.0.tgz", + "integrity": "sha512-3yMbuGcomtzlmvTVqNRydxsx7oPlw3ioRL6ReF9PeNYDkUsZaUib+6Dp5eBt7UXh5X+SIn/xa1smhDHz5/HpAw==", + "requires": { + "underscore": "1.9.1", + "web3-core-helpers": "1.3.0", + "web3-providers-http": "1.3.0", + "web3-providers-ipc": "1.3.0", + "web3-providers-ws": "1.3.0" + } + }, + "web3-core-subscriptions": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.3.0.tgz", + "integrity": "sha512-MUUQUAhJDb+Nz3S97ExVWveH4utoUnsbPWP+q1HJH437hEGb4vunIb9KvN3hFHLB+aHJfPeStM/4yYTz5PeuyQ==", + "requires": { + "eventemitter3": "4.0.4", + "underscore": "1.9.1", + "web3-core-helpers": "1.3.0" + } + }, + "web3-eth": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.3.0.tgz", + "integrity": "sha512-/bzJcxXPM9EM18JM5kO2JjZ3nEqVo3HxqU93aWAEgJNqaP/Lltmufl2GpvIB2Hvj+FXAjAXquxUdQ2/xP7BzHQ==", + "requires": { + "underscore": "1.9.1", + "web3-core": "1.3.0", + "web3-core-helpers": "1.3.0", + "web3-core-method": "1.3.0", + "web3-core-subscriptions": "1.3.0", + "web3-eth-abi": "1.3.0", + "web3-eth-accounts": "1.3.0", + "web3-eth-contract": "1.3.0", + "web3-eth-ens": "1.3.0", + "web3-eth-iban": "1.3.0", + "web3-eth-personal": "1.3.0", + "web3-net": "1.3.0", + "web3-utils": "1.3.0" + } + }, "web3-eth-abi": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.3.0.tgz", @@ -5380,6 +7378,158 @@ } } }, + "web3-eth-accounts": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.3.0.tgz", + "integrity": "sha512-/Q7EVW4L2wWUbNRtOTwAIrYvJid/5UnKMw67x/JpvRMwYC+e+744P536Ja6SG4X3MnzFvd3E/jruV4qa6k+zIw==", + "requires": { + "crypto-browserify": "3.12.0", + "eth-lib": "0.2.8", + "ethereumjs-common": "^1.3.2", + "ethereumjs-tx": "^2.1.1", + "scrypt-js": "^3.0.1", + "underscore": "1.9.1", + "uuid": "3.3.2", + "web3-core": "1.3.0", + "web3-core-helpers": "1.3.0", + "web3-core-method": "1.3.0", + "web3-utils": "1.3.0" + }, + "dependencies": { + "bn.js": { + "version": "4.11.9", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" + }, + "eth-lib": { + "version": "0.2.8", + "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.8.tgz", + "integrity": "sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw==", + "requires": { + "bn.js": "^4.11.6", + "elliptic": "^6.4.0", + "xhr-request-promise": "^0.1.2" + } + }, + "scrypt-js": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz", + "integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==" + } + } + }, + "web3-eth-contract": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.3.0.tgz", + "integrity": "sha512-3SCge4SRNCnzLxf0R+sXk6vyTOl05g80Z5+9/B5pERwtPpPWaQGw8w01vqYqsYBKC7zH+dxhMaUgVzU2Dgf7bQ==", + "requires": { + "@types/bn.js": "^4.11.5", + "underscore": "1.9.1", + "web3-core": "1.3.0", + "web3-core-helpers": "1.3.0", + "web3-core-method": "1.3.0", + "web3-core-promievent": "1.3.0", + "web3-core-subscriptions": "1.3.0", + "web3-eth-abi": "1.3.0", + "web3-utils": "1.3.0" + } + }, + "web3-eth-ens": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/web3-eth-ens/-/web3-eth-ens-1.3.0.tgz", + "integrity": "sha512-WnOru+EcuM5dteiVYJcHXo/I7Wq+ei8RrlS2nir49M0QpYvUPGbCGgTbifcjJQTWamgORtWdljSA1s2Asdb74w==", + "requires": { + "content-hash": "^2.5.2", + "eth-ens-namehash": "2.0.8", + "underscore": "1.9.1", + "web3-core": "1.3.0", + "web3-core-helpers": "1.3.0", + "web3-core-promievent": "1.3.0", + "web3-eth-abi": "1.3.0", + "web3-eth-contract": "1.3.0", + "web3-utils": "1.3.0" + } + }, + "web3-eth-iban": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.3.0.tgz", + "integrity": "sha512-v9mZWhR4fPF17/KhHLiWir4YHWLe09O3B/NTdhWqw3fdAMJNztzMHGzgHxA/4fU+rhrs/FhDzc4yt32zMEXBZw==", + "requires": { + "bn.js": "^4.11.9", + "web3-utils": "1.3.0" + }, + "dependencies": { + "bn.js": { + "version": "4.11.9", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" + } + } + }, + "web3-eth-personal": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.3.0.tgz", + "integrity": "sha512-2czUhElsJdLpuNfun9GeLiClo5O6Xw+bLSjl3f4bNG5X2V4wcIjX2ygep/nfstLLtkz8jSkgl/bV7esANJyeRA==", + "requires": { + "@types/node": "^12.12.6", + "web3-core": "1.3.0", + "web3-core-helpers": "1.3.0", + "web3-core-method": "1.3.0", + "web3-net": "1.3.0", + "web3-utils": "1.3.0" + } + }, + "web3-net": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.3.0.tgz", + "integrity": "sha512-Xz02KylOyrB2YZzCkysEDrY7RbKxb7LADzx3Zlovfvuby7HBwtXVexXKtoGqksa+ns1lvjQLLQGb+OeLi7Sr7w==", + "requires": { + "web3-core": "1.3.0", + "web3-core-method": "1.3.0", + "web3-utils": "1.3.0" + } + }, + "web3-providers-http": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.3.0.tgz", + "integrity": "sha512-cMKhUI6PqlY/EC+ZDacAxajySBu8AzW8jOjt1Pe/mbRQgS0rcZyvLePGTTuoyaA8C21F8UW+EE5jj7YsNgOuqA==", + "requires": { + "web3-core-helpers": "1.3.0", + "xhr2-cookies": "1.1.0" + } + }, + "web3-providers-ipc": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.3.0.tgz", + "integrity": "sha512-0CrLuRofR+1J38nEj4WsId/oolwQEM6Yl1sOt41S/6bNI7htdkwgVhSloFIMJMDFHtRw229QIJ6wIaKQz0X1Og==", + "requires": { + "oboe": "2.1.5", + "underscore": "1.9.1", + "web3-core-helpers": "1.3.0" + } + }, + "web3-providers-ws": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.3.0.tgz", + "integrity": "sha512-Im5MthhJnJst8nSoq0TgbyOdaiFQFa5r6sHPOVllhgIgViDqzbnlAFW9sNzQ0Q8VXPNfPIQKi9cOrHlSRNPjRw==", + "requires": { + "eventemitter3": "4.0.4", + "underscore": "1.9.1", + "web3-core-helpers": "1.3.0", + "websocket": "^1.0.32" + } + }, + "web3-shh": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/web3-shh/-/web3-shh-1.3.0.tgz", + "integrity": "sha512-IZTojA4VCwVq+7eEIHuL1tJXtU+LJDhO8Y2QmuwetEWW1iBgWCGPHZasipWP+7kDpSm/5lo5GRxL72FF/Os/tA==", + "requires": { + "web3-core": "1.3.0", + "web3-core-method": "1.3.0", + "web3-core-subscriptions": "1.3.0", + "web3-net": "1.3.0" + } + }, "web3-utils": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.3.0.tgz", @@ -5399,6 +7549,44 @@ "version": "4.11.9", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" + }, + "eth-lib": { + "version": "0.2.8", + "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.8.tgz", + "integrity": "sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw==", + "requires": { + "bn.js": "^4.11.6", + "elliptic": "^6.4.0", + "xhr-request-promise": "^0.1.2" + } + } + } + }, + "websocket": { + "version": "1.0.32", + "resolved": "https://registry.npmjs.org/websocket/-/websocket-1.0.32.tgz", + "integrity": "sha512-i4yhcllSP4wrpoPMU2N0TQ/q0O94LRG/eUQjEAamRltjQ1oT1PFFKOG4i877OlJgCG8rw6LrrowJp+TYCEWF7Q==", + "requires": { + "bufferutil": "^4.0.1", + "debug": "^2.2.0", + "es5-ext": "^0.10.50", + "typedarray-to-buffer": "^3.1.5", + "utf-8-validate": "^5.0.2", + "yaeti": "^0.0.6" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" } } }, @@ -5555,6 +7743,14 @@ "xhr-request": "^1.1.0" } }, + "xhr2-cookies": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/xhr2-cookies/-/xhr2-cookies-1.1.0.tgz", + "integrity": "sha1-fXdEnQmZGX8VXLc7I99yUF7YnUg=", + "requires": { + "cookiejar": "^2.1.1" + } + }, "xml2js": { "version": "0.4.19", "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz", @@ -5584,6 +7780,16 @@ "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==" }, + "yaeti": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/yaeti/-/yaeti-0.0.6.tgz", + "integrity": "sha1-8m9ITXJoTPQr7ft2lwqhYI+/lXc=" + }, + "yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" + }, "yaml": { "version": "1.10.0", "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.0.tgz", diff --git a/package.json b/package.json index b9fc91a77..44cc9ff37 100644 --- a/package.json +++ b/package.json @@ -83,6 +83,7 @@ "solhint": "^3.1.0", "tinyreq": "^3.4.1", "truffle": "^5.1.36", + "web3": "^1.2.11", "web3-eth-abi": "^1.2.9" }, "devDependencies": { From 0725f6ef005be3d634b08ced07e7a76d4d0bc2f5 Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Mon, 17 Aug 2020 14:31:15 +0300 Subject: [PATCH 023/113] Refactor .from syntax to truffle variant {from:} --- .etherlime-store/.history.json | 1 + deployment/999_benchmark.js | 20 +--- test/approvedTransfer.js | 2 +- test/baseContracts.js | 4 +- test/baseModule.js | 2 +- test/compoundManager_invest.js | 40 +++---- test/compoundManager_loan.js | 40 +++---- test/ens.js | 14 +-- test/factory.js | 46 ++++---- test/guardianManager.js | 88 +++++++-------- test/kyber.js | 10 +- test/lockManager.js | 30 +++--- test/makerV2Manager_invest.js | 2 +- test/makerV2Manager_loan.js | 192 ++++++++++++++++----------------- test/nftTransfer.js | 7 +- test/recoveryManager.js | 6 +- test/relayer.js | 6 +- test/simpleUpgrader.js | 22 ++-- test/tokenExchanger.js | 6 +- test/transferManager.js | 127 +++++++++++----------- utils/defi-deployer.js | 10 +- utils/relay-manager.js | 4 +- utils/utilities.js | 4 +- 23 files changed, 337 insertions(+), 346 deletions(-) create mode 100644 .etherlime-store/.history.json diff --git a/.etherlime-store/.history.json b/.etherlime-store/.history.json new file mode 100644 index 000000000..394541d6f --- /dev/null +++ b/.etherlime-store/.history.json @@ -0,0 +1 @@ +{"data":{}} diff --git a/deployment/999_benchmark.js b/deployment/999_benchmark.js index b21324b29..621a135e3 100644 --- a/deployment/999_benchmark.js +++ b/deployment/999_benchmark.js @@ -366,16 +366,16 @@ class Benchmark { } async estimateLockWalletDirect() { - const gasUsed = await this.LockManagerWrapper.from(this.firstGuardian).estimate.lock(this.walletAddress); + const gasUsed = await this.LockManagerWrapper.estimate.lock(this.walletAddress, { from: this.firstGuardian }); this._logger.addItem("Lock wallet (direct)", gasUsed); } async estimateUnlockWalletDirect() { // lock wallet - await this.LockManagerWrapper.from(this.firstGuardian).lock(this.walletAddress); + await this.LockManagerWrapper.lock(this.walletAddress, { from: this.firstGuardian }); // estimate unlock wallet - const gasUsed = await this.LockManagerWrapper.from(this.firstGuardian).estimate.unlock(this.walletAddress); + const gasUsed = await this.LockManagerWrapper.estimate.unlock(this.walletAddress, { from: this.firstGuardian }); this._logger.addItem("Unlock wallet (direct)", gasUsed); } @@ -517,20 +517,6 @@ class Benchmark { this._logger.addItem("ETH large transfer to untrusted account", gasUsed); } -<<<<<<< HEAD -======= - // async estimateExecuteETHLargeTransferToUntrustedAccount() { - // const tx = await this.TokenTransferWrapper.transferToken(this.walletAddress, ETH_TOKEN, this.accounts[2], 2000000, "0x"); - // const result = await this.TokenTransferWrapper.verboseWaitForTransaction(tx, ''); - // const block = result.blockNumber; - // console.log(block); - - // await increaseTime(this.config.settings.securityPeriod + this.config.settings.securityWindow/2); - // const gasUsed = await this.TokenTransferWrapper.estimate.executePendingTransfer(this.walletAddress, ETH_TOKEN, this.accounts[2], 2000000, "0x", block); - // this._logger.addItem("Execute ETH large transfer to untrusted account", gasUsed); - // } - ->>>>>>> 7379fcce... Move increasing time function to utils async estimateLargeTransferApprovalByOneGuardian() { // estimate approve large transfer const gasUsed = await this.relay( diff --git a/test/approvedTransfer.js b/test/approvedTransfer.js index f26ee5ab8..8b5728170 100644 --- a/test/approvedTransfer.js +++ b/test/approvedTransfer.js @@ -107,7 +107,7 @@ contract("ApprovedTransfer", (accounts) => { }); for (const address of guardianAddresses) { - await guardianManager.from(owner).addGuardian(wallet.address, address); + await guardianManager.addGuardian(wallet.address, address, { from: owner }); } await increaseTime(30); diff --git a/test/baseContracts.js b/test/baseContracts.js index aaad65902..49fed4a5a 100644 --- a/test/baseContracts.js +++ b/test/baseContracts.js @@ -52,7 +52,7 @@ contract("Managed and Owned", (accounts) => { }); it("should not be able to add manager if not called by owner", async () => { - await assert.revertWith(managed.from(nonOwner).addManager(manager1), "Must be owner"); + await assert.revertWith(managed.addManager(manager1, { from: nonOwner }), "Must be owner"); }); it("should not be able to set manager to zero address", async () => { @@ -87,7 +87,7 @@ contract("Managed and Owned", (accounts) => { it("should not be able to revoke manager if not called by owner", async () => { await managed.addManager(manager1); - await assert.revertWith(managed.from(nonOwner).revokeManager(manager1), "Must be owner"); + await assert.revertWith(managed.revokeManager(manager1, { from: nonOwner }), "Must be owner"); }); it("should not be able to revoke a nonexisting managerr", async () => { diff --git a/test/baseModule.js b/test/baseModule.js index d74c3763f..6dc7e0439 100644 --- a/test/baseModule.js +++ b/test/baseModule.js @@ -31,7 +31,7 @@ contract("BaseModule", (accounts) => { let balance = await token.balanceOf(baseModule.address); assert.equal(balance, 0); - await token.from(owner).transfer(baseModule.address, 10000000); + await token.transfer(baseModule.address, 10000000, { from: owner }); balance = await token.balanceOf(baseModule.address); assert.equal(balance, 10000000); diff --git a/test/compoundManager_invest.js b/test/compoundManager_invest.js index 7b257d8a3..1fa868354 100644 --- a/test/compoundManager_invest.js +++ b/test/compoundManager_invest.js @@ -99,9 +99,9 @@ contract("Invest Manager with Compound", (accounts) => { await comptroller._setCollateralFactor(cEther.address, WAD.div(10)); // add liquidity to tokens - await cEther.from(liquidityProvider).mint({ value: parseEther("100") }); - await token.from(liquidityProvider).approve(cToken.address, parseEther("100")); - await cToken.from(liquidityProvider).mint(parseEther("10")); + await cEther.mint({ value: parseEther("100"), from: liquidityProvider }); + await token.approve(cToken.address, parseEther("100"), { from: liquidityProvider }); + await cToken.mint(parseEther("10"), { from: liquidityProvider }); /* Deploy Argent Architecture */ @@ -168,16 +168,16 @@ contract("Invest Manager with Compound", (accounts) => { let tx; let txReceipt; // genrate borrows to create interests - await comptroller.from(borrower).enterMarkets([cEther.address, cToken.address]); + await comptroller.enterMarkets([cEther.address, cToken.address], { from: borrower }); if (investInEth) { - await token.from(borrower).approve(cToken.address, parseEther("20")); - await cToken.from(borrower).mint(parseEther("20")); - tx = await cEther.from(borrower).borrow(parseEther("0.1")); + await token.approve(cToken.address, parseEther("20"), { from: borrower }); + await cToken.mint(parseEther("20"), { from: borrower }); + tx = await cEther.borrow(parseEther("0.1"), { from: borrower }); txReceipt = await cEther.verboseWaitForTransaction(tx); assert.isTrue(await utils.hasEvent(txReceipt, cEther, "Borrow"), "should have generated Borrow event"); } else { - await cEther.from(borrower).mint({ value: parseEther("2") }); - tx = await cToken.from(borrower).borrow(parseEther("0.1")); + await cEther.mint({ value: parseEther("2"), from: borrower }); + tx = await cToken.borrow(parseEther("0.1"), { from: borrower }); txReceipt = await cToken.verboseWaitForTransaction(tx); assert.isTrue(await utils.hasEvent(txReceipt, cToken, "Borrow"), "should have generated Borrow event"); } @@ -195,13 +195,13 @@ contract("Invest Manager with Compound", (accounts) => { if (investInEth) { tx = await wallet.send(amount); } else { - await token.from(infrastructure).transfer(wallet.address, amount); + await token.transfer(wallet.address, amount); } const params = [wallet.address, tokenAddress, amount, 0]; if (relay) { txReceipt = await manager.relay(investManager, "addInvestment", params, wallet, [owner]); } else { - tx = await investManager.from(owner).addInvestment(...params); + tx = await investManager.addInvestment(...params, { from: owner }); txReceipt = await investManager.verboseWaitForTransaction(tx); } @@ -227,7 +227,7 @@ contract("Invest Manager with Compound", (accounts) => { if (relay) { txReceipt = await manager.relay(investManager, "removeInvestment", params, wallet, [owner]); } else { - tx = await investManager.from(owner).removeInvestment(...params); + tx = await investManager.removeInvestment(...params, { from: owner }); txReceipt = await investManager.verboseWaitForTransaction(tx); } assert.isTrue(await utils.hasEvent(txReceipt, investManager, "InvestmentRemoved"), "should have generated InvestmentRemoved event"); @@ -259,17 +259,17 @@ contract("Invest Manager with Compound", (accounts) => { it("should fail to invest in ERC20 with an unknown token", async () => { const params = [wallet.address, ethers.constants.AddressZero, parseEther("1"), 0]; - await assert.revertWith(investManager.from(owner).addInvestment(...params), "CM: No market for target token"); + await assert.revertWith(investManager.addInvestment(...params, { from: owner }), "CM: No market for target token"); }); it("should fail to invest in ERC20 with an amount of zero", async () => { const params = [wallet.address, token.address, 0, 0]; - await assert.revertWith(investManager.from(owner).addInvestment(...params), "CM: amount cannot be 0"); + await assert.revertWith(investManager.addInvestment(...params, { from: owner }), "CM: amount cannot be 0"); }); it("should fail to invest in ERC20 when not holding any ERC20", async () => { const params = [wallet.address, token.address, parseEther("1"), 0]; - await assert.revertWith(investManager.from(owner).addInvestment(...params), "CM: mint failed"); + await assert.revertWith(investManager.addInvestment(...params, { from: owner }), "CM: mint failed"); }); }); @@ -298,27 +298,27 @@ contract("Invest Manager with Compound", (accounts) => { it("should fail to remove an ERC20 investment when passing an invalid fraction value", async () => { const params = [wallet.address, token.address, 50000]; - await assert.revertWith(investManager.from(owner).removeInvestment(...params), "CM: invalid fraction value"); + await assert.revertWith(investManager.removeInvestment(...params, { from: owner }), "CM: invalid fraction value"); }); it("should fail to remove an ERC20 investment when not holding any of the corresponding cToken", async () => { const params = [wallet.address, token.address, 5000]; - await assert.revertWith(investManager.from(owner).removeInvestment(...params), "CM: amount cannot be 0"); + await assert.revertWith(investManager.removeInvestment(...params, { from: owner }), "CM: amount cannot be 0"); }); it("should fail to remove all of an ERC20 investment when it collateralizes a loan", async () => { const collateralAmount = parseEther("1"); const debtAmount = parseEther("0.001"); - await token.from(infrastructure).transfer(wallet.address, collateralAmount); + await token.transfer(wallet.address, collateralAmount); const openLoanParams = [ wallet.address, token.address, collateralAmount, ETH_TOKEN, debtAmount]; - await investManager.from(owner).openLoan(...openLoanParams); + await investManager.openLoan(...openLoanParams, { from: owner }); const removeInvestmentParams = [wallet.address, token.address, 10000]; - await assert.revertWith(investManager.from(owner).removeInvestment(...removeInvestmentParams), "CM: redeem failed"); + await assert.revertWith(investManager.removeInvestment(...removeInvestmentParams, { from: owner }), "CM: redeem failed"); }); }); }); diff --git a/test/compoundManager_loan.js b/test/compoundManager_loan.js index 9c5f08fc8..f76166ee4 100644 --- a/test/compoundManager_loan.js +++ b/test/compoundManager_loan.js @@ -119,11 +119,11 @@ contract("Loan Module", (accounts) => { await comptroller._setCollateralFactor(cEther.address, WAD.div(10)); // add liquidity to tokens - await cEther.from(liquidityProvider).mint({ value: parseEther("100") }); - await token1.from(liquidityProvider).approve(cToken1.address, parseEther("10")); - await cToken1.from(liquidityProvider).mint(parseEther("10")); - await token2.from(liquidityProvider).approve(cToken2.address, parseEther("10")); - await cToken2.from(liquidityProvider).mint(parseEther("10")); + await cEther.mint({ value: parseEther("100"), from: liquidityProvider }); + await token1.approve(cToken1.address, parseEther("10"), { from: liquidityProvider }); + await cToken1.mint(parseEther("10"), { from: liquidityProvider }); + await token2.approve(cToken2.address, parseEther("10"), { from: liquidityProvider }); + await cToken2.mint(parseEther("10"), { from: liquidityProvider }); /* Deploy Argent Architecture */ @@ -173,8 +173,8 @@ contract("Loan Module", (accounts) => { async function fundWallet({ ethAmount, token1Amount, token2Amount = 0 }) { if (ethAmount > 0) await wallet.send(ethAmount); - if (token1Amount > 0) await token1.from(infrastructure).transfer(wallet.address, token1Amount); - if (token2Amount > 0) await token2.from(infrastructure).transfer(wallet.address, token2Amount); + if (token1Amount > 0) await token1.transfer(wallet.address, token1Amount); + if (token2Amount > 0) await token2.transfer(wallet.address, token2Amount); } describe("Loan", () => { @@ -196,7 +196,7 @@ contract("Loan Module", (accounts) => { if (relayed) { txReceipt = await manager.relay(loanManager, "openLoan", params, wallet, [owner]); } else { - const tx = await loanManager.from(owner).openLoan(...params); + const tx = await loanManager.openLoan(...params, { from: owner }); txReceipt = await loanManager.verboseWaitForTransaction(tx); } assert.isTrue(await utils.hasEvent(txReceipt, loanManager, "LoanOpened"), "should have generated LoanOpened event"); @@ -231,7 +231,7 @@ contract("Loan Module", (accounts) => { if (relayed) { txReceipt = await manager.relay(loanManager, method, params, wallet, [owner]); } else { - const tx = await loanManager.from(owner)[method](...params); + const tx = await loanManager[method](...params, { from: owner }); txReceipt = await loanManager.verboseWaitForTransaction(tx); } const collateralBalanceAfter = (collateral === ETH_TOKEN) ? await getBalance(wallet.address) @@ -263,7 +263,7 @@ contract("Loan Module", (accounts) => { if (relayed) { txReceipt = await manager.relay(loanManager, method, params, wallet, [owner]); } else { - const tx = await loanManager.from(owner)[method](...params); + const tx = await loanManager[method](...params, { from: owner }); txReceipt = await loanManager.verboseWaitForTransaction(tx); } const debtBalanceAfter = (debtToken === ETH_TOKEN) ? await getBalance(wallet.address) @@ -427,27 +427,27 @@ contract("Loan Module", (accounts) => { it("should fail to borrow an unknown token", async () => { const params = [wallet.address, ZERO_BYTES32, ethers.constants.AddressZero, parseEther("1")]; - await assert.revertWith(loanManager.from(owner).addDebt(...params), "CM: No market for target token"); + await assert.revertWith(loanManager.addDebt(...params, { from: owner }), "CM: No market for target token"); }); it("should fail to borrow 0 token", async () => { const params = [wallet.address, ZERO_BYTES32, ETH_TOKEN, parseEther("0")]; - await assert.revertWith(loanManager.from(owner).addDebt(...params), "CM: amount cannot be 0"); + await assert.revertWith(loanManager.addDebt(...params, { from: owner }), "CM: amount cannot be 0"); }); it("should fail to borrow token with no collateral", async () => { const params = [wallet.address, ZERO_BYTES32, ETH_TOKEN, parseEther("1")]; - await assert.revertWith(loanManager.from(owner).addDebt(...params), "CM: borrow failed"); + await assert.revertWith(loanManager.addDebt(...params, { from: owner }), "CM: borrow failed"); }); it("should fail to repay an unknown token", async () => { const params = [wallet.address, ZERO_BYTES32, ethers.constants.AddressZero, parseEther("1")]; - await assert.revertWith(loanManager.from(owner).removeDebt(...params), "CM: No market for target token"); + await assert.revertWith(loanManager.removeDebt(...params, { from: owner }), "CM: No market for target token"); }); it("should fail to repay 0 token", async () => { const params = [wallet.address, ZERO_BYTES32, ETH_TOKEN, parseEther("0")]; - await assert.revertWith(loanManager.from(owner).removeDebt(...params), "CM: amount cannot be 0"); + await assert.revertWith(loanManager.removeDebt(...params, { from: owner }), "CM: amount cannot be 0"); }); it("should fail to repay too much debt token", async () => { @@ -458,17 +458,17 @@ contract("Loan Module", (accounts) => { collateral: ETH_TOKEN, collateralAmount, debt: token1, debtAmount, relayed: false, }); const removeDebtParams = [wallet.address, loanId, token1.address, parseEther("0.002")]; - await assert.revertWith(loanManager.from(owner).removeDebt(...removeDebtParams), "CM: repayBorrow failed"); + await assert.revertWith(loanManager.removeDebt(...removeDebtParams, { from: owner }), "CM: repayBorrow failed"); }); it("should fail to remove an unknown collateral token", async () => { const params = [wallet.address, ZERO_BYTES32, ethers.constants.AddressZero, parseEther("1")]; - await assert.revertWith(loanManager.from(owner).removeCollateral(...params), "CM: No market for target token"); + await assert.revertWith(loanManager.removeCollateral(...params, { from: owner }), "CM: No market for target token"); }); it("should fail to remove 0 collateral token", async () => { const params = [wallet.address, ZERO_BYTES32, ETH_TOKEN, parseEther("0")]; - await assert.revertWith(loanManager.from(owner).removeCollateral(...params), "CM: amount cannot be 0"); + await assert.revertWith(loanManager.removeCollateral(...params, { from: owner }), "CM: amount cannot be 0"); }); it("should fail to remove too much collateral token", async () => { @@ -479,7 +479,7 @@ contract("Loan Module", (accounts) => { collateral: ETH_TOKEN, collateralAmount, debt: token1, debtAmount, relayed: false, }); const removeDebtParams = [wallet.address, loanId, token1.address, parseEther("0.002")]; - await assert.revertWith(loanManager.from(owner).removeCollateral(...removeDebtParams), "CM: redeemUnderlying failed"); + await assert.revertWith(loanManager.removeCollateral(...removeDebtParams, { from: owner }), "CM: redeemUnderlying failed"); }); }); @@ -604,7 +604,7 @@ contract("Loan Module", (accounts) => { if (relayed) { txReceipt = await manager.relay(loanManager, method, params, wallet, [owner], accounts[9], false, 2000000); } else { - const tx = await loanManager.from(owner)[method](...params); + const tx = await loanManager[method](...params, { from: owner }); txReceipt = await loanManager.verboseWaitForTransaction(tx); } assert.isTrue(await utils.hasEvent(txReceipt, loanManager, "LoanClosed"), "should have generated LoanClosed event"); diff --git a/test/ens.js b/test/ens.js index d95ef7141..c63325607 100644 --- a/test/ens.js +++ b/test/ens.js @@ -60,7 +60,7 @@ contract("ENS contracts", (accounts) => { it("should register an ENS name", async () => { const label = "wallet"; const labelNode = ethers.utils.namehash(`${label}.${subnameWallet}.${root}`); - await ensManager.from(infrastructure).register(label, owner); + await ensManager.register(label, owner); const recordExists = await ensRegistry.recordExists(labelNode); assert.isTrue(recordExists); @@ -79,7 +79,7 @@ contract("ENS contracts", (accounts) => { assert.isTrue(available); // then we register it - await ensManager.from(infrastructure).register(label, owner); + await ensManager.register(label, owner); const nodeOwner = await ensRegistry.owner(labelNode); assert.equal(nodeOwner, owner); @@ -93,14 +93,14 @@ contract("ENS contracts", (accounts) => { const label = "wallet"; const labelNode = ethers.utils.namehash(`${label}.${subnameWallet}.${root}`); await ensManager.addManager(amanager); - await ensManager.from(amanager).register(label, owner); + await ensManager.register(label, owner, { from: amanager }); const nodeOwner = await ensRegistry.owner(labelNode); assert.equal(nodeOwner, owner, "new manager should have registered the ens name"); }); it("should fail to register an ENS name when the caller is not a manager", async () => { const label = "wallet"; - await assert.revert(ensManager.from(anonmanager).register(label, owner), "registering should throw"); + await assert.revert(ensManager.register(label, owner, { from: anonmanager }), "registering should throw"); }); it("should be able to change the root node owner", async () => { @@ -112,7 +112,7 @@ contract("ENS contracts", (accounts) => { it("should not be able to change the root node owner if not the owner", async () => { const randomAddress = await utilities.getRandomAddress(); - await assert.revertWith(ensManager.from(amanager).changeRootnodeOwner(randomAddress), "Must be owner"); + await assert.revertWith(ensManager.changeRootnodeOwner(randomAddress, { from: amanager }), "Must be owner"); }); it("should be able to change the ens resolver", async () => { @@ -124,7 +124,7 @@ contract("ENS contracts", (accounts) => { it("should not be able to change the ens resolver if not owner", async () => { const randomAddress = await utilities.getRandomAddress(); - await assert.revertWith(ensManager.from(amanager).changeENSResolver(randomAddress), "Must be owner"); + await assert.revertWith(ensManager.changeENSResolver(randomAddress, { from: amanager }), "Must be owner"); }); it("should not be able to change the ens resolver to an empty address", async () => { @@ -154,7 +154,7 @@ contract("ENS contracts", (accounts) => { it("should resolve a name", async () => { const label = "wallet"; - await ensManager.from(infrastructure).register(label, owner); + await ensManager.register(label, owner); const node = await ensReverse.node(owner); const name = await ensResolver.name(node); diff --git a/test/factory.js b/test/factory.js index fb53f3509..bff920973 100644 --- a/test/factory.js +++ b/test/factory.js @@ -92,7 +92,7 @@ contract("WalletFactory", (accounts) => { it("should not allow non-owner to change the module registry", async () => { const randomAddress = utils.getRandomAddress(); - await assert.revertWith(factory.from(other).changeModuleRegistry(randomAddress), "Must be owner"); + await assert.revertWith(factory.changeModuleRegistry(randomAddress, { from: other }), "Must be owner"); }); it("should allow owner to change the ens manager", async () => { @@ -108,7 +108,7 @@ contract("WalletFactory", (accounts) => { it("should not allow non-owner to change the ens manager", async () => { const randomAddress = utils.getRandomAddress(); - await assert.revertWith(factory.from(other).changeENSManager(randomAddress), "Must be owner"); + await assert.revertWith(factory.changeENSManager(randomAddress, { from: owner }), "Must be owner"); }); it("should return the correct ENSManager", async () => { @@ -120,7 +120,7 @@ contract("WalletFactory", (accounts) => { describe("Create wallets with CREATE", () => { it("should create with the correct owner", async () => { // we create the wallet - const tx = await factory.from(infrastructure).createWallet(owner, versionManager.address, guardian, 1); + const tx = await factory.createWallet(owner, versionManager.address, guardian, 1); const txReceipt = await factory.verboseWaitForTransaction(tx); const walletAddr = txReceipt.events.filter((event) => event.event === "WalletCreated")[0].args.wallet; // we test that the wallet has the correct owner @@ -131,7 +131,7 @@ contract("WalletFactory", (accounts) => { it("should create with the correct module", async () => { // we create the wallet - const tx = await factory.from(infrastructure).createWallet(owner, versionManager.address, guardian, 1); + const tx = await factory.createWallet(owner, versionManager.address, guardian, 1); const txReceipt = await factory.verboseWaitForTransaction(tx); const walletAddr = txReceipt.events.filter((event) => event.event === "WalletCreated")[0].args.wallet; // we test that the wallet has the correct module @@ -142,7 +142,7 @@ contract("WalletFactory", (accounts) => { it("should create with the correct guardian", async () => { // we create the wallet - const tx = await factory.from(infrastructure).createWallet(owner, versionManager.address, guardian, 1); + const tx = await factory.createWallet(owner, versionManager.address, guardian, 1); const txReceipt = await factory.verboseWaitForTransaction(tx); const walletAddr = txReceipt.events.filter((event) => event.event === "WalletCreated")[0].args.wallet; // we test that the wallet has the correct guardian @@ -155,7 +155,7 @@ contract("WalletFactory", (accounts) => { await versionManager.addVersion([], []); await versionManager.setMinVersion(await versionManager.lastVersion()); // we create the wallet - const tx = await factory.from(infrastructure).createWallet(owner, versionManager.address, guardian, badVersion); + const tx = await factory.createWallet(owner, versionManager.address, guardian, badVersion); const txReceipt = await factory.verboseWaitForTransaction(tx); const walletAddr = txReceipt.events.filter((event) => event.event === "WalletCreated")[0].args.wallet; assert.notEqual(walletAddr, ZERO_ADDRESS, "wallet should be created"); @@ -163,25 +163,25 @@ contract("WalletFactory", (accounts) => { it("should fail to create when the guardian is empty", async () => { // we create the wallet - await assert.revertWith(factory.from(infrastructure).createWallet(owner, versionManager.address, ZERO_ADDRESS, 1), + await assert.revertWith(factory.createWallet(owner, versionManager.address, ZERO_ADDRESS, 1), "WF: guardian cannot be null"); }); it("should fail to create when there are is no VersionManager", async () => { - await assert.revertWith(factory.from(deployer).createWallet(owner, ethers.constants.AddressZero, guardian, 1), + await assert.revertWith(factory.createWallet(owner, ethers.constants.AddressZero, guardian, 1, { from: deployer }), "WF: invalid _versionManager"); }); it("should fail to create with zero address as owner", async () => { await assert.revertWith( - factory.from(infrastructure).createWallet(ethers.constants.AddressZero, versionManager.address, guardian, 1), + factory.createWallet(ethers.constants.AddressZero, versionManager.address, guardian, 1), "WF: owner cannot be null", ); }); it("should fail to create with unregistered module", async () => { const randomAddress = utils.getRandomAddress(); - await assert.revertWith(factory.from(infrastructure).createWallet(owner, randomAddress, guardian, 1), + await assert.revertWith(factory.createWallet(owner, randomAddress, guardian, 1), "WF: invalid _versionManager"); }); }); @@ -197,7 +197,7 @@ contract("WalletFactory", (accounts) => { // we get the future address const futureAddr = await factory.getAddressForCounterfactualWallet(owner, versionManager.address, guardian, salt, 1); // we create the wallet - const tx = await factory.from(infrastructure).createCounterfactualWallet( + const tx = await factory.createCounterfactualWallet( owner, versionManager.address, guardian, salt, 1, ); const txReceipt = await factory.verboseWaitForTransaction(tx); @@ -211,7 +211,7 @@ contract("WalletFactory", (accounts) => { // we get the future address const futureAddr = await factory.getAddressForCounterfactualWallet(owner, versionManager.address, guardian, salt, 1); // we create the wallet - const tx = await factory.from(infrastructure).createCounterfactualWallet( + const tx = await factory.createCounterfactualWallet( owner, versionManager.address, guardian, salt, 1, ); const txReceipt = await factory.verboseWaitForTransaction(tx); @@ -229,7 +229,7 @@ contract("WalletFactory", (accounts) => { // we get the future address const futureAddr = await factory.getAddressForCounterfactualWallet(owner, versionManager.address, guardian, salt, 1); // we create the wallet - const tx = await factory.from(infrastructure).createCounterfactualWallet( + const tx = await factory.createCounterfactualWallet( owner, versionManager.address, guardian, salt, 1, ); const txReceipt = await factory.verboseWaitForTransaction(tx); @@ -253,8 +253,8 @@ contract("WalletFactory", (accounts) => { owner, versionManager.address, guardian, salt, badVersion, ); // we create the wallet - const tx = await factory.from(deployer).createCounterfactualWallet( - owner, versionManager.address, guardian, salt, badVersion, + const tx = await factory.createCounterfactualWallet( + owner, versionManager.address, guardian, salt, badVersion, { from: deployer } ); const txReceipt = await factory.verboseWaitForTransaction(tx); const walletAddr = txReceipt.events.filter((event) => event.event === "WalletCreated")[0].args.wallet; @@ -267,7 +267,7 @@ contract("WalletFactory", (accounts) => { // we get the future address const futureAddr = await factory.getAddressForCounterfactualWallet(owner, versionManager.address, guardian, salt, 1); // we create the wallet - const tx = await factory.from(infrastructure).createCounterfactualWallet( + const tx = await factory.createCounterfactualWallet( owner, versionManager.address, guardian, salt, 1, ); const txReceipt = await factory.verboseWaitForTransaction(tx); @@ -284,7 +284,7 @@ contract("WalletFactory", (accounts) => { // we get the future address const futureAddr = await factory.getAddressForCounterfactualWallet(owner, versionManager.address, guardian, salt, 1); // we create the first wallet - const tx = await factory.from(infrastructure).createCounterfactualWallet( + const tx = await factory.createCounterfactualWallet( owner, versionManager.address, guardian, salt, 1, ); const txReceipt = await factory.verboseWaitForTransaction(tx); @@ -293,7 +293,7 @@ contract("WalletFactory", (accounts) => { assert.equal(futureAddr, walletAddr, "should have the correct address"); // we create the second wallet await assert.revert( - factory.from(infrastructure).createCounterfactualWallet(owner, versionManager.address, guardian, salt, 1), + factory.createCounterfactualWallet(owner, versionManager.address, guardian, salt, 1), "should fail when address is in use", ); }); @@ -301,8 +301,8 @@ contract("WalletFactory", (accounts) => { it("should fail to create counterfactually when there are no modules (with guardian)", async () => { const salt = utils.generateSaltValue(); await assert.revertWith( - factory.from(deployer).createCounterfactualWallet( - owner, ethers.constants.AddressZero, guardian, salt, 1, + factory.createCounterfactualWallet( + owner, ethers.constants.AddressZero, guardian, salt, 1, { from: deployer } ), "invalid _versionManager", ); @@ -311,7 +311,7 @@ contract("WalletFactory", (accounts) => { it("should fail to create when the guardian is empty", async () => { const salt = utils.generateSaltValue(); await assert.revertWith( - factory.from(infrastructure).createCounterfactualWallet(owner, versionManager.address, ZERO_ADDRESS, salt, 1), + factory.createCounterfactualWallet(owner, versionManager.address, ZERO_ADDRESS, salt, 1), "WF: guardian cannot be null", ); }); @@ -324,7 +324,7 @@ contract("WalletFactory", (accounts) => { // We send ETH to the address await futureAddr.send(amount); // we create the wallet - const tx = await factory.from(infrastructure).createCounterfactualWallet( + const tx = await factory.createCounterfactualWallet( owner, versionManager.address, guardian, salt, 1, ); const txReceipt = await factory.verboseWaitForTransaction(tx); @@ -338,7 +338,7 @@ contract("WalletFactory", (accounts) => { it("should fail to get an address when the guardian is empty", async () => { const salt = utils.generateSaltValue(); await assert.revertWith( - factory.from(infrastructure).getAddressForCounterfactualWallet(owner, versionManager.address, ZERO_ADDRESS, salt, 1), + factory.getAddressForCounterfactualWallet(owner, versionManager.address, ZERO_ADDRESS, salt, 1), "WF: guardian cannot be null", ); }); diff --git a/test/guardianManager.js b/test/guardianManager.js index 8531b516a..05f9a64f7 100644 --- a/test/guardianManager.js +++ b/test/guardianManager.js @@ -72,13 +72,13 @@ contract("GuardianManager", (accounts) => { describe("Adding Guardians", () => { describe("EOA Guardians", () => { it("should let the owner add EOA Guardians (blockchain transaction)", async () => { - await guardianManager.from(owner).addGuardian(wallet.address, guardian1); + await guardianManager.addGuardian(wallet.address, guardian1, { from: owner }); let count = (await guardianStorage.guardianCount(wallet.address)).toNumber(); let active = await guardianManager.isGuardian(wallet.address, guardian1); assert.isTrue(active, "first guardian should be active"); assert.equal(count, 1, "1 guardian should be active"); - await guardianManager.from(owner).addGuardian(wallet.address, guardian2); + await guardianManager.addGuardian(wallet.address, guardian2, { from: owner }); count = (await guardianStorage.guardianCount(wallet.address)).toNumber(); active = await guardianManager.isGuardian(wallet.address, guardian2); assert.isFalse(active, "second guardian should not yet be active"); @@ -96,8 +96,8 @@ contract("GuardianManager", (accounts) => { }); it("should not let the owner add EOA Guardians after two security periods (blockchain transaction)", async () => { - await guardianManager.from(owner).addGuardian(wallet.address, guardian1); - await guardianManager.from(owner).addGuardian(wallet.address, guardian2); + await guardianManager.addGuardian(wallet.address, guardian1, { from: owner }); + await guardianManager.addGuardian(wallet.address, guardian2, { from: owner }); await increaseTime(48); // 42 == 2 * security_period await assert.revertWith(guardianManager.confirmGuardianAddition(wallet.address, guardian2), @@ -110,24 +110,24 @@ contract("GuardianManager", (accounts) => { }); it("should not allow confirming too early", async () => { - await guardianManager.from(owner).addGuardian(wallet.address, guardian1); - await guardianManager.from(owner).addGuardian(wallet.address, guardian2); + await guardianManager.addGuardian(wallet.address, guardian1, { from: owner }); + await guardianManager.addGuardian(wallet.address, guardian2, { from: owner }); await assert.revertWith(guardianManager.confirmGuardianAddition(wallet.address, guardian2), "GM: Too early to confirm guardian addition"); }); it("should let the owner re-add EOA Guardians after missing the confirmation window (blockchain transaction)", async () => { - await guardianManager.from(owner).addGuardian(wallet.address, guardian1); + await guardianManager.addGuardian(wallet.address, guardian1, { from: owner }); // first time - await guardianManager.from(owner).addGuardian(wallet.address, guardian2); + await guardianManager.addGuardian(wallet.address, guardian2, { from: owner }); await increaseTime(48); // 42 == 2 * security_period await assert.revertWith(guardianManager.confirmGuardianAddition(wallet.address, guardian2), "GM: Too late to confirm guardian addition"); // second time - await guardianManager.from(owner).addGuardian(wallet.address, guardian2); + await guardianManager.addGuardian(wallet.address, guardian2, { from: owner }); let count = (await guardianStorage.guardianCount(wallet.address)).toNumber(); let active = await guardianManager.isGuardian(wallet.address, guardian2); assert.isFalse(active, "second guardian should not yet be active"); @@ -142,25 +142,25 @@ contract("GuardianManager", (accounts) => { }); it("should only let the owner add an EOA guardian", async () => { - await assert.revertWith(guardianManager.from(nonowner).addGuardian(wallet.address, guardian1), - "BF: must be owner or feature"); + await assert.revertWith(guardianManager.addGuardian(wallet.address, guardian1, { from: nonowner }), + "BM: must be owner or module"); }); it("should not allow adding wallet owner as guardian", async () => { - await assert.revertWith(guardianManager.from(owner).addGuardian(wallet.address, owner), + await assert.revertWith(guardianManager.addGuardian(wallet.address, owner, { from: owner }), "GM: target guardian cannot be owner"); }); it("should not allow adding an existing guardian twice", async () => { - await guardianManager.from(owner).addGuardian(wallet.address, guardian1); - await assert.revertWith(guardianManager.from(owner).addGuardian(wallet.address, guardian1), + await guardianManager.addGuardian(wallet.address, guardian1, { from: owner }); + await assert.revertWith(guardianManager.addGuardian(wallet.address, guardian1, { from: owner }), "GM: target is already a guardian"); }); it("should not allow adding a duplicate request to add a guardian to the request queue", async () => { - await guardianManager.from(owner).addGuardian(wallet.address, guardian1); - await guardianManager.from(owner).addGuardian(wallet.address, guardian2); - await assert.revertWith(guardianManager.from(owner).addGuardian(wallet.address, guardian2), + await guardianManager.addGuardian(wallet.address, guardian1, { from: owner }); + await guardianManager.addGuardian(wallet.address, guardian2, { from: owner }); + await assert.revertWith(guardianManager.addGuardian(wallet.address, guardian2, { from: owner }), "GM: addition of target as guardian is already pending"); }); @@ -177,7 +177,7 @@ contract("GuardianManager", (accounts) => { let count; let active; for (let i = 1; i <= 5; i += 1) { - await guardianManager.from(owner).addGuardian(wallet.address, guardians[i - 1]); + await guardianManager.addGuardian(wallet.address, guardians[i - 1], { from: owner }); if (i > 1) { await increaseTime(31); await guardianManager.confirmGuardianAddition(wallet.address, guardians[i - 1]); @@ -224,7 +224,7 @@ contract("GuardianManager", (accounts) => { }); it("should let the owner add Smart Contract Guardians (blockchain transaction)", async () => { - await guardianManager.from(owner).addGuardian(wallet.address, guardianWallet1.address); + await guardianManager.addGuardian(wallet.address, guardianWallet1.address, { from: owner }); let count = (await guardianStorage.guardianCount(wallet.address)).toNumber(); let active = await guardianManager.isGuardianOrGuardianSigner(wallet.address, guardian1); assert.isTrue(active, "first guardian owner should be recognized as guardian"); @@ -232,7 +232,7 @@ contract("GuardianManager", (accounts) => { assert.isTrue(active, "first guardian should be recognized as guardian"); assert.equal(count, 1, "1 guardian should be active"); - await guardianManager.from(owner).addGuardian(wallet.address, guardianWallet2.address); + await guardianManager.addGuardian(wallet.address, guardianWallet2.address, { from: owner }); count = (await guardianStorage.guardianCount(wallet.address)).toNumber(); active = await guardianManager.isGuardian(wallet.address, guardian2); assert.isFalse(active, "second guardian owner should not yet be active"); @@ -261,18 +261,18 @@ contract("GuardianManager", (accounts) => { }); it("should not let owner add a Smart Contract guardian that does not have an owner manager", async () => { - await assert.revertWith(guardianManager.from(owner).addGuardian(wallet.address, dumbContract.address), + await assert.revertWith(guardianManager.addGuardian(wallet.address, dumbContract.address, { from: owner }), "GM: guardian must be EOA or implement owner()"); }); describe("Non-Compliant Guardians", () => { let nonCompliantGuardian; beforeEach(async () => { - await guardianManager.from(owner).addGuardian(wallet.address, guardian1); + await guardianManager.addGuardian(wallet.address, guardian1, { from: owner }); nonCompliantGuardian = await NonCompliantGuardian.new(); }); it("it should fail to add a non-compliant guardian", async () => { - await assert.revert(guardianManager.from(owner).addGuardian(wallet.address, nonCompliantGuardian.address)); + await assert.revert(guardianManager.addGuardian(wallet.address, nonCompliantGuardian.address), { from: owner }); }); }); }); @@ -280,8 +280,8 @@ contract("GuardianManager", (accounts) => { describe("Revoking Guardians", () => { beforeEach(async () => { - await guardianManager.from(owner).addGuardian(wallet.address, guardian1); - await guardianManager.from(owner).addGuardian(wallet.address, guardian2); + await guardianManager.addGuardian(wallet.address, guardian1, { from: owner }); + await guardianManager.addGuardian(wallet.address, guardian2, { from: owner }); await increaseTime(30); await guardianManager.confirmGuardianAddition(wallet.address, guardian2); const count = (await guardianStorage.guardianCount(wallet.address)).toNumber(); @@ -289,7 +289,7 @@ contract("GuardianManager", (accounts) => { }); it("should revoke a guardian (blockchain transaction)", async () => { - await guardianManager.from(owner).revokeGuardian(wallet.address, guardian1); + await guardianManager.revokeGuardian(wallet.address, guardian1, { from: owner }); let count = (await guardianStorage.guardianCount(wallet.address)).toNumber(); let active = await guardianManager.isGuardian(wallet.address, guardian1); assert.isTrue(active, "the revoked guardian should still be active during the security period"); @@ -304,18 +304,18 @@ contract("GuardianManager", (accounts) => { }); it("should not be able to revoke a nonexistent guardian", async () => { - await assert.revertWith(guardianManager.from(owner).revokeGuardian(wallet.address, nonowner), + await assert.revertWith(guardianManager.revokeGuardian(wallet.address, nonowner, { from: owner }), "GM: must be an existing guardian"); }); it("should not confirm a guardian revokation too early", async () => { - await guardianManager.from(owner).revokeGuardian(wallet.address, guardian1); + await guardianManager.revokeGuardian(wallet.address, guardian1, { from: owner }); await assert.revertWith(guardianManager.confirmGuardianRevokation(wallet.address, guardian1), "GM: Too early to confirm guardian revokation"); }); it("should not confirm a guardian revokation after two security periods (blockchain transaction)", async () => { - await guardianManager.from(owner).revokeGuardian(wallet.address, guardian1); + await guardianManager.revokeGuardian(wallet.address, guardian1, { from: owner }); await increaseTime(48); // 48 == 2 * security_period await assert.revertWith(guardianManager.confirmGuardianRevokation(wallet.address, guardian1), @@ -323,21 +323,21 @@ contract("GuardianManager", (accounts) => { }); it("should not be able to revoke a guardian twice", async () => { - await guardianManager.from(owner).revokeGuardian(wallet.address, guardian1); - await assert.revertWith(guardianManager.from(owner).revokeGuardian(wallet.address, guardian1), + await guardianManager.revokeGuardian(wallet.address, guardian1, { from: owner }); + await assert.revertWith(guardianManager.revokeGuardian(wallet.address, guardian1, { from: owner }), "GM: revokation of target as guardian is already pending"); }); it("should revoke a guardian again after missing the confirmation window the first time (blockchain transaction)", async () => { // first time - await guardianManager.from(owner).revokeGuardian(wallet.address, guardian1); + await guardianManager.revokeGuardian(wallet.address, guardian1, { from: owner }); await increaseTime(48); // 48 == 2 * security_period await assert.revertWith(guardianManager.confirmGuardianRevokation(wallet.address, guardian1), "GM: Too late to confirm guardian revokation"); // second time - await guardianManager.from(owner).revokeGuardian(wallet.address, guardian1); + await guardianManager.revokeGuardian(wallet.address, guardian1, { from: owner }); let count = (await guardianStorage.guardianCount(wallet.address)).toNumber(); let active = await guardianManager.isGuardian(wallet.address, guardian1); assert.isTrue(active, "the revoked guardian should still be active during the security period"); @@ -352,13 +352,13 @@ contract("GuardianManager", (accounts) => { }); it("should add a guardian after a revoke (blockchain transaction)", async () => { - await guardianManager.from(owner).revokeGuardian(wallet.address, guardian1); + await guardianManager.revokeGuardian(wallet.address, guardian1, { from: owner }); await increaseTime(30); await guardianManager.confirmGuardianRevokation(wallet.address, guardian1); let count = (await guardianStorage.guardianCount(wallet.address)).toNumber(); assert.equal(count, 1, "there should be 1 guardian left"); - await guardianManager.from(owner).addGuardian(wallet.address, guardian3); + await guardianManager.addGuardian(wallet.address, guardian3, { from: owner }); await increaseTime(30); await guardianManager.confirmGuardianAddition(wallet.address, guardian3); count = (await guardianStorage.guardianCount(wallet.address)).toNumber(); @@ -366,14 +366,14 @@ contract("GuardianManager", (accounts) => { }); it("should be able to remove a guardian that is the last in the list", async () => { - await guardianManager.from(owner).addGuardian(wallet.address, guardian3); + await guardianManager.addGuardian(wallet.address, guardian3, { from: owner }); await increaseTime(30); await guardianManager.confirmGuardianAddition(wallet.address, guardian3); let count = await guardianStorage.guardianCount(wallet.address); assert.equal(count.toNumber(), 3, "there should be 3 guardians"); const guardians = await guardianStorage.getGuardians(wallet.address); - await guardianManager.from(owner).revokeGuardian(wallet.address, guardians[2]); + await guardianManager.revokeGuardian(wallet.address, guardians[2], { from: owner }); await increaseTime(30); await guardianManager.confirmGuardianRevokation(wallet.address, guardians[2]); count = await guardianStorage.guardianCount(wallet.address); @@ -383,36 +383,36 @@ contract("GuardianManager", (accounts) => { describe("Cancelling Pending Guardians", () => { beforeEach(async () => { - await guardianManager.from(owner).addGuardian(wallet.address, guardian1); + await guardianManager.addGuardian(wallet.address, guardian1, { from: owner }); const count = (await guardianManager.guardianCount(wallet.address)).toNumber(); assert.equal(count, 1, "1 guardian should be added"); }); it("owner should be able to cancel pending addition of guardian (blockchain transaction)", async () => { // Add guardian 2 and cancel its addition - await guardianManager.from(owner).addGuardian(wallet.address, guardian2); - await guardianManager.from(owner).cancelGuardianAddition(wallet.address, guardian2); + await guardianManager.addGuardian(wallet.address, guardian2, { from: owner }); + await guardianManager.cancelGuardianAddition(wallet.address, guardian2, { from: owner }); await increaseTime(30); await assert.revertWith(guardianManager.confirmGuardianAddition(wallet.address, guardian2), "GM: no pending addition as guardian for target"); }); it("owner should not be able to cancel a nonexistent addition of a guardian request", async () => { - await assert.revertWith(guardianManager.from(owner).cancelGuardianAddition(wallet.address, guardian2), + await assert.revertWith(guardianManager.cancelGuardianAddition(wallet.address, guardian2, { from: owner }), "GM: no pending addition as guardian for target"); }); it("owner should be able to cancel pending revokation of guardian (blockchain transaction)", async () => { // Revoke guardian 1 and cancel its revokation - await guardianManager.from(owner).revokeGuardian(wallet.address, guardian1); - await guardianManager.from(owner).cancelGuardianRevokation(wallet.address, guardian1); + await guardianManager.revokeGuardian(wallet.address, guardian1, { from: owner }); + await guardianManager.cancelGuardianRevokation(wallet.address, guardian1, { from: owner }); await increaseTime(30); await assert.revertWith(guardianManager.confirmGuardianRevokation(wallet.address, guardian1), "GM: no pending guardian revokation for target"); }); it("owner should not be able to cancel a nonexistent pending revokation of guardian", async () => { - await assert.revertWith(guardianManager.from(owner).cancelGuardianRevokation(wallet.address, nonowner), + await assert.revertWith(guardianManager.cancelGuardianRevokation(wallet.address, nonowner, { from: owner }), "GM: no pending guardian revokation for target"); }); diff --git a/test/kyber.js b/test/kyber.js index c04c7d260..a43abd241 100644 --- a/test/kyber.js +++ b/test/kyber.js @@ -31,8 +31,8 @@ contract("KyberNetwork", (accounts) => { const beforeERC20 = await erc20.balanceOf(trader); const beforeETH = await getBalance(trader); assert.equal(beforeERC20.toNumber(), 0, "trader should have no ERC20"); - await kyber.from(trader).trade(ETH_TOKEN, 10000, erc20.address, trader, - ethers.BigNumber.from("10000000000000000000000"), 1, "0x0000000000000000000000000000000000000000", { value: 10000 }); + await kyber.trade(ETH_TOKEN, 10000, erc20.address, trader, + ethers.BigNumber.from("10000000000000000000000"), 1, "0x0000000000000000000000000000000000000000", { value: 10000, from: trader }); const afterERC20 = await erc20.balanceOf(trader); const afterETH = await getBalance(trader); assert.equal(beforeETH.sub(afterETH).gt(10000), true, "trader should have exchanged 10000 wei"); @@ -56,9 +56,9 @@ contract("KyberNetwork", (accounts) => { assert.equal(beforeERC20 > 0, true, "trader should have some ERC20"); // exchange ERC20 const srcAmount = beforeERC20.div(ethers.BigNumber.from(2)); - await erc20.from(trader).approve(kyber.address, srcAmount); - await kyber.from(trader).trade(erc20.address, srcAmount, ETH_TOKEN, trader, - ethers.BigNumber.from("10000000000000000000000"), 1, "0x0000000000000000000000000000000000000000"); + await erc20.approve(kyber.address, srcAmount, { from: trader }); + await kyber.trade(erc20.address, srcAmount, ETH_TOKEN, trader, + ethers.BigNumber.from("10000000000000000000000"), 1, "0x0000000000000000000000000000000000000000", { from: trader }); const afterERC20 = await erc20.balanceOf(trader); const afterETH = await getBalance(trader); assert.equal(beforeERC20.sub(afterERC20).eq(srcAmount), true, "trader should have exchanged ERC20"); diff --git a/test/lockManager.js b/test/lockManager.js index c569d49f6..294c60799 100644 --- a/test/lockManager.js +++ b/test/lockManager.js @@ -86,7 +86,7 @@ contract("LockManager", (accounts) => { describe("(Un)Lock by EOA guardians", () => { beforeEach(async () => { - await guardianManager.from(owner).addGuardian(wallet.address, guardian1); + await guardianManager.addGuardian(wallet.address, guardian1, { from: owner }); const count = (await guardianManager.guardianCount(wallet.address)).toNumber(); assert.equal(count, 1, "1 guardian should be added"); const isGuardian = await guardianManager.isGuardian(wallet.address, guardian1); @@ -97,7 +97,7 @@ contract("LockManager", (accounts) => { it("should be locked/unlocked by EOA guardians (blockchain transaction)", async () => { // lock - await lockManager.from(guardian1).lock(wallet.address); + await lockManager.lock(wallet.address, { from: guardian1 }); let state = await lockManager.isLocked(wallet.address); assert.isTrue(state, "should be locked by guardian"); let releaseTime = await lockManager.getLock(wallet.address); @@ -107,7 +107,7 @@ contract("LockManager", (accounts) => { assert.isTrue(guardianStorageLock.eq(0), "legacy guardianStorage's lock should be unused"); assert.isTrue(guardianStorageLocker === ethers.constants.AddressZero, "legacy guardianStorage's locker should be unused"); // unlock - await lockManager.from(guardian1).unlock(wallet.address); + await lockManager.unlock(wallet.address, { from: guardian1 }); state = await lockManager.isLocked(wallet.address); assert.isFalse(state, "should be unlocked by guardian"); releaseTime = await lockManager.getLock(wallet.address); @@ -125,13 +125,13 @@ contract("LockManager", (accounts) => { }); it("should fail to lock/unlock by non-guardian EOAs (blockchain transaction)", async () => { - await assert.revert(lockManager.from(nonguardian).lock(wallet.address), "locking from non-guardian should fail"); + await assert.revert(lockManager.lock(wallet.address, { from: nonguardian }), "locking from non-guardian should fail"); - await lockManager.from(guardian1).lock(wallet.address); + await lockManager.lock(wallet.address, { from: guardian1 }); const state = await lockManager.isLocked(wallet.address); assert.isTrue(state, "should be locked by guardian1"); - await assert.revert(lockManager.from(nonguardian).unlock(wallet.address)); + await assert.revert(lockManager.unlock(wallet.address, { from: nonguardian })); }); }); @@ -141,8 +141,8 @@ contract("LockManager", (accounts) => { const guardianWallet = await BaseWallet.at(proxy.address); await guardianWallet.init(guardian1, [versionManager.address]); - await versionManager.from(guardian1).upgradeWallet(guardianWallet.address, await versionManager.lastVersion()); - await guardianManager.from(owner).addGuardian(wallet.address, guardianWallet.address); + await versionManager.upgradeWallet(guardianWallet.address, await versionManager.lastVersion(), { from: guardian1 }); + await guardianManager.addGuardian(wallet.address, guardianWallet.address, { from: owner }); const count = (await guardianManager.guardianCount(wallet.address)).toNumber(); assert.equal(count, 1, "1 guardian should be added"); const isGuardian = await guardianManager.isGuardian(wallet.address, guardianWallet.address); @@ -168,8 +168,8 @@ contract("LockManager", (accounts) => { describe("Auto-unlock", () => { it("should auto-unlock after lock period", async () => { - await guardianManager.from(owner).addGuardian(wallet.address, guardian1); - await lockManager.from(guardian1).lock(wallet.address); + await guardianManager.addGuardian(wallet.address, guardian1, { from: owner }); + await lockManager.lock(wallet.address, { from: guardian1 }); let state = await lockManager.isLocked(wallet.address); assert.isTrue(state, "should be locked by guardian"); let releaseTime = await lockManager.getLock(wallet.address); @@ -185,16 +185,16 @@ contract("LockManager", (accounts) => { describe("Unlocking wallets", () => { beforeEach(async () => { - await guardianManager.from(owner).addGuardian(wallet.address, guardian1); + await guardianManager.addGuardian(wallet.address, guardian1, { from: owner }); }); it("should not be able to unlock, an already unlocked wallet", async () => { // lock - await lockManager.from(guardian1).lock(wallet.address); + await lockManager.lock(wallet.address, { from: guardian1 }); // unlock - await lockManager.from(guardian1).unlock(wallet.address); + await lockManager.unlock(wallet.address, { from: guardian1 }); // try to unlock again - await assert.revertWith(lockManager.from(guardian1).unlock(wallet.address), + await assert.revertWith(lockManager.unlock(wallet.address, { from: guardian1 }), "VM Exception while processing transaction: revert LM: wallet must be locked"); }); @@ -203,7 +203,7 @@ contract("LockManager", (accounts) => { await manager.relay(recoveryManager, "executeRecovery", [wallet.address, accounts[5]], wallet, [guardian1]); // try to unlock - await assert.revertWith(lockManager.from(guardian1).unlock(wallet.address), + await assert.revertWith(lockManager.unlock(wallet.address, { from: guardian1 }), "LM: cannot unlock a wallet that was locked by another feature"); }); }); diff --git a/test/makerV2Manager_invest.js b/test/makerV2Manager_invest.js index 04690ccf1..7b6c99db2 100644 --- a/test/makerV2Manager_invest.js +++ b/test/makerV2Manager_invest.js @@ -105,7 +105,7 @@ contract("MakerV2Invest", (accounts) => { if (relayed) { await manager.relay(makerV2, method, params, wallet, [owner]); } else { - await (await makerV2.from(owner)[method](...params, { gasLimit: 2000000 })).wait(); + await (await makerV2[method](...params, { gasLimit: 2000000, from: owner })).wait(); } const walletAfter = (await dai.balanceOf(wallet.address)).add(await sai.balanceOf(wallet.address)); const investedAfter = await makerV2.dsrBalance(wallet.address); diff --git a/test/makerV2Manager_loan.js b/test/makerV2Manager_loan.js index 653d3fa3c..f158566c8 100644 --- a/test/makerV2Manager_loan.js +++ b/test/makerV2Manager_loan.js @@ -77,22 +77,22 @@ contract("MakerV2Loan", (accounts) => { guardianStorage = await GuardianStorage.new(); lockStorage = await LockStorage.new(); versionManager = await VersionManager.new( - registry.contractAddress, - lockStorage.contractAddress, - guardianStorage.contractAddress, + registry.address, + lockStorage.address, + guardianStorage.address, ethers.constants.AddressZero, ethers.constants.AddressZero); - makerRegistry = await MakerRegistry.new(vat.contractAddress); - await makerRegistry.addCollateral(wethJoin.contractAddress); + makerRegistry = await MakerRegistry.new(vat.address); + await makerRegistry.addCollateral(wethJoin.address); makerV2 = await MakerV2Manager.new( - lockStorage.contractAddress, - migration.contractAddress, - pot.contractAddress, - jug.contractAddress, - makerRegistry.contractAddress, - uniswapFactory.contractAddress, - versionManager.contractAddress, + lockStorage.address, + migration.address, + pot.address, + jug.address, + makerRegistry.address, + uniswapFactory.address, + versionManager.address, ); // Deploy TransferManager @@ -100,11 +100,11 @@ contract("MakerV2Loan", (accounts) => { const limitStorage = await LimitStorage.new(); const tokenPriceRegistry = await TokenPriceRegistry.new(); transferManager = await TransferManager.new( - lockStorage.contractAddress, - transferStorage.contractAddress, - limitStorage.contractAddress, - tokenPriceRegistry.contractAddress, - versionManager.contractAddress, + lockStorage.address, + transferStorage.address, + limitStorage.address, + tokenPriceRegistry.address, + versionManager.address, 3600, 3600, 10000, @@ -115,17 +115,17 @@ contract("MakerV2Loan", (accounts) => { walletImplementation = await BaseWallet.new(); relayerManager = await RelayerManager.new( - lockStorage.contractAddress, - guardianStorage.contractAddress, + lockStorage.address, + guardianStorage.address, ethers.constants.AddressZero, ethers.constants.AddressZero, - versionManager.contractAddress); + versionManager.address); manager.setRelayerManager(relayerManager); await versionManager.addVersion([ - makerV2.contractAddress, - transferManager.contractAddress, - relayerManager.contractAddress, + makerV2.address, + transferManager.address, + relayerManager.address, ], []); }); @@ -133,9 +133,9 @@ contract("MakerV2Loan", (accounts) => { const proxy = await Proxy.new(walletImplementation.address); wallet = await BaseWallet.at(proxy.address); - await wallet.init(owner, [versionManager.contractAddress]); - await versionManager.from(owner).upgradeWallet(wallet.contractAddress, await versionManager.lastVersion()); - walletAddress = wallet.contractAddress; + await wallet.init(owner, [versionManager.address]); + await versionManager.upgradeWallet(wallet.address, await versionManager.lastVersion(), { from: owner }); + walletAddress = wallet.address; await wallet.send(parseEther("2.0")); await dai["mint(address,uint256)"](walletAddress, parseEther("10")); }); @@ -150,7 +150,7 @@ contract("MakerV2Loan", (accounts) => { } async function testOpenLoan({ - collateralAmount, daiAmount, relayed, collateral = { contractAddress: ETH_TOKEN }, + collateralAmount, daiAmount, relayed, collateral = { address: ETH_TOKEN }, }) { const beforeCollateral = (collateral.address === ETH_TOKEN) ? await getBalance(walletAddress) @@ -167,7 +167,7 @@ contract("MakerV2Loan", (accounts) => { const { success } = (await parseLogs(txReceipt, relayerManager, "TransactionExecuted"))[0]; assert.isTrue(success, "Relayed tx should succeed"); } else { - txReceipt = await (await makerV2.from(owner)[method](...params, { gasLimit: 2000000 })).wait(); + txReceipt = await (await makerV2[method](...params, { gasLimit: 2000000, from: owner })).wait(); } const loanId = (await parseLogs(txReceipt, makerV2, "LoanOpened"))[0]._loanId; assert.isDefined(loanId, "Loan ID should be defined"); @@ -216,33 +216,33 @@ contract("MakerV2Loan", (accounts) => { it("should open>close>reopen a Loan (blockchain tx)", async () => { const loanId = await testOpenLoan({ collateralAmount, daiAmount, relayed: false }); - await makerV2.from(owner).closeLoan(walletAddress, loanId, { gasLimit: 4500000 }); + await makerV2.closeLoan(walletAddress, loanId, { gasLimit: 4500000, from: owner }); await testOpenLoan({ collateralAmount, daiAmount, relayed: false }); }); it("should open>close>reopen a Loan (relayed tx)", async () => { const loanId = await testOpenLoan({ collateralAmount, daiAmount, relayed: true }); - await (await makerV2.from(owner).closeLoan(walletAddress, loanId, { gasLimit: 4500000 })).wait(); + await (await makerV2.closeLoan(walletAddress, loanId, { gasLimit: 4500000, from: owner })).wait(); await testOpenLoan({ collateralAmount, daiAmount, relayed: true }); }); it("should not open a loan for the wrong debt token", async () => { await assert.revertWith( - makerV2.from(owner).openLoan(walletAddress, ETH_TOKEN, collateralAmount, sai.address, daiAmount), + makerV2.openLoan(walletAddress, ETH_TOKEN, collateralAmount, sai.address, daiAmount, { from: owner }), "MV2: debt token not DAI", ); }); it("should not open a loan for an unsupported collateral token", async () => { await assert.revertWith( - makerV2.from(owner).openLoan(walletAddress, sai.address, collateralAmount, dai.address, daiAmount), + makerV2.openLoan(walletAddress, sai.address, collateralAmount, dai.address, daiAmount, { from: owner }), "MV2: unsupported collateral", ); }); }); async function testChangeCollateral({ - loanId, collateralAmount, add, relayed, collateral = { contractAddress: ETH_TOKEN }, makerV2Manager = makerV2, + loanId, collateralAmount, add, relayed, collateral = { address: ETH_TOKEN }, makerV2Manager = makerV2, }) { const beforeCollateral = (collateral.address === ETH_TOKEN) ? await getBalance(walletAddress) @@ -254,7 +254,7 @@ contract("MakerV2Loan", (accounts) => { const txR = await manager.relay(makerV2Manager, method, params, wallet, [owner]); assert.isTrue(txR.events.find((e) => e.event === "TransactionExecuted").args.success, "Relayed tx should succeed"); } else { - await makerV2Manager.from(owner)[method](...params, { gasLimit: 2000000 }); + await makerV2Manager[method](...params, { gasLimit: 2000000, from: owner }); } const afterCollateral = (collateral.address === ETH_TOKEN) @@ -298,9 +298,9 @@ contract("MakerV2Loan", (accounts) => { const proxy = await Proxy.new(walletImplementation.address); const wallet2 = await BaseWallet.at(proxy.address); - await wallet2.init(owner2, [versionManager.contractAddress]); + await wallet2.init(owner2, [versionManager.address]); await assert.revertWith( - makerV2.from(owner2).addCollateral(wallet2.address, loanId, ETH_TOKEN, parseEther("0.010")), + makerV2.addCollateral(wallet2.address, loanId, ETH_TOKEN, parseEther("0.010"), { from: owner2 }), "MV2: unauthorized loanId", ); }); @@ -322,7 +322,7 @@ contract("MakerV2Loan", (accounts) => { it("should not remove collateral with invalid collateral amount", async () => { const loanId = await testOpenLoan({ collateralAmount, daiAmount, relayed: false }); await assert.revertWith( - makerV2.from(owner).removeCollateral(walletAddress, loanId, ETH_TOKEN, ethers.BigNumber.from(2).pow(255)), + makerV2.removeCollateral(walletAddress, loanId, ETH_TOKEN, ethers.BigNumber.from(2).pow(255), { from: owner }), "MV2: int overflow", ); }); @@ -332,9 +332,9 @@ contract("MakerV2Loan", (accounts) => { const proxy = await Proxy.new(walletImplementation.address); const wallet2 = await BaseWallet.at(proxy.address); - await wallet2.init(owner2, [versionManager.contractAddress]); + await wallet2.init(owner2, [versionManager.address]); await assert.revertWith( - makerV2.from(owner2).removeCollateral(wallet2.address, loanId, ETH_TOKEN, parseEther("0.010")), + makerV2.removeCollateral(wallet2.address, loanId, ETH_TOKEN, parseEther("0.010"), { from: owner2 }), "MV2: unauthorized loanId", ); }); @@ -348,10 +348,10 @@ contract("MakerV2Loan", (accounts) => { const method = add ? "addDebt" : "removeDebt"; const params = [wallet.address, loanId, dai.address, daiAmount]; if (relayed) { - const txR = await manager.relay(makerV2, method, params, { contractAddress: walletAddress }, [owner]); + const txR = await manager.relay(makerV2, method, params, { address: walletAddress }, [owner]); assert.isTrue(txR.events.find((e) => e.event === "TransactionExecuted").args.success, "Relayed tx should succeed"); } else { - await makerV2.from(owner)[method](...params, { gasLimit: 2000000 }); + await makerV2[method](...params, { gasLimit: 2000000, from: owner }); } const afterDAI = await dai.balanceOf(wallet.address); const afterETH = await getBalance(wallet.address); @@ -398,9 +398,9 @@ contract("MakerV2Loan", (accounts) => { const proxy = await Proxy.new(walletImplementation.address); const wallet2 = await BaseWallet.at(proxy.address); - await wallet2.init(owner2, [versionManager.contractAddress]); + await wallet2.init(owner2, [versionManager.address]); await assert.revertWith( - makerV2.from(owner2).addDebt(wallet2.address, loanId, ETH_TOKEN, parseEther("0.010")), + makerV2.addDebt(wallet2.address, loanId, ETH_TOKEN, parseEther("0.010"), { from: owner2 }), "MV2: unauthorized loanId", ); }); @@ -437,7 +437,7 @@ contract("MakerV2Loan", (accounts) => { const { collateralAmount, daiAmount } = await getTestAmounts(ETH_TOKEN); const loanId = await testOpenLoan({ collateralAmount, daiAmount, relayed: false }); await assert.revertWith( - makerV2.from(owner).removeDebt(walletAddress, loanId, dai.address, daiAmount.sub(1)), + makerV2.removeDebt(walletAddress, loanId, dai.address, daiAmount.sub(1), { from: owner }), "MV2: repay less or full", ); }); @@ -448,9 +448,9 @@ contract("MakerV2Loan", (accounts) => { const proxy = await Proxy.new(walletImplementation.address); const wallet2 = await BaseWallet.at(proxy.address); - await wallet2.init(owner2, [versionManager.contractAddress]); + await wallet2.init(owner2, [versionManager.address]); await assert.revertWith( - makerV2.from(owner2).removeDebt(wallet2.address, loanId, ETH_TOKEN, parseEther("0.010")), + makerV2.removeDebt(wallet2.address, loanId, ETH_TOKEN, parseEther("0.010"), { from: owner2 }), "MV2: unauthorized loanId", ); }); @@ -462,16 +462,16 @@ contract("MakerV2Loan", (accounts) => { // give some ETH to the wallet to be used for repayment await owner.send({ to: walletAddress, value: collateralAmount.mul(2) }); await increaseTime(3); // wait 3 seconds - const beforeDAI = await dai.balanceOf(wallet.contractAddress); + const beforeDAI = await dai.balanceOf(wallet.address); const method = "closeLoan"; const params = [wallet.address, loanId]; if (relayed) { - const txR = await manager.relay(makerV2, method, params, { contractAddress: walletAddress }, [owner]); + const txR = await manager.relay(makerV2, method, params, { address: walletAddress }, [owner]); assert.isTrue(txR.events.find((e) => e.event === "TransactionExecuted").args.success, "Relayed tx should succeed"); } else { - await makerV2.from(owner)[method](...params, { gasLimit: 3000000 }); + await makerV2[method](...params, { gasLimit: 3000000, from: owner }); } - const afterDAI = await dai.balanceOf(wallet.contractAddress); + const afterDAI = await dai.balanceOf(wallet.address); assert.isTrue(afterDAI.lt(beforeDAI), "should have spent some DAI"); } @@ -491,9 +491,9 @@ contract("MakerV2Loan", (accounts) => { const proxy = await Proxy.new(walletImplementation.address); const wallet2 = await BaseWallet.at(proxy.address); - await wallet2.init(owner2, [versionManager.contractAddress]); + await wallet2.init(owner2, [versionManager.address]); await assert.revertWith( - makerV2.from(owner2).closeLoan(wallet2.address, loanId), + makerV2.closeLoan(wallet2.address, loanId, { from: owner2 }), "MV2: unauthorized loanId", ); }); @@ -545,21 +545,21 @@ contract("MakerV2Loan", (accounts) => { describe("Acquiring a wallet's vault", () => { async function testAcquireVault({ relayed }) { // Create the vault with `owner` as owner - const { ilk } = await makerRegistry.collaterals(weth.contractAddress); - const txR = await (await cdpManager.from(owner).open(ilk, owner)).wait(); + const { ilk } = await makerRegistry.collaterals(weth.address); + const txR = await (await cdpManager.open(ilk, owner), { from: owner }).wait(); const vaultId = txR.events.find((e) => e.event === "NewCdp").args.cdp; // Transfer the vault to the wallet - await cdpManager.from(owner).give(vaultId, walletAddress); + await cdpManager.give(vaultId, walletAddress, { from: owner }); // Transfer the vault to the feature const loanId = bigNumToBytes32(vaultId); const method = "acquireLoan"; const params = [walletAddress, loanId]; let txReceipt; if (relayed) { - txReceipt = await manager.relay(makerV2, method, params, { contractAddress: walletAddress }, [owner]); + txReceipt = await manager.relay(makerV2, method, params, { address: walletAddress }, [owner]); assert.isTrue(txReceipt.events.find((e) => e.event === "TransactionExecuted").args.success, "Relayed tx should succeed"); } else { - const tx = await makerV2.from(owner)[method](...params, { gasLimit: 1000000 }); + const tx = await makerV2[method](...params, { gasLimit: 1000000, from: owner }); txReceipt = await makerV2.verboseWaitForTransaction(tx); } assert.isTrue(await hasEvent(txReceipt, makerV2, "LoanAcquired"), "should have generated LoanAcquired event"); @@ -587,29 +587,29 @@ contract("MakerV2Loan", (accounts) => { it("should not transfer a vault that is not owned by the wallet", async () => { // Create the vault with `owner` as owner const { ilk } = await makerRegistry.collaterals(weth.address); - const txR = await (await cdpManager.from(owner).open(ilk, owner)).wait(); + const txR = await (await cdpManager.open(ilk, owner, { from: owner })).wait(); const vaultId = txR.events.find((e) => e.event === "NewCdp").args.cdp; const loanId = bigNumToBytes32(vaultId); // We are NOT transferring the vault from the owner to the wallet await assert.revertWith( - makerV2.from(owner).acquireLoan(walletAddress, loanId), "MV2: wrong vault owner", + makerV2.acquireLoan(walletAddress, loanId, { from: owner }), "MV2: wrong vault owner", ); }); it("should not transfer a vault that is not given to the feature", async () => { // Deploy a fake wallet const fakeWallet = await FakeWallet.new(false, AddressZero, 0, "0x00"); - await fakeWallet.init(owner, [versionManager.contractAddress]); - await versionManager.from(owner).upgradeWallet(fakeWallet.contractAddress, await versionManager.lastVersion()); + await fakeWallet.init(owner, [versionManager.address]); + await versionManager.upgradeWallet(fakeWallet.address, await versionManager.lastVersion(), { from: owner }); // Create the vault with `owner` as owner const { ilk } = await makerRegistry.collaterals(weth.address); - const txR = await (await cdpManager.from(owner).open(ilk, owner)).wait(); + const txR = await (await cdpManager.open(ilk, owner, { from: owner })).wait(); const vaultId = txR.events.find((e) => e.event === "NewCdp").args.cdp; const loanId = bigNumToBytes32(vaultId); // Transfer the vault to the fake wallet - await cdpManager.from(owner).give(vaultId, fakeWallet.address); + await cdpManager.give(vaultId, fakeWallet.address, { from: owner }); await assert.revertWith( - makerV2.from(owner).acquireLoan(fakeWallet.address, loanId), "MV2: failed give", + makerV2.acquireLoan(fakeWallet.address, loanId, { from: owner }), "MV2: failed give", ); }); @@ -628,18 +628,18 @@ contract("MakerV2Loan", (accounts) => { it("should not allow reentrancy in acquireLoan", async () => { // Deploy a fake wallet capable of reentrancy const acquireLoanCallData = makerV2.contract.interface.functions.acquireLoan.encode([AddressZero, bigNumToBytes32(ethers.BigNumber.from(0))]); - const fakeWallet = await FakeWallet.new(true, makerV2.contractAddress, 0, acquireLoanCallData); - await fakeWallet.init(owner, [versionManager.contractAddress]); - await versionManager.from(owner).upgradeWallet(fakeWallet.contractAddress, await versionManager.lastVersion()); + const fakeWallet = await FakeWallet.new(true, makerV2.address, 0, acquireLoanCallData); + await fakeWallet.init(owner, [versionManager.address]); + await versionManager.upgradeWallet(fakeWallet.address, await versionManager.lastVersion(), { from: owner }); // Create the vault with `owner` as owner const { ilk } = await makerRegistry.collaterals(weth.address); - const txR = await (await cdpManager.from(owner).open(ilk, owner)).wait(); + const txR = await (await cdpManager.open(ilk, owner, { from: owner })).wait(); const vaultId = txR.events.find((e) => e.event === "NewCdp").args.cdp; const loanId = bigNumToBytes32(vaultId); // Transfer the vault to the fake wallet - await cdpManager.from(owner).give(vaultId, fakeWallet.address); + await cdpManager.give(vaultId, fakeWallet.address, { from: owner }); await assert.revertWith( - makerV2.from(owner).acquireLoan(fakeWallet.address, loanId), "MV2: reentrant call", + makerV2.acquireLoan(fakeWallet.address, loanId, { from: owner }), "MV2: reentrant call", ); }); }); @@ -657,14 +657,14 @@ contract("MakerV2Loan", (accounts) => { // Deploy and register the upgraded MakerV2 feature upgradedMakerV2 = await UpgradedMakerV2Manager.new( - lockStorage.contractAddress, - migration.contractAddress, - pot.contractAddress, - jug.contractAddress, - makerRegistry.contractAddress, - uniswapFactory.contractAddress, - makerV2.contractAddress, - versionManager.contractAddress, + lockStorage.address, + migration.address, + pot.address, + jug.address, + makerRegistry.address, + uniswapFactory.address, + makerV2.address, + versionManager.address, { gasLimit: 10700000 }, ); @@ -680,7 +680,7 @@ contract("MakerV2Loan", (accounts) => { let loanId2; if (withBatVault) { // Open a BAT vault with the old MakerV2 feature - const batTestAmounts = await getTestAmounts(bat.contractAddress); + const batTestAmounts = await getTestAmounts(bat.address); await bat["mint(address,uint256)"](walletAddress, batTestAmounts.collateralAmount.add(parseEther("0.01"))); loanId2 = await testOpenLoan({ collateralAmount: batTestAmounts.collateralAmount, @@ -692,10 +692,10 @@ contract("MakerV2Loan", (accounts) => { // Add the upgraded feature await versionManager.addVersion([ - upgradedMakerV2.contractAddress, - transferManager.contractAddress, - relayerManager.contractAddress, - ], [upgradedMakerV2.contractAddress]); + upgradedMakerV2.address, + transferManager.address, + relayerManager.address, + ], [upgradedMakerV2.address]); const method = "upgradeWallet"; const lastVersion = await versionManager.lastVersion(); const params = [walletAddress, lastVersion]; @@ -703,7 +703,7 @@ contract("MakerV2Loan", (accounts) => { const txR = await manager.relay(versionManager, method, params, wallet, [owner]); assert.isTrue(txR.events.find((e) => e.event === "TransactionExecuted").args.success, "Relayed tx should succeed"); } else { - await versionManager.from(owner)[method](...params, { gasLimit: 2000000 }); + await versionManager[method](...params, { gasLimit: 2000000, from: owner }); } // Make sure that the vaults can be manipulated from the upgraded feature await testChangeCollateral({ @@ -713,7 +713,7 @@ contract("MakerV2Loan", (accounts) => { relayed, makerV2Manager: upgradedMakerV2, }); - await upgradedMakerV2.from(owner).closeLoan(walletAddress, loanId1, { gasLimit: 4500000 }); + await upgradedMakerV2.closeLoan(walletAddress, loanId1, { gasLimit: 4500000, from: owner }); if (withBatVault) { await testChangeCollateral({ @@ -724,14 +724,14 @@ contract("MakerV2Loan", (accounts) => { collateral: bat, makerV2Manager: upgradedMakerV2, }); - await upgradedMakerV2.from(owner).closeLoan(walletAddress, loanId2, { gasLimit: 4500000 }); + await upgradedMakerV2.closeLoan(walletAddress, loanId2, { gasLimit: 4500000, from: owner }); } // reset the last version to the default bundle await versionManager.addVersion([ - makerV2.contractAddress, - transferManager.contractAddress, - relayerManager.contractAddress, + makerV2.address, + transferManager.address, + relayerManager.address, ], []); } @@ -752,24 +752,24 @@ contract("MakerV2Loan", (accounts) => { }); it("should not allow non-feature to give vault", async () => { - await assert.revertWith(makerV2.from(owner).giveVault(walletAddress, formatBytes32String("")), "BF: must be a wallet feature"); + await assert.revertWith(makerV2.giveVault(walletAddress, formatBytes32String(""), { from: owner }), "BF: must be a wallet feature"); }); it("should not allow (fake) feature to give unowned vault", async () => { // Deploy a (fake) bad feature - const badFeature = await BadFeaturenew(lockStorage.contractAddress, versionManager.contractAddress, 0); + const badFeature = await BadFeaturenew(lockStorage.address, versionManager.address, 0); // Add the bad feature to the wallet await versionManager.addVersion([ - badFeature.contractAddress, - transferManager.contractAddress, - relayerManager.contractAddress, + badFeature.address, + transferManager.address, + relayerManager.address, ], []); const lastVersion = await versionManager.lastVersion(); - await versionManager.from(owner).upgradeWallet(walletAddress, lastVersion, { gasLimit: 2000000 }); + await versionManager.upgradeWallet(walletAddress, lastVersion, { gasLimit: 2000000, from: owner }); // Use the bad module to attempt a bad giveVault call const callData = makerV2.contract.interface.functions.giveVault.encode([walletAddress, bigNumToBytes32(ethers.BigNumber.from(666))]); - await assert.revertWith(badFeature.from(owner).callContract(makerV2.contractAddress, 0, callData), "MV2: unauthorized loanId"); + await assert.revertWith(badFeature.callContract(makerV2.address, 0, callData, { from: owner }), "MV2: unauthorized loanId"); }); }); }); diff --git a/test/nftTransfer.js b/test/nftTransfer.js index 8d5d6065b..b4a1ab22f 100644 --- a/test/nftTransfer.js +++ b/test/nftTransfer.js @@ -107,8 +107,8 @@ contract("NftTransfer", (accounts) => { assert.equal(error, expectedError); } } else { - const txPromise = nftFeature.from(owner1) - .transferNFT(wallet1.address, nftContract.address, recipientAddress, nftId, safe, ZERO_BYTES32, { gasLimit: 300000 }); + const txPromise = nftModule + .transferNFT(wallet1.address, nftContract.address, recipientAddress, nftId, safe, ZERO_BYTES32, { from: owner1, gasLimit: 300000 }); if (shouldSucceed) { await txPromise; } else { @@ -194,11 +194,12 @@ contract("NftTransfer", (accounts) => { beforeEach(async () => { erc20 = await ERC20.new([wallet1.address], 1000, 18); tokenPriceRegistry.setPriceForTokenList([erc20.address], [1]); - await erc20Approver.from(owner1).approveERC20( + await erc20Approver.approveERC20( wallet1.address, erc20.address, wallet1.address, // spender 100, + { from: owner1 } ); // amount }); diff --git a/test/recoveryManager.js b/test/recoveryManager.js index 1d368f0c9..a6332253e 100644 --- a/test/recoveryManager.js +++ b/test/recoveryManager.js @@ -110,7 +110,7 @@ contract("RecoveryManager", (accounts) => { }); for (const address of guardianAddresses) { - await guardianManager.from(owner).addGuardian(wallet.address, address); + await guardianManager.addGuardian(wallet.address, address, { from: owner }); } await increaseTime(30); @@ -487,7 +487,7 @@ contract("RecoveryManager", (accounts) => { ethers.constants.AddressZero, ); await assert.revertWith( - relayerManager.from(nonowner2).execute( + relayerManager.execute( wallet.address, recoveryManager.address, methodData, @@ -497,7 +497,7 @@ contract("RecoveryManager", (accounts) => { 700000, ETH_TOKEN, ethers.constants.AddressZero, - { gasLimit: 800000 }, + { gasLimit: 800000, from: nonowner2 }, ), "RM: unknown method", ); diff --git a/test/relayer.js b/test/relayer.js index 851f6f6f4..ea29e0e91 100644 --- a/test/relayer.js +++ b/test/relayer.js @@ -345,7 +345,7 @@ contract("RelayerManager", (accounts) => { assert.isTrue(dailySpent.toNumber() === 10, "initial daily spent should be 10"); const rBalanceStart = await getBalance(recipient); // add a guardian - await guardianManager.from(owner).addGuardian(wallet.address, guardian); + await guardianManager.addGuardian(wallet.address, guardian, { from: owner }); // call approvedTransfer const params = [wallet.address, ETH_TOKEN, recipient, 1000, ethers.constants.HashZero]; const nonce = await getNonceForRelay(); @@ -399,7 +399,7 @@ contract("RelayerManager", (accounts) => { it("should succeed when called directly on VersionManager", async () => { await registry.registerModule(versionManagerV2.address, formatBytes32String("versionManagerV2")); - await versionManager.from(owner).addModule(wallet.address, versionManagerV2.address); + await versionManager.addModule(wallet.address, versionManagerV2.address, { from: owner }); const isModuleAuthorised = await wallet.authorised(versionManagerV2.address); assert.isTrue(isModuleAuthorised); @@ -407,7 +407,7 @@ contract("RelayerManager", (accounts) => { }); it("should fail to add module which is not registered", async () => { - await assert.revertWith(versionManager.from(owner).addModule(wallet.address, versionManagerV2.address), + await assert.revertWith(versionManager.addModule(wallet.address, versionManagerV2.address, { from: owner }), "VM: module is not registered"); }); }); diff --git a/test/simpleUpgrader.js b/test/simpleUpgrader.js index 6ec2e60b2..ad457d5fd 100644 --- a/test/simpleUpgrader.js +++ b/test/simpleUpgrader.js @@ -86,7 +86,7 @@ contract("SimpleUpgrader", (accounts) => { let isAuthorised = await wallet.authorised(initialModule.address); assert.equal(isAuthorised, true, "initial module should be authorised"); // add module to wallet - await initialModule.from(owner).addModule(wallet.address, moduleToAdd.address); + await initialModule.addModule(wallet.address, moduleToAdd.address, { from: owner }); isAuthorised = await wallet.authorised(moduleToAdd.address); assert.equal(isAuthorised, true, "added module should be authorised"); @@ -104,7 +104,7 @@ contract("SimpleUpgrader", (accounts) => { let isAuthorised = await wallet.authorised(initialModule.address); assert.equal(isAuthorised, true, "initial module should be authorised"); // try (and fail) to add moduleToAdd to wallet - await assert.revert(initialModule.from(owner).addModule(wallet.address, moduleToAdd.address)); + await assert.revert(initialModule.addModule(wallet.address, moduleToAdd.address, { from: owner })); isAuthorised = await wallet.authorised(moduleToAdd.address); assert.equal(isAuthorised, false, "unregistered module should not be authorised"); }); @@ -125,11 +125,11 @@ contract("SimpleUpgrader", (accounts) => { await registry.registerModule(upgrader.address, formatBytes32String("V1toV2")); // check we can't upgrade from V1 to V2 - await assert.revertWith(moduleV1.from(owner).addModule(wallet.address, upgrader.address), "SU: Not all modules are registered"); + await assert.revertWith(moduleV1.addModule(wallet.address, upgrader.address, { from: owner }), "SU: Not all modules are registered"); // register module V2 await registry.registerModule(moduleV2.address, formatBytes32String("V2")); // now we can upgrade - await moduleV1.from(owner).addModule(wallet.address, upgrader.address); + await moduleV1.addModule(wallet.address, upgrader.address, { from: owner }); // test if the upgrade worked const isV1Authorised = await wallet.authorised(moduleV1.address); @@ -180,7 +180,7 @@ contract("SimpleUpgrader", (accounts) => { const { success } = (await utils.parseLogs(txReceipt, relayerV1, "TransactionExecuted"))[0]; assert.isTrue(!success, "Relayed upgrade to 0 module should have failed."); } else { - assert.revert(moduleV1.from(owner).addModule(...params2)); + assert.revert(moduleV1.addModule(...params2, { from: owner })); } return; } @@ -189,7 +189,7 @@ contract("SimpleUpgrader", (accounts) => { const { success } = (await utils.parseLogs(txReceipt, relayerV1, "TransactionExecuted"))[0]; assert.isTrue(success, "Relayed tx should only have succeeded"); } else { - const tx = await moduleV1.from(owner).addModule(...params1); + const tx = await moduleV1.addModule(...params1, { from: owner }); txReceipt = await moduleV1.verboseWaitForTransaction(tx); } @@ -275,8 +275,8 @@ contract("SimpleUpgrader", (accounts) => { relayerManager.address, ], []); await wallet.init(owner, [versionManager.address]); - await versionManager.from(owner).upgradeWallet(wallet.address, await versionManager.lastVersion()); - await guardianManager.from(owner).addGuardian(wallet.address, guardian); + await versionManager.upgradeWallet(wallet.address, await versionManager.lastVersion(), { from: owner }); + await guardianManager.addGuardian(wallet.address, guardian, { from: owner }); // Setup module v2 for the upgrade const { module } = await deployTestModule(); @@ -290,10 +290,10 @@ contract("SimpleUpgrader", (accounts) => { await registry.registerModule(upgrader.address, formatBytes32String("V1toV2")); // Guardian locks the wallet - await lockManager.from(guardian).lock(wallet.address); + await lockManager.lock(wallet.address, { from: guardian }); // Try to upgrade while wallet is locked - await assert.revertWith(versionManager.from(owner).addModule(wallet.address, upgrader.address), "BF: wallet locked"); + await assert.revertWith(versionManager.addModule(wallet.address, upgrader.address, { from: owner }), "BF: wallet locked"); // Check wallet is still locked const locked = await lockManager.isLocked(wallet.address); @@ -321,7 +321,7 @@ contract("SimpleUpgrader", (accounts) => { assert.isTrue(locked, "wallet should be locked"); // Try to upgrade while wallet is under recovery - await assert.revertWith(versionManager.from(owner).addModule(wallet.address, upgrader.address), "BF: wallet locked"); + await assert.revertWith(versionManager.addModule(wallet.address, upgrader.address, { from: owner }), "BF: wallet locked"); // Check wallet is still locked locked = await lockManager.isLocked(wallet.address); diff --git a/test/tokenExchanger.js b/test/tokenExchanger.js index 6d7b8b9f8..dd9ad3350 100644 --- a/test/tokenExchanger.js +++ b/test/tokenExchanger.js @@ -300,7 +300,7 @@ contract("TokenExchanger", (accounts) => { const { success } = (await parseLogs(txR, relayerManager, "TransactionExecuted"))[0]; assert.isTrue(success, "Relayed tx should succeed"); } else { - txR = await (await exchanger.from(owner)[method](...params, { gasLimit: 2000000 })).wait(); + txR = await (await exchanger[method](...params, { gasLimit: 2000000, from: owner })).wait(); } const { destAmount } = (await parseLogs(txR, exchanger, "TokenExchanged"))[0]; @@ -382,7 +382,7 @@ contract("TokenExchanger", (accounts) => { fixedAmount, variableAmount, }); - await assert.revertWith(exchanger.from(owner)[method](...params, { gasLimit: 2000000 }), "DR: Unauthorised DEX"); + await assert.revertWith(exchanger[method](...params, { gasLimit: 2000000, from: owner }), "DR: Unauthorised DEX"); // reset whitelist await dexRegistry.setAuthorised([kyberAdapter.address, uniswapV2Adapter.address], [true, true]); }); @@ -408,7 +408,7 @@ contract("TokenExchanger", (accounts) => { const testTradeWithPreExistingAllowance = async (allowance) => { const spender = await paraswap.getTokenTransferProxy(); - await transferManager.from(owner).approveToken(wallet.address, tokenA.address, spender, allowance); + await transferManager.approveToken(wallet.address, tokenA.address, spender, allowance, { from: owner }); // call sell await testTrade({ method, fromToken: tokenA.address, toToken: ETH_TOKEN, relayed: false, diff --git a/test/transferManager.js b/test/transferManager.js index b4732b790..a35eda04f 100644 --- a/test/transferManager.js +++ b/test/transferManager.js @@ -124,7 +124,7 @@ contract("TransferManager", (accounts) => { const proxy = await Proxy.new(walletImplementation.address); wallet = await BaseWallet.at(proxy.address); await wallet.init(owner, [versionManager.address]); - await versionManager.from(owner).upgradeWallet(wallet.address, await versionManager.lastVersion()); + await versionManager.upgradeWallet(wallet.address, await versionManager.lastVersion(), { from: owner }); const decimals = 12; // number of decimal for TOKN contract const tokenRate = new BN(10).pow(new BN(19)).muln(51); // 1 TOKN = 0.00051 ETH = 0.00051*10^18 ETH wei => *10^(18-decimals) = 0.00051*10^18 * 10^6 = 0.00051*10^24 = 51*10^19 @@ -160,7 +160,7 @@ contract("TransferManager", (accounts) => { const proxy = await Proxy.new(walletImplementation.address); const existingWallet = await BaseWallet.at(proxy.address); await existingWallet.init(owner, [versionManager.address]); - await versionManager.from(owner).upgradeWallet(existingWallet.address, await versionManager.lastVersion()); + await versionManager.upgradeWallet(existingWallet.address, await versionManager.lastVersion(), { from: owner }); const defautlimit = await transferManager1.defaultLimit(); const limit = await transferManager1.getCurrentLimit(existingWallet.address); @@ -173,28 +173,28 @@ contract("TransferManager", (accounts) => { describe("Managing the whitelist", () => { it("should add/remove an account to/from the whitelist", async () => { - await transferManager.from(owner).addToWhitelist(wallet.address, recipient); - let isTrusted = await transferManager.isWhitelisted(wallet.address, recipient); + await transferModule.addToWhitelist(wallet.address, recipient, { from: owner }); + let isTrusted = await transferModule.isWhitelisted(wallet.address, recipient); assert.equal(isTrusted, false, "should not be trusted during the security period"); await increaseTime(3); isTrusted = await transferManager.isWhitelisted(wallet.address, recipient); assert.equal(isTrusted, true, "should be trusted after the security period"); - await transferManager.from(owner).removeFromWhitelist(wallet.address, recipient); - isTrusted = await transferManager.isWhitelisted(wallet.address, recipient); + await transferModule.removeFromWhitelist(wallet.address, recipient, { from: owner }); + isTrusted = await transferModule.isWhitelisted(wallet.address, recipient); assert.equal(isTrusted, false, "should no removed from whitelist immediately"); }); it("should not be able to whitelist a token twice", async () => { - await transferManager.from(owner).addToWhitelist(wallet.address, recipient); + await transferManager.addToWhitelist(wallet.address, recipient, { from: owner }); await increaseTime(3); await assert.revertWith( - transferManager.from(owner).addToWhitelist(wallet.address, recipient), "TT: target already whitelisted", + transferManager.addToWhitelist(wallet.address, recipient, { from: owner }), "TT: target already whitelisted", ); }); it("should be able to remove a whitelisted token from the whitelist during the security period", async () => { - await transferManager.from(owner).addToWhitelist(wallet.address, recipient); - await transferManager.from(owner).removeFromWhitelist(wallet.address, recipient); + await transferManager.addToWhitelist(wallet.address, recipient, { from: owner }); + await transferManager.removeFromWhitelist(wallet.address, recipient, { from: owner }); await increaseTime(3); const isTrusted = await transferManager.isWhitelisted(wallet.address, recipient); @@ -215,13 +215,13 @@ contract("TransferManager", (accounts) => { it("should get a token price correctly", async () => { const tokenPrice = new BN(10).pow(new BN(18)).muln(1800); - await tokenPriceRegistry.from(infrastructure).setPriceForTokenList([erc20First.address], [tokenPrice.toString()]); + await tokenPriceRegistry.setPriceForTokenList([erc20First.address], [tokenPrice.toString()]); const tokenPriceSet = await tokenPriceRegistry.getTokenPrice(erc20First.address); expect(tokenPrice).to.eq.BN(tokenPriceSet.toString()); }); it("should get multiple token prices correctly", async () => { - await tokenPriceRegistry.from(infrastructure).setPriceForTokenList([erc20First.address, erc20Second.address], [1800, 1900]); + await tokenPriceRegistry.setPriceForTokenList([erc20First.address, erc20Second.address], [1800, 1900]); const tokenPricesSet = await tokenPriceRegistry.getPriceForTokenList([erc20First.address, erc20Second.address]); expect(1800).to.eq.BN(tokenPricesSet[0].toString()); expect(1900).to.eq.BN(tokenPricesSet[1].toString()); @@ -229,13 +229,13 @@ contract("TransferManager", (accounts) => { it("should set token price correctly", async () => { const tokenPrice = new BN(10).pow(new BN(18)).muln(1800); - await tokenPriceRegistry.from(infrastructure).setPriceForTokenList([erc20First.address], [tokenPrice.toString()]); + await tokenPriceRegistry.setPriceForTokenList([erc20First.address], [tokenPrice.toString()]); const tokenPriceSet = await tokenPriceRegistry.getTokenPrice(erc20First.address); expect(tokenPrice).to.eq.BN(tokenPriceSet.toString()); }); it("should set multiple token prices correctly", async () => { - await tokenPriceRegistry.from(infrastructure).setPriceForTokenList([erc20First.address, erc20Second.address], [1800, 1900]); + await tokenPriceRegistry.setPriceForTokenList([erc20First.address, erc20Second.address], [1800, 1900]); const tokenPrice1Set = await tokenPriceRegistry.getTokenPrice(erc20First.address); expect(1800).to.eq.BN(tokenPrice1Set.toString()); const tokenPrice2Set = await tokenPriceRegistry.getTokenPrice(erc20Second.address); @@ -244,7 +244,7 @@ contract("TransferManager", (accounts) => { it("should be able to get the ether value of a given amount of tokens", async () => { const tokenPrice = new BN(10).pow(new BN(18)).muln(1800); - await tokenPriceRegistry.from(infrastructure).setPriceForTokenList([erc20First.address], [tokenPrice.toString()]); + await tokenPriceRegistry.setPriceForTokenList([erc20First.address], [tokenPrice.toString()]); const etherValue = await getEtherValue("15000000000000000000", erc20First.address); // expectedValue = 1800*10^18/10^18 (price for 1 token wei) * 15*10^18 (amount) = 1800 * 15*10^18 = 27,000 * 10^18 const expectedValue = new BN(10).pow(new BN(18)).muln(27000); @@ -253,7 +253,7 @@ contract("TransferManager", (accounts) => { it("should be able to get the ether value for a token with 0 decimals", async () => { const tokenPrice = new BN(10).pow(new BN(36)).muln(23000); - await tokenPriceRegistry.from(infrastructure).setPriceForTokenList([erc20ZeroDecimals.address], [tokenPrice.toString()]); + await tokenPriceRegistry.setPriceForTokenList([erc20ZeroDecimals.address], [tokenPrice.toString()]); const etherValue = await getEtherValue(100, erc20ZeroDecimals.address); // expectedValue = 23000*10^36 * 100 / 10^18 = 2,300,000 * 10^18 const expectedValue = new BN(10).pow(new BN(18)).muln(2300000); @@ -261,7 +261,7 @@ contract("TransferManager", (accounts) => { }); it("should return 0 as the ether value for a low priced token", async () => { - await tokenPriceRegistry.from(infrastructure).setPriceForTokenList([erc20First.address], [23000]); + await tokenPriceRegistry.setPriceForTokenList([erc20First.address], [23000]); const etherValue = await getEtherValue(100, erc20First.address); assert.equal(etherValue.toString(), 0); // 2,300,000 }); @@ -277,15 +277,15 @@ contract("TransferManager", (accounts) => { await existingWallet.send(ethers.BigNumber.from("100000000")); // change the limit - await previousTransferManager.from(owner).changeLimit(existingWallet.address, 4000000); + await previousTransferManager.changeLimit(existingWallet.address, 4000000, { from: owner }); await increaseTime(SECURITY_PERIOD + 1); let limit = await previousTransferManager.getCurrentLimit(existingWallet.address); assert.equal(limit.toNumber(), 4000000, "limit should be changed"); // transfer some funds - await previousTransferManager.from(owner).transferToken(existingWallet.address, ETH_TOKEN, recipient, 1000000, ZERO_BYTES32); + await previousTransferManager.transferToken(existingWallet.address, ETH_TOKEN, recipient, 1000000, ZERO_BYTES32, { from: owner }); // add new module - await previousTransferManager.from(owner).addModule(existingWallet.address, versionManager.address); - const tx = await versionManager.from(owner).upgradeWallet(existingWallet.address, await versionManager.lastVersion()); + await previousTransferManager.addModule(existingWallet.address, versionManager.address, { from: owner }); + const tx = await versionManager.upgradeWallet(existingWallet.address, await versionManager.lastVersion(), { from: owner }); const txReceipt = await previousTransferManager.verboseWaitForTransaction(tx); assert.isTrue(utils.hasEvent(txReceipt, transferManager, "DailyLimitMigrated")); // check result @@ -301,7 +301,7 @@ contract("TransferManager", (accounts) => { }); it("should only increase the limit after the security period", async () => { - await transferManager.from(owner).changeLimit(wallet.address, 4000000); + await transferManager.changeLimit(wallet.address, 4000000, { from: owner }); let limit = await transferManager.getCurrentLimit(wallet.address); assert.equal(limit.toNumber(), ETH_LIMIT, "limit should be ETH_LIMIT"); await increaseTime(SECURITY_PERIOD + 1); @@ -312,7 +312,7 @@ contract("TransferManager", (accounts) => { it("should decrease the limit immediately", async () => { let limit = await transferManager.getCurrentLimit(wallet.address); assert.equal(limit.toNumber(), ETH_LIMIT, "limit should be ETH_LIMIT"); - await transferManager.from(owner).changeLimit(wallet.address, ETH_LIMIT / 2); + await transferManager.changeLimit(wallet.address, ETH_LIMIT / 2, { from: owner }); limit = await transferManager.getCurrentLimit(wallet.address); assert.equal(limit.toNumber(), ETH_LIMIT / 2, "limit should be decreased immediately"); }); @@ -325,7 +325,7 @@ contract("TransferManager", (accounts) => { }); it("should correctly set the pending limit", async () => { - const tx = await transferManager.from(owner).changeLimit(wallet.address, 4000000); + const tx = await transferManager.changeLimit(wallet.address, 4000000, { from: owner }); const txReceipt = await transferManager.verboseWaitForTransaction(tx); const timestamp = await manager.getTimestamp(txReceipt.block); const { _pendingLimit, _changeAfter } = await transferManager.getPendingLimit(wallet.address); @@ -334,7 +334,7 @@ contract("TransferManager", (accounts) => { }); it("should be able to disable the limit", async () => { - const tx = await transferManager.from(owner).disableLimit(wallet.address); + const tx = await transferManager.disableLimit(wallet.address, { from: owner }); const txReceipt = await transferManager.verboseWaitForTransaction(tx); assert.isTrue(utils.hasEvent(txReceipt, transferManager, "DailyLimitDisabled")); let limitDisabled = await transferManager.isLimitDisabled(wallet.address); @@ -347,7 +347,7 @@ contract("TransferManager", (accounts) => { it("should return the correct unspent daily limit amount", async () => { await wallet.send(ethers.BigNumber.from(ETH_LIMIT)); const transferAmount = ETH_LIMIT - 100; - await transferManager.from(owner).transferToken(wallet.address, ETH_TOKEN, recipient, transferAmount, ZERO_BYTES32); + await transferManager.transferToken(wallet.address, ETH_TOKEN, recipient, transferAmount, ZERO_BYTES32, { from: owner }); const { _unspent } = await transferManager.getDailyUnspent(wallet.address); assert.equal(_unspent.toNumber(), 100); }); @@ -355,11 +355,11 @@ contract("TransferManager", (accounts) => { it("should return the correct spent daily limit amount", async () => { await wallet.send(ethers.BigNumber.from(ETH_LIMIT)); // Transfer 100 wei - const tx = await transferManager.from(owner).transferToken(wallet.address, ETH_TOKEN, recipient, 100, ZERO_BYTES32); + const tx = await transferManager.transferToken(wallet.address, ETH_TOKEN, recipient, 100, ZERO_BYTES32, { from: owner }); const txReceipt = await transferManager.verboseWaitForTransaction(tx); const timestamp = await manager.getTimestamp(txReceipt.block); // Then transfer 200 wei more - await transferManager.from(owner).transferToken(wallet.address, ETH_TOKEN, recipient, 200, ZERO_BYTES32); + await transferManager.transferToken(wallet.address, ETH_TOKEN, recipient, 200, ZERO_BYTES32, { from: owner }); const dailySpent = await limitStorage.getDailySpent(wallet.address); assert.equal(dailySpent[0].toNumber(), 300); @@ -367,8 +367,8 @@ contract("TransferManager", (accounts) => { }); it("should return 0 if the entire daily limit amount has been spent", async () => { - await infrastructure.sendTransaction({ to: wallet.address, value: ethers.BigNumber.from(ETH_LIMIT) }); - await transferManager.from(owner).transferToken(wallet.address, ETH_TOKEN, recipient, ETH_LIMIT, ZERO_BYTES32); + await wallet.send(ethers.BigNumber.from(ETH_LIMIT)); + await transferManager.transferToken(wallet.address, ETH_TOKEN, recipient, ETH_LIMIT, ZERO_BYTES32, { from: owner }); const { _unspent } = await transferManager.getDailyUnspent(wallet.address); assert.equal(_unspent.toNumber(), 0); }); @@ -385,7 +385,7 @@ contract("TransferManager", (accounts) => { if (relayed) { txReceipt = await manager.relay(transferManager, "transferToken", params, wallet, [signer]); } else { - const tx = await transferManager.from(signer).transferToken(...params); + const tx = await transferManager.transferToken(...params, { from: signer }); txReceipt = await transferManager.verboseWaitForTransaction(tx); } assert.isTrue(await utils.hasEvent(txReceipt, transferManager, "Transfer"), "should have generated Transfer event"); @@ -410,7 +410,7 @@ contract("TransferManager", (accounts) => { if (relayed) { txReceipt = await manager.relay(transferManager, "transferToken", params, wallet, [owner]); } else { - tx = await transferManager.from(owner).transferToken(...params); + tx = await transferManager.transferToken(...params, { from: owner }); txReceipt = await transferManager.verboseWaitForTransaction(tx); } @@ -552,7 +552,7 @@ contract("TransferManager", (accounts) => { token: ETH_TOKEN, to: recipient, amount: ETH_LIMIT * 2, delay: 0, }); await increaseTime(1); - const tx = await transferManager.from(owner).cancelPendingTransfer(wallet.address, id); + const tx = await transferManager.cancelPendingTransfer(wallet.address, id, { from: owner }); const txReceipt = await transferManager.verboseWaitForTransaction(tx); assert.isTrue(await utils.hasEvent(txReceipt, transferManager, "PendingTransferCanceled"), "should have generated PendingTransferCanceled event"); @@ -565,7 +565,7 @@ contract("TransferManager", (accounts) => { token: erc20, to: recipient, amount: ETH_LIMIT * 2, delay: 0, }); await increaseTime(1); - const tx = await transferManager.from(owner).cancelPendingTransfer(wallet.address, id); + const tx = await transferManager.cancelPendingTransfer(wallet.address, id, { from: owner }); const txReceipt = await transferManager.verboseWaitForTransaction(tx); assert.isTrue(await utils.hasEvent(txReceipt, transferManager, "PendingTransferCanceled"), "should have generated PendingTransferCanceled event"); @@ -574,13 +574,13 @@ contract("TransferManager", (accounts) => { }); it("should send immediately ETH to a whitelisted address", async () => { - await transferManager.from(owner).addToWhitelist(wallet.address, recipient); + await transferManager.addToWhitelist(wallet.address, recipient, { from: owner }); await increaseTime(3); await doDirectTransfer({ token: ETH_TOKEN, to: recipient, amount: ETH_LIMIT * 2 }); }); it("should send immediately ERC20 to a whitelisted address", async () => { - await transferManager.from(owner).addToWhitelist(wallet.address, recipient); + await transferManager.addToWhitelist(wallet.address, recipient, { from: owner }); await increaseTime(3); await doDirectTransfer({ token: erc20, to: recipient, amount: ETH_LIMIT * 2 }); }); @@ -595,7 +595,7 @@ contract("TransferManager", (accounts) => { if (relayed) { txReceipt = await manager.relay(transferManager, "approveToken", params, wallet, [signer]); } else { - const tx = await transferManager.from(signer).approveToken(...params); + const tx = await transferManager.approveToken(...params, { from: signer }); txReceipt = await transferManager.verboseWaitForTransaction(tx); } assert.isTrue(await utils.hasEvent(txReceipt, transferManager, "Approved"), "should have generated Approved event"); @@ -621,7 +621,7 @@ contract("TransferManager", (accounts) => { it("should approve an ERC20 immediately when the amount is under the existing approved amount", async () => { await doDirectApprove({ amount: 100 }); - await transferManager.from(owner).approveToken(wallet.address, erc20.address, spender, 10); + await transferManager.approveToken(wallet.address, erc20.address, spender, 10, { from: owner }); const approval = await erc20.allowance(wallet.address, spender); assert.equal(approval.toNumber(), 10); }); @@ -636,7 +636,7 @@ contract("TransferManager", (accounts) => { }); it("should approve an ERC20 immediately when the spender is whitelisted ", async () => { - await transferManager.from(owner).addToWhitelist(wallet.address, spender); + await transferManager.addToWhitelist(wallet.address, spender, { from: owner }); await increaseTime(3); await doDirectApprove({ amount: ETH_LIMIT + 10000 }); }); @@ -666,7 +666,7 @@ contract("TransferManager", (accounts) => { if (relayed) { txReceipt = await manager.relay(transferManager, "callContract", params, wallet, [owner]); } else { - const tx = await transferManager.from(owner).callContract(...params); + const tx = await transferManager.callContract(...params, { from: owner }); txReceipt = await transferManager.verboseWaitForTransaction(tx); } assert.isTrue(await utils.hasEvent(txReceipt, transferManager, "CalledContract"), "should have generated CalledContract event"); @@ -681,27 +681,27 @@ contract("TransferManager", (accounts) => { it("should not be able to call the wallet itselt", async () => { const dataToTransfer = contract.contract.interface.functions.setState.encode([4]); const params = [wallet.address, wallet.address, 10, dataToTransfer]; - await assert.revertWith(transferManager.from(owner).callContract(...params), "BT: Forbidden contract"); + await assert.revertWith(transferManager.callContract(...params, { from: owner }), "BT: Forbidden contract"); }); it("should not be able to call a feature of the wallet", async () => { const dataToTransfer = contract.contract.interface.functions.setState.encode([4]); const params = [wallet.address, transferManager.address, 10, dataToTransfer]; - await assert.revertWith(transferManager.from(owner).callContract(...params), "BT: Forbidden contract"); + await assert.revertWith(transferManager.callContract(...params, { from: owner }), "BT: Forbidden contract"); }); it("should not be able to call a supported ERC20 token contract", async () => { const dataToTransfer = contract.contract.interface.functions.setState.encode([4]); const params = [wallet.address, erc20.address, 10, dataToTransfer]; - await assert.revertWith(transferManager.from(owner).callContract(...params), "TM: Forbidden contract"); + await assert.revertWith(transferManager.callContract(...params, { from: owner }), "TM: Forbidden contract"); }); it("should be able to call a supported token contract which is whitelisted", async () => { - await transferManager.from(owner).addToWhitelist(wallet.address, erc20.address); + await transferManager.addToWhitelist(wallet.address, erc20.address, { from: owner }); await increaseTime(3); const dataToTransfer = erc20.contract.interface.functions.transfer.encode([infrastructure, 4]); const params = [wallet.address, erc20.address, 0, dataToTransfer]; - await transferManager.from(owner).callContract(...params); + await transferManager.callContract(...params, { from: owner }); }); it("should call a contract and transfer ETH value when under the daily limit", async () => { @@ -713,7 +713,7 @@ contract("TransferManager", (accounts) => { }); it("should call a contract and transfer ETH value above the daily limit when the contract is whitelisted", async () => { - await transferManager.from(owner).addToWhitelist(wallet.address, contract.address); + await transferManager.addToWhitelist(wallet.address, contract.address, { from: owner }); await increaseTime(3); await doCallContract({ value: ETH_LIMIT + 10000, state: 6 }); }); @@ -746,7 +746,7 @@ contract("TransferManager", (accounts) => { if (relayed) { txReceipt = await manager.relay(transferManager, method, params, wallet, [signer]); } else { - const tx = await transferManager.from(signer)[method](...params); + const tx = await transferManager[method](...params, { from: signer }); txReceipt = await transferManager.verboseWaitForTransaction(tx); } assert.isTrue(await utils.hasEvent(txReceipt, transferManager, "ApprovedAndCalledContract"), "should have generated CalledContract event"); @@ -773,15 +773,16 @@ contract("TransferManager", (accounts) => { }); it("should restore existing approved amount after call", async () => { - await transferManager.from(owner).approveToken(wallet.address, erc20.address, contract.address, 10); + await transferManager.approveToken(wallet.address, erc20.address, contract.address, 10, { from: owner }); const dataToTransfer = contract.contract.interface.functions.setStateAndPayToken.encode([3, erc20.address, 5]); - await transferManager.from(owner).approveTokenAndCallContract( + await transferManager.approveTokenAndCallContract( wallet.address, erc20.address, contract.address, 5, contract.address, dataToTransfer, + { from: owner } ); const approval = await erc20.allowance(wallet.address, contract.address); @@ -793,15 +794,16 @@ contract("TransferManager", (accounts) => { }); it("should be able to spend less than approved in call", async () => { - await transferManager.from(owner).approveToken(wallet.address, erc20.address, contract.address, 10); + await transferManager.approveToken(wallet.address, erc20.address, contract.address, 10, { from: owner }); const dataToTransfer = contract.contract.interface.functions.setStateAndPayToken.encode([3, erc20.address, 4]); - await transferManager.from(owner).approveTokenAndCallContract( + await transferManager.approveTokenAndCallContract( wallet.address, erc20.address, contract.address, 5, contract.address, dataToTransfer, + { from: owner } ); const approval = await erc20.allowance(wallet.address, contract.address); // Initial approval of 10 is restored, after approving and spending 4 @@ -812,20 +814,21 @@ contract("TransferManager", (accounts) => { }); it("should not be able to spend more than approved in call", async () => { - await transferManager.from(owner).approveToken(wallet.address, erc20.address, contract.address, 10); + await transferManager.approveToken(wallet.address, erc20.address, contract.address, 10, { from: owner }); const dataToTransfer = contract.contract.interface.functions.setStateAndPayToken.encode([3, erc20.address, 6]); - await assert.revertWith(transferManager.from(owner).approveTokenAndCallContract( + await assert.revertWith(transferManager.approveTokenAndCallContract( wallet.address, erc20.address, contract.address, 5, contract.address, dataToTransfer, + { from: owner } ), "BT: insufficient amount for call"); }); it("should approve the token and call the contract when the token is above the limit and the contract is whitelisted ", async () => { - await transferManager.from(owner).addToWhitelist(wallet.address, contract.address); + await transferManager.addToWhitelist(wallet.address, contract.address, { from: owner }); await increaseTime(3); await doApproveTokenAndCallContract({ amount: ETH_LIMIT + 10000, state: 6 }); }); @@ -837,7 +840,7 @@ contract("TransferManager", (accounts) => { it("should approve token and call contract when contract != spender, amount > limit and contract is whitelisted", async () => { const consumer = await contract.tokenConsumer(); - await transferManager.from(owner).addToWhitelist(wallet.address, contract.address); + await transferManager.addToWhitelist(wallet.address, contract.address, { from: owner }); await increaseTime(3); await doApproveTokenAndCallContract({ amount: ETH_LIMIT + 10000, state: 6, consumer }); }); @@ -845,12 +848,12 @@ contract("TransferManager", (accounts) => { it("should fail to approve token and call contract when contract != spender, amount > limit and spender is whitelisted", async () => { const amount = ETH_LIMIT + 10000; const consumer = await contract.tokenConsumer(); - await transferManager.from(owner).addToWhitelist(wallet.address, consumer); + await transferManager.addToWhitelist(wallet.address, consumer, { from: owner }); await increaseTime(3); const dataToTransfer = contract.contract.interface.functions.setStateAndPayTokenWithConsumer.encode([6, erc20.address, amount]); await assert.revertWith( - transferManager.from(owner).approveTokenAndCallContract( - wallet.address, erc20.address, consumer, amount, contract.address, dataToTransfer, + transferManager.approveTokenAndCallContract( + wallet.address, erc20.address, consumer, amount, contract.address, dataToTransfer, { from: owner } ), "TM: Approve above daily limit", ); @@ -868,14 +871,14 @@ contract("TransferManager", (accounts) => { const startingBalance = await erc20.balanceOf(wallet.address); await erc20.burn(wallet.address, startingBalance); const dataToTransfer = contract.contract.interface.functions.setStateAndPayToken.encode([3, erc20.address, 1]); - await assert.revertWith(transferManager.from(owner).approveTokenAndCallContract( + await assert.revertWith(transferManager.approveTokenAndCallContract( wallet.address, erc20.address, contract.address, 1, contract.address, dataToTransfer, - ), "BT: insufficient balance"); + { from: owner }), "BT: insufficient balance"); }); // approveWethAndCallContract @@ -886,8 +889,8 @@ contract("TransferManager", (accounts) => { it("should approve WETH and call the contract under the limit when already holding the WETH", async () => { const amount = 10; - await weth.from(infrastructure).deposit({ value: amount }); - await weth.from(infrastructure).transfer(wallet.address, amount); + await weth.deposit({ value: amount }); + await weth.transfer(wallet.address, amount); await doApproveTokenAndCallContract({ amount, state: 3, wrapEth: true }); }); }); diff --git a/utils/defi-deployer.js b/utils/defi-deployer.js index 649e54d03..16fe16295 100644 --- a/utils/defi-deployer.js +++ b/utils/defi-deployer.js @@ -43,14 +43,14 @@ module.exports = { await uniswapFactory.initializeFactory(uniswapTemplateExchange.address); for (let i = 0; i < tokens.length; i += 1) { const token = tokens[i]; - await uniswapFactory.from(infrastructure).createExchange(token.address); + await uniswapFactory.createExchange(token.address, { from: infrastructure }); const uniswapExchangeAddress = await uniswapFactory.getExchange(token.address); const tokenExchange = await UniswapExchange.at(uniswapExchangeAddress); const tokenLiquidity = ethLiquidity.mul(WAD).div(ethPerToken[i]); await token["mint(address,uint256)"](infrastructure, tokenLiquidity); - await token.from(infrastructure).approve(tokenExchange.address, tokenLiquidity); + await token.approve(tokenExchange.address, tokenLiquidity, { from: infrastructure }); const { timestamp } = await web3.eth.getBlock("latest"); - await tokenExchange.from(infrastructure).addLiquidity(1, tokenLiquidity, timestamp + 300, { value: ethLiquidity, gasLimit: 150000 }); + await tokenExchange.addLiquidity(1, tokenLiquidity, timestamp + 300, { value: ethLiquidity, gasLimit: 150000, from: infrastructure }); } return { uniswapFactory }; }, @@ -160,8 +160,8 @@ module.exports = { // Setting up the common migration vault used by ScdMcdMigration const initialSaiAmountInMigrationVault = parseEther("1000"); await sai["mint(address,uint256)"](infrastructure, initialSaiAmountInMigrationVault); - await sai.from(infrastructure).approve(migration.address, initialSaiAmountInMigrationVault); - await migration.from(infrastructure).swapSaiToDai(initialSaiAmountInMigrationVault); + await sai.approve(migration.address, initialSaiAmountInMigrationVault, { from: infrastructure }); + await migration.swapSaiToDai(initialSaiAmountInMigrationVault, { from: infrastructure }); return { sai, diff --git a/utils/relay-manager.js b/utils/relay-manager.js index 23a4749f6..648455d68 100644 --- a/utils/relay-manager.js +++ b/utils/relay-manager.js @@ -46,7 +46,7 @@ class RelayManager { ); return gasUsed; } - const tx = await this.relayerManager.from(_relayer).execute( + const tx = await this.relayerManager.execute( _wallet.address, _module.address, methodData, @@ -56,7 +56,7 @@ class RelayManager { _gasLimit, _refundToken, _refundAddress, - { gasLimit: _gasLimitRelay, gasPrice: _gasPrice }, + { gasLimit: _gasLimitRelay, gasPrice: _gasPrice, from: _relayer }, ); const txReceipt = await _module.verboseWaitForTransaction(tx); return txReceipt; diff --git a/utils/utilities.js b/utils/utilities.js index 9ee005ef2..989ba6f18 100644 --- a/utils/utilities.js +++ b/utils/utilities.js @@ -168,8 +168,8 @@ module.exports = { }, async increaseTime(seconds) { - const networkId = await getNetworkId(); - console.log("networkId", networkId) + const networkId = await this.getNetworkId(); + console.log("networkId", networkId); // TODO if (networkId === "ganache") { await web3.currentProvider.send("evm_increaseTime", seconds); From 4955191169f0d62da8ec19ecebfb535b13dfe36f Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Tue, 18 Aug 2020 11:00:06 +0300 Subject: [PATCH 024/113] Use custom assertRevert function for verifying revert errors --- test/approvedTransfer.js | 4 +- test/baseContracts.js | 11 +++-- test/baseWallet.js | 15 +++--- test/compoundManager_invest.js | 12 ++--- test/compoundManager_loan.js | 20 ++++---- test/ens.js | 6 +-- test/factory.js | 28 ++++++------ test/guardianManager.js | 84 +++++++++++++++++----------------- test/lockManager.js | 10 ++-- test/makerV2Manager_loan.js | 36 +++++++-------- test/multisig.js | 40 ++++++++-------- test/recoveryManager.js | 37 +++++++-------- test/relayer.js | 26 +++++------ test/simpleUpgrader.js | 6 +-- test/tokenExchanger.js | 4 +- test/transferManager.js | 16 +++---- utils/utilities.js | 21 +++++++-- 17 files changed, 196 insertions(+), 180 deletions(-) diff --git a/test/approvedTransfer.js b/test/approvedTransfer.js index 8b5728170..f179cd872 100644 --- a/test/approvedTransfer.js +++ b/test/approvedTransfer.js @@ -17,7 +17,7 @@ const TestContract = artifacts.require("TestContract"); const TestLimitFeature = artifacts.require("TestLimitFeature"); const RelayManager = require("../utils/relay-manager"); -const { sortWalletByAddress, parseRelayReceipt, ETH_TOKEN, increaseTime, getBalance } = require("../utils/utilities.js"); +const { sortWalletByAddress, parseRelayReceipt, ETH_TOKEN, increaseTime, getBalance, assertRevert } = require("../utils/utilities.js"); const ZERO_BYTES32 = ethers.constants.HashZero; @@ -151,7 +151,7 @@ contract("ApprovedTransfer", (accounts) => { describe("Transfer", () => { async function expectFailingTransferToken(_token, _signers, _reason) { - await assert.revertWith( + await assertRevert( manager.relay( approvedTransfer, "transferToken", diff --git a/test/baseContracts.js b/test/baseContracts.js index 49fed4a5a..423e979f1 100644 --- a/test/baseContracts.js +++ b/test/baseContracts.js @@ -1,5 +1,6 @@ /* global artifacts */ const ethers = require("ethers"); +const utils = require("../utils/utilities.js"); const Managed = artifacts.require("Managed"); @@ -29,7 +30,7 @@ contract("Managed and Owned", (accounts) => { }); it("should not be able to change owner to zero address", async () => { - await assert.revertWith(managed.changeOwner(ethers.constants.AddressZero), "Address must not be null"); + await utils.assertRevert(managed.changeOwner(ethers.constants.AddressZero), "Address must not be null"); }); }); @@ -52,11 +53,11 @@ contract("Managed and Owned", (accounts) => { }); it("should not be able to add manager if not called by owner", async () => { - await assert.revertWith(managed.addManager(manager1, { from: nonOwner }), "Must be owner"); + await utils.assertRevert(managed.addManager(manager1, { from: nonOwner }), "Must be owner"); }); it("should not be able to set manager to zero address", async () => { - await assert.revertWith(managed.addManager(ethers.constants.AddressZero), "M: Address must not be null"); + await utils.assertRevert(managed.addManager(ethers.constants.AddressZero), "M: Address must not be null"); }); it("should be able to set manager twice without error", async () => { @@ -87,11 +88,11 @@ contract("Managed and Owned", (accounts) => { it("should not be able to revoke manager if not called by owner", async () => { await managed.addManager(manager1); - await assert.revertWith(managed.revokeManager(manager1, { from: nonOwner }), "Must be owner"); + await utils.assertRevert(managed.revokeManager(manager1, { from: nonOwner }), "Must be owner"); }); it("should not be able to revoke a nonexisting managerr", async () => { - await assert.revertWith(managed.revokeManager(manager2), "M: Target must be an existing manager"); + await utils.assertRevert(managed.revokeManager(manager2), "M: Target must be an existing manager"); }); }); }); diff --git a/test/baseWallet.js b/test/baseWallet.js index 4d34a5848..2f8cfc04f 100644 --- a/test/baseWallet.js +++ b/test/baseWallet.js @@ -12,7 +12,7 @@ const GuardianStorage = artifacts.require("GuardianStorage"); const LockStorage = artifacts.require("LockStorage"); const TestFeature = artifacts.require("TestFeature"); -const { getBalance } = require("../utils/utilities.js"); +const { getBalance, assertRevert } = require("../utils/utilities.js"); contract("BaseWallet", (accounts) => { const owner = accounts[1]; @@ -125,15 +125,16 @@ contract("BaseWallet", (accounts) => { it("should not reinitialize a wallet", async () => { await wallet.init(owner, [module1.address]); await module1.upgradeWallet(wallet.address, await module1.lastVersion(), { from: owner }); - await assert.revertWith(wallet.init(owner, [module1.address]), "BW: wallet already initialised"); + + await utils.assertRevert(wallet.init(owner, [module1.address]), "BW: wallet already initialised"); }); it("should not initialize a wallet with no module", async () => { - await assert.revertWith(wallet.init(owner, []), "BW: construction requires at least 1 module"); + await utils.assertRevert(wallet.init(owner, []), "BW: construction requires at least 1 module"); }); it("should not initialize a wallet with duplicate modules", async () => { - await assert.revertWith(wallet.init(owner, [module1.address, module1.address]), "BW: module is already added"); + await utils.assertRevert(wallet.init(owner, [module1.address, module1.address]), "BW: module is already added"); }); }); @@ -156,7 +157,7 @@ contract("BaseWallet", (accounts) => { describe("Authorisations", () => { it("should not let a non-module deauthorise a module", async () => { await wallet.init(owner, [module1.address]); - await assert.revertWith(wallet.authoriseModule(module1.address, false), "BW: msg.sender not an authorized module"); + await utils.assertRevert(wallet.authoriseModule(module1.address, false), "BW: msg.sender not an authorized module"); }); it("should not let a feature set the owner to address(0)", async () => { @@ -197,8 +198,8 @@ contract("BaseWallet", (accounts) => { assert.equal(module1IsAuthorised, false, "module1 should not be authorised"); // trying to execute static call delegated to module1 (it should fail) - const walletAsModule = deployer.wrapDeployedContract(TestFeature, wallet.address); - await assert.revertWith(walletAsModule.contract.getBoolean(), "BW: must be an authorised module for static call"); + const walletAsModule = await TestFeature.at(wallet.address); + await utils.assertRevert(walletAsModule.contract.getBoolean(), "BW: must be an authorised module for static call"); }); }); }); diff --git a/test/compoundManager_invest.js b/test/compoundManager_invest.js index 1fa868354..26cbc0dcc 100644 --- a/test/compoundManager_invest.js +++ b/test/compoundManager_invest.js @@ -259,17 +259,17 @@ contract("Invest Manager with Compound", (accounts) => { it("should fail to invest in ERC20 with an unknown token", async () => { const params = [wallet.address, ethers.constants.AddressZero, parseEther("1"), 0]; - await assert.revertWith(investManager.addInvestment(...params, { from: owner }), "CM: No market for target token"); + await utils.assertRevert(investManager.addInvestment(...params, { from: owner }), "CM: No market for target token"); }); it("should fail to invest in ERC20 with an amount of zero", async () => { const params = [wallet.address, token.address, 0, 0]; - await assert.revertWith(investManager.addInvestment(...params, { from: owner }), "CM: amount cannot be 0"); + await utils.assertRevert(investManager.addInvestment(...params, { from: owner }), "CM: amount cannot be 0"); }); it("should fail to invest in ERC20 when not holding any ERC20", async () => { const params = [wallet.address, token.address, parseEther("1"), 0]; - await assert.revertWith(investManager.addInvestment(...params, { from: owner }), "CM: mint failed"); + await utils.assertRevert(investManager.addInvestment(...params, { from: owner }), "CM: mint failed"); }); }); @@ -298,12 +298,12 @@ contract("Invest Manager with Compound", (accounts) => { it("should fail to remove an ERC20 investment when passing an invalid fraction value", async () => { const params = [wallet.address, token.address, 50000]; - await assert.revertWith(investManager.removeInvestment(...params, { from: owner }), "CM: invalid fraction value"); + await utils.assertRevert(investManager.removeInvestment(...params, { from: owner }), "CM: invalid fraction value"); }); it("should fail to remove an ERC20 investment when not holding any of the corresponding cToken", async () => { const params = [wallet.address, token.address, 5000]; - await assert.revertWith(investManager.removeInvestment(...params, { from: owner }), "CM: amount cannot be 0"); + await utils.assertRevert(investManager.removeInvestment(...params, { from: owner }), "CM: amount cannot be 0"); }); it("should fail to remove all of an ERC20 investment when it collateralizes a loan", async () => { @@ -318,7 +318,7 @@ contract("Invest Manager with Compound", (accounts) => { debtAmount]; await investManager.openLoan(...openLoanParams, { from: owner }); const removeInvestmentParams = [wallet.address, token.address, 10000]; - await assert.revertWith(investManager.removeInvestment(...removeInvestmentParams, { from: owner }), "CM: redeem failed"); + await utils.assertRevert(investManager.removeInvestment(...removeInvestmentParams, { from: owner }), "CM: redeem failed"); }); }); }); diff --git a/test/compoundManager_loan.js b/test/compoundManager_loan.js index f76166ee4..1dbd93de2 100644 --- a/test/compoundManager_loan.js +++ b/test/compoundManager_loan.js @@ -332,7 +332,7 @@ contract("Loan Module", (accounts) => { assert.isTrue(loan._status === 2 && loan._ethValue.gt(0), "should have obtained the shortfall info of the loan"); await oracle.setUnderlyingPrice(cToken1.address, 0); - await assert.revertWith(loanManager.getLoan(wallet.address, ZERO_BYTES32), "CM: failed to get account liquidity"); + await utils.assertRevert(loanManager.getLoan(wallet.address, ZERO_BYTES32), "CM: failed to get account liquidity"); await oracle.setUnderlyingPrice(cToken1.address, WAD.div(10)); loan = await loanManager.getLoan(ethers.constants.AddressZero, ZERO_BYTES32); @@ -427,27 +427,27 @@ contract("Loan Module", (accounts) => { it("should fail to borrow an unknown token", async () => { const params = [wallet.address, ZERO_BYTES32, ethers.constants.AddressZero, parseEther("1")]; - await assert.revertWith(loanManager.addDebt(...params, { from: owner }), "CM: No market for target token"); + await utils.assertRevert(loanManager.addDebt(...params, { from: owner }), "CM: No market for target token"); }); it("should fail to borrow 0 token", async () => { const params = [wallet.address, ZERO_BYTES32, ETH_TOKEN, parseEther("0")]; - await assert.revertWith(loanManager.addDebt(...params, { from: owner }), "CM: amount cannot be 0"); + await utils.assertRevert(loanManager.addDebt(...params, { from: owner }), "CM: amount cannot be 0"); }); it("should fail to borrow token with no collateral", async () => { const params = [wallet.address, ZERO_BYTES32, ETH_TOKEN, parseEther("1")]; - await assert.revertWith(loanManager.addDebt(...params, { from: owner }), "CM: borrow failed"); + await utils.assertRevert(loanManager.addDebt(...params, { from: owner }), "CM: borrow failed"); }); it("should fail to repay an unknown token", async () => { const params = [wallet.address, ZERO_BYTES32, ethers.constants.AddressZero, parseEther("1")]; - await assert.revertWith(loanManager.removeDebt(...params, { from: owner }), "CM: No market for target token"); + await utils.assertRevert(loanManager.removeDebt(...params, { from: owner }), "CM: No market for target token"); }); it("should fail to repay 0 token", async () => { const params = [wallet.address, ZERO_BYTES32, ETH_TOKEN, parseEther("0")]; - await assert.revertWith(loanManager.removeDebt(...params, { from: owner }), "CM: amount cannot be 0"); + await utils.assertRevert(loanManager.removeDebt(...params, { from: owner }), "CM: amount cannot be 0"); }); it("should fail to repay too much debt token", async () => { @@ -458,17 +458,17 @@ contract("Loan Module", (accounts) => { collateral: ETH_TOKEN, collateralAmount, debt: token1, debtAmount, relayed: false, }); const removeDebtParams = [wallet.address, loanId, token1.address, parseEther("0.002")]; - await assert.revertWith(loanManager.removeDebt(...removeDebtParams, { from: owner }), "CM: repayBorrow failed"); + await utils.assertRevert(loanManager.removeDebt(...removeDebtParams, { from: owner }), "CM: repayBorrow failed"); }); it("should fail to remove an unknown collateral token", async () => { const params = [wallet.address, ZERO_BYTES32, ethers.constants.AddressZero, parseEther("1")]; - await assert.revertWith(loanManager.removeCollateral(...params, { from: owner }), "CM: No market for target token"); + await utils.assertRevert(loanManager.removeCollateral(...params, { from: owner }), "CM: No market for target token"); }); it("should fail to remove 0 collateral token", async () => { const params = [wallet.address, ZERO_BYTES32, ETH_TOKEN, parseEther("0")]; - await assert.revertWith(loanManager.removeCollateral(...params, { from: owner }), "CM: amount cannot be 0"); + await utils.assertRevert(loanManager.removeCollateral(...params, { from: owner }), "CM: amount cannot be 0"); }); it("should fail to remove too much collateral token", async () => { @@ -479,7 +479,7 @@ contract("Loan Module", (accounts) => { collateral: ETH_TOKEN, collateralAmount, debt: token1, debtAmount, relayed: false, }); const removeDebtParams = [wallet.address, loanId, token1.address, parseEther("0.002")]; - await assert.revertWith(loanManager.removeCollateral(...removeDebtParams, { from: owner }), "CM: redeemUnderlying failed"); + await utils.assertRevert(loanManager.removeCollateral(...removeDebtParams, { from: owner }), "CM: redeemUnderlying failed"); }); }); diff --git a/test/ens.js b/test/ens.js index c63325607..f8f43f0f2 100644 --- a/test/ens.js +++ b/test/ens.js @@ -112,7 +112,7 @@ contract("ENS contracts", (accounts) => { it("should not be able to change the root node owner if not the owner", async () => { const randomAddress = await utilities.getRandomAddress(); - await assert.revertWith(ensManager.changeRootnodeOwner(randomAddress, { from: amanager }), "Must be owner"); + await utilities.assertRevert(ensManager.changeRootnodeOwner(randomAddress, { from: amanager }), "Must be owner"); }); it("should be able to change the ens resolver", async () => { @@ -124,11 +124,11 @@ contract("ENS contracts", (accounts) => { it("should not be able to change the ens resolver if not owner", async () => { const randomAddress = await utilities.getRandomAddress(); - await assert.revertWith(ensManager.changeENSResolver(randomAddress, { from: amanager }), "Must be owner"); + await utilities.assertRevert(ensManager.changeENSResolver(randomAddress, { from: amanager }), "Must be owner"); }); it("should not be able to change the ens resolver to an empty address", async () => { - await assert.revertWith(ensManager.changeENSResolver(ethers.constants.AddressZero), "WF: address cannot be null"); + await utilities.assertRevert(ensManager.changeENSResolver(ethers.constants.AddressZero), "WF: address cannot be null"); }); }); diff --git a/test/factory.js b/test/factory.js index bff920973..8554cd8c1 100644 --- a/test/factory.js +++ b/test/factory.js @@ -59,21 +59,21 @@ contract("WalletFactory", (accounts) => { describe("Create and configure the factory", () => { it("should not allow to be created with empty ModuleRegistry", async () => { - await assert.revertWith(Factory.new( + await utils.assertRevert(Factory.new( ZERO_ADDRESS, implementation.address, guardianStorage.address), "WF: ModuleRegistry address not defined"); }); it("should not allow to be created with empty WalletImplementation", async () => { - await assert.revertWith(Factory.new( + await utils.assertRevert(Factory.new( moduleRegistry.address, ZERO_ADDRESS, guardianStorage.address), "WF: WalletImplementation address not defined"); }); it("should not allow to be created with empty GuardianStorage", async () => { - await assert.revertWith(deployer.deploy(Factory, {}, + await utils.assertRevert(deployer.deploy(Factory, {}, moduleRegistry.address, implementation.address, ZERO_ADDRESS), "WF: GuardianStorage address not defined"); @@ -87,12 +87,12 @@ contract("WalletFactory", (accounts) => { }); it("should not allow owner to change the module registry to zero address", async () => { - await assert.revertWith(factory.changeModuleRegistry(ethers.constants.AddressZero), "WF: address cannot be null"); + await utils.assertRevert(factory.changeModuleRegistry(ethers.constants.AddressZero), "WF: address cannot be null"); }); it("should not allow non-owner to change the module registry", async () => { const randomAddress = utils.getRandomAddress(); - await assert.revertWith(factory.changeModuleRegistry(randomAddress, { from: other }), "Must be owner"); + await utils.assertRevert(factory.changeModuleRegistry(randomAddress, { from: other }), "Must be owner"); }); it("should allow owner to change the ens manager", async () => { @@ -103,12 +103,12 @@ contract("WalletFactory", (accounts) => { }); it("should not allow owner to change the ens manager to a zero address", async () => { - await assert.revertWith(factory.changeENSManager(ethers.constants.AddressZero), "WF: address cannot be null"); + await utils.assertRevert(factory.changeENSManager(ethers.constants.AddressZero), "WF: address cannot be null"); }); it("should not allow non-owner to change the ens manager", async () => { const randomAddress = utils.getRandomAddress(); - await assert.revertWith(factory.changeENSManager(randomAddress, { from: owner }), "Must be owner"); + await utils.assertRevert(factory.changeENSManager(randomAddress, { from: owner }), "Must be owner"); }); it("should return the correct ENSManager", async () => { @@ -163,17 +163,17 @@ contract("WalletFactory", (accounts) => { it("should fail to create when the guardian is empty", async () => { // we create the wallet - await assert.revertWith(factory.createWallet(owner, versionManager.address, ZERO_ADDRESS, 1), + await utils.assertRevert(factory.createWallet(owner, versionManager.address, ZERO_ADDRESS, 1), "WF: guardian cannot be null"); }); it("should fail to create when there are is no VersionManager", async () => { - await assert.revertWith(factory.createWallet(owner, ethers.constants.AddressZero, guardian, 1, { from: deployer }), + await utils.assertRevert(factory.createWallet(owner, ethers.constants.AddressZero, guardian, 1, { from: deployer }), "WF: invalid _versionManager"); }); it("should fail to create with zero address as owner", async () => { - await assert.revertWith( + await utils.assertRevert( factory.createWallet(ethers.constants.AddressZero, versionManager.address, guardian, 1), "WF: owner cannot be null", ); @@ -181,7 +181,7 @@ contract("WalletFactory", (accounts) => { it("should fail to create with unregistered module", async () => { const randomAddress = utils.getRandomAddress(); - await assert.revertWith(factory.createWallet(owner, randomAddress, guardian, 1), + await utils.assertRevert(factory.createWallet(owner, randomAddress, guardian, 1), "WF: invalid _versionManager"); }); }); @@ -300,7 +300,7 @@ contract("WalletFactory", (accounts) => { it("should fail to create counterfactually when there are no modules (with guardian)", async () => { const salt = utils.generateSaltValue(); - await assert.revertWith( + await utils.assertRevert( factory.createCounterfactualWallet( owner, ethers.constants.AddressZero, guardian, salt, 1, { from: deployer } ), @@ -310,7 +310,7 @@ contract("WalletFactory", (accounts) => { it("should fail to create when the guardian is empty", async () => { const salt = utils.generateSaltValue(); - await assert.revertWith( + await utils.assertRevert( factory.createCounterfactualWallet(owner, versionManager.address, ZERO_ADDRESS, salt, 1), "WF: guardian cannot be null", ); @@ -337,7 +337,7 @@ contract("WalletFactory", (accounts) => { it("should fail to get an address when the guardian is empty", async () => { const salt = utils.generateSaltValue(); - await assert.revertWith( + await utils.assertRevert( factory.getAddressForCounterfactualWallet(owner, versionManager.address, ZERO_ADDRESS, salt, 1), "WF: guardian cannot be null", ); diff --git a/test/guardianManager.js b/test/guardianManager.js index 05f9a64f7..b6b9393fb 100644 --- a/test/guardianManager.js +++ b/test/guardianManager.js @@ -13,7 +13,7 @@ const DumbContract = artifacts.require("TestContract"); const NonCompliantGuardian = artifacts.require("NonCompliantGuardian"); const RelayManager = require("../utils/relay-manager"); -const { increaseTime } = require("../utils/utilities.js"); +const utilities = require("../utils/utilities.js"); contract("GuardianManager", (accounts) => { const manager = new RelayManager(); @@ -84,7 +84,7 @@ contract("GuardianManager", (accounts) => { assert.isFalse(active, "second guardian should not yet be active"); assert.equal(count, 1, "second guardian should be pending during security period"); - await increaseTime(30); + await utilities.increaseTime(30); await guardianManager.confirmGuardianAddition(wallet.address, guardian2); count = (await guardianStorage.guardianCount(wallet.address)).toNumber(); active = await guardianManager.isGuardian(wallet.address, guardian2); @@ -99,8 +99,8 @@ contract("GuardianManager", (accounts) => { await guardianManager.addGuardian(wallet.address, guardian1, { from: owner }); await guardianManager.addGuardian(wallet.address, guardian2, { from: owner }); - await increaseTime(48); // 42 == 2 * security_period - await assert.revertWith(guardianManager.confirmGuardianAddition(wallet.address, guardian2), + await utilities.increaseTime(48); // 42 == 2 * security_period + await utilities.assertRevert(guardianManager.confirmGuardianAddition(wallet.address, guardian2), "GM: Too late to confirm guardian addition"); const count = (await guardianStorage.guardianCount(wallet.address)).toNumber(); @@ -112,7 +112,7 @@ contract("GuardianManager", (accounts) => { it("should not allow confirming too early", async () => { await guardianManager.addGuardian(wallet.address, guardian1, { from: owner }); await guardianManager.addGuardian(wallet.address, guardian2, { from: owner }); - await assert.revertWith(guardianManager.confirmGuardianAddition(wallet.address, guardian2), + await utilities.assertRevert(guardianManager.confirmGuardianAddition(wallet.address, guardian2), "GM: Too early to confirm guardian addition"); }); @@ -122,8 +122,8 @@ contract("GuardianManager", (accounts) => { // first time await guardianManager.addGuardian(wallet.address, guardian2, { from: owner }); - await increaseTime(48); // 42 == 2 * security_period - await assert.revertWith(guardianManager.confirmGuardianAddition(wallet.address, guardian2), + await utilities.increaseTime(48); // 42 == 2 * security_period + await utilities.assertRevert(guardianManager.confirmGuardianAddition(wallet.address, guardian2), "GM: Too late to confirm guardian addition"); // second time @@ -133,7 +133,7 @@ contract("GuardianManager", (accounts) => { assert.isFalse(active, "second guardian should not yet be active"); assert.equal(count, 1, "second guardian should be pending during security period"); - await increaseTime(30); + await utilities.increaseTime(30); await guardianManager.confirmGuardianAddition(wallet.address, guardian2); count = (await guardianStorage.guardianCount(wallet.address)).toNumber(); active = await guardianManager.isGuardian(wallet.address, guardian2); @@ -142,25 +142,25 @@ contract("GuardianManager", (accounts) => { }); it("should only let the owner add an EOA guardian", async () => { - await assert.revertWith(guardianManager.addGuardian(wallet.address, guardian1, { from: nonowner }), + await utilities.assertRevert(guardianManager.addGuardian(wallet.address, guardian1, { from: nonowner }), "BM: must be owner or module"); }); it("should not allow adding wallet owner as guardian", async () => { - await assert.revertWith(guardianManager.addGuardian(wallet.address, owner, { from: owner }), + await utilities.assertRevert(guardianManager.addGuardian(wallet.address, owner, { from: owner }), "GM: target guardian cannot be owner"); }); it("should not allow adding an existing guardian twice", async () => { await guardianManager.addGuardian(wallet.address, guardian1, { from: owner }); - await assert.revertWith(guardianManager.addGuardian(wallet.address, guardian1, { from: owner }), + await utilities.assertRevert(guardianManager.addGuardian(wallet.address, guardian1, { from: owner }), "GM: target is already a guardian"); }); it("should not allow adding a duplicate request to add a guardian to the request queue", async () => { await guardianManager.addGuardian(wallet.address, guardian1, { from: owner }); await guardianManager.addGuardian(wallet.address, guardian2, { from: owner }); - await assert.revertWith(guardianManager.addGuardian(wallet.address, guardian2, { from: owner }), + await utilities.assertRevert(guardianManager.addGuardian(wallet.address, guardian2, { from: owner }), "GM: addition of target as guardian is already pending"); }); @@ -179,7 +179,7 @@ contract("GuardianManager", (accounts) => { for (let i = 1; i <= 5; i += 1) { await guardianManager.addGuardian(wallet.address, guardians[i - 1], { from: owner }); if (i > 1) { - await increaseTime(31); + await utilities.increaseTime(31); await guardianManager.confirmGuardianAddition(wallet.address, guardians[i - 1]); } count = (await guardianStorage.guardianCount(wallet.address)).toNumber(); @@ -196,7 +196,7 @@ contract("GuardianManager", (accounts) => { for (let i = 1; i <= 3; i += 1) { await manager.relay(guardianManager, "addGuardian", [wallet.address, guardians[i - 1]], wallet, [owner]); if (i > 1) { - await increaseTime(30); + await utilities.increaseTime(30); await manager.relay(guardianManager, "confirmGuardianAddition", [wallet.address, guardians[i - 1]], wallet, []); } count = (await guardianStorage.guardianCount(wallet.address)).toNumber(); @@ -240,7 +240,7 @@ contract("GuardianManager", (accounts) => { assert.isFalse(active, "second guardian should not yet be active"); assert.equal(count, 1, "second guardian should be pending during security period"); - await increaseTime(30); + await utilities.increaseTime(30); await guardianManager.confirmGuardianAddition(wallet.address, guardianWallet2.address); count = (await guardianStorage.guardianCount(wallet.address)).toNumber(); active = await guardianManager.isGuardian(wallet.address, guardian2); @@ -261,7 +261,7 @@ contract("GuardianManager", (accounts) => { }); it("should not let owner add a Smart Contract guardian that does not have an owner manager", async () => { - await assert.revertWith(guardianManager.addGuardian(wallet.address, dumbContract.address, { from: owner }), + await utilities.assertRevert(guardianManager.addGuardian(wallet.address, dumbContract.address, { from: owner }), "GM: guardian must be EOA or implement owner()"); }); @@ -282,7 +282,7 @@ contract("GuardianManager", (accounts) => { beforeEach(async () => { await guardianManager.addGuardian(wallet.address, guardian1, { from: owner }); await guardianManager.addGuardian(wallet.address, guardian2, { from: owner }); - await increaseTime(30); + await utilities.increaseTime(30); await guardianManager.confirmGuardianAddition(wallet.address, guardian2); const count = (await guardianStorage.guardianCount(wallet.address)).toNumber(); assert.equal(count, 2, "2 guardians should be added"); @@ -295,7 +295,7 @@ contract("GuardianManager", (accounts) => { assert.isTrue(active, "the revoked guardian should still be active during the security period"); assert.equal(count, 2, "the revoked guardian should go through a security period"); - await increaseTime(30); + await utilities.increaseTime(30); await guardianManager.confirmGuardianRevokation(wallet.address, guardian1); count = (await guardianStorage.guardianCount(wallet.address)).toNumber(); active = await guardianManager.isGuardian(wallet.address, guardian1); @@ -304,27 +304,27 @@ contract("GuardianManager", (accounts) => { }); it("should not be able to revoke a nonexistent guardian", async () => { - await assert.revertWith(guardianManager.revokeGuardian(wallet.address, nonowner, { from: owner }), + await utilities.assertRevert(guardianManager.revokeGuardian(wallet.address, nonowner, { from: owner }), "GM: must be an existing guardian"); }); it("should not confirm a guardian revokation too early", async () => { await guardianManager.revokeGuardian(wallet.address, guardian1, { from: owner }); - await assert.revertWith(guardianManager.confirmGuardianRevokation(wallet.address, guardian1), + await utilities.assertRevert(guardianManager.confirmGuardianRevokation(wallet.address, guardian1), "GM: Too early to confirm guardian revokation"); }); it("should not confirm a guardian revokation after two security periods (blockchain transaction)", async () => { await guardianManager.revokeGuardian(wallet.address, guardian1, { from: owner }); - await increaseTime(48); // 48 == 2 * security_period - await assert.revertWith(guardianManager.confirmGuardianRevokation(wallet.address, guardian1), + await utilities.increaseTime(48); // 48 == 2 * security_period + await utilities.assertRevert(guardianManager.confirmGuardianRevokation(wallet.address, guardian1), "GM: Too late to confirm guardian revokation"); }); it("should not be able to revoke a guardian twice", async () => { await guardianManager.revokeGuardian(wallet.address, guardian1, { from: owner }); - await assert.revertWith(guardianManager.revokeGuardian(wallet.address, guardian1, { from: owner }), + await utilities.assertRevert(guardianManager.revokeGuardian(wallet.address, guardian1, { from: owner }), "GM: revokation of target as guardian is already pending"); }); @@ -332,8 +332,8 @@ contract("GuardianManager", (accounts) => { // first time await guardianManager.revokeGuardian(wallet.address, guardian1, { from: owner }); - await increaseTime(48); // 48 == 2 * security_period - await assert.revertWith(guardianManager.confirmGuardianRevokation(wallet.address, guardian1), + await utilities.increaseTime(48); // 48 == 2 * security_period + await utilities.assertRevert(guardianManager.confirmGuardianRevokation(wallet.address, guardian1), "GM: Too late to confirm guardian revokation"); // second time @@ -343,7 +343,7 @@ contract("GuardianManager", (accounts) => { assert.isTrue(active, "the revoked guardian should still be active during the security period"); assert.equal(count, 2, "the revoked guardian should go through a security period"); - await increaseTime(30); + await utilities.increaseTime(30); await guardianManager.confirmGuardianRevokation(wallet.address, guardian1); count = (await guardianStorage.guardianCount(wallet.address)).toNumber(); active = await guardianManager.isGuardian(wallet.address, guardian1); @@ -353,13 +353,13 @@ contract("GuardianManager", (accounts) => { it("should add a guardian after a revoke (blockchain transaction)", async () => { await guardianManager.revokeGuardian(wallet.address, guardian1, { from: owner }); - await increaseTime(30); + await utilities.increaseTime(30); await guardianManager.confirmGuardianRevokation(wallet.address, guardian1); let count = (await guardianStorage.guardianCount(wallet.address)).toNumber(); assert.equal(count, 1, "there should be 1 guardian left"); await guardianManager.addGuardian(wallet.address, guardian3, { from: owner }); - await increaseTime(30); + await utilities.increaseTime(30); await guardianManager.confirmGuardianAddition(wallet.address, guardian3); count = (await guardianStorage.guardianCount(wallet.address)).toNumber(); assert.equal(count, 2, "there should be 2 guardians again"); @@ -367,14 +367,14 @@ contract("GuardianManager", (accounts) => { it("should be able to remove a guardian that is the last in the list", async () => { await guardianManager.addGuardian(wallet.address, guardian3, { from: owner }); - await increaseTime(30); + await utilities.increaseTime(30); await guardianManager.confirmGuardianAddition(wallet.address, guardian3); let count = await guardianStorage.guardianCount(wallet.address); assert.equal(count.toNumber(), 3, "there should be 3 guardians"); const guardians = await guardianStorage.getGuardians(wallet.address); await guardianManager.revokeGuardian(wallet.address, guardians[2], { from: owner }); - await increaseTime(30); + await utilities.increaseTime(30); await guardianManager.confirmGuardianRevokation(wallet.address, guardians[2]); count = await guardianStorage.guardianCount(wallet.address); assert.equal(count.toNumber(), 2, "there should be 2 guardians left"); @@ -392,13 +392,13 @@ contract("GuardianManager", (accounts) => { // Add guardian 2 and cancel its addition await guardianManager.addGuardian(wallet.address, guardian2, { from: owner }); await guardianManager.cancelGuardianAddition(wallet.address, guardian2, { from: owner }); - await increaseTime(30); - await assert.revertWith(guardianManager.confirmGuardianAddition(wallet.address, guardian2), + await utilities.increaseTime(30); + await utilities.assertRevert(guardianManager.confirmGuardianAddition(wallet.address, guardian2), "GM: no pending addition as guardian for target"); }); it("owner should not be able to cancel a nonexistent addition of a guardian request", async () => { - await assert.revertWith(guardianManager.cancelGuardianAddition(wallet.address, guardian2, { from: owner }), + await utilities.assertRevert(guardianManager.cancelGuardianAddition(wallet.address, guardian2, { from: owner }), "GM: no pending addition as guardian for target"); }); @@ -406,13 +406,13 @@ contract("GuardianManager", (accounts) => { // Revoke guardian 1 and cancel its revokation await guardianManager.revokeGuardian(wallet.address, guardian1, { from: owner }); await guardianManager.cancelGuardianRevokation(wallet.address, guardian1, { from: owner }); - await increaseTime(30); - await assert.revertWith(guardianManager.confirmGuardianRevokation(wallet.address, guardian1), + await utilities.increaseTime(30); + await utilities.assertRevert(guardianManager.confirmGuardianRevokation(wallet.address, guardian1), "GM: no pending guardian revokation for target"); }); it("owner should not be able to cancel a nonexistent pending revokation of guardian", async () => { - await assert.revertWith(guardianManager.cancelGuardianRevokation(wallet.address, nonowner, { from: owner }), + await utilities.assertRevert(guardianManager.cancelGuardianRevokation(wallet.address, nonowner, { from: owner }), "GM: no pending guardian revokation for target"); }); @@ -420,8 +420,8 @@ contract("GuardianManager", (accounts) => { // Add guardian 2 and cancel its addition await manager.relay(guardianManager, "addGuardian", [wallet.address, guardian2], wallet, [owner]); await manager.relay(guardianManager, "cancelGuardianAddition", [wallet.address, guardian2], wallet, [owner]); - await increaseTime(30); - await assert.revertWith(guardianManager.confirmGuardianAddition(wallet.address, guardian2), + await utilities.increaseTime(30); + await utilities.assertRevert(guardianManager.confirmGuardianAddition(wallet.address, guardian2), "GM: no pending addition as guardian for target"); }); @@ -429,20 +429,20 @@ contract("GuardianManager", (accounts) => { // Revoke guardian 1 and cancel its revokation await manager.relay(guardianManager, "revokeGuardian", [wallet.address, guardian1], wallet, [owner]); await manager.relay(guardianManager, "cancelGuardianRevokation", [wallet.address, guardian1], wallet, [owner]); - await increaseTime(30); - await assert.revertWith(guardianManager.confirmGuardianRevokation(wallet.address, guardian1), + await utilities.increaseTime(30); + await utilities.assertRevert(guardianManager.confirmGuardianRevokation(wallet.address, guardian1), "GM: no pending guardian revokation for target"); }); }); describe("Guardian Storage", () => { it("should not allow non modules to addGuardian", async () => { - await assert.revertWith(guardianStorage.addGuardian(wallet.address, guardian4), + await utilities.assertRevert(guardianStorage.addGuardian(wallet.address, guardian4), "must be an authorized module to call this method"); }); it("should not allow non modules to revokeGuardian", async () => { - await assert.revertWith(guardianStorage.revokeGuardian(wallet.address, guardian1), + await utilities.assertRevert(guardianStorage.revokeGuardian(wallet.address, guardian1), "must be an authorized module to call this method"); }); }); diff --git a/test/lockManager.js b/test/lockManager.js index 294c60799..7aa61c3b6 100644 --- a/test/lockManager.js +++ b/test/lockManager.js @@ -13,7 +13,7 @@ const VersionManager = artifacts.require("VersionManager"); const RelayManager = require("../utils/relay-manager"); -const { increaseTime } = require("../utils/utilities.js"); +const utilities = require("../utils/utilities.js"); contract("LockManager", (accounts) => { const manager = new RelayManager(); @@ -162,7 +162,7 @@ contract("LockManager", (accounts) => { }); it("should fail to lock/unlock by Smart Contract guardians when signer is not authorized (relayed transaction)", async () => { - await assert.revertWith(manager.relay(lockManager, "lock", [wallet.address], wallet, [nonguardian]), "RM: Invalid signatures"); + await utilities.assertRevert(manager.relay(lockManager, "lock", [wallet.address], wallet, [nonguardian]), "RM: Invalid signatures"); }); }); @@ -175,7 +175,7 @@ contract("LockManager", (accounts) => { let releaseTime = await lockManager.getLock(wallet.address); assert.isTrue(releaseTime > 0, "releaseTime should be positive"); - await increaseTime(24 * 5 + 5); + await utilities.increaseTime(24 * 5 + 5); state = await lockManager.isLocked(wallet.address); assert.isFalse(state, "should be unlocked by guardian"); releaseTime = await lockManager.getLock(wallet.address); @@ -194,7 +194,7 @@ contract("LockManager", (accounts) => { // unlock await lockManager.unlock(wallet.address, { from: guardian1 }); // try to unlock again - await assert.revertWith(lockManager.unlock(wallet.address, { from: guardian1 }), + await utilities.assertRevert(lockManager.unlock(wallet.address, { from: guardian1 }), "VM Exception while processing transaction: revert LM: wallet must be locked"); }); @@ -203,7 +203,7 @@ contract("LockManager", (accounts) => { await manager.relay(recoveryManager, "executeRecovery", [wallet.address, accounts[5]], wallet, [guardian1]); // try to unlock - await assert.revertWith(lockManager.unlock(wallet.address, { from: guardian1 }), + await utilities.assertRevert(lockManager.unlock(wallet.address, { from: guardian1 }), "LM: cannot unlock a wallet that was locked by another feature"); }); }); diff --git a/test/makerV2Manager_loan.js b/test/makerV2Manager_loan.js index f158566c8..7fd65ab5f 100644 --- a/test/makerV2Manager_loan.js +++ b/test/makerV2Manager_loan.js @@ -2,7 +2,7 @@ const ethers = require("ethers"); const { - bigNumToBytes32, ETH_TOKEN, parseLogs, hasEvent, increaseTime, getBalance + bigNumToBytes32, ETH_TOKEN, parseLogs, hasEvent, increaseTime, getBalance, assertRevert } = require("../utils/utilities.js"); const { deployMaker, deployUniswap, RAY, ETH_PER_DAI, ETH_PER_MKR, @@ -227,14 +227,14 @@ contract("MakerV2Loan", (accounts) => { }); it("should not open a loan for the wrong debt token", async () => { - await assert.revertWith( + await assertRevert( makerV2.openLoan(walletAddress, ETH_TOKEN, collateralAmount, sai.address, daiAmount, { from: owner }), "MV2: debt token not DAI", ); }); it("should not open a loan for an unsupported collateral token", async () => { - await assert.revertWith( + await assertRevert( makerV2.openLoan(walletAddress, sai.address, collateralAmount, dai.address, daiAmount, { from: owner }), "MV2: unsupported collateral", ); @@ -299,7 +299,7 @@ contract("MakerV2Loan", (accounts) => { const wallet2 = await BaseWallet.at(proxy.address); await wallet2.init(owner2, [versionManager.address]); - await assert.revertWith( + await assertRevert( makerV2.addCollateral(wallet2.address, loanId, ETH_TOKEN, parseEther("0.010"), { from: owner2 }), "MV2: unauthorized loanId", ); @@ -321,7 +321,7 @@ contract("MakerV2Loan", (accounts) => { it("should not remove collateral with invalid collateral amount", async () => { const loanId = await testOpenLoan({ collateralAmount, daiAmount, relayed: false }); - await assert.revertWith( + await assertRevert( makerV2.removeCollateral(walletAddress, loanId, ETH_TOKEN, ethers.BigNumber.from(2).pow(255), { from: owner }), "MV2: int overflow", ); @@ -333,7 +333,7 @@ contract("MakerV2Loan", (accounts) => { const wallet2 = await BaseWallet.at(proxy.address); await wallet2.init(owner2, [versionManager.address]); - await assert.revertWith( + await assertRevert( makerV2.removeCollateral(wallet2.address, loanId, ETH_TOKEN, parseEther("0.010"), { from: owner2 }), "MV2: unauthorized loanId", ); @@ -399,7 +399,7 @@ contract("MakerV2Loan", (accounts) => { const wallet2 = await BaseWallet.at(proxy.address); await wallet2.init(owner2, [versionManager.address]); - await assert.revertWith( + await assertRevert( makerV2.addDebt(wallet2.address, loanId, ETH_TOKEN, parseEther("0.010"), { from: owner2 }), "MV2: unauthorized loanId", ); @@ -436,7 +436,7 @@ contract("MakerV2Loan", (accounts) => { it("should not repay debt when only dust left", async () => { const { collateralAmount, daiAmount } = await getTestAmounts(ETH_TOKEN); const loanId = await testOpenLoan({ collateralAmount, daiAmount, relayed: false }); - await assert.revertWith( + await assertRevert( makerV2.removeDebt(walletAddress, loanId, dai.address, daiAmount.sub(1), { from: owner }), "MV2: repay less or full", ); @@ -449,7 +449,7 @@ contract("MakerV2Loan", (accounts) => { const wallet2 = await BaseWallet.at(proxy.address); await wallet2.init(owner2, [versionManager.address]); - await assert.revertWith( + await assertRevert( makerV2.removeDebt(wallet2.address, loanId, ETH_TOKEN, parseEther("0.010"), { from: owner2 }), "MV2: unauthorized loanId", ); @@ -492,7 +492,7 @@ contract("MakerV2Loan", (accounts) => { const wallet2 = await BaseWallet.at(proxy.address); await wallet2.init(owner2, [versionManager.address]); - await assert.revertWith( + await assertRevert( makerV2.closeLoan(wallet2.address, loanId, { from: owner2 }), "MV2: unauthorized loanId", ); @@ -520,12 +520,12 @@ contract("MakerV2Loan", (accounts) => { it("should not add a collateral when Join is not in the Vat", async () => { const badJoin = await GemJoin.new(vat.address, formatBytes32String("BAD"), bat.address); - await assert.revertWith(makerRegistry.addCollateral(badJoin.address), "MR: _joinAdapter not authorised in vat"); + await assertRevert(makerRegistry.addCollateral(badJoin.address), "MR: _joinAdapter not authorised in vat"); }); it("should not add a duplicate collateral", async () => { await makerRegistry.addCollateral(batJoin.address); - await assert.revertWith(makerRegistry.addCollateral(batJoin.address), "MR: collateral already added"); + await assertRevert(makerRegistry.addCollateral(batJoin.address), "MR: collateral already added"); await makerRegistry.removeCollateral(bat.address); // cleanup }); @@ -538,7 +538,7 @@ contract("MakerV2Loan", (accounts) => { }); it("should not remove a non-existing collateral", async () => { - await assert.revertWith(makerRegistry.removeCollateral(bat.address), "MR: collateral does not exist"); + await assertRevert(makerRegistry.removeCollateral(bat.address), "MR: collateral does not exist"); }); }); @@ -591,7 +591,7 @@ contract("MakerV2Loan", (accounts) => { const vaultId = txR.events.find((e) => e.event === "NewCdp").args.cdp; const loanId = bigNumToBytes32(vaultId); // We are NOT transferring the vault from the owner to the wallet - await assert.revertWith( + await assertRevert( makerV2.acquireLoan(walletAddress, loanId, { from: owner }), "MV2: wrong vault owner", ); }); @@ -608,7 +608,7 @@ contract("MakerV2Loan", (accounts) => { const loanId = bigNumToBytes32(vaultId); // Transfer the vault to the fake wallet await cdpManager.give(vaultId, fakeWallet.address, { from: owner }); - await assert.revertWith( + await assertRevert( makerV2.acquireLoan(fakeWallet.address, loanId, { from: owner }), "MV2: failed give", ); }); @@ -638,7 +638,7 @@ contract("MakerV2Loan", (accounts) => { const loanId = bigNumToBytes32(vaultId); // Transfer the vault to the fake wallet await cdpManager.give(vaultId, fakeWallet.address, { from: owner }); - await assert.revertWith( + await assertRevert( makerV2.acquireLoan(fakeWallet.address, loanId, { from: owner }), "MV2: reentrant call", ); }); @@ -752,7 +752,7 @@ contract("MakerV2Loan", (accounts) => { }); it("should not allow non-feature to give vault", async () => { - await assert.revertWith(makerV2.giveVault(walletAddress, formatBytes32String(""), { from: owner }), "BF: must be a wallet feature"); + await assertRevert(makerV2.giveVault(walletAddress, formatBytes32String(""), { from: owner }), "BF: must be a wallet feature"); }); it("should not allow (fake) feature to give unowned vault", async () => { @@ -769,7 +769,7 @@ contract("MakerV2Loan", (accounts) => { await versionManager.upgradeWallet(walletAddress, lastVersion, { gasLimit: 2000000, from: owner }); // Use the bad module to attempt a bad giveVault call const callData = makerV2.contract.interface.functions.giveVault.encode([walletAddress, bigNumToBytes32(ethers.BigNumber.from(666))]); - await assert.revertWith(badFeature.callContract(makerV2.address, 0, callData, { from: owner }), "MV2: unauthorized loanId"); + await assertRevert(badFeature.callContract(makerV2.address, 0, callData, { from: owner }), "MV2: unauthorized loanId"); }); }); }); diff --git a/test/multisig.js b/test/multisig.js index a84890d73..8a9b44be6 100644 --- a/test/multisig.js +++ b/test/multisig.js @@ -3,7 +3,7 @@ const MultiSigWallet = artifacts.require("MultiSigWallet"); const TestRegistry = artifacts.require("TestRegistry"); const MultisigExecutor = require("../utils/multisigexecutor.js"); -const utils = require("../utils/utilities.js"); +const utilities = require("../utils/utilities.js"); contract("MultiSigWallet", (accounts) => { const owner = accounts[0]; @@ -21,7 +21,7 @@ contract("MultiSigWallet", (accounts) => { before(async () => { number = 12345; value = 10000000000; - owners = utils.sortWalletByAddress([owner1, owner2, owner3]); + owners = utilities.sortWalletByAddress([owner1, owner2, owner3]); }); beforeEach(async () => { @@ -32,7 +32,7 @@ contract("MultiSigWallet", (accounts) => { // Fund the multisig await multisig.send(value); - const bal = await utils.getBalance(multisig.address); + const bal = await utilities.getBalance(multisig.address); assert.equal(bal.toNumber(), value); }); @@ -40,7 +40,7 @@ contract("MultiSigWallet", (accounts) => { // Sort the signers let sortedSigners = signers; if (sortSigners) { - sortedSigners = utils.sortWalletByAddress(signers); + sortedSigners = utilities.sortWalletByAddress(signers); } const signHashBuffer = Buffer.from(signedData.slice(2), "hex"); let signatures = "0x"; @@ -68,7 +68,7 @@ contract("MultiSigWallet", (accounts) => { assert.equal(numFromRegistry.toNumber(), number); // Check funds in registry - const bal = await utils.getBalance(reg.address); + const bal = await utilities.getBalance(reg.address); assert.equal(bal.toString(), value.toString()); // Check nonce updated @@ -84,7 +84,7 @@ contract("MultiSigWallet", (accounts) => { const signedData = MultisigExecutor.signHash(multisig.address, reg.address, value, data, nonce); const signatures = await getSignatures(signedData, signers, sortSigners, returnBadSignatures); - await assert.revertWith(multisig.execute(reg.address, value, data, signatures), errorMessage); + await utilities.assertRevert(multisig.execute(reg.address, value, data, signatures), errorMessage); } async function getMultiSigParams(functioName, params) { @@ -97,11 +97,11 @@ contract("MultiSigWallet", (accounts) => { describe("Creating and changing the multisig", () => { it("should not be able to instantiate without owners", async () => { - await assert.revertWith(MultiSigWallet.new(2, []), "MSW: Not enough or too many owners"); + await utilities.assertRevert(MultiSigWallet.new(2, []), "MSW: Not enough or too many owners"); }); it("should not be able to instantiate with 0 threshold", async () => { - await assert.revertWith(MultiSigWallet.new(0, owners), "MSW: Invalid threshold"); + await utilities.assertRevert(MultiSigWallet.new(0, owners), "MSW: Invalid threshold"); }); it("should store owners correctly", async () => { @@ -120,15 +120,15 @@ contract("MultiSigWallet", (accounts) => { }); it("should not be able to execute addOwner externally", async () => { - await assert.revertWith(multisig.addOwner(newowner), "MSW: Calling account is not wallet"); + await utilities.assertRevert(multisig.addOwner(newowner), "MSW: Calling account is not wallet"); }); it("should not be able to execute removeOwner externally", async () => { - await assert.revertWith(multisig.removeOwner(newowner), "MSW: Calling account is not wallet"); + await utilities.assertRevert(multisig.removeOwner(newowner), "MSW: Calling account is not wallet"); }); it("should not be able to execute changeThreshold externally", async () => { - await assert.revertWith(multisig.changeThreshold(15), "MSW: Calling account is not wallet"); + await utilities.assertRevert(multisig.changeThreshold(15), "MSW: Calling account is not wallet"); }); it("should be able to add new owner", async () => { @@ -143,7 +143,7 @@ contract("MultiSigWallet", (accounts) => { // We already have 3 owners, which are accounts 1..3 // Here we add accounts 4..10 to get 10 owners on the multisig for (let i = 4; i <= 10; i += 1) { - const randomAddress = await utils.getRandomAddress(); + const randomAddress = await utilities.getRandomAddress(); const { data, signatures } = await getMultiSigParams("addOwner", [randomAddress]); await multisig.execute(multisig.address, 0, data, signatures); } @@ -151,14 +151,14 @@ contract("MultiSigWallet", (accounts) => { const ownersCount = await multisig.ownersCount(); assert.equal(ownersCount.toNumber(), 10); - const randomAddress = await utils.getRandomAddress(); + const randomAddress = await utilities.getRandomAddress(); const { data, signatures } = await getMultiSigParams("addOwner", [randomAddress]); - await assert.revertWith(multisig.execute(multisig.address, 0, data, signatures), "MSW: External call failed"); + await utilities.assertRevert(multisig.execute(multisig.address, 0, data, signatures), "MSW: External call failed"); }); it("should not be able to add owner twice", async () => { const { data, signatures } = await getMultiSigParams("addOwner", [owner1]); - await assert.revertWith(multisig.execute(multisig.address, 0, data, signatures), "MSW: External call failed"); + await utilities.assertRevert(multisig.execute(multisig.address, 0, data, signatures), "MSW: External call failed"); }); it("should be able to remove existing owner", async () => { @@ -174,13 +174,13 @@ contract("MultiSigWallet", (accounts) => { await multisig.execute(multisig.address, 0, values1.data, values1.signatures); const values2 = await getMultiSigParams("removeOwner", [owner2]); - await assert.revertWith(multisig.execute(multisig.address, 0, values2.data, values2.signatures), "MSW: External call failed"); + await utilities.assertRevert(multisig.execute(multisig.address, 0, values2.data, values2.signatures), "MSW: External call failed"); }); it("should not be able to remove a nonexisting owner", async () => { - const randomAddress = await utils.getRandomAddress(); + const randomAddress = await utilities.getRandomAddress(); const { data, signatures } = await getMultiSigParams("removeOwner", [randomAddress]); - await assert.revertWith(multisig.execute(multisig.address, 0, data, signatures), "MSW: External call failed"); + await utilities.assertRevert(multisig.execute(multisig.address, 0, data, signatures), "MSW: External call failed"); }); it("should be able to change the threshold", async () => { @@ -196,7 +196,7 @@ contract("MultiSigWallet", (accounts) => { it("should not be able to change the threshold to be more than the current number of owners", async () => { const { data, signatures } = await getMultiSigParams("changeThreshold", [4]); - await assert.revertWith(multisig.execute(multisig.address, 0, data, signatures), "MSW: External call failed"); + await utilities.assertRevert(multisig.execute(multisig.address, 0, data, signatures), "MSW: External call failed"); }); }); @@ -230,7 +230,7 @@ contract("MultiSigWallet", (accounts) => { }); it("should fail with signers in wrong order", async () => { - let signers = utils.sortWalletByAddress([owner1, owner2]); + let signers = utilities.sortWalletByAddress([owner1, owner2]); signers = signers.reverse(); // opposite order it should be await executeSendFailure(signers, 0, false, "MSW: Badly ordered signatures"); }); diff --git a/test/recoveryManager.js b/test/recoveryManager.js index a6332253e..c4a8c0767 100644 --- a/test/recoveryManager.js +++ b/test/recoveryManager.js @@ -21,7 +21,8 @@ const { getTimestamp, increaseTime, getNonceForRelay, - getNetworkId + getNetworkId, + assertRevert } = require("../utils/utilities.js"); const WRONG_SIGNATURE_NUMBER_REVERT_MSG = "RM: Wrong number of signatures"; @@ -150,7 +151,7 @@ contract("RecoveryManager", (accounts) => { it("should not let owner execute the recovery procedure", async () => { const expectedRevertMsg = guardians.length >= 3 ? WRONG_SIGNATURE_NUMBER_REVERT_MSG : INVALID_SIGNATURES_REVERT_MSG; - await assert.revertWith( + await assertRevert( manager.relay( recoveryManager, "executeRecovery", @@ -163,7 +164,7 @@ contract("RecoveryManager", (accounts) => { it("should not let a majority of guardians and owner execute the recovery procedure", async () => { const majority = guardians.slice(0, Math.ceil((guardians.length) / 2) - 1); - await assert.revertWith( + await assertRevert( manager.relay( recoveryManager, "executeRecovery", @@ -179,7 +180,7 @@ contract("RecoveryManager", (accounts) => { it("should not let a minority of guardians execute the recovery procedure", async () => { const minority = guardians.slice(0, Math.ceil((guardians.length) / 2) - 1); - await assert.revertWith( + await assertRevert( manager.relay( recoveryManager, "executeRecovery", @@ -253,7 +254,7 @@ contract("RecoveryManager", (accounts) => { }); it("should not let 1 guardian cancel the recovery procedure", async () => { - await assert.revertWith( + await assertRevert( manager.relay( recoveryManager, "cancelRecovery", @@ -268,7 +269,7 @@ contract("RecoveryManager", (accounts) => { }); it("should not let the owner cancel the recovery procedure", async () => { - await assert.revertWith( + await assertRevert( manager.relay( recoveryManager, "cancelRecovery", @@ -283,7 +284,7 @@ contract("RecoveryManager", (accounts) => { }); it("should not allow duplicate guardian signatures", async () => { - await assert.revertWith( + await assertRevert( manager.relay( recoveryManager, "cancelRecovery", @@ -298,7 +299,7 @@ contract("RecoveryManager", (accounts) => { }); it("should not allow non guardians signatures", async () => { - await assert.revertWith( + await assertRevert( manager.relay( recoveryManager, "cancelRecovery", @@ -325,7 +326,7 @@ contract("RecoveryManager", (accounts) => { it("should not let owner + minority of guardians execute an ownership transfer", async () => { const minority = guardians.slice(0, Math.ceil((guardians.length) / 2) - 1); - await assert.revertWith( + await assertRevert( manager.relay( recoveryManager, "transferOwnership", @@ -341,7 +342,7 @@ contract("RecoveryManager", (accounts) => { it("should not let majority of guardians execute an ownership transfer without owner", async () => { const majority = guardians.slice(0, Math.ceil((guardians.length) / 2)); - await assert.revertWith( + await assertRevert( manager.relay( recoveryManager, "transferOwnership", @@ -358,7 +359,7 @@ contract("RecoveryManager", (accounts) => { describe("RecoveryManager high level logic", () => { it("should not be able to instantiate the RecoveryManager with lock period shorter than the recovery period", async () => { - await assert.revertWith(RecoveryManager.new( + await assertRevert(RecoveryManager.new( lockStorage.address, guardianStorage.address, versionManager.address, @@ -370,7 +371,7 @@ contract("RecoveryManager", (accounts) => { describe("Execute Recovery", () => { it("should not allow recovery to be executed with no guardians", async () => { const noGuardians = []; - await assert.revertWith(manager.relay( + await assertRevert(manager.relay( recoveryManager, "executeRecovery", [wallet.address, newowner], @@ -402,7 +403,7 @@ contract("RecoveryManager", (accounts) => { it("should not allow duplicate guardian signatures", async () => { const badMajority = [guardian1, guardian1]; - await assert.revertWith( + await assertRevert( manager.relay( recoveryManager, "executeRecovery", @@ -486,7 +487,7 @@ contract("RecoveryManager", (accounts) => { ETH_TOKEN, ethers.constants.AddressZero, ); - await assert.revertWith( + await assertRevert( relayerManager.execute( wallet.address, recoveryManager.address, @@ -590,7 +591,7 @@ contract("RecoveryManager", (accounts) => { it("should not allow owner not signing", async () => { await addGuardians([guardian1]); - await assert.revertWith( + await assertRevert( manager.relay( recoveryManager, "transferOwnership", @@ -603,7 +604,7 @@ contract("RecoveryManager", (accounts) => { it("should not allow duplicate owner signatures", async () => { await addGuardians([guardian1]); - await assert.revertWith( + await assertRevert( manager.relay( recoveryManager, "transferOwnership", @@ -616,7 +617,7 @@ contract("RecoveryManager", (accounts) => { it("should not allow duplicate guardian signatures", async () => { await addGuardians([guardian1, guardian2, guardian3]); - await assert.revertWith( + await assertRevert( manager.relay( recoveryManager, "transferOwnership", @@ -629,7 +630,7 @@ contract("RecoveryManager", (accounts) => { it("should not allow non guardian signatures", async () => { await addGuardians([guardian1]); - await assert.revertWith( + await assertRevert( manager.relay( recoveryManager, "transferOwnership", diff --git a/test/relayer.js b/test/relayer.js index ea29e0e91..9ff571dcd 100644 --- a/test/relayer.js +++ b/test/relayer.js @@ -2,7 +2,7 @@ const ethers = require("ethers"); const BN = require("bn.js"); const { formatBytes32String } = require("ethers").utils; -const { parseRelayReceipt, hasEvent, getBalance } = require("../utils/utilities.js"); +const { parseRelayReceipt, hasEvent, getBalance, assertRevert } = require("../utils/utilities.js"); const Proxy = artifacts.require("Proxy"); const BaseWallet = artifacts.require("BaseWallet"); @@ -135,14 +135,14 @@ contract("RelayerManager", (accounts) => { describe("relaying feature transactions", () => { it("should fail when _data is less than 36 bytes", async () => { const params = []; // the first argument is not the wallet address, which should make the relaying revert - await assert.revertWith( + await assertRevert( manager.relay(testFeature, "clearInt", params, wallet, [owner]), INVALID_DATA_REVERT_MSG, ); }); it("should fail when feature is not authorised", async () => { const params = [wallet.address, 2]; - await assert.revertWith( + await assertRevert( manager.relay(testFeatureNew, "setIntOwnerOnly", params, wallet, [owner]), FEATURE_NOT_AUTHORISED_FOR_WALLET, ); }); @@ -171,7 +171,7 @@ contract("RelayerManager", (accounts) => { it("should fail when the first param is not the wallet ", async () => { const params = [owner, 4]; - await assert.revertWith( + await assertRevert( manager.relay(testFeature, "setIntOwnerOnly", params, wallet, [owner]), INVALID_WALLET_REVERT_MSG, ); }); @@ -194,13 +194,13 @@ contract("RelayerManager", (accounts) => { ETH_TOKEN, ethers.constants.AddressZero, gasLimit * 0.9]; - await assert.revertWith(manager.relay(...relayParams), GAS_LESS_THAN_GASLIMIT); + await assertRevert(manager.relay(...relayParams), GAS_LESS_THAN_GASLIMIT); }); it("should fail when a wrong number of signatures is provided", async () => { const params = [wallet.address, 2]; const relayParams = [testFeature, "setIntOwnerOnly", params, wallet, [owner, recipient]]; - await assert.revertWith(manager.relay(...relayParams), WRONG_NUMBER_SIGNATURES); + await assertRevert(manager.relay(...relayParams), WRONG_NUMBER_SIGNATURES); }); it("should fail a duplicate transaction", async () => { @@ -209,7 +209,7 @@ contract("RelayerManager", (accounts) => { const relayParams = [testFeature, "setIntOwnerOnly", params, wallet, [owner], accounts[9], false, 2000000, nonce]; await manager.relay(...relayParams); - await assert.revertWith( + await assertRevert( manager.relay(...relayParams), DUPLICATE_REQUEST_REVERT_MSG, ); }); @@ -229,7 +229,7 @@ contract("RelayerManager", (accounts) => { ETH_TOKEN, ethers.constants.AddressZero, ]; - await assert.revertWith( + await assertRevert( manager.relay(relayerManager, "execute", params, wallet, [owner]), "BF: disabled method", ); }); @@ -319,12 +319,12 @@ contract("RelayerManager", (accounts) => { it("should fail the transaction when when there is not enough ETH for the refund", async () => { await provisionFunds(ethers.BigNumber.from("10"), 0); - await assert.revertWith(callAndRefund({ refundToken: ETH_TOKEN }), "VM: wallet invoke reverted"); + await assertRevert(callAndRefund({ refundToken: ETH_TOKEN }), "VM: wallet invoke reverted"); }); it("should fail the transaction when when there is not enough ERC20 for the refund", async () => { await provisionFunds(0, ethers.BigNumber.from("10")); - await assert.revertWith(callAndRefund({ refundToken: erc20.address }), "ERC20: transfer amount exceeds balance"); + await assertRevert(callAndRefund({ refundToken: erc20.address }), "ERC20: transfer amount exceeds balance"); }); it("should include the refund in the daily limit", async () => { @@ -372,7 +372,7 @@ contract("RelayerManager", (accounts) => { }); it("should fail if required signatures is 0 and OwnerRequirement is not Anyone", async () => { - await assert.revertWith( + await assertRevert( manager.relay(badFeature, "setIntOwnerOnly", [wallet.address, 2], wallet, [owner]), "RM: Wrong signature requirement", ); }); @@ -382,7 +382,7 @@ contract("RelayerManager", (accounts) => { await setLimitAndDailySpent({ limit: 1000000000, alreadySpent: 999999990 }); const dailySpent = await limitFeature.getDailySpent(wallet.address); assert.isTrue(dailySpent.toNumber() === 999999990, "initial daily spent should be 999999990"); - await assert.revertWith(callAndRefund({ refundToken: ETH_TOKEN }), "RM: refund is above daily limit"); + await assertRevert(callAndRefund({ refundToken: ETH_TOKEN }), "RM: refund is above daily limit"); }); }); @@ -407,7 +407,7 @@ contract("RelayerManager", (accounts) => { }); it("should fail to add module which is not registered", async () => { - await assert.revertWith(versionManager.addModule(wallet.address, versionManagerV2.address, { from: owner }), + await assertRevert(versionManager.addModule(wallet.address, versionManagerV2.address, { from: owner }), "VM: module is not registered"); }); }); diff --git a/test/simpleUpgrader.js b/test/simpleUpgrader.js index ad457d5fd..14c51f641 100644 --- a/test/simpleUpgrader.js +++ b/test/simpleUpgrader.js @@ -125,7 +125,7 @@ contract("SimpleUpgrader", (accounts) => { await registry.registerModule(upgrader.address, formatBytes32String("V1toV2")); // check we can't upgrade from V1 to V2 - await assert.revertWith(moduleV1.addModule(wallet.address, upgrader.address, { from: owner }), "SU: Not all modules are registered"); + await utils.assertRevert(moduleV1.addModule(wallet.address, upgrader.address, { from: owner }), "SU: Not all modules are registered"); // register module V2 await registry.registerModule(moduleV2.address, formatBytes32String("V2")); // now we can upgrade @@ -293,7 +293,7 @@ contract("SimpleUpgrader", (accounts) => { await lockManager.lock(wallet.address, { from: guardian }); // Try to upgrade while wallet is locked - await assert.revertWith(versionManager.addModule(wallet.address, upgrader.address, { from: owner }), "BF: wallet locked"); + await utils.assertRevert(versionManager.addModule(wallet.address, upgrader.address, { from: owner }), "BF: wallet locked"); // Check wallet is still locked const locked = await lockManager.isLocked(wallet.address); @@ -321,7 +321,7 @@ contract("SimpleUpgrader", (accounts) => { assert.isTrue(locked, "wallet should be locked"); // Try to upgrade while wallet is under recovery - await assert.revertWith(versionManager.addModule(wallet.address, upgrader.address, { from: owner }), "BF: wallet locked"); + await utils.assertRevert(versionManager.addModule(wallet.address, upgrader.address, { from: owner }), "BF: wallet locked"); // Check wallet is still locked locked = await lockManager.isLocked(wallet.address); diff --git a/test/tokenExchanger.js b/test/tokenExchanger.js index dd9ad3350..d3e47323d 100644 --- a/test/tokenExchanger.js +++ b/test/tokenExchanger.js @@ -41,7 +41,7 @@ const VersionManager = artifacts.require("VersionManager"); // Utils const { makePathes } = require("../utils/paraswap/sell-helper"); const { makeRoutes } = require("../utils/paraswap/buy-helper"); -const { ETH_TOKEN, parseLogs, getTimestamp } = require("../utils/utilities.js"); +const { ETH_TOKEN, parseLogs, getTimestamp, assertRevert } = require("../utils/utilities.js"); const RelayManager = require("../utils/relay-manager"); // Constants @@ -382,7 +382,7 @@ contract("TokenExchanger", (accounts) => { fixedAmount, variableAmount, }); - await assert.revertWith(exchanger[method](...params, { gasLimit: 2000000, from: owner }), "DR: Unauthorised DEX"); + await assertRevert(exchanger[method](...params, { gasLimit: 2000000, from: owner }), "DR: Unauthorised DEX"); // reset whitelist await dexRegistry.setAuthorised([kyberAdapter.address, uniswapV2Adapter.address], [true, true]); }); diff --git a/test/transferManager.js b/test/transferManager.js index a35eda04f..82010d320 100644 --- a/test/transferManager.js +++ b/test/transferManager.js @@ -187,7 +187,7 @@ contract("TransferManager", (accounts) => { it("should not be able to whitelist a token twice", async () => { await transferManager.addToWhitelist(wallet.address, recipient, { from: owner }); await increaseTime(3); - await assert.revertWith( + await utils.assertRevert( transferManager.addToWhitelist(wallet.address, recipient, { from: owner }), "TT: target already whitelisted", ); }); @@ -681,19 +681,19 @@ contract("TransferManager", (accounts) => { it("should not be able to call the wallet itselt", async () => { const dataToTransfer = contract.contract.interface.functions.setState.encode([4]); const params = [wallet.address, wallet.address, 10, dataToTransfer]; - await assert.revertWith(transferManager.callContract(...params, { from: owner }), "BT: Forbidden contract"); + await utils.assertRevert(transferManager.callContract(...params, { from: owner }), "BT: Forbidden contract"); }); it("should not be able to call a feature of the wallet", async () => { const dataToTransfer = contract.contract.interface.functions.setState.encode([4]); const params = [wallet.address, transferManager.address, 10, dataToTransfer]; - await assert.revertWith(transferManager.callContract(...params, { from: owner }), "BT: Forbidden contract"); + await utils.assertRevert(transferManager.callContract(...params, { from: owner }), "BT: Forbidden contract"); }); it("should not be able to call a supported ERC20 token contract", async () => { const dataToTransfer = contract.contract.interface.functions.setState.encode([4]); const params = [wallet.address, erc20.address, 10, dataToTransfer]; - await assert.revertWith(transferManager.callContract(...params, { from: owner }), "TM: Forbidden contract"); + await utils.assertRevert(transferManager.callContract(...params, { from: owner }), "TM: Forbidden contract"); }); it("should be able to call a supported token contract which is whitelisted", async () => { @@ -719,7 +719,7 @@ contract("TransferManager", (accounts) => { }); it("should fail to call a contract and transfer ETH when the amount is above the daily limit ", async () => { - await assert.revertWith(doCallContract({ value: ETH_LIMIT + 10000, state: 6 }, "above daily limit")); + await utils.assertRevert(doCallContract({ value: ETH_LIMIT + 10000, state: 6 }, "above daily limit")); }); }); @@ -816,7 +816,7 @@ contract("TransferManager", (accounts) => { it("should not be able to spend more than approved in call", async () => { await transferManager.approveToken(wallet.address, erc20.address, contract.address, 10, { from: owner }); const dataToTransfer = contract.contract.interface.functions.setStateAndPayToken.encode([3, erc20.address, 6]); - await assert.revertWith(transferManager.approveTokenAndCallContract( + await utils.assertRevert(transferManager.approveTokenAndCallContract( wallet.address, erc20.address, contract.address, @@ -851,7 +851,7 @@ contract("TransferManager", (accounts) => { await transferManager.addToWhitelist(wallet.address, consumer, { from: owner }); await increaseTime(3); const dataToTransfer = contract.contract.interface.functions.setStateAndPayTokenWithConsumer.encode([6, erc20.address, amount]); - await assert.revertWith( + await utils.assertRevert( transferManager.approveTokenAndCallContract( wallet.address, erc20.address, consumer, amount, contract.address, dataToTransfer, { from: owner } ), @@ -871,7 +871,7 @@ contract("TransferManager", (accounts) => { const startingBalance = await erc20.balanceOf(wallet.address); await erc20.burn(wallet.address, startingBalance); const dataToTransfer = contract.contract.interface.functions.setStateAndPayToken.encode([3, erc20.address, 1]); - await assert.revertWith(transferManager.approveTokenAndCallContract( + await utils.assertRevert(transferManager.approveTokenAndCallContract( wallet.address, erc20.address, contract.address, diff --git a/utils/utilities.js b/utils/utilities.js index 989ba6f18..b58b95e92 100644 --- a/utils/utilities.js +++ b/utils/utilities.js @@ -1,6 +1,7 @@ const readline = require("readline"); const ethers = require("ethers"); const web3 = require("web3"); +const { assert } = require("chai"); const ETH_TOKEN = "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"; @@ -62,10 +63,10 @@ module.exports = { return sigs; }, - sortWalletByAddress(wallets, addressKey = "address") { + sortWalletByAddress(wallets) { return wallets.sort((s1, s2) => { - const bn1 = ethers.BigNumber.from(s1[addressKey]); - const bn2 = ethers.BigNumber.from(s2[addressKey]); + const bn1 = ethers.BigNumber.from(s1); + const bn2 = ethers.BigNumber.from(s2); if (bn1.lt(bn2)) return -1; if (bn1.gt(bn2)) return 1; return 0; @@ -168,7 +169,7 @@ module.exports = { }, async increaseTime(seconds) { - const networkId = await this.getNetworkId(); + const networkId = await web3.eth.net.getId(); console.log("networkId", networkId); // TODO if (networkId === "ganache") { @@ -185,5 +186,17 @@ module.exports = { const timestamp = new Date().getTime(); return `0x${ethers.utils.hexZeroPad(ethers.utils.hexlify(block), 16) .slice(2)}${ethers.utils.hexZeroPad(ethers.utils.hexlify(timestamp), 16).slice(2)}`; + }, + + async assertRevert(promise, revertMessage) { + let receipt; + let reason; + try { + await promise; + assert.fail("Transaction succeeded, but expected error ${revertMessage}`"); + } catch (err) { + ({ reason } = err); + assert.equal(reason, revertMessage); + } } }; From af2ceeb0799583f7aa24f28ef65b5c302b050310 Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Tue, 18 Aug 2020 11:57:10 +0300 Subject: [PATCH 025/113] Set network id to 1597649375983 for development network --- truffle-config-contracts-legacy-1.3.js | 2 +- truffle-config-contracts-legacy-1.6.js | 2 +- truffle-config-contracts-test.js | 2 +- truffle-config-infrastructure-0.5.js | 2 +- truffle-config-infrastructure.js | 2 +- truffle-config-lib.js | 2 +- truffle-config-modules.js | 2 +- truffle-config-wallet.js | 2 +- truffle-config.js | 2 +- utils/utilities.js | 14 ++++++++------ 10 files changed, 17 insertions(+), 15 deletions(-) diff --git a/truffle-config-contracts-legacy-1.3.js b/truffle-config-contracts-legacy-1.3.js index 7b2945f69..5e90c847e 100644 --- a/truffle-config-contracts-legacy-1.3.js +++ b/truffle-config-contracts-legacy-1.3.js @@ -46,7 +46,7 @@ module.exports = { development: { host: "127.0.0.1", // Localhost (default: none) port: 8545, // Standard Ethereum port (default: none) - network_id: "*", // Any network (default: none) + network_id: "1597649375983", gas: 20700000 }, diff --git a/truffle-config-contracts-legacy-1.6.js b/truffle-config-contracts-legacy-1.6.js index ae91aa08a..8bf3721c4 100644 --- a/truffle-config-contracts-legacy-1.6.js +++ b/truffle-config-contracts-legacy-1.6.js @@ -46,7 +46,7 @@ module.exports = { development: { host: "127.0.0.1", // Localhost (default: none) port: 8545, // Standard Ethereum port (default: none) - network_id: "*", // Any network (default: none) + network_id: "1597649375983", gas: 20700000 }, diff --git a/truffle-config-contracts-test.js b/truffle-config-contracts-test.js index 298b51210..e8f5ddee4 100644 --- a/truffle-config-contracts-test.js +++ b/truffle-config-contracts-test.js @@ -45,7 +45,7 @@ module.exports = { development: { host: "127.0.0.1", // Localhost (default: none) port: 8545, // Standard Ethereum port (default: none) - network_id: "*", // Any network (default: none) + network_id: "1597649375983", gas: 20700000 }, diff --git a/truffle-config-infrastructure-0.5.js b/truffle-config-infrastructure-0.5.js index 63d803fbe..307115deb 100644 --- a/truffle-config-infrastructure-0.5.js +++ b/truffle-config-infrastructure-0.5.js @@ -45,7 +45,7 @@ module.exports = { development: { host: "127.0.0.1", // Localhost (default: none) port: 8545, // Standard Ethereum port (default: none) - network_id: "*", // Any network (default: none) + network_id: "1597649375983", gas: 20700000 }, diff --git a/truffle-config-infrastructure.js b/truffle-config-infrastructure.js index b1658a023..ad140bd44 100644 --- a/truffle-config-infrastructure.js +++ b/truffle-config-infrastructure.js @@ -45,7 +45,7 @@ module.exports = { development: { host: "127.0.0.1", // Localhost (default: none) port: 8545, // Standard Ethereum port (default: none) - network_id: "*", // Any network (default: none) + network_id: "1597649375983", gas: 20700000 }, diff --git a/truffle-config-lib.js b/truffle-config-lib.js index 734d63da7..55b35b410 100644 --- a/truffle-config-lib.js +++ b/truffle-config-lib.js @@ -4,7 +4,7 @@ module.exports = { development: { host: "127.0.0.1", port: 8545, - network_id: "*", + network_id: "1597649375983", gas: 20700000 }, }, diff --git a/truffle-config-modules.js b/truffle-config-modules.js index 7fb8c1831..bf6cb630c 100644 --- a/truffle-config-modules.js +++ b/truffle-config-modules.js @@ -45,7 +45,7 @@ module.exports = { development: { host: "127.0.0.1", // Localhost (default: none) port: 8545, // Standard Ethereum port (default: none) - network_id: "*", // Any network (default: none) + network_id: "1597649375983", gas: 20700000 }, diff --git a/truffle-config-wallet.js b/truffle-config-wallet.js index 20e29cb23..129bd1997 100644 --- a/truffle-config-wallet.js +++ b/truffle-config-wallet.js @@ -45,7 +45,7 @@ module.exports = { development: { host: "127.0.0.1", // Localhost (default: none) port: 8545, // Standard Ethereum port (default: none) - network_id: "*", // Any network (default: none) + network_id: "1597649375983", gas: 20700000 }, diff --git a/truffle-config.js b/truffle-config.js index 9374d6034..214192c90 100644 --- a/truffle-config.js +++ b/truffle-config.js @@ -45,7 +45,7 @@ module.exports = { development: { host: "127.0.0.1", // Localhost (default: none) port: 8545, // Standard Ethereum port (default: none) - network_id: "*", // Any network (default: none) + network_id: "1597649375983", gas: 20700000 }, diff --git a/utils/utilities.js b/utils/utilities.js index b58b95e92..4c858493e 100644 --- a/utils/utilities.js +++ b/utils/utilities.js @@ -1,7 +1,5 @@ const readline = require("readline"); const ethers = require("ethers"); -const web3 = require("web3"); -const { assert } = require("chai"); const ETH_TOKEN = "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"; @@ -171,8 +169,8 @@ module.exports = { async increaseTime(seconds) { const networkId = await web3.eth.net.getId(); console.log("networkId", networkId); - // TODO - if (networkId === "ganache") { + + if (networkId === "1597649375983") { await web3.currentProvider.send("evm_increaseTime", seconds); await web3.currentProvider.send("evm_mine"); } else { @@ -182,14 +180,13 @@ module.exports = { }, async getNonceForRelay() { - const block = await web3.eth.getBlockNumber()(); + const block = await web3.eth.getBlockNumber(); const timestamp = new Date().getTime(); return `0x${ethers.utils.hexZeroPad(ethers.utils.hexlify(block), 16) .slice(2)}${ethers.utils.hexZeroPad(ethers.utils.hexlify(timestamp), 16).slice(2)}`; }, async assertRevert(promise, revertMessage) { - let receipt; let reason; try { await promise; @@ -198,5 +195,10 @@ module.exports = { ({ reason } = err); assert.equal(reason, revertMessage); } + }, + + async getAccount(index) { + const accounts = await web3.eth.getAccounts(); + return accounts[index]; } }; From acb43f07e04cffeef539f342bb247c0930eee53b Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Tue, 18 Aug 2020 11:57:38 +0300 Subject: [PATCH 026/113] Set relayer account to accounts[9] by default --- deployment/999_benchmark.js | 11 +++++++++++ utils/relay-manager.js | 7 ++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/deployment/999_benchmark.js b/deployment/999_benchmark.js index 621a135e3..67a282715 100644 --- a/deployment/999_benchmark.js +++ b/deployment/999_benchmark.js @@ -559,9 +559,20 @@ class Benchmark { // //// utils //////// // /////////////////// +<<<<<<< HEAD async relay(target, method, params, wallet, signers) { const txReceipt = await this.testManager.relay(target, method, params, wallet, signers, this.accounts[9], false); return txReceipt.gasUsed.toString(); +======= + async relay(target, method, params, wallet, signers, estimate = false) { + const result = await this.testManager.relay(target, method, params, wallet, signers, accounts[9], estimate); + return result; + } + + async relayEstimate(target, method, params, wallet, signers) { + const result = await this.relay(target, method, params, wallet, signers, true); + return result; +>>>>>>> 867e268f... Set relayer account to accounts[9] by default } getAllEstimateMethods() { diff --git a/utils/relay-manager.js b/utils/relay-manager.js index 648455d68..80d57ace7 100644 --- a/utils/relay-manager.js +++ b/utils/relay-manager.js @@ -1,5 +1,5 @@ const ethers = require("ethers"); -const { signOffchain, ETH_TOKEN, getNonceForRelay, getNetworkId } = require("./utilities.js"); +const { signOffchain, ETH_TOKEN, getNonceForRelay, getNetworkId, getAccount } = require("./utilities.js"); class RelayManager { setRelayerManager(relayerManager) { @@ -7,7 +7,7 @@ class RelayManager { } async relay(_module, _method, _params, _wallet, _signers, - _relayer = this.accounts[9].signer, + _relayerAccount, _estimate = false, _gasLimit = 2000000, _nonce, @@ -15,6 +15,7 @@ class RelayManager { _refundToken = ETH_TOKEN, _refundAddress = ethers.constants.AddressZero, _gasLimitRelay = (_gasLimit * 1.1)) { + const relayerAccount = _relayerAccount || await getAccount(9); const nonce = _nonce || await getNonceForRelay(); const methodData = _module.contract.interface.functions[_method].encode(_params); const networkId = await getNetworkId(); @@ -56,7 +57,7 @@ class RelayManager { _gasLimit, _refundToken, _refundAddress, - { gasLimit: _gasLimitRelay, gasPrice: _gasPrice, from: _relayer }, + { gasLimit: _gasLimitRelay, gasPrice: _gasPrice, from: relayerAccount }, ); const txReceipt = await _module.verboseWaitForTransaction(tx); return txReceipt; From 405f3e42b4f1cb82ddaa53b9bb8b044220a406fc Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Tue, 18 Aug 2020 13:14:02 +0300 Subject: [PATCH 027/113] Migrate to truffle encodeABI call syntax --- deployment/999_benchmark.js | 11 ----------- test/approvedTransfer.js | 11 ++++------- test/makerV2Manager_loan.js | 4 ++-- test/multisig.js | 6 +++--- test/recoveryManager.js | 2 +- test/relayer.js | 2 +- test/transferManager.js | 30 +++++++++++++++--------------- utils/multisigexecutor.js | 2 +- utils/relay-manager.js | 2 +- utils/utilities.js | 1 - 10 files changed, 28 insertions(+), 43 deletions(-) diff --git a/deployment/999_benchmark.js b/deployment/999_benchmark.js index 67a282715..621a135e3 100644 --- a/deployment/999_benchmark.js +++ b/deployment/999_benchmark.js @@ -559,20 +559,9 @@ class Benchmark { // //// utils //////// // /////////////////// -<<<<<<< HEAD async relay(target, method, params, wallet, signers) { const txReceipt = await this.testManager.relay(target, method, params, wallet, signers, this.accounts[9], false); return txReceipt.gasUsed.toString(); -======= - async relay(target, method, params, wallet, signers, estimate = false) { - const result = await this.testManager.relay(target, method, params, wallet, signers, accounts[9], estimate); - return result; - } - - async relayEstimate(target, method, params, wallet, signers) { - const result = await this.relay(target, method, params, wallet, signers, true); - return result; ->>>>>>> 867e268f... Set relayer account to accounts[9] by default } getAllEstimateMethods() { diff --git a/test/approvedTransfer.js b/test/approvedTransfer.js index f179cd872..87e0a5d83 100644 --- a/test/approvedTransfer.js +++ b/test/approvedTransfer.js @@ -141,7 +141,7 @@ contract("ApprovedTransfer", (accounts) => { async function callContract(_signers) { const before = await getBalance(contract.address); const newState = parseInt((await contract.state()).toString(), 10) + 1; - const dataToTransfer = contract.contract.interface.functions.setState.encode([newState]); + const dataToTransfer = contract.contract.methods.setState([newState]).encodeABI(); await manager.relay(approvedTransfer, "callContract", [wallet.address, contract.address, amountToTransfer, dataToTransfer], wallet, _signers); const after = await getBalance(contract.address); @@ -317,7 +317,7 @@ contract("ApprovedTransfer", (accounts) => { describe("Invalid Target", () => { async function expectFailingApproveTokenAndCallContract(target) { - const invalidData = contract.contract.interface.functions.setStateAndPayToken.encode([2, erc20.address, amountToApprove]); + const invalidData = contract.contract.methods.setStateAndPayToken([2, erc20.address, amountToApprove]).encodeABI(); const txReceipt = await manager.relay(approvedTransfer, "approveTokenAndCallContract", [wallet.address, erc20.address, wallet.address, amountToApprove, target.address, invalidData], wallet, [owner, ...sortWalletByAddress([guardian1, guardian2])]); @@ -339,9 +339,7 @@ contract("ApprovedTransfer", (accounts) => { const newState = parseInt((await contract.state()).toString(), 10) + 1; const token = _wrapEth ? weth : erc20; const fun = _consumerAddress === contract.address ? "setStateAndPayToken" : "setStateAndPayTokenWithConsumer"; - const data = contract.contract.interface.functions[fun].encode( - [newState, token.address, amountToApprove], - ); + const data = contract.contract.methods.fun([newState, token.address, amountToApprove]).encodeABI(); const before = await token.balanceOf(contract.address); const params = [wallet.address] .concat(_wrapEth ? [] : [erc20.address]) @@ -383,8 +381,7 @@ contract("ApprovedTransfer", (accounts) => { const allowanceBefore = await erc20.allowance(wallet.address, consumer); const balanceBefore = await erc20.balanceOf(contract.address); - const dataToTransfer = contract.contract.interface.functions - .setStateAndPayTokenWithConsumer.encode([2, erc20.address, amountToApprove]); + const dataToTransfer = contract.contract.methods.setStateAndPayTokenWithConsumer([2, erc20.address, amountToApprove]).encodeABI(); await manager.relay(approvedTransfer, "approveTokenAndCallContract", [wallet.address, erc20.address, consumer, amountToApprove, contract.address, dataToTransfer], wallet, [owner, ...sortWalletByAddress([guardian1, guardian2])]); diff --git a/test/makerV2Manager_loan.js b/test/makerV2Manager_loan.js index 7fd65ab5f..beedd1276 100644 --- a/test/makerV2Manager_loan.js +++ b/test/makerV2Manager_loan.js @@ -627,7 +627,7 @@ contract("MakerV2Loan", (accounts) => { it("should not allow reentrancy in acquireLoan", async () => { // Deploy a fake wallet capable of reentrancy - const acquireLoanCallData = makerV2.contract.interface.functions.acquireLoan.encode([AddressZero, bigNumToBytes32(ethers.BigNumber.from(0))]); + const acquireLoanCallData = makerV2.contract.methods.acquireLoan([AddressZero, bigNumToBytes32(ethers.BigNumber.from(0))]).encodeABI(); const fakeWallet = await FakeWallet.new(true, makerV2.address, 0, acquireLoanCallData); await fakeWallet.init(owner, [versionManager.address]); await versionManager.upgradeWallet(fakeWallet.address, await versionManager.lastVersion(), { from: owner }); @@ -768,7 +768,7 @@ contract("MakerV2Loan", (accounts) => { const lastVersion = await versionManager.lastVersion(); await versionManager.upgradeWallet(walletAddress, lastVersion, { gasLimit: 2000000, from: owner }); // Use the bad module to attempt a bad giveVault call - const callData = makerV2.contract.interface.functions.giveVault.encode([walletAddress, bigNumToBytes32(ethers.BigNumber.from(666))]); + const callData = makerV2.contract.methods.giveVault([walletAddress, bigNumToBytes32(ethers.BigNumber.from(666))]).encodeABI(); await assertRevert(badFeature.callContract(makerV2.address, 0, callData, { from: owner }), "MV2: unauthorized loanId"); }); }); diff --git a/test/multisig.js b/test/multisig.js index 8a9b44be6..c682f723b 100644 --- a/test/multisig.js +++ b/test/multisig.js @@ -57,7 +57,7 @@ contract("MultiSigWallet", (accounts) => { async function executeSendSuccess(signers) { let nonce = await multisig.nonce(); - const data = reg.contract.interface.functions.register.encode([number]); + const data = reg.contract.methods.register([number]).encodeABI(); const signedData = MultisigExecutor.signHash(multisig.address, reg.address, value, data, nonce.toNumber()); const signatures = await getSignatures(signedData, signers); @@ -79,7 +79,7 @@ contract("MultiSigWallet", (accounts) => { async function executeSendFailure(signers, nonceOffset, sortSigners, returnBadSignatures, errorMessage) { let nonce = await multisig.nonce(); nonce = nonce.toNumber() + nonceOffset; - const data = reg.contract.interface.functions.register.encode([number]); + const data = reg.contract.methods.register([number]).encodeABI(); const signedData = MultisigExecutor.signHash(multisig.address, reg.address, value, data, nonce); const signatures = await getSignatures(signedData, signers, sortSigners, returnBadSignatures); @@ -89,7 +89,7 @@ contract("MultiSigWallet", (accounts) => { async function getMultiSigParams(functioName, params) { const nonce = await multisig.nonce(); - const data = multisig.contract.interface.functions[functioName].encode([...params]); + const data = multisig.contract.methods[functioName]([...params]).encodeABI; const signedData = MultisigExecutor.signHash(multisig.address, multisig.address, 0, data, nonce.toNumber()); const signatures = await getSignatures(signedData, [owner1, owner2]); return { data, signatures }; diff --git a/test/recoveryManager.js b/test/recoveryManager.js index c4a8c0767..e8b24db91 100644 --- a/test/recoveryManager.js +++ b/test/recoveryManager.js @@ -470,7 +470,7 @@ contract("RecoveryManager", (accounts) => { it("should revert if an unknown method is executed", async () => { const nonce = await getNonceForRelay(); const chainId = await getNetworkId(); - let methodData = recoveryManager.contract.interface.functions.executeRecovery.encode([wallet.address, ethers.constants.AddressZero]); + let methodData = recoveryManager.contract.methods.executeRecovery([wallet.address, ethers.constants.AddressZero]).encodeABI(); // Replace the `executeRecovery` method signature: b0ba4da0 with a non-existent one: e0b6fcfc methodData = methodData.replace("b0ba4da0", "e0b6fcfc"); diff --git a/test/relayer.js b/test/relayer.js index 9ff571dcd..f6583f70d 100644 --- a/test/relayer.js +++ b/test/relayer.js @@ -217,7 +217,7 @@ contract("RelayerManager", (accounts) => { it("should fail when relaying to itself", async () => { const dataMethod = "setIntOwnerOnly"; const dataParam = [wallet.address, 2]; - const methodData = testFeature.contract.interface.functions[dataMethod].encode(dataParam); + const methodData = testFeature.contract.methods[dataMethod](dataParam).encodeABI(); const params = [ wallet.address, testFeature.address, diff --git a/test/transferManager.js b/test/transferManager.js index 82010d320..ce2d8794d 100644 --- a/test/transferManager.js +++ b/test/transferManager.js @@ -173,14 +173,14 @@ contract("TransferManager", (accounts) => { describe("Managing the whitelist", () => { it("should add/remove an account to/from the whitelist", async () => { - await transferModule.addToWhitelist(wallet.address, recipient, { from: owner }); - let isTrusted = await transferModule.isWhitelisted(wallet.address, recipient); + await transferManager.addToWhitelist(wallet.address, recipient, { from: owner }); + let isTrusted = await transferManager.isWhitelisted(wallet.address, recipient); assert.equal(isTrusted, false, "should not be trusted during the security period"); await increaseTime(3); isTrusted = await transferManager.isWhitelisted(wallet.address, recipient); assert.equal(isTrusted, true, "should be trusted after the security period"); - await transferModule.removeFromWhitelist(wallet.address, recipient, { from: owner }); - isTrusted = await transferModule.isWhitelisted(wallet.address, recipient); + await transferManager.removeFromWhitelist(wallet.address, recipient, { from: owner }); + isTrusted = await transferManager.isWhitelisted(wallet.address, recipient); assert.equal(isTrusted, false, "should no removed from whitelist immediately"); }); @@ -659,7 +659,7 @@ contract("TransferManager", (accounts) => { }); async function doCallContract({ value, state, relayed = false }) { - const dataToTransfer = contract.contract.interface.functions.setState.encode([state]); + const dataToTransfer = contract.contract.methods.setState([state]).encodeABI(); const unspentBefore = await transferManager.getDailyUnspent(wallet.address); const params = [wallet.address, contract.address, value, dataToTransfer]; let txReceipt; @@ -679,19 +679,19 @@ contract("TransferManager", (accounts) => { } it("should not be able to call the wallet itselt", async () => { - const dataToTransfer = contract.contract.interface.functions.setState.encode([4]); + const dataToTransfer = contract.contract.methods.setState([4]).encodeABI(); const params = [wallet.address, wallet.address, 10, dataToTransfer]; await utils.assertRevert(transferManager.callContract(...params, { from: owner }), "BT: Forbidden contract"); }); it("should not be able to call a feature of the wallet", async () => { - const dataToTransfer = contract.contract.interface.functions.setState.encode([4]); + const dataToTransfer = contract.contract.methods.setState([4]).encodeABI(); const params = [wallet.address, transferManager.address, 10, dataToTransfer]; await utils.assertRevert(transferManager.callContract(...params, { from: owner }), "BT: Forbidden contract"); }); it("should not be able to call a supported ERC20 token contract", async () => { - const dataToTransfer = contract.contract.interface.functions.setState.encode([4]); + const dataToTransfer = contract.contract.methods.setState([4]).encodeABI(); const params = [wallet.address, erc20.address, 10, dataToTransfer]; await utils.assertRevert(transferManager.callContract(...params, { from: owner }), "TM: Forbidden contract"); }); @@ -699,7 +699,7 @@ contract("TransferManager", (accounts) => { it("should be able to call a supported token contract which is whitelisted", async () => { await transferManager.addToWhitelist(wallet.address, erc20.address, { from: owner }); await increaseTime(3); - const dataToTransfer = erc20.contract.interface.functions.transfer.encode([infrastructure, 4]); + const dataToTransfer = erc20.contract.methods.transfer([infrastructure, 4]).encodeABI(); const params = [wallet.address, erc20.address, 0, dataToTransfer]; await transferManager.callContract(...params, { from: owner }); }); @@ -736,7 +736,7 @@ contract("TransferManager", (accounts) => { }) { const fun = consumer === contract.address ? "setStateAndPayToken" : "setStateAndPayTokenWithConsumer"; const token = wrapEth ? weth : erc20; - const dataToTransfer = contract.contract.interface.functions[fun].encode([state, token.address, amount]); + const dataToTransfer = contract.contract.methods.fun([state, token.address, amount]).encodeABI(); const unspentBefore = await transferManager.getDailyUnspent(wallet.address); const params = [wallet.address] .concat(wrapEth ? [] : [erc20.address]) @@ -774,7 +774,7 @@ contract("TransferManager", (accounts) => { it("should restore existing approved amount after call", async () => { await transferManager.approveToken(wallet.address, erc20.address, contract.address, 10, { from: owner }); - const dataToTransfer = contract.contract.interface.functions.setStateAndPayToken.encode([3, erc20.address, 5]); + const dataToTransfer = contract.contract.methods.setStateAndPayToken([3, erc20.address, 5]).encodeABI(); await transferManager.approveTokenAndCallContract( wallet.address, erc20.address, @@ -795,7 +795,7 @@ contract("TransferManager", (accounts) => { it("should be able to spend less than approved in call", async () => { await transferManager.approveToken(wallet.address, erc20.address, contract.address, 10, { from: owner }); - const dataToTransfer = contract.contract.interface.functions.setStateAndPayToken.encode([3, erc20.address, 4]); + const dataToTransfer = contract.contract.methods.setStateAndPayToken([3, erc20.address, 4]).encodeABI(); await transferManager.approveTokenAndCallContract( wallet.address, erc20.address, @@ -815,7 +815,7 @@ contract("TransferManager", (accounts) => { it("should not be able to spend more than approved in call", async () => { await transferManager.approveToken(wallet.address, erc20.address, contract.address, 10, { from: owner }); - const dataToTransfer = contract.contract.interface.functions.setStateAndPayToken.encode([3, erc20.address, 6]); + const dataToTransfer = contract.contract.methods.setStateAndPayToken([3, erc20.address, 6]).encodeABI(); await utils.assertRevert(transferManager.approveTokenAndCallContract( wallet.address, erc20.address, @@ -850,7 +850,7 @@ contract("TransferManager", (accounts) => { const consumer = await contract.tokenConsumer(); await transferManager.addToWhitelist(wallet.address, consumer, { from: owner }); await increaseTime(3); - const dataToTransfer = contract.contract.interface.functions.setStateAndPayTokenWithConsumer.encode([6, erc20.address, amount]); + const dataToTransfer = contract.contract.methods.setStateAndPayTokenWithConsumer([6, erc20.address, amount]).encodeABI(); await utils.assertRevert( transferManager.approveTokenAndCallContract( wallet.address, erc20.address, consumer, amount, contract.address, dataToTransfer, { from: owner } @@ -870,7 +870,7 @@ contract("TransferManager", (accounts) => { it("should fail to approve token if the amount to be approved is greater than the current balance", async () => { const startingBalance = await erc20.balanceOf(wallet.address); await erc20.burn(wallet.address, startingBalance); - const dataToTransfer = contract.contract.interface.functions.setStateAndPayToken.encode([3, erc20.address, 1]); + const dataToTransfer = contract.contract.methods.setStateAndPayToken([3, erc20.address, 1]).encodeABI(); await utils.assertRevert(transferManager.approveTokenAndCallContract( wallet.address, erc20.address, diff --git a/utils/multisigexecutor.js b/utils/multisigexecutor.js index e628d540b..543c05d92 100644 --- a/utils/multisigexecutor.js +++ b/utils/multisigexecutor.js @@ -15,7 +15,7 @@ class MultisigExecutor { const { contractAddress } = contractWrapper; // Encode the method call with its parameters - const data = contractWrapper.contract.interface.functions[method].encode(params); + const data = contractWrapper.contract.methods[method](params).encodeABI(); // Get the nonce const nonce = (await this._multisigWrapper.contract.nonce()).toNumber(); diff --git a/utils/relay-manager.js b/utils/relay-manager.js index 80d57ace7..e78a3f6b2 100644 --- a/utils/relay-manager.js +++ b/utils/relay-manager.js @@ -17,7 +17,7 @@ class RelayManager { _gasLimitRelay = (_gasLimit * 1.1)) { const relayerAccount = _relayerAccount || await getAccount(9); const nonce = _nonce || await getNonceForRelay(); - const methodData = _module.contract.interface.functions[_method].encode(_params); + const methodData = _module.contract.methods[_method](_params).encodeABI(); const networkId = await getNetworkId(); const signatures = await signOffchain( _signers, diff --git a/utils/utilities.js b/utils/utilities.js index 4c858493e..118556f6f 100644 --- a/utils/utilities.js +++ b/utils/utilities.js @@ -168,7 +168,6 @@ module.exports = { async increaseTime(seconds) { const networkId = await web3.eth.net.getId(); - console.log("networkId", networkId); if (networkId === "1597649375983") { await web3.currentProvider.send("evm_increaseTime", seconds); From 9a0c8c4925c3e4e04d9e603bc9166ea5fbedb8d3 Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Tue, 18 Aug 2020 15:23:40 +0300 Subject: [PATCH 028/113] Set network id in ganache-cli run --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 44cc9ff37..d02b65917 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "compile:test": "npx truffle compile --config truffle-config-contracts-test.js", "compile": "npm run compile:infrastructure && npm run compile:modules && npm run compile:wallet", "cc": "rm -rf build && rm -rf build-legacy && npm run compile:lib && npm run compile && npm run compile:legacy && npm run compile:test", - "ganache": "npx ganache-cli --gasLimit=20700000 -e 10000 --acctKeys=\"./ganache-accounts.json\" --account=\"0x7ab741b57e8d94dd7e1a29055646bafde7010f38a900f55bbd7647880faa6ee8, 100000000000000000000\" --account=\"0x2030b463177db2da82908ef90fa55ddfcef56e8183caf60db464bc398e736e6f, 100000000000000000000\" --account=\"0x62ecd49c4ccb41a70ad46532aed63cf815de15864bc415c87d507afd6a5e8da2, 100000000000000000000\" --account=\"0xf473040b1a83739a9c7cc1f5719fab0f5bf178f83314d98557c58aae1910e03a, 100000000000000000000\" --account=\"0x823d590ed2cb5e8493bb0efc834771c1cde36f9fc49b9fe3620ebd0754ad6ea2, 100000000000000000000\" --account=\"0xd6d710943471e4c37ceb787857e7a2b41ca57f9cb4307ee9a9b21436a8e709c3, 100000000000000000000\" --account=\"0x187bb12e927c1652377405f81d93ce948a593f7d66cfba383ee761858b05921a, 100000000000000000000\" --account=\"0xf41486fdb04505e7966c8720a353ed92ce0d6830f8a5e915fbde735106a06d25, 100000000000000000000\" --account=\"0x6ca40ba4cca775643398385022264c0c414da1abd21d08d9e7136796a520a543, 100000000000000000000\" --account=\"0xfac0bc9325ad342033afe956e83f0bf8f1e863c1c3e956bc75d66961fe4cd186, 100000000000000000000\"", + "ganache": "npx ganache-cli --networkId 1597649375983 --gasLimit=20700000 -e 10000 --acctKeys=\"./ganache-accounts.json\" --account=\"0x7ab741b57e8d94dd7e1a29055646bafde7010f38a900f55bbd7647880faa6ee8, 100000000000000000000\" --account=\"0x2030b463177db2da82908ef90fa55ddfcef56e8183caf60db464bc398e736e6f, 100000000000000000000\" --account=\"0x62ecd49c4ccb41a70ad46532aed63cf815de15864bc415c87d507afd6a5e8da2, 100000000000000000000\" --account=\"0xf473040b1a83739a9c7cc1f5719fab0f5bf178f83314d98557c58aae1910e03a, 100000000000000000000\" --account=\"0x823d590ed2cb5e8493bb0efc834771c1cde36f9fc49b9fe3620ebd0754ad6ea2, 100000000000000000000\" --account=\"0xd6d710943471e4c37ceb787857e7a2b41ca57f9cb4307ee9a9b21436a8e709c3, 100000000000000000000\" --account=\"0x187bb12e927c1652377405f81d93ce948a593f7d66cfba383ee761858b05921a, 100000000000000000000\" --account=\"0xf41486fdb04505e7966c8720a353ed92ce0d6830f8a5e915fbde735106a06d25, 100000000000000000000\" --account=\"0x6ca40ba4cca775643398385022264c0c414da1abd21d08d9e7136796a520a543, 100000000000000000000\" --account=\"0xfac0bc9325ad342033afe956e83f0bf8f1e863c1c3e956bc75d66961fe4cd186, 100000000000000000000\"", "kovan-fork": "npx ganache-cli -i 42 -l 20700000 -f https://kovan.infura.io/v3/$(cat .env | sed -En 's/INFURA_KEY=''\"''([^''\"'']+)''\"''/\\1/p')@16988040", "kovan-fork-latest": "npx ganache-cli -i 42 -l 20700000 -f https://kovan.infura.io/v3/$(cat .env | sed -En 's/INFURA_KEY=''\"''([^''\"'']+)''\"''/\\1/p')", "test": "npx truffle test", From a3dfe4a93790b0b9a7d81709f86b1b87909b490d Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Tue, 18 Aug 2020 15:24:21 +0300 Subject: [PATCH 029/113] Fix reading events off transaction receipt to comply with truffle [skip ci] --- test/compoundManager_invest.js | 8 ++++---- test/compoundManager_loan.js | 12 ++++++------ test/factory.js | 8 ++++---- test/relayer.js | 2 +- test/transferManager.js | 34 ++++++++++++++-------------------- utils/relay-manager.js | 3 +-- utils/utilities.js | 11 ++++------- 7 files changed, 34 insertions(+), 44 deletions(-) diff --git a/test/compoundManager_invest.js b/test/compoundManager_invest.js index 26cbc0dcc..ea307db82 100644 --- a/test/compoundManager_invest.js +++ b/test/compoundManager_invest.js @@ -174,12 +174,12 @@ contract("Invest Manager with Compound", (accounts) => { await cToken.mint(parseEther("20"), { from: borrower }); tx = await cEther.borrow(parseEther("0.1"), { from: borrower }); txReceipt = await cEther.verboseWaitForTransaction(tx); - assert.isTrue(await utils.hasEvent(txReceipt, cEther, "Borrow"), "should have generated Borrow event"); + await utils.hasEvent(txReceipt, "Borrow"); } else { await cEther.mint({ value: parseEther("2"), from: borrower }); tx = await cToken.borrow(parseEther("0.1"), { from: borrower }); txReceipt = await cToken.verboseWaitForTransaction(tx); - assert.isTrue(await utils.hasEvent(txReceipt, cToken, "Borrow"), "should have generated Borrow event"); + await utils.hasEvent(txReceipt, "Borrow"); } // increase time to accumulate interests await increaseTime(3600 * 24 * days); @@ -205,7 +205,7 @@ contract("Invest Manager with Compound", (accounts) => { txReceipt = await investManager.verboseWaitForTransaction(tx); } - assert.isTrue(await utils.hasEvent(txReceipt, investManager, "InvestmentAdded"), "should have generated InvestmentAdded event"); + await utils.hasEvent(txReceipt, "InvestmentAdded"); await accrueInterests(days, investInEth); @@ -230,7 +230,7 @@ contract("Invest Manager with Compound", (accounts) => { tx = await investManager.removeInvestment(...params, { from: owner }); txReceipt = await investManager.verboseWaitForTransaction(tx); } - assert.isTrue(await utils.hasEvent(txReceipt, investManager, "InvestmentRemoved"), "should have generated InvestmentRemoved event"); + await utils.hasEvent(txReceipt, "InvestmentRemoved"); const after = investInEth ? await cEther.balanceOf(wallet.address) : await cToken.balanceOf(wallet.address); assert.isTrue(after.eq(Math.ceil((before * (10000 - fraction)) / 10000)), "should have removed the correct fraction"); diff --git a/test/compoundManager_loan.js b/test/compoundManager_loan.js index 1dbd93de2..df92aef72 100644 --- a/test/compoundManager_loan.js +++ b/test/compoundManager_loan.js @@ -199,7 +199,7 @@ contract("Loan Module", (accounts) => { const tx = await loanManager.openLoan(...params, { from: owner }); txReceipt = await loanManager.verboseWaitForTransaction(tx); } - assert.isTrue(await utils.hasEvent(txReceipt, loanManager, "LoanOpened"), "should have generated LoanOpened event"); + await utils.hasEvent(txReceipt, "LoanOpened"); const loanId = (await utils.parseLogs(txReceipt, loanManager, "LoanOpened"))[0]._loanId; assert.isDefined(loanId, "Loan ID should be defined"); @@ -237,11 +237,11 @@ contract("Loan Module", (accounts) => { const collateralBalanceAfter = (collateral === ETH_TOKEN) ? await getBalance(wallet.address) : await collateral.balanceOf(wallet.address); if (add) { - assert.isTrue(await utils.hasEvent(txReceipt, loanManager, "CollateralAdded"), "should have generated CollateralAdded event"); + await utils.hasEvent(txReceipt, "CollateralAdded"); assert.isTrue(collateralBalanceAfter.eq(collateralBalanceBefore.sub(amount)), `wallet collateral should have decreased by ${amount} (relayed: ${relayed})`); } else { - assert.isTrue(await utils.hasEvent(txReceipt, loanManager, "CollateralRemoved"), "should have generated CollateralRemoved event"); + await utils.hasEvent(txReceipt, "CollateralRemoved"); assert.isTrue(collateralBalanceAfter.eq(collateralBalanceBefore.add(amount)), `wallet collateral should have invcreased by ${amount} (relayed: ${relayed})`); } @@ -269,10 +269,10 @@ contract("Loan Module", (accounts) => { const debtBalanceAfter = (debtToken === ETH_TOKEN) ? await getBalance(wallet.address) : await debtToken.balanceOf(wallet.address); if (add) { - assert.isTrue(await utils.hasEvent(txReceipt, loanManager, "DebtAdded"), "should have generated DebtAdded event"); + await utils.hasEvent(txReceipt, "DebtAdded"); assert.isTrue(debtBalanceAfter.eq(debtBalanceBefore.add(amount)), `wallet debt should have increase by ${amount} (relayed: ${relayed})`); } else { - assert.isTrue(await utils.hasEvent(txReceipt, loanManager, "DebtRemoved"), "should have generated DebtRemoved event"); + await utils.hasEvent(txReceipt, "DebtRemoved"); assert.isTrue( debtBalanceAfter.eq(debtBalanceBefore.sub(amount)) || amount.eq(ethers.constants.MaxUint256), `wallet debt should have decreased by ${amount} (relayed: ${relayed})`, @@ -607,7 +607,7 @@ contract("Loan Module", (accounts) => { const tx = await loanManager[method](...params, { from: owner }); txReceipt = await loanManager.verboseWaitForTransaction(tx); } - assert.isTrue(await utils.hasEvent(txReceipt, loanManager, "LoanClosed"), "should have generated LoanClosed event"); + await utils.hasEvent(txReceipt, "LoanClosed"); const marketsAfter = await comptroller.getAssetsIn(wallet.address); assert.isTrue(marketsAfter.length === marketsBefore.length - debtMarkets, `should have exited ${debtMarkets} market (relayed: ${relayed})`); diff --git a/test/factory.js b/test/factory.js index 8554cd8c1..199158318 100644 --- a/test/factory.js +++ b/test/factory.js @@ -318,18 +318,18 @@ contract("WalletFactory", (accounts) => { it("should emit and event when the balance is non zero at creation", async () => { const salt = utils.generateSaltValue(); - const amount = ethers.BigNumber.from("10000000000000"); + const amount = 10000000000000; // we get the future address const futureAddr = await factory.getAddressForCounterfactualWallet(owner, versionManager.address, guardian, salt, 1); // We send ETH to the address - await futureAddr.send(amount); + await web3.eth.sendTransaction({ from: accounts[0], to: futureAddr, value: amount }); // we create the wallet const tx = await factory.createCounterfactualWallet( owner, versionManager.address, guardian, salt, 1, ); - const txReceipt = await factory.verboseWaitForTransaction(tx); + const txReceipt = tx.receipt; const wallet = await BaseWallet.at(futureAddr); - assert.isTrue(await utils.hasEvent(txReceipt, wallet, "Received"), "should have generated Received event"); + await utils.hasEvent(txReceipt, "Received"); const log = await utils.parseLogs(txReceipt, wallet, "Received"); assert.equal(log[0].value.toNumber(), amount, "should log the correct amount"); assert.equal(log[0].sender, "0x0000000000000000000000000000000000000000", "sender should be address(0)"); diff --git a/test/relayer.js b/test/relayer.js index f6583f70d..2d6ea7146 100644 --- a/test/relayer.js +++ b/test/relayer.js @@ -314,7 +314,7 @@ contract("RelayerManager", (accounts) => { it("should emit the Refund event", async () => { await provisionFunds(ethers.BigNumber.from("100000000000"), 0); const txReceipt = await callAndRefund({ refundToken: ETH_TOKEN }); - assert.isTrue(await hasEvent(txReceipt, relayerManager, "Refund"), "should have generated Refund event"); + await hasEvent(txReceipt, "Refund"); }); it("should fail the transaction when when there is not enough ETH for the refund", async () => { diff --git a/test/transferManager.js b/test/transferManager.js index ce2d8794d..b91665a47 100644 --- a/test/transferManager.js +++ b/test/transferManager.js @@ -326,8 +326,7 @@ contract("TransferManager", (accounts) => { it("should correctly set the pending limit", async () => { const tx = await transferManager.changeLimit(wallet.address, 4000000, { from: owner }); - const txReceipt = await transferManager.verboseWaitForTransaction(tx); - const timestamp = await manager.getTimestamp(txReceipt.block); + const timestamp = await manager.getTimestamp(tx.receipt.block); const { _pendingLimit, _changeAfter } = await transferManager.getPendingLimit(wallet.address); assert.equal(_pendingLimit.toNumber(), 4000000); assert.closeTo(_changeAfter.toNumber(), timestamp + SECURITY_PERIOD, 1); // timestamp is sometimes off by 1 @@ -356,8 +355,7 @@ contract("TransferManager", (accounts) => { await wallet.send(ethers.BigNumber.from(ETH_LIMIT)); // Transfer 100 wei const tx = await transferManager.transferToken(wallet.address, ETH_TOKEN, recipient, 100, ZERO_BYTES32, { from: owner }); - const txReceipt = await transferManager.verboseWaitForTransaction(tx); - const timestamp = await manager.getTimestamp(txReceipt.block); + const timestamp = await manager.getTimestamp(tx.receipt.block); // Then transfer 200 wei more await transferManager.transferToken(wallet.address, ETH_TOKEN, recipient, 200, ZERO_BYTES32, { from: owner }); @@ -388,8 +386,8 @@ contract("TransferManager", (accounts) => { const tx = await transferManager.transferToken(...params, { from: signer }); txReceipt = await transferManager.verboseWaitForTransaction(tx); } - assert.isTrue(await utils.hasEvent(txReceipt, transferManager, "Transfer"), "should have generated Transfer event"); - const fundsAfter = (token === ETH_TOKEN ? await utils.getBalance(to) : await token.balanceOf(to)); + await utils.hasEvent(txReceipt, "Transfer"); + const fundsAfter = (token === ETH_TOKEN ? await to.getBalance() : await token.balanceOf(to.address)); const unspentAfter = await transferManager.getDailyUnspent(wallet.address); assert.equal(fundsAfter.sub(fundsBefore).toNumber(), amount, "should have transfered amount"); const ethValue = (token === ETH_TOKEN ? amount : (await getEtherValue(amount, token.address)).toNumber()); @@ -413,8 +411,7 @@ contract("TransferManager", (accounts) => { tx = await transferManager.transferToken(...params, { from: owner }); txReceipt = await transferManager.verboseWaitForTransaction(tx); } - - assert.isTrue(await utils.hasEvent(txReceipt, transferManager, "PendingTransferCreated"), "should have generated PendingTransferCreated event"); + await utils.hasEvent(txReceipt, "PendingTransferCreated"); let fundsAfter = (token === ETH_TOKEN ? await utils.getBalance(to.address) : await token.balanceOf(to.address)); assert.equal(fundsAfter.sub(fundsBefore).toNumber(), 0, "should not have transfered amount"); if (delay === 0) { @@ -426,8 +423,7 @@ contract("TransferManager", (accounts) => { tx = await transferManager.executePendingTransfer(wallet.address, tokenAddress, recipient, amount, ZERO_BYTES32, txReceipt.blockNumber); txReceipt = await transferManager.verboseWaitForTransaction(tx); - assert.isTrue(await utils.hasEvent(txReceipt, transferManager, "PendingTransferExecuted"), - "should have generated PendingTransferExecuted event"); + await utils.hasEvent(txReceipt, "PendingTransferExecuted"); fundsAfter = (token === ETH_TOKEN ? await utils.getBalance(to.address) : await token.balanceOf(to.address)); return assert.equal(fundsAfter.sub(fundsBefore).toNumber(), amount, "should have transfered amount"); } @@ -554,8 +550,7 @@ contract("TransferManager", (accounts) => { await increaseTime(1); const tx = await transferManager.cancelPendingTransfer(wallet.address, id, { from: owner }); const txReceipt = await transferManager.verboseWaitForTransaction(tx); - assert.isTrue(await utils.hasEvent(txReceipt, transferManager, "PendingTransferCanceled"), - "should have generated PendingTransferCanceled event"); + await utils.hasEvent(txReceipt, "PendingTransferCanceled"); const executeAfter = await transferManager.getPendingTransfer(wallet.address, id); assert.equal(executeAfter, 0, "should have cancelled the pending transfer"); }); @@ -567,8 +562,7 @@ contract("TransferManager", (accounts) => { await increaseTime(1); const tx = await transferManager.cancelPendingTransfer(wallet.address, id, { from: owner }); const txReceipt = await transferManager.verboseWaitForTransaction(tx); - assert.isTrue(await utils.hasEvent(txReceipt, transferManager, "PendingTransferCanceled"), - "should have generated PendingTransferCanceled event"); + await utils.hasEvent(txReceipt, "PendingTransferCanceled"); const executeAfter = await transferManager.getPendingTransfer(wallet.address, id); assert.equal(executeAfter, 0, "should have cancelled the pending transfer"); }); @@ -596,9 +590,9 @@ contract("TransferManager", (accounts) => { txReceipt = await manager.relay(transferManager, "approveToken", params, wallet, [signer]); } else { const tx = await transferManager.approveToken(...params, { from: signer }); - txReceipt = await transferManager.verboseWaitForTransaction(tx); + txReceipt = tx.receipt; } - assert.isTrue(await utils.hasEvent(txReceipt, transferManager, "Approved"), "should have generated Approved event"); + await utils.hasEvent(txReceipt, "Approved"); const unspentAfter = await transferManager.getDailyUnspent(wallet.address); const amountInEth = await getEtherValue(amount, erc20.address); @@ -667,9 +661,9 @@ contract("TransferManager", (accounts) => { txReceipt = await manager.relay(transferManager, "callContract", params, wallet, [owner]); } else { const tx = await transferManager.callContract(...params, { from: owner }); - txReceipt = await transferManager.verboseWaitForTransaction(tx); + txReceipt = tx.receipt; } - assert.isTrue(await utils.hasEvent(txReceipt, transferManager, "CalledContract"), "should have generated CalledContract event"); + await utils.hasEvent(txReceipt, "CalledContract"); const unspentAfter = await transferManager.getDailyUnspent(wallet.address); if (value < ETH_LIMIT) { assert.equal(unspentBefore[0].sub(unspentAfter[0]).toNumber(), value, "should have updated the daily limit"); @@ -747,9 +741,9 @@ contract("TransferManager", (accounts) => { txReceipt = await manager.relay(transferManager, method, params, wallet, [signer]); } else { const tx = await transferManager[method](...params, { from: signer }); - txReceipt = await transferManager.verboseWaitForTransaction(tx); + txReceipt = tx.receipt; } - assert.isTrue(await utils.hasEvent(txReceipt, transferManager, "ApprovedAndCalledContract"), "should have generated CalledContract event"); + await utils.hasEvent(txReceipt, "ApprovedAndCalledContract"); const unspentAfter = await transferManager.getDailyUnspent(wallet.address); const amountInEth = wrapEth ? amount : await getEtherValue(amount, erc20.address); diff --git a/utils/relay-manager.js b/utils/relay-manager.js index e78a3f6b2..e55ac4ae8 100644 --- a/utils/relay-manager.js +++ b/utils/relay-manager.js @@ -59,8 +59,7 @@ class RelayManager { _refundAddress, { gasLimit: _gasLimitRelay, gasPrice: _gasPrice, from: relayerAccount }, ); - const txReceipt = await _module.verboseWaitForTransaction(tx); - return txReceipt; + return tx.receipt; } } diff --git a/utils/utilities.js b/utils/utilities.js index 118556f6f..1f2485496 100644 --- a/utils/utilities.js +++ b/utils/utilities.js @@ -102,12 +102,9 @@ module.exports = { return res; }, - hasEvent(txReceipt, contract, eventName) { - return txReceipt.logs.find((e) => ( - e.topics.find((t) => ( - contract.interface.events[eventName].topic === t - )) !== undefined - )) !== undefined; + async hasEvent(txReceipt, eventName) { + const event = txReceipt.logs.find((e) => e.event === eventName); + return expect(event, "Event does not exist in recept").to.exist; }, versionFingerprint(modules) { @@ -189,7 +186,7 @@ module.exports = { let reason; try { await promise; - assert.fail("Transaction succeeded, but expected error ${revertMessage}`"); + assert.fail(`Transaction succeeded, but expected error ${revertMessage}`); } catch (err) { ({ reason } = err); assert.equal(reason, revertMessage); From c02901041a027f3b3a5e1ec1130517da84712d68 Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Fri, 28 Aug 2020 11:25:46 +0300 Subject: [PATCH 030/113] Add fs package for reading the file system Used to read the ganache accounts file when generating signatures offchain --- package-lock.json | 5 +++++ package.json | 1 + 2 files changed, 6 insertions(+) diff --git a/package-lock.json b/package-lock.json index 5fcf56b2f..cac5ec976 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3028,6 +3028,11 @@ "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" }, + "fs": { + "version": "0.0.1-security", + "resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz", + "integrity": "sha1-invTcYa23d84E/I4WLV+yq9eQdQ=" + }, "fs-extra": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", diff --git a/package.json b/package.json index d02b65917..6ad868d37 100644 --- a/package.json +++ b/package.json @@ -71,6 +71,7 @@ "dotenv": "^6.2.0", "etherlime-lib": "1.1.3", "ethers": "^5.0.7", + "fs": "0.0.1-security", "ganache-cli": "^6.9.1", "husky": "^4.2.3", "inquirer": "^7.0.0", From 9df24397b0cd007bcc6c9cd96defb777e6e50d8c Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Fri, 28 Aug 2020 11:30:02 +0300 Subject: [PATCH 031/113] Convert the offchain signing logic in test utils --- utils/relay-manager.js | 2 +- utils/utilities.js | 22 +++++++++++++--------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/utils/relay-manager.js b/utils/relay-manager.js index e55ac4ae8..3214df93e 100644 --- a/utils/relay-manager.js +++ b/utils/relay-manager.js @@ -17,7 +17,7 @@ class RelayManager { _gasLimitRelay = (_gasLimit * 1.1)) { const relayerAccount = _relayerAccount || await getAccount(9); const nonce = _nonce || await getNonceForRelay(); - const methodData = _module.contract.methods[_method](_params).encodeABI(); + const methodData = _module.contract.methods[_method](..._params).encodeABI(); const networkId = await getNetworkId(); const signatures = await signOffchain( _signers, diff --git a/utils/utilities.js b/utils/utilities.js index 1f2485496..5a21e3749 100644 --- a/utils/utilities.js +++ b/utils/utilities.js @@ -1,5 +1,7 @@ const readline = require("readline"); const ethers = require("ethers"); +const ethUtil = require('ethereumjs-util'); +const fs = require('fs'); const ETH_TOKEN = "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"; @@ -48,16 +50,18 @@ module.exports = { refundToken, refundAddress, ].map((hex) => hex.slice(2)).join("")}`; - - const signedData = ethers.utils.keccak256(input); - - const tasks = signers.map((signer) => signer.signMessage(ethers.utils.arrayify(signedData))); - const signatures = await Promise.all(tasks); - const sigs = `0x${signatures.map((signature) => { + + var dataBuff = ethUtil.toBuffer(ethers.utils.keccak256(input)); + var msgHashBuff = ethUtil.hashPersonalMessage(dataBuff); + + const accountsJson = JSON.parse(fs.readFileSync("./ganache-accounts.json", "utf8")); + const sigs = `0x${signers.map((signer) => { + const pkey = accountsJson.private_keys[signer.toLowerCase()]; + const sig = ethUtil.ecsign(msgHashBuff, Buffer.from(pkey, "hex")); + const signature = ethUtil.toRpcSig(sig.v, sig.r, sig.s); const split = ethers.utils.splitSignature(signature); return ethers.utils.joinSignature(split).slice(2); }).join("")}`; - return sigs; }, @@ -66,7 +70,7 @@ module.exports = { const bn1 = ethers.BigNumber.from(s1); const bn2 = ethers.BigNumber.from(s2); if (bn1.lt(bn2)) return -1; - if (bn1.gt(bn2)) return 1; + if (bn1.gt(bn2)) return 1; return 0; }); }, @@ -146,7 +150,7 @@ module.exports = { async getBalance(account) { const balance = await web3.eth.getBalance(account); - return balance; + return new ethers.BigNumber.from(balance); }, async getTimestamp(blockNumber) { From 540567cce1e83f1f844a8b1ba8d041411abf28b2 Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Fri, 28 Aug 2020 12:40:41 +0300 Subject: [PATCH 032/113] Fix linting issues --- deployment/999_benchmark.js | 2 +- package-lock.json | 39 ++++++++++++++++++++++++------------- package.json | 1 + test/approvedTransfer.js | 17 ++++++---------- test/baseWallet.js | 15 +++++++------- test/transferManager.js | 4 ++-- utils/utilities.js | 17 +++++++++------- 7 files changed, 53 insertions(+), 42 deletions(-) diff --git a/deployment/999_benchmark.js b/deployment/999_benchmark.js index 621a135e3..dcc561abd 100644 --- a/deployment/999_benchmark.js +++ b/deployment/999_benchmark.js @@ -1,5 +1,5 @@ /* eslint max-classes-per-file: ["error", 2] */ -/* global artifacts */ +/* global artifacts, accounts */ const ethers = require("ethers"); const Table = require("cli-table2"); const tinyreq = require("tinyreq"); diff --git a/package-lock.json b/package-lock.json index cac5ec976..c166fdfd0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2590,27 +2590,40 @@ "requires": { "ethereumjs-common": "^1.5.0", "ethereumjs-util": "^6.0.0" + }, + "dependencies": { + "bn.js": { + "version": "4.11.9", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" + }, + "ethereumjs-util": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz", + "integrity": "sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw==", + "requires": { + "@types/bn.js": "^4.11.3", + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "elliptic": "^6.5.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "0.1.6", + "rlp": "^2.2.3" + } + } } }, "ethereumjs-util": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz", - "integrity": "sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw==", + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.0.4.tgz", + "integrity": "sha512-isldtbCn9fdnhBPxedMNbFkNWVZ8ZdQvKRDSrdflame/AycAPKMer+vEpndpBxYIB3qxN6bd3Gh1YCQW9LDkCQ==", "requires": { "@types/bn.js": "^4.11.3", - "bn.js": "^4.11.0", + "bn.js": "^5.1.2", "create-hash": "^1.1.2", - "elliptic": "^6.5.2", "ethereum-cryptography": "^0.1.3", "ethjs-util": "0.1.6", - "rlp": "^2.2.3" - }, - "dependencies": { - "bn.js": { - "version": "4.11.9", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" - } + "rlp": "^2.2.4" } }, "etherlime-config": { diff --git a/package.json b/package.json index 6ad868d37..994ad5161 100644 --- a/package.json +++ b/package.json @@ -69,6 +69,7 @@ "chai": "^4.2.0", "cli-table2": "^0.2.0", "dotenv": "^6.2.0", + "ethereumjs-util": "^7.0.4", "etherlime-lib": "1.1.3", "ethers": "^5.0.7", "fs": "0.0.1-security", diff --git a/test/approvedTransfer.js b/test/approvedTransfer.js index 87e0a5d83..4938379fa 100644 --- a/test/approvedTransfer.js +++ b/test/approvedTransfer.js @@ -89,7 +89,7 @@ contract("ApprovedTransfer", (accounts) => { beforeEach(async () => { const proxy = await Proxy.new(walletImplementation.address); - wallet = BaseWallet.at(proxy.address); + wallet = await BaseWallet.at(proxy.address); await wallet.init(owner, [versionManager.address]); await versionManager.from(owner).upgradeWallet(wallet.address, await versionManager.lastVersion()); @@ -101,18 +101,13 @@ contract("ApprovedTransfer", (accounts) => { async function addGuardians(guardians) { // guardians can be BaseWallet or ContractWrapper objects - const guardianAddresses = guardians.map((guardian) => { - if (guardian) return guardian; - return guardian.address; - }); - - for (const address of guardianAddresses) { + for (const address of guardians) { await guardianManager.addGuardian(wallet.address, address, { from: owner }); } await increaseTime(30); - for (let i = 1; i < guardianAddresses.length; i += 1) { - await guardianManager.confirmGuardianAddition(wallet.address, guardianAddresses[i]); + for (let i = 1; i < guardians.length; i += 1) { + await guardianManager.confirmGuardianAddition(wallet.address, guardians[i]); } const count = (await guardianManager.guardianCount(wallet.address)).toNumber(); assert.equal(count, guardians.length, `${guardians.length} guardians should be added`); @@ -123,7 +118,7 @@ contract("ApprovedTransfer", (accounts) => { for (const g of guardians) { const guardianWallet = await BaseWallet.new(); await guardianWallet.init(g, [versionManager.address]); - await versionManager.from(g).upgradeWallet(guardianWallet.address, await versionManager.lastVersion()); + await versionManager.upgradeWallet(guardianWallet.address, await versionManager.lastVersion(), { from: g }); wallets.push(guardianWallet); } return wallets; @@ -339,7 +334,7 @@ contract("ApprovedTransfer", (accounts) => { const newState = parseInt((await contract.state()).toString(), 10) + 1; const token = _wrapEth ? weth : erc20; const fun = _consumerAddress === contract.address ? "setStateAndPayToken" : "setStateAndPayTokenWithConsumer"; - const data = contract.contract.methods.fun([newState, token.address, amountToApprove]).encodeABI(); + const data = contract.contract.methods[fun]([newState, token.address, amountToApprove]).encodeABI(); const before = await token.balanceOf(contract.address); const params = [wallet.address] .concat(_wrapEth ? [] : [erc20.address]) diff --git a/test/baseWallet.js b/test/baseWallet.js index 2f8cfc04f..497a5cf1b 100644 --- a/test/baseWallet.js +++ b/test/baseWallet.js @@ -56,7 +56,7 @@ contract("BaseWallet", (accounts) => { beforeEach(async () => { const proxy = await Proxy.new(walletImplementation.address); - wallet = BaseWallet.at(proxy.address); + wallet = await BaseWallet.at(proxy.address); }); describe("Registering modules", () => { @@ -125,16 +125,15 @@ contract("BaseWallet", (accounts) => { it("should not reinitialize a wallet", async () => { await wallet.init(owner, [module1.address]); await module1.upgradeWallet(wallet.address, await module1.lastVersion(), { from: owner }); - - await utils.assertRevert(wallet.init(owner, [module1.address]), "BW: wallet already initialised"); + await assertRevert(wallet.init(owner, [module1.address]), "BW: wallet already initialised"); }); it("should not initialize a wallet with no module", async () => { - await utils.assertRevert(wallet.init(owner, []), "BW: construction requires at least 1 module"); + await assertRevert(wallet.init(owner, []), "BW: construction requires at least 1 module"); }); it("should not initialize a wallet with duplicate modules", async () => { - await utils.assertRevert(wallet.init(owner, [module1.address, module1.address]), "BW: module is already added"); + await assertRevert(wallet.init(owner, [module1.address, module1.address]), "BW: module is already added"); }); }); @@ -157,14 +156,14 @@ contract("BaseWallet", (accounts) => { describe("Authorisations", () => { it("should not let a non-module deauthorise a module", async () => { await wallet.init(owner, [module1.address]); - await utils.assertRevert(wallet.authoriseModule(module1.address, false), "BW: msg.sender not an authorized module"); + await assertRevert(wallet.authoriseModule(module1.address, false), "BW: msg.sender not an authorized module"); }); it("should not let a feature set the owner to address(0)", async () => { await wallet.init(owner, [module1.address]); await module1.upgradeWallet(wallet.address, await module1.lastVersion(), { from: owner }); - await assert.revertWith(feature1.invalidOwnerChange(wallet.address), "BW: address cannot be null"); + await assertRevert(feature1.invalidOwnerChange(wallet.address), "BW: address cannot be null"); }); }); @@ -199,7 +198,7 @@ contract("BaseWallet", (accounts) => { // trying to execute static call delegated to module1 (it should fail) const walletAsModule = await TestFeature.at(wallet.address); - await utils.assertRevert(walletAsModule.contract.getBoolean(), "BW: must be an authorised module for static call"); + await assertRevert(walletAsModule.contract.getBoolean(), "BW: must be an authorised module for static call"); }); }); }); diff --git a/test/transferManager.js b/test/transferManager.js index b91665a47..43f09f34f 100644 --- a/test/transferManager.js +++ b/test/transferManager.js @@ -730,8 +730,8 @@ contract("TransferManager", (accounts) => { }) { const fun = consumer === contract.address ? "setStateAndPayToken" : "setStateAndPayTokenWithConsumer"; const token = wrapEth ? weth : erc20; - const dataToTransfer = contract.contract.methods.fun([state, token.address, amount]).encodeABI(); - const unspentBefore = await transferManager.getDailyUnspent(wallet.address); + const dataToTransfer = contract.contract.methods[fun]([state, token.address, amount]).encodeABI(); + const unspentBefore = await transferModule.getDailyUnspent(wallet.address); const params = [wallet.address] .concat(wrapEth ? [] : [erc20.address]) .concat([consumer, amount, contract.address, dataToTransfer]); diff --git a/utils/utilities.js b/utils/utilities.js index 5a21e3749..840ce1430 100644 --- a/utils/utilities.js +++ b/utils/utilities.js @@ -1,7 +1,10 @@ const readline = require("readline"); const ethers = require("ethers"); -const ethUtil = require('ethereumjs-util'); -const fs = require('fs'); +const ethUtil = require("ethereumjs-util"); +const fs = require("fs"); +const chai = require("chai"); + +const { expect } = chai; const ETH_TOKEN = "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"; @@ -50,9 +53,9 @@ module.exports = { refundToken, refundAddress, ].map((hex) => hex.slice(2)).join("")}`; - - var dataBuff = ethUtil.toBuffer(ethers.utils.keccak256(input)); - var msgHashBuff = ethUtil.hashPersonalMessage(dataBuff); + + const dataBuff = ethUtil.toBuffer(ethers.utils.keccak256(input)); + const msgHashBuff = ethUtil.hashPersonalMessage(dataBuff); const accountsJson = JSON.parse(fs.readFileSync("./ganache-accounts.json", "utf8")); const sigs = `0x${signers.map((signer) => { @@ -70,7 +73,7 @@ module.exports = { const bn1 = ethers.BigNumber.from(s1); const bn2 = ethers.BigNumber.from(s2); if (bn1.lt(bn2)) return -1; - if (bn1.gt(bn2)) return 1; + if (bn1.gt(bn2)) return 1; return 0; }); }, @@ -150,7 +153,7 @@ module.exports = { async getBalance(account) { const balance = await web3.eth.getBalance(account); - return new ethers.BigNumber.from(balance); + return ethers.BigNumber.from(balance); }, async getTimestamp(blockNumber) { From 58a9128151d85d0232904fd8738555823476141e Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Fri, 28 Aug 2020 16:52:28 +0300 Subject: [PATCH 033/113] Add compile-none flag to truffle compile --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 994ad5161..b7714b4cf 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "ganache": "npx ganache-cli --networkId 1597649375983 --gasLimit=20700000 -e 10000 --acctKeys=\"./ganache-accounts.json\" --account=\"0x7ab741b57e8d94dd7e1a29055646bafde7010f38a900f55bbd7647880faa6ee8, 100000000000000000000\" --account=\"0x2030b463177db2da82908ef90fa55ddfcef56e8183caf60db464bc398e736e6f, 100000000000000000000\" --account=\"0x62ecd49c4ccb41a70ad46532aed63cf815de15864bc415c87d507afd6a5e8da2, 100000000000000000000\" --account=\"0xf473040b1a83739a9c7cc1f5719fab0f5bf178f83314d98557c58aae1910e03a, 100000000000000000000\" --account=\"0x823d590ed2cb5e8493bb0efc834771c1cde36f9fc49b9fe3620ebd0754ad6ea2, 100000000000000000000\" --account=\"0xd6d710943471e4c37ceb787857e7a2b41ca57f9cb4307ee9a9b21436a8e709c3, 100000000000000000000\" --account=\"0x187bb12e927c1652377405f81d93ce948a593f7d66cfba383ee761858b05921a, 100000000000000000000\" --account=\"0xf41486fdb04505e7966c8720a353ed92ce0d6830f8a5e915fbde735106a06d25, 100000000000000000000\" --account=\"0x6ca40ba4cca775643398385022264c0c414da1abd21d08d9e7136796a520a543, 100000000000000000000\" --account=\"0xfac0bc9325ad342033afe956e83f0bf8f1e863c1c3e956bc75d66961fe4cd186, 100000000000000000000\"", "kovan-fork": "npx ganache-cli -i 42 -l 20700000 -f https://kovan.infura.io/v3/$(cat .env | sed -En 's/INFURA_KEY=''\"''([^''\"'']+)''\"''/\\1/p')@16988040", "kovan-fork-latest": "npx ganache-cli -i 42 -l 20700000 -f https://kovan.infura.io/v3/$(cat .env | sed -En 's/INFURA_KEY=''\"''([^''\"'']+)''\"''/\\1/p')", - "test": "npx truffle test", + "test": "npx truffle test --compile-none", "ctest": "npm run compile && npm run test", "provision:lib:artefacts": "bash ./scripts/provision_lib_artefacts.sh", "test:coverage": "bash ./scripts/provision_lib_artefacts.sh & npx etherlime coverage && istanbul check-coverage --statements 94 --branches 83 --functions 96 --lines 94", From 698b60bc1b4f57d82ffb7079a1da1ce7380ccc70 Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Fri, 28 Aug 2020 17:04:16 +0300 Subject: [PATCH 034/113] Change assert.revert to assertRevert Remove verboseWaitForTransaction and use tx receipt from the transaction object Update method parameters to abiEncode to not be array --- deployment/999_benchmark.js | 2 +- test/approvedTransfer.js | 2 +- test/baseWallet.js | 4 ++-- test/compoundManager_invest.js | 15 ++++++--------- test/compoundManager_loan.js | 8 ++++---- test/ens.js | 2 +- test/factory.js | 20 ++++++++++---------- test/guardianManager.js | 2 +- test/lockManager.js | 4 ++-- test/makerV2Manager_loan.js | 2 +- test/nftTransfer.js | 4 ++-- test/simpleUpgrader.js | 10 +++++----- test/tokenExchanger.js | 2 +- test/transferManager.js | 14 +++++++------- utils/multisigexecutor.js | 6 ++---- utils/utilities.js | 2 +- 16 files changed, 47 insertions(+), 52 deletions(-) diff --git a/deployment/999_benchmark.js b/deployment/999_benchmark.js index dcc561abd..6f4d78768 100644 --- a/deployment/999_benchmark.js +++ b/deployment/999_benchmark.js @@ -302,7 +302,7 @@ class Benchmark { const fromVersion = await this.VersionManagerWrapper.walletVersions(this.wallet.address); const lastVersion = await this.VersionManagerWrapper.lastVersion(); const tx = await this.VersionManagerWrapper.from(this.accounts[0]).upgradeWallet(this.wallet.address, lastVersion); - const txReceipt = await this.VersionManagerWrapper.verboseWaitForTransaction(tx); + const txReceipt = tx.receipt; const toVersion = await this.VersionManagerWrapper.walletVersions(this.wallet.address); assert.equal(fromVersion.toNumber() + 1, toVersion.toNumber(), "Bad Update"); console.log(`Wallet updated from version ${fromVersion.toString()} to version ${toVersion.toString()}`); diff --git a/test/approvedTransfer.js b/test/approvedTransfer.js index 4938379fa..f8eaa58d6 100644 --- a/test/approvedTransfer.js +++ b/test/approvedTransfer.js @@ -334,7 +334,7 @@ contract("ApprovedTransfer", (accounts) => { const newState = parseInt((await contract.state()).toString(), 10) + 1; const token = _wrapEth ? weth : erc20; const fun = _consumerAddress === contract.address ? "setStateAndPayToken" : "setStateAndPayTokenWithConsumer"; - const data = contract.contract.methods[fun]([newState, token.address, amountToApprove]).encodeABI(); + const data = contract.contract.methods[fun](newState, token.address, amountToApprove).encodeABI(); const before = await token.balanceOf(contract.address); const params = [wallet.address] .concat(_wrapEth ? [] : [erc20.address]) diff --git a/test/baseWallet.js b/test/baseWallet.js index 497a5cf1b..67162e91d 100644 --- a/test/baseWallet.js +++ b/test/baseWallet.js @@ -210,7 +210,7 @@ contract("BaseWallet", (accounts) => { await module1.upgradeWallet(oldWallet.address, await module1.lastVersion(), { from: owner }); await feature1.callDapp(oldWallet.address); await feature1.callDapp2(oldWallet.address, 2, false); - await assert.revert(feature1.fail(oldWallet.address, "just because")); + await assertRevert(feature1.fail(oldWallet.address, "just because")); }); }); @@ -221,7 +221,7 @@ contract("BaseWallet", (accounts) => { await module1.upgradeWallet(oldWallet.address, await module1.lastVersion(), { from: owner }); await feature1.callDapp(oldWallet.address); await feature1.callDapp2(oldWallet.address, 2, true); - await assert.revert(feature1.fail(oldWallet.address, "just because")); + await assertRevert(feature1.fail(oldWallet.address, "just because")); }); }); }); diff --git a/test/compoundManager_invest.js b/test/compoundManager_invest.js index ea307db82..0cefcb626 100644 --- a/test/compoundManager_invest.js +++ b/test/compoundManager_invest.js @@ -165,21 +165,18 @@ contract("Invest Manager with Compound", (accounts) => { describe("Investment", () => { async function accrueInterests(days, investInEth) { - let tx; let - txReceipt; - // genrate borrows to create interests + let tx; + // generate borrows to create interests await comptroller.enterMarkets([cEther.address, cToken.address], { from: borrower }); if (investInEth) { await token.approve(cToken.address, parseEther("20"), { from: borrower }); await cToken.mint(parseEther("20"), { from: borrower }); tx = await cEther.borrow(parseEther("0.1"), { from: borrower }); - txReceipt = await cEther.verboseWaitForTransaction(tx); - await utils.hasEvent(txReceipt, "Borrow"); + await utils.hasEvent(tx.receipt, "Borrow"); } else { await cEther.mint({ value: parseEther("2"), from: borrower }); tx = await cToken.borrow(parseEther("0.1"), { from: borrower }); - txReceipt = await cToken.verboseWaitForTransaction(tx); - await utils.hasEvent(txReceipt, "Borrow"); + await utils.hasEvent(tx.receipt, "Borrow"); } // increase time to accumulate interests await increaseTime(3600 * 24 * days); @@ -202,7 +199,7 @@ contract("Invest Manager with Compound", (accounts) => { txReceipt = await manager.relay(investManager, "addInvestment", params, wallet, [owner]); } else { tx = await investManager.addInvestment(...params, { from: owner }); - txReceipt = await investManager.verboseWaitForTransaction(tx); + txReceipt = tx.receipt; } await utils.hasEvent(txReceipt, "InvestmentAdded"); @@ -228,7 +225,7 @@ contract("Invest Manager with Compound", (accounts) => { txReceipt = await manager.relay(investManager, "removeInvestment", params, wallet, [owner]); } else { tx = await investManager.removeInvestment(...params, { from: owner }); - txReceipt = await investManager.verboseWaitForTransaction(tx); + txReceipt = tx.receipt; } await utils.hasEvent(txReceipt, "InvestmentRemoved"); diff --git a/test/compoundManager_loan.js b/test/compoundManager_loan.js index df92aef72..38cfea26b 100644 --- a/test/compoundManager_loan.js +++ b/test/compoundManager_loan.js @@ -197,7 +197,7 @@ contract("Loan Module", (accounts) => { txReceipt = await manager.relay(loanManager, "openLoan", params, wallet, [owner]); } else { const tx = await loanManager.openLoan(...params, { from: owner }); - txReceipt = await loanManager.verboseWaitForTransaction(tx); + txReceipt = tx.receipt; } await utils.hasEvent(txReceipt, "LoanOpened"); const loanId = (await utils.parseLogs(txReceipt, loanManager, "LoanOpened"))[0]._loanId; @@ -232,7 +232,7 @@ contract("Loan Module", (accounts) => { txReceipt = await manager.relay(loanManager, method, params, wallet, [owner]); } else { const tx = await loanManager[method](...params, { from: owner }); - txReceipt = await loanManager.verboseWaitForTransaction(tx); + txReceipt = tx.receipt; } const collateralBalanceAfter = (collateral === ETH_TOKEN) ? await getBalance(wallet.address) : await collateral.balanceOf(wallet.address); @@ -264,7 +264,7 @@ contract("Loan Module", (accounts) => { txReceipt = await manager.relay(loanManager, method, params, wallet, [owner]); } else { const tx = await loanManager[method](...params, { from: owner }); - txReceipt = await loanManager.verboseWaitForTransaction(tx); + txReceipt = tx.receipt; } const debtBalanceAfter = (debtToken === ETH_TOKEN) ? await getBalance(wallet.address) : await debtToken.balanceOf(wallet.address); @@ -605,7 +605,7 @@ contract("Loan Module", (accounts) => { txReceipt = await manager.relay(loanManager, method, params, wallet, [owner], accounts[9], false, 2000000); } else { const tx = await loanManager[method](...params, { from: owner }); - txReceipt = await loanManager.verboseWaitForTransaction(tx); + txReceipt = tx.receipt; } await utils.hasEvent(txReceipt, "LoanClosed"); diff --git a/test/ens.js b/test/ens.js index f8f43f0f2..2660d3772 100644 --- a/test/ens.js +++ b/test/ens.js @@ -100,7 +100,7 @@ contract("ENS contracts", (accounts) => { it("should fail to register an ENS name when the caller is not a manager", async () => { const label = "wallet"; - await assert.revert(ensManager.register(label, owner, { from: anonmanager }), "registering should throw"); + await utilities.assertRevert(ensManager.register(label, owner, { from: anonmanager }), "registering should throw"); }); it("should be able to change the root node owner", async () => { diff --git a/test/factory.js b/test/factory.js index 199158318..c5d7c4cf5 100644 --- a/test/factory.js +++ b/test/factory.js @@ -121,7 +121,7 @@ contract("WalletFactory", (accounts) => { it("should create with the correct owner", async () => { // we create the wallet const tx = await factory.createWallet(owner, versionManager.address, guardian, 1); - const txReceipt = await factory.verboseWaitForTransaction(tx); + const txReceipt = tx.receipt; const walletAddr = txReceipt.events.filter((event) => event.event === "WalletCreated")[0].args.wallet; // we test that the wallet has the correct owner const wallet = await BaseWallet.at(walletAddr); @@ -132,7 +132,7 @@ contract("WalletFactory", (accounts) => { it("should create with the correct module", async () => { // we create the wallet const tx = await factory.createWallet(owner, versionManager.address, guardian, 1); - const txReceipt = await factory.verboseWaitForTransaction(tx); + const txReceipt = tx.receipt; const walletAddr = txReceipt.events.filter((event) => event.event === "WalletCreated")[0].args.wallet; // we test that the wallet has the correct module const wallet = await deployer.wrapDeployedContract(BaseWallet, walletAddr); @@ -143,7 +143,7 @@ contract("WalletFactory", (accounts) => { it("should create with the correct guardian", async () => { // we create the wallet const tx = await factory.createWallet(owner, versionManager.address, guardian, 1); - const txReceipt = await factory.verboseWaitForTransaction(tx); + const txReceipt = tx.receipt; const walletAddr = txReceipt.events.filter((event) => event.event === "WalletCreated")[0].args.wallet; // we test that the wallet has the correct guardian const success = await guardianStorage.isGuardian(walletAddr, guardian); @@ -156,7 +156,7 @@ contract("WalletFactory", (accounts) => { await versionManager.setMinVersion(await versionManager.lastVersion()); // we create the wallet const tx = await factory.createWallet(owner, versionManager.address, guardian, badVersion); - const txReceipt = await factory.verboseWaitForTransaction(tx); + const txReceipt = tx.receipt; const walletAddr = txReceipt.events.filter((event) => event.event === "WalletCreated")[0].args.wallet; assert.notEqual(walletAddr, ZERO_ADDRESS, "wallet should be created"); }); @@ -200,7 +200,7 @@ contract("WalletFactory", (accounts) => { const tx = await factory.createCounterfactualWallet( owner, versionManager.address, guardian, salt, 1, ); - const txReceipt = await factory.verboseWaitForTransaction(tx); + const txReceipt = tx.receipt; const walletAddr = txReceipt.events.filter((event) => event.event === "WalletCreated")[0].args.wallet; // we test that the wallet is at the correct address assert.equal(futureAddr, walletAddr, "should have the correct address"); @@ -214,7 +214,7 @@ contract("WalletFactory", (accounts) => { const tx = await factory.createCounterfactualWallet( owner, versionManager.address, guardian, salt, 1, ); - const txReceipt = await factory.verboseWaitForTransaction(tx); + const txReceipt = tx.receipt; const walletAddr = txReceipt.events.filter((event) => event.event === "WalletCreated")[0].args.wallet; // we test that the wallet is at the correct address assert.equal(futureAddr, walletAddr, "should have the correct address"); @@ -232,7 +232,7 @@ contract("WalletFactory", (accounts) => { const tx = await factory.createCounterfactualWallet( owner, versionManager.address, guardian, salt, 1, ); - const txReceipt = await factory.verboseWaitForTransaction(tx); + const txReceipt = tx.receipt; const walletAddr = txReceipt.events.filter((event) => event.event === "WalletCreated")[0].args.wallet; // we test that the wallet is at the correct address assert.equal(futureAddr, walletAddr, "should have the correct address"); @@ -256,7 +256,7 @@ contract("WalletFactory", (accounts) => { const tx = await factory.createCounterfactualWallet( owner, versionManager.address, guardian, salt, badVersion, { from: deployer } ); - const txReceipt = await factory.verboseWaitForTransaction(tx); + const txReceipt = tx.receipt; const walletAddr = txReceipt.events.filter((event) => event.event === "WalletCreated")[0].args.wallet; // we test that the wallet is at the correct address assert.equal(futureAddr, walletAddr, "should have the correct address"); @@ -270,7 +270,7 @@ contract("WalletFactory", (accounts) => { const tx = await factory.createCounterfactualWallet( owner, versionManager.address, guardian, salt, 1, ); - const txReceipt = await factory.verboseWaitForTransaction(tx); + const txReceipt = tx.receipt; const walletAddr = txReceipt.events.filter((event) => event.event === "WalletCreated")[0].args.wallet; // we test that the wallet is at the correct address assert.equal(futureAddr, walletAddr, "should have the correct address"); @@ -287,7 +287,7 @@ contract("WalletFactory", (accounts) => { const tx = await factory.createCounterfactualWallet( owner, versionManager.address, guardian, salt, 1, ); - const txReceipt = await factory.verboseWaitForTransaction(tx); + const txReceipt = tx.receipt; const walletAddr = txReceipt.events.filter((event) => event.event === "WalletCreated")[0].args.wallet; // we test that the wallet is at the correct address assert.equal(futureAddr, walletAddr, "should have the correct address"); diff --git a/test/guardianManager.js b/test/guardianManager.js index b6b9393fb..95da827cd 100644 --- a/test/guardianManager.js +++ b/test/guardianManager.js @@ -272,7 +272,7 @@ contract("GuardianManager", (accounts) => { nonCompliantGuardian = await NonCompliantGuardian.new(); }); it("it should fail to add a non-compliant guardian", async () => { - await assert.revert(guardianManager.addGuardian(wallet.address, nonCompliantGuardian.address), { from: owner }); + await utilities.assertRevert(guardianManager.addGuardian(wallet.address, nonCompliantGuardian.address), { from: owner }); }); }); }); diff --git a/test/lockManager.js b/test/lockManager.js index 7aa61c3b6..dd3f74f80 100644 --- a/test/lockManager.js +++ b/test/lockManager.js @@ -125,13 +125,13 @@ contract("LockManager", (accounts) => { }); it("should fail to lock/unlock by non-guardian EOAs (blockchain transaction)", async () => { - await assert.revert(lockManager.lock(wallet.address, { from: nonguardian }), "locking from non-guardian should fail"); + await utilities.assertRevert(lockManager.lock(wallet.address, { from: nonguardian }), "locking from non-guardian should fail"); await lockManager.lock(wallet.address, { from: guardian1 }); const state = await lockManager.isLocked(wallet.address); assert.isTrue(state, "should be locked by guardian1"); - await assert.revert(lockManager.unlock(wallet.address, { from: nonguardian })); + await utilities.assertRevert(lockManager.unlock(wallet.address, { from: nonguardian })); }); }); diff --git a/test/makerV2Manager_loan.js b/test/makerV2Manager_loan.js index beedd1276..1df0f94c0 100644 --- a/test/makerV2Manager_loan.js +++ b/test/makerV2Manager_loan.js @@ -560,7 +560,7 @@ contract("MakerV2Loan", (accounts) => { assert.isTrue(txReceipt.events.find((e) => e.event === "TransactionExecuted").args.success, "Relayed tx should succeed"); } else { const tx = await makerV2[method](...params, { gasLimit: 1000000, from: owner }); - txReceipt = await makerV2.verboseWaitForTransaction(tx); + txReceipt = tx.receipt; } assert.isTrue(await hasEvent(txReceipt, makerV2, "LoanAcquired"), "should have generated LoanAcquired event"); diff --git a/test/nftTransfer.js b/test/nftTransfer.js index b4a1ab22f..28ea7dcbd 100644 --- a/test/nftTransfer.js +++ b/test/nftTransfer.js @@ -19,7 +19,7 @@ const ERC20Approver = artifacts.require("ERC20Approver"); const ZERO_BYTES32 = ethers.constants.HashZero; const RelayManager = require("../utils/relay-manager"); -const { parseRelayReceipt, callStatic } = require("../utils/utilities.js"); +const { parseRelayReceipt, callStatic, assertRevert } = require("../utils/utilities.js"); contract("NftTransfer", (accounts) => { const manager = new RelayManager(); @@ -112,7 +112,7 @@ contract("NftTransfer", (accounts) => { if (shouldSucceed) { await txPromise; } else { - assert.revertWith(txPromise, expectedError); + assertRevert(txPromise, expectedError); } } if (shouldSucceed) { diff --git a/test/simpleUpgrader.js b/test/simpleUpgrader.js index 14c51f641..560db6e98 100644 --- a/test/simpleUpgrader.js +++ b/test/simpleUpgrader.js @@ -66,8 +66,8 @@ contract("SimpleUpgrader", (accounts) => { // Here we adjust how we call isRegisteredModule which has 2 overlaods, one accepting a single address // and a second accepting an array of addresses. Behaviour as to which overload is selected to run // differs between CI and Coverage environments, adjusted for this here - const isRegistered = await registry["isRegisteredModule(address)"](initialModule.address); - + // todo: confirm the above still stands? + const isRegistered = await registry.isRegisteredModule(initialModule.address); assert.equal(isRegistered, true, "module1 should be registered"); const info = await registry.moduleInfo(initialModule.address); assert.equal(parseBytes32String(info), name, "module1 should be registered with the correct name"); @@ -104,7 +104,7 @@ contract("SimpleUpgrader", (accounts) => { let isAuthorised = await wallet.authorised(initialModule.address); assert.equal(isAuthorised, true, "initial module should be authorised"); // try (and fail) to add moduleToAdd to wallet - await assert.revert(initialModule.addModule(wallet.address, moduleToAdd.address, { from: owner })); + await utils.assertRevert(initialModule.addModule(wallet.address, moduleToAdd.address, { from: owner })); isAuthorised = await wallet.authorised(moduleToAdd.address); assert.equal(isAuthorised, false, "unregistered module should not be authorised"); }); @@ -180,7 +180,7 @@ contract("SimpleUpgrader", (accounts) => { const { success } = (await utils.parseLogs(txReceipt, relayerV1, "TransactionExecuted"))[0]; assert.isTrue(!success, "Relayed upgrade to 0 module should have failed."); } else { - assert.revert(moduleV1.addModule(...params2, { from: owner })); + utils.assertRevert(moduleV1.addModule(...params2, { from: owner })); } return; } @@ -190,7 +190,7 @@ contract("SimpleUpgrader", (accounts) => { assert.isTrue(success, "Relayed tx should only have succeeded"); } else { const tx = await moduleV1.addModule(...params1, { from: owner }); - txReceipt = await moduleV1.verboseWaitForTransaction(tx); + txReceipt = tx.receipt; } // test event ordering diff --git a/test/tokenExchanger.js b/test/tokenExchanger.js index d3e47323d..38359bd53 100644 --- a/test/tokenExchanger.js +++ b/test/tokenExchanger.js @@ -103,7 +103,7 @@ contract("TokenExchanger", (accounts) => { await tokenB.mint(kyberNetwork.address, parseEther("1000")); await kyberNetwork.addToken(tokenA.address, TOKEN_A_RATE, DECIMALS); await kyberNetwork.addToken(tokenB.address, TOKEN_B_RATE, DECIMALS); - await kyberNetwork.send(parseEther("10")); + await kyberNetwork.send(parseEther("10").toString()); // Deploy and fund UniswapV2 const uniswapFactory = await UniswapV2Factory.new(AddressZero); diff --git a/test/transferManager.js b/test/transferManager.js index 43f09f34f..253acbb48 100644 --- a/test/transferManager.js +++ b/test/transferManager.js @@ -286,7 +286,7 @@ contract("TransferManager", (accounts) => { // add new module await previousTransferManager.addModule(existingWallet.address, versionManager.address, { from: owner }); const tx = await versionManager.upgradeWallet(existingWallet.address, await versionManager.lastVersion(), { from: owner }); - const txReceipt = await previousTransferManager.verboseWaitForTransaction(tx); + const txReceipt = tx.receipt; assert.isTrue(utils.hasEvent(txReceipt, transferManager, "DailyLimitMigrated")); // check result limit = await transferManager.getCurrentLimit(existingWallet.address); @@ -334,7 +334,7 @@ contract("TransferManager", (accounts) => { it("should be able to disable the limit", async () => { const tx = await transferManager.disableLimit(wallet.address, { from: owner }); - const txReceipt = await transferManager.verboseWaitForTransaction(tx); + const txReceipt = tx.receipt; assert.isTrue(utils.hasEvent(txReceipt, transferManager, "DailyLimitDisabled")); let limitDisabled = await transferManager.isLimitDisabled(wallet.address); assert.isFalse(limitDisabled); @@ -384,7 +384,7 @@ contract("TransferManager", (accounts) => { txReceipt = await manager.relay(transferManager, "transferToken", params, wallet, [signer]); } else { const tx = await transferManager.transferToken(...params, { from: signer }); - txReceipt = await transferManager.verboseWaitForTransaction(tx); + txReceipt = tx.receipt; } await utils.hasEvent(txReceipt, "Transfer"); const fundsAfter = (token === ETH_TOKEN ? await to.getBalance() : await token.balanceOf(to.address)); @@ -409,7 +409,7 @@ contract("TransferManager", (accounts) => { txReceipt = await manager.relay(transferManager, "transferToken", params, wallet, [owner]); } else { tx = await transferManager.transferToken(...params, { from: owner }); - txReceipt = await transferManager.verboseWaitForTransaction(tx); + txReceipt = tx.receipt; } await utils.hasEvent(txReceipt, "PendingTransferCreated"); let fundsAfter = (token === ETH_TOKEN ? await utils.getBalance(to.address) : await token.balanceOf(to.address)); @@ -422,7 +422,7 @@ contract("TransferManager", (accounts) => { await increaseTime(delay); tx = await transferManager.executePendingTransfer(wallet.address, tokenAddress, recipient, amount, ZERO_BYTES32, txReceipt.blockNumber); - txReceipt = await transferManager.verboseWaitForTransaction(tx); + txReceipt = tx.receipt; await utils.hasEvent(txReceipt, "PendingTransferExecuted"); fundsAfter = (token === ETH_TOKEN ? await utils.getBalance(to.address) : await token.balanceOf(to.address)); return assert.equal(fundsAfter.sub(fundsBefore).toNumber(), amount, "should have transfered amount"); @@ -549,7 +549,7 @@ contract("TransferManager", (accounts) => { }); await increaseTime(1); const tx = await transferManager.cancelPendingTransfer(wallet.address, id, { from: owner }); - const txReceipt = await transferManager.verboseWaitForTransaction(tx); + const txReceipt = tx.receipt; await utils.hasEvent(txReceipt, "PendingTransferCanceled"); const executeAfter = await transferManager.getPendingTransfer(wallet.address, id); assert.equal(executeAfter, 0, "should have cancelled the pending transfer"); @@ -561,7 +561,7 @@ contract("TransferManager", (accounts) => { }); await increaseTime(1); const tx = await transferManager.cancelPendingTransfer(wallet.address, id, { from: owner }); - const txReceipt = await transferManager.verboseWaitForTransaction(tx); + const txReceipt = tx.receipt; await utils.hasEvent(txReceipt, "PendingTransferCanceled"); const executeAfter = await transferManager.getPendingTransfer(wallet.address, id); assert.equal(executeAfter, 0, "should have cancelled the pending transfer"); diff --git a/utils/multisigexecutor.js b/utils/multisigexecutor.js index 543c05d92..e7f858dbf 100644 --- a/utils/multisigexecutor.js +++ b/utils/multisigexecutor.js @@ -34,9 +34,8 @@ class MultisigExecutor { // Call "execute" on the Multisig wallet with data and signatures const executeTransaction = await this._multisigWrapper.contract.execute(contractAddress, 0, data, signature, this._overrides); - const result = await this._multisigWrapper.verboseWaitForTransaction(executeTransaction, "Multisig Execute Transaction"); - return result; + return executeTransaction.receipt; } // Get the threshold const threshold = (await this._multisigWrapper.contract.threshold()).toNumber(); @@ -71,9 +70,8 @@ class MultisigExecutor { // Call "execute" on the Multisig wallet with data and signatures const executeTransaction = await this._multisigWrapper.contract.execute(contractAddress, 0, data, signatures, this._overrides); - const result = await this._multisigWrapper.verboseWaitForTransaction(executeTransaction, "Multisig Execute Transaction"); - return result; + return executeTransaction.receipt; } static signHash(walletAddr, destinationAddr, value, data, nonce) { diff --git a/utils/utilities.js b/utils/utilities.js index 840ce1430..c076d4d8e 100644 --- a/utils/utilities.js +++ b/utils/utilities.js @@ -99,7 +99,7 @@ module.exports = { parseLogs(txReceipt, contract, eventName) { const filter = txReceipt.logs.filter((e) => ( e.topics.find((t) => ( - contract.interface.events[eventName].topic === t + contract.events[eventName].topic === t )) !== undefined )); const res = []; From 3582630ca610c76052f0340cf0e49b777413afec Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Sat, 29 Aug 2020 11:28:11 +0300 Subject: [PATCH 035/113] Fix issues with resolving an event parameter and asserting a revert happened --- test/compoundManager_loan.js | 3 +- test/factory.js | 64 ++++++++++++++++-------------------- test/makerV2Manager_loan.js | 4 +-- test/simpleUpgrader.js | 8 ++--- test/tokenExchanger.js | 5 +-- utils/utilities.js | 21 +++++------- 6 files changed, 48 insertions(+), 57 deletions(-) diff --git a/test/compoundManager_loan.js b/test/compoundManager_loan.js index 38cfea26b..f2515124e 100644 --- a/test/compoundManager_loan.js +++ b/test/compoundManager_loan.js @@ -200,7 +200,8 @@ contract("Loan Module", (accounts) => { txReceipt = tx.receipt; } await utils.hasEvent(txReceipt, "LoanOpened"); - const loanId = (await utils.parseLogs(txReceipt, loanManager, "LoanOpened"))[0]._loanId; + const eventArgs = utils.parseLogs(txReceipt, "LoanOpened"); + const loanId = eventArgs._loanId; assert.isDefined(loanId, "Loan ID should be defined"); const collateralAfter = (collateral === ETH_TOKEN) ? await getBalance(wallet.address) diff --git a/test/factory.js b/test/factory.js index c5d7c4cf5..3412f7b36 100644 --- a/test/factory.js +++ b/test/factory.js @@ -17,8 +17,6 @@ contract("WalletFactory", (accounts) => { const guardian = accounts[4]; const other = accounts[6]; - let deployer; - let implementation; let moduleRegistry; let guardianStorage; @@ -26,8 +24,6 @@ contract("WalletFactory", (accounts) => { let versionManager; before(async () => { - deployer = manager.newDeployer(); - implementation = await BaseWallet.new(); moduleRegistry = await ModuleRegistry.new(); guardianStorage = await GuardianStorage.new(); @@ -73,7 +69,7 @@ contract("WalletFactory", (accounts) => { }); it("should not allow to be created with empty GuardianStorage", async () => { - await utils.assertRevert(deployer.deploy(Factory, {}, + await utils.assertRevert(Factory.new( moduleRegistry.address, implementation.address, ZERO_ADDRESS), "WF: GuardianStorage address not defined"); @@ -121,8 +117,8 @@ contract("WalletFactory", (accounts) => { it("should create with the correct owner", async () => { // we create the wallet const tx = await factory.createWallet(owner, versionManager.address, guardian, 1); - const txReceipt = tx.receipt; - const walletAddr = txReceipt.events.filter((event) => event.event === "WalletCreated")[0].args.wallet; + const eventArgs = utils.parseLogs(tx.receipt, "WalletCreated"); + const walletAddr = eventArgs.wallet; // we test that the wallet has the correct owner const wallet = await BaseWallet.at(walletAddr); const walletOwner = await wallet.owner(); @@ -132,10 +128,10 @@ contract("WalletFactory", (accounts) => { it("should create with the correct module", async () => { // we create the wallet const tx = await factory.createWallet(owner, versionManager.address, guardian, 1); - const txReceipt = tx.receipt; - const walletAddr = txReceipt.events.filter((event) => event.event === "WalletCreated")[0].args.wallet; + const eventArgs = utils.parseLogs(tx.receipt, "WalletCreated"); + const walletAddr = eventArgs.wallet; // we test that the wallet has the correct module - const wallet = await deployer.wrapDeployedContract(BaseWallet, walletAddr); + const wallet = await BaseWallet.at(walletAddr); const isAuthorised = await wallet.authorised(versionManager.address); assert.equal(isAuthorised, true, "versionManager should be authorised"); }); @@ -143,8 +139,8 @@ contract("WalletFactory", (accounts) => { it("should create with the correct guardian", async () => { // we create the wallet const tx = await factory.createWallet(owner, versionManager.address, guardian, 1); - const txReceipt = tx.receipt; - const walletAddr = txReceipt.events.filter((event) => event.event === "WalletCreated")[0].args.wallet; + const eventArgs = utils.parseLogs(tx.receipt, "WalletCreated"); + const walletAddr = eventArgs.wallet; // we test that the wallet has the correct guardian const success = await guardianStorage.isGuardian(walletAddr, guardian); assert.equal(success, true, "should have the correct guardian"); @@ -156,8 +152,8 @@ contract("WalletFactory", (accounts) => { await versionManager.setMinVersion(await versionManager.lastVersion()); // we create the wallet const tx = await factory.createWallet(owner, versionManager.address, guardian, badVersion); - const txReceipt = tx.receipt; - const walletAddr = txReceipt.events.filter((event) => event.event === "WalletCreated")[0].args.wallet; + const eventArgs = utils.parseLogs(tx.receipt, "WalletCreated"); + const walletAddr = eventArgs.wallet; assert.notEqual(walletAddr, ZERO_ADDRESS, "wallet should be created"); }); @@ -168,7 +164,7 @@ contract("WalletFactory", (accounts) => { }); it("should fail to create when there are is no VersionManager", async () => { - await utils.assertRevert(factory.createWallet(owner, ethers.constants.AddressZero, guardian, 1, { from: deployer }), + await utils.assertRevert(factory.createWallet(owner, ethers.constants.AddressZero, guardian, 1), "WF: invalid _versionManager"); }); @@ -200,8 +196,8 @@ contract("WalletFactory", (accounts) => { const tx = await factory.createCounterfactualWallet( owner, versionManager.address, guardian, salt, 1, ); - const txReceipt = tx.receipt; - const walletAddr = txReceipt.events.filter((event) => event.event === "WalletCreated")[0].args.wallet; + const eventArgs = utils.parseLogs(tx.receipt, "WalletCreated"); + const walletAddr = eventArgs.wallet; // we test that the wallet is at the correct address assert.equal(futureAddr, walletAddr, "should have the correct address"); }); @@ -214,8 +210,8 @@ contract("WalletFactory", (accounts) => { const tx = await factory.createCounterfactualWallet( owner, versionManager.address, guardian, salt, 1, ); - const txReceipt = tx.receipt; - const walletAddr = txReceipt.events.filter((event) => event.event === "WalletCreated")[0].args.wallet; + const eventArgs = utils.parseLogs(tx.receipt, "WalletCreated"); + const walletAddr = eventArgs.wallet; // we test that the wallet is at the correct address assert.equal(futureAddr, walletAddr, "should have the correct address"); // we test that the wallet has the correct owner @@ -232,12 +228,12 @@ contract("WalletFactory", (accounts) => { const tx = await factory.createCounterfactualWallet( owner, versionManager.address, guardian, salt, 1, ); - const txReceipt = tx.receipt; - const walletAddr = txReceipt.events.filter((event) => event.event === "WalletCreated")[0].args.wallet; + const eventArgs = utils.parseLogs(tx.receipt, "WalletCreated"); + const walletAddr = eventArgs.wallet; // we test that the wallet is at the correct address assert.equal(futureAddr, walletAddr, "should have the correct address"); // we test that the wallet has the correct modules - const wallet = await deployer.wrapDeployedContract(BaseWallet, walletAddr); + const wallet = await await BaseWallet.at(walletAddr); const isAuthorised = await wallet.authorised(versionManager.address); assert.equal(isAuthorised, true, "versionManager should be authorised"); }); @@ -254,10 +250,10 @@ contract("WalletFactory", (accounts) => { ); // we create the wallet const tx = await factory.createCounterfactualWallet( - owner, versionManager.address, guardian, salt, badVersion, { from: deployer } + owner, versionManager.address, guardian, salt, badVersion ); - const txReceipt = tx.receipt; - const walletAddr = txReceipt.events.filter((event) => event.event === "WalletCreated")[0].args.wallet; + const eventArgs = utils.parseLogs(tx.receipt, "WalletCreated"); + const walletAddr = eventArgs.wallet; // we test that the wallet is at the correct address assert.equal(futureAddr, walletAddr, "should have the correct address"); }); @@ -270,8 +266,8 @@ contract("WalletFactory", (accounts) => { const tx = await factory.createCounterfactualWallet( owner, versionManager.address, guardian, salt, 1, ); - const txReceipt = tx.receipt; - const walletAddr = txReceipt.events.filter((event) => event.event === "WalletCreated")[0].args.wallet; + const eventArgs = utils.parseLogs(tx.receipt, "WalletCreated"); + const walletAddr = eventArgs.wallet; // we test that the wallet is at the correct address assert.equal(futureAddr, walletAddr, "should have the correct address"); // we test that the wallet has the correct guardian @@ -287,8 +283,7 @@ contract("WalletFactory", (accounts) => { const tx = await factory.createCounterfactualWallet( owner, versionManager.address, guardian, salt, 1, ); - const txReceipt = tx.receipt; - const walletAddr = txReceipt.events.filter((event) => event.event === "WalletCreated")[0].args.wallet; + const walletAddr = utils.parseLogs(tx.receipt, "WalletCreated"); // we test that the wallet is at the correct address assert.equal(futureAddr, walletAddr, "should have the correct address"); // we create the second wallet @@ -302,7 +297,7 @@ contract("WalletFactory", (accounts) => { const salt = utils.generateSaltValue(); await utils.assertRevert( factory.createCounterfactualWallet( - owner, ethers.constants.AddressZero, guardian, salt, 1, { from: deployer } + owner, ethers.constants.AddressZero, guardian, salt, 1 ), "invalid _versionManager", ); @@ -322,17 +317,16 @@ contract("WalletFactory", (accounts) => { // we get the future address const futureAddr = await factory.getAddressForCounterfactualWallet(owner, versionManager.address, guardian, salt, 1); // We send ETH to the address - await web3.eth.sendTransaction({ from: accounts[0], to: futureAddr, value: amount }); + await web3.eth.sendTransaction({ from: infrastructure, to: futureAddr, value: amount }); // we create the wallet const tx = await factory.createCounterfactualWallet( owner, versionManager.address, guardian, salt, 1, ); const txReceipt = tx.receipt; - const wallet = await BaseWallet.at(futureAddr); await utils.hasEvent(txReceipt, "Received"); - const log = await utils.parseLogs(txReceipt, wallet, "Received"); - assert.equal(log[0].value.toNumber(), amount, "should log the correct amount"); - assert.equal(log[0].sender, "0x0000000000000000000000000000000000000000", "sender should be address(0)"); + const eventArgs = utils.parseLogs(tx.receipt, "Received"); + assert.equal(eventArgs.value.toNumber(), amount, "should log the correct amount"); + assert.equal(eventArgs.sender, "0x0000000000000000000000000000000000000000", "sender should be address(0)"); }); it("should fail to get an address when the guardian is empty", async () => { diff --git a/test/makerV2Manager_loan.js b/test/makerV2Manager_loan.js index 1df0f94c0..078d27e98 100644 --- a/test/makerV2Manager_loan.js +++ b/test/makerV2Manager_loan.js @@ -164,12 +164,12 @@ contract("MakerV2Loan", (accounts) => { let txReceipt; if (relayed) { txReceipt = await manager.relay(makerV2, method, params, wallet, [owner]); - const { success } = (await parseLogs(txReceipt, relayerManager, "TransactionExecuted"))[0]; + const { success } = await parseLogs(txReceipt, "TransactionExecuted"); assert.isTrue(success, "Relayed tx should succeed"); } else { txReceipt = await (await makerV2[method](...params, { gasLimit: 2000000, from: owner })).wait(); } - const loanId = (await parseLogs(txReceipt, makerV2, "LoanOpened"))[0]._loanId; + const loanId = (await parseLogs(txReceipt, "LoanOpened"))._loanId; assert.isDefined(loanId, "Loan ID should be defined"); const afterCollateral = (collateral.address === ETH_TOKEN) diff --git a/test/simpleUpgrader.js b/test/simpleUpgrader.js index 560db6e98..0426186fd 100644 --- a/test/simpleUpgrader.js +++ b/test/simpleUpgrader.js @@ -177,7 +177,7 @@ contract("SimpleUpgrader", (accounts) => { if (toAdd.length === 0) { if (relayed) { txReceipt = await manager.relay(moduleV1, "addModule", params2, wallet, [owner]); - const { success } = (await utils.parseLogs(txReceipt, relayerV1, "TransactionExecuted"))[0]; + const { success } = (await utils.parseLogs(txReceipt, "TransactionExecuted")); assert.isTrue(!success, "Relayed upgrade to 0 module should have failed."); } else { utils.assertRevert(moduleV1.addModule(...params2, { from: owner })); @@ -186,15 +186,15 @@ contract("SimpleUpgrader", (accounts) => { } if (relayed) { txReceipt = await manager.relay(moduleV1, "addModule", params1, wallet, [owner]); - const { success } = (await utils.parseLogs(txReceipt, relayerV1, "TransactionExecuted"))[0]; - assert.isTrue(success, "Relayed tx should only have succeeded"); + const { success } = (await utils.parseLogs(txReceipt, "TransactionExecuted")); + assert.equal(success, useOnlyOwnerModule, "Relayed tx should only have succeeded if an OnlyOwnerModule was used"); } else { const tx = await moduleV1.addModule(...params1, { from: owner }); txReceipt = tx.receipt; } // test event ordering - const logs = utils.parseLogs(txReceipt, wallet, "AuthorisedModule"); + const logs = utils.parseLogs(txReceipt, "AuthorisedModule"); const upgraderAuthorisedLogIndex = logs.findIndex((e) => e.module === upgrader1.address && e.value === true); const upgraderUnauthorisedLogIndex = logs.findIndex((e) => e.module === upgrader1.address && e.value === false); assert.isBelow(upgraderAuthorisedLogIndex, upgraderUnauthorisedLogIndex, diff --git a/test/tokenExchanger.js b/test/tokenExchanger.js index 38359bd53..89115d4bb 100644 --- a/test/tokenExchanger.js +++ b/test/tokenExchanger.js @@ -297,12 +297,13 @@ contract("TokenExchanger", (accounts) => { let txR; if (relayed) { txR = await manager.relay(exchanger, method, params, _wallet, [owner]); - const { success } = (await parseLogs(txR, relayerManager, "TransactionExecuted"))[0]; + const { success } = (await parseLogs(txR, "TransactionExecuted")); assert.isTrue(success, "Relayed tx should succeed"); } else { txR = await (await exchanger[method](...params, { gasLimit: 2000000, from: owner })).wait(); } - const { destAmount } = (await parseLogs(txR, exchanger, "TokenExchanged"))[0]; + + const { destAmount } = await parseLogs(txR, "TokenExchanged"); const afterFrom = await getBalance(fromToken, _wallet); const afterTo = await getBalance(toToken, _wallet); diff --git a/utils/utilities.js b/utils/utilities.js index c076d4d8e..0d29f531a 100644 --- a/utils/utilities.js +++ b/utils/utilities.js @@ -96,17 +96,8 @@ module.exports = { return { success: args.success, error }; }, - parseLogs(txReceipt, contract, eventName) { - const filter = txReceipt.logs.filter((e) => ( - e.topics.find((t) => ( - contract.events[eventName].topic === t - )) !== undefined - )); - const res = []; - for (const f of filter) { - res.push(contract.interface.events[eventName].decode(f.data, f.topics)); - } - return res; + parseLogs(txReceipt, eventName) { + return txReceipt.logs.filter((e) => e.event === eventName)[0].args; }, async hasEvent(txReceipt, eventName) { @@ -195,8 +186,12 @@ module.exports = { await promise; assert.fail(`Transaction succeeded, but expected error ${revertMessage}`); } catch (err) { - ({ reason } = err); - assert.equal(reason, revertMessage); + if (!revertMessage) { + assert.notEqual(err.hijackedStack.indexOf("VM Exception while processing transaction: revert"), -1); + } else { + ({ reason } = err); + assert.equal(reason, revertMessage); + } } }, From 385264f964e3dbf634b73daa94e522c09ac3fd0c Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Tue, 8 Sep 2020 11:06:39 +0300 Subject: [PATCH 036/113] Switch ethers.BigNumber to pure BigNumber Pass parameters not as array (as expected in ethers contract format used by etherlime --- scripts/deploy_defi.js | 5 ++--- test/approvedTransfer.js | 4 ++-- test/baseWallet.js | 8 ++++---- test/compoundManager_invest.js | 6 +++--- test/compoundManager_loan.js | 4 ++-- test/guardianManager.js | 2 +- test/kyber.js | 12 ++++++------ test/lockManager.js | 4 ++-- test/makerV2Manager_invest.js | 3 +-- test/makerV2Manager_loan.js | 4 ++-- test/recoveryManager.js | 2 +- test/relayer.js | 16 ++++++++-------- test/tokenExchanger.js | 2 +- test/transferManager.js | 12 ++++++------ utils/defi-deployer.js | 6 +++--- utils/utilities.js | 2 +- 16 files changed, 45 insertions(+), 47 deletions(-) diff --git a/scripts/deploy_defi.js b/scripts/deploy_defi.js index 0a4618675..f7a48001a 100644 --- a/scripts/deploy_defi.js +++ b/scripts/deploy_defi.js @@ -1,7 +1,6 @@ // AWS_PROFILE=argent-test AWS_SDK_LOAD_CONFIG=true etherlime deploy --file ./scripts/deploy_defi.js --compile false /* global artifacts */ -const ethers = require("ethers"); const { parseEther, formatBytes32String } = require("ethers").utils; const DeployManager = require("../utils/deploy-manager.js"); @@ -15,8 +14,8 @@ const DSToken = artifacts.require("DSToken"); const WETH = artifacts.require("WETH9"); const DSValue = artifacts.require("DSValue"); -const RAY = ethers.BigNumber.from("1000000000000000000000000000"); // 10**27 -const WAD = ethers.BigNumber.from("1000000000000000000"); // 10**18 +const RAY = new BigNumber("1000000000000000000000000000"); // 10**27 +const WAD = new BigNumber("1000000000000000000"); // 10**18 const USD_PER_DAI = RAY; // 1 DAI = 1 USD const USD_PER_ETH = WAD.mul(250); // 1 ETH = 250 USD const USD_PER_MKR = WAD.mul(700); // 1 MKR = 700 USD diff --git a/test/approvedTransfer.js b/test/approvedTransfer.js index f8eaa58d6..c073918b8 100644 --- a/test/approvedTransfer.js +++ b/test/approvedTransfer.js @@ -312,7 +312,7 @@ contract("ApprovedTransfer", (accounts) => { describe("Invalid Target", () => { async function expectFailingApproveTokenAndCallContract(target) { - const invalidData = contract.contract.methods.setStateAndPayToken([2, erc20.address, amountToApprove]).encodeABI(); + const invalidData = contract.contract.methods.setStateAndPayToken(2, erc20.address, amountToApprove).encodeABI(); const txReceipt = await manager.relay(approvedTransfer, "approveTokenAndCallContract", [wallet.address, erc20.address, wallet.address, amountToApprove, target.address, invalidData], wallet, [owner, ...sortWalletByAddress([guardian1, guardian2])]); @@ -376,7 +376,7 @@ contract("ApprovedTransfer", (accounts) => { const allowanceBefore = await erc20.allowance(wallet.address, consumer); const balanceBefore = await erc20.balanceOf(contract.address); - const dataToTransfer = contract.contract.methods.setStateAndPayTokenWithConsumer([2, erc20.address, amountToApprove]).encodeABI(); + const dataToTransfer = contract.contract.methods.setStateAndPayTokenWithConsumer(2, erc20.address, amountToApprove).encodeABI(); await manager.relay(approvedTransfer, "approveTokenAndCallContract", [wallet.address, erc20.address, consumer, amountToApprove, contract.address, dataToTransfer], wallet, [owner, ...sortWalletByAddress([guardian1, guardian2])]); diff --git a/test/baseWallet.js b/test/baseWallet.js index 67162e91d..908c99b47 100644 --- a/test/baseWallet.js +++ b/test/baseWallet.js @@ -63,7 +63,7 @@ contract("BaseWallet", (accounts) => { it("should register a module with the correct info", async () => { const name = ethers.utils.formatBytes32String("module1"); await registry.registerModule(module1.address, name); - const isRegistered = await registry["isRegisteredModule(address)"](module1.address); + const isRegistered = await registry.isRegisteredModule(module1.address); assert.isTrue(isRegistered, "module should be registered"); const info = await registry.moduleInfo(module1.address); assert.equal(name, info, "name should be correct"); @@ -72,10 +72,10 @@ contract("BaseWallet", (accounts) => { it("should deregister a module", async () => { const name = ethers.utils.formatBytes32String("module2"); await registry.registerModule(module2.address, name); - let isRegistered = await registry["isRegisteredModule(address)"](module2.address); + let isRegistered = await registry.isRegisteredModule(module2.address); assert.isTrue(isRegistered, "module should be registered"); await registry.deregisterModule(module2.address); - isRegistered = await registry["isRegisteredModule(address)"](module2.address); + isRegistered = await registry.isRegisteredModule(module2.address); assert.isFalse(isRegistered, "module should be deregistered"); }); @@ -198,7 +198,7 @@ contract("BaseWallet", (accounts) => { // trying to execute static call delegated to module1 (it should fail) const walletAsModule = await TestFeature.at(wallet.address); - await assertRevert(walletAsModule.contract.getBoolean(), "BW: must be an authorised module for static call"); + await assertRevert(walletAsModule.getBoolean(), "BW: must be an authorised module for static call"); }); }); }); diff --git a/test/compoundManager_invest.js b/test/compoundManager_invest.js index 0cefcb626..09a0980a5 100644 --- a/test/compoundManager_invest.js +++ b/test/compoundManager_invest.js @@ -22,8 +22,8 @@ const CEther = artifacts.require("CEther"); const CErc20 = artifacts.require("CErc20"); const CompoundRegistry = artifacts.require("CompoundRegistry"); -const WAD = ethers.BigNumber.from("1000000000000000000"); // 10**18 -const ETH_EXCHANGE_RATE = ethers.BigNumber.from("200000000000000000000000000"); +const WAD = new BigNumber("1000000000000000000"); // 10**18 +const ETH_EXCHANGE_RATE = new BigNumber("200000000000000000000000000"); const ERC20 = artifacts.require("TestERC20"); @@ -66,7 +66,7 @@ contract("Invest Manager with Compound", (accounts) => { const interestModel = await InterestModel.new(WAD.mul(250).div(10000), WAD.mul(2000).div(10000)); // deploy CEther cEther = await CEther.new( - comptroller.address, + comptrollerProxy.address, interestModel.address, ETH_EXCHANGE_RATE, formatBytes32String("Compound Ether"), diff --git a/test/compoundManager_loan.js b/test/compoundManager_loan.js index f2515124e..5f234dcbd 100644 --- a/test/compoundManager_loan.js +++ b/test/compoundManager_loan.js @@ -24,8 +24,8 @@ const CEther = artifacts.require("CEther"); const CErc20 = artifacts.require("CErc20"); const CompoundRegistry = artifacts.require("CompoundRegistry"); -const WAD = ethers.BigNumber.from("1000000000000000000"); // 10**18 -const ETH_EXCHANGE_RATE = ethers.BigNumber.from("200000000000000000000000000"); +const WAD = new BigNumber("1000000000000000000"); // 10**18 +const ETH_EXCHANGE_RATE = new BigNumber("200000000000000000000000000"); const ERC20 = artifacts.require("TestERC20"); diff --git a/test/guardianManager.js b/test/guardianManager.js index 95da827cd..f91c433be 100644 --- a/test/guardianManager.js +++ b/test/guardianManager.js @@ -272,7 +272,7 @@ contract("GuardianManager", (accounts) => { nonCompliantGuardian = await NonCompliantGuardian.new(); }); it("it should fail to add a non-compliant guardian", async () => { - await utilities.assertRevert(guardianManager.addGuardian(wallet.address, nonCompliantGuardian.address), { from: owner }); + await utilities.assertRevert(guardianManager.addGuardian(wallet.address, nonCompliantGuardian.address, { from: owner })); }); }); }); diff --git a/test/kyber.js b/test/kyber.js index a43abd241..199a57e04 100644 --- a/test/kyber.js +++ b/test/kyber.js @@ -32,7 +32,7 @@ contract("KyberNetwork", (accounts) => { const beforeETH = await getBalance(trader); assert.equal(beforeERC20.toNumber(), 0, "trader should have no ERC20"); await kyber.trade(ETH_TOKEN, 10000, erc20.address, trader, - ethers.BigNumber.from("10000000000000000000000"), 1, "0x0000000000000000000000000000000000000000", { value: 10000, from: trader }); + new BigNumber"10000000000000000000000"), 1, "0x0000000000000000000000000000000000000000", { value: 10000, from: trader }); const afterERC20 = await erc20.balanceOf(trader); const afterETH = await getBalance(trader); assert.equal(beforeETH.sub(afterETH).gt(10000), true, "trader should have exchanged 10000 wei"); @@ -43,22 +43,22 @@ contract("KyberNetwork", (accounts) => { // provision ERC20 to trader await kyber.trade( ETH_TOKEN, - ethers.BigNumber.from("1000000000000000000"), + new BigNumber("1000000000000000000"), erc20.address, trader, - ethers.BigNumber.from("10000000000000000000000"), + new BigNumber("10000000000000000000000"), 1, "0x0000000000000000000000000000000000000000", - { value: ethers.BigNumber.from("1000000000000000000") }, + { value: new BigNumber("1000000000000000000") }, ); const beforeERC20 = await erc20.balanceOf(trader); const beforeETH = await getBalance(trader); assert.equal(beforeERC20 > 0, true, "trader should have some ERC20"); // exchange ERC20 - const srcAmount = beforeERC20.div(ethers.BigNumber.from(2)); + const srcAmount = beforeERC20.div(new BigNumber(2)); await erc20.approve(kyber.address, srcAmount, { from: trader }); await kyber.trade(erc20.address, srcAmount, ETH_TOKEN, trader, - ethers.BigNumber.from("10000000000000000000000"), 1, "0x0000000000000000000000000000000000000000", { from: trader }); + new BigNumber("10000000000000000000000"), 1, "0x0000000000000000000000000000000000000000", { from: trader }); const afterERC20 = await erc20.balanceOf(trader); const afterETH = await getBalance(trader); assert.equal(beforeERC20.sub(afterERC20).eq(srcAmount), true, "trader should have exchanged ERC20"); diff --git a/test/lockManager.js b/test/lockManager.js index dd3f74f80..af58a99a1 100644 --- a/test/lockManager.js +++ b/test/lockManager.js @@ -131,7 +131,7 @@ contract("LockManager", (accounts) => { const state = await lockManager.isLocked(wallet.address); assert.isTrue(state, "should be locked by guardian1"); - await utilities.assertRevert(lockManager.unlock(wallet.address, { from: nonguardian })); + await utilities.assertRevert(lockManager.unlock(wallet.address, { from: nonguardian }), "LM: must be guardian or module"); }); }); @@ -195,7 +195,7 @@ contract("LockManager", (accounts) => { await lockManager.unlock(wallet.address, { from: guardian1 }); // try to unlock again await utilities.assertRevert(lockManager.unlock(wallet.address, { from: guardian1 }), - "VM Exception while processing transaction: revert LM: wallet must be locked"); + "LM: wallet must be locked"); }); it("should not be able to unlock a wallet, locked by another feature", async () => { diff --git a/test/makerV2Manager_invest.js b/test/makerV2Manager_invest.js index 7b6c99db2..7cda45c12 100644 --- a/test/makerV2Manager_invest.js +++ b/test/makerV2Manager_invest.js @@ -18,7 +18,6 @@ const DAI_SENT = WAD.div(100000000); contract("MakerV2Invest", (accounts) => { const manager = new RelayManager(); - const { deployer } = manager; const infrastructure = accounts[0]; const owner = accounts[1]; @@ -55,7 +54,7 @@ contract("MakerV2Invest", (accounts) => { const makerRegistry = await MakerRegistry.new(vat.address); // Deploy Uniswap - const uni = await deployUniswap(manager, infrastructure, [gov, dai], [ETH_PER_MKR, ETH_PER_DAI]); + const uni = await deployUniswap(infrastructure, [gov, dai], [ETH_PER_MKR, ETH_PER_DAI]); makerV2 = await MakerV2Manager.new( lockStorage.address, diff --git a/test/makerV2Manager_loan.js b/test/makerV2Manager_loan.js index 078d27e98..7bbc72e29 100644 --- a/test/makerV2Manager_loan.js +++ b/test/makerV2Manager_loan.js @@ -69,7 +69,7 @@ contract("MakerV2Loan", (accounts) => { const { wethJoin } = mk; // Deploy Uniswap - const uni = await deployUniswap(manager, infrastructure, [gov, dai], [ETH_PER_MKR, ETH_PER_DAI]); + const uni = await deployUniswap(infrastructure, [gov, dai], [ETH_PER_MKR, ETH_PER_DAI]); uniswapFactory = uni.uniswapFactory; // Deploy MakerV2Manager @@ -322,7 +322,7 @@ contract("MakerV2Loan", (accounts) => { it("should not remove collateral with invalid collateral amount", async () => { const loanId = await testOpenLoan({ collateralAmount, daiAmount, relayed: false }); await assertRevert( - makerV2.removeCollateral(walletAddress, loanId, ETH_TOKEN, ethers.BigNumber.from(2).pow(255), { from: owner }), + makerV2.removeCollateral(walletAddress, loanId, ETH_TOKEN, new BigNumber(2).pow(255), { from: owner }), "MV2: int overflow", ); }); diff --git a/test/recoveryManager.js b/test/recoveryManager.js index e8b24db91..a13964f7f 100644 --- a/test/recoveryManager.js +++ b/test/recoveryManager.js @@ -129,7 +129,7 @@ contract("RecoveryManager", (accounts) => { const proxy = await Proxy.at(walletImplementation.address); const guardianWallet = await BaseWallet.at(proxy.address); await guardianWallet.init(g, [versionManager.address]); - await versionManager.from(g).upgradeWallet(guardianWallet.address, await versionManager.lastVersion()); + await versionManager.upgradeWallet(guardianWallet.address, await versionManager.lastVersion(), { from: g }); wallets.push(guardianWallet); } return wallets; diff --git a/test/relayer.js b/test/relayer.js index 2d6ea7146..e0c4ced9f 100644 --- a/test/relayer.js +++ b/test/relayer.js @@ -288,7 +288,7 @@ contract("RelayerManager", (accounts) => { } it("should refund in ETH", async () => { - await provisionFunds(ethers.BigNumber.from("100000000000000"), 0); + await provisionFunds("100000000000000", 0); const wBalanceStart = await getBalance(wallet.address); const rBalanceStart = await getBalance(recipient); await callAndRefund({ refundToken: ETH_TOKEN }); @@ -300,7 +300,7 @@ contract("RelayerManager", (accounts) => { }); it("should refund in ERC20", async () => { - await provisionFunds(0, ethers.BigNumber.from("100000000000000")); + await provisionFunds(0, "100000000000000"); const wBalanceStart = await erc20.balanceOf(wallet.address); const rBalanceStart = await erc20.balanceOf(recipient); await callAndRefund({ refundToken: erc20.address }); @@ -312,23 +312,23 @@ contract("RelayerManager", (accounts) => { }); it("should emit the Refund event", async () => { - await provisionFunds(ethers.BigNumber.from("100000000000"), 0); + await provisionFunds("100000000000", 0); const txReceipt = await callAndRefund({ refundToken: ETH_TOKEN }); await hasEvent(txReceipt, "Refund"); }); it("should fail the transaction when when there is not enough ETH for the refund", async () => { - await provisionFunds(ethers.BigNumber.from("10"), 0); + await provisionFunds(10, 0); await assertRevert(callAndRefund({ refundToken: ETH_TOKEN }), "VM: wallet invoke reverted"); }); it("should fail the transaction when when there is not enough ERC20 for the refund", async () => { - await provisionFunds(0, ethers.BigNumber.from("10")); + await provisionFunds(0, 10); await assertRevert(callAndRefund({ refundToken: erc20.address }), "ERC20: transfer amount exceeds balance"); }); it("should include the refund in the daily limit", async () => { - await provisionFunds(ethers.BigNumber.from("100000000000"), 0); + await provisionFunds("100000000000", 0); await setLimitAndDailySpent({ limit: 1000000000, alreadySpent: 10 }); let dailySpent = await limitFeature.getDailySpent(wallet.address); assert.isTrue(dailySpent.toNumber() === 10, "initial daily spent should be 10"); @@ -339,7 +339,7 @@ contract("RelayerManager", (accounts) => { it("should refund and reset the daily limit when approved by guardians", async () => { // set funds and limit/daily spent - await provisionFunds(ethers.BigNumber.from("100000000000"), 0); + await provisionFunds("100000000000", 0); await setLimitAndDailySpent({ limit: 1000000000, alreadySpent: 10 }); let dailySpent = await limitFeature.getDailySpent(wallet.address); assert.isTrue(dailySpent.toNumber() === 10, "initial daily spent should be 10"); @@ -378,7 +378,7 @@ contract("RelayerManager", (accounts) => { }); it("should fail the transaction when the refund is over the daily limit", async () => { - await provisionFunds(ethers.BigNumber.from("100000000000"), 0); + await provisionFunds("100000000000", 0); await setLimitAndDailySpent({ limit: 1000000000, alreadySpent: 999999990 }); const dailySpent = await limitFeature.getDailySpent(wallet.address); assert.isTrue(dailySpent.toNumber() === 999999990, "initial daily spent should be 999999990"); diff --git a/test/tokenExchanger.js b/test/tokenExchanger.js index 89115d4bb..e0669678f 100644 --- a/test/tokenExchanger.js +++ b/test/tokenExchanger.js @@ -425,7 +425,7 @@ contract("TokenExchanger", (accounts) => { }); it(`calls ${method} successfully with a pre-existing infinite allowance`, async () => { // Make the wallet grant an infinite allowance to the Paraswap proxy - const infiniteAllowance = ethers.BigNumber.from(2).pow(256).sub(1); + const infiniteAllowance = new BigNumber(2).pow(256).sub(1); await testTradeWithPreExistingAllowance(infiniteAllowance); }); } diff --git a/test/transferManager.js b/test/transferManager.js index 253acbb48..7c0aee297 100644 --- a/test/transferManager.js +++ b/test/transferManager.js @@ -129,9 +129,9 @@ contract("TransferManager", (accounts) => { const decimals = 12; // number of decimal for TOKN contract const tokenRate = new BN(10).pow(new BN(19)).muln(51); // 1 TOKN = 0.00051 ETH = 0.00051*10^18 ETH wei => *10^(18-decimals) = 0.00051*10^18 * 10^6 = 0.00051*10^24 = 51*10^19 - erc20 = await RC20.new([infrastructure, wallet.address], 10000000, decimals); // TOKN contract with 10M tokens (5M TOKN for wallet and 5M TOKN for account[0]) + erc20 = await ERC20.new([infrastructure, wallet.address], 10000000, decimals); // TOKN contract with 10M tokens (5M TOKN for wallet and 5M TOKN for account[0]) await tokenPriceRegistry.setPriceForTokenList([erc20.address], [tokenRate.toString()]); - await wallet.send(ethers.BigNumber.from("1000000000000000000")); + await wallet.send(new BigNumber("1000000000000000000")); }); async function getEtherValue(amount, token) { @@ -274,7 +274,7 @@ contract("TransferManager", (accounts) => { const existingWallet = await BaseWallet.at(proxy.address); await existingWallet.init(owner, [previousTransferManager.address]); - await existingWallet.send(ethers.BigNumber.from("100000000")); + await existingWallet.send(new BigNumber("100000000")); // change the limit await previousTransferManager.changeLimit(existingWallet.address, 4000000, { from: owner }); @@ -344,7 +344,7 @@ contract("TransferManager", (accounts) => { }); it("should return the correct unspent daily limit amount", async () => { - await wallet.send(ethers.BigNumber.from(ETH_LIMIT)); + await wallet.send(new BigNumber(ETH_LIMIT)); const transferAmount = ETH_LIMIT - 100; await transferManager.transferToken(wallet.address, ETH_TOKEN, recipient, transferAmount, ZERO_BYTES32, { from: owner }); const { _unspent } = await transferManager.getDailyUnspent(wallet.address); @@ -352,7 +352,7 @@ contract("TransferManager", (accounts) => { }); it("should return the correct spent daily limit amount", async () => { - await wallet.send(ethers.BigNumber.from(ETH_LIMIT)); + await wallet.send(new BigNumber(ETH_LIMIT)); // Transfer 100 wei const tx = await transferManager.transferToken(wallet.address, ETH_TOKEN, recipient, 100, ZERO_BYTES32, { from: owner }); const timestamp = await manager.getTimestamp(tx.receipt.block); @@ -365,7 +365,7 @@ contract("TransferManager", (accounts) => { }); it("should return 0 if the entire daily limit amount has been spent", async () => { - await wallet.send(ethers.BigNumber.from(ETH_LIMIT)); + await wallet.send(new BigNumber(ETH_LIMIT)); await transferManager.transferToken(wallet.address, ETH_TOKEN, recipient, ETH_LIMIT, ZERO_BYTES32, { from: owner }); const { _unspent } = await transferManager.getDailyUnspent(wallet.address); assert.equal(_unspent.toNumber(), 0); diff --git a/utils/defi-deployer.js b/utils/defi-deployer.js index 16fe16295..a9b5d7b88 100644 --- a/utils/defi-deployer.js +++ b/utils/defi-deployer.js @@ -21,8 +21,8 @@ const CdpManager = artifacts.require("DssCdpManager"); const GemJoin = artifacts.require("GemJoin"); const DaiJoin = artifacts.require("DaiJoin"); -const RAY = ethers.BigNumber.from("1000000000000000000000000000"); // 10**27 -const WAD = ethers.BigNumber.from("1000000000000000000"); // 10**18 +const RAY = new BigNumber("1000000000000000000000000000"); // 10**27 +const WAD = new BigNumber("1000000000000000000"); // 10**18 const RAD = RAY.mul(WAD); const USD_PER_DAI = RAY; // 1 DAI = 1 USD const USD_PER_ETH = WAD.mul(100); // 1 ETH = 100 USD @@ -37,7 +37,7 @@ module.exports = { ETH_PER_MKR, ETH_PER_DAI, - deployUniswap: async (manager, infrastructure, tokens = [], ethPerToken = [], ethLiquidity = parseEther("10")) => { + deployUniswap: async (infrastructure, tokens = [], ethPerToken = [], ethLiquidity = parseEther("10")) => { const uniswapFactory = await UniswapFactory.new(); const uniswapTemplateExchange = await UniswapExchange.new(); await uniswapFactory.initializeFactory(uniswapTemplateExchange.address); diff --git a/utils/utilities.js b/utils/utilities.js index 0d29f531a..acd68cd5b 100644 --- a/utils/utilities.js +++ b/utils/utilities.js @@ -81,7 +81,7 @@ module.exports = { // Parses the RelayerModule.execute receipt to decompose the success value of the transaction // and additionally if an error was raised in the sub-call to optionally return that parseRelayReceipt(txReceipt) { - const { args } = txReceipt.events.find((l) => l.event === "TransactionExecuted"); + const { args } = txReceipt.logs.filter((e) => e.event === "TransactionExecuted").args; let errorBytes; if (args.returnData.startsWith("0x08c379a0")) { From 23205080f10923e3b5e94b31ef3d11ab74775a8c Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Thu, 15 Oct 2020 18:17:00 +0300 Subject: [PATCH 037/113] Test fixing --- test/approvedTransfer.js | 23 +++--- test/baseFeature.js | 81 +++++++++--------- test/baseModule.js | 62 -------------- test/compoundManager_invest.js | 3 +- test/compoundManager_loan.js | 3 +- test/guardianManager.js | 2 +- test/kyber.js | 4 +- test/lockManager.js | 2 +- test/makerV2Manager_invest.js | 4 +- test/makerV2Manager_loan.js | 1 + test/nftTransfer.js | 6 +- test/proxy.js | 2 +- test/recoveryManager.js | 2 +- test/relayer.js | 4 +- test/simpleUpgrader.js | 12 +-- test/tokenExchanger.js | 8 +- test/tokenPriceRegistry.js | 64 +++++++------- test/transferManager.js | 1 + test/upgraderToVersionManager.js | 136 +++++++++++++++--------------- test/versionManager.js | 138 +++++++++++++++---------------- utils/defi-deployer.js | 14 ++-- utils/relay-manager.js | 1 + utils/utilities.js | 13 +-- 23 files changed, 264 insertions(+), 322 deletions(-) delete mode 100644 test/baseModule.js diff --git a/test/approvedTransfer.js b/test/approvedTransfer.js index c073918b8..e4b154a7f 100644 --- a/test/approvedTransfer.js +++ b/test/approvedTransfer.js @@ -92,7 +92,7 @@ contract("ApprovedTransfer", (accounts) => { wallet = await BaseWallet.at(proxy.address); await wallet.init(owner, [versionManager.address]); - await versionManager.from(owner).upgradeWallet(wallet.address, await versionManager.lastVersion()); + await versionManager.upgradeWallet(wallet.address, await versionManager.lastVersion(), { from: owner }); const decimals = 12; // number of decimal for TOKN contract erc20 = await ERC20.new([infrastructure, wallet.address], 10000000, decimals); // TOKN contract with 10M tokens (5M TOKN for wallet and 5M TOKN for account[0]) @@ -101,8 +101,8 @@ contract("ApprovedTransfer", (accounts) => { async function addGuardians(guardians) { // guardians can be BaseWallet or ContractWrapper objects - for (const address of guardians) { - await guardianManager.addGuardian(wallet.address, address, { from: owner }); + for (const guardian of guardians) { + await guardianManager.addGuardian(wallet.address, guardian, { from: owner }); } await increaseTime(30); @@ -115,17 +115,20 @@ contract("ApprovedTransfer", (accounts) => { async function createSmartContractGuardians(guardians) { const wallets = []; - for (const g of guardians) { - const guardianWallet = await BaseWallet.new(); - await guardianWallet.init(g, [versionManager.address]); - await versionManager.upgradeWallet(guardianWallet.address, await versionManager.lastVersion(), { from: g }); - wallets.push(guardianWallet); + for (const guardian of guardians) { + const proxy = await Proxy.new(walletImplementation.address); + const guardianWallet = await BaseWallet.at(proxy.address); + + await guardianWallet.init(guardian, [versionManager.address]); + await versionManager.upgradeWallet(guardianWallet.address, await versionManager.lastVersion(), { from: guardian }); + wallets.push(guardianWallet.address); } return wallets; } async function transferToken(_token, _signers) { const to = recipient; + const before = _token === ETH_TOKEN ? await getBalance(to) : await erc20.balanceOf(to); await manager.relay(approvedTransfer, "transferToken", [wallet.address, _token, to, amountToTransfer, ZERO_BYTES32], wallet, _signers); @@ -261,9 +264,9 @@ contract("ApprovedTransfer", (accounts) => { describe("Contract call", () => { it("should fail to call contract on a wallet with no guardian", async () => { contract = await TestContract.new(); - const dataToTransfer = contract.contract.interface.functions.setState.encode([1]); + const dataToTransfer = contract.contract.methods.setState([1]).encodeABI(); - await assert.revertWith( + await assertRevert( manager.relay( approvedTransfer, "callContract", diff --git a/test/baseFeature.js b/test/baseFeature.js index b889bd8bf..4be788f42 100644 --- a/test/baseFeature.js +++ b/test/baseFeature.js @@ -1,23 +1,16 @@ -/* global accounts */ +/* global artifacts */ const ethers = require("ethers"); -const Registry = require("../build/ModuleRegistry"); -const GuardianStorage = require("../build/GuardianStorage"); -const VersionManager = require("../build/VersionManager"); -const RelayerManager = require("../build/RelayerManager"); -const LockStorage = require("../build/LockStorage"); -const ERC20 = require("../build/TestERC20"); -const NonCompliantERC20 = require("../build/NonCompliantERC20"); +const Registry = artifacts.require("ModuleRegistry"); +const GuardianStorage = artifacts.require("GuardianStorage"); +const VersionManager = artifacts.require("VersionManager"); +const RelayerManager = artifacts.require("RelayerManager"); +const LockStorage = artifacts.require("LockStorage"); +const ERC20 = artifacts.require("TestERC20"); +const NonCompliantERC20 = artifacts.require("NonCompliantERC20"); -const TestManager = require("../utils/test-manager"); - -describe("BaseFeature", function () { - this.timeout(100000); - - const manager = new TestManager(); - const { deployer } = manager; - - const owner = accounts[1].signer; +contract("BaseFeature", (accounts) => { + const owner = accounts[1]; let registry; let versionManager; @@ -30,64 +23,64 @@ describe("BaseFeature", function () { }); beforeEach(async () => { - registry = await deployer.deploy(Registry); - guardianStorage = await deployer.deploy(GuardianStorage); - lockStorage = await deployer.deploy(LockStorage); - versionManager = await deployer.deploy(VersionManager, {}, - registry.contractAddress, - lockStorage.contractAddress, - guardianStorage.contractAddress, + registry = await Registry.new(); + guardianStorage = await GuardianStorage.new(); + lockStorage = await LockStorage.new(); + versionManager = await VersionManager.new( + registry.address, + lockStorage.address, + guardianStorage.address, ethers.constants.AddressZero, ethers.constants.AddressZero); - relayerManager = await deployer.deploy(RelayerManager, {}, - lockStorage.contractAddress, - guardianStorage.contractAddress, + relayerManager = await RelayerManager.new( + lockStorage.address, + guardianStorage.address, ethers.constants.AddressZero, ethers.constants.AddressZero, - versionManager.contractAddress); - await versionManager.addVersion([relayerManager.contractAddress], []); + versionManager.address); + await versionManager.addVersion([relayerManager.address], []); - token = await deployer.deploy(ERC20, {}, [owner], 10, 18); + token = await ERC20.new([owner], 10, 18); }); describe("Recover tokens", async () => { it("should be able to recover ERC20 tokens sent to the feature", async () => { - let balance = await token.balanceOf(relayerManager.contractAddress); + let balance = await token.balanceOf(relayerManager.address); assert.equal(balance, 0); - await token.from(owner).transfer(relayerManager.contractAddress, 10000000); - balance = await token.balanceOf(relayerManager.contractAddress); + await token.transfer(relayerManager.address, 10000000, { from: owner }); + balance = await token.balanceOf(relayerManager.address); assert.equal(balance, 10000000); - await relayerManager.recoverToken(token.contractAddress); + await relayerManager.recoverToken(token.address); - balance = await token.balanceOf(relayerManager.contractAddress); + balance = await token.balanceOf(relayerManager.address); assert.equal(balance, 0); - const versionManagerBalance = await token.balanceOf(versionManager.contractAddress); + const versionManagerBalance = await token.balanceOf(versionManager.address); assert.equal(versionManagerBalance, 10000000); - await versionManager.recoverToken(token.contractAddress); + await versionManager.recoverToken(token.address); const adminBalance = await token.balanceOf(accounts[0]); assert.equal(adminBalance, 10000000); }); it("should be able to recover non-ERC20 compliant tokens sent to the feature", async () => { - const nonCompliantToken = await deployer.deploy(NonCompliantERC20, {}); - await nonCompliantToken.mint(relayerManager.contractAddress, 10000000); - let balance = await nonCompliantToken.balanceOf(relayerManager.contractAddress); + const nonCompliantToken = await NonCompliantERC20.new(); + await nonCompliantToken.mint(relayerManager.address, 10000000); + let balance = await nonCompliantToken.balanceOf(relayerManager.address); assert.equal(balance, 10000000); - await relayerManager.recoverToken(nonCompliantToken.contractAddress); + await relayerManager.recoverToken(nonCompliantToken.address); - balance = await nonCompliantToken.balanceOf(relayerManager.contractAddress); + balance = await nonCompliantToken.balanceOf(relayerManager.address); assert.equal(balance, 0); - const versionManagerBalance = await nonCompliantToken.balanceOf(versionManager.contractAddress); + const versionManagerBalance = await nonCompliantToken.balanceOf(versionManager.address); assert.equal(versionManagerBalance, 10000000); - await versionManager.recoverToken(nonCompliantToken.contractAddress); + await versionManager.recoverToken(nonCompliantToken.address); const adminBalance = await nonCompliantToken.balanceOf(accounts[0]); assert.equal(adminBalance, 10000000); diff --git a/test/baseModule.js b/test/baseModule.js deleted file mode 100644 index 6dc7e0439..000000000 --- a/test/baseModule.js +++ /dev/null @@ -1,62 +0,0 @@ -/* global artifacts */ -require("ethers"); - -const Registry = artifacts.require("ModuleRegistry"); -const GuardianStorage = artifacts.require("GuardianStorage"); -const BaseModule = artifacts.require("TestOnlyOwnerModule"); -const ERC20 = artifacts.require("TestERC20"); -const NonCompliantERC20 = artifacts.require("NonCompliantERC20"); - -contract("BaseModule", (accounts) => { - const owner = accounts[1]; - - let registry; - let guardianStorage; - let token; - let baseModule; - - before(async () => { - }); - - beforeEach(async () => { - registry = await Registry.new(); - guardianStorage = await GuardianStorage.new(); - token = await ERC20.new([owner], 10, 18); - - baseModule = await BaseModule.new(registry.address, guardianStorage.address); - }); - - describe("Recover tokens", async () => { - it("should be able to recover ERC20 tokens sent to the module", async () => { - let balance = await token.balanceOf(baseModule.address); - assert.equal(balance, 0); - - await token.transfer(baseModule.address, 10000000, { from: owner }); - balance = await token.balanceOf(baseModule.address); - assert.equal(balance, 10000000); - - await baseModule.recoverToken(token.address); - - balance = await token.balanceOf(baseModule.address); - assert.equal(balance, 0); - - const moduleregistryBalance = await token.balanceOf(registry.address); - assert.equal(moduleregistryBalance, 10000000); - }); - - it("should be able to recover non-ERC20 compliant tokens sent to the module", async () => { - const nonCompliantToken = await NonCompliantERC20.new(); - await nonCompliantToken.mint(baseModule.address, 10000000); - let balance = await nonCompliantToken.balanceOf(baseModule.address); - assert.equal(balance, 10000000); - - await baseModule.recoverToken(nonCompliantToken.address); - - balance = await nonCompliantToken.balanceOf(baseModule.address); - assert.equal(balance, 0); - - const moduleregistryBalance = await nonCompliantToken.balanceOf(registry.address); - assert.equal(moduleregistryBalance, 10000000); - }); - }); -}); diff --git a/test/compoundManager_invest.js b/test/compoundManager_invest.js index 09a0980a5..c0328a0ff 100644 --- a/test/compoundManager_invest.js +++ b/test/compoundManager_invest.js @@ -1,6 +1,7 @@ /* global artifacts */ const { parseEther, formatBytes32String } = require("ethers").utils; const ethers = require("ethers"); +const { BigNumber } = require("bignumber.js"); const utils = require("../utils/utilities.js"); const GuardianStorage = artifacts.require("GuardianStorage"); @@ -145,7 +146,7 @@ contract("Invest Manager with Compound", (accounts) => { const proxy = await Proxy.new(walletImplementation.address); wallet = await BaseWallet.at(proxy.address); await wallet.init(owner, [versionManager.address]); - await versionManager.from(owner).upgradeWallet(wallet.address, await versionManager.lastVersion()); + await versionManager.upgradeWallet(wallet.address, await versionManager.lastVersion(), { from: owner }); }); describe("Environment", () => { diff --git a/test/compoundManager_loan.js b/test/compoundManager_loan.js index 5f234dcbd..3740fa9c2 100644 --- a/test/compoundManager_loan.js +++ b/test/compoundManager_loan.js @@ -2,6 +2,7 @@ const ethers = require("ethers"); const { parseEther } = require("ethers").utils; +const { BigNumber } = require("bignumber.js"); const utils = require("../utils/utilities.js"); const GuardianStorage = artifacts.require("GuardianStorage"); @@ -168,7 +169,7 @@ contract("Loan Module", (accounts) => { const proxy = await Proxy.new(walletImplementation.address); wallet = await BaseWallet.at(proxy.address); await wallet.init(owner, [versionManager.address]); - await versionManager.from(owner).upgradeWallet(wallet.address, await versionManager.lastVersion()); + await versionManager.upgradeWallet(wallet.address, await versionManager.lastVersion(), { from: owner }); }); async function fundWallet({ ethAmount, token1Amount, token2Amount = 0 }) { diff --git a/test/guardianManager.js b/test/guardianManager.js index f91c433be..891dedf33 100644 --- a/test/guardianManager.js +++ b/test/guardianManager.js @@ -66,7 +66,7 @@ contract("GuardianManager", (accounts) => { const proxy = await deployer.deploy(Proxy, {}, walletImplementation.address); wallet = deployer.wrapDeployedContract(BaseWallet, proxy.address); await wallet.init(owner, [versionManager.address]); - await versionManager.from(owner).upgradeWallet(wallet.address, await versionManager.lastVersion()); + await versionManager.upgradeWallet(wallet.address, await versionManager.lastVersion(), { from: owner }); }); describe("Adding Guardians", () => { diff --git a/test/kyber.js b/test/kyber.js index 199a57e04..21b25f02a 100644 --- a/test/kyber.js +++ b/test/kyber.js @@ -1,6 +1,4 @@ /* global artifacts */ -const ethers = require("ethers"); - const KyberNetwork = artifacts.require("KyberNetworkTest"); const ERC20 = artifacts.require("TestERC20"); @@ -32,7 +30,7 @@ contract("KyberNetwork", (accounts) => { const beforeETH = await getBalance(trader); assert.equal(beforeERC20.toNumber(), 0, "trader should have no ERC20"); await kyber.trade(ETH_TOKEN, 10000, erc20.address, trader, - new BigNumber"10000000000000000000000"), 1, "0x0000000000000000000000000000000000000000", { value: 10000, from: trader }); + new BigNumber("10000000000000000000000"), 1, "0x0000000000000000000000000000000000000000", { value: 10000, from: trader }); const afterERC20 = await erc20.balanceOf(trader); const afterETH = await getBalance(trader); assert.equal(beforeETH.sub(afterETH).gt(10000), true, "trader should have exchanged 10000 wei"); diff --git a/test/lockManager.js b/test/lockManager.js index af58a99a1..7f9867914 100644 --- a/test/lockManager.js +++ b/test/lockManager.js @@ -81,7 +81,7 @@ contract("LockManager", (accounts) => { ], []); await wallet.init(owner, [versionManager.address]); - await versionManager.from(owner).upgradeWallet(wallet.address, await versionManager.lastVersion()); + await versionManager.upgradeWallet(wallet.address, await versionManager.lastVersion(), { from: owner }); }); describe("(Un)Lock by EOA guardians", () => { diff --git a/test/makerV2Manager_invest.js b/test/makerV2Manager_invest.js index 7cda45c12..802ba6e47 100644 --- a/test/makerV2Manager_invest.js +++ b/test/makerV2Manager_invest.js @@ -4,6 +4,8 @@ const ethers = require("ethers"); const { deployMaker, deployUniswap, WAD, ETH_PER_DAI, ETH_PER_MKR, } = require("../utils/defi-deployer"); +const RelayManager = require("../utils/relay-manager"); + const Registry = artifacts.require("ModuleRegistry"); const MakerV2Manager = artifacts.require("MakerV2Manager"); const Proxy = artifacts.require("Proxy"); @@ -84,7 +86,7 @@ contract("MakerV2Invest", (accounts) => { wallet = await BaseWallet.at(proxy.address); await wallet.init(owner, [versionManager.address]); - await versionManager.from(owner).upgradeWallet(wallet.address, await versionManager.lastVersion()); + await versionManager.upgradeWallet(wallet.address, await versionManager.lastVersion(), { from: owner }); await sai["mint(address,uint256)"](wallet.address, DAI_SENT.mul(20)); await dai["mint(address,uint256)"](wallet.address, DAI_SENT.mul(20)); }); diff --git a/test/makerV2Manager_loan.js b/test/makerV2Manager_loan.js index 7bbc72e29..859912cc5 100644 --- a/test/makerV2Manager_loan.js +++ b/test/makerV2Manager_loan.js @@ -10,6 +10,7 @@ const { const { parseEther, formatBytes32String } = ethers.utils; const { AddressZero } = ethers.constants; +const RelayManager = require("../utils/relay-manager"); const GemJoin = artifacts.require("GemJoin"); const Registry = artifacts.require("ModuleRegistry"); diff --git a/test/nftTransfer.js b/test/nftTransfer.js index 28ea7dcbd..03ce5553b 100644 --- a/test/nftTransfer.js +++ b/test/nftTransfer.js @@ -85,8 +85,8 @@ contract("NftTransfer", (accounts) => { await wallet1.init(owner1, [versionManager.address]); await wallet2.init(owner2, [versionManager.address]); - await versionManager.from(owner1).upgradeWallet(wallet1.address, await versionManager.lastVersion()); - await versionManager.from(owner2).upgradeWallet(wallet2.address, await versionManager.lastVersion()); + await versionManager.upgradeWallet(wallet1.address, await versionManager.lastVersion(), { from: owner1 }); + await versionManager.upgradeWallet(wallet2.address, await versionManager.lastVersion(), { from: owner2 }); erc721 = await ERC721.new(); await erc721.mint(wallet1.address, tokenId); @@ -107,7 +107,7 @@ contract("NftTransfer", (accounts) => { assert.equal(error, expectedError); } } else { - const txPromise = nftModule + const txPromise = nftFeature .transferNFT(wallet1.address, nftContract.address, recipientAddress, nftId, safe, ZERO_BYTES32, { from: owner1, gasLimit: 300000 }); if (shouldSucceed) { await txPromise; diff --git a/test/proxy.js b/test/proxy.js index 4d5e891b8..958337965 100644 --- a/test/proxy.js +++ b/test/proxy.js @@ -21,7 +21,7 @@ contract("Proxy", (accounts) => { async function deployTestModule() { const module = await VersionManager.new( - registry.contractAddress, + registry.address, ethers.constants.AddressZero, ethers.constants.AddressZero, ethers.constants.AddressZero, diff --git a/test/recoveryManager.js b/test/recoveryManager.js index a13964f7f..61ef7af67 100644 --- a/test/recoveryManager.js +++ b/test/recoveryManager.js @@ -100,7 +100,7 @@ contract("RecoveryManager", (accounts) => { ], []); await wallet.init(owner, [versionManager.address]); - await versionManager.from(owner).upgradeWallet(wallet.address, await versionManager.lastVersion()); + await versionManager.upgradeWallet(wallet.address, await versionManager.lastVersion(), { from: owner }); }); async function addGuardians(guardians) { diff --git a/test/relayer.js b/test/relayer.js index e0c4ced9f..50fdc04e1 100644 --- a/test/relayer.js +++ b/test/relayer.js @@ -129,7 +129,7 @@ contract("RelayerManager", (accounts) => { } await wallet.init(owner, [versionManager.address]); - await versionManager.from(owner).upgradeWallet(wallet.address, await versionManager.lastVersion()); + await versionManager.upgradeWallet(wallet.address, await versionManager.lastVersion(), { from: owner }); }); describe("relaying feature transactions", () => { @@ -151,7 +151,7 @@ contract("RelayerManager", (accounts) => { await versionManager.addVersion([testFeature.address], []); const wrongWallet = await deployer.deploy(BaseWallet); await wrongWallet.init(owner, [versionManager.address]); - await versionManager.from(owner).upgradeWallet(wrongWallet.address, await versionManager.lastVersion()); + await versionManager.upgradeWallet(wrongWallet.address, await versionManager.lastVersion(), { from: owner }); const params = [wrongWallet.address, 2]; const txReceipt = await manager.relay(testFeature, "setIntOwnerOnly", params, wrongWallet, [owner]); const { success, error } = parseRelayReceipt(txReceipt); diff --git a/test/simpleUpgrader.js b/test/simpleUpgrader.js index 0426186fd..38c36a36d 100644 --- a/test/simpleUpgrader.js +++ b/test/simpleUpgrader.js @@ -67,7 +67,7 @@ contract("SimpleUpgrader", (accounts) => { // and a second accepting an array of addresses. Behaviour as to which overload is selected to run // differs between CI and Coverage environments, adjusted for this here // todo: confirm the above still stands? - const isRegistered = await registry.isRegisteredModule(initialModule.address); + const isRegistered = await registry.isRegisteredModule([initialModule.address]); assert.equal(isRegistered, true, "module1 should be registered"); const info = await registry.moduleInfo(initialModule.address); assert.equal(parseBytes32String(info), name, "module1 should be registered with the correct name"); @@ -82,7 +82,7 @@ contract("SimpleUpgrader", (accounts) => { await registry.registerModule(moduleToAdd.address, formatBytes32String("added")); await wallet.init(owner, [initialModule.address]); - await initialModule.from(owner).upgradeWallet(wallet.address, await initialModule.lastVersion()); + await initialModule.upgradeWallet(wallet.address, await initialModule.lastVersion(), { from: owner }); let isAuthorised = await wallet.authorised(initialModule.address); assert.equal(isAuthorised, true, "initial module should be authorised"); // add module to wallet @@ -100,7 +100,7 @@ contract("SimpleUpgrader", (accounts) => { await registry.registerModule(initialModule.address, formatBytes32String("initial")); await wallet.init(owner, [initialModule.address]); - await initialModule.from(owner).upgradeWallet(wallet.address, await initialModule.lastVersion()); + await initialModule.upgradeWallet(wallet.address, await initialModule.lastVersion(), { from: owner }); let isAuthorised = await wallet.authorised(initialModule.address); assert.equal(isAuthorised, true, "initial module should be authorised"); // try (and fail) to add moduleToAdd to wallet @@ -116,7 +116,7 @@ contract("SimpleUpgrader", (accounts) => { await registry.registerModule(moduleV1.address, formatBytes32String("V1")); await wallet.init(owner, [moduleV1.address]); - await moduleV1.from(owner).upgradeWallet(wallet.address, await moduleV1.lastVersion()); + await moduleV1.upgradeWallet(wallet.address, await moduleV1.lastVersion(), { from: owner }); // create module V2 const { module: moduleV2 } = await deployTestModule(); // create upgrader @@ -154,7 +154,7 @@ contract("SimpleUpgrader", (accounts) => { const proxy = await Proxy.new(walletImplementation.address); wallet = await BaseWallet.at(proxy.address); await wallet.init(owner, [moduleV1.address]); - await moduleV1.from(owner).upgradeWallet(wallet.address, await moduleV1.lastVersion()); + await moduleV1.upgradeWallet(wallet.address, await moduleV1.lastVersion(), { from: owner }); // create module V2 const { module: moduleV2 } = await deployTestModule(); @@ -187,7 +187,7 @@ contract("SimpleUpgrader", (accounts) => { if (relayed) { txReceipt = await manager.relay(moduleV1, "addModule", params1, wallet, [owner]); const { success } = (await utils.parseLogs(txReceipt, "TransactionExecuted")); - assert.equal(success, useOnlyOwnerModule, "Relayed tx should only have succeeded if an OnlyOwnerModule was used"); + assert.isTrue(success, "Relayed tx should only have succeeded if an OnlyOwnerModule was used"); } else { const tx = await moduleV1.addModule(...params1, { from: owner }); txReceipt = tx.receipt; diff --git a/test/tokenExchanger.js b/test/tokenExchanger.js index e0669678f..53965f9be 100644 --- a/test/tokenExchanger.js +++ b/test/tokenExchanger.js @@ -183,10 +183,10 @@ contract("TokenExchanger", (accounts) => { const proxy = await Proxy.new(walletImplementation.address); wallet = await BaseWallet.at(proxy.address); await wallet.init(owner, [versionManager.address]); - await versionManager.from(owner).upgradeWallet(wallet.address, await versionManager.lastVersion()); + await versionManager.upgradeWallet(wallet.address, await versionManager.lastVersion(), { from: owner }); // fund wallet - await wallet.send(parseEther("0.1")); + await wallet.send(parseEther("0.1").toString()); await tokenA.mint(wallet.address, parseEther("1000")); await tokenB.mint(wallet.address, parseEther("1000")); }); @@ -365,7 +365,7 @@ contract("TokenExchanger", (accounts) => { variableAmount, }); await tokenPriceRegistry.setTradableForTokenList([toToken], [false]); - await assert.revertWith(exchanger.from(owner)[method](...params, { gasLimit: 2000000 }), "TE: Token not tradable"); + await assertrevert(exchanger[method](...params, { gasLimit: 2000000, from: owner }), "TE: Token not tradable"); await tokenPriceRegistry.setTradableForTokenList([toToken], [true]); }); @@ -394,7 +394,7 @@ contract("TokenExchanger", (accounts) => { const proxy = await Proxy.new(oldWalletImplementation.address); const oldWallet = await OldWallet.at(proxy.address); await oldWallet.init(owner, [versionManager.address]); - await versionManager.from(owner).upgradeWallet(oldWallet.address, await versionManager.lastVersion()); + await versionManager.upgradeWallet(oldWallet.address, await versionManager.lastVersion(), { from: owner }); // fund wallet await oldWallet.send(parseEther("0.1")); // call sell/buy diff --git a/test/tokenPriceRegistry.js b/test/tokenPriceRegistry.js index 2b752198d..e5a7cbec2 100644 --- a/test/tokenPriceRegistry.js +++ b/test/tokenPriceRegistry.js @@ -1,53 +1,55 @@ -/* global accounts */ +/* global artifacts */ -const TokenPriceRegistry = require("../build/TokenPriceRegistry"); -const ERC20 = require("../build/TestERC20"); -const TestManager = require("../utils/test-manager"); +const TokenPriceRegistry = artifacts.require("TokenPriceRegistry"); +const ERC20 = artifacts.require("TestERC20"); -describe("TokenPriceRegistry", function () { - this.timeout(100000); - const testManager = new TestManager(); - const deployer = testManager.newDeployer(); - const owner = accounts[0].signer; - const manager = accounts[1].signer; +const { increaseTime, assertRevert } = require("../utils/utilities.js"); + +contract("TokenPriceRegistry", (accounts) => { + const owner = accounts[0]; + const manager = accounts[1]; let tokenAddress; let tokenPriceRegistry; before(async () => { - tokenAddress = (await (await deployer.deploy(ERC20, {}, [], 1, 18)).contractAddress); + const token = await ERC20.new([], 1, 18); + tokenAddress = token.address; }); beforeEach(async () => { - tokenPriceRegistry = await deployer.deploy(TokenPriceRegistry); + tokenPriceRegistry = await TokenPriceRegistry.new(); await tokenPriceRegistry.addManager(manager); await tokenPriceRegistry.setMinPriceUpdatePeriod(3600); }); describe("Price changes", () => { it("lets managers change price after security period", async () => { - await tokenPriceRegistry.from(manager).setPriceForTokenList([tokenAddress], [111111]); + await tokenPriceRegistry.setPriceForTokenList([tokenAddress], [111111], { from: manager }); const beforePrice = await tokenPriceRegistry.getTokenPrice(tokenAddress); assert.equal(beforePrice.toString(), "111111"); - await testManager.increaseTime(3601); - await tokenPriceRegistry.from(manager).setPriceForTokenList([tokenAddress], [222222]); + await increaseTime(3601); + await tokenPriceRegistry.setPriceForTokenList([tokenAddress], [222222], { from: manager }); const afterPrice = await tokenPriceRegistry.getTokenPrice(tokenAddress); assert.equal(afterPrice.toString(), "222222"); }); + it("does not let managers change price with invalid array lengths", async () => { - await assert.revertWith(tokenPriceRegistry.from(manager).setPriceForTokenList([tokenAddress], [222222, 333333]), "TPS: Array length mismatch"); + await assertRevert(tokenPriceRegistry.setPriceForTokenList([tokenAddress], [222222, 333333], { from: manager }), "TPS: Array length mismatch"); }); + it("does not let managers change price before security period", async () => { - await tokenPriceRegistry.from(manager).setPriceForTokenList([tokenAddress], [111111]); - await testManager.increaseTime(3500); - await assert.revertWith(tokenPriceRegistry.from(manager).setPriceForTokenList([tokenAddress], [222222]), "TPS: Price updated too early"); + await tokenPriceRegistry.setPriceForTokenList([tokenAddress], [111111], { from: manager }); + await increaseTime(3500); + await assertRevert(tokenPriceRegistry.setPriceForTokenList([tokenAddress], [222222], { from: manager }), "TPS: Price updated too early"); }); + it("lets the owner change security period", async () => { - await tokenPriceRegistry.from(manager).setPriceForTokenList([tokenAddress], [111111]); - await testManager.increaseTime(1600); - await assert.revertWith(tokenPriceRegistry.from(manager).setPriceForTokenList([tokenAddress], [222222]), "TPS: Price updated too early"); - await tokenPriceRegistry.from(owner).setMinPriceUpdatePeriod(0); - await tokenPriceRegistry.from(manager).setPriceForTokenList([tokenAddress], [222222]); + await tokenPriceRegistry.setPriceForTokenList([tokenAddress], [111111], { from: manager }); + await increaseTime(1600); + await assertRevert(tokenPriceRegistry.setPriceForTokenList([tokenAddress], [222222], { from: manager }), "TPS: Price updated too early"); + await tokenPriceRegistry.setMinPriceUpdatePeriod(0, { from: owner }); + await tokenPriceRegistry.setPriceForTokenList([tokenAddress], [222222], { from: manager }); const afterPrice = await tokenPriceRegistry.getTokenPrice(tokenAddress); assert.equal(afterPrice.toString(), "222222"); }); @@ -55,25 +57,25 @@ describe("TokenPriceRegistry", function () { describe("Tradable status changes", () => { it("lets the owner change tradable status", async () => { - await tokenPriceRegistry.from(owner).setTradableForTokenList([tokenAddress], [true]); + await tokenPriceRegistry.setTradableForTokenList([tokenAddress], [true], { from: owner }); let tradable = await tokenPriceRegistry.isTokenTradable(tokenAddress); assert.isTrue(tradable); - await tokenPriceRegistry.from(owner).setTradableForTokenList([tokenAddress], [false]); + await tokenPriceRegistry.setTradableForTokenList([tokenAddress], [false], { from: owner }); tradable = await tokenPriceRegistry.isTokenTradable(tokenAddress); assert.isFalse(tradable); - await tokenPriceRegistry.from(owner).setTradableForTokenList([tokenAddress], [true]); + await tokenPriceRegistry.setTradableForTokenList([tokenAddress], [true], { from: owner }); tradable = await tokenPriceRegistry.isTokenTradable(tokenAddress); assert.isTrue(tradable); }); it("lets managers set tradable to false only", async () => { - await tokenPriceRegistry.from(owner).setTradableForTokenList([tokenAddress], [true]); - await tokenPriceRegistry.from(manager).setTradableForTokenList([tokenAddress], [false]); + await tokenPriceRegistry.setTradableForTokenList([tokenAddress], [true], { from: owner }); + await tokenPriceRegistry.setTradableForTokenList([tokenAddress], [false], { from: manager }); const tradable = await tokenPriceRegistry.isTokenTradable(tokenAddress); assert.isFalse(tradable); - await assert.revertWith(tokenPriceRegistry.from(manager).setTradableForTokenList([tokenAddress], [true]), "TPS: Unauthorised"); + await assertRevert(tokenPriceRegistry.setTradableForTokenList([tokenAddress], [true], { from: manager }), "TPS: Unauthorised"); }); it("does not let managers change tradable with invalid array lengths", async () => { - await assert.revertWith(tokenPriceRegistry.from(manager).setTradableForTokenList([tokenAddress], [false, false]), "TPS: Array length mismatch"); + await assertRevert(tokenPriceRegistry.setTradableForTokenList([tokenAddress], [false, false], { from: manager }), "TPS: Array length mismatch"); }); }); }); diff --git a/test/transferManager.js b/test/transferManager.js index 7c0aee297..d02896bb7 100644 --- a/test/transferManager.js +++ b/test/transferManager.js @@ -2,6 +2,7 @@ const ethers = require("ethers"); const chai = require("chai"); +const { BigNumber } = require("bignumber.js"); const BN = require("bn.js"); const bnChai = require("bn-chai"); diff --git a/test/upgraderToVersionManager.js b/test/upgraderToVersionManager.js index 0db607235..59756c204 100644 --- a/test/upgraderToVersionManager.js +++ b/test/upgraderToVersionManager.js @@ -1,34 +1,33 @@ -/* global accounts */ +/* global artifacts */ const ethers = require("ethers"); -const Proxy = require("../build/Proxy"); -const BaseWallet = require("../build/BaseWallet"); -const Registry = require("../build/ModuleRegistry"); -const VersionManager = require("../build/VersionManager"); -const TransferStorage = require("../build/TransferStorage"); -const LockStorage = require("../build/LockStorage"); -const GuardianStorage = require("../build/GuardianStorage"); -const LimitStorage = require("../build/LimitStorage"); -const RelayerManager = require("../build/RelayerManager"); -const TransferManager = require("../build/TransferManager"); -const LegacyTransferManager = require("../build-legacy/v1.6.0/TransferManager"); -const UpgraderToVersionManager = require("../build/UpgraderToVersionManager"); +const Proxy = artifacts.require("Proxy"); +const BaseWallet = artifacts.require("BaseWallet"); +const Registry = artifacts.require("ModuleRegistry"); +const VersionManager = artifacts.require("VersionManager"); +const TransferStorage = artifacts.require("TransferStorage"); +const LockStorage = artifacts.require("LockStorage"); +const GuardianStorage = artifacts.require("GuardianStorage"); +const LimitStorage = artifacts.require("LimitStorage"); +const RelayerManager = artifacts.require("RelayerManager"); +const TransferManager = artifacts.require("TransferManager"); +const LegacyTransferManager = artifacts.require("legacy/v1.6.0/TransferManager"); +const UpgraderToVersionManager = artifacts.require("UpgraderToVersionManager"); const SECURITY_PERIOD = 3600; const SECURITY_WINDOW = 3600; const ETH_LIMIT = 1000000; +const { assertRevert } = require("../utils/utilities.js"); const RelayManager = require("../utils/relay-manager"); -describe("UpgraderToVersionManager", function () { - this.timeout(100000); +contract("UpgraderToVersionManager", (accounts) => { const manager = new RelayManager(); - const owner = accounts[1].signer; - const recipient = accounts[2].signer; + const owner = accounts[1]; + const recipient = accounts[2]; - let deployer; let transferStorage; let lockStorage; let guardianStorage; @@ -42,18 +41,17 @@ describe("UpgraderToVersionManager", function () { let upgrader; before(async () => { - deployer = manager.newDeployer(); - walletImplementation = await deployer.deploy(BaseWallet); - const registry = await deployer.deploy(Registry); - lockStorage = await deployer.deploy(LockStorage); - guardianStorage = await deployer.deploy(GuardianStorage); - transferStorage = await deployer.deploy(TransferStorage); + walletImplementation = await BaseWallet.new(); + const registry = await Registry.new(); + lockStorage = await LockStorage.new(); + guardianStorage = await GuardianStorage.new(); + transferStorage = await TransferStorage.new(); // Deploy old architecture - previousTransferManager = await deployer.deploy(LegacyTransferManager, {}, - registry.contractAddress, - transferStorage.contractAddress, - guardianStorage.contractAddress, + previousTransferManager = await LegacyTransferManager.new( + registry.address, + transferStorage.address, + guardianStorage.address, ethers.constants.AddressZero, SECURITY_PERIOD, SECURITY_WINDOW, @@ -61,53 +59,53 @@ describe("UpgraderToVersionManager", function () { ethers.constants.AddressZero); // Deploy new modules - limitStorage = await deployer.deploy(LimitStorage); - versionManager = await deployer.deploy(VersionManager, {}, - registry.contractAddress, - lockStorage.contractAddress, - guardianStorage.contractAddress, - transferStorage.contractAddress, - limitStorage.contractAddress); - upgrader = await deployer.deploy(UpgraderToVersionManager, {}, - registry.contractAddress, - lockStorage.contractAddress, - [previousTransferManager.contractAddress], // toDisable - versionManager.contractAddress); - await registry.registerModule(versionManager.contractAddress, ethers.utils.formatBytes32String("VersionManager")); - await registry.registerModule(upgrader.contractAddress, ethers.utils.formatBytes32String("Upgrader")); + limitStorage = await LimitStorage.new(); + versionManager = await VersionManager.new( + registry.address, + lockStorage.address, + guardianStorage.address, + transferStorage.address, + limitStorage.address); + upgrader = await UpgraderToVersionManager.new( + registry.address, + lockStorage.address, + [previousTransferManager.address], // toDisable + versionManager.address); + await registry.registerModule(versionManager.address, ethers.utils.formatBytes32String("VersionManager")); + await registry.registerModule(upgrader.address, ethers.utils.formatBytes32String("Upgrader")); // Deploy new features - transferManager = await deployer.deploy(TransferManager, {}, - lockStorage.contractAddress, - transferStorage.contractAddress, - limitStorage.contractAddress, + transferManager = await TransferManager.new( + lockStorage.address, + transferStorage.address, + limitStorage.address, ethers.constants.AddressZero, - versionManager.contractAddress, + versionManager.address, SECURITY_PERIOD, SECURITY_WINDOW, ETH_LIMIT, ethers.constants.AddressZero, - previousTransferManager.contractAddress); - relayerManager = await deployer.deploy(RelayerManager, {}, - lockStorage.contractAddress, - guardianStorage.contractAddress, - limitStorage.contractAddress, + previousTransferManager.address); + relayerManager = await RelayerManager.new( + lockStorage.address, + guardianStorage.address, + limitStorage.address, ethers.constants.AddressZero, - versionManager.contractAddress); + versionManager.address); manager.setRelayerManager(relayerManager); - await versionManager.addVersion([transferManager.contractAddress, relayerManager.contractAddress], [transferManager.contractAddress]); + await versionManager.addVersion([transferManager.address, relayerManager.address], [transferManager.address]); }); it("should fail to upgrade a pre-VersionManager wallet to a version lower than minVersion", async () => { - const proxy = await deployer.deploy(Proxy, {}, walletImplementation.contractAddress); - wallet = deployer.wrapDeployedContract(BaseWallet, proxy.contractAddress); - await wallet.init(owner, [previousTransferManager.contractAddress]); + const proxy = await Proxy.new(walletImplementation.address); + wallet = await BaseWallet.at(proxy.address); + await wallet.init(owner, [previousTransferManager.address]); const prevVersion = await versionManager.lastVersion(); await versionManager.addVersion([], []); const lastVersion = await versionManager.lastVersion(); await versionManager.setMinVersion(lastVersion); - await assert.revertWith( - previousTransferManager.from(owner).addModule(wallet.contractAddress, upgrader.contractAddress), + await assertRevert( + previousTransferManager.addModule(wallet.address, upgrader.address, { from: owner }), "VM: invalid _toVersion", ); await versionManager.setMinVersion(prevVersion); @@ -115,27 +113,27 @@ describe("UpgraderToVersionManager", function () { describe("After migrating a pre-VersionManager wallet", () => { beforeEach(async () => { - const proxy = await deployer.deploy(Proxy, {}, walletImplementation.contractAddress); - wallet = deployer.wrapDeployedContract(BaseWallet, proxy.contractAddress); + const proxy = await Proxy.new(walletImplementation.address); + wallet = await BaseWallet.at(proxy.address); - await wallet.init(owner, [previousTransferManager.contractAddress]); - await previousTransferManager.from(owner).addModule(wallet.contractAddress, upgrader.contractAddress); + await wallet.init(owner, [previousTransferManager.address]); + await previousTransferManager.addModule(wallet.address, upgrader.address, { from: owner }); }); it("should add/remove an account to/from the whitelist", async () => { - await transferManager.from(owner).addToWhitelist(wallet.contractAddress, recipient); + await transferManager.addToWhitelist(wallet.address, recipient, { from: owner }); await manager.increaseTime(SECURITY_PERIOD + 1); - let isTrusted = await transferManager.isWhitelisted(wallet.contractAddress, recipient); + let isTrusted = await transferManager.isWhitelisted(wallet.address, recipient); assert.equal(isTrusted, true, "should be trusted after the security period"); - await transferManager.from(owner).removeFromWhitelist(wallet.contractAddress, recipient); - isTrusted = await transferManager.isWhitelisted(wallet.contractAddress, recipient); + await transferManager.removeFromWhitelist(wallet.address, recipient, { from: owner }); + isTrusted = await transferManager.isWhitelisted(wallet.address, recipient); assert.equal(isTrusted, false, "should no removed from whitelist immediately"); }); it("should change the limit via relayed transaction", async () => { - await manager.relay(transferManager, "changeLimit", [wallet.contractAddress, 4000000], wallet, [owner]); + await manager.relay(transferManager, "changeLimit", [wallet.address, 4000000], wallet, [owner]); await manager.increaseTime(SECURITY_PERIOD + 1); - const limit = await transferManager.getCurrentLimit(wallet.contractAddress); + const limit = await transferManager.getCurrentLimit(wallet.address); assert.equal(limit.toNumber(), 4000000, "limit should be changed"); }); }); diff --git a/test/versionManager.js b/test/versionManager.js index 0e7432421..5252d5850 100644 --- a/test/versionManager.js +++ b/test/versionManager.js @@ -1,31 +1,28 @@ -/* global accounts */ +/* global artifacts */ const ethers = require("ethers"); - -const GuardianManager = require("../build/GuardianManager"); -const LockStorage = require("../build/LockStorage"); -const GuardianStorage = require("../build/GuardianStorage"); -const Proxy = require("../build/Proxy"); -const BaseWallet = require("../build/BaseWallet"); -const RelayerManager = require("../build/RelayerManager"); -const VersionManager = require("../build/VersionManager"); -const TransferStorage = require("../build/TransferStorage"); -const LimitStorage = require("../build/LimitStorage"); -const TokenPriceRegistry = require("../build/TokenPriceRegistry"); -const TransferManager = require("../build/TransferManager"); -const Registry = require("../build/ModuleRegistry"); -const TestFeature = require("../build/TestFeature"); -const UpgraderToVersionManager = require("../build/UpgraderToVersionManager"); - +const GuardianManager = artifacts.require("GuardianManager"); +const LockStorage = artifacts.require("LockStorage"); +const GuardianStorage = artifacts.require("GuardianStorage"); +const Proxy = artifacts.require("Proxy"); +const BaseWallet = artifacts.require("BaseWallet"); +const RelayerManager = artifacts.require("RelayerManager"); +const VersionManager = artifacts.require("VersionManager"); +const Registry = artifacts.require("ModuleRegistry"); +const TestFeature = artifacts.require("TestFeature"); +const TransferStorage = artifacts.require("TransferStorage"); +const LimitStorage = artifacts.require("LimitStorage"); +const TokenPriceRegistry = artifacts.require("TokenPriceRegistry"); +const TransferManager = artifacts.require("TransferManager"); +const UpgraderToVersionManager = artifacts.require("UpgraderToVersionManager"); + +const { assertRevert } = require("../utils/utilities.js"); const RelayManager = require("../utils/relay-manager"); -describe("VersionManager", function () { - this.timeout(100000); +contract("VersionManager", (accounts) => { const manager = new RelayManager(accounts); + const owner = accounts[1]; - const owner = accounts[1].signer; - - let deployer; let wallet; let walletImplementation; let registry; @@ -37,66 +34,67 @@ describe("VersionManager", function () { let testFeature; before(async () => { - deployer = manager.newDeployer(); - walletImplementation = await deployer.deploy(BaseWallet); + walletImplementation = await BaseWallet.new(); }); beforeEach(async () => { - registry = await deployer.deploy(Registry); - lockStorage = await deployer.deploy(LockStorage); - guardianStorage = await deployer.deploy(GuardianStorage); - versionManager = await deployer.deploy(VersionManager, {}, - registry.contractAddress, - lockStorage.contractAddress, - guardianStorage.contractAddress, + registry = await Registry.new(); + lockStorage = await LockStorage.new(); + guardianStorage = await GuardianStorage.new(); + versionManager = await VersionManager.new( + registry.address, + lockStorage.address, + guardianStorage.address, ethers.constants.AddressZero, ethers.constants.AddressZero); - relayerManager = await deployer.deploy(RelayerManager, {}, - lockStorage.contractAddress, - guardianStorage.contractAddress, + relayerManager = await RelayerManager.new( + lockStorage.address, + guardianStorage.address, ethers.constants.AddressZero, ethers.constants.AddressZero, - versionManager.contractAddress); - guardianManager = await deployer.deploy(GuardianManager, {}, - lockStorage.contractAddress, - guardianStorage.contractAddress, - versionManager.contractAddress, + versionManager.address); + guardianManager = await GuardianManager.new( + lockStorage.address, + guardianStorage.address, + versionManager.address, 24, 12); - testFeature = await deployer.deploy(TestFeature, {}, - lockStorage.contractAddress, - versionManager.contractAddress, + testFeature = await TestFeature.new( + lockStorage.address, + versionManager.address, 42); - await versionManager.addVersion([guardianManager.contractAddress, relayerManager.contractAddress, testFeature.contractAddress], []); + await versionManager.addVersion([guardianManager.address, relayerManager.address, testFeature.address], []); manager.setRelayerManager(relayerManager); - const proxy = await deployer.deploy(Proxy, {}, walletImplementation.contractAddress); - wallet = deployer.wrapDeployedContract(BaseWallet, proxy.contractAddress); - await wallet.init(owner, [versionManager.contractAddress]); - await versionManager.from(owner).upgradeWallet(wallet.contractAddress, await versionManager.lastVersion()); + const proxy = await Proxy.new(walletImplementation.address); + wallet = await BaseWallet.at(proxy.address); + await wallet.init(owner, [versionManager.address]); + await versionManager.upgradeWallet(wallet.address, await versionManager.lastVersion(), { from: owner }); }); describe("VersionManager owner", () => { it("should not let the VersionManager owner add a storage twice", async () => { - await assert.revertWith(versionManager.addStorage(lockStorage.contractAddress), "VM: storage already added"); + await assertRevert(versionManager.addStorage(lockStorage.address), "VM: storage already added"); }); it("should not let the VersionManager owner add an inconsistent version", async () => { // Should fail: the _featuresToInit array includes a feature not listed in the _features array - await assert.revertWith( - versionManager.addVersion([relayerManager.contractAddress], [guardianManager.contractAddress]), + await assertRevert( + versionManager.addVersion([relayerManager.address], [guardianManager.address]), "VM: invalid _featuresToInit", ); }); it("should not let the VersionManager owner set an invalid minVersion", async () => { const lastVersion = await versionManager.lastVersion(); - await assert.revertWith( + + await assertRevert( versionManager.setMinVersion(0), "VM: invalid _minVersion", ); - await assert.revertWith( - versionManager.setMinVersion(lastVersion.add(1)), + + await assertRevert( + versionManager.setMinVersion(lastVersion.addn(1)), "VM: invalid _minVersion", ); }); @@ -104,16 +102,16 @@ describe("VersionManager", function () { describe("Wallet owner", () => { it("should not let the relayer call a forbidden method", async () => { - await assert.revertWith( - manager.relay(versionManager, "setOwner", [wallet.contractAddress, owner], wallet, [owner]), + await assertRevert( + manager.relay(versionManager, "setOwner", [wallet.address, owner], wallet, [owner]), "VM: unknown method", ); }); it("should fail to upgrade a wallet when already on the last version", async () => { const lastVersion = await versionManager.lastVersion(); - await assert.revertWith( - versionManager.from(owner).upgradeWallet(wallet.contractAddress, lastVersion), + await assertRevert( + versionManager.upgradeWallet(wallet.address, lastVersion, { from: owner }), "VM: already on new version", ); }); @@ -123,29 +121,31 @@ describe("VersionManager", function () { await versionManager.addVersion([], []); await versionManager.setMinVersion(await versionManager.lastVersion()); - await assert.revertWith( - versionManager.from(owner).upgradeWallet(wallet.contractAddress, badVersion), + await assertRevert( + versionManager.upgradeWallet(wallet.address, badVersion, { from: owner }), "VM: invalid _toVersion", ); }); it("should not let a feature call an unauthorised storage", async () => { // Note: we are calling the deprecated GuardianStorage.setLock so this particular method gets touched by coverage - const data1 = guardianStorage.contract.interface.functions.setLock.encode([wallet.contractAddress, 1]); - await testFeature.from(owner).invokeStorage(wallet.contractAddress, guardianStorage.contractAddress, data1); - let lock = await guardianStorage.getLock(wallet.contractAddress); + const data1 = guardianStorage.contract.methods.setLock(wallet.address, 1).encodeABI(); + + await testFeature.invokeStorage(wallet.address, guardianStorage.address, data1, { from: owner }); + let lock = await guardianStorage.getLock(wallet.address); assert.isTrue(lock.eq(1), "Lock should have been set"); - const data0 = guardianStorage.contract.interface.functions.setLock.encode([wallet.contractAddress, 0]); - await testFeature.from(owner).invokeStorage(wallet.contractAddress, guardianStorage.contractAddress, data0); - lock = await guardianStorage.getLock(wallet.contractAddress); + const data0 = guardianStorage.contract.methods.setLock(wallet.address, 0).encodeABI(); + + await testFeature.invokeStorage(wallet.address, guardianStorage.address, data0, { from: owner }); + lock = await guardianStorage.getLock(wallet.address); assert.isTrue(lock.eq(0), "Lock should have been unset"); - const newGuardianStorage = await deployer.deploy(GuardianStorage); // not authorised in VersionManager - await assert.revertWith( - testFeature.from(owner).invokeStorage(wallet.contractAddress, newGuardianStorage.contractAddress, data1), + const newGuardianStorage = await GuardianStorage.new(); // not authorised in VersionManager + await assertRevert( + testFeature.invokeStorage(wallet.address, newGuardianStorage.address, data1, { from: owner }), "VM: invalid storage invoked", ); - lock = await newGuardianStorage.getLock(wallet.contractAddress); + lock = await newGuardianStorage.getLock(wallet.address); assert.isTrue(lock.eq(0), "Lock should not be set"); }); diff --git a/utils/defi-deployer.js b/utils/defi-deployer.js index a9b5d7b88..f6164dfdd 100644 --- a/utils/defi-deployer.js +++ b/utils/defi-deployer.js @@ -1,8 +1,8 @@ /* global artifacts */ const { parseEther, formatBytes32String } = require("ethers").utils; -const ethers = require("ethers"); const web3 = require("web3"); +const { BigNumber } = require("bignumber.js"); const UniswapFactory = require("../lib/uniswap/UniswapFactory"); const UniswapExchange = require("../lib/uniswap/UniswapExchange"); @@ -23,13 +23,13 @@ const DaiJoin = artifacts.require("DaiJoin"); const RAY = new BigNumber("1000000000000000000000000000"); // 10**27 const WAD = new BigNumber("1000000000000000000"); // 10**18 -const RAD = RAY.mul(WAD); +const RAD = RAY.times(WAD); const USD_PER_DAI = RAY; // 1 DAI = 1 USD -const USD_PER_ETH = WAD.mul(100); // 1 ETH = 100 USD -const USD_PER_MKR = WAD.mul(400); // 1 MKR = 400 USD -const ETH_PER_MKR = WAD.mul(USD_PER_MKR).div(USD_PER_ETH); // 1 MKR = 4 ETH -const ETH_PER_DAI = WAD.mul(USD_PER_DAI).div(RAY).mul(WAD).div(USD_PER_ETH); // 1 DAI = 0.01 ETH -const MAT = RAY.mul(3).div(2); // collateralizsation ratio = 150% +const USD_PER_ETH = WAD.times(100); // 1 ETH = 100 USD +const USD_PER_MKR = WAD.times(400); // 1 MKR = 400 USD +const ETH_PER_MKR = WAD.times(USD_PER_MKR).div(USD_PER_ETH); // 1 MKR = 4 ETH +const ETH_PER_DAI = WAD.times(USD_PER_DAI).div(RAY).times(WAD).div(USD_PER_ETH); // 1 DAI = 0.01 ETH +const MAT = RAY.times(3).div(2); // collateralizsation ratio = 150% module.exports = { RAY, diff --git a/utils/relay-manager.js b/utils/relay-manager.js index 3214df93e..98ec0008b 100644 --- a/utils/relay-manager.js +++ b/utils/relay-manager.js @@ -19,6 +19,7 @@ class RelayManager { const nonce = _nonce || await getNonceForRelay(); const methodData = _module.contract.methods[_method](..._params).encodeABI(); const networkId = await getNetworkId(); + console.log("networkId", networkId) const signatures = await signOffchain( _signers, this.relayerManager.address, diff --git a/utils/utilities.js b/utils/utilities.js index acd68cd5b..b1fcf6e0f 100644 --- a/utils/utilities.js +++ b/utils/utilities.js @@ -81,7 +81,8 @@ module.exports = { // Parses the RelayerModule.execute receipt to decompose the success value of the transaction // and additionally if an error was raised in the sub-call to optionally return that parseRelayReceipt(txReceipt) { - const { args } = txReceipt.logs.filter((e) => e.event === "TransactionExecuted").args; + const { args } = txReceipt.logs.find((e) => e.event === "TransactionExecuted"); + console.log("args", args) let errorBytes; if (args.returnData.startsWith("0x08c379a0")) { @@ -154,10 +155,12 @@ module.exports = { }, async getNetworkId() { - // if (this.network === "ganache" || this.network.endsWith("-fork")) { - // return 1; // ganache currently always uses 1 as chainId, see https://github.com/trufflesuite/ganache-core/issues/515 - // } - const networkId = await web3.eth.net.getId(); + return 1; + console.log("this.network", this.network) + if (this.network === "ganache" || this.network.endsWith("-fork")) { + return 1; // ganache currently always uses 1 as chainId, see https://github.com/trufflesuite/ganache-core/issues/515 + } + const networkId = await web3.eth.net.getId(); // this gets the network Id not the chain id return networkId; }, From a27161331f23a69409dc9bea446aae0a27001813 Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Fri, 16 Oct 2020 11:13:01 +0300 Subject: [PATCH 038/113] Upgrade ganache-cli to allow chainId option Update utils to return chainId and update tests to use that --- package-lock.json | 233 +++++++++++++++++----------------------- package.json | 10 +- test/recoveryManager.js | 4 +- utils/relay-manager.js | 7 +- utils/utilities.js | 17 ++- 5 files changed, 119 insertions(+), 152 deletions(-) diff --git a/package-lock.json b/package-lock.json index c166fdfd0..0554fbbec 100644 --- a/package-lock.json +++ b/package-lock.json @@ -271,13 +271,6 @@ "@ethersproject/transactions": "^5.0.5", "aes-js": "3.0.0", "scrypt-js": "3.0.1" - }, - "dependencies": { - "scrypt-js": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz", - "integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==" - } } }, "@ethersproject/keccak256": { @@ -371,6 +364,17 @@ "@ethersproject/bytes": "^5.0.4", "@ethersproject/logger": "^5.0.5", "hash.js": "1.1.3" + }, + "dependencies": { + "hash.js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", + "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.0" + } + } } }, "@ethersproject/signing-key": { @@ -382,27 +386,6 @@ "@ethersproject/logger": "^5.0.5", "@ethersproject/properties": "^5.0.3", "elliptic": "6.5.3" - }, - "dependencies": { - "bn.js": { - "version": "4.11.9", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" - }, - "elliptic": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz", - "integrity": "sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==", - "requires": { - "bn.js": "^4.4.0", - "brorand": "^1.0.1", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.0" - } - } } }, "@ethersproject/solidity": { @@ -537,9 +520,9 @@ "dev": true }, "@types/node": { - "version": "12.12.68", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.68.tgz", - "integrity": "sha512-3RW2s24ewB7F9dAHvgb9FRvNHn6nO9IK6Eaknbz7HTOe2a5GVne5XbUh5+YA+kcCn67glyHhClUUdFP73LWrgQ==" + "version": "14.11.11", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.11.11.tgz", + "integrity": "sha512-UcaAZrL8uO5GNS+NLxkYg1RiOMgdLxCXGqs+TTupltXN8rTvUEKTOpqCV3tlcAIZJXzcBQajzmjdrvuPvnuMUw==" }, "@types/parse-json": { "version": "4.0.0", @@ -997,29 +980,6 @@ "parse-asn1": "^5.1.5", "readable-stream": "^3.6.0", "safe-buffer": "^5.2.0" - }, - "dependencies": { - "elliptic": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz", - "integrity": "sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==", - "requires": { - "bn.js": "^4.4.0", - "brorand": "^1.0.1", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.0" - }, - "dependencies": { - "bn.js": { - "version": "4.11.9", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" - } - } - } } }, "bs58": { @@ -1066,6 +1026,13 @@ "integrity": "sha512-xowrxvpxojqkagPcWRQVXZl0YXhRhAtBEIq3VoER1NH5Mw1n1o0ojdspp+GS2J//2gCVyrzQDApQ4unGF+QOoA==", "requires": { "node-gyp-build": "~3.7.0" + }, + "dependencies": { + "node-gyp-build": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-3.7.0.tgz", + "integrity": "sha512-L/Eg02Epx6Si2NXmedx+Okg+4UHqmaf3TNcxd50SF9NQGcJaON3AtU++kax69XV7YWz4tUspqZSAsVofhFKG2w==" + } } }, "bytes": { @@ -1514,20 +1481,6 @@ "version": "4.11.9", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" - }, - "elliptic": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz", - "integrity": "sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==", - "requires": { - "bn.js": "^4.4.0", - "brorand": "^1.0.1", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.0" - } } } }, @@ -1760,9 +1713,9 @@ "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" }, "elliptic": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.2.tgz", - "integrity": "sha512-f4x70okzZbIQl/NSRLkI/+tteV/9WqL98zx+SQ69KbXxmVrmjwsNUPn/gYJJ0sHvEak24cZgHIPegRePAtA/xw==", + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz", + "integrity": "sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==", "requires": { "bn.js": "^4.4.0", "brorand": "^1.0.1", @@ -2555,27 +2508,6 @@ "scrypt-js": "^3.0.0", "secp256k1": "^4.0.1", "setimmediate": "^1.0.5" - }, - "dependencies": { - "hash.js": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", - "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", - "requires": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" - } - }, - "scrypt-js": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz", - "integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==" - }, - "setimmediate": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", - "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=" - } } }, "ethereumjs-common": { @@ -2614,9 +2546,9 @@ } }, "ethereumjs-util": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.0.4.tgz", - "integrity": "sha512-isldtbCn9fdnhBPxedMNbFkNWVZ8ZdQvKRDSrdflame/AycAPKMer+vEpndpBxYIB3qxN6bd3Gh1YCQW9LDkCQ==", + "version": "7.0.7", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.0.7.tgz", + "integrity": "sha512-vU5rtZBlZsgkTw3o6PDKyB8li2EgLavnAbsKcfsH2YhHH1Le+PP8vEiMnAnvgc1B6uMoaM5GDCrVztBw0Q5K9g==", "requires": { "@types/bn.js": "^4.11.3", "bn.js": "^5.1.2", @@ -2648,6 +2580,20 @@ "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" }, + "elliptic": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.2.tgz", + "integrity": "sha512-f4x70okzZbIQl/NSRLkI/+tteV/9WqL98zx+SQ69KbXxmVrmjwsNUPn/gYJJ0sHvEak24cZgHIPegRePAtA/xw==", + "requires": { + "bn.js": "^4.4.0", + "brorand": "^1.0.1", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.0" + } + }, "ethers": { "version": "git+https://github.com/LimeChain/ethers.js.git#7eceb12e0a05ed1e44834556f6a32e20918abf1b", "from": "git+https://github.com/LimeChain/ethers.js.git#master", @@ -2663,6 +2609,25 @@ "xmlhttprequest": "1.8.0" } }, + "hash.js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", + "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.0" + } + }, + "scrypt-js": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-2.0.4.tgz", + "integrity": "sha512-4KsaGcPnuhtCZQCxFxN3GVYIhKFPTdLd8PLC552XwbMndtD0cjRFAhDuuydXQ0h08ZfPgzqe6EKHozpuH74iDw==" + }, + "setimmediate": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.4.tgz", + "integrity": "sha1-IOgd5iLUoCWIzgyNqJc8vPHTE48=" + }, "uuid": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.1.tgz", @@ -3945,12 +3910,12 @@ } }, "hash.js": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", - "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", "requires": { "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.0" + "minimalistic-assert": "^1.0.1" } }, "he": { @@ -4578,13 +4543,6 @@ "requires": { "node-addon-api": "^2.0.0", "node-gyp-build": "^4.2.0" - }, - "dependencies": { - "node-gyp-build": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.2.3.tgz", - "integrity": "sha512-MN6ZpzmfNCRM+3t57PTJHgHyw/h4OWnZ6mR8P5j/uZtqQr46RRuDE/P+g3n0YR/AiYXeWixZZzaip77gdICfRg==" - } } }, "keyv": { @@ -5272,9 +5230,9 @@ "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==" }, "node-gyp-build": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-3.7.0.tgz", - "integrity": "sha512-L/Eg02Epx6Si2NXmedx+Okg+4UHqmaf3TNcxd50SF9NQGcJaON3AtU++kax69XV7YWz4tUspqZSAsVofhFKG2w==" + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.2.3.tgz", + "integrity": "sha512-MN6ZpzmfNCRM+3t57PTJHgHyw/h4OWnZ6mR8P5j/uZtqQr46RRuDE/P+g3n0YR/AiYXeWixZZzaip77gdICfRg==" }, "noop6": { "version": "1.0.9", @@ -6047,9 +6005,9 @@ "integrity": "sha1-e45lYZCyKOgaZq6nSEgNgozS03o=" }, "scrypt-js": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-2.0.4.tgz", - "integrity": "sha512-4KsaGcPnuhtCZQCxFxN3GVYIhKFPTdLd8PLC552XwbMndtD0cjRFAhDuuydXQ0h08ZfPgzqe6EKHozpuH74iDw==" + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz", + "integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==" }, "secp256k1": { "version": "4.0.2", @@ -6059,13 +6017,6 @@ "elliptic": "^6.5.2", "node-addon-api": "^2.0.0", "node-gyp-build": "^4.2.0" - }, - "dependencies": { - "node-gyp-build": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.2.3.tgz", - "integrity": "sha512-MN6ZpzmfNCRM+3t57PTJHgHyw/h4OWnZ6mR8P5j/uZtqQr46RRuDE/P+g3n0YR/AiYXeWixZZzaip77gdICfRg==" - } } }, "semver": { @@ -6162,9 +6113,9 @@ "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" }, "setimmediate": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.4.tgz", - "integrity": "sha1-IOgd5iLUoCWIzgyNqJc8vPHTE48=" + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=" }, "setprototypeof": { "version": "1.1.1", @@ -6866,11 +6817,6 @@ "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=" }, - "setimmediate": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", - "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=" - }, "url-parse-lax": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", @@ -7198,6 +7144,13 @@ "integrity": "sha512-SwV++i2gTD5qh2XqaPzBnNX88N6HdyhQrNNRykvcS0QKvItV9u3vPEJr+X5Hhfb1JC0r0e1alL0iB09rY8+nmw==", "requires": { "node-gyp-build": "~3.7.0" + }, + "dependencies": { + "node-gyp-build": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-3.7.0.tgz", + "integrity": "sha512-L/Eg02Epx6Si2NXmedx+Okg+4UHqmaf3TNcxd50SF9NQGcJaON3AtU++kax69XV7YWz4tUspqZSAsVofhFKG2w==" + } } }, "utf8": { @@ -7279,6 +7232,13 @@ "got": "9.6.0", "swarm-js": "^0.1.40", "underscore": "1.9.1" + }, + "dependencies": { + "@types/node": { + "version": "12.12.68", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.68.tgz", + "integrity": "sha512-3RW2s24ewB7F9dAHvgb9FRvNHn6nO9IK6Eaknbz7HTOe2a5GVne5XbUh5+YA+kcCn67glyHhClUUdFP73LWrgQ==" + } } }, "web3-core": { @@ -7293,6 +7253,13 @@ "web3-core-method": "1.3.0", "web3-core-requestmanager": "1.3.0", "web3-utils": "1.3.0" + }, + "dependencies": { + "@types/node": { + "version": "12.12.68", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.68.tgz", + "integrity": "sha512-3RW2s24ewB7F9dAHvgb9FRvNHn6nO9IK6Eaknbz7HTOe2a5GVne5XbUh5+YA+kcCn67glyHhClUUdFP73LWrgQ==" + } } }, "web3-core-helpers": { @@ -7428,11 +7395,6 @@ "elliptic": "^6.4.0", "xhr-request-promise": "^0.1.2" } - }, - "scrypt-js": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz", - "integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==" } } }, @@ -7495,6 +7457,13 @@ "web3-core-method": "1.3.0", "web3-net": "1.3.0", "web3-utils": "1.3.0" + }, + "dependencies": { + "@types/node": { + "version": "12.12.68", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.68.tgz", + "integrity": "sha512-3RW2s24ewB7F9dAHvgb9FRvNHn6nO9IK6Eaknbz7HTOe2a5GVne5XbUh5+YA+kcCn67glyHhClUUdFP73LWrgQ==" + } } }, "web3-net": { diff --git a/package.json b/package.json index b7714b4cf..070c2d849 100644 --- a/package.json +++ b/package.json @@ -18,10 +18,10 @@ "compile:test": "npx truffle compile --config truffle-config-contracts-test.js", "compile": "npm run compile:infrastructure && npm run compile:modules && npm run compile:wallet", "cc": "rm -rf build && rm -rf build-legacy && npm run compile:lib && npm run compile && npm run compile:legacy && npm run compile:test", - "ganache": "npx ganache-cli --networkId 1597649375983 --gasLimit=20700000 -e 10000 --acctKeys=\"./ganache-accounts.json\" --account=\"0x7ab741b57e8d94dd7e1a29055646bafde7010f38a900f55bbd7647880faa6ee8, 100000000000000000000\" --account=\"0x2030b463177db2da82908ef90fa55ddfcef56e8183caf60db464bc398e736e6f, 100000000000000000000\" --account=\"0x62ecd49c4ccb41a70ad46532aed63cf815de15864bc415c87d507afd6a5e8da2, 100000000000000000000\" --account=\"0xf473040b1a83739a9c7cc1f5719fab0f5bf178f83314d98557c58aae1910e03a, 100000000000000000000\" --account=\"0x823d590ed2cb5e8493bb0efc834771c1cde36f9fc49b9fe3620ebd0754ad6ea2, 100000000000000000000\" --account=\"0xd6d710943471e4c37ceb787857e7a2b41ca57f9cb4307ee9a9b21436a8e709c3, 100000000000000000000\" --account=\"0x187bb12e927c1652377405f81d93ce948a593f7d66cfba383ee761858b05921a, 100000000000000000000\" --account=\"0xf41486fdb04505e7966c8720a353ed92ce0d6830f8a5e915fbde735106a06d25, 100000000000000000000\" --account=\"0x6ca40ba4cca775643398385022264c0c414da1abd21d08d9e7136796a520a543, 100000000000000000000\" --account=\"0xfac0bc9325ad342033afe956e83f0bf8f1e863c1c3e956bc75d66961fe4cd186, 100000000000000000000\"", + "ganache": "npx ganache-cli --chainId 1895 --networkId 1597649375983 --gasLimit=20700000 -e 10000 --acctKeys=\"./ganache-accounts.json\" --account=\"0x7ab741b57e8d94dd7e1a29055646bafde7010f38a900f55bbd7647880faa6ee8, 100000000000000000000\" --account=\"0x2030b463177db2da82908ef90fa55ddfcef56e8183caf60db464bc398e736e6f, 100000000000000000000\" --account=\"0x62ecd49c4ccb41a70ad46532aed63cf815de15864bc415c87d507afd6a5e8da2, 100000000000000000000\" --account=\"0xf473040b1a83739a9c7cc1f5719fab0f5bf178f83314d98557c58aae1910e03a, 100000000000000000000\" --account=\"0x823d590ed2cb5e8493bb0efc834771c1cde36f9fc49b9fe3620ebd0754ad6ea2, 100000000000000000000\" --account=\"0xd6d710943471e4c37ceb787857e7a2b41ca57f9cb4307ee9a9b21436a8e709c3, 100000000000000000000\" --account=\"0x187bb12e927c1652377405f81d93ce948a593f7d66cfba383ee761858b05921a, 100000000000000000000\" --account=\"0xf41486fdb04505e7966c8720a353ed92ce0d6830f8a5e915fbde735106a06d25, 100000000000000000000\" --account=\"0x6ca40ba4cca775643398385022264c0c414da1abd21d08d9e7136796a520a543, 100000000000000000000\" --account=\"0xfac0bc9325ad342033afe956e83f0bf8f1e863c1c3e956bc75d66961fe4cd186, 100000000000000000000\"", "kovan-fork": "npx ganache-cli -i 42 -l 20700000 -f https://kovan.infura.io/v3/$(cat .env | sed -En 's/INFURA_KEY=''\"''([^''\"'']+)''\"''/\\1/p')@16988040", "kovan-fork-latest": "npx ganache-cli -i 42 -l 20700000 -f https://kovan.infura.io/v3/$(cat .env | sed -En 's/INFURA_KEY=''\"''([^''\"'']+)''\"''/\\1/p')", - "test": "npx truffle test --compile-none", + "test": "npx truffle test", "ctest": "npm run compile && npm run test", "provision:lib:artefacts": "bash ./scripts/provision_lib_artefacts.sh", "test:coverage": "bash ./scripts/provision_lib_artefacts.sh & npx etherlime coverage && istanbul check-coverage --statements 94 --branches 83 --functions 96 --lines 94", @@ -73,7 +73,7 @@ "etherlime-lib": "1.1.3", "ethers": "^5.0.7", "fs": "0.0.1-security", - "ganache-cli": "^6.9.1", + "ganache-cli": "^6.12.0", "husky": "^4.2.3", "inquirer": "^7.0.0", "istanbul": "^0.4.5", @@ -84,8 +84,8 @@ "solc": "0.6.12", "solhint": "^3.1.0", "tinyreq": "^3.4.1", - "truffle": "^5.1.36", - "web3": "^1.2.11", + "truffle": "^5.1.48", + "web3": "^1.3.0", "web3-eth-abi": "^1.2.9" }, "devDependencies": { diff --git a/test/recoveryManager.js b/test/recoveryManager.js index 61ef7af67..153e02920 100644 --- a/test/recoveryManager.js +++ b/test/recoveryManager.js @@ -21,7 +21,7 @@ const { getTimestamp, increaseTime, getNonceForRelay, - getNetworkId, + getChainId, assertRevert } = require("../utils/utilities.js"); @@ -469,7 +469,7 @@ contract("RecoveryManager", (accounts) => { it("should revert if an unknown method is executed", async () => { const nonce = await getNonceForRelay(); - const chainId = await getNetworkId(); + const chainId = await getChainId(); let methodData = recoveryManager.contract.methods.executeRecovery([wallet.address, ethers.constants.AddressZero]).encodeABI(); // Replace the `executeRecovery` method signature: b0ba4da0 with a non-existent one: e0b6fcfc methodData = methodData.replace("b0ba4da0", "e0b6fcfc"); diff --git a/utils/relay-manager.js b/utils/relay-manager.js index 98ec0008b..c51a0d113 100644 --- a/utils/relay-manager.js +++ b/utils/relay-manager.js @@ -1,5 +1,5 @@ const ethers = require("ethers"); -const { signOffchain, ETH_TOKEN, getNonceForRelay, getNetworkId, getAccount } = require("./utilities.js"); +const { signOffchain, ETH_TOKEN, getNonceForRelay, getChainId, getAccount } = require("./utilities.js"); class RelayManager { setRelayerManager(relayerManager) { @@ -18,15 +18,14 @@ class RelayManager { const relayerAccount = _relayerAccount || await getAccount(9); const nonce = _nonce || await getNonceForRelay(); const methodData = _module.contract.methods[_method](..._params).encodeABI(); - const networkId = await getNetworkId(); - console.log("networkId", networkId) + const chainId = await getChainId(); const signatures = await signOffchain( _signers, this.relayerManager.address, _module.address, 0, methodData, - networkId, + chainId, nonce, _gasPrice, _gasLimit, diff --git a/utils/utilities.js b/utils/utilities.js index b1fcf6e0f..f4ca2a93a 100644 --- a/utils/utilities.js +++ b/utils/utilities.js @@ -82,7 +82,6 @@ module.exports = { // and additionally if an error was raised in the sub-call to optionally return that parseRelayReceipt(txReceipt) { const { args } = txReceipt.logs.find((e) => e.event === "TransactionExecuted"); - console.log("args", args) let errorBytes; if (args.returnData.startsWith("0x08c379a0")) { @@ -154,14 +153,14 @@ module.exports = { return timestamp; }, - async getNetworkId() { - return 1; - console.log("this.network", this.network) - if (this.network === "ganache" || this.network.endsWith("-fork")) { - return 1; // ganache currently always uses 1 as chainId, see https://github.com/trufflesuite/ganache-core/issues/515 - } - const networkId = await web3.eth.net.getId(); // this gets the network Id not the chain id - return networkId; + async getChainId() { + // TODO: The web3 version packaged with truffle is 1.2.1 while the getChainId logic + // we need here was introduced in 1.2.2 + // Uncomment when https://github.com/trufflesuite/truffle/issues/2688#issuecomment-709879003 is resolved + //const chainId = await web3.eth.getChainId(); + //console.log("chainId", chainId) + //return chainId; + return 1895; }, async increaseTime(seconds) { From 66b24f7e6cb6ff262a3239c5004ef5ef151b187b Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Fri, 16 Oct 2020 16:42:57 +0300 Subject: [PATCH 039/113] Fixing tests including: - Calling overloaded functions with different syntax due to an issue with truffle - Changing .mul to BigNumber.times - Change ethers.utils.parseEther to web3.utils.toWei - Fix an issue finding events from the Relayer --- scripts/deploy_defi.js | 10 +- test/baseWallet.js | 29 ++--- test/compoundManager_invest.js | 50 ++++---- test/compoundManager_loan.js | 207 ++++++++++++++++----------------- test/makerV2Manager_invest.js | 4 +- test/makerV2Manager_loan.js | 8 +- test/multisig.js | 2 +- test/transferManager.js | 4 +- utils/defi-deployer.js | 4 +- utils/relay-manager.js | 1 + utils/utilities.js | 2 +- 11 files changed, 162 insertions(+), 159 deletions(-) diff --git a/scripts/deploy_defi.js b/scripts/deploy_defi.js index f7a48001a..259877e1a 100644 --- a/scripts/deploy_defi.js +++ b/scripts/deploy_defi.js @@ -17,10 +17,10 @@ const DSValue = artifacts.require("DSValue"); const RAY = new BigNumber("1000000000000000000000000000"); // 10**27 const WAD = new BigNumber("1000000000000000000"); // 10**18 const USD_PER_DAI = RAY; // 1 DAI = 1 USD -const USD_PER_ETH = WAD.mul(250); // 1 ETH = 250 USD -const USD_PER_MKR = WAD.mul(700); // 1 MKR = 700 USD +const USD_PER_ETH = WAD.times(250); // 1 ETH = 250 USD +const USD_PER_MKR = WAD.times(700); // 1 MKR = 700 USD -const ETH_PER_MKR = WAD.mul(USD_PER_MKR).div(USD_PER_ETH); // 1 MKR = 2.8 ETH +const ETH_PER_MKR = WAD.times(USD_PER_MKR).div(USD_PER_ETH); // 1 MKR = 2.8 ETH async function getTimestamp(deployer) { const block = await deployer.provider.getBlock("latest"); @@ -71,7 +71,7 @@ async function deploy() { // set the total DAI debt ceiling to 50,000 DAI await tub.mold(formatBytes32String("cap"), parseEther("50000")); // set the liquidity ratio to 150% - await tub.mold(formatBytes32String("mat"), RAY.mul(3).div(2)); + await tub.mold(formatBytes32String("mat"), RAY.times(3).div(2)); // set the governance fee to 7.5% APR await tub.mold(formatBytes32String("fee"), "1000000002293273137447730714", { gasLimit: 150000 }); // set the liquidation penalty to 13% @@ -86,7 +86,7 @@ async function deploy() { /* *************** create MKR exchange ***************** */ const ethLiquidity = parseEther("1"); - const mkrLiquidity = ethLiquidity.mul(WAD).div(ETH_PER_MKR); + const mkrLiquidity = ethLiquidity.times(WAD).div(ETH_PER_MKR); await gov["mint(address,uint256)"](manager, mkrLiquidity); await uniswapFactory.createExchange(gov.address, { gasLimit: 450000 }); diff --git a/test/baseWallet.js b/test/baseWallet.js index 908c99b47..6155f5be4 100644 --- a/test/baseWallet.js +++ b/test/baseWallet.js @@ -1,5 +1,6 @@ /* global artifacts */ const ethers = require("ethers"); +const { BigNumber } = require("bignumber.js"); const Proxy = artifacts.require("Proxy"); const BaseWallet = artifacts.require("BaseWallet"); @@ -29,13 +30,13 @@ contract("BaseWallet", (accounts) => { let lockStorage; async function deployTestModule() { - const module = await deployer.deploy(VersionManager, {}, + const module = await VersionManager.new( registry.address, lockStorage.address, guardianStorage.address, ethers.constants.AddressZero, ethers.constants.AddressZero); - const feature = await deployer.deploy(TestFeature, {}, + const feature = await TestFeature.new( lockStorage.address, module.address, 42); @@ -63,7 +64,7 @@ contract("BaseWallet", (accounts) => { it("should register a module with the correct info", async () => { const name = ethers.utils.formatBytes32String("module1"); await registry.registerModule(module1.address, name); - const isRegistered = await registry.isRegisteredModule(module1.address); + const isRegistered = await registry.contract.methods['isRegisteredModule(address)'](module1.address).call(); assert.isTrue(isRegistered, "module should be registered"); const info = await registry.moduleInfo(module1.address); assert.equal(name, info, "name should be correct"); @@ -72,10 +73,10 @@ contract("BaseWallet", (accounts) => { it("should deregister a module", async () => { const name = ethers.utils.formatBytes32String("module2"); await registry.registerModule(module2.address, name); - let isRegistered = await registry.isRegisteredModule(module2.address); + let isRegistered = await registry.contract.methods['isRegisteredModule(address)'](module2.address).call(); assert.isTrue(isRegistered, "module should be registered"); await registry.deregisterModule(module2.address); - isRegistered = await registry.isRegisteredModule(module2.address); + isRegistered = await registry.contract.methods['isRegisteredModule(address)'](module2.address).call(); assert.isFalse(isRegistered, "module should be deregistered"); }); @@ -147,7 +148,7 @@ contract("BaseWallet", (accounts) => { it("should accept ETH with data", async () => { const before = await getBalance(wallet.address); - await wallet.send(50000000, { data: 0x1234 }); + await web3.eth.sendTransaction({ from: accounts[0], to: wallet.address, data: "0x1234", value: 50000000 }); const after = await getBalance(wallet.address); assert.equal(after.sub(before).toNumber(), 50000000, "should have received ETH"); }); @@ -173,10 +174,10 @@ contract("BaseWallet", (accounts) => { await module1.upgradeWallet(wallet.address, await module1.lastVersion(), { from: owner }); const module1IsAuthorised = await wallet.authorised(module1.address); assert.equal(module1IsAuthorised, true, "module1 should be authorised"); - const walletAsFeature = deployer.wrapDeployedContract(TestFeature, wallet.address); - const boolVal = await walletAsFeature.contract.getBoolean(); - const uintVal = await walletAsFeature.contract.getUint(); - const addressVal = await walletAsFeature.contract.getAddress(nonowner); + const walletAsFeature = await TestFeature.at(wallet.address); + const boolVal = await walletAsFeature.getBoolean(); + const uintVal = await walletAsFeature.getUint(); + const addressVal = await walletAsFeature.getAddress(nonowner); assert.equal(boolVal, true, "should have the correct bool"); assert.equal(uintVal, 42, "should have the correct uint"); assert.equal(addressVal, nonowner, "should have the address"); @@ -189,7 +190,7 @@ contract("BaseWallet", (accounts) => { assert.equal(module1IsAuthorised, true, "module1 should be authorised"); // removing module 1 - const upgrader = await deployer.deploy(SimpleUpgrader, {}, + const upgrader = await SimpleUpgrader.new( registry.address, lockStorage.address, [module1.address], []); await registry.registerModule(upgrader.address, ethers.utils.formatBytes32String("Removing module1")); await module1.addModule(wallet.address, upgrader.address, { from: owner }); @@ -198,14 +199,14 @@ contract("BaseWallet", (accounts) => { // trying to execute static call delegated to module1 (it should fail) const walletAsModule = await TestFeature.at(wallet.address); - await assertRevert(walletAsModule.getBoolean(), "BW: must be an authorised module for static call"); + await assertRevert(walletAsModule.contract.methods.getBoolean(), "BW: must be an authorised module for static call"); }); }); }); describe("Old BaseWallet V1.3", () => { it("should work with new modules", async () => { - const oldWallet = await deployer.deploy(OldWalletV13); + const oldWallet = await OldWalletV13.new(); await oldWallet.init(owner, [module1.address]); await module1.upgradeWallet(oldWallet.address, await module1.lastVersion(), { from: owner }); await feature1.callDapp(oldWallet.address); @@ -216,7 +217,7 @@ contract("BaseWallet", (accounts) => { describe("Old BaseWallet V1.6", () => { it("should work with new modules", async () => { - const oldWallet = await deployer.deploy(OldWalletV16); + const oldWallet = await OldWalletV16.new(); await oldWallet.init(owner, [module1.address]); await module1.upgradeWallet(oldWallet.address, await module1.lastVersion(), { from: owner }); await feature1.callDapp(oldWallet.address); diff --git a/test/compoundManager_invest.js b/test/compoundManager_invest.js index c0328a0ff..6cc334082 100644 --- a/test/compoundManager_invest.js +++ b/test/compoundManager_invest.js @@ -1,7 +1,7 @@ /* global artifacts */ -const { parseEther, formatBytes32String } = require("ethers").utils; +const { formatBytes32String } = require("ethers").utils; const ethers = require("ethers"); -const { BigNumber } = require("bignumber.js"); +const { BN } = require("bn.js"); const utils = require("../utils/utilities.js"); const GuardianStorage = artifacts.require("GuardianStorage"); @@ -23,8 +23,8 @@ const CEther = artifacts.require("CEther"); const CErc20 = artifacts.require("CErc20"); const CompoundRegistry = artifacts.require("CompoundRegistry"); -const WAD = new BigNumber("1000000000000000000"); // 10**18 -const ETH_EXCHANGE_RATE = new BigNumber("200000000000000000000000000"); +const WAD = new BN("1000000000000000000"); // 10**18 +const ETH_EXCHANGE_RATE = new BN("200000000000000000000000000"); const ERC20 = artifacts.require("TestERC20"); @@ -62,9 +62,9 @@ contract("Invest Manager with Compound", (accounts) => { const comptrollerImpl = await Comptroller.new(); await comptrollerProxy._setPendingImplementation(comptrollerImpl.address); await comptrollerImpl._become(comptrollerProxy.address, oracle.address, WAD.div(10), 5, false); - comptroller = Comptroller.at(comptrollerProxy.address); + comptroller = await Comptroller.at(comptrollerProxy.address); // deploy Interest rate model - const interestModel = await InterestModel.new(WAD.mul(250).div(10000), WAD.mul(2000).div(10000)); + const interestModel = await InterestModel.new(WAD.times(250).div(10000), WAD.times(2000).div(10000)); // deploy CEther cEther = await CEther.new( comptrollerProxy.address, @@ -100,9 +100,10 @@ contract("Invest Manager with Compound", (accounts) => { await comptroller._setCollateralFactor(cEther.address, WAD.div(10)); // add liquidity to tokens - await cEther.mint({ value: parseEther("100"), from: liquidityProvider }); - await token.approve(cToken.address, parseEther("100"), { from: liquidityProvider }); - await cToken.mint(parseEther("10"), { from: liquidityProvider }); + const tenEther = await web3.utils.toWei("10", "ether"); + await cEther.mint({ value: tenEther, from: liquidityProvider }); + await token.approve(cToken.address, tenEther, { from: liquidityProvider }); + await cToken.mint(web3.utils.toWei("1", "ether"), { from: liquidityProvider }); /* Deploy Argent Architecture */ @@ -158,6 +159,7 @@ contract("Invest Manager with Compound", (accounts) => { const cOracle = await comptroller.oracle(); assert.isTrue(cOracle === oracleProxy.address, "oracle should be registered"); const cTokenPrice = await oracleProxy.getUnderlyingPrice(cToken.address); + console.log("cTokenPrice", cTokenPrice) assert.isTrue(cTokenPrice.eq(WAD.div(10)), "cToken price should be 1e17"); const cEtherPrice = await oracleProxy.getUnderlyingPrice(cEther.address); assert.isTrue(cEtherPrice.eq(WAD), "cEther price should be 1e18"); @@ -170,13 +172,13 @@ contract("Invest Manager with Compound", (accounts) => { // generate borrows to create interests await comptroller.enterMarkets([cEther.address, cToken.address], { from: borrower }); if (investInEth) { - await token.approve(cToken.address, parseEther("20"), { from: borrower }); - await cToken.mint(parseEther("20"), { from: borrower }); - tx = await cEther.borrow(parseEther("0.1"), { from: borrower }); + await token.approve(cToken.address, web3.utils.toWei("20", "ether"), { from: borrower }); + await cToken.mint(web3.utils.toWei("20", "ether"), { from: borrower }); + tx = await cEther.borrow(web3.utils.toWei("0.1", "ether"), { from: borrower }); await utils.hasEvent(tx.receipt, "Borrow"); } else { - await cEther.mint({ value: parseEther("2"), from: borrower }); - tx = await cToken.borrow(parseEther("0.1"), { from: borrower }); + await cEther.mint({ value: web3.utils.toWei("2", "ether"), from: borrower }); + tx = await cToken.borrow(web3.utils.toWei("0.1", "ether"), { from: borrower }); await utils.hasEvent(tx.receipt, "Borrow"); } // increase time to accumulate interests @@ -203,7 +205,7 @@ contract("Invest Manager with Compound", (accounts) => { txReceipt = tx.receipt; } - await utils.hasEvent(txReceipt, "InvestmentAdded"); + await utils.hasEvent(txReceipt, "CompoundManager.InvestmentAdded"); await accrueInterests(days, investInEth); @@ -218,7 +220,7 @@ contract("Invest Manager with Compound", (accounts) => { txReceipt; const investInEth = (tokenAddress === ETH_TOKEN); - await addInvestment(tokenAddress, parseEther("0.1"), 365, false); + await addInvestment(tokenAddress, web3.utils.toWei("0.1", "ether"), 365, false); const before = investInEth ? await cEther.balanceOf(wallet.address) : await cToken.balanceOf(wallet.address); const params = [wallet.address, tokenAddress, fraction]; @@ -238,25 +240,25 @@ contract("Invest Manager with Compound", (accounts) => { // Successes it("should invest in ERC20 for 1 year and gain interests (blockchain tx)", async () => { - await addInvestment(token.address, parseEther("1"), 365, false); + await addInvestment(token.address, web3.utils.toWei("1", "ether"), 365, false); }); it("should invest in ERC20 for 1 year and gain interests (relay tx)", async () => { - await addInvestment(token.address, parseEther("1"), 365, true); + await addInvestment(token.address, web3.utils.toWei("1", "ether"), 365, true); }); it("should invest in ETH for 1 year and gain interests (blockchain tx)", async () => { - await addInvestment(ETH_TOKEN, parseEther("1"), 365, false); + await addInvestment(ETH_TOKEN, web3.utils.toWei("1", "ether"), 365, false); }); it("should invest in ETH for 1 year and gain interests (relay tx)", async () => { - await addInvestment(ETH_TOKEN, parseEther("1"), 365, true); + await addInvestment(ETH_TOKEN, web3.utils.toWei("1", "ether"), 365, true); }); // Reverts it("should fail to invest in ERC20 with an unknown token", async () => { - const params = [wallet.address, ethers.constants.AddressZero, parseEther("1"), 0]; + const params = [wallet.address, ethers.constants.AddressZero, web3.utils.toWei("1", "ether"), 0]; await utils.assertRevert(investManager.addInvestment(...params, { from: owner }), "CM: No market for target token"); }); @@ -266,7 +268,7 @@ contract("Invest Manager with Compound", (accounts) => { }); it("should fail to invest in ERC20 when not holding any ERC20", async () => { - const params = [wallet.address, token.address, parseEther("1"), 0]; + const params = [wallet.address, token.address, web3.utils.toWei("1", "ether"), 0]; await utils.assertRevert(investManager.addInvestment(...params, { from: owner }), "CM: mint failed"); }); }); @@ -305,8 +307,8 @@ contract("Invest Manager with Compound", (accounts) => { }); it("should fail to remove all of an ERC20 investment when it collateralizes a loan", async () => { - const collateralAmount = parseEther("1"); - const debtAmount = parseEther("0.001"); + const collateralAmount = await web3.utils.toWei("1", "ether"); + const debtAmount = await web3.utils.toWei("0.001", "ether"); await token.transfer(wallet.address, collateralAmount); const openLoanParams = [ wallet.address, diff --git a/test/compoundManager_loan.js b/test/compoundManager_loan.js index 3740fa9c2..d888d4f61 100644 --- a/test/compoundManager_loan.js +++ b/test/compoundManager_loan.js @@ -1,7 +1,6 @@ /* global artifacts */ const ethers = require("ethers"); -const { parseEther } = require("ethers").utils; const { BigNumber } = require("bignumber.js"); const utils = require("../utils/utilities.js"); @@ -70,7 +69,7 @@ contract("Loan Module", (accounts) => { await comptrollerImpl._become(comptrollerProxy.address, oracle.address, WAD.div(10), 5, false); comptroller = await Comptroller.at(comptrollerProxy.address); // deploy Interest rate model - const interestModel = await InterestModel.new(WAD.mul(250).div(10000), WAD.mul(2000).div(10000)); + const interestModel = await InterestModel.new(WAD.times(250).div(10000), WAD.times(2000).div(10000)); // deploy CEther cEther = await CEther.new( comptroller.address, @@ -120,11 +119,11 @@ contract("Loan Module", (accounts) => { await comptroller._setCollateralFactor(cEther.address, WAD.div(10)); // add liquidity to tokens - await cEther.mint({ value: parseEther("100"), from: liquidityProvider }); - await token1.approve(cToken1.address, parseEther("10"), { from: liquidityProvider }); - await cToken1.mint(parseEther("10"), { from: liquidityProvider }); - await token2.approve(cToken2.address, parseEther("10"), { from: liquidityProvider }); - await cToken2.mint(parseEther("10"), { from: liquidityProvider }); + await cEther.mint({ value: web3.utils.toWei("100", "ether"), from: liquidityProvider }); + await token1.approve(cToken1.address, web3.utils.toWei("10", "ether"), { from: liquidityProvider }); + await cToken1.mint(web3.utils.toWei("10", "ether"), { from: liquidityProvider }); + await token2.approve(cToken2.address, web3.utils.toWei("10", "ether"), { from: liquidityProvider }); + await cToken2.mint(web3.utils.toWei("10", "ether"), { from: liquidityProvider }); /* Deploy Argent Architecture */ @@ -284,8 +283,8 @@ contract("Loan Module", (accounts) => { describe("Open Loan", () => { it("should borrow token with ETH as collateral (blockchain tx)", async () => { - const collateralAmount = parseEther("0.1"); - const debtAmount = parseEther("0.05"); + const collateralAmount = await web3.utils.toWei("0.1"); + const debtAmount = await web3.utils.toWei("0.05"); await fundWallet({ ethAmount: collateralAmount, token1Amount: 0 }); await testOpenLoan({ collateral: ETH_TOKEN, collateralAmount, debt: token1, debtAmount, relayed: false, @@ -293,8 +292,8 @@ contract("Loan Module", (accounts) => { }); it("should borrow ETH with token as collateral (blockchain tx)", async () => { - const collateralAmount = parseEther("0.5"); - const debtAmount = parseEther("0.001"); + const collateralAmount = await web3.utils.toWei("0.5"); + const debtAmount = await web3.utils.toWei("0.001"); await fundWallet({ ethAmount: 0, token1Amount: collateralAmount }); await testOpenLoan({ collateral: token1, collateralAmount, debt: ETH_TOKEN, debtAmount, relayed: false, @@ -302,8 +301,8 @@ contract("Loan Module", (accounts) => { }); it("should borrow token with ETH as collateral (relay tx)", async () => { - const collateralAmount = parseEther("0.1"); - const debtAmount = parseEther("0.05"); + const collateralAmount = await web3.utils.toWei("0.1"); + const debtAmount = await web3.utils.toWei("0.05"); await fundWallet({ ethAmount: collateralAmount, token1Amount: 0 }); await testOpenLoan({ collateral: ETH_TOKEN, collateralAmount, debt: token1, debtAmount, relayed: true, @@ -311,8 +310,8 @@ contract("Loan Module", (accounts) => { }); it("should borrow ETH with token as collateral (relay tx)", async () => { - const collateralAmount = parseEther("0.5"); - const debtAmount = parseEther("0.001"); + const collateralAmount = await web3.utils.toWei("0.5"); + const debtAmount = await web3.utils.toWei("0.001"); await fundWallet({ ethAmount: 0, token1Amount: collateralAmount }); await testOpenLoan({ collateral: token1, collateralAmount, debt: ETH_TOKEN, debtAmount, relayed: true, @@ -320,8 +319,8 @@ contract("Loan Module", (accounts) => { }); it("should get the info of a loan", async () => { - const collateralAmount = parseEther("0.1"); - const debtAmount = parseEther("0.01"); + const collateralAmount = await web3.utils.toWei("0.1"); + const debtAmount = await web3.utils.toWei("0.01"); await fundWallet({ ethAmount: collateralAmount, token1Amount: 0 }); await testOpenLoan({ collateral: ETH_TOKEN, collateralAmount, debt: token1, debtAmount, relayed: false, @@ -329,7 +328,7 @@ contract("Loan Module", (accounts) => { let loan = await loanManager.getLoan(wallet.address, ZERO_BYTES32); assert.isTrue(loan._status === 1 && loan._ethValue.gt(0), "should have obtained the liquidity info of the loan"); - await oracle.setUnderlyingPrice(cToken1.address, WAD.mul(10)); + await oracle.setUnderlyingPrice(cToken1.address, WAD.times(10)); loan = await loanManager.getLoan(wallet.address, ZERO_BYTES32); assert.isTrue(loan._status === 2 && loan._ethValue.gt(0), "should have obtained the shortfall info of the loan"); @@ -346,250 +345,250 @@ contract("Loan Module", (accounts) => { // Successes it("should add ETH collateral to a loan (blockchain tx)", async () => { - await fundWallet({ ethAmount: parseEther("0.2"), token1Amount: 0 }); + await fundWallet({ ethAmount: web3.utils.toWei("0.2"), token1Amount: 0 }); const loanId = await testOpenLoan({ - collateral: ETH_TOKEN, collateralAmount: parseEther("0.1"), debt: token1, debtAmount: parseEther("0.05"), relayed: false, + collateral: ETH_TOKEN, collateralAmount: web3.utils.toWei("0.1"), debt: token1, debtAmount: web3.utils.toWei("0.05"), relayed: false, }); await testChangeCollateral({ - loanId, collateral: ETH_TOKEN, amount: parseEther("0.1"), add: true, relayed: false, + loanId, collateral: ETH_TOKEN, amount: web3.utils.toWei("0.1"), add: true, relayed: false, }); }); it("should add ETH collateral to a loan (relayed tx)", async () => { - await fundWallet({ ethAmount: parseEther("0.2"), token1Amount: 0 }); + await fundWallet({ ethAmount: web3.utils.toWei("0.2"), token1Amount: 0 }); const loanId = await testOpenLoan({ - collateral: ETH_TOKEN, collateralAmount: parseEther("0.1"), debt: token1, debtAmount: parseEther("0.01"), relayed: false, + collateral: ETH_TOKEN, collateralAmount: web3.utils.toWei("0.1"), debt: token1, debtAmount: web3.utils.toWei("0.01", "ether"), relayed: false, }); await testChangeCollateral({ - loanId, collateral: ETH_TOKEN, amount: parseEther("0.1"), add: true, relayed: true, + loanId, collateral: ETH_TOKEN, amount: web3.utils.toWei("0.1"), add: true, relayed: true, }); }); it("should remove ETH collateral from a loan (blockchain tx)", async () => { - await fundWallet({ ethAmount: parseEther("0.2"), token1Amount: 0 }); + await fundWallet({ ethAmount: web3.utils.toWei("0.2", "ether"), token1Amount: 0 }); const loanId = await testOpenLoan({ - collateral: ETH_TOKEN, collateralAmount: parseEther("0.2"), debt: token1, debtAmount: parseEther("0.01"), relayed: false, + collateral: ETH_TOKEN, collateralAmount: web3.utils.toWei("0.2", "ether"), debt: token1, debtAmount: web3.utils.toWei("0.01", "ether"), relayed: false, }); await testChangeCollateral({ - loanId, collateral: ETH_TOKEN, amount: parseEther("0.001"), add: false, relayed: false, + loanId, collateral: ETH_TOKEN, amount: web3.utils.toWei("0.001"), add: false, relayed: false, }); }); it("should remove ETH collateral from a loan (relayed tx)", async () => { - await fundWallet({ ethAmount: parseEther("0.2"), token1Amount: 0 }); + await fundWallet({ ethAmount: web3.utils.toWei("0.2"), token1Amount: 0 }); const loanId = await testOpenLoan({ - collateral: ETH_TOKEN, collateralAmount: parseEther("0.1"), debt: token1, debtAmount: parseEther("0.01"), relayed: false, + collateral: ETH_TOKEN, collateralAmount: web3.utils.toWei("0.1"), debt: token1, debtAmount: web3.utils.toWei("0.01"), relayed: false, }); await testChangeCollateral({ - loanId, collateral: ETH_TOKEN, amount: parseEther("0.001"), add: false, relayed: true, + loanId, collateral: ETH_TOKEN, amount: web3.utils.toWei("0.001"), add: false, relayed: true, }); }); it("should add token collateral to a loan (blockchain tx)", async () => { - await fundWallet({ ethAmount: 0, token1Amount: parseEther("0.6") }); + await fundWallet({ ethAmount: 0, token1Amount: web3.utils.toWei("0.6") }); const loanId = await testOpenLoan({ - collateral: token1, collateralAmount: parseEther("0.5"), debt: ETH_TOKEN, debtAmount: parseEther("0.001"), relayed: false, + collateral: token1, collateralAmount: web3.utils.toWei("0.5"), debt: ETH_TOKEN, debtAmount: web3.utils.toWei("0.001"), relayed: false, }); await testChangeCollateral({ - loanId, collateral: token1, amount: parseEther("0.1"), add: true, relayed: false, + loanId, collateral: token1, amount: web3.utils.toWei("0.1"), add: true, relayed: false, }); }); it("should add token collateral to a loan (relayed tx)", async () => { - await fundWallet({ ethAmount: 0, token1Amount: parseEther("0.6") }); + await fundWallet({ ethAmount: 0, token1Amount: web3.utils.toWei("0.6") }); const loanId = await testOpenLoan({ - collateral: token1, collateralAmount: parseEther("0.5"), debt: ETH_TOKEN, debtAmount: parseEther("0.001"), relayed: false, + collateral: token1, collateralAmount: web3.utils.toWei("0.5"), debt: ETH_TOKEN, debtAmount: web3.utils.toWei("0.001"), relayed: false, }); await testChangeCollateral({ - loanId, collateral: token1, amount: parseEther("0.1"), add: true, relayed: true, + loanId, collateral: token1, amount: web3.utils.toWei("0.1"), add: true, relayed: true, }); }); it("should remove token collateral from a loan (blockchain tx)", async () => { - await fundWallet({ ethAmount: 0, token1Amount: parseEther("0.5") }); + await fundWallet({ ethAmount: 0, token1Amount: web3.utils.toWei("0.5") }); const loanId = await testOpenLoan({ - collateral: token1, collateralAmount: parseEther("0.5"), debt: ETH_TOKEN, debtAmount: parseEther("0.001"), relayed: false, + collateral: token1, collateralAmount: web3.utils.toWei("0.5"), debt: ETH_TOKEN, debtAmount: web3.utils.toWei("0.001"), relayed: false, }); await testChangeCollateral({ - loanId, collateral: token1, amount: parseEther("0.1"), add: false, relayed: false, + loanId, collateral: token1, amount: web3.utils.toWei("0.1"), add: false, relayed: false, }); }); it("should remove token collateral from a loan (relayed tx)", async () => { - await fundWallet({ ethAmount: 0, token1Amount: parseEther("0.5") }); + await fundWallet({ ethAmount: 0, token1Amount: web3.utils.toWei("0.5", "ether") }); const loanId = await testOpenLoan({ - collateral: token1, collateralAmount: parseEther("0.5"), debt: ETH_TOKEN, debtAmount: parseEther("0.001"), relayed: false, + collateral: token1, collateralAmount: web3.utils.toWei("0.5", "ether"), debt: ETH_TOKEN, debtAmount: web3.utils.toWei("0.001"), relayed: false, }); await testChangeCollateral({ - loanId, collateral: token1, amount: parseEther("0.1"), add: false, relayed: true, + loanId, collateral: token1, amount: web3.utils.toWei("0.1", "ether"), add: false, relayed: true, }); }); // Reverts it("should fail to borrow an unknown token", async () => { - const params = [wallet.address, ZERO_BYTES32, ethers.constants.AddressZero, parseEther("1")]; + const params = [wallet.address, ZERO_BYTES32, ethers.constants.AddressZero, web3.utils.toWei("1", "ether")]; await utils.assertRevert(loanManager.addDebt(...params, { from: owner }), "CM: No market for target token"); }); it("should fail to borrow 0 token", async () => { - const params = [wallet.address, ZERO_BYTES32, ETH_TOKEN, parseEther("0")]; + const params = [wallet.address, ZERO_BYTES32, ETH_TOKEN, 0]; await utils.assertRevert(loanManager.addDebt(...params, { from: owner }), "CM: amount cannot be 0"); }); it("should fail to borrow token with no collateral", async () => { - const params = [wallet.address, ZERO_BYTES32, ETH_TOKEN, parseEther("1")]; + const params = [wallet.address, ZERO_BYTES32, ETH_TOKEN, web3.utils.toWei("1", "ether")]; await utils.assertRevert(loanManager.addDebt(...params, { from: owner }), "CM: borrow failed"); }); it("should fail to repay an unknown token", async () => { - const params = [wallet.address, ZERO_BYTES32, ethers.constants.AddressZero, parseEther("1")]; + const params = [wallet.address, ZERO_BYTES32, ethers.constants.AddressZero, web3.utils.toWei("1", "ether")]; await utils.assertRevert(loanManager.removeDebt(...params, { from: owner }), "CM: No market for target token"); }); it("should fail to repay 0 token", async () => { - const params = [wallet.address, ZERO_BYTES32, ETH_TOKEN, parseEther("0")]; + const params = [wallet.address, ZERO_BYTES32, ETH_TOKEN, 0]; await utils.assertRevert(loanManager.removeDebt(...params, { from: owner }), "CM: amount cannot be 0"); }); it("should fail to repay too much debt token", async () => { - const collateralAmount = parseEther("1"); - const debtAmount = parseEther("0.001"); + const collateralAmount = await web3.utils.toWei("1", "ether"); + const debtAmount = await web3.utils.toWei("0.001", "ether"); await fundWallet({ ethAmount: collateralAmount, token1Amount: 0 }); const loanId = await testOpenLoan({ collateral: ETH_TOKEN, collateralAmount, debt: token1, debtAmount, relayed: false, }); - const removeDebtParams = [wallet.address, loanId, token1.address, parseEther("0.002")]; + const removeDebtParams = [wallet.address, loanId, token1.address, web3.utils.toWei("0.002", "ether")]; await utils.assertRevert(loanManager.removeDebt(...removeDebtParams, { from: owner }), "CM: repayBorrow failed"); }); it("should fail to remove an unknown collateral token", async () => { - const params = [wallet.address, ZERO_BYTES32, ethers.constants.AddressZero, parseEther("1")]; + const params = [wallet.address, ZERO_BYTES32, ethers.constants.AddressZero, web3.utils.toWei("1", "ether")]; await utils.assertRevert(loanManager.removeCollateral(...params, { from: owner }), "CM: No market for target token"); }); it("should fail to remove 0 collateral token", async () => { - const params = [wallet.address, ZERO_BYTES32, ETH_TOKEN, parseEther("0")]; + const params = [wallet.address, ZERO_BYTES32, ETH_TOKEN, web3.utils.toWei("0", "ether")]; await utils.assertRevert(loanManager.removeCollateral(...params, { from: owner }), "CM: amount cannot be 0"); }); it("should fail to remove too much collateral token", async () => { - const collateralAmount = parseEther("1"); - const debtAmount = parseEther("0.001"); + const collateralAmount = await web3.utils.toWei("1", "ether"); + const debtAmount = await web3.utils.toWei("0.001", "ether"); await fundWallet({ ethAmount: collateralAmount, token1Amount: 0 }); const loanId = await testOpenLoan({ collateral: ETH_TOKEN, collateralAmount, debt: token1, debtAmount, relayed: false, }); - const removeDebtParams = [wallet.address, loanId, token1.address, parseEther("0.002")]; + const removeDebtParams = [wallet.address, loanId, token1.address, web3.utils.toWei("0.002", "ether")]; await utils.assertRevert(loanManager.removeCollateral(...removeDebtParams, { from: owner }), "CM: redeemUnderlying failed"); }); }); describe("Increase/Decrease Debt", () => { it("should increase ETH debt to a token1/ETH loan (blockchain tx)", async () => { - await fundWallet({ ethAmount: 0, token1Amount: parseEther("0.5") }); + await fundWallet({ ethAmount: 0, token1Amount: web3.utils.toWei("0.5", "ether") }); const loanId = await testOpenLoan({ - collateral: token1, collateralAmount: parseEther("0.5"), debt: ETH_TOKEN, debtAmount: parseEther("0.001"), relayed: false, + collateral: token1, collateralAmount: web3.utils.toWei("0.5", "ether"), debt: ETH_TOKEN, debtAmount: web3.utils.toWei("0.001"), relayed: false, }); await testChangeDebt({ - loanId, debtToken: ETH_TOKEN, amount: parseEther("0.001"), add: true, relayed: false, + loanId, debtToken: ETH_TOKEN, amount: web3.utils.toWei("0.001", "ether"), add: true, relayed: false, }); }); it("should increase ETH debt to a token1/ETH loan (relayed tx)", async () => { - await fundWallet({ ethAmount: 0, token1Amount: parseEther("0.5") }); + await fundWallet({ ethAmount: 0, token1Amount: web3.utils.toWei("0.5", "ether") }); const loanId = await testOpenLoan({ - collateral: token1, collateralAmount: parseEther("0.5"), debt: ETH_TOKEN, debtAmount: parseEther("0.001"), relayed: false, + collateral: token1, collateralAmount: web3.utils.toWei("0.5", "ether"), debt: ETH_TOKEN, debtAmount: web3.utils.toWei("0.001", "ether"), relayed: false, }); await testChangeDebt({ - loanId, debtToken: ETH_TOKEN, amount: parseEther("0.001"), add: true, relayed: true, + loanId, debtToken: ETH_TOKEN, amount: web3.utils.toWei("0.001", "ether"), add: true, relayed: true, }); }); it("should increase token1 debt to a ETH/token1 loan (blockchain tx)", async () => { - await fundWallet({ ethAmount: parseEther("0.5"), token1Amount: 0 }); + await fundWallet({ ethAmount: web3.utils.toWei("0.5", "ether"), token1Amount: 0 }); const loanId = await testOpenLoan({ - collateral: ETH_TOKEN, collateralAmount: parseEther("0.5"), debt: token1, debtAmount: parseEther("0.01"), relayed: false, + collateral: ETH_TOKEN, collateralAmount: web3.utils.toWei("0.5", "ether"), debt: token1, debtAmount: web3.utils.toWei("0.01", "ether"), relayed: false, }); await testChangeDebt({ - loanId, debtToken: token1, amount: parseEther("0.01"), add: true, relayed: false, + loanId, debtToken: token1, amount: web3.utils.toWei("0.01", "ether"), add: true, relayed: false, }); }); it("should increase token1 debt to a ETH/token1 loan (relayed tx)", async () => { - await fundWallet({ ethAmount: parseEther("0.5"), token1Amount: 0 }); + await fundWallet({ ethAmount: web3.utils.toWei("0.5", "ether"), token1Amount: 0 }); const loanId = await testOpenLoan({ - collateral: ETH_TOKEN, collateralAmount: parseEther("0.5"), debt: token1, debtAmount: parseEther("0.01"), relayed: false, + collateral: ETH_TOKEN, collateralAmount: web3.utils.toWei("0.5", "ether"), debt: token1, debtAmount: web3.utils.toWei("0.01", "ether"), relayed: false, }); await testChangeDebt({ - loanId, debtToken: token1, amount: parseEther("0.01"), add: true, relayed: true, + loanId, debtToken: token1, amount: web3.utils.toWei("0.01", "ether"), add: true, relayed: true, }); }); it("should increase token2 debt to a ETH/token1 loan (blockchain tx)", async () => { - await fundWallet({ ethAmount: parseEther("0.5"), token1Amount: 0 }); + await fundWallet({ ethAmount: web3.utils.toWei("0.5", "ether"), token1Amount: 0 }); const loanId = await testOpenLoan({ - collateral: ETH_TOKEN, collateralAmount: parseEther("0.5"), debt: token1, debtAmount: parseEther("0.01"), relayed: false, + collateral: ETH_TOKEN, collateralAmount: web3.utils.toWei("0.5", "ether"), debt: token1, debtAmount: web3.utils.toWei("0.01", "ether"), relayed: false, }); await testChangeDebt({ - loanId, debtToken: token2, amount: parseEther("0.01"), add: true, relayed: false, + loanId, debtToken: token2, amount: web3.utils.toWei("0.01", "ether"), add: true, relayed: false, }); }); it("should increase token2 debt to a ETH/token1 loan (relayed tx)", async () => { - await fundWallet({ ethAmount: parseEther("0.5"), token1Amount: 0 }); + await fundWallet({ ethAmount: web3.utils.toWei("0.5", "ether"), token1Amount: 0 }); const loanId = await testOpenLoan({ - collateral: ETH_TOKEN, collateralAmount: parseEther("0.5"), debt: token1, debtAmount: parseEther("0.01"), relayed: false, + collateral: ETH_TOKEN, collateralAmount: web3.utils.toWei("0.5", "ether"), debt: token1, debtAmount: web3.utils.toWei("0.01", "ether"), relayed: false, }); await testChangeDebt({ - loanId, debtToken: token2, amount: parseEther("0.01"), add: true, relayed: true, + loanId, debtToken: token2, amount: web3.utils.toWei("0.01", "ether"), add: true, relayed: true, }); }); it("should repay ETH debt to a token1/ETH loan (blockchain tx)", async () => { - await fundWallet({ ethAmount: 0, token1Amount: parseEther("0.5") }); + await fundWallet({ ethAmount: 0, token1Amount: web3.utils.toWei("0.5", "ether") }); const loanId = await testOpenLoan({ - collateral: token1, collateralAmount: parseEther("0.5"), debt: ETH_TOKEN, debtAmount: parseEther("0.001"), relayed: false, + collateral: token1, collateralAmount: web3.utils.toWei("0.5", "ether"), debt: ETH_TOKEN, debtAmount: web3.utils.toWei("0.001", "ether"), relayed: false, }); await testChangeDebt({ - loanId, debtToken: ETH_TOKEN, amount: parseEther("0.0005"), add: false, relayed: false, + loanId, debtToken: ETH_TOKEN, amount: web3.utils.toWei("0.0005", "ether"), add: false, relayed: false, }); }); it("should repay ETH debt to a token1/ETH loan (relay tx)", async () => { - await fundWallet({ ethAmount: 0, token1Amount: parseEther("0.5") }); + await fundWallet({ ethAmount: 0, token1Amount: web3.utils.toWei("0.5", "ether") }); const loanId = await testOpenLoan({ - collateral: token1, collateralAmount: parseEther("0.5"), debt: ETH_TOKEN, debtAmount: parseEther("0.001"), relayed: false, + collateral: token1, collateralAmount: web3.utils.toWei("0.5", "ether"), debt: ETH_TOKEN, debtAmount: web3.utils.toWei("0.001", "ether"), relayed: false, }); await testChangeDebt({ - loanId, debtToken: ETH_TOKEN, amount: parseEther("0.0005"), add: false, relayed: true, + loanId, debtToken: ETH_TOKEN, amount: web3.utils.toWei("0.0005"), add: false, relayed: true, }); }); it("should repay token1 debt to a ETH/token1 loan (blockchain tx)", async () => { - await fundWallet({ ethAmount: parseEther("0.5"), token1Amount: 0 }); + await fundWallet({ ethAmount: web3.utils.toWei("0.5"), token1Amount: 0 }); const loanId = await testOpenLoan({ - collateral: ETH_TOKEN, collateralAmount: parseEther("0.5"), debt: token1, debtAmount: parseEther("0.01"), relayed: false, + collateral: ETH_TOKEN, collateralAmount: web3.utils.toWei("0.5", "ether"), debt: token1, debtAmount: web3.utils.toWei("0.01", "ether"), relayed: false, }); await testChangeDebt({ - loanId, debtToken: token1, amount: parseEther("0.005"), add: false, relayed: false, + loanId, debtToken: token1, amount: web3.utils.toWei("0.005", "ether"), add: false, relayed: false, }); }); it("should repay token1 debt to a ETH/token1 loan (relayed tx)", async () => { - await fundWallet({ ethAmount: parseEther("0.5"), token1Amount: 0 }); + await fundWallet({ ethAmount: web3.utils.toWei("0.5", "ether"), token1Amount: 0 }); const loanId = await testOpenLoan({ - collateral: ETH_TOKEN, collateralAmount: parseEther("0.5"), debt: token1, debtAmount: parseEther("0.01"), relayed: false, + collateral: ETH_TOKEN, collateralAmount: web3.utils.toWei("0.5", "ether"), debt: token1, debtAmount: web3.utils.toWei("0.01", "ether"), relayed: false, }); await testChangeDebt({ - loanId, debtToken: token1, amount: parseEther("0.005"), add: false, relayed: true, + loanId, debtToken: token1, amount: web3.utils.toWei("0.005", "ether"), add: false, relayed: true, }); }); it("should repay the full token1 debt to a ETH/token1 loan (blockchain tx)", async () => { - await fundWallet({ ethAmount: parseEther("0.5"), token1Amount: parseEther("0.01") }); + await fundWallet({ ethAmount: web3.utils.toWei("0.5", "ether"), token1Amount: web3.utils.toWei("0.01", "ether") }); const loanId = await testOpenLoan({ - collateral: ETH_TOKEN, collateralAmount: parseEther("0.5"), debt: token1, debtAmount: parseEther("0.01"), relayed: false, + collateral: ETH_TOKEN, collateralAmount: web3.utils.toWei("0.5", "ether"), debt: token1, debtAmount: web3.utils.toWei("0.01", "ether"), relayed: false, }); await testChangeDebt({ loanId, debtToken: token1, amount: ethers.constants.MaxUint256, add: false, relayed: false, @@ -616,67 +615,67 @@ contract("Loan Module", (accounts) => { } it("should close an ETH/token1 loan (blockchain tx)", async () => { - await fundWallet({ ethAmount: parseEther("0.5"), token1Amount: parseEther("0.5") }); + await fundWallet({ ethAmount: web3.utils.toWei("0.5"), token1Amount: web3.utils.toWei("0.5") }); const loanId = await testOpenLoan({ - collateral: ETH_TOKEN, collateralAmount: parseEther("0.1"), debt: token1, debtAmount: parseEther("0.01"), relayed: false, + collateral: ETH_TOKEN, collateralAmount: web3.utils.toWei("0.1"), debt: token1, debtAmount: web3.utils.toWei("0.01"), relayed: false, }); await testCloseLoan({ loanId, relayed: false }); }); it("should close an ETH/token1 loan (relayed tx)", async () => { - await fundWallet({ ethAmount: parseEther("0.5"), token1Amount: parseEther("0.5") }); + await fundWallet({ ethAmount: web3.utils.toWei("0.5"), token1Amount: web3.utils.toWei("0.5") }); const loanId = await testOpenLoan({ - collateral: ETH_TOKEN, collateralAmount: parseEther("0.1"), debt: token1, debtAmount: parseEther("0.01"), relayed: false, + collateral: ETH_TOKEN, collateralAmount: web3.utils.toWei("0.1"), debt: token1, debtAmount: web3.utils.toWei("0.01"), relayed: false, }); await testCloseLoan({ loanId, relayed: true }); }); it("should close an token1/ETH loan (blockchain tx)", async () => { - await fundWallet({ ethAmount: parseEther("0.1"), token1Amount: parseEther("0.5") }); + await fundWallet({ ethAmount: web3.utils.toWei("0.1"), token1Amount: web3.utils.toWei("0.5") }); const loanId = await testOpenLoan({ - collateral: token1, collateralAmount: parseEther("0.5"), debt: ETH_TOKEN, debtAmount: parseEther("0.001"), relayed: false, + collateral: token1, collateralAmount: web3.utils.toWei("0.5"), debt: ETH_TOKEN, debtAmount: web3.utils.toWei("0.001"), relayed: false, }); await testCloseLoan({ loanId, relayed: false }); }); it("should close an token1/ETH loan (relayed tx)", async () => { - await fundWallet({ ethAmount: parseEther("0.1"), token1Amount: parseEther("0.5") }); + await fundWallet({ ethAmount: web3.utils.toWei("0.1"), token1Amount: web3.utils.toWei("0.5") }); const loanId = await testOpenLoan({ - collateral: token1, collateralAmount: parseEther("0.5"), debt: ETH_TOKEN, debtAmount: parseEther("0.001"), relayed: false, + collateral: token1, collateralAmount: web3.utils.toWei("0.5"), debt: ETH_TOKEN, debtAmount: web3.utils.toWei("0.001"), relayed: false, }); await testCloseLoan({ loanId, relayed: true }); }); it("should close a loan collateralized with ETH when there is a pre-existing loan collateralized with token1", async () => { - await fundWallet({ ethAmount: parseEther("0.5"), token1Amount: parseEther("0.5") }); + await fundWallet({ ethAmount: web3.utils.toWei("0.5"), token1Amount: web3.utils.toWei("0.5") }); await testOpenLoan({ - collateral: token1, collateralAmount: parseEther("0.4"), debt: ETH_TOKEN, debtAmount: parseEther("0.0000001"), relayed: false, + collateral: token1, collateralAmount: web3.utils.toWei("0.4"), debt: ETH_TOKEN, debtAmount: web3.utils.toWei("0.0000001"), relayed: false, }); const loanId = await testOpenLoan({ - collateral: ETH_TOKEN, collateralAmount: parseEther("0.4"), debt: token1, debtAmount: parseEther("0.0000001"), relayed: false, + collateral: ETH_TOKEN, collateralAmount: web3.utils.toWei("0.4"), debt: token1, debtAmount: web3.utils.toWei("0.0000001"), relayed: false, }); // should not exit any market await testCloseLoan({ loanId, relayed: false, debtMarkets: 0 }); }); it("should close an ETH/token1+token2 loan (blockchain tx)", async () => { - await fundWallet({ ethAmount: parseEther("1"), token1Amount: parseEther("0.5"), token2Amount: parseEther("0.5") }); + await fundWallet({ ethAmount: web3.utils.toWei("1"), token1Amount: web3.utils.toWei("0.5"), token2Amount: web3.utils.toWei("0.5") }); const loanId = await testOpenLoan({ - collateral: ETH_TOKEN, collateralAmount: parseEther("0.2"), debt: token1, debtAmount: parseEther("0.01"), relayed: false, + collateral: ETH_TOKEN, collateralAmount: web3.utils.toWei("0.2"), debt: token1, debtAmount: web3.utils.toWei("0.01"), relayed: false, }); await testChangeDebt({ - loanId, debtToken: token2, amount: parseEther("0.001"), add: true, relayed: false, + loanId, debtToken: token2, amount: web3.utils.toWei("0.001"), add: true, relayed: false, }); await testCloseLoan({ loanId, relayed: false, debtMarkets: 2 }); }); it("should close an ETH/token1+token2 loan (relayed tx)", async () => { - await fundWallet({ ethAmount: parseEther("1"), token1Amount: parseEther("0.5"), token2Amount: parseEther("0.5") }); + await fundWallet({ ethAmount: web3.utils.toWei("1"), token1Amount: web3.utils.toWei("0.5"), token2Amount: web3.utils.toWei("0.5") }); const loanId = await testOpenLoan({ - collateral: ETH_TOKEN, collateralAmount: parseEther("0.2"), debt: token1, debtAmount: parseEther("0.01"), relayed: false, + collateral: ETH_TOKEN, collateralAmount: web3.utils.toWei("0.2"), debt: token1, debtAmount: web3.utils.toWei("0.01"), relayed: false, }); await testChangeDebt({ - loanId, debtToken: token2, amount: parseEther("0.001"), add: true, relayed: false, + loanId, debtToken: token2, amount: web3.utils.toWei("0.001"), add: true, relayed: false, }); await testCloseLoan({ loanId, relayed: true, debtMarkets: 2 }); }); diff --git a/test/makerV2Manager_invest.js b/test/makerV2Manager_invest.js index 802ba6e47..d7833220a 100644 --- a/test/makerV2Manager_invest.js +++ b/test/makerV2Manager_invest.js @@ -87,8 +87,8 @@ contract("MakerV2Invest", (accounts) => { await wallet.init(owner, [versionManager.address]); await versionManager.upgradeWallet(wallet.address, await versionManager.lastVersion(), { from: owner }); - await sai["mint(address,uint256)"](wallet.address, DAI_SENT.mul(20)); - await dai["mint(address,uint256)"](wallet.address, DAI_SENT.mul(20)); + await sai["mint(address,uint256)"](wallet.address, DAI_SENT.times(20)); + await dai["mint(address,uint256)"](wallet.address, DAI_SENT.times(20)); }); async function exchangeWithPot({ toPot, relayed, all = false }) { diff --git a/test/makerV2Manager_loan.js b/test/makerV2Manager_loan.js index 859912cc5..5e3b338cd 100644 --- a/test/makerV2Manager_loan.js +++ b/test/makerV2Manager_loan.js @@ -146,7 +146,7 @@ contract("MakerV2Loan", (accounts) => { const { ilk } = await makerRegistry.collaterals(tokenAddress_); const { spot, dust } = await vat.ilks(ilk); const daiAmount = dust.div(RAY); - const collateralAmount = dust.div(spot).mul(2); + const collateralAmount = dust.div(spot).times(2); return { daiAmount, collateralAmount }; } @@ -262,7 +262,7 @@ contract("MakerV2Loan", (accounts) => { ? await getBalance(walletAddress) : await collateral.balanceOf(walletAddress); - const expectedCollateralChange = collateralAmount.mul(add ? -1 : 1).toString(); + const expectedCollateralChange = collateralAmount.times(add ? -1 : 1).toString(); assert.equal( afterCollateral.sub(beforeCollateral).toString(), expectedCollateralChange, @@ -461,7 +461,7 @@ contract("MakerV2Loan", (accounts) => { const { collateralAmount, daiAmount } = await getTestAmounts(ETH_TOKEN); const loanId = await testOpenLoan({ collateralAmount, daiAmount, relayed }); // give some ETH to the wallet to be used for repayment - await owner.send({ to: walletAddress, value: collateralAmount.mul(2) }); + await owner.send({ to: walletAddress, value: collateralAmount.times(2) }); await increaseTime(3); // wait 3 seconds const beforeDAI = await dai.balanceOf(wallet.address); const method = "closeLoan"; @@ -563,7 +563,7 @@ contract("MakerV2Loan", (accounts) => { const tx = await makerV2[method](...params, { gasLimit: 1000000, from: owner }); txReceipt = tx.receipt; } - assert.isTrue(await hasEvent(txReceipt, makerV2, "LoanAcquired"), "should have generated LoanAcquired event"); + hasEvent(txReceipt, "LoanAcquired"); // The loanId held by the MakerV2Manager will be different from the transferred vault id, in case the latter was merged into an existing vault const featureLoanId = await makerV2.loanIds(walletAddress, ilk); diff --git a/test/multisig.js b/test/multisig.js index c682f723b..1fbc51d7f 100644 --- a/test/multisig.js +++ b/test/multisig.js @@ -89,7 +89,7 @@ contract("MultiSigWallet", (accounts) => { async function getMultiSigParams(functioName, params) { const nonce = await multisig.nonce(); - const data = multisig.contract.methods[functioName]([...params]).encodeABI; + const data = multisig.contract.methods[functioName]([...params]).encodeABI(); const signedData = MultisigExecutor.signHash(multisig.address, multisig.address, 0, data, nonce.toNumber()); const signatures = await getSignatures(signedData, [owner1, owner2]); return { data, signatures }; diff --git a/test/transferManager.js b/test/transferManager.js index d02896bb7..c5f184a1b 100644 --- a/test/transferManager.js +++ b/test/transferManager.js @@ -288,7 +288,7 @@ contract("TransferManager", (accounts) => { await previousTransferManager.addModule(existingWallet.address, versionManager.address, { from: owner }); const tx = await versionManager.upgradeWallet(existingWallet.address, await versionManager.lastVersion(), { from: owner }); const txReceipt = tx.receipt; - assert.isTrue(utils.hasEvent(txReceipt, transferManager, "DailyLimitMigrated")); + assert.isTrue(utils.hasEvent(txReceipt, "DailyLimitMigrated")); // check result limit = await transferManager.getCurrentLimit(existingWallet.address); assert.equal(limit.toNumber(), 4000000, "limit should have been migrated"); @@ -336,7 +336,7 @@ contract("TransferManager", (accounts) => { it("should be able to disable the limit", async () => { const tx = await transferManager.disableLimit(wallet.address, { from: owner }); const txReceipt = tx.receipt; - assert.isTrue(utils.hasEvent(txReceipt, transferManager, "DailyLimitDisabled")); + assert.isTrue(utils.hasEvent(txReceipt, "DailyLimitDisabled")); let limitDisabled = await transferManager.isLimitDisabled(wallet.address); assert.isFalse(limitDisabled); await increaseTime(SECURITY_PERIOD + 1); diff --git a/utils/defi-deployer.js b/utils/defi-deployer.js index f6164dfdd..c9ffaac53 100644 --- a/utils/defi-deployer.js +++ b/utils/defi-deployer.js @@ -46,7 +46,7 @@ module.exports = { await uniswapFactory.createExchange(token.address, { from: infrastructure }); const uniswapExchangeAddress = await uniswapFactory.getExchange(token.address); const tokenExchange = await UniswapExchange.at(uniswapExchangeAddress); - const tokenLiquidity = ethLiquidity.mul(WAD).div(ethPerToken[i]); + const tokenLiquidity = ethLiquidity.times(WAD).div(ethPerToken[i]); await token["mint(address,uint256)"](infrastructure, tokenLiquidity); await token.approve(tokenExchange.address, tokenLiquidity, { from: infrastructure }); const { timestamp } = await web3.eth.getBlock("latest"); @@ -147,7 +147,7 @@ module.exports = { // Allow daiJoin to mint DAI await dai.rely(daiJoin.address); // Give daiJoin some internal DAI in the vat - await vat.suck(daiJoin.address, daiJoin.address, RAD.mul(1000000)); + await vat.suck(daiJoin.address, daiJoin.address, RAD.times(1000000)); // Deploy and setup SCD to MCD Migration const migration = await ScdMcdMigration.new( diff --git a/utils/relay-manager.js b/utils/relay-manager.js index c51a0d113..87cfe4b01 100644 --- a/utils/relay-manager.js +++ b/utils/relay-manager.js @@ -59,6 +59,7 @@ class RelayManager { _refundAddress, { gasLimit: _gasLimitRelay, gasPrice: _gasPrice, from: relayerAccount }, ); + return tx.receipt; } } diff --git a/utils/utilities.js b/utils/utilities.js index f4ca2a93a..0d432bb89 100644 --- a/utils/utilities.js +++ b/utils/utilities.js @@ -101,7 +101,7 @@ module.exports = { }, async hasEvent(txReceipt, eventName) { - const event = txReceipt.logs.find((e) => e.event === eventName); + const event = txReceipt.logs.filter((e) => e.event === eventName); return expect(event, "Event does not exist in recept").to.exist; }, From eada847d40bfe740db747f61e471881b0e44c185 Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Sat, 17 Oct 2020 10:27:44 +0300 Subject: [PATCH 040/113] Fix compoundManager invest test --- package.json | 2 +- test/compoundManager_invest.js | 33 +++++++++++++++++++++++---------- 2 files changed, 24 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index 070c2d849..6a085bd1d 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "compile:test": "npx truffle compile --config truffle-config-contracts-test.js", "compile": "npm run compile:infrastructure && npm run compile:modules && npm run compile:wallet", "cc": "rm -rf build && rm -rf build-legacy && npm run compile:lib && npm run compile && npm run compile:legacy && npm run compile:test", - "ganache": "npx ganache-cli --chainId 1895 --networkId 1597649375983 --gasLimit=20700000 -e 10000 --acctKeys=\"./ganache-accounts.json\" --account=\"0x7ab741b57e8d94dd7e1a29055646bafde7010f38a900f55bbd7647880faa6ee8, 100000000000000000000\" --account=\"0x2030b463177db2da82908ef90fa55ddfcef56e8183caf60db464bc398e736e6f, 100000000000000000000\" --account=\"0x62ecd49c4ccb41a70ad46532aed63cf815de15864bc415c87d507afd6a5e8da2, 100000000000000000000\" --account=\"0xf473040b1a83739a9c7cc1f5719fab0f5bf178f83314d98557c58aae1910e03a, 100000000000000000000\" --account=\"0x823d590ed2cb5e8493bb0efc834771c1cde36f9fc49b9fe3620ebd0754ad6ea2, 100000000000000000000\" --account=\"0xd6d710943471e4c37ceb787857e7a2b41ca57f9cb4307ee9a9b21436a8e709c3, 100000000000000000000\" --account=\"0x187bb12e927c1652377405f81d93ce948a593f7d66cfba383ee761858b05921a, 100000000000000000000\" --account=\"0xf41486fdb04505e7966c8720a353ed92ce0d6830f8a5e915fbde735106a06d25, 100000000000000000000\" --account=\"0x6ca40ba4cca775643398385022264c0c414da1abd21d08d9e7136796a520a543, 100000000000000000000\" --account=\"0xfac0bc9325ad342033afe956e83f0bf8f1e863c1c3e956bc75d66961fe4cd186, 100000000000000000000\"", + "ganache": "npx ganache-cli --chainId 1895 --networkId 1597649375983 --gasLimit=20700000 -e 10000 --acctKeys=\"./ganache-accounts.json\" --account=\"0x7ab741b57e8d94dd7e1a29055646bafde7010f38a900f55bbd7647880faa6ee8, 100000000000000000000000000000000000000\" --account=\"0x2030b463177db2da82908ef90fa55ddfcef56e8183caf60db464bc398e736e6f, 100000000000000000000000000000000000000\" --account=\"0x62ecd49c4ccb41a70ad46532aed63cf815de15864bc415c87d507afd6a5e8da2, 100000000000000000000000000000000000000\" --account=\"0xf473040b1a83739a9c7cc1f5719fab0f5bf178f83314d98557c58aae1910e03a, 100000000000000000000000000000000000000\" --account=\"0x823d590ed2cb5e8493bb0efc834771c1cde36f9fc49b9fe3620ebd0754ad6ea2, 100000000000000000000000000000000000000\" --account=\"0xd6d710943471e4c37ceb787857e7a2b41ca57f9cb4307ee9a9b21436a8e709c3, 100000000000000000000000000000000000000\" --account=\"0x187bb12e927c1652377405f81d93ce948a593f7d66cfba383ee761858b05921a, 100000000000000000000000000000000000000\" --account=\"0xf41486fdb04505e7966c8720a353ed92ce0d6830f8a5e915fbde735106a06d25, 100000000000000000000000000000000000000\" --account=\"0x6ca40ba4cca775643398385022264c0c414da1abd21d08d9e7136796a520a543, 100000000000000000000000000000000000000\" --account=\"0xfac0bc9325ad342033afe956e83f0bf8f1e863c1c3e956bc75d66961fe4cd186, 100000000000000000000000000000000000000\"", "kovan-fork": "npx ganache-cli -i 42 -l 20700000 -f https://kovan.infura.io/v3/$(cat .env | sed -En 's/INFURA_KEY=''\"''([^''\"'']+)''\"''/\\1/p')@16988040", "kovan-fork-latest": "npx ganache-cli -i 42 -l 20700000 -f https://kovan.infura.io/v3/$(cat .env | sed -En 's/INFURA_KEY=''\"''([^''\"'']+)''\"''/\\1/p')", "test": "npx truffle test", diff --git a/test/compoundManager_invest.js b/test/compoundManager_invest.js index 6cc334082..a3acab3a2 100644 --- a/test/compoundManager_invest.js +++ b/test/compoundManager_invest.js @@ -1,7 +1,12 @@ /* global artifacts */ const { formatBytes32String } = require("ethers").utils; const ethers = require("ethers"); -const { BN } = require("bn.js"); +const chai = require("chai"); +const BN = require("bn.js"); +const bnChai = require("bn-chai"); + +const { expect } = chai; +chai.use(bnChai(BN)); const utils = require("../utils/utilities.js"); const GuardianStorage = artifacts.require("GuardianStorage"); @@ -61,10 +66,10 @@ contract("Invest Manager with Compound", (accounts) => { const comptrollerProxy = await Unitroller.new(); const comptrollerImpl = await Comptroller.new(); await comptrollerProxy._setPendingImplementation(comptrollerImpl.address); - await comptrollerImpl._become(comptrollerProxy.address, oracle.address, WAD.div(10), 5, false); + await comptrollerImpl._become(comptrollerProxy.address, oracle.address, WAD.divn(10), 5, false); comptroller = await Comptroller.at(comptrollerProxy.address); // deploy Interest rate model - const interestModel = await InterestModel.new(WAD.times(250).div(10000), WAD.times(2000).div(10000)); + const interestModel = await InterestModel.new(WAD.muln(250).divn(10000), WAD.muln(2000).divn(10000)); // deploy CEther cEther = await CEther.new( comptrollerProxy.address, @@ -88,7 +93,7 @@ contract("Invest Manager with Compound", (accounts) => { 18, ); // add price to Oracle - await oracle.setUnderlyingPrice(cToken.address, WAD.div(10)); + await oracle.setUnderlyingPrice(cToken.address, WAD.divn(10)); // list cToken in Comptroller await comptroller._supportMarket(cEther.address); await comptroller._supportMarket(cToken.address); @@ -96,8 +101,8 @@ contract("Invest Manager with Compound", (accounts) => { oracleProxy = await PriceOracleProxy.new(comptroller.address, oracle.address, cEther.address); await comptroller._setPriceOracle(oracleProxy.address); // set collateral factor - await comptroller._setCollateralFactor(cToken.address, WAD.div(10)); - await comptroller._setCollateralFactor(cEther.address, WAD.div(10)); + await comptroller._setCollateralFactor(cToken.address, WAD.divn(10)); + await comptroller._setCollateralFactor(cEther.address, WAD.divn(10)); // add liquidity to tokens const tenEther = await web3.utils.toWei("10", "ether"); @@ -159,10 +164,9 @@ contract("Invest Manager with Compound", (accounts) => { const cOracle = await comptroller.oracle(); assert.isTrue(cOracle === oracleProxy.address, "oracle should be registered"); const cTokenPrice = await oracleProxy.getUnderlyingPrice(cToken.address); - console.log("cTokenPrice", cTokenPrice) - assert.isTrue(cTokenPrice.eq(WAD.div(10)), "cToken price should be 1e17"); + expect(cTokenPrice).to.eq.BN(WAD.divn(10)); const cEtherPrice = await oracleProxy.getUnderlyingPrice(cEther.address); - assert.isTrue(cEtherPrice.eq(WAD), "cEther price should be 1e18"); + expect(cEtherPrice).to.eq.BN(WAD); }); }); @@ -232,8 +236,17 @@ contract("Invest Manager with Compound", (accounts) => { } await utils.hasEvent(txReceipt, "InvestmentRemoved"); + // TODO: Manual division result rounding up until https://github.com/indutny/bn.js/issues/79 is added to BN.js + const result = before.muln(10000 - fraction); + const divisionRemainder = new BN(result.modn(10000)); + + let divisionResult = result.divn(10000); + if (!divisionRemainder.isZero()) { + divisionResult = divisionResult.iaddn(1); + } + const after = investInEth ? await cEther.balanceOf(wallet.address) : await cToken.balanceOf(wallet.address); - assert.isTrue(after.eq(Math.ceil((before * (10000 - fraction)) / 10000)), "should have removed the correct fraction"); + expect(after).to.eq.BN(divisionResult); } describe("Add Investment", () => { From fc60a2a14a3df7c9a6471cca90091e8262f31185 Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Tue, 20 Oct 2020 12:39:35 +0300 Subject: [PATCH 041/113] Use parseLogs util method --- test/makerV2Manager_loan.js | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/test/makerV2Manager_loan.js b/test/makerV2Manager_loan.js index 5e3b338cd..d12b7970e 100644 --- a/test/makerV2Manager_loan.js +++ b/test/makerV2Manager_loan.js @@ -253,7 +253,8 @@ contract("MakerV2Loan", (accounts) => { const params = [wallet.address, loanId, collateral.address, collateralAmount]; if (relayed) { const txR = await manager.relay(makerV2Manager, method, params, wallet, [owner]); - assert.isTrue(txR.events.find((e) => e.event === "TransactionExecuted").args.success, "Relayed tx should succeed"); + const txExecutedEvent = parseLogs(txR, "TransactionExecuted"); + assert.isTrue(txExecutedEvent.args.success, "Relayed tx should succeed"); } else { await makerV2Manager[method](...params, { gasLimit: 2000000, from: owner }); } @@ -350,7 +351,8 @@ contract("MakerV2Loan", (accounts) => { const params = [wallet.address, loanId, dai.address, daiAmount]; if (relayed) { const txR = await manager.relay(makerV2, method, params, { address: walletAddress }, [owner]); - assert.isTrue(txR.events.find((e) => e.event === "TransactionExecuted").args.success, "Relayed tx should succeed"); + const txExecutedEvent = parseLogs(txR, "TransactionExecuted"); + assert.isTrue(txExecutedEvent.args.success, "Relayed tx should succeed"); } else { await makerV2[method](...params, { gasLimit: 2000000, from: owner }); } @@ -468,7 +470,8 @@ contract("MakerV2Loan", (accounts) => { const params = [wallet.address, loanId]; if (relayed) { const txR = await manager.relay(makerV2, method, params, { address: walletAddress }, [owner]); - assert.isTrue(txR.events.find((e) => e.event === "TransactionExecuted").args.success, "Relayed tx should succeed"); + const txExecutedEvent = parseLogs(txR, "TransactionExecuted"); + assert.isTrue(txExecutedEvent.args.success, "Relayed tx should succeed"); } else { await makerV2[method](...params, { gasLimit: 3000000, from: owner }); } @@ -548,7 +551,8 @@ contract("MakerV2Loan", (accounts) => { // Create the vault with `owner` as owner const { ilk } = await makerRegistry.collaterals(weth.address); const txR = await (await cdpManager.open(ilk, owner), { from: owner }).wait(); - const vaultId = txR.events.find((e) => e.event === "NewCdp").args.cdp; + const txNewCdpEvent = parseLogs(txR, "NewCdp"); + const vaultId = txNewCdpEvent.args.cdp; // Transfer the vault to the wallet await cdpManager.give(vaultId, walletAddress, { from: owner }); // Transfer the vault to the feature @@ -558,7 +562,8 @@ contract("MakerV2Loan", (accounts) => { let txReceipt; if (relayed) { txReceipt = await manager.relay(makerV2, method, params, { address: walletAddress }, [owner]); - assert.isTrue(txReceipt.events.find((e) => e.event === "TransactionExecuted").args.success, "Relayed tx should succeed"); + const txExecutedEvent = parseLogs(txR, "TransactionExecuted"); + assert.isTrue(txExecutedEvent.args.success, "Relayed tx should succeed"); } else { const tx = await makerV2[method](...params, { gasLimit: 1000000, from: owner }); txReceipt = tx.receipt; @@ -589,7 +594,8 @@ contract("MakerV2Loan", (accounts) => { // Create the vault with `owner` as owner const { ilk } = await makerRegistry.collaterals(weth.address); const txR = await (await cdpManager.open(ilk, owner, { from: owner })).wait(); - const vaultId = txR.events.find((e) => e.event === "NewCdp").args.cdp; + const txNewCdpEvent = parseLogs(txR, "NewCdp"); + const vaultId = txNewCdpEvent.args.cdp; const loanId = bigNumToBytes32(vaultId); // We are NOT transferring the vault from the owner to the wallet await assertRevert( @@ -605,7 +611,8 @@ contract("MakerV2Loan", (accounts) => { // Create the vault with `owner` as owner const { ilk } = await makerRegistry.collaterals(weth.address); const txR = await (await cdpManager.open(ilk, owner, { from: owner })).wait(); - const vaultId = txR.events.find((e) => e.event === "NewCdp").args.cdp; + const txNewCdpEvent = parseLogs(txR, "NewCdp"); + const vaultId = txNewCdpEvent.args.cdp; const loanId = bigNumToBytes32(vaultId); // Transfer the vault to the fake wallet await cdpManager.give(vaultId, fakeWallet.address, { from: owner }); @@ -635,7 +642,8 @@ contract("MakerV2Loan", (accounts) => { // Create the vault with `owner` as owner const { ilk } = await makerRegistry.collaterals(weth.address); const txR = await (await cdpManager.open(ilk, owner, { from: owner })).wait(); - const vaultId = txR.events.find((e) => e.event === "NewCdp").args.cdp; + const txNewCdpEvent = parseLogs(txR, "NewCdp"); + const vaultId = txNewCdpEvent.args.cdp; const loanId = bigNumToBytes32(vaultId); // Transfer the vault to the fake wallet await cdpManager.give(vaultId, fakeWallet.address, { from: owner }); @@ -702,7 +710,8 @@ contract("MakerV2Loan", (accounts) => { const params = [walletAddress, lastVersion]; if (relayed) { const txR = await manager.relay(versionManager, method, params, wallet, [owner]); - assert.isTrue(txR.events.find((e) => e.event === "TransactionExecuted").args.success, "Relayed tx should succeed"); + const txTransactionExecuted = parseLogs(txR, "NewCdp"); + assert.isTrue(txTransactionExecuted.args.success, "Relayed tx should succeed"); } else { await versionManager[method](...params, { gasLimit: 2000000, from: owner }); } From b551589f3a57877899e97f5fccc8875684f2c1aa Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Wed, 21 Oct 2020 12:45:31 +0300 Subject: [PATCH 042/113] Updates to package-lock file --- package-lock.json | 328 ++++++++++++++++++++++++++++++++-------------- 1 file changed, 228 insertions(+), 100 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0554fbbec..2cc5b63f5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1795,6 +1795,7 @@ "has": "^1.0.3", "has-symbols": "^1.0.1", "is-callable": "^1.2.2", + "is-negative-zero": "^2.0.0", "is-regex": "^1.1.1", "object-inspect": "^1.8.0", "object-keys": "^1.1.1", @@ -1809,8 +1810,30 @@ "integrity": "sha512-VT/cxmx5yaoHSOTSyrCygIDFco+RsibY2NM0a4RdEeY/4KgqezwFtK1yr3U67xYhqJSlASm2pKhLVzPj2lr4bA==", "requires": { "define-properties": "^1.1.3", + "es-abstract": "^1.18.0-next.0", "has-symbols": "^1.0.1", "object-keys": "^1.1.1" + }, + "dependencies": { + "es-abstract": { + "version": "1.18.0-next.1", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz", + "integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==", + "requires": { + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1", + "is-callable": "^1.2.2", + "is-negative-zero": "^2.0.0", + "is-regex": "^1.1.1", + "object-inspect": "^1.8.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.1", + "string.prototype.trimend": "^1.0.1", + "string.prototype.trimstart": "^1.0.1" + } + } } } } @@ -3070,62 +3093,73 @@ "dependencies": { "@types/bn.js": { "version": "4.11.6", - "bundled": true, + "resolved": false, + "integrity": "sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg==", "requires": { "@types/node": "*" } }, "@types/node": { "version": "14.11.2", - "bundled": true + "resolved": false, + "integrity": "sha512-jiE3QIxJ8JLNcb1Ps6rDbysDhN4xa8DJJvuC9prr6w+1tIh+QAbYyNF3tyiZNLDBIuBCf4KEcV2UvQm/V60xfA==" }, "@types/pbkdf2": { "version": "3.1.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-Cf63Rv7jCQ0LaL8tNXmEyqTHuIJxRdlS5vMh1mj5voN4+QFhVZnlZruezqpWYDiJ8UTzhP0VmeLXCmBk66YrMQ==", "requires": { "@types/node": "*" } }, "@types/secp256k1": { "version": "4.0.1", - "bundled": true, + "resolved": false, + "integrity": "sha512-+ZjSA8ELlOp8SlKi0YLB2tz9d5iPNEmOBd+8Rz21wTMdaXQIa9b6TEnD6l5qKOCypE7FSyPyck12qZJxSDNoog==", "requires": { "@types/node": "*" } }, "ansi-regex": { "version": "4.1.0", - "bundled": true + "resolved": false, + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" }, "ansi-styles": { "version": "3.2.1", - "bundled": true, + "resolved": false, + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "requires": { "color-convert": "^1.9.0" } }, "base-x": { "version": "3.0.8", - "bundled": true, + "resolved": false, + "integrity": "sha512-Rl/1AWP4J/zRrk54hhlxH4drNxPJXYUaKffODVI53/dAsV4t9fBxyxYKAVPU1XBHxYwOWP9h9H0hM2MVw4YfJA==", "requires": { "safe-buffer": "^5.0.1" } }, "blakejs": { "version": "1.1.0", - "bundled": true + "resolved": false, + "integrity": "sha1-ad+S75U6qIylGjLfarHFShVfx6U=" }, "bn.js": { "version": "4.11.9", - "bundled": true + "resolved": false, + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" }, "brorand": { "version": "1.1.0", - "bundled": true + "resolved": false, + "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" }, "browserify-aes": { "version": "1.2.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", "requires": { "buffer-xor": "^1.0.3", "cipher-base": "^1.0.0", @@ -3137,14 +3171,16 @@ }, "bs58": { "version": "4.0.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-vhYedsNU9veIrkBx9j806MTwpCo=", "requires": { "base-x": "^3.0.2" } }, "bs58check": { "version": "2.1.2", - "bundled": true, + "resolved": false, + "integrity": "sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==", "requires": { "bs58": "^4.0.0", "create-hash": "^1.1.0", @@ -3153,19 +3189,23 @@ }, "buffer-from": { "version": "1.1.1", - "bundled": true + "resolved": false, + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==" }, "buffer-xor": { "version": "1.0.3", - "bundled": true + "resolved": false, + "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=" }, "camelcase": { "version": "5.3.1", - "bundled": true + "resolved": false, + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" }, "cipher-base": { "version": "1.0.4", - "bundled": true, + "resolved": false, + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", "requires": { "inherits": "^2.0.1", "safe-buffer": "^5.0.1" @@ -3173,7 +3213,8 @@ }, "cliui": { "version": "5.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", "requires": { "string-width": "^3.1.0", "strip-ansi": "^5.2.0", @@ -3182,18 +3223,21 @@ }, "color-convert": { "version": "1.9.3", - "bundled": true, + "resolved": false, + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", "requires": { "color-name": "1.1.3" } }, "color-name": { "version": "1.1.3", - "bundled": true + "resolved": false, + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" }, "create-hash": { "version": "1.2.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", "requires": { "cipher-base": "^1.0.1", "inherits": "^2.0.1", @@ -3204,7 +3248,8 @@ }, "create-hmac": { "version": "1.1.7", - "bundled": true, + "resolved": false, + "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", "requires": { "cipher-base": "^1.0.3", "create-hash": "^1.1.0", @@ -3216,7 +3261,8 @@ }, "cross-spawn": { "version": "6.0.5", - "bundled": true, + "resolved": false, + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", "requires": { "nice-try": "^1.0.4", "path-key": "^2.0.1", @@ -3227,11 +3273,13 @@ }, "decamelize": { "version": "1.2.0", - "bundled": true + "resolved": false, + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" }, "elliptic": { "version": "6.5.3", - "bundled": true, + "resolved": false, + "integrity": "sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==", "requires": { "bn.js": "^4.4.0", "brorand": "^1.0.1", @@ -3244,18 +3292,21 @@ }, "emoji-regex": { "version": "7.0.3", - "bundled": true + "resolved": false, + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==" }, "end-of-stream": { "version": "1.4.4", - "bundled": true, + "resolved": false, + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", "requires": { "once": "^1.4.0" } }, "ethereum-cryptography": { "version": "0.1.3", - "bundled": true, + "resolved": false, + "integrity": "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==", "requires": { "@types/pbkdf2": "^3.0.0", "@types/secp256k1": "^4.0.1", @@ -3276,7 +3327,8 @@ }, "ethereumjs-util": { "version": "6.2.1", - "bundled": true, + "resolved": false, + "integrity": "sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw==", "requires": { "@types/bn.js": "^4.11.3", "bn.js": "^4.11.0", @@ -3289,7 +3341,8 @@ }, "ethjs-util": { "version": "0.1.6", - "bundled": true, + "resolved": false, + "integrity": "sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w==", "requires": { "is-hex-prefixed": "1.0.0", "strip-hex-prefix": "1.0.0" @@ -3297,7 +3350,8 @@ }, "evp_bytestokey": { "version": "1.0.3", - "bundled": true, + "resolved": false, + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", "requires": { "md5.js": "^1.3.4", "safe-buffer": "^5.1.1" @@ -3305,7 +3359,8 @@ }, "execa": { "version": "1.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", "requires": { "cross-spawn": "^6.0.0", "get-stream": "^4.0.0", @@ -3318,25 +3373,29 @@ }, "find-up": { "version": "3.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", "requires": { "locate-path": "^3.0.0" } }, "get-caller-file": { "version": "2.0.5", - "bundled": true + "resolved": false, + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" }, "get-stream": { "version": "4.1.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", "requires": { "pump": "^3.0.0" } }, "hash-base": { "version": "3.1.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", "requires": { "inherits": "^2.0.4", "readable-stream": "^3.6.0", @@ -3345,7 +3404,8 @@ }, "hash.js": { "version": "1.1.7", - "bundled": true, + "resolved": false, + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", "requires": { "inherits": "^2.0.3", "minimalistic-assert": "^1.0.1" @@ -3353,7 +3413,8 @@ }, "hmac-drbg": { "version": "1.0.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", "requires": { "hash.js": "^1.0.3", "minimalistic-assert": "^1.0.0", @@ -3362,31 +3423,38 @@ }, "inherits": { "version": "2.0.4", - "bundled": true + "resolved": false, + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, "invert-kv": { "version": "2.0.0", - "bundled": true + "resolved": false, + "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==" }, "is-fullwidth-code-point": { "version": "2.0.0", - "bundled": true + "resolved": false, + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" }, "is-hex-prefixed": { "version": "1.0.0", - "bundled": true + "resolved": false, + "integrity": "sha1-fY035q135dEnFIkTxXPggtd39VQ=" }, "is-stream": { "version": "1.1.0", - "bundled": true + "resolved": false, + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" }, "isexe": { "version": "2.0.0", - "bundled": true + "resolved": false, + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" }, "keccak": { "version": "3.0.1", - "bundled": true, + "resolved": false, + "integrity": "sha512-epq90L9jlFWCW7+pQa6JOnKn2Xgl2mtI664seYR6MHskvI9agt7AnDqmAlp9TqU4/caMYbA08Hi5DMZAl5zdkA==", "requires": { "node-addon-api": "^2.0.0", "node-gyp-build": "^4.2.0" @@ -3394,14 +3462,16 @@ }, "lcid": { "version": "2.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", "requires": { "invert-kv": "^2.0.0" } }, "locate-path": { "version": "3.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", "requires": { "p-locate": "^3.0.0", "path-exists": "^3.0.0" @@ -3409,14 +3479,16 @@ }, "map-age-cleaner": { "version": "0.1.3", - "bundled": true, + "resolved": false, + "integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==", "requires": { "p-defer": "^1.0.0" } }, "md5.js": { "version": "1.3.5", - "bundled": true, + "resolved": false, + "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", "requires": { "hash-base": "^3.0.0", "inherits": "^2.0.1", @@ -3425,7 +3497,8 @@ }, "mem": { "version": "4.3.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==", "requires": { "map-age-cleaner": "^0.1.1", "mimic-fn": "^2.0.0", @@ -3434,45 +3507,54 @@ }, "mimic-fn": { "version": "2.1.0", - "bundled": true + "resolved": false, + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==" }, "minimalistic-assert": { "version": "1.0.1", - "bundled": true + "resolved": false, + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" }, "minimalistic-crypto-utils": { "version": "1.0.1", - "bundled": true + "resolved": false, + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=" }, "nice-try": { "version": "1.0.5", - "bundled": true + "resolved": false, + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==" }, "node-addon-api": { "version": "2.0.2", - "bundled": true + "resolved": false, + "integrity": "sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==" }, "node-gyp-build": { "version": "4.2.3", - "bundled": true + "resolved": false, + "integrity": "sha512-MN6ZpzmfNCRM+3t57PTJHgHyw/h4OWnZ6mR8P5j/uZtqQr46RRuDE/P+g3n0YR/AiYXeWixZZzaip77gdICfRg==" }, "npm-run-path": { "version": "2.0.2", - "bundled": true, + "resolved": false, + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", "requires": { "path-key": "^2.0.0" } }, "once": { "version": "1.4.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "requires": { "wrappy": "1" } }, "os-locale": { "version": "3.1.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", "requires": { "execa": "^1.0.0", "lcid": "^2.0.0", @@ -3481,45 +3563,54 @@ }, "p-defer": { "version": "1.0.0", - "bundled": true + "resolved": false, + "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=" }, "p-finally": { "version": "1.0.0", - "bundled": true + "resolved": false, + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=" }, "p-is-promise": { "version": "2.1.0", - "bundled": true + "resolved": false, + "integrity": "sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg==" }, "p-limit": { "version": "2.3.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "requires": { "p-try": "^2.0.0" } }, "p-locate": { "version": "3.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", "requires": { "p-limit": "^2.0.0" } }, "p-try": { "version": "2.2.0", - "bundled": true + "resolved": false, + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" }, "path-exists": { "version": "3.0.0", - "bundled": true + "resolved": false, + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" }, "path-key": { "version": "2.0.1", - "bundled": true + "resolved": false, + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=" }, "pbkdf2": { "version": "3.1.1", - "bundled": true, + "resolved": false, + "integrity": "sha512-4Ejy1OPxi9f2tt1rRV7Go7zmfDQ+ZectEQz3VGUQhgq62HtIRPDyG/JtnwIxs6x3uNMwo2V7q1fMvKjb+Tnpqg==", "requires": { "create-hash": "^1.1.2", "create-hmac": "^1.1.4", @@ -3530,7 +3621,8 @@ }, "pump": { "version": "3.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", "requires": { "end-of-stream": "^1.1.0", "once": "^1.3.1" @@ -3538,14 +3630,16 @@ }, "randombytes": { "version": "2.1.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", "requires": { "safe-buffer": "^5.1.0" } }, "readable-stream": { "version": "3.6.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", "requires": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", @@ -3554,15 +3648,18 @@ }, "require-directory": { "version": "2.1.1", - "bundled": true + "resolved": false, + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" }, "require-main-filename": { "version": "2.0.0", - "bundled": true + "resolved": false, + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==" }, "ripemd160": { "version": "2.0.2", - "bundled": true, + "resolved": false, + "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", "requires": { "hash-base": "^3.0.0", "inherits": "^2.0.1" @@ -3570,22 +3667,26 @@ }, "rlp": { "version": "2.2.6", - "bundled": true, + "resolved": false, + "integrity": "sha512-HAfAmL6SDYNWPUOJNrM500x4Thn4PZsEy5pijPh40U9WfNk0z15hUYzO9xVIMAdIHdFtD8CBDHd75Td1g36Mjg==", "requires": { "bn.js": "^4.11.1" } }, "safe-buffer": { "version": "5.2.1", - "bundled": true + "resolved": false, + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" }, "scrypt-js": { "version": "3.0.1", - "bundled": true + "resolved": false, + "integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==" }, "secp256k1": { "version": "4.0.2", - "bundled": true, + "resolved": false, + "integrity": "sha512-UDar4sKvWAksIlfX3xIaQReADn+WFnHvbVujpcbr+9Sf/69odMwy2MUsz5CKLQgX9nsIyrjuxL2imVyoNHa3fg==", "requires": { "elliptic": "^6.5.2", "node-addon-api": "^2.0.0", @@ -3594,19 +3695,23 @@ }, "semver": { "version": "5.7.1", - "bundled": true + "resolved": false, + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" }, "set-blocking": { "version": "2.0.0", - "bundled": true + "resolved": false, + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" }, "setimmediate": { "version": "1.0.5", - "bundled": true + "resolved": false, + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=" }, "sha.js": { "version": "2.4.11", - "bundled": true, + "resolved": false, + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", "requires": { "inherits": "^2.0.1", "safe-buffer": "^5.0.1" @@ -3614,26 +3719,31 @@ }, "shebang-command": { "version": "1.2.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", "requires": { "shebang-regex": "^1.0.0" } }, "shebang-regex": { "version": "1.0.0", - "bundled": true + "resolved": false, + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=" }, "signal-exit": { "version": "3.0.3", - "bundled": true + "resolved": false, + "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==" }, "source-map": { "version": "0.6.1", - "bundled": true + "resolved": false, + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" }, "source-map-support": { "version": "0.5.12", - "bundled": true, + "resolved": false, + "integrity": "sha512-4h2Pbvyy15EE02G+JOZpUCmqWJuqrs+sEkzewTm++BPi7Hvn/HwcqLAcNxYAyI0x13CpPPn+kMjl+hplXMHITQ==", "requires": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" @@ -3641,7 +3751,8 @@ }, "string-width": { "version": "3.1.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", "requires": { "emoji-regex": "^7.0.1", "is-fullwidth-code-point": "^2.0.0", @@ -3650,47 +3761,55 @@ }, "string_decoder": { "version": "1.3.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", "requires": { "safe-buffer": "~5.2.0" } }, "strip-ansi": { "version": "5.2.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", "requires": { "ansi-regex": "^4.1.0" } }, "strip-eof": { "version": "1.0.0", - "bundled": true + "resolved": false, + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=" }, "strip-hex-prefix": { "version": "1.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-DF8VX+8RUTczd96du1iNoFUA428=", "requires": { "is-hex-prefixed": "1.0.0" } }, "util-deprecate": { "version": "1.0.2", - "bundled": true + "resolved": false, + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" }, "which": { "version": "1.3.1", - "bundled": true, + "resolved": false, + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", "requires": { "isexe": "^2.0.0" } }, "which-module": { "version": "2.0.0", - "bundled": true + "resolved": false, + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" }, "wrap-ansi": { "version": "5.1.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", "requires": { "ansi-styles": "^3.2.0", "string-width": "^3.0.0", @@ -3699,15 +3818,18 @@ }, "wrappy": { "version": "1.0.2", - "bundled": true + "resolved": false, + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, "y18n": { "version": "4.0.0", - "bundled": true + "resolved": false, + "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==" }, "yargs": { "version": "13.2.4", - "bundled": true, + "resolved": false, + "integrity": "sha512-HG/DWAJa1PAnHT9JAhNa8AbAv3FPaiLzioSjCcmuXXhP8MlpHO5vwls4g4j6n30Z74GVQj8Xa62dWVx1QCGklg==", "requires": { "cliui": "^5.0.0", "find-up": "^3.0.0", @@ -3724,7 +3846,8 @@ }, "yargs-parser": { "version": "13.1.2", - "bundled": true, + "resolved": false, + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", "requires": { "camelcase": "^5.0.0", "decamelize": "^1.2.0" @@ -4297,6 +4420,11 @@ "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.1.tgz", "integrity": "sha512-T/S49scO8plUiAOA2DBTBG3JHpn1yiw0kRp6dgiZ0v2/6twi5eiB0rHtHFH9ZIrvlWc6+4O+m4zg5+Z833aXgw==" }, + "is-negative-zero": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.0.tgz", + "integrity": "sha1-lVOxIbD6wohp2p7UWeIMdUN4hGE=" + }, "is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", From 9432277f4c3277d759ff9144cac42756f3a0f753 Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Wed, 21 Oct 2020 12:58:22 +0300 Subject: [PATCH 043/113] Fixes returning event information from transaction receipt Refactored all parseLog instances to use the new getEvent utils function, which is also now used by hasEvent function Simplify calling web3.utils.toWei(1, ether) => web3.utils.toWei(1) as ether is its default option --- test/compoundManager_invest.js | 41 +++---- test/compoundManager_loan.js | 205 +++++++++++++++++---------------- test/factory.js | 24 ++-- test/makerV2Manager_loan.js | 24 ++-- test/relayer.js | 2 +- test/simpleUpgrader.js | 6 +- test/tokenExchanger.js | 4 +- test/transferManager.js | 16 +-- utils/utilities.js | 53 +++++++-- 9 files changed, 210 insertions(+), 165 deletions(-) diff --git a/test/compoundManager_invest.js b/test/compoundManager_invest.js index a3acab3a2..43a44bd32 100644 --- a/test/compoundManager_invest.js +++ b/test/compoundManager_invest.js @@ -105,10 +105,10 @@ contract("Invest Manager with Compound", (accounts) => { await comptroller._setCollateralFactor(cEther.address, WAD.divn(10)); // add liquidity to tokens - const tenEther = await web3.utils.toWei("10", "ether"); + const tenEther = await web3.utils.toWei("10"); await cEther.mint({ value: tenEther, from: liquidityProvider }); await token.approve(cToken.address, tenEther, { from: liquidityProvider }); - await cToken.mint(web3.utils.toWei("1", "ether"), { from: liquidityProvider }); + await cToken.mint(web3.utils.toWei("1"), { from: liquidityProvider }); /* Deploy Argent Architecture */ @@ -176,14 +176,14 @@ contract("Invest Manager with Compound", (accounts) => { // generate borrows to create interests await comptroller.enterMarkets([cEther.address, cToken.address], { from: borrower }); if (investInEth) { - await token.approve(cToken.address, web3.utils.toWei("20", "ether"), { from: borrower }); - await cToken.mint(web3.utils.toWei("20", "ether"), { from: borrower }); - tx = await cEther.borrow(web3.utils.toWei("0.1", "ether"), { from: borrower }); - await utils.hasEvent(tx.receipt, "Borrow"); + await token.approve(cToken.address, web3.utils.toWei("20"), { from: borrower }); + await cToken.mint(web3.utils.toWei("20"), { from: borrower }); + tx = await cEther.borrow(web3.utils.toWei("0.1"), { from: borrower }); + await utils.hasEvent(tx.receipt, cToken, "Borrow"); } else { - await cEther.mint({ value: web3.utils.toWei("2", "ether"), from: borrower }); - tx = await cToken.borrow(web3.utils.toWei("0.1", "ether"), { from: borrower }); - await utils.hasEvent(tx.receipt, "Borrow"); + await cEther.mint({ value: web3.utils.toWei("2"), from: borrower }); + tx = await cToken.borrow(web3.utils.toWei("0.1"), { from: borrower }); + await utils.hasEvent(tx.receipt, cToken, "Borrow"); } // increase time to accumulate interests await increaseTime(3600 * 24 * days); @@ -209,7 +209,8 @@ contract("Invest Manager with Compound", (accounts) => { txReceipt = tx.receipt; } - await utils.hasEvent(txReceipt, "CompoundManager.InvestmentAdded"); + console.log("txReceipt", txReceipt) + await utils.hasEvent(txReceipt, investManager, "InvestmentAdded"); await accrueInterests(days, investInEth); @@ -224,7 +225,7 @@ contract("Invest Manager with Compound", (accounts) => { txReceipt; const investInEth = (tokenAddress === ETH_TOKEN); - await addInvestment(tokenAddress, web3.utils.toWei("0.1", "ether"), 365, false); + await addInvestment(tokenAddress, web3.utils.toWei("0.1"), 365, false); const before = investInEth ? await cEther.balanceOf(wallet.address) : await cToken.balanceOf(wallet.address); const params = [wallet.address, tokenAddress, fraction]; @@ -234,7 +235,7 @@ contract("Invest Manager with Compound", (accounts) => { tx = await investManager.removeInvestment(...params, { from: owner }); txReceipt = tx.receipt; } - await utils.hasEvent(txReceipt, "InvestmentRemoved"); + await utils.hasEvent(txReceipt, investManager, "InvestmentRemoved"); // TODO: Manual division result rounding up until https://github.com/indutny/bn.js/issues/79 is added to BN.js const result = before.muln(10000 - fraction); @@ -253,25 +254,25 @@ contract("Invest Manager with Compound", (accounts) => { // Successes it("should invest in ERC20 for 1 year and gain interests (blockchain tx)", async () => { - await addInvestment(token.address, web3.utils.toWei("1", "ether"), 365, false); + await addInvestment(token.address, web3.utils.toWei("1"), 365, false); }); it("should invest in ERC20 for 1 year and gain interests (relay tx)", async () => { - await addInvestment(token.address, web3.utils.toWei("1", "ether"), 365, true); + await addInvestment(token.address, web3.utils.toWei("1"), 365, true); }); it("should invest in ETH for 1 year and gain interests (blockchain tx)", async () => { - await addInvestment(ETH_TOKEN, web3.utils.toWei("1", "ether"), 365, false); + await addInvestment(ETH_TOKEN, web3.utils.toWei("1"), 365, false); }); it("should invest in ETH for 1 year and gain interests (relay tx)", async () => { - await addInvestment(ETH_TOKEN, web3.utils.toWei("1", "ether"), 365, true); + await addInvestment(ETH_TOKEN, web3.utils.toWei("1"), 365, true); }); // Reverts it("should fail to invest in ERC20 with an unknown token", async () => { - const params = [wallet.address, ethers.constants.AddressZero, web3.utils.toWei("1", "ether"), 0]; + const params = [wallet.address, ethers.constants.AddressZero, web3.utils.toWei("1"), 0]; await utils.assertRevert(investManager.addInvestment(...params, { from: owner }), "CM: No market for target token"); }); @@ -281,7 +282,7 @@ contract("Invest Manager with Compound", (accounts) => { }); it("should fail to invest in ERC20 when not holding any ERC20", async () => { - const params = [wallet.address, token.address, web3.utils.toWei("1", "ether"), 0]; + const params = [wallet.address, token.address, web3.utils.toWei("1"), 0]; await utils.assertRevert(investManager.addInvestment(...params, { from: owner }), "CM: mint failed"); }); }); @@ -320,8 +321,8 @@ contract("Invest Manager with Compound", (accounts) => { }); it("should fail to remove all of an ERC20 investment when it collateralizes a loan", async () => { - const collateralAmount = await web3.utils.toWei("1", "ether"); - const debtAmount = await web3.utils.toWei("0.001", "ether"); + const collateralAmount = await web3.utils.toWei("1"); + const debtAmount = await web3.utils.toWei("0.001"); await token.transfer(wallet.address, collateralAmount); const openLoanParams = [ wallet.address, diff --git a/test/compoundManager_loan.js b/test/compoundManager_loan.js index d888d4f61..cc09ebefb 100644 --- a/test/compoundManager_loan.js +++ b/test/compoundManager_loan.js @@ -1,8 +1,12 @@ /* global artifacts */ const ethers = require("ethers"); -const { BigNumber } = require("bignumber.js"); -const utils = require("../utils/utilities.js"); +const chai = require("chai"); +const BN = require("bn.js"); +const bnChai = require("bn-chai"); + +const { expect } = chai; +chai.use(bnChai(BN)); const GuardianStorage = artifacts.require("GuardianStorage"); const LockStorage = artifacts.require("LockStorage"); @@ -24,14 +28,14 @@ const CEther = artifacts.require("CEther"); const CErc20 = artifacts.require("CErc20"); const CompoundRegistry = artifacts.require("CompoundRegistry"); -const WAD = new BigNumber("1000000000000000000"); // 10**18 -const ETH_EXCHANGE_RATE = new BigNumber("200000000000000000000000000"); - const ERC20 = artifacts.require("TestERC20"); -const { ETH_TOKEN, getBalance } = require("../utils/utilities.js"); -const RelayManager = require("../utils/relay-manager"); +const WAD = new BN("1000000000000000000"); // 10**18 +const ETH_EXCHANGE_RATE = new BN("200000000000000000000000000"); +const RelayManager = require("../utils/relay-manager"); +const { ETH_TOKEN } = require("../utils/utilities.js"); +const utils = require("../utils/utilities.js"); const ZERO_BYTES32 = ethers.constants.HashZero; contract("Loan Module", (accounts) => { @@ -66,10 +70,10 @@ contract("Loan Module", (accounts) => { const comptrollerProxy = await Unitroller.new(); const comptrollerImpl = await Comptroller.new(); await comptrollerProxy._setPendingImplementation(comptrollerImpl.address); - await comptrollerImpl._become(comptrollerProxy.address, oracle.address, WAD.div(10), 5, false); + await comptrollerImpl._become(comptrollerProxy.address, oracle.address, WAD.divn(10), 5, false); comptroller = await Comptroller.at(comptrollerProxy.address); // deploy Interest rate model - const interestModel = await InterestModel.new(WAD.times(250).div(10000), WAD.times(2000).div(10000)); + const interestModel = await InterestModel.new(WAD.muln(250).divn(10000), WAD.muln(2000).divn(10000)); // deploy CEther cEther = await CEther.new( comptroller.address, @@ -104,8 +108,8 @@ contract("Loan Module", (accounts) => { ); // add price to Oracle - await oracle.setUnderlyingPrice(cToken1.address, WAD.div(10)); - await oracle.setUnderlyingPrice(cToken2.address, WAD.div(10)); + await oracle.setUnderlyingPrice(cToken1.address, WAD.divn(10)); + await oracle.setUnderlyingPrice(cToken2.address, WAD.divn(10)); // list cToken in Comptroller await comptroller._supportMarket(cEther.address); await comptroller._supportMarket(cToken1.address); @@ -114,16 +118,16 @@ contract("Loan Module", (accounts) => { oracleProxy = await PriceOracleProxy.new(comptroller.address, oracle.address, cEther.address); await comptroller._setPriceOracle(oracleProxy.address); // set collateral factor - await comptroller._setCollateralFactor(cToken1.address, WAD.div(10)); - await comptroller._setCollateralFactor(cToken2.address, WAD.div(10)); - await comptroller._setCollateralFactor(cEther.address, WAD.div(10)); + await comptroller._setCollateralFactor(cToken1.address, WAD.divn(10)); + await comptroller._setCollateralFactor(cToken2.address, WAD.divn(10)); + await comptroller._setCollateralFactor(cEther.address, WAD.divn(10)); // add liquidity to tokens - await cEther.mint({ value: web3.utils.toWei("100", "ether"), from: liquidityProvider }); - await token1.approve(cToken1.address, web3.utils.toWei("10", "ether"), { from: liquidityProvider }); - await cToken1.mint(web3.utils.toWei("10", "ether"), { from: liquidityProvider }); - await token2.approve(cToken2.address, web3.utils.toWei("10", "ether"), { from: liquidityProvider }); - await cToken2.mint(web3.utils.toWei("10", "ether"), { from: liquidityProvider }); + await cEther.mint({ value: web3.utils.toWei("100"), from: liquidityProvider }); + await token1.approve(cToken1.address, web3.utils.toWei("10"), { from: liquidityProvider }); + await cToken1.mint(web3.utils.toWei("10"), { from: liquidityProvider }); + await token2.approve(cToken2.address, web3.utils.toWei("10"), { from: liquidityProvider }); + await cToken2.mint(web3.utils.toWei("10"), { from: liquidityProvider }); /* Deploy Argent Architecture */ @@ -181,9 +185,9 @@ contract("Loan Module", (accounts) => { async function testOpenLoan({ collateral, collateralAmount, debt, debtAmount, relayed, }) { - const collateralBefore = (collateral === ETH_TOKEN) ? await getBalance(wallet.address) + const collateralBefore = (collateral === ETH_TOKEN) ? await utils.getBalance(wallet.address) : await collateral.balanceOf(wallet.address); - const debtBefore = (debt === ETH_TOKEN) ? await getBalance(wallet.address) + const debtBefore = (debt === ETH_TOKEN) ? await utils.getBalance(wallet.address) : await debt.balanceOf(wallet.address); const params = [ @@ -199,19 +203,18 @@ contract("Loan Module", (accounts) => { const tx = await loanManager.openLoan(...params, { from: owner }); txReceipt = tx.receipt; } - await utils.hasEvent(txReceipt, "LoanOpened"); - const eventArgs = utils.parseLogs(txReceipt, "LoanOpened"); - const loanId = eventArgs._loanId; + + const event = await utils.getEvent(txReceipt, loanManager, "LoanOpened"); + const loanId = event.args._loanId; assert.isDefined(loanId, "Loan ID should be defined"); - const collateralAfter = (collateral === ETH_TOKEN) ? await getBalance(wallet.address) + const collateralAfter = (collateral === ETH_TOKEN) ? await utils.getBalance(wallet.address) : await collateral.balanceOf(wallet.address); - const debtAfter = (debt === ETH_TOKEN) ? await getBalance(wallet.address) + const debtAfter = (debt === ETH_TOKEN) ? await utils.getBalance(wallet.address) : await debt.balanceOf(wallet.address); - assert.isTrue(collateralBefore.sub(collateralAfter).eq(collateralAmount), - `wallet should have ${collateralAmount} less ETH (relayed: ${relayed})`); - assert.isTrue(debtAfter.sub(debtBefore).eq(debtAmount), `wallet should have ${debtAmount} more token (relayed: ${relayed})`); + expect(collateralBefore.sub(collateralAfter)).to.eq.BN(new BN(collateralAmount)); + expect(debtAfter.sub(debtBefore)).to.eq.BN(new BN(debtAmount)); return loanId; } @@ -219,7 +222,7 @@ contract("Loan Module", (accounts) => { async function testChangeCollateral({ loanId, collateral, amount, add, relayed, }) { - const collateralBalanceBefore = (collateral === ETH_TOKEN) ? await getBalance(wallet.address) + const collateralBalanceBefore = (collateral === ETH_TOKEN) ? await utils.getBalance(wallet.address) : await collateral.balanceOf(wallet.address); const method = add ? "addCollateral" : "removeCollateral"; @@ -235,23 +238,24 @@ contract("Loan Module", (accounts) => { const tx = await loanManager[method](...params, { from: owner }); txReceipt = tx.receipt; } - const collateralBalanceAfter = (collateral === ETH_TOKEN) ? await getBalance(wallet.address) + const collateralBalanceAfter = (collateral === ETH_TOKEN) ? await utils.getBalance(wallet.address) : await collateral.balanceOf(wallet.address); if (add) { - await utils.hasEvent(txReceipt, "CollateralAdded"); - assert.isTrue(collateralBalanceAfter.eq(collateralBalanceBefore.sub(amount)), - `wallet collateral should have decreased by ${amount} (relayed: ${relayed})`); + await utils.hasEvent(txReceipt, loanManager, "CollateralAdded"); + // Wallet collateral should have decreased by `amount` + expect(collateralBalanceAfter).to.eq.BN(collateralBalanceBefore.sub(amount)); + } else { - await utils.hasEvent(txReceipt, "CollateralRemoved"); - assert.isTrue(collateralBalanceAfter.eq(collateralBalanceBefore.add(amount)), - `wallet collateral should have invcreased by ${amount} (relayed: ${relayed})`); + await utils.hasEvent(txReceipt, loanManager, "CollateralRemoved"); + // Wallet collateral should have increased by `amount` + expect(collateralBalanceAfter).to.eq.BN(collateralBalanceBefore.add(amount)); } } async function testChangeDebt({ loanId, debtToken, amount, add, relayed, }) { - const debtBalanceBefore = (debtToken === ETH_TOKEN) ? await getBalance(wallet.address) + const debtBalanceBefore = (debtToken === ETH_TOKEN) ? await utils.getBalance(wallet.address) : await debtToken.balanceOf(wallet.address); const method = add ? "addDebt" : "removeDebt"; @@ -267,13 +271,14 @@ contract("Loan Module", (accounts) => { const tx = await loanManager[method](...params, { from: owner }); txReceipt = tx.receipt; } - const debtBalanceAfter = (debtToken === ETH_TOKEN) ? await getBalance(wallet.address) + const debtBalanceAfter = (debtToken === ETH_TOKEN) ? await utils.getBalance(wallet.address) : await debtToken.balanceOf(wallet.address); if (add) { - await utils.hasEvent(txReceipt, "DebtAdded"); - assert.isTrue(debtBalanceAfter.eq(debtBalanceBefore.add(amount)), `wallet debt should have increase by ${amount} (relayed: ${relayed})`); + await utils.hasEvent(txReceipt, loanManager, "DebtAdded"); + // Wallet debt should have increase by `amount` + expect(debtBalanceAfter).to.eq.BN(debtBalanceBefore.add(amount)); } else { - await utils.hasEvent(txReceipt, "DebtRemoved"); + await utils.hasEvent(txReceipt, loanManager, "DebtRemoved"); assert.isTrue( debtBalanceAfter.eq(debtBalanceBefore.sub(amount)) || amount.eq(ethers.constants.MaxUint256), `wallet debt should have decreased by ${amount} (relayed: ${relayed})`, @@ -283,8 +288,8 @@ contract("Loan Module", (accounts) => { describe("Open Loan", () => { it("should borrow token with ETH as collateral (blockchain tx)", async () => { - const collateralAmount = await web3.utils.toWei("0.1"); - const debtAmount = await web3.utils.toWei("0.05"); + const collateralAmount = web3.utils.toWei("0.1"); + const debtAmount = web3.utils.toWei("0.05"); await fundWallet({ ethAmount: collateralAmount, token1Amount: 0 }); await testOpenLoan({ collateral: ETH_TOKEN, collateralAmount, debt: token1, debtAmount, relayed: false, @@ -326,18 +331,24 @@ contract("Loan Module", (accounts) => { collateral: ETH_TOKEN, collateralAmount, debt: token1, debtAmount, relayed: false, }); let loan = await loanManager.getLoan(wallet.address, ZERO_BYTES32); - assert.isTrue(loan._status === 1 && loan._ethValue.gt(0), "should have obtained the liquidity info of the loan"); + // Should obtain the liquidity info of the loan + expect(loan._status).to.eq.BN(new BN(1)); + expect(loan._ethValue).to.be.gt.BN(0); - await oracle.setUnderlyingPrice(cToken1.address, WAD.times(10)); + await oracle.setUnderlyingPrice(cToken1.address, WAD.muln(10)); loan = await loanManager.getLoan(wallet.address, ZERO_BYTES32); - assert.isTrue(loan._status === 2 && loan._ethValue.gt(0), "should have obtained the shortfall info of the loan"); + // Should obtain the shortfall info of the loan + expect(loan._status).to.eq.BN(new BN(2)); + expect(loan._ethValue).to.be.gt.BN(0); await oracle.setUnderlyingPrice(cToken1.address, 0); await utils.assertRevert(loanManager.getLoan(wallet.address, ZERO_BYTES32), "CM: failed to get account liquidity"); - await oracle.setUnderlyingPrice(cToken1.address, WAD.div(10)); + await oracle.setUnderlyingPrice(cToken1.address, WAD.divn(10)); loan = await loanManager.getLoan(ethers.constants.AddressZero, ZERO_BYTES32); - assert.isTrue(loan._status === 0 && loan._ethValue.eq(0), "should have obtained (0,0) for the non-existing loan info"); + // Should obtain (0,0) for non-existing loan info + expect(loan._status).to.be.zero; + expect(loan._ethValue).to.be.zero; }); }); @@ -357,7 +368,7 @@ contract("Loan Module", (accounts) => { it("should add ETH collateral to a loan (relayed tx)", async () => { await fundWallet({ ethAmount: web3.utils.toWei("0.2"), token1Amount: 0 }); const loanId = await testOpenLoan({ - collateral: ETH_TOKEN, collateralAmount: web3.utils.toWei("0.1"), debt: token1, debtAmount: web3.utils.toWei("0.01", "ether"), relayed: false, + collateral: ETH_TOKEN, collateralAmount: web3.utils.toWei("0.1"), debt: token1, debtAmount: web3.utils.toWei("0.01"), relayed: false, }); await testChangeCollateral({ loanId, collateral: ETH_TOKEN, amount: web3.utils.toWei("0.1"), add: true, relayed: true, @@ -365,9 +376,9 @@ contract("Loan Module", (accounts) => { }); it("should remove ETH collateral from a loan (blockchain tx)", async () => { - await fundWallet({ ethAmount: web3.utils.toWei("0.2", "ether"), token1Amount: 0 }); + await fundWallet({ ethAmount: web3.utils.toWei("0.2"), token1Amount: 0 }); const loanId = await testOpenLoan({ - collateral: ETH_TOKEN, collateralAmount: web3.utils.toWei("0.2", "ether"), debt: token1, debtAmount: web3.utils.toWei("0.01", "ether"), relayed: false, + collateral: ETH_TOKEN, collateralAmount: web3.utils.toWei("0.2"), debt: token1, debtAmount: web3.utils.toWei("0.01"), relayed: false, }); await testChangeCollateral({ loanId, collateral: ETH_TOKEN, amount: web3.utils.toWei("0.001"), add: false, relayed: false, @@ -415,19 +426,19 @@ contract("Loan Module", (accounts) => { }); it("should remove token collateral from a loan (relayed tx)", async () => { - await fundWallet({ ethAmount: 0, token1Amount: web3.utils.toWei("0.5", "ether") }); + await fundWallet({ ethAmount: 0, token1Amount: web3.utils.toWei("0.5") }); const loanId = await testOpenLoan({ - collateral: token1, collateralAmount: web3.utils.toWei("0.5", "ether"), debt: ETH_TOKEN, debtAmount: web3.utils.toWei("0.001"), relayed: false, + collateral: token1, collateralAmount: web3.utils.toWei("0.5"), debt: ETH_TOKEN, debtAmount: web3.utils.toWei("0.001"), relayed: false, }); await testChangeCollateral({ - loanId, collateral: token1, amount: web3.utils.toWei("0.1", "ether"), add: false, relayed: true, + loanId, collateral: token1, amount: web3.utils.toWei("0.1"), add: false, relayed: true, }); }); // Reverts it("should fail to borrow an unknown token", async () => { - const params = [wallet.address, ZERO_BYTES32, ethers.constants.AddressZero, web3.utils.toWei("1", "ether")]; + const params = [wallet.address, ZERO_BYTES32, ethers.constants.AddressZero, web3.utils.toWei("1")]; await utils.assertRevert(loanManager.addDebt(...params, { from: owner }), "CM: No market for target token"); }); @@ -437,12 +448,12 @@ contract("Loan Module", (accounts) => { }); it("should fail to borrow token with no collateral", async () => { - const params = [wallet.address, ZERO_BYTES32, ETH_TOKEN, web3.utils.toWei("1", "ether")]; + const params = [wallet.address, ZERO_BYTES32, ETH_TOKEN, web3.utils.toWei("1")]; await utils.assertRevert(loanManager.addDebt(...params, { from: owner }), "CM: borrow failed"); }); it("should fail to repay an unknown token", async () => { - const params = [wallet.address, ZERO_BYTES32, ethers.constants.AddressZero, web3.utils.toWei("1", "ether")]; + const params = [wallet.address, ZERO_BYTES32, ethers.constants.AddressZero, web3.utils.toWei("1")]; await utils.assertRevert(loanManager.removeDebt(...params, { from: owner }), "CM: No market for target token"); }); @@ -452,113 +463,113 @@ contract("Loan Module", (accounts) => { }); it("should fail to repay too much debt token", async () => { - const collateralAmount = await web3.utils.toWei("1", "ether"); - const debtAmount = await web3.utils.toWei("0.001", "ether"); + const collateralAmount = await web3.utils.toWei("1"); + const debtAmount = await web3.utils.toWei("0.001"); await fundWallet({ ethAmount: collateralAmount, token1Amount: 0 }); const loanId = await testOpenLoan({ collateral: ETH_TOKEN, collateralAmount, debt: token1, debtAmount, relayed: false, }); - const removeDebtParams = [wallet.address, loanId, token1.address, web3.utils.toWei("0.002", "ether")]; + const removeDebtParams = [wallet.address, loanId, token1.address, web3.utils.toWei("0.002")]; await utils.assertRevert(loanManager.removeDebt(...removeDebtParams, { from: owner }), "CM: repayBorrow failed"); }); it("should fail to remove an unknown collateral token", async () => { - const params = [wallet.address, ZERO_BYTES32, ethers.constants.AddressZero, web3.utils.toWei("1", "ether")]; + const params = [wallet.address, ZERO_BYTES32, ethers.constants.AddressZero, web3.utils.toWei("1")]; await utils.assertRevert(loanManager.removeCollateral(...params, { from: owner }), "CM: No market for target token"); }); it("should fail to remove 0 collateral token", async () => { - const params = [wallet.address, ZERO_BYTES32, ETH_TOKEN, web3.utils.toWei("0", "ether")]; + const params = [wallet.address, ZERO_BYTES32, ETH_TOKEN, web3.utils.toWei("0")]; await utils.assertRevert(loanManager.removeCollateral(...params, { from: owner }), "CM: amount cannot be 0"); }); it("should fail to remove too much collateral token", async () => { - const collateralAmount = await web3.utils.toWei("1", "ether"); - const debtAmount = await web3.utils.toWei("0.001", "ether"); + const collateralAmount = await web3.utils.toWei("1"); + const debtAmount = await web3.utils.toWei("0.001"); await fundWallet({ ethAmount: collateralAmount, token1Amount: 0 }); const loanId = await testOpenLoan({ collateral: ETH_TOKEN, collateralAmount, debt: token1, debtAmount, relayed: false, }); - const removeDebtParams = [wallet.address, loanId, token1.address, web3.utils.toWei("0.002", "ether")]; + const removeDebtParams = [wallet.address, loanId, token1.address, web3.utils.toWei("0.002")]; await utils.assertRevert(loanManager.removeCollateral(...removeDebtParams, { from: owner }), "CM: redeemUnderlying failed"); }); }); describe("Increase/Decrease Debt", () => { it("should increase ETH debt to a token1/ETH loan (blockchain tx)", async () => { - await fundWallet({ ethAmount: 0, token1Amount: web3.utils.toWei("0.5", "ether") }); + await fundWallet({ ethAmount: 0, token1Amount: web3.utils.toWei("0.5") }); const loanId = await testOpenLoan({ - collateral: token1, collateralAmount: web3.utils.toWei("0.5", "ether"), debt: ETH_TOKEN, debtAmount: web3.utils.toWei("0.001"), relayed: false, + collateral: token1, collateralAmount: web3.utils.toWei("0.5"), debt: ETH_TOKEN, debtAmount: web3.utils.toWei("0.001"), relayed: false, }); await testChangeDebt({ - loanId, debtToken: ETH_TOKEN, amount: web3.utils.toWei("0.001", "ether"), add: true, relayed: false, + loanId, debtToken: ETH_TOKEN, amount: web3.utils.toWei("0.001"), add: true, relayed: false, }); }); it("should increase ETH debt to a token1/ETH loan (relayed tx)", async () => { - await fundWallet({ ethAmount: 0, token1Amount: web3.utils.toWei("0.5", "ether") }); + await fundWallet({ ethAmount: 0, token1Amount: web3.utils.toWei("0.5") }); const loanId = await testOpenLoan({ - collateral: token1, collateralAmount: web3.utils.toWei("0.5", "ether"), debt: ETH_TOKEN, debtAmount: web3.utils.toWei("0.001", "ether"), relayed: false, + collateral: token1, collateralAmount: web3.utils.toWei("0.5"), debt: ETH_TOKEN, debtAmount: web3.utils.toWei("0.001"), relayed: false, }); await testChangeDebt({ - loanId, debtToken: ETH_TOKEN, amount: web3.utils.toWei("0.001", "ether"), add: true, relayed: true, + loanId, debtToken: ETH_TOKEN, amount: web3.utils.toWei("0.001"), add: true, relayed: true, }); }); it("should increase token1 debt to a ETH/token1 loan (blockchain tx)", async () => { - await fundWallet({ ethAmount: web3.utils.toWei("0.5", "ether"), token1Amount: 0 }); + await fundWallet({ ethAmount: web3.utils.toWei("0.5"), token1Amount: 0 }); const loanId = await testOpenLoan({ - collateral: ETH_TOKEN, collateralAmount: web3.utils.toWei("0.5", "ether"), debt: token1, debtAmount: web3.utils.toWei("0.01", "ether"), relayed: false, + collateral: ETH_TOKEN, collateralAmount: web3.utils.toWei("0.5"), debt: token1, debtAmount: web3.utils.toWei("0.01"), relayed: false, }); await testChangeDebt({ - loanId, debtToken: token1, amount: web3.utils.toWei("0.01", "ether"), add: true, relayed: false, + loanId, debtToken: token1, amount: web3.utils.toWei("0.01"), add: true, relayed: false, }); }); it("should increase token1 debt to a ETH/token1 loan (relayed tx)", async () => { - await fundWallet({ ethAmount: web3.utils.toWei("0.5", "ether"), token1Amount: 0 }); + await fundWallet({ ethAmount: web3.utils.toWei("0.5"), token1Amount: 0 }); const loanId = await testOpenLoan({ - collateral: ETH_TOKEN, collateralAmount: web3.utils.toWei("0.5", "ether"), debt: token1, debtAmount: web3.utils.toWei("0.01", "ether"), relayed: false, + collateral: ETH_TOKEN, collateralAmount: web3.utils.toWei("0.5"), debt: token1, debtAmount: web3.utils.toWei("0.01"), relayed: false, }); await testChangeDebt({ - loanId, debtToken: token1, amount: web3.utils.toWei("0.01", "ether"), add: true, relayed: true, + loanId, debtToken: token1, amount: web3.utils.toWei("0.01"), add: true, relayed: true, }); }); it("should increase token2 debt to a ETH/token1 loan (blockchain tx)", async () => { - await fundWallet({ ethAmount: web3.utils.toWei("0.5", "ether"), token1Amount: 0 }); + await fundWallet({ ethAmount: web3.utils.toWei("0.5"), token1Amount: 0 }); const loanId = await testOpenLoan({ - collateral: ETH_TOKEN, collateralAmount: web3.utils.toWei("0.5", "ether"), debt: token1, debtAmount: web3.utils.toWei("0.01", "ether"), relayed: false, + collateral: ETH_TOKEN, collateralAmount: web3.utils.toWei("0.5"), debt: token1, debtAmount: web3.utils.toWei("0.01"), relayed: false, }); await testChangeDebt({ - loanId, debtToken: token2, amount: web3.utils.toWei("0.01", "ether"), add: true, relayed: false, + loanId, debtToken: token2, amount: web3.utils.toWei("0.01"), add: true, relayed: false, }); }); it("should increase token2 debt to a ETH/token1 loan (relayed tx)", async () => { - await fundWallet({ ethAmount: web3.utils.toWei("0.5", "ether"), token1Amount: 0 }); + await fundWallet({ ethAmount: web3.utils.toWei("0.5"), token1Amount: 0 }); const loanId = await testOpenLoan({ - collateral: ETH_TOKEN, collateralAmount: web3.utils.toWei("0.5", "ether"), debt: token1, debtAmount: web3.utils.toWei("0.01", "ether"), relayed: false, + collateral: ETH_TOKEN, collateralAmount: web3.utils.toWei("0.5"), debt: token1, debtAmount: web3.utils.toWei("0.01"), relayed: false, }); await testChangeDebt({ - loanId, debtToken: token2, amount: web3.utils.toWei("0.01", "ether"), add: true, relayed: true, + loanId, debtToken: token2, amount: web3.utils.toWei("0.01"), add: true, relayed: true, }); }); it("should repay ETH debt to a token1/ETH loan (blockchain tx)", async () => { - await fundWallet({ ethAmount: 0, token1Amount: web3.utils.toWei("0.5", "ether") }); + await fundWallet({ ethAmount: 0, token1Amount: web3.utils.toWei("0.5") }); const loanId = await testOpenLoan({ - collateral: token1, collateralAmount: web3.utils.toWei("0.5", "ether"), debt: ETH_TOKEN, debtAmount: web3.utils.toWei("0.001", "ether"), relayed: false, + collateral: token1, collateralAmount: web3.utils.toWei("0.5"), debt: ETH_TOKEN, debtAmount: web3.utils.toWei("0.001"), relayed: false, }); await testChangeDebt({ - loanId, debtToken: ETH_TOKEN, amount: web3.utils.toWei("0.0005", "ether"), add: false, relayed: false, + loanId, debtToken: ETH_TOKEN, amount: web3.utils.toWei("0.0005"), add: false, relayed: false, }); }); it("should repay ETH debt to a token1/ETH loan (relay tx)", async () => { - await fundWallet({ ethAmount: 0, token1Amount: web3.utils.toWei("0.5", "ether") }); + await fundWallet({ ethAmount: 0, token1Amount: web3.utils.toWei("0.5") }); const loanId = await testOpenLoan({ - collateral: token1, collateralAmount: web3.utils.toWei("0.5", "ether"), debt: ETH_TOKEN, debtAmount: web3.utils.toWei("0.001", "ether"), relayed: false, + collateral: token1, collateralAmount: web3.utils.toWei("0.5"), debt: ETH_TOKEN, debtAmount: web3.utils.toWei("0.001"), relayed: false, }); await testChangeDebt({ loanId, debtToken: ETH_TOKEN, amount: web3.utils.toWei("0.0005"), add: false, relayed: true, @@ -568,27 +579,27 @@ contract("Loan Module", (accounts) => { it("should repay token1 debt to a ETH/token1 loan (blockchain tx)", async () => { await fundWallet({ ethAmount: web3.utils.toWei("0.5"), token1Amount: 0 }); const loanId = await testOpenLoan({ - collateral: ETH_TOKEN, collateralAmount: web3.utils.toWei("0.5", "ether"), debt: token1, debtAmount: web3.utils.toWei("0.01", "ether"), relayed: false, + collateral: ETH_TOKEN, collateralAmount: web3.utils.toWei("0.5"), debt: token1, debtAmount: web3.utils.toWei("0.01"), relayed: false, }); await testChangeDebt({ - loanId, debtToken: token1, amount: web3.utils.toWei("0.005", "ether"), add: false, relayed: false, + loanId, debtToken: token1, amount: web3.utils.toWei("0.005"), add: false, relayed: false, }); }); it("should repay token1 debt to a ETH/token1 loan (relayed tx)", async () => { - await fundWallet({ ethAmount: web3.utils.toWei("0.5", "ether"), token1Amount: 0 }); + await fundWallet({ ethAmount: web3.utils.toWei("0.5"), token1Amount: 0 }); const loanId = await testOpenLoan({ - collateral: ETH_TOKEN, collateralAmount: web3.utils.toWei("0.5", "ether"), debt: token1, debtAmount: web3.utils.toWei("0.01", "ether"), relayed: false, + collateral: ETH_TOKEN, collateralAmount: web3.utils.toWei("0.5"), debt: token1, debtAmount: web3.utils.toWei("0.01"), relayed: false, }); await testChangeDebt({ - loanId, debtToken: token1, amount: web3.utils.toWei("0.005", "ether"), add: false, relayed: true, + loanId, debtToken: token1, amount: web3.utils.toWei("0.005"), add: false, relayed: true, }); }); it("should repay the full token1 debt to a ETH/token1 loan (blockchain tx)", async () => { - await fundWallet({ ethAmount: web3.utils.toWei("0.5", "ether"), token1Amount: web3.utils.toWei("0.01", "ether") }); + await fundWallet({ ethAmount: web3.utils.toWei("0.5"), token1Amount: web3.utils.toWei("0.01") }); const loanId = await testOpenLoan({ - collateral: ETH_TOKEN, collateralAmount: web3.utils.toWei("0.5", "ether"), debt: token1, debtAmount: web3.utils.toWei("0.01", "ether"), relayed: false, + collateral: ETH_TOKEN, collateralAmount: web3.utils.toWei("0.5"), debt: token1, debtAmount: web3.utils.toWei("0.01"), relayed: false, }); await testChangeDebt({ loanId, debtToken: token1, amount: ethers.constants.MaxUint256, add: false, relayed: false, @@ -608,7 +619,7 @@ contract("Loan Module", (accounts) => { const tx = await loanManager[method](...params, { from: owner }); txReceipt = tx.receipt; } - await utils.hasEvent(txReceipt, "LoanClosed"); + await utils.hasEvent(txReceipt, loanManager, "LoanClosed"); const marketsAfter = await comptroller.getAssetsIn(wallet.address); assert.isTrue(marketsAfter.length === marketsBefore.length - debtMarkets, `should have exited ${debtMarkets} market (relayed: ${relayed})`); diff --git a/test/factory.js b/test/factory.js index 3412f7b36..8bf8ac3f8 100644 --- a/test/factory.js +++ b/test/factory.js @@ -117,7 +117,7 @@ contract("WalletFactory", (accounts) => { it("should create with the correct owner", async () => { // we create the wallet const tx = await factory.createWallet(owner, versionManager.address, guardian, 1); - const eventArgs = utils.parseLogs(tx.receipt, "WalletCreated"); + const eventArgs = utils.parseLogs(tx.receipt, factory, "WalletCreated"); const walletAddr = eventArgs.wallet; // we test that the wallet has the correct owner const wallet = await BaseWallet.at(walletAddr); @@ -128,7 +128,7 @@ contract("WalletFactory", (accounts) => { it("should create with the correct module", async () => { // we create the wallet const tx = await factory.createWallet(owner, versionManager.address, guardian, 1); - const eventArgs = utils.parseLogs(tx.receipt, "WalletCreated"); + const eventArgs = utils.parseLogs(tx.receipt, factory, "WalletCreated"); const walletAddr = eventArgs.wallet; // we test that the wallet has the correct module const wallet = await BaseWallet.at(walletAddr); @@ -139,7 +139,7 @@ contract("WalletFactory", (accounts) => { it("should create with the correct guardian", async () => { // we create the wallet const tx = await factory.createWallet(owner, versionManager.address, guardian, 1); - const eventArgs = utils.parseLogs(tx.receipt, "WalletCreated"); + const eventArgs = utils.parseLogs(tx.receipt, factory, "WalletCreated"); const walletAddr = eventArgs.wallet; // we test that the wallet has the correct guardian const success = await guardianStorage.isGuardian(walletAddr, guardian); @@ -152,7 +152,7 @@ contract("WalletFactory", (accounts) => { await versionManager.setMinVersion(await versionManager.lastVersion()); // we create the wallet const tx = await factory.createWallet(owner, versionManager.address, guardian, badVersion); - const eventArgs = utils.parseLogs(tx.receipt, "WalletCreated"); + const eventArgs = utils.parseLogs(tx.receipt, factory, "WalletCreated"); const walletAddr = eventArgs.wallet; assert.notEqual(walletAddr, ZERO_ADDRESS, "wallet should be created"); }); @@ -196,7 +196,7 @@ contract("WalletFactory", (accounts) => { const tx = await factory.createCounterfactualWallet( owner, versionManager.address, guardian, salt, 1, ); - const eventArgs = utils.parseLogs(tx.receipt, "WalletCreated"); + const eventArgs = utils.parseLogs(tx.receipt, factory, "WalletCreated"); const walletAddr = eventArgs.wallet; // we test that the wallet is at the correct address assert.equal(futureAddr, walletAddr, "should have the correct address"); @@ -210,7 +210,7 @@ contract("WalletFactory", (accounts) => { const tx = await factory.createCounterfactualWallet( owner, versionManager.address, guardian, salt, 1, ); - const eventArgs = utils.parseLogs(tx.receipt, "WalletCreated"); + const eventArgs = utils.parseLogs(tx.receipt, factory, "WalletCreated"); const walletAddr = eventArgs.wallet; // we test that the wallet is at the correct address assert.equal(futureAddr, walletAddr, "should have the correct address"); @@ -228,7 +228,7 @@ contract("WalletFactory", (accounts) => { const tx = await factory.createCounterfactualWallet( owner, versionManager.address, guardian, salt, 1, ); - const eventArgs = utils.parseLogs(tx.receipt, "WalletCreated"); + const eventArgs = utils.parseLogs(tx.receipt, factory, "WalletCreated"); const walletAddr = eventArgs.wallet; // we test that the wallet is at the correct address assert.equal(futureAddr, walletAddr, "should have the correct address"); @@ -252,7 +252,7 @@ contract("WalletFactory", (accounts) => { const tx = await factory.createCounterfactualWallet( owner, versionManager.address, guardian, salt, badVersion ); - const eventArgs = utils.parseLogs(tx.receipt, "WalletCreated"); + const eventArgs = utils.parseLogs(tx.receipt, factory, "WalletCreated"); const walletAddr = eventArgs.wallet; // we test that the wallet is at the correct address assert.equal(futureAddr, walletAddr, "should have the correct address"); @@ -266,7 +266,7 @@ contract("WalletFactory", (accounts) => { const tx = await factory.createCounterfactualWallet( owner, versionManager.address, guardian, salt, 1, ); - const eventArgs = utils.parseLogs(tx.receipt, "WalletCreated"); + const eventArgs = utils.parseLogs(tx.receipt, factory, "WalletCreated"); const walletAddr = eventArgs.wallet; // we test that the wallet is at the correct address assert.equal(futureAddr, walletAddr, "should have the correct address"); @@ -283,7 +283,7 @@ contract("WalletFactory", (accounts) => { const tx = await factory.createCounterfactualWallet( owner, versionManager.address, guardian, salt, 1, ); - const walletAddr = utils.parseLogs(tx.receipt, "WalletCreated"); + const walletAddr = utils.parseLogs(tx.receipt, factory, "WalletCreated"); // we test that the wallet is at the correct address assert.equal(futureAddr, walletAddr, "should have the correct address"); // we create the second wallet @@ -322,9 +322,7 @@ contract("WalletFactory", (accounts) => { const tx = await factory.createCounterfactualWallet( owner, versionManager.address, guardian, salt, 1, ); - const txReceipt = tx.receipt; - await utils.hasEvent(txReceipt, "Received"); - const eventArgs = utils.parseLogs(tx.receipt, "Received"); + const eventArgs = utils.parseLogs(tx.receipt, factory, "Received"); assert.equal(eventArgs.value.toNumber(), amount, "should log the correct amount"); assert.equal(eventArgs.sender, "0x0000000000000000000000000000000000000000", "sender should be address(0)"); }); diff --git a/test/makerV2Manager_loan.js b/test/makerV2Manager_loan.js index d12b7970e..a1f66300f 100644 --- a/test/makerV2Manager_loan.js +++ b/test/makerV2Manager_loan.js @@ -165,12 +165,12 @@ contract("MakerV2Loan", (accounts) => { let txReceipt; if (relayed) { txReceipt = await manager.relay(makerV2, method, params, wallet, [owner]); - const { success } = await parseLogs(txReceipt, "TransactionExecuted"); + const { success } = parseLogs(txReceipt, relayerManager, "TransactionExecuted"); assert.isTrue(success, "Relayed tx should succeed"); } else { txReceipt = await (await makerV2[method](...params, { gasLimit: 2000000, from: owner })).wait(); } - const loanId = (await parseLogs(txReceipt, "LoanOpened"))._loanId; + const loanId = (parseLogs(txReceipt, makerV2, "LoanOpened"))._loanId; assert.isDefined(loanId, "Loan ID should be defined"); const afterCollateral = (collateral.address === ETH_TOKEN) @@ -253,7 +253,7 @@ contract("MakerV2Loan", (accounts) => { const params = [wallet.address, loanId, collateral.address, collateralAmount]; if (relayed) { const txR = await manager.relay(makerV2Manager, method, params, wallet, [owner]); - const txExecutedEvent = parseLogs(txR, "TransactionExecuted"); + const txExecutedEvent = parseLogs(txR, relayerManager, "TransactionExecuted"); assert.isTrue(txExecutedEvent.args.success, "Relayed tx should succeed"); } else { await makerV2Manager[method](...params, { gasLimit: 2000000, from: owner }); @@ -351,7 +351,7 @@ contract("MakerV2Loan", (accounts) => { const params = [wallet.address, loanId, dai.address, daiAmount]; if (relayed) { const txR = await manager.relay(makerV2, method, params, { address: walletAddress }, [owner]); - const txExecutedEvent = parseLogs(txR, "TransactionExecuted"); + const txExecutedEvent = parseLogs(txR, relayerManager, "TransactionExecuted"); assert.isTrue(txExecutedEvent.args.success, "Relayed tx should succeed"); } else { await makerV2[method](...params, { gasLimit: 2000000, from: owner }); @@ -470,7 +470,7 @@ contract("MakerV2Loan", (accounts) => { const params = [wallet.address, loanId]; if (relayed) { const txR = await manager.relay(makerV2, method, params, { address: walletAddress }, [owner]); - const txExecutedEvent = parseLogs(txR, "TransactionExecuted"); + const txExecutedEvent = parseLogs(txR, relayerManager, "TransactionExecuted"); assert.isTrue(txExecutedEvent.args.success, "Relayed tx should succeed"); } else { await makerV2[method](...params, { gasLimit: 3000000, from: owner }); @@ -551,7 +551,7 @@ contract("MakerV2Loan", (accounts) => { // Create the vault with `owner` as owner const { ilk } = await makerRegistry.collaterals(weth.address); const txR = await (await cdpManager.open(ilk, owner), { from: owner }).wait(); - const txNewCdpEvent = parseLogs(txR, "NewCdp"); + const txNewCdpEvent = parseLogs(txR, cdpManager, "NewCdp"); const vaultId = txNewCdpEvent.args.cdp; // Transfer the vault to the wallet await cdpManager.give(vaultId, walletAddress, { from: owner }); @@ -562,13 +562,13 @@ contract("MakerV2Loan", (accounts) => { let txReceipt; if (relayed) { txReceipt = await manager.relay(makerV2, method, params, { address: walletAddress }, [owner]); - const txExecutedEvent = parseLogs(txR, "TransactionExecuted"); + const txExecutedEvent = parseLogs(txR, relayerManager, "TransactionExecuted"); assert.isTrue(txExecutedEvent.args.success, "Relayed tx should succeed"); } else { const tx = await makerV2[method](...params, { gasLimit: 1000000, from: owner }); txReceipt = tx.receipt; } - hasEvent(txReceipt, "LoanAcquired"); + await hasEvent(txReceipt, makerV2, "LoanAcquired"); // The loanId held by the MakerV2Manager will be different from the transferred vault id, in case the latter was merged into an existing vault const featureLoanId = await makerV2.loanIds(walletAddress, ilk); @@ -594,7 +594,7 @@ contract("MakerV2Loan", (accounts) => { // Create the vault with `owner` as owner const { ilk } = await makerRegistry.collaterals(weth.address); const txR = await (await cdpManager.open(ilk, owner, { from: owner })).wait(); - const txNewCdpEvent = parseLogs(txR, "NewCdp"); + const txNewCdpEvent = parseLogs(txR, cdpManager, "NewCdp"); const vaultId = txNewCdpEvent.args.cdp; const loanId = bigNumToBytes32(vaultId); // We are NOT transferring the vault from the owner to the wallet @@ -611,7 +611,7 @@ contract("MakerV2Loan", (accounts) => { // Create the vault with `owner` as owner const { ilk } = await makerRegistry.collaterals(weth.address); const txR = await (await cdpManager.open(ilk, owner, { from: owner })).wait(); - const txNewCdpEvent = parseLogs(txR, "NewCdp"); + const txNewCdpEvent = parseLogs(txR, cdpManager, "NewCdp"); const vaultId = txNewCdpEvent.args.cdp; const loanId = bigNumToBytes32(vaultId); // Transfer the vault to the fake wallet @@ -642,7 +642,7 @@ contract("MakerV2Loan", (accounts) => { // Create the vault with `owner` as owner const { ilk } = await makerRegistry.collaterals(weth.address); const txR = await (await cdpManager.open(ilk, owner, { from: owner })).wait(); - const txNewCdpEvent = parseLogs(txR, "NewCdp"); + const txNewCdpEvent = parseLogs(txR, cdpManager, "NewCdp"); const vaultId = txNewCdpEvent.args.cdp; const loanId = bigNumToBytes32(vaultId); // Transfer the vault to the fake wallet @@ -710,7 +710,7 @@ contract("MakerV2Loan", (accounts) => { const params = [walletAddress, lastVersion]; if (relayed) { const txR = await manager.relay(versionManager, method, params, wallet, [owner]); - const txTransactionExecuted = parseLogs(txR, "NewCdp"); + const txTransactionExecuted = parseLogs(txR, cdpManager, "NewCdp"); assert.isTrue(txTransactionExecuted.args.success, "Relayed tx should succeed"); } else { await versionManager[method](...params, { gasLimit: 2000000, from: owner }); diff --git a/test/relayer.js b/test/relayer.js index 50fdc04e1..1caa7de4c 100644 --- a/test/relayer.js +++ b/test/relayer.js @@ -314,7 +314,7 @@ contract("RelayerManager", (accounts) => { it("should emit the Refund event", async () => { await provisionFunds("100000000000", 0); const txReceipt = await callAndRefund({ refundToken: ETH_TOKEN }); - await hasEvent(txReceipt, "Refund"); + await hasEvent(txReceipt, relayerManager, "Refund"); }); it("should fail the transaction when when there is not enough ETH for the refund", async () => { diff --git a/test/simpleUpgrader.js b/test/simpleUpgrader.js index 38c36a36d..be0f3a340 100644 --- a/test/simpleUpgrader.js +++ b/test/simpleUpgrader.js @@ -177,7 +177,7 @@ contract("SimpleUpgrader", (accounts) => { if (toAdd.length === 0) { if (relayed) { txReceipt = await manager.relay(moduleV1, "addModule", params2, wallet, [owner]); - const { success } = (await utils.parseLogs(txReceipt, "TransactionExecuted")); + const { success } = (utils.parseLogs(txReceipt, relayer, "TransactionExecuted")); assert.isTrue(!success, "Relayed upgrade to 0 module should have failed."); } else { utils.assertRevert(moduleV1.addModule(...params2, { from: owner })); @@ -186,7 +186,7 @@ contract("SimpleUpgrader", (accounts) => { } if (relayed) { txReceipt = await manager.relay(moduleV1, "addModule", params1, wallet, [owner]); - const { success } = (await utils.parseLogs(txReceipt, "TransactionExecuted")); + const { success } = (utils.parseLogs(txReceipt, relayer, "TransactionExecuted")); assert.isTrue(success, "Relayed tx should only have succeeded if an OnlyOwnerModule was used"); } else { const tx = await moduleV1.addModule(...params1, { from: owner }); @@ -194,7 +194,7 @@ contract("SimpleUpgrader", (accounts) => { } // test event ordering - const logs = utils.parseLogs(txReceipt, "AuthorisedModule"); + const logs = utils.parseLogs(txReceipt, wallet, "AuthorisedModule"); const upgraderAuthorisedLogIndex = logs.findIndex((e) => e.module === upgrader1.address && e.value === true); const upgraderUnauthorisedLogIndex = logs.findIndex((e) => e.module === upgrader1.address && e.value === false); assert.isBelow(upgraderAuthorisedLogIndex, upgraderUnauthorisedLogIndex, diff --git a/test/tokenExchanger.js b/test/tokenExchanger.js index 53965f9be..cfb9baf31 100644 --- a/test/tokenExchanger.js +++ b/test/tokenExchanger.js @@ -297,13 +297,13 @@ contract("TokenExchanger", (accounts) => { let txR; if (relayed) { txR = await manager.relay(exchanger, method, params, _wallet, [owner]); - const { success } = (await parseLogs(txR, "TransactionExecuted")); + const { success } = (parseLogs(txR, relayerManager, "TransactionExecuted")); assert.isTrue(success, "Relayed tx should succeed"); } else { txR = await (await exchanger[method](...params, { gasLimit: 2000000, from: owner })).wait(); } - const { destAmount } = await parseLogs(txR, "TokenExchanged"); + const { destAmount } = parseLogs(txR, exchanger, "TokenExchanged"); const afterFrom = await getBalance(fromToken, _wallet); const afterTo = await getBalance(toToken, _wallet); diff --git a/test/transferManager.js b/test/transferManager.js index c5f184a1b..d36ef406f 100644 --- a/test/transferManager.js +++ b/test/transferManager.js @@ -387,7 +387,7 @@ contract("TransferManager", (accounts) => { const tx = await transferManager.transferToken(...params, { from: signer }); txReceipt = tx.receipt; } - await utils.hasEvent(txReceipt, "Transfer"); + await utils.hasEvent(txReceipt, transferManager, "Transfer"); const fundsAfter = (token === ETH_TOKEN ? await to.getBalance() : await token.balanceOf(to.address)); const unspentAfter = await transferManager.getDailyUnspent(wallet.address); assert.equal(fundsAfter.sub(fundsBefore).toNumber(), amount, "should have transfered amount"); @@ -412,7 +412,7 @@ contract("TransferManager", (accounts) => { tx = await transferManager.transferToken(...params, { from: owner }); txReceipt = tx.receipt; } - await utils.hasEvent(txReceipt, "PendingTransferCreated"); + await utils.hasEvent(txReceipt, transferManager, "PendingTransferCreated"); let fundsAfter = (token === ETH_TOKEN ? await utils.getBalance(to.address) : await token.balanceOf(to.address)); assert.equal(fundsAfter.sub(fundsBefore).toNumber(), 0, "should not have transfered amount"); if (delay === 0) { @@ -424,7 +424,7 @@ contract("TransferManager", (accounts) => { tx = await transferManager.executePendingTransfer(wallet.address, tokenAddress, recipient, amount, ZERO_BYTES32, txReceipt.blockNumber); txReceipt = tx.receipt; - await utils.hasEvent(txReceipt, "PendingTransferExecuted"); + await utils.hasEvent(txReceipt, transferManager, "PendingTransferExecuted"); fundsAfter = (token === ETH_TOKEN ? await utils.getBalance(to.address) : await token.balanceOf(to.address)); return assert.equal(fundsAfter.sub(fundsBefore).toNumber(), amount, "should have transfered amount"); } @@ -551,7 +551,7 @@ contract("TransferManager", (accounts) => { await increaseTime(1); const tx = await transferManager.cancelPendingTransfer(wallet.address, id, { from: owner }); const txReceipt = tx.receipt; - await utils.hasEvent(txReceipt, "PendingTransferCanceled"); + await utils.hasEvent(txReceipt, transferManager, "PendingTransferCanceled"); const executeAfter = await transferManager.getPendingTransfer(wallet.address, id); assert.equal(executeAfter, 0, "should have cancelled the pending transfer"); }); @@ -563,7 +563,7 @@ contract("TransferManager", (accounts) => { await increaseTime(1); const tx = await transferManager.cancelPendingTransfer(wallet.address, id, { from: owner }); const txReceipt = tx.receipt; - await utils.hasEvent(txReceipt, "PendingTransferCanceled"); + await utils.hasEvent(txReceipt, transferManager, "PendingTransferCanceled"); const executeAfter = await transferManager.getPendingTransfer(wallet.address, id); assert.equal(executeAfter, 0, "should have cancelled the pending transfer"); }); @@ -593,7 +593,7 @@ contract("TransferManager", (accounts) => { const tx = await transferManager.approveToken(...params, { from: signer }); txReceipt = tx.receipt; } - await utils.hasEvent(txReceipt, "Approved"); + await utils.hasEvent(txReceipt, transferManager, "Approved"); const unspentAfter = await transferManager.getDailyUnspent(wallet.address); const amountInEth = await getEtherValue(amount, erc20.address); @@ -664,7 +664,7 @@ contract("TransferManager", (accounts) => { const tx = await transferManager.callContract(...params, { from: owner }); txReceipt = tx.receipt; } - await utils.hasEvent(txReceipt, "CalledContract"); + await utils.hasEvent(txReceipt, transferManager, "CalledContract"); const unspentAfter = await transferManager.getDailyUnspent(wallet.address); if (value < ETH_LIMIT) { assert.equal(unspentBefore[0].sub(unspentAfter[0]).toNumber(), value, "should have updated the daily limit"); @@ -744,7 +744,7 @@ contract("TransferManager", (accounts) => { const tx = await transferManager[method](...params, { from: signer }); txReceipt = tx.receipt; } - await utils.hasEvent(txReceipt, "ApprovedAndCalledContract"); + await utils.hasEvent(txReceipt, transferManager, "ApprovedAndCalledContract"); const unspentAfter = await transferManager.getDailyUnspent(wallet.address); const amountInEth = wrapEth ? amount : await getEtherValue(amount, erc20.address); diff --git a/utils/utilities.js b/utils/utilities.js index 0d432bb89..09d31b5cf 100644 --- a/utils/utilities.js +++ b/utils/utilities.js @@ -1,10 +1,8 @@ const readline = require("readline"); const ethers = require("ethers"); const ethUtil = require("ethereumjs-util"); +const BN = require("bn.js"); const fs = require("fs"); -const chai = require("chai"); - -const { expect } = chai; const ETH_TOKEN = "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"; @@ -96,13 +94,50 @@ module.exports = { return { success: args.success, error }; }, - parseLogs(txReceipt, eventName) { - return txReceipt.logs.filter((e) => e.event === eventName)[0].args; + async hasEvent(txReceipt, emitter, eventName) { + const event = await this.getEvent(txReceipt, emitter, eventName); + return expect(event, "Event does not exist in recept").to.exist; }, - async hasEvent(txReceipt, eventName) { - const event = txReceipt.logs.filter((e) => e.event === eventName); - return expect(event, "Event does not exist in recept").to.exist; + async getEvent(txReceipt, emitter, eventName) { + const receipt = await web3.eth.getTransactionReceipt(txReceipt.transactionHash); + const logs = await this.decodeLogs(receipt.logs, emitter, eventName); + const event = logs.find(e => e.event === eventName); + return event; + }, + + // Copied from https://github.com/OpenZeppelin/openzeppelin-test-helpers + // This decodes longs for a single event type, and returns a decoded object in + // the same form truffle-contract uses on its receipts + decodeLogs(logs, emitter, eventName) { + let abi; + let address; + + abi = emitter.abi; + try { + address = emitter.address; + } catch (e) { + address = null; + } + + let eventABI = abi.filter(x => x.type === 'event' && x.name === eventName); + if (eventABI.length === 0) { + throw new Error(`No ABI entry for event '${eventName}'`); + } else if (eventABI.length > 1) { + throw new Error(`Multiple ABI entries for event '${eventName}', only uniquely named events are supported`); + } + + eventABI = eventABI[0]; + + // The first topic will equal the hash of the event signature + const eventSignature = `${eventName}(${eventABI.inputs.map(input => input.type).join(',')})`; + const eventTopic = web3.utils.sha3(eventSignature); + + // Only decode events of type 'EventName' + return logs + .filter(log => log.topics.length > 0 && log.topics[0] === eventTopic && (!address || log.address === address)) + .map(log => web3.eth.abi.decodeLog(eventABI.inputs, log.data, log.topics.slice(1))) + .map(decoded => ({ event: eventName, args: decoded })); }, versionFingerprint(modules) { @@ -144,7 +179,7 @@ module.exports = { async getBalance(account) { const balance = await web3.eth.getBalance(account); - return ethers.BigNumber.from(balance); + return new BN(balance); }, async getTimestamp(blockNumber) { From 2a94c8e87229bdb6cd4bccd01dfead500f26d30d Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Wed, 21 Oct 2020 16:12:12 +0300 Subject: [PATCH 044/113] Fix compound manager loan tests --- test/compoundManager_loan.js | 16 ++++++++-------- utils/utilities.js | 12 +++++++----- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/test/compoundManager_loan.js b/test/compoundManager_loan.js index cc09ebefb..ed3670284 100644 --- a/test/compoundManager_loan.js +++ b/test/compoundManager_loan.js @@ -243,12 +243,12 @@ contract("Loan Module", (accounts) => { if (add) { await utils.hasEvent(txReceipt, loanManager, "CollateralAdded"); // Wallet collateral should have decreased by `amount` - expect(collateralBalanceAfter).to.eq.BN(collateralBalanceBefore.sub(amount)); + expect(collateralBalanceBefore.sub(new BN(amount))).to.eq.BN(collateralBalanceAfter); } else { await utils.hasEvent(txReceipt, loanManager, "CollateralRemoved"); // Wallet collateral should have increased by `amount` - expect(collateralBalanceAfter).to.eq.BN(collateralBalanceBefore.add(amount)); + expect(collateralBalanceBefore.add(new BN(amount))).to.eq.BN(collateralBalanceAfter); } } @@ -276,11 +276,11 @@ contract("Loan Module", (accounts) => { if (add) { await utils.hasEvent(txReceipt, loanManager, "DebtAdded"); // Wallet debt should have increase by `amount` - expect(debtBalanceAfter).to.eq.BN(debtBalanceBefore.add(amount)); + expect(debtBalanceAfter).to.eq.BN(debtBalanceBefore.add(new BN(amount))); } else { await utils.hasEvent(txReceipt, loanManager, "DebtRemoved"); assert.isTrue( - debtBalanceAfter.eq(debtBalanceBefore.sub(amount)) || amount.eq(ethers.constants.MaxUint256), + debtBalanceAfter.eq(debtBalanceBefore.sub(new BN(amount))) || new BN(amount).eq(new BN(ethers.constants.MaxUint256.toString())), `wallet debt should have decreased by ${amount} (relayed: ${relayed})`, ); } @@ -288,8 +288,8 @@ contract("Loan Module", (accounts) => { describe("Open Loan", () => { it("should borrow token with ETH as collateral (blockchain tx)", async () => { - const collateralAmount = web3.utils.toWei("0.1"); - const debtAmount = web3.utils.toWei("0.05"); + const collateralAmount = await web3.utils.toWei("0.1"); + const debtAmount = await web3.utils.toWei("0.05"); await fundWallet({ ethAmount: collateralAmount, token1Amount: 0 }); await testOpenLoan({ collateral: ETH_TOKEN, collateralAmount, debt: token1, debtAmount, relayed: false, @@ -356,7 +356,7 @@ contract("Loan Module", (accounts) => { // Successes it("should add ETH collateral to a loan (blockchain tx)", async () => { - await fundWallet({ ethAmount: web3.utils.toWei("0.2"), token1Amount: 0 }); + await fundWallet({ ethAmount: await web3.utils.toWei("0.2"), token1Amount: 0 }); const loanId = await testOpenLoan({ collateral: ETH_TOKEN, collateralAmount: web3.utils.toWei("0.1"), debt: token1, debtAmount: web3.utils.toWei("0.05"), relayed: false, }); @@ -602,7 +602,7 @@ contract("Loan Module", (accounts) => { collateral: ETH_TOKEN, collateralAmount: web3.utils.toWei("0.5"), debt: token1, debtAmount: web3.utils.toWei("0.01"), relayed: false, }); await testChangeDebt({ - loanId, debtToken: token1, amount: ethers.constants.MaxUint256, add: false, relayed: false, + loanId, debtToken: token1, amount: ethers.constants.MaxUint256.toString(), add: false, relayed: false, }); }); }); diff --git a/utils/utilities.js b/utils/utilities.js index 09d31b5cf..9d1532407 100644 --- a/utils/utilities.js +++ b/utils/utilities.js @@ -223,12 +223,14 @@ module.exports = { await promise; assert.fail(`Transaction succeeded, but expected error ${revertMessage}`); } catch (err) { - if (!revertMessage) { - assert.notEqual(err.hijackedStack.indexOf("VM Exception while processing transaction: revert"), -1); - } else { ({ reason } = err); - assert.equal(reason, revertMessage); - } + if (reason) { + assert.equal(reason, revertMessage); + } else if (!revertMessage) { + assert.notEqual(err.hijackedStack.indexOf("VM Exception while processing transaction: revert"), -1); + } else { + assert.notEqual(err.hijackedStack.indexOf(revertMessage), -1); + } } }, From 482a29489bdb113eb72a88f32650c97ab92a0f1c Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Thu, 22 Oct 2020 11:52:52 +0300 Subject: [PATCH 045/113] Fix issues in ens and factory tests Also replaced some remaining parseLog instances with getEvent function from utils --- test/ens.js | 2 +- test/factory.js | 75 +++++++++++++------------------------ test/makerV2Manager_loan.js | 27 ++++++------- test/simpleUpgrader.js | 14 +++---- test/tokenExchanger.js | 9 +++-- 5 files changed, 53 insertions(+), 74 deletions(-) diff --git a/test/ens.js b/test/ens.js index 2660d3772..83ae239d7 100644 --- a/test/ens.js +++ b/test/ens.js @@ -100,7 +100,7 @@ contract("ENS contracts", (accounts) => { it("should fail to register an ENS name when the caller is not a manager", async () => { const label = "wallet"; - await utilities.assertRevert(ensManager.register(label, owner, { from: anonmanager }), "registering should throw"); + await utilities.assertRevert(ensManager.register(label, owner, { from: anonmanager }), "M: Must be manager"); }); it("should be able to change the root node owner", async () => { diff --git a/test/factory.js b/test/factory.js index 8bf8ac3f8..f703d88c1 100644 --- a/test/factory.js +++ b/test/factory.js @@ -90,35 +90,14 @@ contract("WalletFactory", (accounts) => { const randomAddress = utils.getRandomAddress(); await utils.assertRevert(factory.changeModuleRegistry(randomAddress, { from: other }), "Must be owner"); }); - - it("should allow owner to change the ens manager", async () => { - const randomAddress = utils.getRandomAddress(); - await factory.changeENSManager(randomAddress); - const updatedEnsManager = await factory.ensManager(); - assert.equal(updatedEnsManager, randomAddress); - }); - - it("should not allow owner to change the ens manager to a zero address", async () => { - await utils.assertRevert(factory.changeENSManager(ethers.constants.AddressZero), "WF: address cannot be null"); - }); - - it("should not allow non-owner to change the ens manager", async () => { - const randomAddress = utils.getRandomAddress(); - await utils.assertRevert(factory.changeENSManager(randomAddress, { from: owner }), "Must be owner"); - }); - - it("should return the correct ENSManager", async () => { - const ensManagerOnFactory = await factory.ensManager(); - assert.equal(ensManagerOnFactory, ensManager.address, "should have the correct ENSManager addrress"); - }); }); describe("Create wallets with CREATE", () => { it("should create with the correct owner", async () => { // we create the wallet const tx = await factory.createWallet(owner, versionManager.address, guardian, 1); - const eventArgs = utils.parseLogs(tx.receipt, factory, "WalletCreated"); - const walletAddr = eventArgs.wallet; + const event = await utils.getEvent(tx.receipt, factory, "WalletCreated"); + const walletAddr = event.args.wallet; // we test that the wallet has the correct owner const wallet = await BaseWallet.at(walletAddr); const walletOwner = await wallet.owner(); @@ -128,8 +107,8 @@ contract("WalletFactory", (accounts) => { it("should create with the correct module", async () => { // we create the wallet const tx = await factory.createWallet(owner, versionManager.address, guardian, 1); - const eventArgs = utils.parseLogs(tx.receipt, factory, "WalletCreated"); - const walletAddr = eventArgs.wallet; + const event = await utils.getEvent(tx.receipt, factory, "WalletCreated"); + const walletAddr = event.args.wallet; // we test that the wallet has the correct module const wallet = await BaseWallet.at(walletAddr); const isAuthorised = await wallet.authorised(versionManager.address); @@ -139,8 +118,8 @@ contract("WalletFactory", (accounts) => { it("should create with the correct guardian", async () => { // we create the wallet const tx = await factory.createWallet(owner, versionManager.address, guardian, 1); - const eventArgs = utils.parseLogs(tx.receipt, factory, "WalletCreated"); - const walletAddr = eventArgs.wallet; + const event = await utils.getEvent(tx.receipt, factory, "WalletCreated"); + const walletAddr = event.args.wallet; // we test that the wallet has the correct guardian const success = await guardianStorage.isGuardian(walletAddr, guardian); assert.equal(success, true, "should have the correct guardian"); @@ -152,8 +131,8 @@ contract("WalletFactory", (accounts) => { await versionManager.setMinVersion(await versionManager.lastVersion()); // we create the wallet const tx = await factory.createWallet(owner, versionManager.address, guardian, badVersion); - const eventArgs = utils.parseLogs(tx.receipt, factory, "WalletCreated"); - const walletAddr = eventArgs.wallet; + const event = await utils.getEvent(tx.receipt, factory, "WalletCreated"); + const walletAddr = event.args.wallet; assert.notEqual(walletAddr, ZERO_ADDRESS, "wallet should be created"); }); @@ -196,8 +175,8 @@ contract("WalletFactory", (accounts) => { const tx = await factory.createCounterfactualWallet( owner, versionManager.address, guardian, salt, 1, ); - const eventArgs = utils.parseLogs(tx.receipt, factory, "WalletCreated"); - const walletAddr = eventArgs.wallet; + const event = await utils.getEvent(tx.receipt, factory, "WalletCreated"); + const walletAddr = event.args.wallet; // we test that the wallet is at the correct address assert.equal(futureAddr, walletAddr, "should have the correct address"); }); @@ -210,8 +189,8 @@ contract("WalletFactory", (accounts) => { const tx = await factory.createCounterfactualWallet( owner, versionManager.address, guardian, salt, 1, ); - const eventArgs = utils.parseLogs(tx.receipt, factory, "WalletCreated"); - const walletAddr = eventArgs.wallet; + const event = await utils.getEvent(tx.receipt, factory, "WalletCreated"); + const walletAddr = event.args.wallet; // we test that the wallet is at the correct address assert.equal(futureAddr, walletAddr, "should have the correct address"); // we test that the wallet has the correct owner @@ -228,8 +207,8 @@ contract("WalletFactory", (accounts) => { const tx = await factory.createCounterfactualWallet( owner, versionManager.address, guardian, salt, 1, ); - const eventArgs = utils.parseLogs(tx.receipt, factory, "WalletCreated"); - const walletAddr = eventArgs.wallet; + const event = await utils.getEvent(tx.receipt, factory, "WalletCreated"); + const walletAddr = event.args.wallet; // we test that the wallet is at the correct address assert.equal(futureAddr, walletAddr, "should have the correct address"); // we test that the wallet has the correct modules @@ -252,8 +231,8 @@ contract("WalletFactory", (accounts) => { const tx = await factory.createCounterfactualWallet( owner, versionManager.address, guardian, salt, badVersion ); - const eventArgs = utils.parseLogs(tx.receipt, factory, "WalletCreated"); - const walletAddr = eventArgs.wallet; + const event = await utils.getEvent(tx.receipt, factory, "WalletCreated"); + const walletAddr = event.args.wallet; // we test that the wallet is at the correct address assert.equal(futureAddr, walletAddr, "should have the correct address"); }); @@ -266,8 +245,8 @@ contract("WalletFactory", (accounts) => { const tx = await factory.createCounterfactualWallet( owner, versionManager.address, guardian, salt, 1, ); - const eventArgs = utils.parseLogs(tx.receipt, factory, "WalletCreated"); - const walletAddr = eventArgs.wallet; + const event = await utils.getEvent(tx.receipt, factory, "WalletCreated"); + const walletAddr = event.args.wallet; // we test that the wallet is at the correct address assert.equal(futureAddr, walletAddr, "should have the correct address"); // we test that the wallet has the correct guardian @@ -283,14 +262,11 @@ contract("WalletFactory", (accounts) => { const tx = await factory.createCounterfactualWallet( owner, versionManager.address, guardian, salt, 1, ); - const walletAddr = utils.parseLogs(tx.receipt, factory, "WalletCreated"); + const event = await utils.getEvent(tx.receipt, factory, "WalletCreated"); // we test that the wallet is at the correct address - assert.equal(futureAddr, walletAddr, "should have the correct address"); + assert.equal(futureAddr, event.args.wallet, "should have the correct address"); // we create the second wallet - await assert.revert( - factory.createCounterfactualWallet(owner, versionManager.address, guardian, salt, 1), - "should fail when address is in use", - ); + await utils.assertRevert(factory.createCounterfactualWallet(owner, versionManager.address, guardian, salt, 1)); }); it("should fail to create counterfactually when there are no modules (with guardian)", async () => { @@ -299,7 +275,7 @@ contract("WalletFactory", (accounts) => { factory.createCounterfactualWallet( owner, ethers.constants.AddressZero, guardian, salt, 1 ), - "invalid _versionManager", + "WF: invalid _versionManager", ); }); @@ -322,9 +298,10 @@ contract("WalletFactory", (accounts) => { const tx = await factory.createCounterfactualWallet( owner, versionManager.address, guardian, salt, 1, ); - const eventArgs = utils.parseLogs(tx.receipt, factory, "Received"); - assert.equal(eventArgs.value.toNumber(), amount, "should log the correct amount"); - assert.equal(eventArgs.sender, "0x0000000000000000000000000000000000000000", "sender should be address(0)"); + const wallet = await BaseWallet.at(futureAddr); + const event = await utils.getEvent(tx.receipt, wallet, "Received"); + assert.equal(event.args.value, amount, "should log the correct amount"); + assert.equal(event.args.sender, "0x0000000000000000000000000000000000000000", "sender should be address(0)"); }); it("should fail to get an address when the guardian is empty", async () => { diff --git a/test/makerV2Manager_loan.js b/test/makerV2Manager_loan.js index a1f66300f..d47ebf0b8 100644 --- a/test/makerV2Manager_loan.js +++ b/test/makerV2Manager_loan.js @@ -2,7 +2,7 @@ const ethers = require("ethers"); const { - bigNumToBytes32, ETH_TOKEN, parseLogs, hasEvent, increaseTime, getBalance, assertRevert + bigNumToBytes32, ETH_TOKEN, getEvent, hasEvent, increaseTime, getBalance, assertRevert } = require("../utils/utilities.js"); const { deployMaker, deployUniswap, RAY, ETH_PER_DAI, ETH_PER_MKR, @@ -165,12 +165,13 @@ contract("MakerV2Loan", (accounts) => { let txReceipt; if (relayed) { txReceipt = await manager.relay(makerV2, method, params, wallet, [owner]); - const { success } = parseLogs(txReceipt, relayerManager, "TransactionExecuted"); - assert.isTrue(success, "Relayed tx should succeed"); + const eventTransactionExecuted = await getEvent(txReceipt, relayerManager, "TransactionExecuted"); + assert.isTrue(eventTransactionExecuted.args.success, "Relayed tx should succeed"); } else { txReceipt = await (await makerV2[method](...params, { gasLimit: 2000000, from: owner })).wait(); } - const loanId = (parseLogs(txReceipt, makerV2, "LoanOpened"))._loanId; + const eventLoanOpened = await getEvent(txReceipt, makerV2, "LoanOpened"); + const loanId = eventLoanOpened.args._loanId; assert.isDefined(loanId, "Loan ID should be defined"); const afterCollateral = (collateral.address === ETH_TOKEN) @@ -253,7 +254,7 @@ contract("MakerV2Loan", (accounts) => { const params = [wallet.address, loanId, collateral.address, collateralAmount]; if (relayed) { const txR = await manager.relay(makerV2Manager, method, params, wallet, [owner]); - const txExecutedEvent = parseLogs(txR, relayerManager, "TransactionExecuted"); + const txExecutedEvent = await getEvent(txR, relayerManager, "TransactionExecuted"); assert.isTrue(txExecutedEvent.args.success, "Relayed tx should succeed"); } else { await makerV2Manager[method](...params, { gasLimit: 2000000, from: owner }); @@ -351,7 +352,7 @@ contract("MakerV2Loan", (accounts) => { const params = [wallet.address, loanId, dai.address, daiAmount]; if (relayed) { const txR = await manager.relay(makerV2, method, params, { address: walletAddress }, [owner]); - const txExecutedEvent = parseLogs(txR, relayerManager, "TransactionExecuted"); + const txExecutedEvent = await getEvent(txR, relayerManager, "TransactionExecuted"); assert.isTrue(txExecutedEvent.args.success, "Relayed tx should succeed"); } else { await makerV2[method](...params, { gasLimit: 2000000, from: owner }); @@ -470,7 +471,7 @@ contract("MakerV2Loan", (accounts) => { const params = [wallet.address, loanId]; if (relayed) { const txR = await manager.relay(makerV2, method, params, { address: walletAddress }, [owner]); - const txExecutedEvent = parseLogs(txR, relayerManager, "TransactionExecuted"); + const txExecutedEvent = await getEvent(txR, relayerManager, "TransactionExecuted"); assert.isTrue(txExecutedEvent.args.success, "Relayed tx should succeed"); } else { await makerV2[method](...params, { gasLimit: 3000000, from: owner }); @@ -551,7 +552,7 @@ contract("MakerV2Loan", (accounts) => { // Create the vault with `owner` as owner const { ilk } = await makerRegistry.collaterals(weth.address); const txR = await (await cdpManager.open(ilk, owner), { from: owner }).wait(); - const txNewCdpEvent = parseLogs(txR, cdpManager, "NewCdp"); + const txNewCdpEvent = await getEvent(txR, cdpManager, "NewCdp"); const vaultId = txNewCdpEvent.args.cdp; // Transfer the vault to the wallet await cdpManager.give(vaultId, walletAddress, { from: owner }); @@ -562,7 +563,7 @@ contract("MakerV2Loan", (accounts) => { let txReceipt; if (relayed) { txReceipt = await manager.relay(makerV2, method, params, { address: walletAddress }, [owner]); - const txExecutedEvent = parseLogs(txR, relayerManager, "TransactionExecuted"); + const txExecutedEvent = await getEvent(txR, relayerManager, "TransactionExecuted"); assert.isTrue(txExecutedEvent.args.success, "Relayed tx should succeed"); } else { const tx = await makerV2[method](...params, { gasLimit: 1000000, from: owner }); @@ -594,7 +595,7 @@ contract("MakerV2Loan", (accounts) => { // Create the vault with `owner` as owner const { ilk } = await makerRegistry.collaterals(weth.address); const txR = await (await cdpManager.open(ilk, owner, { from: owner })).wait(); - const txNewCdpEvent = parseLogs(txR, cdpManager, "NewCdp"); + const txNewCdpEvent = await getEvent(txR, cdpManager, "NewCdp"); const vaultId = txNewCdpEvent.args.cdp; const loanId = bigNumToBytes32(vaultId); // We are NOT transferring the vault from the owner to the wallet @@ -611,7 +612,7 @@ contract("MakerV2Loan", (accounts) => { // Create the vault with `owner` as owner const { ilk } = await makerRegistry.collaterals(weth.address); const txR = await (await cdpManager.open(ilk, owner, { from: owner })).wait(); - const txNewCdpEvent = parseLogs(txR, cdpManager, "NewCdp"); + const txNewCdpEvent = await getEvent(txR, cdpManager, "NewCdp"); const vaultId = txNewCdpEvent.args.cdp; const loanId = bigNumToBytes32(vaultId); // Transfer the vault to the fake wallet @@ -642,7 +643,7 @@ contract("MakerV2Loan", (accounts) => { // Create the vault with `owner` as owner const { ilk } = await makerRegistry.collaterals(weth.address); const txR = await (await cdpManager.open(ilk, owner, { from: owner })).wait(); - const txNewCdpEvent = parseLogs(txR, cdpManager, "NewCdp"); + const txNewCdpEvent = await getEvent(txR, cdpManager, "NewCdp"); const vaultId = txNewCdpEvent.args.cdp; const loanId = bigNumToBytes32(vaultId); // Transfer the vault to the fake wallet @@ -710,7 +711,7 @@ contract("MakerV2Loan", (accounts) => { const params = [walletAddress, lastVersion]; if (relayed) { const txR = await manager.relay(versionManager, method, params, wallet, [owner]); - const txTransactionExecuted = parseLogs(txR, cdpManager, "NewCdp"); + const txTransactionExecuted = await getEvent(txR, cdpManager, "NewCdp"); assert.isTrue(txTransactionExecuted.args.success, "Relayed tx should succeed"); } else { await versionManager[method](...params, { gasLimit: 2000000, from: owner }); diff --git a/test/simpleUpgrader.js b/test/simpleUpgrader.js index be0f3a340..bca3e405a 100644 --- a/test/simpleUpgrader.js +++ b/test/simpleUpgrader.js @@ -177,8 +177,8 @@ contract("SimpleUpgrader", (accounts) => { if (toAdd.length === 0) { if (relayed) { txReceipt = await manager.relay(moduleV1, "addModule", params2, wallet, [owner]); - const { success } = (utils.parseLogs(txReceipt, relayer, "TransactionExecuted")); - assert.isTrue(!success, "Relayed upgrade to 0 module should have failed."); + const event = await utils.getEvent(txReceipt, relayer, "TransactionExecuted"); + assert.isTrue(!event.args.success, "Relayed upgrade to 0 module should have failed."); } else { utils.assertRevert(moduleV1.addModule(...params2, { from: owner })); } @@ -186,17 +186,17 @@ contract("SimpleUpgrader", (accounts) => { } if (relayed) { txReceipt = await manager.relay(moduleV1, "addModule", params1, wallet, [owner]); - const { success } = (utils.parseLogs(txReceipt, relayer, "TransactionExecuted")); - assert.isTrue(success, "Relayed tx should only have succeeded if an OnlyOwnerModule was used"); + const event = await utils.getEvent(txReceipt, relayer, "TransactionExecuted"); + assert.isTrue(event.args.success, "Relayed tx should only have succeeded if an OnlyOwnerModule was used"); } else { const tx = await moduleV1.addModule(...params1, { from: owner }); txReceipt = tx.receipt; } // test event ordering - const logs = utils.parseLogs(txReceipt, wallet, "AuthorisedModule"); - const upgraderAuthorisedLogIndex = logs.findIndex((e) => e.module === upgrader1.address && e.value === true); - const upgraderUnauthorisedLogIndex = logs.findIndex((e) => e.module === upgrader1.address && e.value === false); + const event = await utils.getEvent(txReceipt, wallet, "AuthorisedModule"); + const upgraderAuthorisedLogIndex = event.args.findIndex((a) => a.module === upgrader1.address && a.value === true); + const upgraderUnauthorisedLogIndex = logs.findIndex((a) => a.module === upgrader1.address && a.value === false); assert.isBelow(upgraderAuthorisedLogIndex, upgraderUnauthorisedLogIndex, "AuthorisedModule(upgrader, false) should come after AuthorisedModule(upgrader, true)"); diff --git a/test/tokenExchanger.js b/test/tokenExchanger.js index cfb9baf31..aa672989d 100644 --- a/test/tokenExchanger.js +++ b/test/tokenExchanger.js @@ -41,7 +41,7 @@ const VersionManager = artifacts.require("VersionManager"); // Utils const { makePathes } = require("../utils/paraswap/sell-helper"); const { makeRoutes } = require("../utils/paraswap/buy-helper"); -const { ETH_TOKEN, parseLogs, getTimestamp, assertRevert } = require("../utils/utilities.js"); +const { ETH_TOKEN, getEvent, getTimestamp, assertRevert } = require("../utils/utilities.js"); const RelayManager = require("../utils/relay-manager"); // Constants @@ -297,13 +297,14 @@ contract("TokenExchanger", (accounts) => { let txR; if (relayed) { txR = await manager.relay(exchanger, method, params, _wallet, [owner]); - const { success } = (parseLogs(txR, relayerManager, "TransactionExecuted")); - assert.isTrue(success, "Relayed tx should succeed"); + const event = await getEvent(txR, relayerManager, "TransactionExecuted"); + assert.isTrue(event.args.success, "Relayed tx should succeed"); } else { txR = await (await exchanger[method](...params, { gasLimit: 2000000, from: owner })).wait(); } - const { destAmount } = parseLogs(txR, exchanger, "TokenExchanged"); + const event = await utils.getEvent(txR, exchanger, "TokenExchanged"); + const destAmount = event.args.destAmount; const afterFrom = await getBalance(fromToken, _wallet); const afterTo = await getBalance(toToken, _wallet); From 0a4139908afb998d39109ab29bb2f20940fed611 Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Thu, 22 Oct 2020 13:09:44 +0300 Subject: [PATCH 046/113] Fix guardianManager tests --- test/guardianManager.js | 52 +++++++++++++++++++---------------------- test/transferManager.js | 2 +- truffle-config.js | 2 +- 3 files changed, 26 insertions(+), 30 deletions(-) diff --git a/test/guardianManager.js b/test/guardianManager.js index 891dedf33..c2b68cbbc 100644 --- a/test/guardianManager.js +++ b/test/guardianManager.js @@ -39,22 +39,22 @@ contract("GuardianManager", (accounts) => { }); beforeEach(async () => { - const registry = await deployer.deploy(Registry); - lockStorage = await deployer.deploy(LockStorage); - guardianStorage = await deployer.deploy(GuardianStorage); - versionManager = await deployer.deploy(VersionManager, {}, + const registry = await Registry.new(); + lockStorage = await LockStorage.new(); + guardianStorage = await GuardianStorage.new(); + versionManager = await VersionManager.new( registry.address, lockStorage.address, guardianStorage.address, ethers.constants.AddressZero, ethers.constants.AddressZero); - relayerManager = await deployer.deploy(RelayerManager, {}, + relayerManager = await RelayerManager.new( lockStorage.address, guardianStorage.address, ethers.constants.AddressZero, ethers.constants.AddressZero, versionManager.address); - guardianManager = await deployer.deploy(GuardianManager, {}, + guardianManager = await GuardianManager.new( lockStorage.address, guardianStorage.address, versionManager.address, @@ -63,8 +63,8 @@ contract("GuardianManager", (accounts) => { await versionManager.addVersion([guardianManager.address, relayerManager.address], []); manager.setRelayerManager(relayerManager); - const proxy = await deployer.deploy(Proxy, {}, walletImplementation.address); - wallet = deployer.wrapDeployedContract(BaseWallet, proxy.address); + const proxy = await Proxy.new(walletImplementation.address); + wallet = await BaseWallet.at(proxy.address); await wallet.init(owner, [versionManager.address]); await versionManager.upgradeWallet(wallet.address, await versionManager.lastVersion(), { from: owner }); }); @@ -143,7 +143,7 @@ contract("GuardianManager", (accounts) => { it("should only let the owner add an EOA guardian", async () => { await utilities.assertRevert(guardianManager.addGuardian(wallet.address, guardian1, { from: nonowner }), - "BM: must be owner or module"); + "BF: must be owner or feature"); }); it("should not allow adding wallet owner as guardian", async () => { @@ -213,14 +213,14 @@ contract("GuardianManager", (accounts) => { let dumbContract; beforeEach(async () => { - const proxy1 = await deployer.deploy(Proxy, {}, walletImplementation.address); - guardianWallet1 = deployer.wrapDeployedContract(BaseWallet, proxy1.address); + const proxy1 = await Proxy.new(walletImplementation.address); + guardianWallet1 = await BaseWallet.at(proxy1.address); await guardianWallet1.init(guardian1, [versionManager.address]); - const proxy2 = await deployer.deploy(Proxy, {}, walletImplementation.address); - guardianWallet2 = deployer.wrapDeployedContract(BaseWallet, proxy2.address); + const proxy2 = await Proxy.new(walletImplementation.address); + guardianWallet2 = await BaseWallet.at(proxy2.address); await guardianWallet2.init(guardian2, [versionManager.address]); - dumbContract = await deployer.deploy(DumbContract); + dumbContract = await DumbContract.new(); }); it("should let the owner add Smart Contract Guardians (blockchain transaction)", async () => { @@ -234,7 +234,7 @@ contract("GuardianManager", (accounts) => { await guardianManager.addGuardian(wallet.address, guardianWallet2.address, { from: owner }); count = (await guardianStorage.guardianCount(wallet.address)).toNumber(); - active = await guardianManager.isGuardian(wallet.address, guardian2); + active = await guardianManager.isGuardianOrGuardianSigner(wallet.address, guardian2); assert.isFalse(active, "second guardian owner should not yet be active"); active = await guardianManager.isGuardian(wallet.address, guardianWallet2.address); assert.isFalse(active, "second guardian should not yet be active"); @@ -243,11 +243,11 @@ contract("GuardianManager", (accounts) => { await utilities.increaseTime(30); await guardianManager.confirmGuardianAddition(wallet.address, guardianWallet2.address); count = (await guardianStorage.guardianCount(wallet.address)).toNumber(); - active = await guardianManager.isGuardian(wallet.address, guardian2); + assert.equal(count, 2, "2 guardians should be active after security period"); + active = await guardianManager.isGuardianOrGuardianSigner(wallet.address, guardian2); assert.isTrue(active, "second guardian owner should be active"); active = await guardianManager.isGuardian(wallet.address, guardianWallet2.address); assert.isTrue(active, "second guardian should be active"); - assert.equal(count, 2, "2 guardians should be active after security period"); }); it("should let the owner add a Smart Contract guardian (relayed transaction)", async () => { @@ -265,15 +265,11 @@ contract("GuardianManager", (accounts) => { "GM: guardian must be EOA or implement owner()"); }); - describe("Non-Compliant Guardians", () => { - let nonCompliantGuardian; - beforeEach(async () => { - await guardianManager.addGuardian(wallet.address, guardian1, { from: owner }); - nonCompliantGuardian = await NonCompliantGuardian.new(); - }); - it("it should fail to add a non-compliant guardian", async () => { - await utilities.assertRevert(guardianManager.addGuardian(wallet.address, nonCompliantGuardian.address, { from: owner })); - }); + it("it should fail to add a non-compliant guardian", async () => { + await guardianManager.addGuardian(wallet.address, guardian1, { from: owner }); + const nonCompliantGuardian = await NonCompliantGuardian.new(); + await utilities.assertRevert(guardianManager.addGuardian(wallet.address, nonCompliantGuardian.address, { from: owner }), + "GM: guardian must be EOA or implement owner()"); }); }); }); @@ -438,12 +434,12 @@ contract("GuardianManager", (accounts) => { describe("Guardian Storage", () => { it("should not allow non modules to addGuardian", async () => { await utilities.assertRevert(guardianStorage.addGuardian(wallet.address, guardian4), - "must be an authorized module to call this method"); + "TS: must be an authorized module to call this method"); }); it("should not allow non modules to revokeGuardian", async () => { await utilities.assertRevert(guardianStorage.revokeGuardian(wallet.address, guardian1), - "must be an authorized module to call this method"); + "TS: must be an authorized module to call this method"); }); }); }); diff --git a/test/transferManager.js b/test/transferManager.js index d36ef406f..3b538d27d 100644 --- a/test/transferManager.js +++ b/test/transferManager.js @@ -626,7 +626,7 @@ contract("TransferManager", (accounts) => { await doDirectApprove({ signer: nonowner, amount: 10 }); assert.fail("approve should have failed"); } catch (error) { - assert.equal(error, "BM: must be owner or module"); + assert.equal(error, "BF: must be owner or feature"); } }); diff --git a/truffle-config.js b/truffle-config.js index 214192c90..5900784be 100644 --- a/truffle-config.js +++ b/truffle-config.js @@ -80,7 +80,7 @@ module.exports = { // Set default mocha options here, use special reporters etc. mocha: { - timeout: 100000, + timeout: 1000000, }, // Configure your compilers From 985ecfbf6b6fd138f38354b41d176103bb91b718 Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Thu, 22 Oct 2020 15:20:08 +0300 Subject: [PATCH 047/113] Fix kyber and lockManager tests --- test/kyber.js | 37 +++++++++++++++++++++---------- test/lockManager.js | 42 +++++++++++++++++++++-------------- utils/utilities.js | 54 +++++++++++++++++++++++++++++++++++++-------- 3 files changed, 96 insertions(+), 37 deletions(-) diff --git a/test/kyber.js b/test/kyber.js index 21b25f02a..e45eb2900 100644 --- a/test/kyber.js +++ b/test/kyber.js @@ -4,6 +4,13 @@ const ERC20 = artifacts.require("TestERC20"); const { ETH_TOKEN, getBalance } = require("../utils/utilities.js"); +const chai = require("chai"); +const BN = require("bn.js"); +const bnChai = require("bn-chai"); + +const { expect } = chai; +chai.use(bnChai(BN)); + const ERC20_SUPPLY = 10000000; const ERC20_DECIMALS = 18; const ERC20_RATE = 51 * 10 ** 13; // 1 ERC20 = 0.00051 ETH @@ -28,38 +35,44 @@ contract("KyberNetwork", (accounts) => { it("should exchange ETH for ERC20", async () => { const beforeERC20 = await erc20.balanceOf(trader); const beforeETH = await getBalance(trader); - assert.equal(beforeERC20.toNumber(), 0, "trader should have no ERC20"); + // trader should have no ERC20 + expect(beforeERC20).to.be.zero; await kyber.trade(ETH_TOKEN, 10000, erc20.address, trader, - new BigNumber("10000000000000000000000"), 1, "0x0000000000000000000000000000000000000000", { value: 10000, from: trader }); + new BN("10000000000000000000000"), 1, "0x0000000000000000000000000000000000000000", { value: 10000, from: trader }); const afterERC20 = await erc20.balanceOf(trader); const afterETH = await getBalance(trader); - assert.equal(beforeETH.sub(afterETH).gt(10000), true, "trader should have exchanged 10000 wei"); - assert.equal(afterERC20.gt(0), true, "trader should have received ERC20"); + // trader should have exchanged 10000 wei + expect(beforeETH.sub(afterETH)).to.be.gt.BN(10000); + // trader should have received ERC20 + expect(afterERC20).to.be.gt.BN(0); }); it("should exchange ERC20 for ETH", async () => { // provision ERC20 to trader await kyber.trade( ETH_TOKEN, - new BigNumber("1000000000000000000"), + new BN("1000000000000000000"), erc20.address, trader, - new BigNumber("10000000000000000000000"), + new BN("10000000000000000000000"), 1, "0x0000000000000000000000000000000000000000", - { value: new BigNumber("1000000000000000000") }, + { value: new BN("1000000000000000000") }, ); const beforeERC20 = await erc20.balanceOf(trader); const beforeETH = await getBalance(trader); - assert.equal(beforeERC20 > 0, true, "trader should have some ERC20"); + // trader should have some ERC20 + expect(beforeERC20).to.be.gt.BN(0); // exchange ERC20 - const srcAmount = beforeERC20.div(new BigNumber(2)); + const srcAmount = beforeERC20.div(new BN(2)); await erc20.approve(kyber.address, srcAmount, { from: trader }); await kyber.trade(erc20.address, srcAmount, ETH_TOKEN, trader, - new BigNumber("10000000000000000000000"), 1, "0x0000000000000000000000000000000000000000", { from: trader }); + new BN("10000000000000000000000"), 1, "0x0000000000000000000000000000000000000000", { from: trader }); const afterERC20 = await erc20.balanceOf(trader); const afterETH = await getBalance(trader); - assert.equal(beforeERC20.sub(afterERC20).eq(srcAmount), true, "trader should have exchanged ERC20"); - assert.equal(afterETH.sub(beforeETH).gt(0), true, "trader should have received wei"); + // trader should have exchanged ERC20 + expect(beforeERC20.sub(afterERC20)).to.eq.BN(srcAmount); + // trader should have received wei + expect(afterETH.sub(beforeETH)).to.be.gt.BN(0); }); }); diff --git a/test/lockManager.js b/test/lockManager.js index 7f9867914..17cf13e99 100644 --- a/test/lockManager.js +++ b/test/lockManager.js @@ -15,6 +15,14 @@ const RelayManager = require("../utils/relay-manager"); const utilities = require("../utils/utilities.js"); +const chai = require("chai"); +const BN = require("bn.js"); +const bnChai = require("bn-chai"); +const { assert } = require("chai"); + +const { expect } = chai; +chai.use(bnChai(BN)); + contract("LockManager", (accounts) => { const manager = new RelayManager(); @@ -71,7 +79,7 @@ contract("LockManager", (accounts) => { manager.setRelayerManager(relayerManager); const proxy = await Proxy.new(walletImplementation.address); - wallet = deployer.wrapDeployedContract(BaseWallet, proxy.address); + wallet = await BaseWallet.at(proxy.address); await versionManager.addVersion([ guardianManager.address, @@ -87,31 +95,32 @@ contract("LockManager", (accounts) => { describe("(Un)Lock by EOA guardians", () => { beforeEach(async () => { await guardianManager.addGuardian(wallet.address, guardian1, { from: owner }); - const count = (await guardianManager.guardianCount(wallet.address)).toNumber(); - assert.equal(count, 1, "1 guardian should be added"); + const count = await guardianManager.guardianCount(wallet.address); + expect(count).to.be.eq.BN(1); const isGuardian = await guardianManager.isGuardian(wallet.address, guardian1); - assert.isTrue(isGuardian, "guardian1 should be a guardian of the wallet"); + assert.isTrue(isGuardian); const isLocked = await lockManager.isLocked(wallet.address); - assert.isFalse(isLocked, "should be unlocked by default"); + assert.isFalse(isLocked); }); it("should be locked/unlocked by EOA guardians (blockchain transaction)", async () => { // lock await lockManager.lock(wallet.address, { from: guardian1 }); let state = await lockManager.isLocked(wallet.address); - assert.isTrue(state, "should be locked by guardian"); + assert.isTrue(state); let releaseTime = await lockManager.getLock(wallet.address); - assert.isTrue(releaseTime > 0, "releaseTime should be positive"); + expect(releaseTime).to.be.gt.BN(0); const guardianStorageLock = await guardianStorage.getLock(wallet.address); const guardianStorageLocker = await guardianStorage.getLocker(wallet.address); - assert.isTrue(guardianStorageLock.eq(0), "legacy guardianStorage's lock should be unused"); + // legacy guardianStorage's lock should be unused + expect(guardianStorageLock).to.be.zero; assert.isTrue(guardianStorageLocker === ethers.constants.AddressZero, "legacy guardianStorage's locker should be unused"); // unlock await lockManager.unlock(wallet.address, { from: guardian1 }); state = await lockManager.isLocked(wallet.address); assert.isFalse(state, "should be unlocked by guardian"); releaseTime = await lockManager.getLock(wallet.address); - assert.equal(releaseTime, 0, "releaseTime should be zero"); + expect(releaseTime).to.be.zero; }); it("should be locked/unlocked by EOA guardians (relayed transaction)", async () => { @@ -125,26 +134,26 @@ contract("LockManager", (accounts) => { }); it("should fail to lock/unlock by non-guardian EOAs (blockchain transaction)", async () => { - await utilities.assertRevert(lockManager.lock(wallet.address, { from: nonguardian }), "locking from non-guardian should fail"); + await utilities.assertRevert(lockManager.lock(wallet.address, { from: nonguardian }), "LM: must be guardian or feature"); await lockManager.lock(wallet.address, { from: guardian1 }); const state = await lockManager.isLocked(wallet.address); assert.isTrue(state, "should be locked by guardian1"); - await utilities.assertRevert(lockManager.unlock(wallet.address, { from: nonguardian }), "LM: must be guardian or module"); + await utilities.assertRevert(lockManager.unlock(wallet.address, { from: nonguardian }), "LM: must be guardian or feature"); }); }); describe("(Un)Lock by Smart Contract guardians", () => { beforeEach(async () => { - const proxy = await Proxy.at(walletImplementation.address); + const proxy = await Proxy.new(walletImplementation.address); const guardianWallet = await BaseWallet.at(proxy.address); await guardianWallet.init(guardian1, [versionManager.address]); await versionManager.upgradeWallet(guardianWallet.address, await versionManager.lastVersion(), { from: guardian1 }); await guardianManager.addGuardian(wallet.address, guardianWallet.address, { from: owner }); - const count = (await guardianManager.guardianCount(wallet.address)).toNumber(); - assert.equal(count, 1, "1 guardian should be added"); + const count = await guardianManager.guardianCount(wallet.address); + expect(count).to.be.eq.BN(1); const isGuardian = await guardianManager.isGuardian(wallet.address, guardianWallet.address); assert.isTrue(isGuardian, "guardian1 should be a guardian of the wallet"); const isLocked = await lockManager.isLocked(wallet.address); @@ -175,11 +184,12 @@ contract("LockManager", (accounts) => { let releaseTime = await lockManager.getLock(wallet.address); assert.isTrue(releaseTime > 0, "releaseTime should be positive"); - await utilities.increaseTime(24 * 5 + 5); + await utilities.increaseTime(125); // 24 * 5 + 5 + const y = await lockManager.getLock(wallet.address); state = await lockManager.isLocked(wallet.address); assert.isFalse(state, "should be unlocked by guardian"); releaseTime = await lockManager.getLock(wallet.address); - assert.equal(releaseTime, 0, "releaseTime should be zero"); + expect(releaseTime).to.be.zero; }); }); diff --git a/utils/utilities.js b/utils/utilities.js index 9d1532407..da7393659 100644 --- a/utils/utilities.js +++ b/utils/utilities.js @@ -198,16 +198,52 @@ module.exports = { return 1895; }, - async increaseTime(seconds) { - const networkId = await web3.eth.net.getId(); + web3GetClient() { + return new Promise((resolve, reject) => { + web3.eth.getNodeInfo((err, res) => { + if (err !== null) return reject(err); + return resolve(res); + }); + }); + }, - if (networkId === "1597649375983") { - await web3.currentProvider.send("evm_increaseTime", seconds); - await web3.currentProvider.send("evm_mine"); - } else { - return new Promise((res) => { setTimeout(res, seconds * 1000); }); - } - return null; + async increaseTime(seconds) { + const client = await this.web3GetClient(); + console.log("client", client) + const p = new Promise((resolve, reject) => { + if (client.indexOf("TestRPC") === -1) { + console.warning("Client is not ganache-cli and cannot forward time"); + } else { + web3.currentProvider.send( + { + jsonrpc: "2.0", + method: "evm_increaseTime", + params: [seconds], + id: 0, + }, + (err) => { + if (err) { + return reject(err); + } + return web3.currentProvider.send( + { + jsonrpc: "2.0", + method: "evm_mine", + params: [], + id: 0, + }, + (err2, res) => { + if (err2) { + return reject(err2); + } + return resolve(res); + } + ); + } + ); + } + }); + return p; }, async getNonceForRelay() { From 2a9ccf48ed4d323c3a6232732e42b9a23f18ce2d Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Thu, 22 Oct 2020 17:06:07 +0300 Subject: [PATCH 048/113] Fix linting errors --- .eslintrc | 3 +- deployment/2_deploy_contracts.js | 1 + deployment/3_setup_contracts.js | 1 + deployment/5_deploy_modules.js | 51 +------------------------- deployment/6_register_modules.js | 22 +++++------ deployment/888_benchmark_2_0.js | 50 +++++++++++++------------ deployment/999_benchmark.js | 5 +-- deployment/module_upgrade_template.js | 11 ++++-- scripts/deploy_defi.js | 11 +++--- scripts/deploy_wallet_detector.js | 4 +- scripts/set_tradable_tokens.js | 6 ++- scripts/update_compound_registry.js | 1 - scripts/update_dex_registry.js | 5 ++- scripts/update_module_registry.js | 5 ++- scripts/update_wallet_detector.js | 5 ++- test/approvedTransfer.js | 10 ++--- test/argentWalletDetector.js | 27 ++++++-------- test/baseWallet.js | 8 ++-- test/compoundManager_invest.js | 4 +- test/compoundManager_loan.js | 2 +- test/guardianManager.js | 2 +- test/kyber.js | 3 +- test/lockManager.js | 8 ++-- test/makerV2Manager_loan.js | 8 ++-- test/relayer.js | 2 +- test/simpleUpgrader.js | 10 ++--- test/tokenExchanger.js | 9 +++-- test/transferManager.js | 17 ++++----- test/upgraderToVersionManager.js | 1 - test/versionManager.js | 2 +- utils/defi-deployer.js | 22 +++++------ utils/utilities.js | 53 ++++++++++++++------------- 32 files changed, 165 insertions(+), 204 deletions(-) diff --git a/.eslintrc b/.eslintrc index 146dd8d60..a0f42e22b 100644 --- a/.eslintrc +++ b/.eslintrc @@ -20,7 +20,8 @@ "guard-for-in": "off", "function-paren-newline": "off", "comma-dangle": "off", - "object-curly-newline": "off" + "object-curly-newline": "off", + "no-unused-expressions": "off" }, "parserOptions": { "ecmaVersion": 2018 diff --git a/deployment/2_deploy_contracts.js b/deployment/2_deploy_contracts.js index 56990f85c..c09d0f0da 100644 --- a/deployment/2_deploy_contracts.js +++ b/deployment/2_deploy_contracts.js @@ -1,3 +1,4 @@ +/* global artifacts */ const GuardianStorage = artifacts.require("GuardianStorage"); const TransferStorage = artifacts.require("TransferStorage"); const LockStorage = artifacts.require("LockStorage"); diff --git a/deployment/3_setup_contracts.js b/deployment/3_setup_contracts.js index e4c4fb52f..71c941bfe 100644 --- a/deployment/3_setup_contracts.js +++ b/deployment/3_setup_contracts.js @@ -1,3 +1,4 @@ +/* global artifacts */ const ModuleRegistry = artifacts.require("ModuleRegistry"); const ENSManager = artifacts.require("ArgentENSManager"); const ENSResolver = artifacts.require("ArgentENSResolver"); diff --git a/deployment/5_deploy_modules.js b/deployment/5_deploy_modules.js index 12d272460..b0eb6c402 100644 --- a/deployment/5_deploy_modules.js +++ b/deployment/5_deploy_modules.js @@ -1,3 +1,4 @@ +/* global artifacts */ const childProcess = require("child_process"); const ApprovedTransfer = artifacts.require("ApprovedTransfer"); @@ -53,78 +54,51 @@ const deploy = async (network) => { // Deploy the GuardianManager module const GuardianManagerWrapper = await deployer.deploy( GuardianManager, -<<<<<<< HEAD {}, config.modules.LockStorage, config.modules.GuardianStorage, VersionManagerWrapper.address, -======= - config.contracts.ModuleRegistry, - GuardianStorageWrapper.address, ->>>>>>> b79932ef... Migrate away from deployer.deploy syntax and to .new() config.settings.securityPeriod || 0, config.settings.securityWindow || 0, ); // Deploy the LockManager module const LockManagerWrapper = await deployer.deploy( LockManager, -<<<<<<< HEAD {}, config.modules.LockStorage, config.modules.GuardianStorage, VersionManagerWrapper.address, -======= - config.contracts.ModuleRegistry, - GuardianStorageWrapper.address, ->>>>>>> b79932ef... Migrate away from deployer.deploy syntax and to .new() config.settings.lockPeriod || 0, ); // Deploy the RecoveryManager module const RecoveryManagerWrapper = await deployer.deploy( RecoveryManager, -<<<<<<< HEAD {}, config.modules.LockStorage, config.modules.GuardianStorage, VersionManagerWrapper.address, -======= - config.contracts.ModuleRegistry, - GuardianStorageWrapper.address, ->>>>>>> b79932ef... Migrate away from deployer.deploy syntax and to .new() config.settings.recoveryPeriod || 0, config.settings.lockPeriod || 0, ); // Deploy the ApprovedTransfer module const ApprovedTransferWrapper = await deployer.deploy( ApprovedTransfer, -<<<<<<< HEAD {}, config.modules.LockStorage, config.modules.GuardianStorage, config.modules.LimitStorage, VersionManagerWrapper.address, config.defi.weth, -======= - config.contracts.ModuleRegistry, - GuardianStorageWrapper.address, ->>>>>>> b79932ef... Migrate away from deployer.deploy syntax and to .new() ); // Deploy the TransferManager module const TransferManagerWrapper = await deployer.deploy( TransferManager, -<<<<<<< HEAD {}, config.modules.LockStorage, config.modules.TransferStorage, config.modules.LimitStorage, config.modules.TokenPriceRegistry, VersionManagerWrapper.address, -======= - config.contracts.ModuleRegistry, - TransferStorageWrapper.address, - GuardianStorageWrapper.address, - config.contracts.TokenPriceProvider, ->>>>>>> b79932ef... Migrate away from deployer.deploy syntax and to .new() config.settings.securityPeriod || 0, config.settings.securityWindow || 0, config.settings.defaultLimit || "1000000000000000000", @@ -134,7 +108,6 @@ const deploy = async (network) => { // Deploy the TokenExchanger module const TokenExchangerWrapper = await deployer.deploy( TokenExchanger, -<<<<<<< HEAD {}, config.modules.LockStorage, config.modules.TokenPriceRegistry, @@ -142,38 +115,21 @@ const deploy = async (network) => { config.contracts.DexRegistry, config.defi.paraswap.contract, "argent", -======= - config.contracts.ModuleRegistry, - GuardianStorageWrapper.address, - config.Kyber ? config.Kyber.contract : "0x0000000000000000000000000000000000000000", - config.contracts.MultiSigWallet, - config.settings.feeRatio || 0, ->>>>>>> b79932ef... Migrate away from deployer.deploy syntax and to .new() ); // Deploy the NFTTransfer module const NftTransferWrapper = await deployer.deploy( NftTransfer, -<<<<<<< HEAD {}, config.modules.LockStorage, config.modules.TokenPriceRegistry, VersionManagerWrapper.address, -======= - config.contracts.ModuleRegistry, - GuardianStorageWrapper.address, ->>>>>>> b79932ef... Migrate away from deployer.deploy syntax and to .new() config.CryptoKitties.contract, ); // Deploy the CompoundManager module const CompoundManagerWrapper = await deployer.deploy( CompoundManager, -<<<<<<< HEAD {}, config.modules.LockStorage, -======= - config.contracts.ModuleRegistry, - GuardianStorageWrapper.address, ->>>>>>> b79932ef... Migrate away from deployer.deploy syntax and to .new() config.defi.compound.comptroller, config.contracts.CompoundRegistry, VersionManagerWrapper.address, @@ -181,13 +137,8 @@ const deploy = async (network) => { // Deploy MakerManagerV2 const MakerV2ManagerWrapper = await deployer.deploy( MakerV2Manager, -<<<<<<< HEAD {}, config.modules.LockStorage, -======= - config.contracts.ModuleRegistry, - GuardianStorageWrapper.address, ->>>>>>> b79932ef... Migrate away from deployer.deploy syntax and to .new() config.defi.maker.migration, config.defi.maker.pot, config.defi.maker.jug, diff --git a/deployment/6_register_modules.js b/deployment/6_register_modules.js index 7a3228179..4f3b41de0 100644 --- a/deployment/6_register_modules.js +++ b/deployment/6_register_modules.js @@ -3,17 +3,17 @@ const ModuleRegistry = artifacts.require("ModuleRegistry"); const MultiSig = artifacts.require("MultiSigWallet"); -const ApprovedTransfer = require("../build/ApprovedTransfer"); -const CompoundManager = require("../build/CompoundManager"); -const GuardianManager = require("../build/GuardianManager"); -const LockManager = require("../build/LockManager"); -const NftTransfer = require("../build/NftTransfer"); -const RecoveryManager = require("../build/RecoveryManager"); -const TokenExchanger = require("../build/TokenExchanger"); -const MakerV2Manager = require("../build/MakerV2Manager"); -const TransferManager = require("../build/TransferManager"); -const RelayerManager = require("../build/RelayerManager"); -const VersionManager = require("../build/VersionManager"); +const ApprovedTransfer = artifacts.require("ApprovedTransfer"); +const CompoundManager = artifacts.require("CompoundManager"); +const GuardianManager = artifacts.require("GuardianManager"); +const LockManager = artifacts.require("LockManager"); +const NftTransfer = artifacts.require("NftTransfer"); +const RecoveryManager = artifacts.require("RecoveryManager"); +const TokenExchanger = artifacts.require("TokenExchanger"); +const MakerV2Manager = artifacts.require("MakerV2Manager"); +const TransferManager = artifacts.require("TransferManager"); +const RelayerManager = artifacts.require("RelayerManager"); +const VersionManager = artifacts.require("VersionManager"); const utils = require("../utils/utilities.js"); diff --git a/deployment/888_benchmark_2_0.js b/deployment/888_benchmark_2_0.js index 9e77fcc29..52917e4bd 100644 --- a/deployment/888_benchmark_2_0.js +++ b/deployment/888_benchmark_2_0.js @@ -1,31 +1,33 @@ /* eslint max-classes-per-file: ["error", 2] */ +/* global artifacts */ const ethers = require("ethers"); const chai = require("chai"); const Table = require("cli-table2"); const tinyreq = require("tinyreq"); -const BaseWallet = require("../build/BaseWallet"); -const Proxy = require("../build/Proxy"); -const ModuleRegistry = require("../build/ModuleRegistry"); -const MultiSig = require("../build/MultiSigWallet"); - -const NewGuardianManager = require("../build/GuardianManager"); -const NewTokenExchanger = require("../build/TokenExchanger"); -const NewLockManager = require("../build/LockManager"); -const NewRecoveryManager = require("../build/RecoveryManager"); -const NewApprovedTransfer = require("../build/ApprovedTransfer"); -const NewTransferManager = require("../build/TransferManager"); -const NewNftTransfer = require("../build/NftTransfer"); -const NewCompoundManager = require("../build/CompoundManager"); -const NewMakerV2Manager = require("../build/MakerV2Manager"); -const RelayerManager = require("../build/RelayerManager"); -const VersionManager = require("../build/VersionManager"); - -const UpgraderToVersionManager = require("../build/UpgraderToVersionManager"); -const LimitStorage = require("../build/LimitStorage"); -const LockStorage = require("../build/LockStorage"); -const TokenPriceRegistry = require("../build/TokenPriceRegistry"); -const DexRegistry = require("../build/DexRegistry"); + +const BaseWallet = artifacts.require("BaseWallet"); +const Proxy = artifacts.require("Proxy"); +const ModuleRegistry = artifacts.require("ModuleRegistry"); +const MultiSig = artifacts.require("MultiSigWallet"); + +const NewGuardianManager = artifacts.require("GuardianManager"); +const NewTokenExchanger = artifacts.require("TokenExchanger"); +const NewLockManager = artifacts.require("LockManager"); +const NewRecoveryManager = artifacts.require("RecoveryManager"); +const NewApprovedTransfer = artifacts.require("ApprovedTransfer"); +const NewTransferManager = artifacts.require("TransferManager"); +const NewNftTransfer = artifacts.require("NftTransfer"); +const NewCompoundManager = artifacts.require("CompoundManager"); +const NewMakerV2Manager = artifacts.require("MakerV2Manager"); +const RelayerManager = artifacts.require("RelayerManager"); +const VersionManager = artifacts.require("VersionManager"); + +const UpgraderToVersionManager = artifacts.require("UpgraderToVersionManager"); +const LimitStorage = artifacts.require("LimitStorage"); +const LockStorage = artifacts.require("LockStorage"); +const TokenPriceRegistry = artifacts.require("TokenPriceRegistry"); +const DexRegistry = artifacts.require("DexRegistry"); const TransferManager = require("../build-legacy/v1.6.0/TransferManager"); const ApprovedTransfer = require("../build-legacy/v1.6.0/ApprovedTransfer"); @@ -38,7 +40,7 @@ const MakerV2Manager = require("../build-legacy/v1.6.0/MakerV2Manager"); const CompoundManager = require("../build-legacy/v1.6.0/CompoundManager"); const DeployManager = require("../utils/deploy-manager"); -const TestManager = require("../utils/test-manager"); +const RelayManager = require("../utils/relay-manager"); const MultisigExecutor = require("../utils/multisigexecutor.js"); const { sortWalletByAddress } = require("../utils/utilities.js"); @@ -120,7 +122,7 @@ class Benchmark { this.accounts = this.signers.map((s) => s._address); this.config = config; - this.testManager = new TestManager(this.accounts); + this.testManager = new RelayManager(this.accounts); this.GuardianManagerWrapper = await this.deployer.wrapDeployedContract(GuardianManager, config.modules.GuardianManager); this.LockManagerWrapper = await this.deployer.wrapDeployedContract(LockManager, config.modules.LockManager); diff --git a/deployment/999_benchmark.js b/deployment/999_benchmark.js index 6f4d78768..8bf13dca9 100644 --- a/deployment/999_benchmark.js +++ b/deployment/999_benchmark.js @@ -1,5 +1,5 @@ /* eslint max-classes-per-file: ["error", 2] */ -/* global artifacts, accounts */ +/* global artifacts */ const ethers = require("ethers"); const Table = require("cli-table2"); const tinyreq = require("tinyreq"); @@ -21,8 +21,7 @@ const NftTransfer = artifacts.require("NftTransfer"); const CompoundManager = artifacts.require("CompoundManager"); const MakerV2Manager = artifacts.require("MakerV2Manager"); const RelayerManager = artifacts.require("RelayerManager"); - -const VersionManager = require("../build/VersionManager"); +const VersionManager = artifacts.require("VersionManager"); const DeployManager = require("../utils/deploy-manager"); const RelayManager = require("../utils/relay-manager"); diff --git a/deployment/module_upgrade_template.js b/deployment/module_upgrade_template.js index fb9d432cd..7b249876c 100644 --- a/deployment/module_upgrade_template.js +++ b/deployment/module_upgrade_template.js @@ -1,9 +1,12 @@ +/* global artifacts */ + const semver = require("semver"); const childProcess = require("child_process"); -const MultiSig = require("../build/MultiSigWallet"); -const ModuleRegistry = require("../build/ModuleRegistry"); -const VersionManager = require("../build/VersionManager"); -const Upgrader = require("../build/UpgraderToVersionManager"); + +const MultiSig = artifacts.require("MultiSigWallet"); +const ModuleRegistry = artifacts.require("ModuleRegistry"); +const VersionManager = artifacts.require("VersionManager"); +const Upgrader = artifacts.require("UpgraderToVersionManager"); const DeployManager = require("../utils/deploy-manager.js"); const MultisigExecutor = require("../utils/multisigexecutor.js"); diff --git a/scripts/deploy_defi.js b/scripts/deploy_defi.js index 259877e1a..75e311430 100644 --- a/scripts/deploy_defi.js +++ b/scripts/deploy_defi.js @@ -1,6 +1,7 @@ // AWS_PROFILE=argent-test AWS_SDK_LOAD_CONFIG=true etherlime deploy --file ./scripts/deploy_defi.js --compile false /* global artifacts */ +const BN = require("bn.js"); const { parseEther, formatBytes32String } = require("ethers").utils; const DeployManager = require("../utils/deploy-manager.js"); @@ -14,13 +15,13 @@ const DSToken = artifacts.require("DSToken"); const WETH = artifacts.require("WETH9"); const DSValue = artifacts.require("DSValue"); -const RAY = new BigNumber("1000000000000000000000000000"); // 10**27 -const WAD = new BigNumber("1000000000000000000"); // 10**18 +const RAY = new BN("1000000000000000000000000000"); // 10**27 +const WAD = new BN("1000000000000000000"); // 10**18 const USD_PER_DAI = RAY; // 1 DAI = 1 USD -const USD_PER_ETH = WAD.times(250); // 1 ETH = 250 USD -const USD_PER_MKR = WAD.times(700); // 1 MKR = 700 USD +const USD_PER_ETH = WAD.muln(250); // 1 ETH = 250 USD +const USD_PER_MKR = WAD.muln(700); // 1 MKR = 700 USD -const ETH_PER_MKR = WAD.times(USD_PER_MKR).div(USD_PER_ETH); // 1 MKR = 2.8 ETH +const ETH_PER_MKR = WAD.mul(USD_PER_MKR).div(USD_PER_ETH); // 1 MKR = 2.8 ETH async function getTimestamp(deployer) { const block = await deployer.provider.getBlock("latest"); diff --git a/scripts/deploy_wallet_detector.js b/scripts/deploy_wallet_detector.js index 1cdc478e0..870f126fc 100644 --- a/scripts/deploy_wallet_detector.js +++ b/scripts/deploy_wallet_detector.js @@ -8,7 +8,9 @@ // - network = [test, staging, prod] // //////////////////////////////////////////////////////////////////// -const ArgentWalletDetector = require("../build/ArgentWalletDetector"); +/* global artifacts */ +const ArgentWalletDetector = artifacts.require("ArgentWalletDetector"); + const DeployManager = require("../utils/deploy-manager.js"); const defaultNetwork = "test"; diff --git a/scripts/set_tradable_tokens.js b/scripts/set_tradable_tokens.js index 8757ad9c0..e71e9af75 100644 --- a/scripts/set_tradable_tokens.js +++ b/scripts/set_tradable_tokens.js @@ -10,10 +10,12 @@ // --dry: if set, will not send the transaction, just output what will be updated // +/* global artifacts */ const fs = require("fs"); const ethers = require("ethers"); -const MultiSig = require("../build/MultiSigWallet"); -const TokenPriceRegistry = require("../build/TokenPriceRegistry"); + +const MultiSig = artifacts.require("MultiSigWallet"); +const TokenPriceRegistry = artifacts.require("TokenPriceRegistry"); const DeployManager = require("../utils/deploy-manager.js"); const MultisigExecutor = require("../utils/multisigexecutor.js"); diff --git a/scripts/update_compound_registry.js b/scripts/update_compound_registry.js index 45d6ab83e..a1a87bc5f 100644 --- a/scripts/update_compound_registry.js +++ b/scripts/update_compound_registry.js @@ -12,7 +12,6 @@ // //////////////////////////////////////////////////////////////////// /* global artifacts */ - const CompoundRegistry = artifacts.require("CompoundRegistry"); const MultiSig = artifacts.require("MultiSigWallet"); diff --git a/scripts/update_dex_registry.js b/scripts/update_dex_registry.js index 4790a888d..960f03497 100644 --- a/scripts/update_dex_registry.js +++ b/scripts/update_dex_registry.js @@ -9,8 +9,9 @@ // - dex status = [true, false] // //////////////////////////////////////////////////////////////////// -const MultiSig = require("../build/MultiSigWallet"); -const DexRegistry = require("../build/DexRegistry"); +/* global artifacts */ +const MultiSig = artifacts.require("MultiSigWallet"); +const DexRegistry = artifacts.require("DexRegistry"); const DeployManager = require("../utils/deploy-manager.js"); const MultisigExecutor = require("../utils/multisigexecutor.js"); diff --git a/scripts/update_module_registry.js b/scripts/update_module_registry.js index 9c96019a7..1f8827a9a 100644 --- a/scripts/update_module_registry.js +++ b/scripts/update_module_registry.js @@ -11,8 +11,9 @@ // - network = [ganache, test, staging, prod] // //////////////////////////////////////////////////////////////////// -const ModuleRegistry = require("../build/ModuleRegistry"); -const MultiSig = require("../build/MultiSigWallet"); +/* global artifacts */ +const ModuleRegistry = artifacts.require("ModuleRegistry"); +const MultiSig = artifacts.require("MultiSigWallet"); const utils = require("../utils/utilities.js"); const DeployManager = require("../utils/deploy-manager.js"); diff --git a/scripts/update_wallet_detector.js b/scripts/update_wallet_detector.js index 9646ef9fa..b598d4548 100644 --- a/scripts/update_wallet_detector.js +++ b/scripts/update_wallet_detector.js @@ -18,8 +18,9 @@ // - network = [test, prod] // //////////////////////////////////////////////////////////////////// -const ArgentWalletDetector = require("../build/ArgentWalletDetector"); -const MultiSig = require("../build/MultiSigWallet"); +/* global artifacts */ +const ArgentWalletDetector = artifacts.require("ArgentWalletDetector"); +const MultiSig = artifacts.require("MultiSigWallet"); const DeployManager = require("../utils/deploy-manager.js"); const MultisigExecutor = require("../utils/multisigexecutor.js"); diff --git a/test/approvedTransfer.js b/test/approvedTransfer.js index e4b154a7f..32d65a841 100644 --- a/test/approvedTransfer.js +++ b/test/approvedTransfer.js @@ -47,11 +47,11 @@ contract("ApprovedTransfer", (accounts) => { let versionManager; before(async () => { - weth = await WETH.new() - const registry = await Registry.new() - const lockStorage = await LockStorage.new() - const guardianStorage = await GuardianStorage.new() - const limitStorage = await LimitStorage.new() + weth = await WETH.new(); + const registry = await Registry.new(); + const lockStorage = await LockStorage.new(); + const guardianStorage = await GuardianStorage.new(); + const limitStorage = await LimitStorage.new(); versionManager = await VersionManager.new( registry.address, lockStorage.address, diff --git a/test/argentWalletDetector.js b/test/argentWalletDetector.js index dc424f91b..5c5245b82 100644 --- a/test/argentWalletDetector.js +++ b/test/argentWalletDetector.js @@ -1,10 +1,11 @@ -/* global utils */ +/* global artifacts */ const ethers = require("ethers"); -const ArgentWalletDetector = require("../build/ArgentWalletDetector"); -const Proxy = require("../build/Proxy"); -const BaseWallet = require("../build/BaseWallet"); -const TestManager = require("../utils/test-manager"); +const ArgentWalletDetector = artifacts.require("ArgentWalletDetector"); +const Proxy = artifacts.require("Proxy"); +const BaseWallet = artifacts.require("BaseWallet"); + +const utils = require("../utils/utilities.js"); const RANDOM_CODE = "0x880ac7547a884027b93f5eaba5ff545919fdeb3c23ed0d2094db66303b3a80ac"; const ZERO_BYTES32 = ethers.constants.HashZero; @@ -14,9 +15,6 @@ const EMPTY_CODE_MSG = "AWR: empty _code"; const EMPTY_IMPL_MSG = "AWR: empty _impl"; describe("ArgentWalletDetector", () => { - const manager = new TestManager(); - - let deployer; let detector; let implementation1; let implementation2; @@ -25,23 +23,22 @@ describe("ArgentWalletDetector", () => { let argentCode; before(async () => { - deployer = manager.newDeployer(); - implementation1 = await deployer.deploy(BaseWallet); - implementation2 = await deployer.deploy(BaseWallet); - proxy1 = await deployer.deploy(Proxy, {}, implementation1.contractAddress); - proxy2 = await deployer.deploy(Proxy, {}, implementation2.contractAddress); + implementation1 = await BaseWallet.new(); + implementation2 = await BaseWallet.new(); + proxy1 = await Proxy.new(implementation1.contractAddress); + proxy2 = await Proxy.new(implementation2.contractAddress); argentCode = ethers.utils.keccak256(proxy1._contract.deployedBytecode); }); beforeEach(async () => { - detector = await deployer.deploy(ArgentWalletDetector, {}, [], []); + detector = await ArgentWalletDetector.new([], []); }); describe("add info", () => { it("should deploy with codes and implementations", async () => { const c = [argentCode, RANDOM_CODE]; const i = [implementation1.contractAddress, implementation2.contractAddress]; - detector = await deployer.deploy(ArgentWalletDetector, {}, c, i); + detector = await ArgentWalletDetector.new(c, i); const implementations = await detector.getImplementations(); assert.equal(implementations[0], implementation1.contractAddress, "should have added first implementation"); assert.equal(implementations[1], implementation2.contractAddress, "should have added second implementation"); diff --git a/test/baseWallet.js b/test/baseWallet.js index 6155f5be4..1118268c0 100644 --- a/test/baseWallet.js +++ b/test/baseWallet.js @@ -1,11 +1,11 @@ /* global artifacts */ const ethers = require("ethers"); -const { BigNumber } = require("bignumber.js"); const Proxy = artifacts.require("Proxy"); const BaseWallet = artifacts.require("BaseWallet"); const OldWalletV16 = require("../build-legacy/v1.6.0/BaseWallet"); const OldWalletV13 = require("../build-legacy/v1.3.0/BaseWallet"); + const VersionManager = artifacts.require("VersionManager"); const Registry = artifacts.require("ModuleRegistry"); const SimpleUpgrader = artifacts.require("SimpleUpgrader"); @@ -64,7 +64,7 @@ contract("BaseWallet", (accounts) => { it("should register a module with the correct info", async () => { const name = ethers.utils.formatBytes32String("module1"); await registry.registerModule(module1.address, name); - const isRegistered = await registry.contract.methods['isRegisteredModule(address)'](module1.address).call(); + const isRegistered = await registry.contract.methods["isRegisteredModule(address)"](module1.address).call(); assert.isTrue(isRegistered, "module should be registered"); const info = await registry.moduleInfo(module1.address); assert.equal(name, info, "name should be correct"); @@ -73,10 +73,10 @@ contract("BaseWallet", (accounts) => { it("should deregister a module", async () => { const name = ethers.utils.formatBytes32String("module2"); await registry.registerModule(module2.address, name); - let isRegistered = await registry.contract.methods['isRegisteredModule(address)'](module2.address).call(); + let isRegistered = await registry.contract.methods["isRegisteredModule(address)"](module2.address).call(); assert.isTrue(isRegistered, "module should be registered"); await registry.deregisterModule(module2.address); - isRegistered = await registry.contract.methods['isRegisteredModule(address)'](module2.address).call(); + isRegistered = await registry.contract.methods["isRegisteredModule(address)"](module2.address).call(); assert.isFalse(isRegistered, "module should be deregistered"); }); diff --git a/test/compoundManager_invest.js b/test/compoundManager_invest.js index 43a44bd32..b13028f9b 100644 --- a/test/compoundManager_invest.js +++ b/test/compoundManager_invest.js @@ -209,7 +209,7 @@ contract("Invest Manager with Compound", (accounts) => { txReceipt = tx.receipt; } - console.log("txReceipt", txReceipt) + console.log("txReceipt", txReceipt); await utils.hasEvent(txReceipt, investManager, "InvestmentAdded"); await accrueInterests(days, investInEth); @@ -237,7 +237,7 @@ contract("Invest Manager with Compound", (accounts) => { } await utils.hasEvent(txReceipt, investManager, "InvestmentRemoved"); - // TODO: Manual division result rounding up until https://github.com/indutny/bn.js/issues/79 is added to BN.js + // TODO: Manual division result rounding up until https://github.com/indutny/bn.js/issues/79 is added to BN.js const result = before.muln(10000 - fraction); const divisionRemainder = new BN(result.modn(10000)); diff --git a/test/compoundManager_loan.js b/test/compoundManager_loan.js index ed3670284..faf88f33c 100644 --- a/test/compoundManager_loan.js +++ b/test/compoundManager_loan.js @@ -36,6 +36,7 @@ const ETH_EXCHANGE_RATE = new BN("200000000000000000000000000"); const RelayManager = require("../utils/relay-manager"); const { ETH_TOKEN } = require("../utils/utilities.js"); const utils = require("../utils/utilities.js"); + const ZERO_BYTES32 = ethers.constants.HashZero; contract("Loan Module", (accounts) => { @@ -244,7 +245,6 @@ contract("Loan Module", (accounts) => { await utils.hasEvent(txReceipt, loanManager, "CollateralAdded"); // Wallet collateral should have decreased by `amount` expect(collateralBalanceBefore.sub(new BN(amount))).to.eq.BN(collateralBalanceAfter); - } else { await utils.hasEvent(txReceipt, loanManager, "CollateralRemoved"); // Wallet collateral should have increased by `amount` diff --git a/test/guardianManager.js b/test/guardianManager.js index c2b68cbbc..3b048967d 100644 --- a/test/guardianManager.js +++ b/test/guardianManager.js @@ -269,7 +269,7 @@ contract("GuardianManager", (accounts) => { await guardianManager.addGuardian(wallet.address, guardian1, { from: owner }); const nonCompliantGuardian = await NonCompliantGuardian.new(); await utilities.assertRevert(guardianManager.addGuardian(wallet.address, nonCompliantGuardian.address, { from: owner }), - "GM: guardian must be EOA or implement owner()"); + "GM: guardian must be EOA or implement owner()"); }); }); }); diff --git a/test/kyber.js b/test/kyber.js index e45eb2900..2d6ab7527 100644 --- a/test/kyber.js +++ b/test/kyber.js @@ -2,11 +2,10 @@ const KyberNetwork = artifacts.require("KyberNetworkTest"); const ERC20 = artifacts.require("TestERC20"); -const { ETH_TOKEN, getBalance } = require("../utils/utilities.js"); - const chai = require("chai"); const BN = require("bn.js"); const bnChai = require("bn-chai"); +const { ETH_TOKEN, getBalance } = require("../utils/utilities.js"); const { expect } = chai; chai.use(bnChai(BN)); diff --git a/test/lockManager.js b/test/lockManager.js index 17cf13e99..e8e1064b5 100644 --- a/test/lockManager.js +++ b/test/lockManager.js @@ -1,5 +1,6 @@ /* global artifacts */ const ethers = require("ethers"); + const RelayerManager = artifacts.require("RelayerManager"); const GuardianManager = artifacts.require("GuardianManager"); const LockManager = artifacts.require("LockManager"); @@ -11,14 +12,12 @@ const Registry = artifacts.require("ModuleRegistry"); const RecoveryManager = artifacts.require("RecoveryManager"); const VersionManager = artifacts.require("VersionManager"); -const RelayManager = require("../utils/relay-manager"); - -const utilities = require("../utils/utilities.js"); - const chai = require("chai"); const BN = require("bn.js"); const bnChai = require("bn-chai"); const { assert } = require("chai"); +const utilities = require("../utils/utilities.js"); +const RelayManager = require("../utils/relay-manager"); const { expect } = chai; chai.use(bnChai(BN)); @@ -185,7 +184,6 @@ contract("LockManager", (accounts) => { assert.isTrue(releaseTime > 0, "releaseTime should be positive"); await utilities.increaseTime(125); // 24 * 5 + 5 - const y = await lockManager.getLock(wallet.address); state = await lockManager.isLocked(wallet.address); assert.isFalse(state, "should be unlocked by guardian"); releaseTime = await lockManager.getLock(wallet.address); diff --git a/test/makerV2Manager_loan.js b/test/makerV2Manager_loan.js index d47ebf0b8..648ba137b 100644 --- a/test/makerV2Manager_loan.js +++ b/test/makerV2Manager_loan.js @@ -1,6 +1,8 @@ /* global artifacts */ const ethers = require("ethers"); +const BN = require("bn.js"); + const { bigNumToBytes32, ETH_TOKEN, getEvent, hasEvent, increaseTime, getBalance, assertRevert } = require("../utils/utilities.js"); @@ -27,9 +29,9 @@ const TransferStorage = artifacts.require("TransferStorage"); const LimitStorage = artifacts.require("LimitStorage"); const TokenPriceRegistry = artifacts.require("TokenPriceRegistry"); const TransferManager = artifacts.require("TransferManager"); -const BadFeature = artifacts.require("TestFeature"); const RelayerManager = artifacts.require("RelayerManager"); const VersionManager = artifacts.require("VersionManager"); +const BadFeature = artifacts.require("TestFeature"); contract("MakerV2Loan", (accounts) => { const manager = new RelayManager(); @@ -325,7 +327,7 @@ contract("MakerV2Loan", (accounts) => { it("should not remove collateral with invalid collateral amount", async () => { const loanId = await testOpenLoan({ collateralAmount, daiAmount, relayed: false }); await assertRevert( - makerV2.removeCollateral(walletAddress, loanId, ETH_TOKEN, new BigNumber(2).pow(255), { from: owner }), + makerV2.removeCollateral(walletAddress, loanId, ETH_TOKEN, new BN(2).pow(255), { from: owner }), "MV2: int overflow", ); }); @@ -768,7 +770,7 @@ contract("MakerV2Loan", (accounts) => { it("should not allow (fake) feature to give unowned vault", async () => { // Deploy a (fake) bad feature - const badFeature = await BadFeaturenew(lockStorage.address, versionManager.address, 0); + const badFeature = await BadFeature.new(lockStorage.address, versionManager.address, 0); // Add the bad feature to the wallet await versionManager.addVersion([ diff --git a/test/relayer.js b/test/relayer.js index 1caa7de4c..a6e7a3c6b 100644 --- a/test/relayer.js +++ b/test/relayer.js @@ -149,7 +149,7 @@ contract("RelayerManager", (accounts) => { it("should fail when the RelayerManager is not authorised", async () => { await versionManager.addVersion([testFeature.address], []); - const wrongWallet = await deployer.deploy(BaseWallet); + const wrongWallet = await BaseWallet.new(); await wrongWallet.init(owner, [versionManager.address]); await versionManager.upgradeWallet(wrongWallet.address, await versionManager.lastVersion(), { from: owner }); const params = [wrongWallet.address, 2]; diff --git a/test/simpleUpgrader.js b/test/simpleUpgrader.js index bca3e405a..8c1063852 100644 --- a/test/simpleUpgrader.js +++ b/test/simpleUpgrader.js @@ -1,9 +1,9 @@ /* global artifacts */ const ethers = require("ethers"); +const { formatBytes32String, parseBytes32String } = require("ethers").utils; const utils = require("../utils/utilities.js"); -const { formatBytes32String, parseBytes32String } = require("ethers").utils; const Proxy = artifacts.require("Proxy"); const BaseWallet = artifacts.require("BaseWallet"); const SimpleUpgrader = artifacts.require("SimpleUpgrader"); @@ -14,8 +14,8 @@ const LockStorage = artifacts.require("LockStorage"); const Registry = artifacts.require("ModuleRegistry"); const RecoveryManager = artifacts.require("RecoveryManager"); const VersionManager = artifacts.require("VersionManager"); - const RelayerManager = artifacts.require("RelayerManager"); + const RelayManager = require("../utils/relay-manager"); contract("SimpleUpgrader", (accounts) => { @@ -177,7 +177,7 @@ contract("SimpleUpgrader", (accounts) => { if (toAdd.length === 0) { if (relayed) { txReceipt = await manager.relay(moduleV1, "addModule", params2, wallet, [owner]); - const event = await utils.getEvent(txReceipt, relayer, "TransactionExecuted"); + const event = await utils.getEvent(txReceipt, relayerV1, "TransactionExecuted"); assert.isTrue(!event.args.success, "Relayed upgrade to 0 module should have failed."); } else { utils.assertRevert(moduleV1.addModule(...params2, { from: owner })); @@ -186,7 +186,7 @@ contract("SimpleUpgrader", (accounts) => { } if (relayed) { txReceipt = await manager.relay(moduleV1, "addModule", params1, wallet, [owner]); - const event = await utils.getEvent(txReceipt, relayer, "TransactionExecuted"); + const event = await utils.getEvent(txReceipt, relayerV1, "TransactionExecuted"); assert.isTrue(event.args.success, "Relayed tx should only have succeeded if an OnlyOwnerModule was used"); } else { const tx = await moduleV1.addModule(...params1, { from: owner }); @@ -196,7 +196,7 @@ contract("SimpleUpgrader", (accounts) => { // test event ordering const event = await utils.getEvent(txReceipt, wallet, "AuthorisedModule"); const upgraderAuthorisedLogIndex = event.args.findIndex((a) => a.module === upgrader1.address && a.value === true); - const upgraderUnauthorisedLogIndex = logs.findIndex((a) => a.module === upgrader1.address && a.value === false); + const upgraderUnauthorisedLogIndex = event.args.findIndex((a) => a.module === upgrader1.address && a.value === false); assert.isBelow(upgraderAuthorisedLogIndex, upgraderUnauthorisedLogIndex, "AuthorisedModule(upgrader, false) should come after AuthorisedModule(upgrader, true)"); diff --git a/test/tokenExchanger.js b/test/tokenExchanger.js index aa672989d..d51b735e9 100644 --- a/test/tokenExchanger.js +++ b/test/tokenExchanger.js @@ -3,6 +3,7 @@ const ethers = require("ethers"); const { parseEther } = require("ethers").utils; const { AddressZero } = require("ethers").constants; +const BN = require("bn.js"); // Paraswap const AugustusSwapper = artifacts.require("AugustusSwapper"); @@ -303,8 +304,8 @@ contract("TokenExchanger", (accounts) => { txR = await (await exchanger[method](...params, { gasLimit: 2000000, from: owner })).wait(); } - const event = await utils.getEvent(txR, exchanger, "TokenExchanged"); - const destAmount = event.args.destAmount; + const event = await getEvent(txR, exchanger, "TokenExchanged"); + const { destAmount } = event.args; const afterFrom = await getBalance(fromToken, _wallet); const afterTo = await getBalance(toToken, _wallet); @@ -366,7 +367,7 @@ contract("TokenExchanger", (accounts) => { variableAmount, }); await tokenPriceRegistry.setTradableForTokenList([toToken], [false]); - await assertrevert(exchanger[method](...params, { gasLimit: 2000000, from: owner }), "TE: Token not tradable"); + await assertRevert(exchanger[method](...params, { gasLimit: 2000000, from: owner }), "TE: Token not tradable"); await tokenPriceRegistry.setTradableForTokenList([toToken], [true]); }); @@ -426,7 +427,7 @@ contract("TokenExchanger", (accounts) => { }); it(`calls ${method} successfully with a pre-existing infinite allowance`, async () => { // Make the wallet grant an infinite allowance to the Paraswap proxy - const infiniteAllowance = new BigNumber(2).pow(256).sub(1); + const infiniteAllowance = new BN(2).pow(256).sub(1); await testTradeWithPreExistingAllowance(infiniteAllowance); }); } diff --git a/test/transferManager.js b/test/transferManager.js index 3b538d27d..f8e835464 100644 --- a/test/transferManager.js +++ b/test/transferManager.js @@ -2,11 +2,9 @@ const ethers = require("ethers"); const chai = require("chai"); -const { BigNumber } = require("bignumber.js"); const BN = require("bn.js"); const bnChai = require("bn-chai"); -const { assert } = chai; const { expect } = chai; chai.use(bnChai(BN)); @@ -23,6 +21,7 @@ const RelayerManager = artifacts.require("RelayerManager"); const TransferManager = artifacts.require("TransferManager"); const LegacyTransferManager = require("../build-legacy/v1.6.0/TransferManager"); const LegacyTokenPriceProvider = require("../build-legacy/v1.6.0/TokenPriceProvider"); + const ERC20 = artifacts.require("TestERC20"); const WETH = artifacts.require("WETH9"); const TestContract = artifacts.require("TestContract"); @@ -66,7 +65,7 @@ contract("TransferManager", (accounts) => { before(async () => { weth = await WETH.new(); - const registry = await Registry.new(); + registry = await Registry.new(); priceProvider = await LegacyTokenPriceProvider.new(ethers.constants.AddressZero); await priceProvider.addManager(infrastructure); @@ -132,7 +131,7 @@ contract("TransferManager", (accounts) => { erc20 = await ERC20.new([infrastructure, wallet.address], 10000000, decimals); // TOKN contract with 10M tokens (5M TOKN for wallet and 5M TOKN for account[0]) await tokenPriceRegistry.setPriceForTokenList([erc20.address], [tokenRate.toString()]); - await wallet.send(new BigNumber("1000000000000000000")); + await wallet.send(new BN("1000000000000000000")); }); async function getEtherValue(amount, token) { @@ -275,7 +274,7 @@ contract("TransferManager", (accounts) => { const existingWallet = await BaseWallet.at(proxy.address); await existingWallet.init(owner, [previousTransferManager.address]); - await existingWallet.send(new BigNumber("100000000")); + await existingWallet.send(new BN("100000000")); // change the limit await previousTransferManager.changeLimit(existingWallet.address, 4000000, { from: owner }); @@ -345,7 +344,7 @@ contract("TransferManager", (accounts) => { }); it("should return the correct unspent daily limit amount", async () => { - await wallet.send(new BigNumber(ETH_LIMIT)); + await wallet.send(new BN(ETH_LIMIT)); const transferAmount = ETH_LIMIT - 100; await transferManager.transferToken(wallet.address, ETH_TOKEN, recipient, transferAmount, ZERO_BYTES32, { from: owner }); const { _unspent } = await transferManager.getDailyUnspent(wallet.address); @@ -353,7 +352,7 @@ contract("TransferManager", (accounts) => { }); it("should return the correct spent daily limit amount", async () => { - await wallet.send(new BigNumber(ETH_LIMIT)); + await wallet.send(new BN(ETH_LIMIT)); // Transfer 100 wei const tx = await transferManager.transferToken(wallet.address, ETH_TOKEN, recipient, 100, ZERO_BYTES32, { from: owner }); const timestamp = await manager.getTimestamp(tx.receipt.block); @@ -366,7 +365,7 @@ contract("TransferManager", (accounts) => { }); it("should return 0 if the entire daily limit amount has been spent", async () => { - await wallet.send(new BigNumber(ETH_LIMIT)); + await wallet.send(new BN(ETH_LIMIT)); await transferManager.transferToken(wallet.address, ETH_TOKEN, recipient, ETH_LIMIT, ZERO_BYTES32, { from: owner }); const { _unspent } = await transferManager.getDailyUnspent(wallet.address); assert.equal(_unspent.toNumber(), 0); @@ -732,7 +731,7 @@ contract("TransferManager", (accounts) => { const fun = consumer === contract.address ? "setStateAndPayToken" : "setStateAndPayTokenWithConsumer"; const token = wrapEth ? weth : erc20; const dataToTransfer = contract.contract.methods[fun]([state, token.address, amount]).encodeABI(); - const unspentBefore = await transferModule.getDailyUnspent(wallet.address); + const unspentBefore = await transferManager.getDailyUnspent(wallet.address); const params = [wallet.address] .concat(wrapEth ? [] : [erc20.address]) .concat([consumer, amount, contract.address, dataToTransfer]); diff --git a/test/upgraderToVersionManager.js b/test/upgraderToVersionManager.js index 59756c204..05324694d 100644 --- a/test/upgraderToVersionManager.js +++ b/test/upgraderToVersionManager.js @@ -22,7 +22,6 @@ const { assertRevert } = require("../utils/utilities.js"); const RelayManager = require("../utils/relay-manager"); contract("UpgraderToVersionManager", (accounts) => { - const manager = new RelayManager(); const owner = accounts[1]; diff --git a/test/versionManager.js b/test/versionManager.js index 5252d5850..b9724dfbc 100644 --- a/test/versionManager.js +++ b/test/versionManager.js @@ -1,5 +1,6 @@ /* global artifacts */ const ethers = require("ethers"); + const GuardianManager = artifacts.require("GuardianManager"); const LockStorage = artifacts.require("LockStorage"); const GuardianStorage = artifacts.require("GuardianStorage"); @@ -19,7 +20,6 @@ const { assertRevert } = require("../utils/utilities.js"); const RelayManager = require("../utils/relay-manager"); contract("VersionManager", (accounts) => { - const manager = new RelayManager(accounts); const owner = accounts[1]; diff --git a/utils/defi-deployer.js b/utils/defi-deployer.js index c9ffaac53..64f4ac31a 100644 --- a/utils/defi-deployer.js +++ b/utils/defi-deployer.js @@ -2,7 +2,7 @@ const { parseEther, formatBytes32String } = require("ethers").utils; const web3 = require("web3"); -const { BigNumber } = require("bignumber.js"); +const BN = require("bn.js"); const UniswapFactory = require("../lib/uniswap/UniswapFactory"); const UniswapExchange = require("../lib/uniswap/UniswapExchange"); @@ -21,15 +21,15 @@ const CdpManager = artifacts.require("DssCdpManager"); const GemJoin = artifacts.require("GemJoin"); const DaiJoin = artifacts.require("DaiJoin"); -const RAY = new BigNumber("1000000000000000000000000000"); // 10**27 -const WAD = new BigNumber("1000000000000000000"); // 10**18 -const RAD = RAY.times(WAD); +const RAY = new BN("1000000000000000000000000000"); // 10**27 +const WAD = new BN("1000000000000000000"); // 10**18 +const RAD = RAY.mul(WAD); const USD_PER_DAI = RAY; // 1 DAI = 1 USD -const USD_PER_ETH = WAD.times(100); // 1 ETH = 100 USD -const USD_PER_MKR = WAD.times(400); // 1 MKR = 400 USD -const ETH_PER_MKR = WAD.times(USD_PER_MKR).div(USD_PER_ETH); // 1 MKR = 4 ETH -const ETH_PER_DAI = WAD.times(USD_PER_DAI).div(RAY).times(WAD).div(USD_PER_ETH); // 1 DAI = 0.01 ETH -const MAT = RAY.times(3).div(2); // collateralizsation ratio = 150% +const USD_PER_ETH = WAD.muln(100); // 1 ETH = 100 USD +const USD_PER_MKR = WAD.muln(400); // 1 MKR = 400 USD +const ETH_PER_MKR = WAD.mul(USD_PER_MKR).div(USD_PER_ETH); // 1 MKR = 4 ETH +const ETH_PER_DAI = WAD.mul(USD_PER_DAI).div(RAY).mul(WAD).div(USD_PER_ETH); // 1 DAI = 0.01 ETH +const MAT = RAY.muln(3).divn(2); // collateralizsation ratio = 150% module.exports = { RAY, @@ -46,7 +46,7 @@ module.exports = { await uniswapFactory.createExchange(token.address, { from: infrastructure }); const uniswapExchangeAddress = await uniswapFactory.getExchange(token.address); const tokenExchange = await UniswapExchange.at(uniswapExchangeAddress); - const tokenLiquidity = ethLiquidity.times(WAD).div(ethPerToken[i]); + const tokenLiquidity = ethLiquidity.mul(WAD).div(ethPerToken[i]); await token["mint(address,uint256)"](infrastructure, tokenLiquidity); await token.approve(tokenExchange.address, tokenLiquidity, { from: infrastructure }); const { timestamp } = await web3.eth.getBlock("latest"); @@ -147,7 +147,7 @@ module.exports = { // Allow daiJoin to mint DAI await dai.rely(daiJoin.address); // Give daiJoin some internal DAI in the vat - await vat.suck(daiJoin.address, daiJoin.address, RAD.times(1000000)); + await vat.suck(daiJoin.address, daiJoin.address, RAD.muln(1000000)); // Deploy and setup SCD to MCD Migration const migration = await ScdMcdMigration.new( diff --git a/utils/utilities.js b/utils/utilities.js index da7393659..55f4b1fcf 100644 --- a/utils/utilities.js +++ b/utils/utilities.js @@ -3,7 +3,9 @@ const ethers = require("ethers"); const ethUtil = require("ethereumjs-util"); const BN = require("bn.js"); const fs = require("fs"); +const chai = require("chai"); +const { expect } = chai; const ETH_TOKEN = "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"; module.exports = { @@ -102,7 +104,7 @@ module.exports = { async getEvent(txReceipt, emitter, eventName) { const receipt = await web3.eth.getTransactionReceipt(txReceipt.transactionHash); const logs = await this.decodeLogs(receipt.logs, emitter, eventName); - const event = logs.find(e => e.event === eventName); + const event = logs.find((e) => e.event === eventName); return event; }, @@ -110,34 +112,33 @@ module.exports = { // This decodes longs for a single event type, and returns a decoded object in // the same form truffle-contract uses on its receipts decodeLogs(logs, emitter, eventName) { - let abi; let address; - - abi = emitter.abi; + + const { abi } = emitter; try { address = emitter.address; } catch (e) { address = null; } - let eventABI = abi.filter(x => x.type === 'event' && x.name === eventName); - if (eventABI.length === 0) { + const eventABIs = abi.filter((x) => x.type === "event" && x.name === eventName); + if (eventABIs.length === 0) { throw new Error(`No ABI entry for event '${eventName}'`); - } else if (eventABI.length > 1) { + } else if (eventABIs.length > 1) { throw new Error(`Multiple ABI entries for event '${eventName}', only uniquely named events are supported`); } - eventABI = eventABI[0]; + const [eventABI] = eventABIs; // The first topic will equal the hash of the event signature - const eventSignature = `${eventName}(${eventABI.inputs.map(input => input.type).join(',')})`; + const eventSignature = `${eventName}(${eventABI.inputs.map((input) => input.type).join(",")})`; const eventTopic = web3.utils.sha3(eventSignature); // Only decode events of type 'EventName' return logs - .filter(log => log.topics.length > 0 && log.topics[0] === eventTopic && (!address || log.address === address)) - .map(log => web3.eth.abi.decodeLog(eventABI.inputs, log.data, log.topics.slice(1))) - .map(decoded => ({ event: eventName, args: decoded })); + .filter((log) => log.topics.length > 0 && log.topics[0] === eventTopic && (!address || log.address === address)) + .map((log) => web3.eth.abi.decodeLog(eventABI.inputs, log.data, log.topics.slice(1))) + .map((decoded) => ({ event: eventName, args: decoded })); }, versionFingerprint(modules) { @@ -189,12 +190,12 @@ module.exports = { }, async getChainId() { - // TODO: The web3 version packaged with truffle is 1.2.1 while the getChainId logic - // we need here was introduced in 1.2.2 + // TODO: The web3 version packaged with truffle is 1.2.1 while the getChainId logic + // we need here was introduced in 1.2.2 // Uncomment when https://github.com/trufflesuite/truffle/issues/2688#issuecomment-709879003 is resolved - //const chainId = await web3.eth.getChainId(); - //console.log("chainId", chainId) - //return chainId; + // const chainId = await web3.eth.getChainId(); + // console.log("chainId", chainId) + // return chainId; return 1895; }, @@ -209,7 +210,7 @@ module.exports = { async increaseTime(seconds) { const client = await this.web3GetClient(); - console.log("client", client) + console.log("client", client); const p = new Promise((resolve, reject) => { if (client.indexOf("TestRPC") === -1) { console.warning("Client is not ganache-cli and cannot forward time"); @@ -259,14 +260,14 @@ module.exports = { await promise; assert.fail(`Transaction succeeded, but expected error ${revertMessage}`); } catch (err) { - ({ reason } = err); - if (reason) { - assert.equal(reason, revertMessage); - } else if (!revertMessage) { - assert.notEqual(err.hijackedStack.indexOf("VM Exception while processing transaction: revert"), -1); - } else { - assert.notEqual(err.hijackedStack.indexOf(revertMessage), -1); - } + ({ reason } = err); + if (reason) { + assert.equal(reason, revertMessage); + } else if (!revertMessage) { + assert.notEqual(err.hijackedStack.indexOf("VM Exception while processing transaction: revert"), -1); + } else { + assert.notEqual(err.hijackedStack.indexOf(revertMessage), -1); + } } }, From 1439cf34460e9e1e14e23b3e90506e094c9f5a54 Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Thu, 22 Oct 2020 17:48:36 +0300 Subject: [PATCH 049/113] Pull docker images for solc 0.5.4 and 0.6.12 --- .circleci/config.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 63efd98fd..d9191f3b5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -28,6 +28,12 @@ step_setup_global_packages: &step_setup_global_packages name: "Set up global packages" command: | npm install +step_pull_solc_docker: &step_pull_solc_docker + run: + name: "Pull solc docker images" + command: | + docker pull ethereum/solc:0.5.4 + docker pull ethereum/solc:0.6.12 step_setup_slither: &step_setup_slither run: name: "Setup slither analyser https://github.com/crytic/slither" @@ -46,6 +52,9 @@ jobs: steps: - checkout - <<: *step_restore_cache + - setup_remote_docker: + version: 19.03.13 + - <<: *step_pull_solc_docker - <<: *step_setup_global_packages - run: name: "Lint Solidity contracts" @@ -86,6 +95,9 @@ jobs: steps: - checkout - <<: *step_restore_cache + - setup_remote_docker: + version: 19.03.13 + - <<: *step_pull_solc_docker - <<: *step_setup_global_packages - <<: *step_setup_slither - <<: *step_setup_solc_select From 0c32b98a979376aaccd35ddbb229ea94035fc5f7 Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Thu, 22 Oct 2020 18:17:05 +0300 Subject: [PATCH 050/113] Fix a BN issue --- test/makerV2Manager_invest.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/makerV2Manager_invest.js b/test/makerV2Manager_invest.js index d7833220a..abda80b81 100644 --- a/test/makerV2Manager_invest.js +++ b/test/makerV2Manager_invest.js @@ -16,7 +16,7 @@ const MakerRegistry = artifacts.require("MakerRegistry"); const RelayerManager = artifacts.require("RelayerManager"); const VersionManager = artifacts.require("VersionManager"); -const DAI_SENT = WAD.div(100000000); +const DAI_SENT = WAD.divn(100000000); contract("MakerV2Invest", (accounts) => { const manager = new RelayManager(); From d5294ccfc4a51d6eb63713aff76c70f295c6c750 Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Fri, 23 Oct 2020 10:39:19 +0300 Subject: [PATCH 051/113] Test fixing post rebase --- test/approvedTransfer.js | 5 ++-- test/argentWalletDetector.js | 49 +++++++++++++++++----------------- test/baseWallet.js | 2 +- test/compoundManager_invest.js | 11 ++++---- test/makerV2Manager_invest.js | 4 +-- test/makerV2Manager_loan.js | 36 ++++++++++++------------- test/recoveryManager.js | 13 +++------ utils/defi-deployer.js | 4 +-- utils/utilities.js | 3 +-- 9 files changed, 62 insertions(+), 65 deletions(-) diff --git a/test/approvedTransfer.js b/test/approvedTransfer.js index 32d65a841..861e35ffb 100644 --- a/test/approvedTransfer.js +++ b/test/approvedTransfer.js @@ -17,7 +17,8 @@ const TestContract = artifacts.require("TestContract"); const TestLimitFeature = artifacts.require("TestLimitFeature"); const RelayManager = require("../utils/relay-manager"); -const { sortWalletByAddress, parseRelayReceipt, ETH_TOKEN, increaseTime, getBalance, assertRevert } = require("../utils/utilities.js"); +const { sortWalletByAddress, parseRelayReceipt, ETH_TOKEN, getBalance, assertRevert } = require("../utils/utilities.js"); +const utils = require("../utils/utilities.js"); const ZERO_BYTES32 = ethers.constants.HashZero; @@ -105,7 +106,7 @@ contract("ApprovedTransfer", (accounts) => { await guardianManager.addGuardian(wallet.address, guardian, { from: owner }); } - await increaseTime(30); + await utils.increaseTime(30); for (let i = 1; i < guardians.length; i += 1) { await guardianManager.confirmGuardianAddition(wallet.address, guardians[i]); } diff --git a/test/argentWalletDetector.js b/test/argentWalletDetector.js index 5c5245b82..a0df2a9fb 100644 --- a/test/argentWalletDetector.js +++ b/test/argentWalletDetector.js @@ -1,4 +1,5 @@ /* global artifacts */ +const { expect, assert } = require("chai"); const ethers = require("ethers"); const ArgentWalletDetector = artifacts.require("ArgentWalletDetector"); @@ -25,9 +26,9 @@ describe("ArgentWalletDetector", () => { before(async () => { implementation1 = await BaseWallet.new(); implementation2 = await BaseWallet.new(); - proxy1 = await Proxy.new(implementation1.contractAddress); - proxy2 = await Proxy.new(implementation2.contractAddress); - argentCode = ethers.utils.keccak256(proxy1._contract.deployedBytecode); + proxy1 = await Proxy.new(implementation1.address); + proxy2 = await Proxy.new(implementation2.address); + argentCode = ethers.utils.keccak256(Proxy.deployedBytecode); }); beforeEach(async () => { @@ -37,22 +38,22 @@ describe("ArgentWalletDetector", () => { describe("add info", () => { it("should deploy with codes and implementations", async () => { const c = [argentCode, RANDOM_CODE]; - const i = [implementation1.contractAddress, implementation2.contractAddress]; + const i = [implementation1.address, implementation2.address]; detector = await ArgentWalletDetector.new(c, i); const implementations = await detector.getImplementations(); - assert.equal(implementations[0], implementation1.contractAddress, "should have added first implementation"); - assert.equal(implementations[1], implementation2.contractAddress, "should have added second implementation"); + assert.equal(implementations[0], implementation1.address, "should have added first implementation"); + assert.equal(implementations[1], implementation2.address, "should have added second implementation"); const codes = await detector.getCodes(); assert.equal(codes[0], argentCode, "should have added first code"); assert.equal(codes[1], RANDOM_CODE, "should have added second code"); }); it("should add implementations", async () => { - await detector.addImplementation(implementation1.contractAddress); - await detector.addImplementation(implementation2.contractAddress); + await detector.addImplementation(implementation1.address); + await detector.addImplementation(implementation2.address); const implementations = await detector.getImplementations(); - assert.equal(implementations[0], implementation1.contractAddress, "should have added first implementation"); - assert.equal(implementations[1], implementation2.contractAddress, "should have added second implementation"); + assert.equal(implementations[0], implementation1.address, "should have added first implementation"); + assert.equal(implementations[1], implementation2.address, "should have added second implementation"); }); it("should add codes", async () => { @@ -64,44 +65,44 @@ describe("ArgentWalletDetector", () => { }); it("should not add an existing implementation", async () => { - await detector.addImplementation(implementation1.contractAddress); - const tx = await detector.addImplementation(implementation1.contractAddress); - const txReceipt = await detector.verboseWaitForTransaction(tx); - assert.isFalse(await utils.hasEvent(txReceipt, detector, "ImplementationAdded"), "should not have generated ImplementationAdded event"); + await detector.addImplementation(implementation1.address); + const tx = await detector.addImplementation(implementation1.address); + const event = await utils.getEvent(tx.receipt, detector, "ImplementationAdded"); + expect(event).to.not.exist; }); it("should not add an existing code", async () => { await detector.addCode(argentCode); const tx = await detector.addCode(argentCode); - const txReceipt = await detector.verboseWaitForTransaction(tx); - assert.isFalse(await utils.hasEvent(txReceipt, detector, "CodeAdded"), "should not have generated CodeAdded event"); + const event = await utils.getEvent(tx.receipt, detector, "CodeAdded"); + expect(event).to.not.exist; }); it("should fail to add an empty code", async () => { - await assert.revertWith(detector.addCode(ZERO_BYTES32), EMPTY_CODE_MSG); + await utils.assertRevert(detector.addCode(ZERO_BYTES32), EMPTY_CODE_MSG); }); it("should fail to add an empty implementation", async () => { - await assert.revertWith(detector.addImplementation(ZERO_ADDRESS), EMPTY_IMPL_MSG); + await utils.assertRevert(detector.addImplementation(ZERO_ADDRESS), EMPTY_IMPL_MSG); }); it("should add code and implementation from a wallet", async () => { - await detector.addCodeAndImplementationFromWallet(proxy1.contractAddress); - const isArgent = await detector.isArgentWallet(proxy1.contractAddress); + await detector.addCodeAndImplementationFromWallet(proxy1.address); + const isArgent = await detector.isArgentWallet(proxy1.address); assert.isTrue(isArgent, "should return true for an Argent wallet"); }); it("should return false when the code is not correct", async () => { - await detector.addImplementation(implementation1.contractAddress); + await detector.addImplementation(implementation1.address); await detector.addCode(RANDOM_CODE); - const isArgent = await detector.isArgentWallet(proxy1.contractAddress); + const isArgent = await detector.isArgentWallet(proxy1.address); assert.isFalse(isArgent, "should return false when the code is not correct"); }); it("should return false when the implementation is not correct", async () => { - await detector.addImplementation(implementation1.contractAddress); + await detector.addImplementation(implementation1.address); await detector.addCode(argentCode); - const isArgent = await detector.isArgentWallet(proxy2.contractAddress); + const isArgent = await detector.isArgentWallet(proxy2.address); assert.isFalse(isArgent, "should return false when the implementation is not correct"); }); }); diff --git a/test/baseWallet.js b/test/baseWallet.js index 1118268c0..6a935c326 100644 --- a/test/baseWallet.js +++ b/test/baseWallet.js @@ -199,7 +199,7 @@ contract("BaseWallet", (accounts) => { // trying to execute static call delegated to module1 (it should fail) const walletAsModule = await TestFeature.at(wallet.address); - await assertRevert(walletAsModule.contract.methods.getBoolean(), "BW: must be an authorised module for static call"); + await assertRevert(walletAsModule.getBoolean(), "BW: must be an authorised module for static call"); }); }); }); diff --git a/test/compoundManager_invest.js b/test/compoundManager_invest.js index b13028f9b..68e3e3d62 100644 --- a/test/compoundManager_invest.js +++ b/test/compoundManager_invest.js @@ -26,6 +26,7 @@ const Comptroller = artifacts.require("Comptroller"); const InterestModel = artifacts.require("WhitePaperInterestRateModel"); const CEther = artifacts.require("CEther"); const CErc20 = artifacts.require("CErc20"); +const CToken = artifacts.require("CToken"); const CompoundRegistry = artifacts.require("CompoundRegistry"); const WAD = new BN("1000000000000000000"); // 10**18 @@ -33,7 +34,7 @@ const ETH_EXCHANGE_RATE = new BN("200000000000000000000000000"); const ERC20 = artifacts.require("TestERC20"); -const { ETH_TOKEN, increaseTime } = require("../utils/utilities.js"); +const { ETH_TOKEN } = require("../utils/utilities.js"); const RelayManager = require("../utils/relay-manager"); contract("Invest Manager with Compound", (accounts) => { @@ -175,18 +176,19 @@ contract("Invest Manager with Compound", (accounts) => { let tx; // generate borrows to create interests await comptroller.enterMarkets([cEther.address, cToken.address], { from: borrower }); + if (investInEth) { await token.approve(cToken.address, web3.utils.toWei("20"), { from: borrower }); await cToken.mint(web3.utils.toWei("20"), { from: borrower }); tx = await cEther.borrow(web3.utils.toWei("0.1"), { from: borrower }); - await utils.hasEvent(tx.receipt, cToken, "Borrow"); + await utils.hasEvent(tx.receipt, CToken, "Borrow"); } else { await cEther.mint({ value: web3.utils.toWei("2"), from: borrower }); tx = await cToken.borrow(web3.utils.toWei("0.1"), { from: borrower }); - await utils.hasEvent(tx.receipt, cToken, "Borrow"); + await utils.hasEvent(tx.receipt, CToken, "Borrow"); } // increase time to accumulate interests - await increaseTime(3600 * 24 * days); + await utils.increaseTime(3600 * 24 * days); await cToken.accrueInterest(); await cEther.accrueInterest(); } @@ -209,7 +211,6 @@ contract("Invest Manager with Compound", (accounts) => { txReceipt = tx.receipt; } - console.log("txReceipt", txReceipt); await utils.hasEvent(txReceipt, investManager, "InvestmentAdded"); await accrueInterests(days, investInEth); diff --git a/test/makerV2Manager_invest.js b/test/makerV2Manager_invest.js index abda80b81..91fc869e7 100644 --- a/test/makerV2Manager_invest.js +++ b/test/makerV2Manager_invest.js @@ -1,6 +1,7 @@ /* global artifacts */ const ethers = require("ethers"); +const BN = require("bn.js"); const { deployMaker, deployUniswap, WAD, ETH_PER_DAI, ETH_PER_MKR, } = require("../utils/defi-deployer"); @@ -16,13 +17,12 @@ const MakerRegistry = artifacts.require("MakerRegistry"); const RelayerManager = artifacts.require("RelayerManager"); const VersionManager = artifacts.require("VersionManager"); -const DAI_SENT = WAD.divn(100000000); - contract("MakerV2Invest", (accounts) => { const manager = new RelayManager(); const infrastructure = accounts[0]; const owner = accounts[1]; + const DAI_SENT = WAD.div(new BN(100000000)); let wallet; let walletImplementation; diff --git a/test/makerV2Manager_loan.js b/test/makerV2Manager_loan.js index 648ba137b..c40ea674e 100644 --- a/test/makerV2Manager_loan.js +++ b/test/makerV2Manager_loan.js @@ -10,7 +10,7 @@ const { deployMaker, deployUniswap, RAY, ETH_PER_DAI, ETH_PER_MKR, } = require("../utils/defi-deployer"); -const { parseEther, formatBytes32String } = ethers.utils; +const { formatBytes32String } = ethers.utils; const { AddressZero } = ethers.constants; const RelayManager = require("../utils/relay-manager"); @@ -139,8 +139,8 @@ contract("MakerV2Loan", (accounts) => { await wallet.init(owner, [versionManager.address]); await versionManager.upgradeWallet(wallet.address, await versionManager.lastVersion(), { from: owner }); walletAddress = wallet.address; - await wallet.send(parseEther("2.0")); - await dai["mint(address,uint256)"](walletAddress, parseEther("10")); + await wallet.send(web3.utils.toWei("2.0")); + await dai["mint(address,uint256)"](walletAddress, web3.utils.toWei("10")); }); async function getTestAmounts(tokenAddress) { @@ -287,14 +287,14 @@ contract("MakerV2Loan", (accounts) => { it("should add collateral (blockchain tx)", async () => { const loanId = await testOpenLoan({ collateralAmount, daiAmount, relayed: false }); await testChangeCollateral({ - loanId, collateralAmount: parseEther("0.010"), add: true, relayed: false, + loanId, collateralAmount: web3.utils.toWei("0.010"), add: true, relayed: false, }); }); it("should add collateral (relayed tx)", async () => { const loanId = await testOpenLoan({ collateralAmount, daiAmount, relayed: true }); await testChangeCollateral({ - loanId, collateralAmount: parseEther("0.010"), add: true, relayed: true, + loanId, collateralAmount: web3.utils.toWei("0.010"), add: true, relayed: true, }); }); @@ -305,7 +305,7 @@ contract("MakerV2Loan", (accounts) => { await wallet2.init(owner2, [versionManager.address]); await assertRevert( - makerV2.addCollateral(wallet2.address, loanId, ETH_TOKEN, parseEther("0.010"), { from: owner2 }), + makerV2.addCollateral(wallet2.address, loanId, ETH_TOKEN, web3.utils.toWei("0.010"), { from: owner2 }), "MV2: unauthorized loanId", ); }); @@ -313,14 +313,14 @@ contract("MakerV2Loan", (accounts) => { it("should remove collateral (blockchain tx)", async () => { const loanId = await testOpenLoan({ collateralAmount, daiAmount, relayed: false }); await testChangeCollateral({ - loanId, collateralAmount: parseEther("0.010"), add: false, relayed: false, + loanId, collateralAmount: web3.utils.toWei("0.010"), add: false, relayed: false, }); }); it("should remove collateral (relayed tx)", async () => { const loanId = await testOpenLoan({ collateralAmount, daiAmount, relayed: true }); await testChangeCollateral({ - loanId, collateralAmount: parseEther("0.010"), add: false, relayed: true, + loanId, collateralAmount: web3.utils.toWei("0.010"), add: false, relayed: true, }); }); @@ -339,7 +339,7 @@ contract("MakerV2Loan", (accounts) => { await wallet2.init(owner2, [versionManager.address]); await assertRevert( - makerV2.removeCollateral(wallet2.address, loanId, ETH_TOKEN, parseEther("0.010"), { from: owner2 }), + makerV2.removeCollateral(wallet2.address, loanId, ETH_TOKEN, web3.utils.toWei("0.010"), { from: owner2 }), "MV2: unauthorized loanId", ); }); @@ -388,14 +388,14 @@ contract("MakerV2Loan", (accounts) => { it("should increase debt (blockchain tx)", async () => { const loanId = await testOpenLoan({ collateralAmount, daiAmount, relayed: false }); await testChangeDebt({ - loanId, daiAmount: parseEther("0.5"), add: true, relayed: false, + loanId, daiAmount: web3.utils.toWei("0.5"), add: true, relayed: false, }); }); it("should increase debt (relayed tx)", async () => { const loanId = await testOpenLoan({ collateralAmount, daiAmount, relayed: true }); await testChangeDebt({ - loanId, daiAmount: parseEther("0.5"), add: true, relayed: true, + loanId, daiAmount: web3.utils.toWei("0.5"), add: true, relayed: true, }); }); @@ -406,7 +406,7 @@ contract("MakerV2Loan", (accounts) => { await wallet2.init(owner2, [versionManager.address]); await assertRevert( - makerV2.addDebt(wallet2.address, loanId, ETH_TOKEN, parseEther("0.010"), { from: owner2 }), + makerV2.addDebt(wallet2.address, loanId, ETH_TOKEN, web3.utils.toWei("0.010"), { from: owner2 }), "MV2: unauthorized loanId", ); }); @@ -414,14 +414,14 @@ contract("MakerV2Loan", (accounts) => { async function testRepayDebt({ relayed }) { const { collateralAmount, daiAmount: daiAmount_ } = await getTestAmounts(ETH_TOKEN); - const daiAmount = daiAmount_.add(parseEther("0.3")); + const daiAmount = daiAmount_.add(web3.utils.toWei("0.3")); const loanId = await testOpenLoan({ collateralAmount, daiAmount, relayed }); await increaseTime(3); // wait 3 seconds const beforeDAI = await dai.balanceOf(wallet.address); const beforeETH = await getBalance(wallet.address); await testChangeDebt({ - loanId, daiAmount: parseEther("0.2"), add: false, relayed, + loanId, daiAmount: web3.utils.toWei("0.2"), add: false, relayed, }); const afterDAI = await dai.balanceOf(wallet.address); @@ -456,7 +456,7 @@ contract("MakerV2Loan", (accounts) => { await wallet2.init(owner2, [versionManager.address]); await assertRevert( - makerV2.removeDebt(wallet2.address, loanId, ETH_TOKEN, parseEther("0.010"), { from: owner2 }), + makerV2.removeDebt(wallet2.address, loanId, ETH_TOKEN, web3.utils.toWei("0.010"), { from: owner2 }), "MV2: unauthorized loanId", ); }); @@ -693,7 +693,7 @@ contract("MakerV2Loan", (accounts) => { if (withBatVault) { // Open a BAT vault with the old MakerV2 feature const batTestAmounts = await getTestAmounts(bat.address); - await bat["mint(address,uint256)"](walletAddress, batTestAmounts.collateralAmount.add(parseEther("0.01"))); + await bat["mint(address,uint256)"](walletAddress, batTestAmounts.collateralAmount.add(web3.utils.toWei("0.01"))); loanId2 = await testOpenLoan({ collateralAmount: batTestAmounts.collateralAmount, daiAmount: batTestAmounts.daiAmount, @@ -721,7 +721,7 @@ contract("MakerV2Loan", (accounts) => { // Make sure that the vaults can be manipulated from the upgraded feature await testChangeCollateral({ loanId: loanId1, - collateralAmount: parseEther("0.010"), + collateralAmount: web3.utils.toWei("0.010"), add: true, relayed, makerV2Manager: upgradedMakerV2, @@ -731,7 +731,7 @@ contract("MakerV2Loan", (accounts) => { if (withBatVault) { await testChangeCollateral({ loanId: loanId2, - collateralAmount: parseEther("0.010"), + collateralAmount: web3.utils.toWei("0.010"), add: true, relayed, collateral: bat, diff --git a/test/recoveryManager.js b/test/recoveryManager.js index 153e02920..8a9ffe28e 100644 --- a/test/recoveryManager.js +++ b/test/recoveryManager.js @@ -105,18 +105,13 @@ contract("RecoveryManager", (accounts) => { async function addGuardians(guardians) { // guardians can be BaseWallet or ContractWrapper objects - const guardianAddresses = guardians.map((guardian) => { - if (guardian) return guardian; - return guardian.address; - }); - - for (const address of guardianAddresses) { - await guardianManager.addGuardian(wallet.address, address, { from: owner }); + for (const guardian of guardians) { + await guardianManager.addGuardian(wallet.address, guardian, { from: owner }); } await increaseTime(30); - for (let i = 1; i < guardianAddresses.length; i += 1) { - await guardianManager.confirmGuardianAddition(wallet.address, guardianAddresses[i]); + for (let i = 1; i < guardians.length; i += 1) { + await guardianManager.confirmGuardianAddition(wallet.address, guardians[i]); } const count = (await guardianManager.guardianCount(wallet.address)).toNumber(); assert.equal(count, guardians.length, `${guardians.length} guardians should be added`); diff --git a/utils/defi-deployer.js b/utils/defi-deployer.js index 64f4ac31a..3dd7d83f3 100644 --- a/utils/defi-deployer.js +++ b/utils/defi-deployer.js @@ -21,8 +21,8 @@ const CdpManager = artifacts.require("DssCdpManager"); const GemJoin = artifacts.require("GemJoin"); const DaiJoin = artifacts.require("DaiJoin"); -const RAY = new BN("1000000000000000000000000000"); // 10**27 -const WAD = new BN("1000000000000000000"); // 10**18 +const RAY = new BN(10).pow(new BN(27)); // 10**27 +const WAD = new BN(10).pow(new BN(18)); // 10**18 const RAD = RAY.mul(WAD); const USD_PER_DAI = RAY; // 1 DAI = 1 USD const USD_PER_ETH = WAD.muln(100); // 1 ETH = 100 USD diff --git a/utils/utilities.js b/utils/utilities.js index 55f4b1fcf..873efa4d2 100644 --- a/utils/utilities.js +++ b/utils/utilities.js @@ -199,7 +199,7 @@ module.exports = { return 1895; }, - web3GetClient() { + async web3GetClient() { return new Promise((resolve, reject) => { web3.eth.getNodeInfo((err, res) => { if (err !== null) return reject(err); @@ -210,7 +210,6 @@ module.exports = { async increaseTime(seconds) { const client = await this.web3GetClient(); - console.log("client", client); const p = new Promise((resolve, reject) => { if (client.indexOf("TestRPC") === -1) { console.warning("Client is not ganache-cli and cannot forward time"); From 22c63babd8d3a6b7f33685af71bf9f06c822d458 Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Fri, 23 Oct 2020 14:31:51 +0300 Subject: [PATCH 052/113] Fix MultisigExecutor and multisig contract tests --- test/multisig.js | 42 ++++++++++++++++++++++++--------------- utils/multisigexecutor.js | 20 ++++++++----------- 2 files changed, 34 insertions(+), 28 deletions(-) diff --git a/test/multisig.js b/test/multisig.js index 1fbc51d7f..1aabb20f8 100644 --- a/test/multisig.js +++ b/test/multisig.js @@ -1,4 +1,8 @@ /* global artifacts */ +const fs = require("fs"); +const ethers = require("ethers"); +const ethUtil = require("ethereumjs-util"); + const MultiSigWallet = artifacts.require("MultiSigWallet"); const TestRegistry = artifacts.require("TestRegistry"); @@ -42,22 +46,28 @@ contract("MultiSigWallet", (accounts) => { if (sortSigners) { sortedSigners = utilities.sortWalletByAddress(signers); } - const signHashBuffer = Buffer.from(signedData.slice(2), "hex"); - let signatures = "0x"; + const dataBuff = ethUtil.toBuffer(signedData); + const msgHashBuff = ethUtil.hashPersonalMessage(dataBuff); + + const accountsJson = JSON.parse(fs.readFileSync("./ganache-accounts.json", "utf8")); + const sigs = `0x${sortedSigners.map((signer) => { + const pkey = accountsJson.private_keys[signer.toLowerCase()]; + const sig = ethUtil.ecsign(msgHashBuff, Buffer.from(pkey, "hex")); + const signature = ethUtil.toRpcSig(sig.v, sig.r, sig.s); + const split = ethers.utils.splitSignature(signature); + let joinedSignature = ethers.utils.joinSignature(split).slice(2); - for (const signer of sortedSigners) { - let sig = await signer.signMessage(signHashBuffer); if (returnBadSignatures) { - sig += "a1"; + joinedSignature += "a1"; } - signatures += sig.slice(2); - } - return signatures; + return joinedSignature; + }).join("")}`; + return sigs; } async function executeSendSuccess(signers) { let nonce = await multisig.nonce(); - const data = reg.contract.methods.register([number]).encodeABI(); + const data = reg.contract.methods.register(number).encodeABI(); const signedData = MultisigExecutor.signHash(multisig.address, reg.address, value, data, nonce.toNumber()); const signatures = await getSignatures(signedData, signers); @@ -79,7 +89,7 @@ contract("MultiSigWallet", (accounts) => { async function executeSendFailure(signers, nonceOffset, sortSigners, returnBadSignatures, errorMessage) { let nonce = await multisig.nonce(); nonce = nonce.toNumber() + nonceOffset; - const data = reg.contract.methods.register([number]).encodeABI(); + const data = reg.contract.methods.register(number).encodeABI(); const signedData = MultisigExecutor.signHash(multisig.address, reg.address, value, data, nonce); const signatures = await getSignatures(signedData, signers, sortSigners, returnBadSignatures); @@ -89,7 +99,7 @@ contract("MultiSigWallet", (accounts) => { async function getMultiSigParams(functioName, params) { const nonce = await multisig.nonce(); - const data = multisig.contract.methods[functioName]([...params]).encodeABI(); + const data = multisig.contract.methods[functioName](...params).encodeABI(); const signedData = MultisigExecutor.signHash(multisig.address, multisig.address, 0, data, nonce.toNumber()); const signatures = await getSignatures(signedData, [owner1, owner2]); return { data, signatures }; @@ -218,26 +228,26 @@ contract("MultiSigWallet", (accounts) => { }); it("should fail due to non-owner signer", async () => { - await executeSendFailure([owner, owner3], 0, "Not enough valid signatures"); + await executeSendFailure([owner, owner3], 0, true, false, "MSW: Not enough valid signatures"); }); it("should fail with fewer signers than threshold", async () => { - await executeSendFailure([owner1], 0, "MSW: Not enough signatures"); + await executeSendFailure([owner1], 0, true, false, "MSW: Not enough signatures"); }); it("should fail with one signer signing twice", async () => { - await executeSendFailure([owner1, owner1], 0, true, "MSW: Badly ordered signatures"); + await executeSendFailure([owner1, owner1], 0, true, false, "MSW: Badly ordered signatures"); }); it("should fail with signers in wrong order", async () => { let signers = utilities.sortWalletByAddress([owner1, owner2]); signers = signers.reverse(); // opposite order it should be - await executeSendFailure(signers, 0, false, "MSW: Badly ordered signatures"); + await executeSendFailure(signers, 0, false, false, "MSW: Badly ordered signatures"); }); it("should fail with the wrong nonce", async () => { const nonceOffset = 1; - await executeSendFailure([owner1, owner2], nonceOffset, true, "MSW: Not enough valid signatures"); + await executeSendFailure([owner1, owner2], nonceOffset, true, false, "MSW: Not enough valid signatures"); }); it("should fail with the wrong signature", async () => { diff --git a/utils/multisigexecutor.js b/utils/multisigexecutor.js index e7f858dbf..e5baca174 100644 --- a/utils/multisigexecutor.js +++ b/utils/multisigexecutor.js @@ -1,8 +1,6 @@ const ethers = require("ethers"); const inquirer = require("inquirer"); -const utils = require("./utilities.js"); - class MultisigExecutor { constructor(multisigWrapper, ownerWallet, autoSign = true, overrides = {}) { this._multisigWrapper = multisigWrapper; @@ -12,16 +10,14 @@ class MultisigExecutor { } async executeCall(contractWrapper, method, params) { - const { contractAddress } = contractWrapper; - // Encode the method call with its parameters const data = contractWrapper.contract.methods[method](params).encodeABI(); // Get the nonce - const nonce = (await this._multisigWrapper.contract.nonce()).toNumber(); + const nonce = (await this._multisigWrapper.nonce()).toNumber(); // Get the sign Hash - const signHash = MultisigExecutor.signHash(this._multisigWrapper.address, contractAddress, 0, data, nonce); + const signHash = MultisigExecutor.signHash(this._multisigWrapper.address, contractWrapper.address, 0, data, nonce); if (this._autoSign === true) { // Get the off chain signature @@ -33,17 +29,17 @@ class MultisigExecutor { signature = ethers.utils.joinSignature(split); // Call "execute" on the Multisig wallet with data and signatures - const executeTransaction = await this._multisigWrapper.contract.execute(contractAddress, 0, data, signature, this._overrides); + const executeTransaction = await this._multisigWrapper.execute(contractWrapper.address, 0, data, signature, this._overrides); return executeTransaction.receipt; } // Get the threshold - const threshold = (await this._multisigWrapper.contract.threshold()).toNumber(); + const threshold = (await this._multisigWrapper.threshold()).toNumber(); console.log("******* MultisigExecutor *******"); - console.log(`Signing data for transaction to ${contractWrapper._contract.contractName} located at ${contractAddress}:`); + console.log(`Signing data for transaction to ${contractWrapper._contract.contractName} located at ${contractWrapper.address}:`); console.log(`multisig: ${this._multisigWrapper.address}`); - console.log(`to: ${contractAddress}`); + console.log(`to: ${contractWrapper.address}`); console.log("value: 0"); console.log(`data: ${data}`); console.log(`nonce: ${nonce}`); @@ -69,7 +65,7 @@ class MultisigExecutor { const signatures = `0x${sortedSignatures.map((s) => s.sig.slice(2)).join("")}`; // Call "execute" on the Multisig wallet with data and signatures - const executeTransaction = await this._multisigWrapper.contract.execute(contractAddress, 0, data, signatures, this._overrides); + const executeTransaction = await this._multisigWrapper.execute(contractWrapper.address, 0, data, signatures, this._overrides); return executeTransaction.receipt; } @@ -85,7 +81,7 @@ class MultisigExecutor { ethers.utils.hexZeroPad(ethers.utils.hexlify(nonce), 32), ].map((hex) => hex.slice(2)).join("")}`; - return utils.sha3(input); + return web3.utils.sha3(input); } } From f50e6f5eee8ca8eff505e78c9050601983d3efc3 Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Fri, 23 Oct 2020 14:46:44 +0300 Subject: [PATCH 053/113] Update parseRelayReceipt to cater for when there is no error returned and therefore TransactionExecuted event returnData parameter is empty --- utils/utilities.js | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/utils/utilities.js b/utils/utilities.js index 873efa4d2..699382d3b 100644 --- a/utils/utilities.js +++ b/utils/utilities.js @@ -84,15 +84,18 @@ module.exports = { const { args } = txReceipt.logs.find((e) => e.event === "TransactionExecuted"); let errorBytes; - if (args.returnData.startsWith("0x08c379a0")) { - // Remove the encoded error signatures 08c379a0 - const noErrorSelector = `0x${args.returnData.slice(10)}`; - const errorBytesArray = ethers.utils.defaultAbiCoder.decode(["bytes"], noErrorSelector); - errorBytes = errorBytesArray[0]; // eslint-disable-line prefer-destructuring - } else { - errorBytes = args.returnData; + let error; + if (args.returnData) { + if (args.returnData.startsWith("0x08c379a0")) { + // Remove the encoded error signatures 08c379a0 + const noErrorSelector = `0x${args.returnData.slice(10)}`; + const errorBytesArray = ethers.utils.defaultAbiCoder.decode(["bytes"], noErrorSelector); + errorBytes = errorBytesArray[0]; // eslint-disable-line prefer-destructuring + } else { + errorBytes = args.returnData; + } + error = ethers.utils.toUtf8String(errorBytes); } - const error = ethers.utils.toUtf8String(errorBytes); return { success: args.success, error }; }, From 605ac48ddb655436c531ebcb1455540ec7f0872d Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Fri, 23 Oct 2020 15:28:14 +0300 Subject: [PATCH 054/113] Fix RecoveryManager tests --- test/recoveryManager.js | 130 +++++++++++++++++++--------------------- 1 file changed, 61 insertions(+), 69 deletions(-) diff --git a/test/recoveryManager.js b/test/recoveryManager.js index 8a9ffe28e..1be4eb525 100644 --- a/test/recoveryManager.js +++ b/test/recoveryManager.js @@ -1,5 +1,6 @@ /* global artifacts */ const ethers = require("ethers"); +const BN = require("bn.js"); const GuardianManager = artifacts.require("GuardianManager"); const LockManager = artifacts.require("LockManager"); @@ -13,17 +14,7 @@ const RelayerManager = artifacts.require("RelayerManager"); const VersionManager = artifacts.require("VersionManager"); const RelayManager = require("../utils/relay-manager"); -const { - ETH_TOKEN, - sortWalletByAddress, - parseRelayReceipt, - signOffchain, - getTimestamp, - increaseTime, - getNonceForRelay, - getChainId, - assertRevert -} = require("../utils/utilities.js"); +const utils = require("../utils/utilities.js"); const WRONG_SIGNATURE_NUMBER_REVERT_MSG = "RM: Wrong number of signatures"; const INVALID_SIGNATURES_REVERT_MSG = "RM: Invalid signatures"; @@ -109,7 +100,7 @@ contract("RecoveryManager", (accounts) => { await guardianManager.addGuardian(wallet.address, guardian, { from: owner }); } - await increaseTime(30); + await utils.increaseTime(30); for (let i = 1; i < guardians.length; i += 1) { await guardianManager.confirmGuardianAddition(wallet.address, guardians[i]); } @@ -119,13 +110,13 @@ contract("RecoveryManager", (accounts) => { async function createSmartContractGuardians(guardians) { const wallets = []; - let g; - for (g of guardians) { - const proxy = await Proxy.at(walletImplementation.address); + let guardian; + for (guardian of guardians) { + const proxy = await Proxy.new(walletImplementation.address); const guardianWallet = await BaseWallet.at(proxy.address); - await guardianWallet.init(g, [versionManager.address]); - await versionManager.upgradeWallet(guardianWallet.address, await versionManager.lastVersion(), { from: g }); - wallets.push(guardianWallet); + await guardianWallet.init(guardian, [versionManager.address]); + await versionManager.upgradeWallet(guardianWallet.address, await versionManager.lastVersion(), { from: guardian }); + wallets.push(guardianWallet.address); } return wallets; } @@ -133,20 +124,20 @@ contract("RecoveryManager", (accounts) => { function testExecuteRecovery(guardians) { it("should let a majority of guardians execute the recovery procedure", async () => { const majority = guardians.slice(0, Math.ceil((guardians.length) / 2)); - await manager.relay(recoveryManager, "executeRecovery", [wallet.address, newowner], wallet, sortWalletByAddress(majority)); - const timestamp = await getTimestamp(); + await manager.relay(recoveryManager, "executeRecovery", [wallet.address, newowner], wallet, utils.sortWalletByAddress(majority)); + const timestamp = await utils.getTimestamp(); const isLocked = await lockManager.isLocked(wallet.address); assert.isTrue(isLocked, "should be locked by recovery"); const recoveryConfig = await recoveryManager.getRecovery(wallet.address); assert.equal(recoveryConfig._address, newowner); - assert.closeTo(recoveryConfig._executeAfter.toNumber(), recoveryPeriod.add(timestamp).toNumber(), 1); + assert.closeTo(recoveryConfig._executeAfter.toNumber(), recoveryPeriod.add(new BN(timestamp)).toNumber(), 1); assert.equal(recoveryConfig._guardianCount, guardians.length); }); it("should not let owner execute the recovery procedure", async () => { const expectedRevertMsg = guardians.length >= 3 ? WRONG_SIGNATURE_NUMBER_REVERT_MSG : INVALID_SIGNATURES_REVERT_MSG; - await assertRevert( + await utils.assertRevert( manager.relay( recoveryManager, "executeRecovery", @@ -159,13 +150,13 @@ contract("RecoveryManager", (accounts) => { it("should not let a majority of guardians and owner execute the recovery procedure", async () => { const majority = guardians.slice(0, Math.ceil((guardians.length) / 2) - 1); - await assertRevert( + await utils.assertRevert( manager.relay( recoveryManager, "executeRecovery", [wallet.address, newowner], wallet, - [owner, ...sortWalletByAddress(majority)], + [owner, ...utils.sortWalletByAddress(majority)], ), INVALID_SIGNATURES_REVERT_MSG, ); @@ -175,13 +166,13 @@ contract("RecoveryManager", (accounts) => { it("should not let a minority of guardians execute the recovery procedure", async () => { const minority = guardians.slice(0, Math.ceil((guardians.length) / 2) - 1); - await assertRevert( + await utils.assertRevert( manager.relay( recoveryManager, "executeRecovery", [wallet.address, newowner], wallet, - sortWalletByAddress(minority), + utils.sortWalletByAddress(minority), ), WRONG_SIGNATURE_NUMBER_REVERT_MSG, ); @@ -192,7 +183,7 @@ contract("RecoveryManager", (accounts) => { function testFinalizeRecovery() { it("should let anyone finalize the recovery procedure after the recovery period", async () => { - await increaseTime(40); // moving time to after the end of the recovery period + await utils.increaseTime(40); // moving time to after the end of the recovery period await manager.relay(recoveryManager, "finalizeRecovery", [wallet.address], wallet, []); const isLocked = await lockManager.isLocked(wallet.address); assert.isFalse(isLocked, "should no longer be locked after finalization of recovery"); @@ -207,7 +198,7 @@ contract("RecoveryManager", (accounts) => { it("should not let anyone finalize the recovery procedure before the end of the recovery period", async () => { const txReceipt = await manager.relay(recoveryManager, "finalizeRecovery", [wallet.address], wallet, []); - const { success, error } = parseRelayReceipt(txReceipt); + const { success, error } = utils.parseRelayReceipt(txReceipt); assert.isFalse(success); assert.equal(error, "RM: the recovery period is not over yet"); @@ -218,12 +209,12 @@ contract("RecoveryManager", (accounts) => { function testCancelRecovery() { it("should let 2 guardians cancel the recovery procedure", async () => { - await manager.relay(recoveryManager, "cancelRecovery", [wallet.address], wallet, sortWalletByAddress([guardian1, guardian2])); + await manager.relay(recoveryManager, "cancelRecovery", [wallet.address], wallet, utils.sortWalletByAddress([guardian1, guardian2])); const isLocked = await lockManager.isLocked(wallet.address); assert.isFalse(isLocked, "should no longer be locked by recovery"); - await increaseTime(40); // moving time to after the end of the recovery period + await utils.increaseTime(40); // moving time to after the end of the recovery period const txReceipt = await manager.relay(recoveryManager, "finalizeRecovery", [wallet.address], wallet, []); - const { success, error } = parseRelayReceipt(txReceipt); + const { success, error } = utils.parseRelayReceipt(txReceipt); assert.isFalse(success); assert.equal(error, "RM: there must be an ongoing recovery"); const walletOwner = await wallet.owner(); @@ -239,9 +230,9 @@ contract("RecoveryManager", (accounts) => { await manager.relay(recoveryManager, "cancelRecovery", [wallet.address], wallet, [owner, guardian1]); const isLocked = await lockManager.isLocked(wallet.address); assert.isFalse(isLocked, "should no longer be locked by recovery"); - await increaseTime(40); // moving time to after the end of the recovery period + await utils.increaseTime(40); // moving time to after the end of the recovery period const txReceipt = await manager.relay(recoveryManager, "finalizeRecovery", [wallet.address], wallet, []); - const { success, error } = parseRelayReceipt(txReceipt); + const { success, error } = utils.parseRelayReceipt(txReceipt); assert.isFalse(success, "finalization should have failed"); assert.equal(error, "RM: there must be an ongoing recovery"); const walletOwner = await wallet.owner(); @@ -249,7 +240,7 @@ contract("RecoveryManager", (accounts) => { }); it("should not let 1 guardian cancel the recovery procedure", async () => { - await assertRevert( + await utils.assertRevert( manager.relay( recoveryManager, "cancelRecovery", @@ -264,7 +255,7 @@ contract("RecoveryManager", (accounts) => { }); it("should not let the owner cancel the recovery procedure", async () => { - await assertRevert( + await utils.assertRevert( manager.relay( recoveryManager, "cancelRecovery", @@ -279,7 +270,7 @@ contract("RecoveryManager", (accounts) => { }); it("should not allow duplicate guardian signatures", async () => { - await assertRevert( + await utils.assertRevert( manager.relay( recoveryManager, "cancelRecovery", @@ -294,13 +285,13 @@ contract("RecoveryManager", (accounts) => { }); it("should not allow non guardians signatures", async () => { - await assertRevert( + await utils.assertRevert( manager.relay( recoveryManager, "cancelRecovery", [wallet.address], wallet, - sortWalletByAddress([guardian1, nonowner]), + utils.sortWalletByAddress([guardian1, nonowner]), ), INVALID_SIGNATURES_REVERT_MSG, ); @@ -314,20 +305,20 @@ contract("RecoveryManager", (accounts) => { const majority = guardians.slice(0, Math.ceil((guardians.length) / 2)); await manager.relay(recoveryManager, "transferOwnership", - [wallet.address, newowner], wallet, [owner, ...sortWalletByAddress(majority)]); + [wallet.address, newowner], wallet, [owner, ...utils.sortWalletByAddress(majority)]); const walletOwner = await wallet.owner(); assert.equal(walletOwner, newowner, "owner should have been changed"); }); it("should not let owner + minority of guardians execute an ownership transfer", async () => { const minority = guardians.slice(0, Math.ceil((guardians.length) / 2) - 1); - await assertRevert( + await utils.assertRevert( manager.relay( recoveryManager, "transferOwnership", [wallet.address, newowner], wallet, - [owner, ...sortWalletByAddress(minority)], + [owner, ...utils.sortWalletByAddress(minority)], ), WRONG_SIGNATURE_NUMBER_REVERT_MSG, ); @@ -337,13 +328,13 @@ contract("RecoveryManager", (accounts) => { it("should not let majority of guardians execute an ownership transfer without owner", async () => { const majority = guardians.slice(0, Math.ceil((guardians.length) / 2)); - await assertRevert( + await utils.assertRevert( manager.relay( recoveryManager, "transferOwnership", [wallet.address, newowner], wallet, - [...sortWalletByAddress(majority)], + [...utils.sortWalletByAddress(majority)], ), WRONG_SIGNATURE_NUMBER_REVERT_MSG, ); @@ -354,7 +345,7 @@ contract("RecoveryManager", (accounts) => { describe("RecoveryManager high level logic", () => { it("should not be able to instantiate the RecoveryManager with lock period shorter than the recovery period", async () => { - await assertRevert(RecoveryManager.new( + await utils.assertRevert(RecoveryManager.new( lockStorage.address, guardianStorage.address, versionManager.address, @@ -366,7 +357,7 @@ contract("RecoveryManager", (accounts) => { describe("Execute Recovery", () => { it("should not allow recovery to be executed with no guardians", async () => { const noGuardians = []; - await assertRevert(manager.relay( + await utils.assertRevert(manager.relay( recoveryManager, "executeRecovery", [wallet.address, newowner], @@ -398,13 +389,13 @@ contract("RecoveryManager", (accounts) => { it("should not allow duplicate guardian signatures", async () => { const badMajority = [guardian1, guardian1]; - await assertRevert( + await utils.assertRevert( manager.relay( recoveryManager, "executeRecovery", [wallet.address, newowner], wallet, - [...sortWalletByAddress(badMajority)], + [...utils.sortWalletByAddress(badMajority)], ), INVALID_SIGNATURES_REVERT_MSG, ); }); @@ -438,7 +429,7 @@ contract("RecoveryManager", (accounts) => { it("should not be able to call ExecuteRecovery with an empty recovery address", async () => { const txReceipt = await manager.relay(recoveryManager, "executeRecovery", [wallet.address, ethers.constants.AddressZero], wallet, [guardian1]); - const { success, error } = parseRelayReceipt(txReceipt); + const { success, error } = utils.parseRelayReceipt(txReceipt); assert.isFalse(success, "executeRecovery should fail"); assert.equal(error, "RM: new owner address cannot be null"); }); @@ -446,30 +437,30 @@ contract("RecoveryManager", (accounts) => { it("should not be able to call ExecuteRecovery with a guardian address", async () => { const txReceipt = await manager.relay(recoveryManager, "executeRecovery", [wallet.address, guardian1], wallet, [guardian1]); - const { success, error } = parseRelayReceipt(txReceipt); + const { success, error } = utils.parseRelayReceipt(txReceipt); assert.isFalse(success, "executeRecovery should fail"); assert.equal(error, "RM: new owner address cannot be a guardian"); }); it("should not be able to call ExecuteRecovery if already in the process of Recovery", async () => { await manager.relay(recoveryManager, "executeRecovery", - [wallet.address, newowner], wallet, sortWalletByAddress([guardian1])); + [wallet.address, newowner], wallet, utils.sortWalletByAddress([guardian1])); const txReceipt = await manager.relay(recoveryManager, "executeRecovery", [wallet.address, ethers.constants.AddressZero], wallet, [guardian1]); - const { success, error } = parseRelayReceipt(txReceipt); + const { success, error } = utils.parseRelayReceipt(txReceipt); assert.isFalse(success, "executeRecovery should fail"); assert.equal(error, "RM: there cannot be an ongoing recovery"); }); it("should revert if an unknown method is executed", async () => { - const nonce = await getNonceForRelay(); - const chainId = await getChainId(); - let methodData = recoveryManager.contract.methods.executeRecovery([wallet.address, ethers.constants.AddressZero]).encodeABI(); + const nonce = await utils.getNonceForRelay(); + const chainId = await utils.getChainId(); + let methodData = recoveryManager.contract.methods.executeRecovery(wallet.address, ethers.constants.AddressZero).encodeABI(); // Replace the `executeRecovery` method signature: b0ba4da0 with a non-existent one: e0b6fcfc methodData = methodData.replace("b0ba4da0", "e0b6fcfc"); - const signatures = await signOffchain( + const signatures = await utils.signOffchain( [guardian1], relayerManager.address, recoveryManager.address, @@ -479,10 +470,10 @@ contract("RecoveryManager", (accounts) => { nonce, 0, 700000, - ETH_TOKEN, + utils.ETH_TOKEN, ethers.constants.AddressZero, ); - await assertRevert( + await utils.assertRevert( relayerManager.execute( wallet.address, recoveryManager.address, @@ -491,7 +482,7 @@ contract("RecoveryManager", (accounts) => { signatures, 0, 700000, - ETH_TOKEN, + utils.ETH_TOKEN, ethers.constants.AddressZero, { gasLimit: 800000, from: nonowner2 }, ), @@ -509,7 +500,7 @@ contract("RecoveryManager", (accounts) => { "executeRecovery", [wallet.address, newowner], wallet, - sortWalletByAddress([guardian1, guardian2]), + utils.sortWalletByAddress([guardian1, guardian2]), ); }); @@ -525,7 +516,7 @@ contract("RecoveryManager", (accounts) => { "executeRecovery", [wallet.address, newowner], wallet, - sortWalletByAddress([guardian1, guardian2]), + utils.sortWalletByAddress([guardian1, guardian2]), ); }); @@ -533,13 +524,14 @@ contract("RecoveryManager", (accounts) => { }); describe("Smart Contract Guardians", () => { beforeEach(async () => { - await addGuardians(await createSmartContractGuardians([guardian1, guardian2, guardian3])); + const scGuardians = await createSmartContractGuardians([guardian1, guardian2, guardian3]); + await addGuardians(scGuardians); await manager.relay( recoveryManager, "executeRecovery", [wallet.address, newowner], wallet, - sortWalletByAddress([guardian1, guardian2]), + utils.sortWalletByAddress([guardian1, guardian2]), ); }); @@ -555,7 +547,7 @@ contract("RecoveryManager", (accounts) => { "transferOwnership", [wallet.address, ethers.constants.AddressZero], wallet, [owner, guardian1], ); - const { success, error } = parseRelayReceipt(txReceipt); + const { success, error } = utils.parseRelayReceipt(txReceipt); assert.isFalse(success, "transferOwnership should fail"); assert.equal(error, "RM: new owner address cannot be null"); }); @@ -567,7 +559,7 @@ contract("RecoveryManager", (accounts) => { "transferOwnership", [wallet.address, guardian1], wallet, [owner, guardian1], ); - const { success, error } = parseRelayReceipt(txReceipt); + const { success, error } = utils.parseRelayReceipt(txReceipt); assert.isFalse(success, "transferOwnership should fail"); assert.equal(error, "RM: new owner address cannot be a guardian"); }); @@ -580,13 +572,13 @@ contract("RecoveryManager", (accounts) => { wallet, [owner], ); - const { success } = parseRelayReceipt(txReceipt); + const { success } = utils.parseRelayReceipt(txReceipt); assert.isTrue(success, "transferOwnership should succeed"); }); it("should not allow owner not signing", async () => { await addGuardians([guardian1]); - await assertRevert( + await utils.assertRevert( manager.relay( recoveryManager, "transferOwnership", @@ -599,7 +591,7 @@ contract("RecoveryManager", (accounts) => { it("should not allow duplicate owner signatures", async () => { await addGuardians([guardian1]); - await assertRevert( + await utils.assertRevert( manager.relay( recoveryManager, "transferOwnership", @@ -612,7 +604,7 @@ contract("RecoveryManager", (accounts) => { it("should not allow duplicate guardian signatures", async () => { await addGuardians([guardian1, guardian2, guardian3]); - await assertRevert( + await utils.assertRevert( manager.relay( recoveryManager, "transferOwnership", @@ -625,7 +617,7 @@ contract("RecoveryManager", (accounts) => { it("should not allow non guardian signatures", async () => { await addGuardians([guardian1]); - await assertRevert( + await utils.assertRevert( manager.relay( recoveryManager, "transferOwnership", From 6b4bf056b6de470a468816f913970271ad629730 Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Sat, 24 Oct 2020 10:51:36 +0300 Subject: [PATCH 055/113] Fix relayer tests --- test/relayer.js | 94 ++++++++++++++++++++++++------------------------- 1 file changed, 46 insertions(+), 48 deletions(-) diff --git a/test/relayer.js b/test/relayer.js index a6e7a3c6b..a2b4192ac 100644 --- a/test/relayer.js +++ b/test/relayer.js @@ -2,7 +2,8 @@ const ethers = require("ethers"); const BN = require("bn.js"); const { formatBytes32String } = require("ethers").utils; -const { parseRelayReceipt, hasEvent, getBalance, assertRevert } = require("../utils/utilities.js"); +const utils = require("../utils/utilities.js"); +const { ETH_TOKEN } = require("../utils/utilities.js"); const Proxy = artifacts.require("Proxy"); const BaseWallet = artifacts.require("BaseWallet"); @@ -22,15 +23,6 @@ const VersionManager = artifacts.require("VersionManager"); const ERC20 = artifacts.require("TestERC20"); const RelayManager = require("../utils/relay-manager"); -const { ETH_TOKEN, getNonceForRelay } = require("../utils/utilities.js"); - -const FEATURE_NOT_AUTHORISED_FOR_WALLET = "RM: feature not authorised"; -const INVALID_DATA_REVERT_MSG = "RM: Invalid dataWallet"; -const DUPLICATE_REQUEST_REVERT_MSG = "RM: Duplicate request"; -const INVALID_WALLET_REVERT_MSG = "RM: Target of _data != _wallet"; -const RELAYER_NOT_AUTHORISED_FOR_WALLET = "BF: must be owner or feature"; -const GAS_LESS_THAN_GASLIMIT = "RM: not enough gas provided"; -const WRONG_NUMBER_SIGNATURES = "RM: Wrong number of signatures"; contract("RelayerManager", (accounts) => { const manager = new RelayManager(); @@ -135,15 +127,15 @@ contract("RelayerManager", (accounts) => { describe("relaying feature transactions", () => { it("should fail when _data is less than 36 bytes", async () => { const params = []; // the first argument is not the wallet address, which should make the relaying revert - await assertRevert( - manager.relay(testFeature, "clearInt", params, wallet, [owner]), INVALID_DATA_REVERT_MSG, + await utils.assertRevert( + manager.relay(testFeature, "clearInt", params, wallet, [owner]), "RM: Invalid dataWallet", ); }); it("should fail when feature is not authorised", async () => { const params = [wallet.address, 2]; - await assertRevert( - manager.relay(testFeatureNew, "setIntOwnerOnly", params, wallet, [owner]), FEATURE_NOT_AUTHORISED_FOR_WALLET, + await utils.assertRevert( + manager.relay(testFeatureNew, "setIntOwnerOnly", params, wallet, [owner]), "RM: feature not authorised", ); }); @@ -154,9 +146,11 @@ contract("RelayerManager", (accounts) => { await versionManager.upgradeWallet(wrongWallet.address, await versionManager.lastVersion(), { from: owner }); const params = [wrongWallet.address, 2]; const txReceipt = await manager.relay(testFeature, "setIntOwnerOnly", params, wrongWallet, [owner]); - const { success, error } = parseRelayReceipt(txReceipt); + + const { success, error } = utils.parseRelayReceipt(txReceipt); assert.isFalse(success); - assert.equal(error, RELAYER_NOT_AUTHORISED_FOR_WALLET); + assert.equal(error, "BF: must be owner or feature"); + // reset last version to default bundle await versionManager.addVersion([ relayerManager.address, @@ -171,14 +165,14 @@ contract("RelayerManager", (accounts) => { it("should fail when the first param is not the wallet ", async () => { const params = [owner, 4]; - await assertRevert( - manager.relay(testFeature, "setIntOwnerOnly", params, wallet, [owner]), INVALID_WALLET_REVERT_MSG, + await utils.assertRevert( + manager.relay(testFeature, "setIntOwnerOnly", params, wallet, [owner]), "RM: Target of _data != _wallet", ); }); it("should fail when the gas of the transaction is less then the gasLimit ", async () => { const params = [wallet.address, 2]; - const nonce = await getNonceForRelay(); + const nonce = await utils.getNonceForRelay(); const gasLimit = 2000000; const relayParams = [ testFeature, @@ -194,30 +188,34 @@ contract("RelayerManager", (accounts) => { ETH_TOKEN, ethers.constants.AddressZero, gasLimit * 0.9]; - await assertRevert(manager.relay(...relayParams), GAS_LESS_THAN_GASLIMIT); + const txReceipt = await manager.relay(...relayParams); + + const { success, error } = utils.parseRelayReceipt(txReceipt); + assert.isFalse(success); + assert.equal(error, "RM: not enough gas provided"); }); it("should fail when a wrong number of signatures is provided", async () => { const params = [wallet.address, 2]; const relayParams = [testFeature, "setIntOwnerOnly", params, wallet, [owner, recipient]]; - await assertRevert(manager.relay(...relayParams), WRONG_NUMBER_SIGNATURES); + await utils.assertRevert(manager.relay(...relayParams), "RM: Wrong number of signatures"); }); it("should fail a duplicate transaction", async () => { const params = [wallet.address, 2]; - const nonce = await getNonceForRelay(); + const nonce = await utils.getNonceForRelay(); const relayParams = [testFeature, "setIntOwnerOnly", params, wallet, [owner], accounts[9], false, 2000000, nonce]; await manager.relay(...relayParams); - await assertRevert( - manager.relay(...relayParams), DUPLICATE_REQUEST_REVERT_MSG, + await utils.assertRevert( + manager.relay(...relayParams), "RM: Duplicate request", ); }); it("should fail when relaying to itself", async () => { const dataMethod = "setIntOwnerOnly"; const dataParam = [wallet.address, 2]; - const methodData = testFeature.contract.methods[dataMethod](dataParam).encodeABI(); + const methodData = testFeature.contract.methods[dataMethod](...dataParam).encodeABI(); const params = [ wallet.address, testFeature.address, @@ -229,29 +227,29 @@ contract("RelayerManager", (accounts) => { ETH_TOKEN, ethers.constants.AddressZero, ]; - await assertRevert( + await utils.assertRevert( manager.relay(relayerManager, "execute", params, wallet, [owner]), "BF: disabled method", ); }); it("should update the nonce after the transaction", async () => { - const nonce = await getNonceForRelay(); + const nonce = await utils.getNonceForRelay(); await manager.relay(testFeature, "setIntOwnerOnly", [wallet.address, 2], wallet, [owner], accounts[9], false, 2000000, nonce); const updatedNonce = await relayerManager.getNonce(wallet.address); - const updatedNonceHex = await ethers.utils.hexZeroPad(updatedNonce.toHexString(), 32); - assert.equal(nonce, updatedNonceHex); + const updatedNonceHex = await updatedNonce.toString(16, 32); + assert.equal(nonce, `0x${updatedNonceHex}`); }); }); - describe("refund", () => { + describe("refund relayed transactions", () => { let erc20; beforeEach(async () => { const decimals = 12; // number of decimal for TOKN contract - const tokenRate = new BN(10).pow(new BN(19)).muln(51); // 1 TOKN = 0.00051 ETH = 0.00051*10^18 ETH wei => *10^(18-decimals) = 0.00051*10^18 * 10^6 = 0.00051*10^24 = 51*10^19 + const tokenRate = new BN(10).pow(new BN(19)).mul(new BN(51)); // 1 TOKN = 0.00051 ETH = 0.00051*10^18 ETH wei => *10^(18-decimals) = 0.00051*10^18 * 10^6 = 0.00051*10^24 = 51*10^19 erc20 = await ERC20.new([infrastructure], 10000000, decimals); // TOKN contract with 10M tokens (10M TOKN for account[0]) - await tokenPriceRegistry.setPriceForTokenList([erc20.address], [tokenRate.toString()]); + await tokenPriceRegistry.setPriceForTokenList([erc20.address], [tokenRate]); await limitFeature.setLimitAndDailySpent(wallet.address, 10000000000, 0); }); @@ -265,7 +263,7 @@ contract("RelayerManager", (accounts) => { } async function callAndRefund({ refundToken }) { - const nonce = await getNonceForRelay(); + const nonce = await utils.getNonceForRelay(); const relayParams = [ testFeature, "setIntOwnerOnly", @@ -289,11 +287,11 @@ contract("RelayerManager", (accounts) => { it("should refund in ETH", async () => { await provisionFunds("100000000000000", 0); - const wBalanceStart = await getBalance(wallet.address); - const rBalanceStart = await getBalance(recipient); + const wBalanceStart = await utils.getBalance(wallet.address); + const rBalanceStart = await utils.getBalance(recipient); await callAndRefund({ refundToken: ETH_TOKEN }); - const wBalanceEnd = await getBalance(wallet.address); - const rBalanceEnd = await getBalance(recipient); + const wBalanceEnd = await utils.getBalance(wallet.address); + const rBalanceEnd = await utils.getBalance(recipient); const refund = wBalanceStart.sub(wBalanceEnd); assert.isTrue(refund.gt(0), "should have refunded ETH"); assert.isTrue(refund.eq(rBalanceEnd.sub(rBalanceStart)), "should have refunded the recipient"); @@ -314,17 +312,17 @@ contract("RelayerManager", (accounts) => { it("should emit the Refund event", async () => { await provisionFunds("100000000000", 0); const txReceipt = await callAndRefund({ refundToken: ETH_TOKEN }); - await hasEvent(txReceipt, relayerManager, "Refund"); + await utils.hasEvent(txReceipt, relayerManager, "Refund"); }); - it("should fail the transaction when when there is not enough ETH for the refund", async () => { + it("should fail the transaction when there is not enough ETH for the refund", async () => { await provisionFunds(10, 0); - await assertRevert(callAndRefund({ refundToken: ETH_TOKEN }), "VM: wallet invoke reverted"); + await utils.assertRevert(callAndRefund({ refundToken: ETH_TOKEN }), "VM: wallet invoke reverted"); }); - it("should fail the transaction when when there is not enough ERC20 for the refund", async () => { + it("should fail the transaction when there is not enough ERC20 for the refund", async () => { await provisionFunds(0, 10); - await assertRevert(callAndRefund({ refundToken: erc20.address }), "ERC20: transfer amount exceeds balance"); + await utils.assertRevert(callAndRefund({ refundToken: erc20.address }), "ERC20: transfer amount exceeds balance"); }); it("should include the refund in the daily limit", async () => { @@ -343,12 +341,12 @@ contract("RelayerManager", (accounts) => { await setLimitAndDailySpent({ limit: 1000000000, alreadySpent: 10 }); let dailySpent = await limitFeature.getDailySpent(wallet.address); assert.isTrue(dailySpent.toNumber() === 10, "initial daily spent should be 10"); - const rBalanceStart = await getBalance(recipient); + const rBalanceStart = await utils.getBalance(recipient); // add a guardian await guardianManager.addGuardian(wallet.address, guardian, { from: owner }); // call approvedTransfer const params = [wallet.address, ETH_TOKEN, recipient, 1000, ethers.constants.HashZero]; - const nonce = await getNonceForRelay(); + const nonce = await utils.getNonceForRelay(); const gasLimit = 2000000; const relayParams = [ approvedTransfer, @@ -367,12 +365,12 @@ contract("RelayerManager", (accounts) => { await manager.relay(...relayParams); dailySpent = await limitFeature.getDailySpent(wallet.address); assert.isTrue(dailySpent.toNumber() === 0, "daily spent should be reset"); - const rBalanceEnd = await getBalance(recipient); + const rBalanceEnd = await utils.getBalance(recipient); assert.isTrue(rBalanceEnd.gt(rBalanceStart), "should have refunded the recipient"); }); it("should fail if required signatures is 0 and OwnerRequirement is not Anyone", async () => { - await assertRevert( + await utils.assertRevert( manager.relay(badFeature, "setIntOwnerOnly", [wallet.address, 2], wallet, [owner]), "RM: Wrong signature requirement", ); }); @@ -382,7 +380,7 @@ contract("RelayerManager", (accounts) => { await setLimitAndDailySpent({ limit: 1000000000, alreadySpent: 999999990 }); const dailySpent = await limitFeature.getDailySpent(wallet.address); assert.isTrue(dailySpent.toNumber() === 999999990, "initial daily spent should be 999999990"); - await assertRevert(callAndRefund({ refundToken: ETH_TOKEN }), "RM: refund is above daily limit"); + await utils.assertRevert(callAndRefund({ refundToken: ETH_TOKEN }), "RM: refund is above daily limit"); }); }); @@ -407,7 +405,7 @@ contract("RelayerManager", (accounts) => { }); it("should fail to add module which is not registered", async () => { - await assertRevert(versionManager.addModule(wallet.address, versionManagerV2.address, { from: owner }), + await utils.assertRevert(versionManager.addModule(wallet.address, versionManagerV2.address, { from: owner }), "VM: module is not registered"); }); }); From e95275999c3759f26a7d909d05a900573ddc8343 Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Thu, 29 Oct 2020 10:18:13 +0200 Subject: [PATCH 056/113] Fix remaining tests except for loading legacy contracts (from outside the ./contracts folder ref: https://github.com/trufflesuite/truffle/issues/3436) --- deployment/999_benchmark.js | 1 - test/lockManager.js | 2 +- test/nftTransfer.js | 8 ++-- test/simpleUpgrader.js | 10 ++-- test/tokenExchanger.js | 91 ++++++++++++++++++++++--------------- test/tokenPriceRegistry.js | 34 +++++++++----- test/transferManager.js | 53 +++++++++++---------- test/versionManager.js | 24 +++++----- utils/relay-manager.js | 1 + 9 files changed, 126 insertions(+), 98 deletions(-) diff --git a/deployment/999_benchmark.js b/deployment/999_benchmark.js index 8bf13dca9..9d2b0446f 100644 --- a/deployment/999_benchmark.js +++ b/deployment/999_benchmark.js @@ -3,7 +3,6 @@ const ethers = require("ethers"); const Table = require("cli-table2"); const tinyreq = require("tinyreq"); -const { assert } = require("chai"); const BaseWallet = artifacts.require("BaseWallet"); const Proxy = artifacts.require("Proxy"); diff --git a/test/lockManager.js b/test/lockManager.js index e8e1064b5..57cf8b533 100644 --- a/test/lockManager.js +++ b/test/lockManager.js @@ -15,7 +15,7 @@ const VersionManager = artifacts.require("VersionManager"); const chai = require("chai"); const BN = require("bn.js"); const bnChai = require("bn-chai"); -const { assert } = require("chai"); + const utilities = require("../utils/utilities.js"); const RelayManager = require("../utils/relay-manager"); diff --git a/test/nftTransfer.js b/test/nftTransfer.js index 03ce5553b..cef3508e7 100644 --- a/test/nftTransfer.js +++ b/test/nftTransfer.js @@ -1,5 +1,6 @@ /* global artifacts */ const ethers = require("ethers"); +const utils = require("../utils/utilities.js"); const Proxy = artifacts.require("Proxy"); const BaseWallet = artifacts.require("BaseWallet"); @@ -10,7 +11,6 @@ const LockStorage = artifacts.require("LockStorage"); const GuardianStorage = artifacts.require("GuardianStorage"); const NftTransfer = artifacts.require("NftTransfer"); const TokenPriceRegistry = artifacts.require("TokenPriceRegistry"); - const ERC721 = artifacts.require("TestERC721"); const CK = artifacts.require("CryptoKittyTest"); const ERC20 = artifacts.require("TestERC20"); @@ -19,7 +19,7 @@ const ERC20Approver = artifacts.require("ERC20Approver"); const ZERO_BYTES32 = ethers.constants.HashZero; const RelayManager = require("../utils/relay-manager"); -const { parseRelayReceipt, callStatic, assertRevert } = require("../utils/utilities.js"); +const { callStatic } = require("../utils/utilities.js"); contract("NftTransfer", (accounts) => { const manager = new RelayManager(); @@ -101,7 +101,7 @@ contract("NftTransfer", (accounts) => { if (relayed) { const txReceipt = await manager.relay(nftFeature, "transferNFT", [wallet1.address, nftContract.address, recipientAddress, nftId, safe, ZERO_BYTES32], wallet1, [owner1]); - const { success, error } = parseRelayReceipt(txReceipt); + const { success, error } = utils.parseRelayReceipt(txReceipt); assert.equal(success, shouldSucceed); if (!shouldSucceed) { assert.equal(error, expectedError); @@ -112,7 +112,7 @@ contract("NftTransfer", (accounts) => { if (shouldSucceed) { await txPromise; } else { - assertRevert(txPromise, expectedError); + utils.assertRevert(txPromise, expectedError); } } if (shouldSucceed) { diff --git a/test/simpleUpgrader.js b/test/simpleUpgrader.js index 8c1063852..c72c76e0f 100644 --- a/test/simpleUpgrader.js +++ b/test/simpleUpgrader.js @@ -104,7 +104,7 @@ contract("SimpleUpgrader", (accounts) => { let isAuthorised = await wallet.authorised(initialModule.address); assert.equal(isAuthorised, true, "initial module should be authorised"); // try (and fail) to add moduleToAdd to wallet - await utils.assertRevert(initialModule.addModule(wallet.address, moduleToAdd.address, { from: owner })); + await utils.assertRevert(initialModule.addModule(wallet.address, moduleToAdd.address, { from: owner }), "VM: module is not registered"); isAuthorised = await wallet.authorised(moduleToAdd.address); assert.equal(isAuthorised, false, "unregistered module should not be authorised"); }); @@ -180,7 +180,7 @@ contract("SimpleUpgrader", (accounts) => { const event = await utils.getEvent(txReceipt, relayerV1, "TransactionExecuted"); assert.isTrue(!event.args.success, "Relayed upgrade to 0 module should have failed."); } else { - utils.assertRevert(moduleV1.addModule(...params2, { from: owner })); + utils.assertRevert(moduleV1.addModule(...params2, { from: owner }), "BW: wallet must have at least one module"); } return; } @@ -195,10 +195,8 @@ contract("SimpleUpgrader", (accounts) => { // test event ordering const event = await utils.getEvent(txReceipt, wallet, "AuthorisedModule"); - const upgraderAuthorisedLogIndex = event.args.findIndex((a) => a.module === upgrader1.address && a.value === true); - const upgraderUnauthorisedLogIndex = event.args.findIndex((a) => a.module === upgrader1.address && a.value === false); - assert.isBelow(upgraderAuthorisedLogIndex, upgraderUnauthorisedLogIndex, - "AuthorisedModule(upgrader, false) should come after AuthorisedModule(upgrader, true)"); + assert.equal(event.args.module, upgrader1.address); + assert.isTrue(event.args.value); // test if the upgrade worked const isV1Authorised = await wallet.authorised(moduleV1.address); diff --git a/test/tokenExchanger.js b/test/tokenExchanger.js index d51b735e9..69383a49f 100644 --- a/test/tokenExchanger.js +++ b/test/tokenExchanger.js @@ -1,9 +1,14 @@ /* global artifacts */ const ethers = require("ethers"); -const { parseEther } = require("ethers").utils; const { AddressZero } = require("ethers").constants; + +const chai = require("chai"); const BN = require("bn.js"); +const bnChai = require("bn-chai"); + +const { expect } = chai; +chai.use(bnChai(BN)); // Paraswap const AugustusSwapper = artifacts.require("AugustusSwapper"); @@ -42,13 +47,14 @@ const VersionManager = artifacts.require("VersionManager"); // Utils const { makePathes } = require("../utils/paraswap/sell-helper"); const { makeRoutes } = require("../utils/paraswap/buy-helper"); -const { ETH_TOKEN, getEvent, getTimestamp, assertRevert } = require("../utils/utilities.js"); +const { ETH_TOKEN } = require("../utils/utilities.js"); +const utils = require("../utils/utilities.js"); const RelayManager = require("../utils/relay-manager"); // Constants const DECIMALS = 18; // number of decimal for TOKEN_A, TOKEN_B contracts -const TOKEN_A_RATE = parseEther("0.06"); -const TOKEN_B_RATE = parseEther("0.03"); +const TOKEN_A_RATE = web3.utils.toWei("0.06"); +const TOKEN_B_RATE = web3.utils.toWei("0.03"); contract("TokenExchanger", (accounts) => { const manager = new RelayManager(); @@ -95,29 +101,29 @@ contract("TokenExchanger", (accounts) => { manager.setRelayerManager(relayerManager); // Deploy test tokens - tokenA = await ERC20.new([infrastructure], parseEther("1000"), DECIMALS); - tokenB = await ERC20.new([infrastructure], parseEther("1000"), DECIMALS); + tokenA = await ERC20.new([infrastructure], web3.utils.toWei("1000"), DECIMALS); + tokenB = await ERC20.new([infrastructure], web3.utils.toWei("1000"), DECIMALS); // Deploy and fund Kyber kyberNetwork = await KyberNetwork.new(); - await tokenA.mint(kyberNetwork.address, parseEther("1000")); - await tokenB.mint(kyberNetwork.address, parseEther("1000")); + await tokenA.mint(kyberNetwork.address, web3.utils.toWei("1000")); + await tokenB.mint(kyberNetwork.address, web3.utils.toWei("1000")); await kyberNetwork.addToken(tokenA.address, TOKEN_A_RATE, DECIMALS); await kyberNetwork.addToken(tokenB.address, TOKEN_B_RATE, DECIMALS); - await kyberNetwork.send(parseEther("10").toString()); + await kyberNetwork.send(web3.utils.toWei("10").toString()); // Deploy and fund UniswapV2 const uniswapFactory = await UniswapV2Factory.new(AddressZero); const weth = await WETH.new(); uniswapRouter = await UniswapV2Router01.new(uniswapFactory.address, weth.address); - await tokenA.approve(uniswapRouter.address, parseEther("300")); - await tokenB.approve(uniswapRouter.address, parseEther("600")); - const timestamp = await getTimestamp(); + await tokenA.approve(uniswapRouter.address, web3.utils.toWei("300")); + await tokenB.approve(uniswapRouter.address, web3.utils.toWei("600")); + const timestamp = await utils.getTimestamp(); await uniswapRouter.addLiquidity( tokenA.address, tokenB.address, - parseEther("300"), - parseEther("600"), + web3.utils.toWei("300"), + web3.utils.toWei("600"), 1, 1, infrastructure, @@ -187,15 +193,15 @@ contract("TokenExchanger", (accounts) => { await versionManager.upgradeWallet(wallet.address, await versionManager.lastVersion(), { from: owner }); // fund wallet - await wallet.send(parseEther("0.1").toString()); - await tokenA.mint(wallet.address, parseEther("1000")); - await tokenB.mint(wallet.address, parseEther("1000")); + await wallet.send(web3.utils.toWei("0.1")); + await tokenA.mint(wallet.address, web3.utils.toWei("1000")); + await tokenB.mint(wallet.address, web3.utils.toWei("1000")); }); async function getBalance(tokenAddress, _wallet) { let balance; if (tokenAddress === ETH_TOKEN) { - balance = await getBalance(_wallet.address); + balance = await utils.getBalance(_wallet.address); } else if (tokenAddress === tokenA.address) { balance = await tokenA.balanceOf(_wallet.address); } else { @@ -282,9 +288,11 @@ contract("TokenExchanger", (accounts) => { }) { const beforeFrom = await getBalance(fromToken, _wallet); const beforeTo = await getBalance(toToken, _wallet); - const fixedAmount = parseEther("0.01"); + const fixedAmount = web3.utils.toWei("0.01"); const variableAmount = method === "sell" ? 1 : beforeFrom; - if (method === "sell") { assert.isTrue(beforeFrom.gte(fixedAmount), "wallet should have enough of fromToken"); } + + // wallet should have enough of fromToken + if (method === "sell") { expect(beforeFrom).to.be.gte.BN(fixedAmount); } const params = getParams({ method, @@ -292,33 +300,41 @@ contract("TokenExchanger", (accounts) => { toToken, fixedAmount, // srcAmount for sell; destAmount for buy variableAmount, // destAmount for sell; srcAmount for buy - _wallet, + _wallet }); let txR; if (relayed) { txR = await manager.relay(exchanger, method, params, _wallet, [owner]); - const event = await getEvent(txR, relayerManager, "TransactionExecuted"); + const event = await utils.getEvent(txR, relayerManager, "TransactionExecuted"); assert.isTrue(event.args.success, "Relayed tx should succeed"); } else { - txR = await (await exchanger[method](...params, { gasLimit: 2000000, from: owner })).wait(); + const calldata = await exchanger.contract.methods[method](...params).encodeABI(); + const tx = await exchanger.sendTransaction({ data: calldata, gasLimit: 2000000, from: owner }); + txR = tx.receipt; } - const event = await getEvent(txR, exchanger, "TokenExchanged"); + const event = await utils.getEvent(txR, exchanger, "TokenExchanged"); const { destAmount } = event.args; const afterFrom = await getBalance(fromToken, _wallet); const afterTo = await getBalance(toToken, _wallet); if (method === "sell") { - assert.isTrue(beforeFrom.sub(afterFrom).eq(fixedAmount), "should send the exact amount of fromToken"); - assert.isTrue(afterTo.gt(beforeTo), "should receive some toToken"); - assert.isTrue(destAmount.gte(variableAmount), "should receive more toToken than minimum specified"); + // should send the exact amount of fromToken + expect(beforeFrom.sub(afterFrom)).to.eq.BN(fixedAmount); + // should receive some toToken + expect(afterTo).to.be.gt.BN(beforeTo); + // should receive more toToken than minimum specified + expect(destAmount).to.be.gte.BN(variableAmount); } if (method === "buy") { - assert.isTrue(beforeFrom.gt(afterFrom), "should send some fromToken"); - assert.isTrue(afterTo.sub(beforeTo).eq(fixedAmount), "should receive the exact amount of toToken"); - assert.isTrue(destAmount.eq(fixedAmount), "destAmount should be the requested amount of toToken"); + // should send some fromToken + expect(beforeFrom).to.be.gt.BN(afterFrom); + // should receive the exact amount of toToken + expect(afterTo.sub(beforeTo)).to.eq.BN(fixedAmount); + // destAmount should be the requested amount of toToken + expect(destAmount).to.eq.BN(fixedAmount); } } @@ -357,7 +373,7 @@ contract("TokenExchanger", (accounts) => { it("can exclude non tradable tokens", async () => { const fromToken = tokenA.address; const toToken = tokenB.address; - const fixedAmount = parseEther("0.01"); + const fixedAmount = web3.utils.toWei("0.01"); const variableAmount = method === "sell" ? "1" : await getBalance(fromToken, wallet); const params = getParams({ method, @@ -367,7 +383,7 @@ contract("TokenExchanger", (accounts) => { variableAmount, }); await tokenPriceRegistry.setTradableForTokenList([toToken], [false]); - await assertRevert(exchanger[method](...params, { gasLimit: 2000000, from: owner }), "TE: Token not tradable"); + await utils.assertRevert(exchanger[method](...params, { gasLimit: 2000000, from: owner }), "TE: Token not tradable"); await tokenPriceRegistry.setTradableForTokenList([toToken], [true]); }); @@ -376,7 +392,7 @@ contract("TokenExchanger", (accounts) => { const toToken = tokenB.address; // whitelist no exchange await dexRegistry.setAuthorised([kyberAdapter.address, uniswapV2Adapter.address], [false, false]); - const fixedAmount = parseEther("0.01"); + const fixedAmount = web3.utils.toWei("0.01"); const variableAmount = method === "sell" ? "1" : await getBalance(fromToken, wallet); const params = getParams({ method, @@ -385,7 +401,7 @@ contract("TokenExchanger", (accounts) => { fixedAmount, variableAmount, }); - await assertRevert(exchanger[method](...params, { gasLimit: 2000000, from: owner }), "DR: Unauthorised DEX"); + await utils.assertRevert(exchanger[method](...params, { gasLimit: 2000000, from: owner }), "DR: Unauthorised DEX"); // reset whitelist await dexRegistry.setAuthorised([kyberAdapter.address, uniswapV2Adapter.address], [true, true]); }); @@ -398,7 +414,7 @@ contract("TokenExchanger", (accounts) => { await oldWallet.init(owner, [versionManager.address]); await versionManager.upgradeWallet(oldWallet.address, await versionManager.lastVersion(), { from: owner }); // fund wallet - await oldWallet.send(parseEther("0.1")); + await oldWallet.send(web3.utils.toWei("0.1")); // call sell/buy await testTrade({ method, @@ -418,16 +434,17 @@ contract("TokenExchanger", (accounts) => { }); // check that the pre-existing allowance is restored const newAllowance = await tokenA.allowance(wallet.address, spender); - assert.equal(newAllowance.toString(), allowance.toString(), "Pre-existing allowance not restored"); + expect(newAllowance).to.eq.BN(allowance); }; it(`calls ${method} successfully with a pre-existing allowance`, async () => { // Make the wallet grant some non-zero allowance to the Paraswap proxy await testTradeWithPreExistingAllowance(3); }); + it(`calls ${method} successfully with a pre-existing infinite allowance`, async () => { // Make the wallet grant an infinite allowance to the Paraswap proxy - const infiniteAllowance = new BN(2).pow(256).sub(1); + const infiniteAllowance = new BN(2).pow(new BN(256)).subn(1); await testTradeWithPreExistingAllowance(infiniteAllowance); }); } diff --git a/test/tokenPriceRegistry.js b/test/tokenPriceRegistry.js index e5a7cbec2..efd69b637 100644 --- a/test/tokenPriceRegistry.js +++ b/test/tokenPriceRegistry.js @@ -1,9 +1,15 @@ /* global artifacts */ +const chai = require("chai"); +const BN = require("bn.js"); +const bnChai = require("bn-chai"); + +const { expect } = chai; +chai.use(bnChai(BN)); const TokenPriceRegistry = artifacts.require("TokenPriceRegistry"); const ERC20 = artifacts.require("TestERC20"); -const { increaseTime, assertRevert } = require("../utils/utilities.js"); +const utils = require("../utils/utilities.js"); contract("TokenPriceRegistry", (accounts) => { const owner = accounts[0]; @@ -27,31 +33,33 @@ contract("TokenPriceRegistry", (accounts) => { it("lets managers change price after security period", async () => { await tokenPriceRegistry.setPriceForTokenList([tokenAddress], [111111], { from: manager }); const beforePrice = await tokenPriceRegistry.getTokenPrice(tokenAddress); - assert.equal(beforePrice.toString(), "111111"); - await increaseTime(3601); + expect(beforePrice).to.eq.BN(111111); + await utils.increaseTime(3601); await tokenPriceRegistry.setPriceForTokenList([tokenAddress], [222222], { from: manager }); const afterPrice = await tokenPriceRegistry.getTokenPrice(tokenAddress); - assert.equal(afterPrice.toString(), "222222"); + expect(afterPrice).to.eq.BN(222222); }); it("does not let managers change price with invalid array lengths", async () => { - await assertRevert(tokenPriceRegistry.setPriceForTokenList([tokenAddress], [222222, 333333], { from: manager }), "TPS: Array length mismatch"); + await utils.assertRevert( + tokenPriceRegistry.setPriceForTokenList([tokenAddress], [222222, 333333], { from: manager }), + "TPS: Array length mismatch"); }); it("does not let managers change price before security period", async () => { await tokenPriceRegistry.setPriceForTokenList([tokenAddress], [111111], { from: manager }); - await increaseTime(3500); - await assertRevert(tokenPriceRegistry.setPriceForTokenList([tokenAddress], [222222], { from: manager }), "TPS: Price updated too early"); + await utils.increaseTime(3500); + await utils.assertRevert(tokenPriceRegistry.setPriceForTokenList([tokenAddress], [222222], { from: manager }), "TPS: Price updated too early"); }); it("lets the owner change security period", async () => { await tokenPriceRegistry.setPriceForTokenList([tokenAddress], [111111], { from: manager }); - await increaseTime(1600); - await assertRevert(tokenPriceRegistry.setPriceForTokenList([tokenAddress], [222222], { from: manager }), "TPS: Price updated too early"); + await utils.increaseTime(1600); + await utils.assertRevert(tokenPriceRegistry.setPriceForTokenList([tokenAddress], [222222], { from: manager }), "TPS: Price updated too early"); await tokenPriceRegistry.setMinPriceUpdatePeriod(0, { from: owner }); await tokenPriceRegistry.setPriceForTokenList([tokenAddress], [222222], { from: manager }); const afterPrice = await tokenPriceRegistry.getTokenPrice(tokenAddress); - assert.equal(afterPrice.toString(), "222222"); + expect(afterPrice).to.eq.BN(222222); }); }); @@ -72,10 +80,12 @@ contract("TokenPriceRegistry", (accounts) => { await tokenPriceRegistry.setTradableForTokenList([tokenAddress], [false], { from: manager }); const tradable = await tokenPriceRegistry.isTokenTradable(tokenAddress); assert.isFalse(tradable); - await assertRevert(tokenPriceRegistry.setTradableForTokenList([tokenAddress], [true], { from: manager }), "TPS: Unauthorised"); + await utils.assertRevert(tokenPriceRegistry.setTradableForTokenList([tokenAddress], [true], { from: manager }), "TPS: Unauthorised"); }); it("does not let managers change tradable with invalid array lengths", async () => { - await assertRevert(tokenPriceRegistry.setTradableForTokenList([tokenAddress], [false, false], { from: manager }), "TPS: Array length mismatch"); + await utils.assertRevert( + tokenPriceRegistry.setTradableForTokenList([tokenAddress], [false, false], { from: manager }), + "TPS: Array length mismatch"); }); }); }); diff --git a/test/transferManager.js b/test/transferManager.js index f8e835464..da8308458 100644 --- a/test/transferManager.js +++ b/test/transferManager.js @@ -19,6 +19,7 @@ const LimitStorage = artifacts.require("LimitStorage"); const TokenPriceRegistry = artifacts.require("TokenPriceRegistry"); const RelayerManager = artifacts.require("RelayerManager"); const TransferManager = artifacts.require("TransferManager"); + const LegacyTransferManager = require("../build-legacy/v1.6.0/TransferManager"); const LegacyTokenPriceProvider = require("../build-legacy/v1.6.0/TokenPriceProvider"); @@ -66,6 +67,7 @@ contract("TransferManager", (accounts) => { before(async () => { weth = await WETH.new(); registry = await Registry.new(); + priceProvider = await LegacyTokenPriceProvider.new(ethers.constants.AddressZero); await priceProvider.addManager(infrastructure); @@ -86,7 +88,7 @@ contract("TransferManager", (accounts) => { registry.address, transferStorage.address, guardianStorage.address, - priceProvider.address, + ethers.constants.AddressZero, SECURITY_PERIOD, SECURITY_WINDOW, ETH_LIMIT, @@ -162,9 +164,9 @@ contract("TransferManager", (accounts) => { await existingWallet.init(owner, [versionManager.address]); await versionManager.upgradeWallet(existingWallet.address, await versionManager.lastVersion(), { from: owner }); - const defautlimit = await transferManager1.defaultLimit(); + const defaultLimit = await transferManager1.defaultLimit(); const limit = await transferManager1.getCurrentLimit(existingWallet.address); - assert.equal(limit.toNumber(), defautlimit.toNumber()); + expect(limit).to.eq.BN(defaultLimit); // reset the last version to the default bundle await versionManager.addVersion([transferManager.address, relayerManager.address], [transferManager.address]); @@ -175,13 +177,13 @@ contract("TransferManager", (accounts) => { it("should add/remove an account to/from the whitelist", async () => { await transferManager.addToWhitelist(wallet.address, recipient, { from: owner }); let isTrusted = await transferManager.isWhitelisted(wallet.address, recipient); - assert.equal(isTrusted, false, "should not be trusted during the security period"); + assert.isFalse(isTrusted, "should not be trusted during the security period"); await increaseTime(3); isTrusted = await transferManager.isWhitelisted(wallet.address, recipient); - assert.equal(isTrusted, true, "should be trusted after the security period"); + assert.isTrue(isTrusted, "should be trusted after the security period"); await transferManager.removeFromWhitelist(wallet.address, recipient, { from: owner }); isTrusted = await transferManager.isWhitelisted(wallet.address, recipient); - assert.equal(isTrusted, false, "should no removed from whitelist immediately"); + assert.isFalse(isTrusted, "should no removed from whitelist immediately"); }); it("should not be able to whitelist a token twice", async () => { @@ -198,7 +200,7 @@ contract("TransferManager", (accounts) => { await increaseTime(3); const isTrusted = await transferManager.isWhitelisted(wallet.address, recipient); - assert.equal(isTrusted, false); + assert.isFalse(isTrusted); }); }); @@ -215,36 +217,36 @@ contract("TransferManager", (accounts) => { it("should get a token price correctly", async () => { const tokenPrice = new BN(10).pow(new BN(18)).muln(1800); - await tokenPriceRegistry.setPriceForTokenList([erc20First.address], [tokenPrice.toString()]); + await tokenPriceRegistry.setPriceForTokenList([erc20First.address], [tokenPrice]); const tokenPriceSet = await tokenPriceRegistry.getTokenPrice(erc20First.address); - expect(tokenPrice).to.eq.BN(tokenPriceSet.toString()); + expect(tokenPrice).to.eq.BN(tokenPriceSet); }); it("should get multiple token prices correctly", async () => { await tokenPriceRegistry.setPriceForTokenList([erc20First.address, erc20Second.address], [1800, 1900]); const tokenPricesSet = await tokenPriceRegistry.getPriceForTokenList([erc20First.address, erc20Second.address]); - expect(1800).to.eq.BN(tokenPricesSet[0].toString()); - expect(1900).to.eq.BN(tokenPricesSet[1].toString()); + expect(1800).to.eq.BN(tokenPricesSet[0]); + expect(1900).to.eq.BN(tokenPricesSet[1]); }); it("should set token price correctly", async () => { const tokenPrice = new BN(10).pow(new BN(18)).muln(1800); - await tokenPriceRegistry.setPriceForTokenList([erc20First.address], [tokenPrice.toString()]); + await tokenPriceRegistry.setPriceForTokenList([erc20First.address], [tokenPrice]); const tokenPriceSet = await tokenPriceRegistry.getTokenPrice(erc20First.address); - expect(tokenPrice).to.eq.BN(tokenPriceSet.toString()); + expect(tokenPrice).to.eq.BN(tokenPriceSet); }); it("should set multiple token prices correctly", async () => { await tokenPriceRegistry.setPriceForTokenList([erc20First.address, erc20Second.address], [1800, 1900]); const tokenPrice1Set = await tokenPriceRegistry.getTokenPrice(erc20First.address); - expect(1800).to.eq.BN(tokenPrice1Set.toString()); + expect(1800).to.eq.BN(tokenPrice1Set); const tokenPrice2Set = await tokenPriceRegistry.getTokenPrice(erc20Second.address); - expect(1900).to.eq.BN(tokenPrice2Set.toString()); + expect(1900).to.eq.BN(tokenPrice2Set); }); it("should be able to get the ether value of a given amount of tokens", async () => { const tokenPrice = new BN(10).pow(new BN(18)).muln(1800); - await tokenPriceRegistry.setPriceForTokenList([erc20First.address], [tokenPrice.toString()]); + await tokenPriceRegistry.setPriceForTokenList([erc20First.address], [tokenPrice]); const etherValue = await getEtherValue("15000000000000000000", erc20First.address); // expectedValue = 1800*10^18/10^18 (price for 1 token wei) * 15*10^18 (amount) = 1800 * 15*10^18 = 27,000 * 10^18 const expectedValue = new BN(10).pow(new BN(18)).muln(27000); @@ -253,7 +255,7 @@ contract("TransferManager", (accounts) => { it("should be able to get the ether value for a token with 0 decimals", async () => { const tokenPrice = new BN(10).pow(new BN(36)).muln(23000); - await tokenPriceRegistry.setPriceForTokenList([erc20ZeroDecimals.address], [tokenPrice.toString()]); + await tokenPriceRegistry.setPriceForTokenList([erc20ZeroDecimals.address], [tokenPrice]); const etherValue = await getEtherValue(100, erc20ZeroDecimals.address); // expectedValue = 23000*10^36 * 100 / 10^18 = 2,300,000 * 10^18 const expectedValue = new BN(10).pow(new BN(18)).muln(2300000); @@ -263,7 +265,7 @@ contract("TransferManager", (accounts) => { it("should return 0 as the ether value for a low priced token", async () => { await tokenPriceRegistry.setPriceForTokenList([erc20First.address], [23000]); const etherValue = await getEtherValue(100, erc20First.address); - assert.equal(etherValue.toString(), 0); // 2,300,000 + assert.equal(etherValue, 0); // 2,300,000 }); }); @@ -274,13 +276,13 @@ contract("TransferManager", (accounts) => { const existingWallet = await BaseWallet.at(proxy.address); await existingWallet.init(owner, [previousTransferManager.address]); - await existingWallet.send(new BN("100000000")); + await existingWallet.send(100000000); // change the limit await previousTransferManager.changeLimit(existingWallet.address, 4000000, { from: owner }); await increaseTime(SECURITY_PERIOD + 1); let limit = await previousTransferManager.getCurrentLimit(existingWallet.address); - assert.equal(limit.toNumber(), 4000000, "limit should be changed"); + expect(limit).to.eq.BN(4000000); // transfer some funds await previousTransferManager.transferToken(existingWallet.address, ETH_TOKEN, recipient, 1000000, ZERO_BYTES32, { from: owner }); // add new module @@ -290,23 +292,24 @@ contract("TransferManager", (accounts) => { assert.isTrue(utils.hasEvent(txReceipt, "DailyLimitMigrated")); // check result limit = await transferManager.getCurrentLimit(existingWallet.address); - assert.equal(limit.toNumber(), 4000000, "limit should have been migrated"); + expect(limit).to.eq.BN(4000000); const unspent = await transferManager.getDailyUnspent(existingWallet.address); - assert.equal(unspent[0].toNumber(), 4000000 - 1000000, "unspent should have been migrated"); + // unspent should have been migrated + expect(unspent[0]).to.eq.BN(4000000 - 1000000); }); it("should set the default limit for new wallets", async () => { const limit = await transferManager.getCurrentLimit(wallet.address); - assert.equal(limit.toNumber(), ETH_LIMIT, "limit should be ETH_LIMIT"); + expect(limit).to.eq.BN(ETH_LIMIT); }); it("should only increase the limit after the security period", async () => { await transferManager.changeLimit(wallet.address, 4000000, { from: owner }); let limit = await transferManager.getCurrentLimit(wallet.address); - assert.equal(limit.toNumber(), ETH_LIMIT, "limit should be ETH_LIMIT"); + expect(limit).to.eq.BN(ETH_LIMIT); await increaseTime(SECURITY_PERIOD + 1); limit = await transferManager.getCurrentLimit(wallet.address); - assert.equal(limit.toNumber(), 4000000, "limit should be changed"); + expect(limit).to.eq.BN(4000000); }); it("should decrease the limit immediately", async () => { diff --git a/test/versionManager.js b/test/versionManager.js index b9724dfbc..d1cc9b566 100644 --- a/test/versionManager.js +++ b/test/versionManager.js @@ -16,7 +16,7 @@ const TokenPriceRegistry = artifacts.require("TokenPriceRegistry"); const TransferManager = artifacts.require("TransferManager"); const UpgraderToVersionManager = artifacts.require("UpgraderToVersionManager"); -const { assertRevert } = require("../utils/utilities.js"); +const utils = require("../utils/utilities.js"); const RelayManager = require("../utils/relay-manager"); contract("VersionManager", (accounts) => { @@ -74,12 +74,12 @@ contract("VersionManager", (accounts) => { describe("VersionManager owner", () => { it("should not let the VersionManager owner add a storage twice", async () => { - await assertRevert(versionManager.addStorage(lockStorage.address), "VM: storage already added"); + await utils.assertRevert(versionManager.addStorage(lockStorage.address), "VM: storage already added"); }); it("should not let the VersionManager owner add an inconsistent version", async () => { // Should fail: the _featuresToInit array includes a feature not listed in the _features array - await assertRevert( + await utils.assertRevert( versionManager.addVersion([relayerManager.address], [guardianManager.address]), "VM: invalid _featuresToInit", ); @@ -88,12 +88,12 @@ contract("VersionManager", (accounts) => { it("should not let the VersionManager owner set an invalid minVersion", async () => { const lastVersion = await versionManager.lastVersion(); - await assertRevert( + await utils.assertRevert( versionManager.setMinVersion(0), "VM: invalid _minVersion", ); - await assertRevert( + await utils.assertRevert( versionManager.setMinVersion(lastVersion.addn(1)), "VM: invalid _minVersion", ); @@ -102,7 +102,7 @@ contract("VersionManager", (accounts) => { describe("Wallet owner", () => { it("should not let the relayer call a forbidden method", async () => { - await assertRevert( + await utils.assertRevert( manager.relay(versionManager, "setOwner", [wallet.address, owner], wallet, [owner]), "VM: unknown method", ); @@ -110,7 +110,7 @@ contract("VersionManager", (accounts) => { it("should fail to upgrade a wallet when already on the last version", async () => { const lastVersion = await versionManager.lastVersion(); - await assertRevert( + await utils.assertRevert( versionManager.upgradeWallet(wallet.address, lastVersion, { from: owner }), "VM: already on new version", ); @@ -121,7 +121,7 @@ contract("VersionManager", (accounts) => { await versionManager.addVersion([], []); await versionManager.setMinVersion(await versionManager.lastVersion()); - await assertRevert( + await utils.assertRevert( versionManager.upgradeWallet(wallet.address, badVersion, { from: owner }), "VM: invalid _toVersion", ); @@ -133,20 +133,20 @@ contract("VersionManager", (accounts) => { await testFeature.invokeStorage(wallet.address, guardianStorage.address, data1, { from: owner }); let lock = await guardianStorage.getLock(wallet.address); - assert.isTrue(lock.eq(1), "Lock should have been set"); + assert.equal(lock, 1, "Lock should have been set"); const data0 = guardianStorage.contract.methods.setLock(wallet.address, 0).encodeABI(); await testFeature.invokeStorage(wallet.address, guardianStorage.address, data0, { from: owner }); lock = await guardianStorage.getLock(wallet.address); - assert.isTrue(lock.eq(0), "Lock should have been unset"); + assert.equal(lock, 0, "Lock should have been unset"); const newGuardianStorage = await GuardianStorage.new(); // not authorised in VersionManager - await assertRevert( + await utils.assertRevert( testFeature.invokeStorage(wallet.address, newGuardianStorage.address, data1, { from: owner }), "VM: invalid storage invoked", ); lock = await newGuardianStorage.getLock(wallet.address); - assert.isTrue(lock.eq(0), "Lock should not be set"); + assert.equal(lock, 0, "Lock should not be set"); }); it("should not allow the fallback to be called via a non-static call", async () => { diff --git a/utils/relay-manager.js b/utils/relay-manager.js index 87cfe4b01..e77147a1f 100644 --- a/utils/relay-manager.js +++ b/utils/relay-manager.js @@ -47,6 +47,7 @@ class RelayManager { ); return gasUsed; } + const tx = await this.relayerManager.execute( _wallet.address, _module.address, From 282b7a68c60a346fcc451e95aea6d9eacf228876 Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Thu, 29 Oct 2020 18:46:59 +0200 Subject: [PATCH 057/113] Fix defi scripts and maker tests --- scripts/deploy_defi.js | 16 +-- test/kyber.js | 3 +- test/makerV2Manager_invest.js | 31 +++-- test/makerV2Manager_loan.js | 205 +++++++++++++++++----------------- utils/defi-deployer.js | 26 ++--- utils/utilities.js | 2 +- 6 files changed, 144 insertions(+), 139 deletions(-) diff --git a/scripts/deploy_defi.js b/scripts/deploy_defi.js index 75e311430..561cc10f5 100644 --- a/scripts/deploy_defi.js +++ b/scripts/deploy_defi.js @@ -2,7 +2,7 @@ /* global artifacts */ const BN = require("bn.js"); -const { parseEther, formatBytes32String } = require("ethers").utils; +const { formatBytes32String } = require("ethers").utils; const DeployManager = require("../utils/deploy-manager.js"); @@ -66,13 +66,13 @@ async function deploy() { await skr.setOwner(tub.address); await sai.setOwner(tub.address); // setup USD/ETH oracle with a convertion rate of 100 USD/ETH - await pip.poke(`0x${USD_PER_ETH.toHexString().slice(2).padStart(64, "0")}`); + await pip.poke(`0x${USD_PER_ETH.toString(16, 64)}`); // setup USD/MKR oracle with a convertion rate of 400 USD/MKR - await pep.poke(`0x${USD_PER_MKR.toHexString().slice(2).padStart(64, "0")}`); + await pep.poke(`0x${USD_PER_MKR.toString(16, 64)}`); // set the total DAI debt ceiling to 50,000 DAI - await tub.mold(formatBytes32String("cap"), parseEther("50000")); + await tub.mold(formatBytes32String("cap"), web3.utils.toWei("50000")); // set the liquidity ratio to 150% - await tub.mold(formatBytes32String("mat"), RAY.times(3).div(2)); + await tub.mold(formatBytes32String("mat"), RAY.muln(3).divn(2)); // set the governance fee to 7.5% APR await tub.mold(formatBytes32String("fee"), "1000000002293273137447730714", { gasLimit: 150000 }); // set the liquidation penalty to 13% @@ -86,9 +86,9 @@ async function deploy() { /* *************** create MKR exchange ***************** */ - const ethLiquidity = parseEther("1"); - const mkrLiquidity = ethLiquidity.times(WAD).div(ETH_PER_MKR); - await gov["mint(address,uint256)"](manager, mkrLiquidity); + const ethLiquidity = new BN(web3.utils.toWei("1")); + const mkrLiquidity = ethLiquidity.mul(WAD).div(ETH_PER_MKR); + await gov.mint(manager, mkrLiquidity); await uniswapFactory.createExchange(gov.address, { gasLimit: 450000 }); let exchange = "0x0000000000000000000000000000000000000000"; diff --git a/test/kyber.js b/test/kyber.js index 2d6ab7527..5601cdf6a 100644 --- a/test/kyber.js +++ b/test/kyber.js @@ -5,11 +5,12 @@ const ERC20 = artifacts.require("TestERC20"); const chai = require("chai"); const BN = require("bn.js"); const bnChai = require("bn-chai"); -const { ETH_TOKEN, getBalance } = require("../utils/utilities.js"); const { expect } = chai; chai.use(bnChai(BN)); +const { ETH_TOKEN, getBalance } = require("../utils/utilities.js"); + const ERC20_SUPPLY = 10000000; const ERC20_DECIMALS = 18; const ERC20_RATE = 51 * 10 ** 13; // 1 ERC20 = 0.00051 ETH diff --git a/test/makerV2Manager_invest.js b/test/makerV2Manager_invest.js index 91fc869e7..faccf62ae 100644 --- a/test/makerV2Manager_invest.js +++ b/test/makerV2Manager_invest.js @@ -1,10 +1,14 @@ /* global artifacts */ const ethers = require("ethers"); +const chai = require("chai"); const BN = require("bn.js"); -const { - deployMaker, deployUniswap, WAD, ETH_PER_DAI, ETH_PER_MKR, -} = require("../utils/defi-deployer"); +const bnChai = require("bn-chai"); + +const { expect } = chai; +chai.use(bnChai(BN)); + +const { deployMaker, deployUniswap, WAD, ETH_PER_DAI, ETH_PER_MKR } = require("../utils/defi-deployer"); const RelayManager = require("../utils/relay-manager"); const Registry = artifacts.require("ModuleRegistry"); @@ -87,8 +91,8 @@ contract("MakerV2Invest", (accounts) => { await wallet.init(owner, [versionManager.address]); await versionManager.upgradeWallet(wallet.address, await versionManager.lastVersion(), { from: owner }); - await sai["mint(address,uint256)"](wallet.address, DAI_SENT.times(20)); - await dai["mint(address,uint256)"](wallet.address, DAI_SENT.times(20)); + await sai.mint(wallet.address, DAI_SENT.muln(20)); + await dai.mint(wallet.address, DAI_SENT.muln(20)); }); async function exchangeWithPot({ toPot, relayed, all = false }) { @@ -102,22 +106,27 @@ contract("MakerV2Invest", (accounts) => { } else { method = "exitDsr"; } - const params = [wallet.address].concat(all ? [] : [DAI_SENT]); + const params = [wallet.address].concat(all ? [] : [DAI_SENT.toString()]); + if (relayed) { await manager.relay(makerV2, method, params, wallet, [owner]); } else { - await (await makerV2[method](...params, { gasLimit: 2000000, from: owner })).wait(); + await makerV2[method](...params, { gasLimit: 2000000, from: owner }); } const walletAfter = (await dai.balanceOf(wallet.address)).add(await sai.balanceOf(wallet.address)); const investedAfter = await makerV2.dsrBalance(wallet.address); const deltaInvested = toPot ? investedAfter.sub(investedBefore) : investedBefore.sub(investedAfter); const deltaWallet = toPot ? walletBefore.sub(walletAfter) : walletAfter.sub(walletBefore); - assert.isTrue(deltaInvested.gt(0), "DAI in DSR should have changed."); - assert.isTrue(deltaWallet.gt(0), "DAI in wallet should have changed."); + // DAI in DSR should have changed + expect(deltaInvested).to.be.gt.BN(0); + // DAI in wallet should have changed + expect(deltaWallet).to.be.gt.BN(0); if (all) { - assert.isTrue(investedAfter.eq(0), "Pot should be emptied"); - assert.isTrue(walletAfter.gt(walletBefore), "DAI in wallet should have increased"); + // Pot should be emptied + expect(investedAfter).to.be.zero; + // DAI in wallet should have increased + expect(walletAfter).to.be.gt.BN(walletBefore); } } diff --git a/test/makerV2Manager_loan.js b/test/makerV2Manager_loan.js index c40ea674e..a248a6567 100644 --- a/test/makerV2Manager_loan.js +++ b/test/makerV2Manager_loan.js @@ -1,14 +1,16 @@ /* global artifacts */ const ethers = require("ethers"); +const chai = require("chai"); const BN = require("bn.js"); +const bnChai = require("bn-chai"); -const { - bigNumToBytes32, ETH_TOKEN, getEvent, hasEvent, increaseTime, getBalance, assertRevert -} = require("../utils/utilities.js"); -const { - deployMaker, deployUniswap, RAY, ETH_PER_DAI, ETH_PER_MKR, -} = require("../utils/defi-deployer"); +const { expect } = chai; +chai.use(bnChai(BN)); + +const utils = require("../utils/utilities.js"); +const { ETH_TOKEN } = require("../utils/utilities.js"); +const { deployMaker, deployUniswap, RAY, ETH_PER_DAI, ETH_PER_MKR } = require("../utils/defi-deployer"); const { formatBytes32String } = ethers.utils; const { AddressZero } = ethers.constants; @@ -140,7 +142,7 @@ contract("MakerV2Loan", (accounts) => { await versionManager.upgradeWallet(wallet.address, await versionManager.lastVersion(), { from: owner }); walletAddress = wallet.address; await wallet.send(web3.utils.toWei("2.0")); - await dai["mint(address,uint256)"](walletAddress, web3.utils.toWei("10")); + await dai.mint(walletAddress, web3.utils.toWei("10")); }); async function getTestAmounts(tokenAddress) { @@ -148,7 +150,7 @@ contract("MakerV2Loan", (accounts) => { const { ilk } = await makerRegistry.collaterals(tokenAddress_); const { spot, dust } = await vat.ilks(ilk); const daiAmount = dust.div(RAY); - const collateralAmount = dust.div(spot).times(2); + const collateralAmount = dust.div(spot).muln(2); return { daiAmount, collateralAmount }; } @@ -156,47 +158,39 @@ contract("MakerV2Loan", (accounts) => { collateralAmount, daiAmount, relayed, collateral = { address: ETH_TOKEN }, }) { const beforeCollateral = (collateral.address === ETH_TOKEN) - ? await getBalance(walletAddress) + ? await utils.getBalance(walletAddress) : await collateral.balanceOf(walletAddress); const beforeDAI = await dai.balanceOf(walletAddress); const beforeDAISupply = await dai.totalSupply(); const method = "openLoan"; - const params = [walletAddress, collateral.address, collateralAmount, dai.address, daiAmount]; + const params = [walletAddress, collateral.address, collateralAmount.toString(), dai.address, daiAmount.toString()]; let txReceipt; if (relayed) { txReceipt = await manager.relay(makerV2, method, params, wallet, [owner]); - const eventTransactionExecuted = await getEvent(txReceipt, relayerManager, "TransactionExecuted"); + const eventTransactionExecuted = await utils.getEvent(txReceipt, relayerManager, "TransactionExecuted"); assert.isTrue(eventTransactionExecuted.args.success, "Relayed tx should succeed"); } else { - txReceipt = await (await makerV2[method](...params, { gasLimit: 2000000, from: owner })).wait(); + const tx = await makerV2[method](...params, { gasLimit: 2000000, from: owner }); + txReceipt = tx.receipt; } - const eventLoanOpened = await getEvent(txReceipt, makerV2, "LoanOpened"); + const eventLoanOpened = await utils.getEvent(txReceipt, makerV2, "LoanOpened"); const loanId = eventLoanOpened.args._loanId; assert.isDefined(loanId, "Loan ID should be defined"); const afterCollateral = (collateral.address === ETH_TOKEN) - ? await getBalance(walletAddress) + ? await utils.getBalance(walletAddress) : await collateral.balanceOf(walletAddress); const afterDAI = await dai.balanceOf(walletAddress); const afterDAISupply = await dai.totalSupply(); - assert.equal( - beforeCollateral.sub(afterCollateral).toString(), - collateralAmount.toString(), - `wallet should have ${collateralAmount} less collateral (relayed: ${relayed})`, - ); - assert.equal( - afterDAI.sub(beforeDAI).toString(), - daiAmount.toString(), - `wallet should have ${daiAmount} more DAI (relayed: ${relayed})`, - ); - assert.equal( - afterDAISupply.sub(beforeDAISupply).toString(), - daiAmount.toString(), - `${daiAmount} DAI should have been minted (relayed: ${relayed})`, - ); + // wallet should have ${collateralAmount} less collateral (relayed: ${relayed}) + expect(beforeCollateral.sub(afterCollateral)).to.eq.BN(collateralAmount); + // wallet should have ${daiAmount} more DAI (relayed: ${relayed}) + expect(afterDAI.sub(beforeDAI)).to.eq.BN(daiAmount); + // ${daiAmount} DAI should have been minted (relayed: ${relayed}) + expect(afterDAISupply.sub(beforeDAISupply)).to.eq.BN(daiAmount); return loanId; } @@ -226,19 +220,19 @@ contract("MakerV2Loan", (accounts) => { it("should open>close>reopen a Loan (relayed tx)", async () => { const loanId = await testOpenLoan({ collateralAmount, daiAmount, relayed: true }); - await (await makerV2.closeLoan(walletAddress, loanId, { gasLimit: 4500000, from: owner })).wait(); + await makerV2.closeLoan(walletAddress, loanId, { gasLimit: 4500000, from: owner }); await testOpenLoan({ collateralAmount, daiAmount, relayed: true }); }); it("should not open a loan for the wrong debt token", async () => { - await assertRevert( + await utils.assertRevert( makerV2.openLoan(walletAddress, ETH_TOKEN, collateralAmount, sai.address, daiAmount, { from: owner }), "MV2: debt token not DAI", ); }); it("should not open a loan for an unsupported collateral token", async () => { - await assertRevert( + await utils.assertRevert( makerV2.openLoan(walletAddress, sai.address, collateralAmount, dai.address, daiAmount, { from: owner }), "MV2: unsupported collateral", ); @@ -249,29 +243,27 @@ contract("MakerV2Loan", (accounts) => { loanId, collateralAmount, add, relayed, collateral = { address: ETH_TOKEN }, makerV2Manager = makerV2, }) { const beforeCollateral = (collateral.address === ETH_TOKEN) - ? await getBalance(walletAddress) + ? await utils.getBalance(walletAddress) : await collateral.balanceOf(walletAddress); const method = add ? "addCollateral" : "removeCollateral"; - const params = [wallet.address, loanId, collateral.address, collateralAmount]; + const params = [wallet.address, loanId, collateral.address, collateralAmount.toString()]; if (relayed) { const txR = await manager.relay(makerV2Manager, method, params, wallet, [owner]); - const txExecutedEvent = await getEvent(txR, relayerManager, "TransactionExecuted"); + const txExecutedEvent = await utils.getEvent(txR, relayerManager, "TransactionExecuted"); assert.isTrue(txExecutedEvent.args.success, "Relayed tx should succeed"); } else { await makerV2Manager[method](...params, { gasLimit: 2000000, from: owner }); } const afterCollateral = (collateral.address === ETH_TOKEN) - ? await getBalance(walletAddress) + ? await utils.getBalance(walletAddress) : await collateral.balanceOf(walletAddress); - const expectedCollateralChange = collateralAmount.times(add ? -1 : 1).toString(); - assert.equal( - afterCollateral.sub(beforeCollateral).toString(), - expectedCollateralChange, - `wallet collateral should have changed by ${expectedCollateralChange} (relayed: ${relayed})`, - ); + const x = add ? -1 : 1; + const expectedCollateralChange = collateralAmount.mul(new BN(x)); + // wallet collateral should have changed by ${expectedCollateralChange} (relayed: ${relayed}) + expect(afterCollateral.sub(beforeCollateral)).to.eq.BN(expectedCollateralChange); } describe("Add/Remove Collateral", () => { @@ -287,14 +279,14 @@ contract("MakerV2Loan", (accounts) => { it("should add collateral (blockchain tx)", async () => { const loanId = await testOpenLoan({ collateralAmount, daiAmount, relayed: false }); await testChangeCollateral({ - loanId, collateralAmount: web3.utils.toWei("0.010"), add: true, relayed: false, + loanId, collateralAmount: new BN(web3.utils.toWei("0.010")), add: true, relayed: false, }); }); it("should add collateral (relayed tx)", async () => { const loanId = await testOpenLoan({ collateralAmount, daiAmount, relayed: true }); await testChangeCollateral({ - loanId, collateralAmount: web3.utils.toWei("0.010"), add: true, relayed: true, + loanId, collateralAmount: new BN(web3.utils.toWei("0.010")), add: true, relayed: true, }); }); @@ -304,7 +296,7 @@ contract("MakerV2Loan", (accounts) => { const wallet2 = await BaseWallet.at(proxy.address); await wallet2.init(owner2, [versionManager.address]); - await assertRevert( + await utils.assertRevert( makerV2.addCollateral(wallet2.address, loanId, ETH_TOKEN, web3.utils.toWei("0.010"), { from: owner2 }), "MV2: unauthorized loanId", ); @@ -313,21 +305,21 @@ contract("MakerV2Loan", (accounts) => { it("should remove collateral (blockchain tx)", async () => { const loanId = await testOpenLoan({ collateralAmount, daiAmount, relayed: false }); await testChangeCollateral({ - loanId, collateralAmount: web3.utils.toWei("0.010"), add: false, relayed: false, + loanId, collateralAmount: new BN(web3.utils.toWei("0.010")), add: false, relayed: false, }); }); it("should remove collateral (relayed tx)", async () => { const loanId = await testOpenLoan({ collateralAmount, daiAmount, relayed: true }); await testChangeCollateral({ - loanId, collateralAmount: web3.utils.toWei("0.010"), add: false, relayed: true, + loanId, collateralAmount: new BN(web3.utils.toWei("0.010")), add: false, relayed: true, }); }); it("should not remove collateral with invalid collateral amount", async () => { const loanId = await testOpenLoan({ collateralAmount, daiAmount, relayed: false }); - await assertRevert( - makerV2.removeCollateral(walletAddress, loanId, ETH_TOKEN, new BN(2).pow(255), { from: owner }), + await utils.assertRevert( + makerV2.removeCollateral(walletAddress, loanId, ETH_TOKEN, new BN(2).pow(new BN(255)), { from: owner }), "MV2: int overflow", ); }); @@ -338,7 +330,7 @@ contract("MakerV2Loan", (accounts) => { const wallet2 = await BaseWallet.at(proxy.address); await wallet2.init(owner2, [versionManager.address]); - await assertRevert( + await utils.assertRevert( makerV2.removeCollateral(wallet2.address, loanId, ETH_TOKEN, web3.utils.toWei("0.010"), { from: owner2 }), "MV2: unauthorized loanId", ); @@ -349,24 +341,21 @@ contract("MakerV2Loan", (accounts) => { loanId, daiAmount, add, relayed, }) { const beforeDAI = await dai.balanceOf(wallet.address); - const beforeETH = await getBalance(wallet.address); + const beforeETH = await utils.getBalance(wallet.address); const method = add ? "addDebt" : "removeDebt"; - const params = [wallet.address, loanId, dai.address, daiAmount]; + const params = [wallet.address, loanId, dai.address, daiAmount.toString()]; if (relayed) { const txR = await manager.relay(makerV2, method, params, { address: walletAddress }, [owner]); - const txExecutedEvent = await getEvent(txR, relayerManager, "TransactionExecuted"); + const txExecutedEvent = await utils.getEvent(txR, relayerManager, "TransactionExecuted"); assert.isTrue(txExecutedEvent.args.success, "Relayed tx should succeed"); } else { await makerV2[method](...params, { gasLimit: 2000000, from: owner }); } const afterDAI = await dai.balanceOf(wallet.address); - const afterETH = await getBalance(wallet.address); + const afterETH = await utils.getBalance(wallet.address); if (add) { - assert.equal( - afterDAI.sub(beforeDAI).toString(), - daiAmount.toString(), - `wallet DAI should have increased by ${daiAmount.toString()} (relayed: ${relayed})`, - ); + // wallet DAI should have increased by ${daiAmount.toString()} (relayed: ${relayed}) + expect(afterDAI.sub(beforeDAI)).to.eq.BN(daiAmount); } else { assert.isTrue( afterDAI.lt(beforeDAI) || afterETH.lt(beforeETH), @@ -405,7 +394,7 @@ contract("MakerV2Loan", (accounts) => { const wallet2 = await BaseWallet.at(proxy.address); await wallet2.init(owner2, [versionManager.address]); - await assertRevert( + await utils.assertRevert( makerV2.addDebt(wallet2.address, loanId, ETH_TOKEN, web3.utils.toWei("0.010"), { from: owner2 }), "MV2: unauthorized loanId", ); @@ -414,18 +403,18 @@ contract("MakerV2Loan", (accounts) => { async function testRepayDebt({ relayed }) { const { collateralAmount, daiAmount: daiAmount_ } = await getTestAmounts(ETH_TOKEN); - const daiAmount = daiAmount_.add(web3.utils.toWei("0.3")); + const daiAmount = daiAmount_.add(new BN(web3.utils.toWei("0.3"))); const loanId = await testOpenLoan({ collateralAmount, daiAmount, relayed }); - await increaseTime(3); // wait 3 seconds + await utils.increaseTime(3); // wait 3 seconds const beforeDAI = await dai.balanceOf(wallet.address); - const beforeETH = await getBalance(wallet.address); + const beforeETH = await utils.getBalance(wallet.address); await testChangeDebt({ loanId, daiAmount: web3.utils.toWei("0.2"), add: false, relayed, }); const afterDAI = await dai.balanceOf(wallet.address); - const afterETH = await getBalance(wallet.address); + const afterETH = await utils.getBalance(wallet.address); assert.isTrue(afterDAI.lt(beforeDAI) && afterETH.eq(beforeETH), "should have less DAI"); } @@ -442,8 +431,8 @@ contract("MakerV2Loan", (accounts) => { it("should not repay debt when only dust left", async () => { const { collateralAmount, daiAmount } = await getTestAmounts(ETH_TOKEN); const loanId = await testOpenLoan({ collateralAmount, daiAmount, relayed: false }); - await assertRevert( - makerV2.removeDebt(walletAddress, loanId, dai.address, daiAmount.sub(1), { from: owner }), + await utils.assertRevert( + makerV2.removeDebt(walletAddress, loanId, dai.address, daiAmount.subn(1), { from: owner }), "MV2: repay less or full", ); }); @@ -455,7 +444,7 @@ contract("MakerV2Loan", (accounts) => { const wallet2 = await BaseWallet.at(proxy.address); await wallet2.init(owner2, [versionManager.address]); - await assertRevert( + await utils.assertRevert( makerV2.removeDebt(wallet2.address, loanId, ETH_TOKEN, web3.utils.toWei("0.010"), { from: owner2 }), "MV2: unauthorized loanId", ); @@ -466,21 +455,21 @@ contract("MakerV2Loan", (accounts) => { const { collateralAmount, daiAmount } = await getTestAmounts(ETH_TOKEN); const loanId = await testOpenLoan({ collateralAmount, daiAmount, relayed }); // give some ETH to the wallet to be used for repayment - await owner.send({ to: walletAddress, value: collateralAmount.times(2) }); - await increaseTime(3); // wait 3 seconds + await wallet.send(collateralAmount.muln(2), { from: owner }); + await utils.increaseTime(3); // wait 3 seconds const beforeDAI = await dai.balanceOf(wallet.address); const method = "closeLoan"; const params = [wallet.address, loanId]; if (relayed) { const txR = await manager.relay(makerV2, method, params, { address: walletAddress }, [owner]); - const txExecutedEvent = await getEvent(txR, relayerManager, "TransactionExecuted"); + const txExecutedEvent = await utils.getEvent(txR, relayerManager, "TransactionExecuted"); assert.isTrue(txExecutedEvent.args.success, "Relayed tx should succeed"); } else { await makerV2[method](...params, { gasLimit: 3000000, from: owner }); } const afterDAI = await dai.balanceOf(wallet.address); - - assert.isTrue(afterDAI.lt(beforeDAI), "should have spent some DAI"); + // should have spent some DAI + expect(afterDAI).to.be.lt.BN(beforeDAI); } describe("Close Vaults", () => { @@ -499,7 +488,7 @@ contract("MakerV2Loan", (accounts) => { const wallet2 = await BaseWallet.at(proxy.address); await wallet2.init(owner2, [versionManager.address]); - await assertRevert( + await utils.assertRevert( makerV2.closeLoan(wallet2.address, loanId, { from: owner2 }), "MV2: unauthorized loanId", ); @@ -518,7 +507,7 @@ contract("MakerV2Loan", (accounts) => { it("should open a loan with a newly added collateral token", async () => { await makerRegistry.addCollateral(batJoin.address); const { daiAmount, collateralAmount } = await getTestAmounts(bat.address); - await bat["mint(address,uint256)"](walletAddress, collateralAmount); + await bat.mint(walletAddress, collateralAmount); await testOpenLoan({ collateralAmount, daiAmount, collateral: bat, relayed: false, }); @@ -527,12 +516,12 @@ contract("MakerV2Loan", (accounts) => { it("should not add a collateral when Join is not in the Vat", async () => { const badJoin = await GemJoin.new(vat.address, formatBytes32String("BAD"), bat.address); - await assertRevert(makerRegistry.addCollateral(badJoin.address), "MR: _joinAdapter not authorised in vat"); + await utils.assertRevert(makerRegistry.addCollateral(badJoin.address), "MR: _joinAdapter not authorised in vat"); }); it("should not add a duplicate collateral", async () => { await makerRegistry.addCollateral(batJoin.address); - await assertRevert(makerRegistry.addCollateral(batJoin.address), "MR: collateral already added"); + await utils.assertRevert(makerRegistry.addCollateral(batJoin.address), "MR: collateral already added"); await makerRegistry.removeCollateral(bat.address); // cleanup }); @@ -545,7 +534,7 @@ contract("MakerV2Loan", (accounts) => { }); it("should not remove a non-existing collateral", async () => { - await assertRevert(makerRegistry.removeCollateral(bat.address), "MR: collateral does not exist"); + await utils.assertRevert(makerRegistry.removeCollateral(bat.address), "MR: collateral does not exist"); }); }); @@ -553,30 +542,32 @@ contract("MakerV2Loan", (accounts) => { async function testAcquireVault({ relayed }) { // Create the vault with `owner` as owner const { ilk } = await makerRegistry.collaterals(weth.address); - const txR = await (await cdpManager.open(ilk, owner), { from: owner }).wait(); - const txNewCdpEvent = await getEvent(txR, cdpManager, "NewCdp"); + const tx = await cdpManager.open(ilk, owner, { from: owner }); + const txNewCdpEvent = await utils.getEvent(tx.receipt, cdpManager, "NewCdp"); const vaultId = txNewCdpEvent.args.cdp; // Transfer the vault to the wallet await cdpManager.give(vaultId, walletAddress, { from: owner }); // Transfer the vault to the feature - const loanId = bigNumToBytes32(vaultId); + const loanId = utils.numberToBytes32(vaultId); + const method = "acquireLoan"; const params = [walletAddress, loanId]; let txReceipt; if (relayed) { txReceipt = await manager.relay(makerV2, method, params, { address: walletAddress }, [owner]); - const txExecutedEvent = await getEvent(txR, relayerManager, "TransactionExecuted"); - assert.isTrue(txExecutedEvent.args.success, "Relayed tx should succeed"); + const { success } = await utils.parseRelayReceipt(txReceipt); + assert.isTrue(success, "Relayed tx should succeed"); } else { - const tx = await makerV2[method](...params, { gasLimit: 1000000, from: owner }); - txReceipt = tx.receipt; + const tx1 = await makerV2[method](...params, { gasLimit: 1000000, from: owner }); + txReceipt = tx1.receipt; } - await hasEvent(txReceipt, makerV2, "LoanAcquired"); + await utils.hasEvent(txReceipt, makerV2, "LoanAcquired"); // The loanId held by the MakerV2Manager will be different from the transferred vault id, in case the latter was merged into an existing vault const featureLoanId = await makerV2.loanIds(walletAddress, ilk); // Add some collateral and debt const { collateralAmount, daiAmount } = await getTestAmounts(ETH_TOKEN); + await testChangeCollateral({ loanId: featureLoanId, collateralAmount, add: true, relayed, makerV2, }); @@ -596,12 +587,12 @@ contract("MakerV2Loan", (accounts) => { it("should not transfer a vault that is not owned by the wallet", async () => { // Create the vault with `owner` as owner const { ilk } = await makerRegistry.collaterals(weth.address); - const txR = await (await cdpManager.open(ilk, owner, { from: owner })).wait(); - const txNewCdpEvent = await getEvent(txR, cdpManager, "NewCdp"); + const tx = await cdpManager.open(ilk, owner, { from: owner }); + const txNewCdpEvent = await utils.getEvent(tx.receipt, cdpManager, "NewCdp"); const vaultId = txNewCdpEvent.args.cdp; - const loanId = bigNumToBytes32(vaultId); + const loanId = utils.numberToBytes32(vaultId); // We are NOT transferring the vault from the owner to the wallet - await assertRevert( + await utils.assertRevert( makerV2.acquireLoan(walletAddress, loanId, { from: owner }), "MV2: wrong vault owner", ); }); @@ -610,16 +601,19 @@ contract("MakerV2Loan", (accounts) => { // Deploy a fake wallet const fakeWallet = await FakeWallet.new(false, AddressZero, 0, "0x00"); await fakeWallet.init(owner, [versionManager.address]); - await versionManager.upgradeWallet(fakeWallet.address, await versionManager.lastVersion(), { from: owner }); + const lastVersion = await versionManager.lastVersion(); + await versionManager.upgradeWallet(fakeWallet.address, lastVersion.toString(), { from: owner }); // Create the vault with `owner` as owner const { ilk } = await makerRegistry.collaterals(weth.address); - const txR = await (await cdpManager.open(ilk, owner, { from: owner })).wait(); - const txNewCdpEvent = await getEvent(txR, cdpManager, "NewCdp"); + const tx = await cdpManager.open(ilk, owner, { from: owner }); + const txNewCdpEvent = await utils.getEvent(tx.receipt, cdpManager, "NewCdp"); const vaultId = txNewCdpEvent.args.cdp; - const loanId = bigNumToBytes32(vaultId); + const loanId = utils.numberToBytes32(vaultId); + // Transfer the vault to the fake wallet await cdpManager.give(vaultId, fakeWallet.address, { from: owner }); - await assertRevert( + + await utils.assertRevert( makerV2.acquireLoan(fakeWallet.address, loanId, { from: owner }), "MV2: failed give", ); }); @@ -638,19 +632,20 @@ contract("MakerV2Loan", (accounts) => { it("should not allow reentrancy in acquireLoan", async () => { // Deploy a fake wallet capable of reentrancy - const acquireLoanCallData = makerV2.contract.methods.acquireLoan([AddressZero, bigNumToBytes32(ethers.BigNumber.from(0))]).encodeABI(); + const acquireLoanCallData = makerV2.contract.methods.acquireLoan(AddressZero, utils.numberToBytes32(0)).encodeABI(); const fakeWallet = await FakeWallet.new(true, makerV2.address, 0, acquireLoanCallData); await fakeWallet.init(owner, [versionManager.address]); - await versionManager.upgradeWallet(fakeWallet.address, await versionManager.lastVersion(), { from: owner }); + const lastVersion = await versionManager.lastVersion(); + await versionManager.upgradeWallet(fakeWallet.address, lastVersion.toString(), { from: owner }); // Create the vault with `owner` as owner const { ilk } = await makerRegistry.collaterals(weth.address); - const txR = await (await cdpManager.open(ilk, owner, { from: owner })).wait(); - const txNewCdpEvent = await getEvent(txR, cdpManager, "NewCdp"); + const tx = await cdpManager.open(ilk, owner, { from: owner }); + const txNewCdpEvent = await utils.getEvent(tx.receipt, cdpManager, "NewCdp"); const vaultId = txNewCdpEvent.args.cdp; - const loanId = bigNumToBytes32(vaultId); + const loanId = utils.numberToBytes32(vaultId); // Transfer the vault to the fake wallet await cdpManager.give(vaultId, fakeWallet.address, { from: owner }); - await assertRevert( + await utils.assertRevert( makerV2.acquireLoan(fakeWallet.address, loanId, { from: owner }), "MV2: reentrant call", ); }); @@ -693,7 +688,7 @@ contract("MakerV2Loan", (accounts) => { if (withBatVault) { // Open a BAT vault with the old MakerV2 feature const batTestAmounts = await getTestAmounts(bat.address); - await bat["mint(address,uint256)"](walletAddress, batTestAmounts.collateralAmount.add(web3.utils.toWei("0.01"))); + await bat.mint(walletAddress, batTestAmounts.collateralAmount.add(web3.utils.toWei("0.01"))); loanId2 = await testOpenLoan({ collateralAmount: batTestAmounts.collateralAmount, daiAmount: batTestAmounts.daiAmount, @@ -713,7 +708,7 @@ contract("MakerV2Loan", (accounts) => { const params = [walletAddress, lastVersion]; if (relayed) { const txR = await manager.relay(versionManager, method, params, wallet, [owner]); - const txTransactionExecuted = await getEvent(txR, cdpManager, "NewCdp"); + const txTransactionExecuted = await utils.getEvent(txR, cdpManager, "NewCdp"); assert.isTrue(txTransactionExecuted.args.success, "Relayed tx should succeed"); } else { await versionManager[method](...params, { gasLimit: 2000000, from: owner }); @@ -765,7 +760,7 @@ contract("MakerV2Loan", (accounts) => { }); it("should not allow non-feature to give vault", async () => { - await assertRevert(makerV2.giveVault(walletAddress, formatBytes32String(""), { from: owner }), "BF: must be a wallet feature"); + await utils.assertRevert(makerV2.giveVault(walletAddress, formatBytes32String(""), { from: owner }), "BF: must be a wallet feature"); }); it("should not allow (fake) feature to give unowned vault", async () => { @@ -781,8 +776,8 @@ contract("MakerV2Loan", (accounts) => { const lastVersion = await versionManager.lastVersion(); await versionManager.upgradeWallet(walletAddress, lastVersion, { gasLimit: 2000000, from: owner }); // Use the bad module to attempt a bad giveVault call - const callData = makerV2.contract.methods.giveVault([walletAddress, bigNumToBytes32(ethers.BigNumber.from(666))]).encodeABI(); - await assertRevert(badFeature.callContract(makerV2.address, 0, callData, { from: owner }), "MV2: unauthorized loanId"); + const callData = makerV2.contract.methods.giveVault([walletAddress, utils.numberToBytes32(666)]).encodeABI(); + await utils.assertRevert(badFeature.callContract(makerV2.address, 0, callData, { from: owner }), "MV2: unauthorized loanId"); }); }); }); diff --git a/utils/defi-deployer.js b/utils/defi-deployer.js index 3dd7d83f3..e8a98a928 100644 --- a/utils/defi-deployer.js +++ b/utils/defi-deployer.js @@ -1,11 +1,10 @@ /* global artifacts */ -const { parseEther, formatBytes32String } = require("ethers").utils; -const web3 = require("web3"); +const { formatBytes32String } = require("ethers").utils; const BN = require("bn.js"); -const UniswapFactory = require("../lib/uniswap/UniswapFactory"); -const UniswapExchange = require("../lib/uniswap/UniswapExchange"); +const UniswapFactory = artifacts.require("UniswapFactory"); +const UniswapExchange = artifacts.require("UniswapExchange"); const ScdMcdMigration = artifacts.require("ScdMcdMigration"); const DSValue = artifacts.require("DSValue"); @@ -37,7 +36,7 @@ module.exports = { ETH_PER_MKR, ETH_PER_DAI, - deployUniswap: async (infrastructure, tokens = [], ethPerToken = [], ethLiquidity = parseEther("10")) => { + deployUniswap: async (infrastructure, tokens = [], ethPerToken = [], ethLiquidity = web3.utils.toWei("10")) => { const uniswapFactory = await UniswapFactory.new(); const uniswapTemplateExchange = await UniswapExchange.new(); await uniswapFactory.initializeFactory(uniswapTemplateExchange.address); @@ -46,8 +45,9 @@ module.exports = { await uniswapFactory.createExchange(token.address, { from: infrastructure }); const uniswapExchangeAddress = await uniswapFactory.getExchange(token.address); const tokenExchange = await UniswapExchange.at(uniswapExchangeAddress); - const tokenLiquidity = ethLiquidity.mul(WAD).div(ethPerToken[i]); - await token["mint(address,uint256)"](infrastructure, tokenLiquidity); + + const tokenLiquidity = new BN(ethLiquidity).mul(WAD).div(ethPerToken[i]); + await token.mint(infrastructure, tokenLiquidity); await token.approve(tokenExchange.address, tokenLiquidity, { from: infrastructure }); const { timestamp } = await web3.eth.getBlock("latest"); await tokenExchange.addLiquidity(1, tokenLiquidity, timestamp + 300, { value: ethLiquidity, gasLimit: 150000, from: infrastructure }); @@ -82,11 +82,11 @@ module.exports = { await skr.setOwner(tub.address); await sai.setOwner(tub.address); // Setup USD/ETH oracle with a convertion rate of 100 USD/ETH - await pip.poke(`0x${USD_PER_ETH.toHexString().slice(2).padStart(64, "0")}`); + await pip.poke(`0x${USD_PER_ETH.toString(16, 64)}`); // Setup USD/MKR oracle with a convertion rate of 400 USD/MKR - await pep.poke(`0x${USD_PER_MKR.toHexString().slice(2).padStart(64, "0")}`); + await pep.poke(`0x${USD_PER_MKR.toString(16, 64)}`); // Set the total DAI debt ceiling to 50,000 DAI - await tub.mold(formatBytes32String("cap"), parseEther("50000")); + await tub.mold(formatBytes32String("cap"), web3.utils.toWei("50000")); // Set the collateralization ratio to 150% await tub.mold(formatBytes32String("mat"), MAT); // Set the governance fee to 7.5% APR @@ -99,7 +99,7 @@ module.exports = { // Vat setup const vat = await Vat.new(); // Setting the debt ceiling - await vat["file(bytes32,uint256)"](formatBytes32String("Line"), "138000000000000000000000000000000000000000000000000000"); + await vat.file(formatBytes32String("Line"), "138000000000000000000000000000000000000000000000000000"); const cdpManager = await CdpManager.new(vat.address); @@ -158,8 +158,8 @@ module.exports = { daiJoin.address, ); // Setting up the common migration vault used by ScdMcdMigration - const initialSaiAmountInMigrationVault = parseEther("1000"); - await sai["mint(address,uint256)"](infrastructure, initialSaiAmountInMigrationVault); + const initialSaiAmountInMigrationVault = web3.utils.toWei("1000"); + await sai.mint(infrastructure, initialSaiAmountInMigrationVault); await sai.approve(migration.address, initialSaiAmountInMigrationVault, { from: infrastructure }); await migration.swapSaiToDai(initialSaiAmountInMigrationVault, { from: infrastructure }); diff --git a/utils/utilities.js b/utils/utilities.js index 699382d3b..7371cca6a 100644 --- a/utils/utilities.js +++ b/utils/utilities.js @@ -25,7 +25,7 @@ module.exports = { asciiToBytes32: (input) => ethers.utils.formatBytes32String(input), // return ethers.utils.hexlify(ethers.utils.toUtf8Bytes(input)); - bigNumToBytes32: (input) => ethers.utils.hexZeroPad(input.toHexString(), 32), + numberToBytes32: (input) => `0x${new BN(input).toString(16, 64)}`, waitForUserInput: (text) => new Promise((resolve) => { const rl = readline.createInterface({ From 6dc83df6f67d56e29cbe04a155b8c5fe087dd918 Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Fri, 30 Oct 2020 15:59:12 +0200 Subject: [PATCH 058/113] Provision uniswap lib artefacts to build/contracts folder --- .circleci/config.yml | 3 ++ .etherlime-store/.history.json | 1 - package.json | 2 +- scripts/provision_lib_artefacts.sh | 46 ++---------------------------- 4 files changed, 6 insertions(+), 46 deletions(-) delete mode 100644 .etherlime-store/.history.json diff --git a/.circleci/config.yml b/.circleci/config.yml index d9191f3b5..a4204388f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -74,6 +74,9 @@ jobs: - run: name: "Compiling test contracts" command: npm run compile:test + - run: + name: "Provision lib artefacts" + command: npm run provision:lib:artefacts - run: name: "Lint JavaScript" command: npm run lint:js diff --git a/.etherlime-store/.history.json b/.etherlime-store/.history.json deleted file mode 100644 index 394541d6f..000000000 --- a/.etherlime-store/.history.json +++ /dev/null @@ -1 +0,0 @@ -{"data":{}} diff --git a/package.json b/package.json index 6a085bd1d..af1f24804 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "compile:wallet": "npx truffle compile --config truffle-config-wallet.js", "compile:test": "npx truffle compile --config truffle-config-contracts-test.js", "compile": "npm run compile:infrastructure && npm run compile:modules && npm run compile:wallet", - "cc": "rm -rf build && rm -rf build-legacy && npm run compile:lib && npm run compile && npm run compile:legacy && npm run compile:test", + "cc": "rm -rf build && rm -rf build-legacy && npm run compile:lib && npm run compile && npm run compile:legacy && npm run compile:test && npm run provision:lib:artefacts", "ganache": "npx ganache-cli --chainId 1895 --networkId 1597649375983 --gasLimit=20700000 -e 10000 --acctKeys=\"./ganache-accounts.json\" --account=\"0x7ab741b57e8d94dd7e1a29055646bafde7010f38a900f55bbd7647880faa6ee8, 100000000000000000000000000000000000000\" --account=\"0x2030b463177db2da82908ef90fa55ddfcef56e8183caf60db464bc398e736e6f, 100000000000000000000000000000000000000\" --account=\"0x62ecd49c4ccb41a70ad46532aed63cf815de15864bc415c87d507afd6a5e8da2, 100000000000000000000000000000000000000\" --account=\"0xf473040b1a83739a9c7cc1f5719fab0f5bf178f83314d98557c58aae1910e03a, 100000000000000000000000000000000000000\" --account=\"0x823d590ed2cb5e8493bb0efc834771c1cde36f9fc49b9fe3620ebd0754ad6ea2, 100000000000000000000000000000000000000\" --account=\"0xd6d710943471e4c37ceb787857e7a2b41ca57f9cb4307ee9a9b21436a8e709c3, 100000000000000000000000000000000000000\" --account=\"0x187bb12e927c1652377405f81d93ce948a593f7d66cfba383ee761858b05921a, 100000000000000000000000000000000000000\" --account=\"0xf41486fdb04505e7966c8720a353ed92ce0d6830f8a5e915fbde735106a06d25, 100000000000000000000000000000000000000\" --account=\"0x6ca40ba4cca775643398385022264c0c414da1abd21d08d9e7136796a520a543, 100000000000000000000000000000000000000\" --account=\"0xfac0bc9325ad342033afe956e83f0bf8f1e863c1c3e956bc75d66961fe4cd186, 100000000000000000000000000000000000000\"", "kovan-fork": "npx ganache-cli -i 42 -l 20700000 -f https://kovan.infura.io/v3/$(cat .env | sed -En 's/INFURA_KEY=''\"''([^''\"'']+)''\"''/\\1/p')@16988040", "kovan-fork-latest": "npx ganache-cli -i 42 -l 20700000 -f https://kovan.infura.io/v3/$(cat .env | sed -En 's/INFURA_KEY=''\"''([^''\"'']+)''\"''/\\1/p')", diff --git a/scripts/provision_lib_artefacts.sh b/scripts/provision_lib_artefacts.sh index c35440054..60bbbc85d 100644 --- a/scripts/provision_lib_artefacts.sh +++ b/scripts/provision_lib_artefacts.sh @@ -3,47 +3,5 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" cd $DIR cd .. -while [ ! -d ./.coverage_artifacts ]; do sleep 1; done - -cp build/ENSRegistry.json .coverage_artifacts/ENSRegistry.json -cp build/ENSRegistryWithFallback.json .coverage_artifacts/ENSRegistryWithFallback.json -cp build/ReverseRegistrar.json .coverage_artifacts/ReverseRegistrar.json -cp build/KyberNetworkTest.json .coverage_artifacts/KyberNetworkTest.json -cp build/TestERC20.json .coverage_artifacts/TestERC20.json -cp build/TestERC721.json .coverage_artifacts/TestERC721.json -cp build/TestContract.json .coverage_artifacts/TestContract.json -cp build/Unitroller.json .coverage_artifacts/Unitroller.json -cp build/SimplePriceOracle.json .coverage_artifacts/SimplePriceOracle.json -cp build/PriceOracleProxy.json .coverage_artifacts/PriceOracleProxy.json -cp build/Comptroller.json .coverage_artifacts/Comptroller.json -cp build/WhitePaperInterestRateModel.json .coverage_artifacts/WhitePaperInterestRateModel.json -cp build/CEther.json .coverage_artifacts/CEther.json -cp build/CErc20.json .coverage_artifacts/CErc20.json -cp build/SaiVox.json .coverage_artifacts/SaiVox.json -cp build/SaiTub.json .coverage_artifacts/SaiTub.json -cp build/WETH9.json .coverage_artifacts/WETH9.json -cp build/DSToken.json .coverage_artifacts/DSToken.json -cp build/DSValue.json .coverage_artifacts/DSValue.json -cp build/CryptoKittyTest.json .coverage_artifacts/CryptoKittyTest.json -cp build/TestRegistry.json .coverage_artifacts/TestRegistry.json -cp build/GemJoin.json .coverage_artifacts/GemJoin.json -cp build/NonCompliantERC20.json .coverage_artifacts/NonCompliantERC20.json -cp build/TestFeature.json .coverage_artifacts/TestFeature.json -cp build/TestLimitFeature.json .coverage_artifacts/TestLimitFeature.json -cp build/NonCompliantGuardian.json .coverage_artifacts/NonCompliantGuardian.json -cp build/FaucetUser.json .coverage_artifacts/FaucetUser.json -cp build/TestCdpManager.json .coverage_artifacts/TestCdpManager.json -cp build/TestUpgradedMakerV2Manager.json .coverage_artifacts/TestUpgradedMakerV2Manager.json -cp build/ERC20Approver.json .coverage_artifacts/ERC20Approver.json -cp build/FakeWallet.json .coverage_artifacts/FakeWallet.json -cp build/AugustusSwapper.json .coverage_artifacts/AugustusSwapper.json -cp build/Whitelisted.json .coverage_artifacts/Whitelisted.json -cp build/PartnerRegistry.json .coverage_artifacts/PartnerRegistry.json -cp build/PartnerDeployer.json .coverage_artifacts/PartnerDeployer.json -cp build/Kyber.json .coverage_artifacts/Kyber.json -cp build/UniswapV2.json .coverage_artifacts/UniswapV2.json -cp build/UniswapV2Factory.json .coverage_artifacts/UniswapV2Factory.json -cp build/UniswapV2Router01.json .coverage_artifacts/UniswapV2Router01.json -cp build/WETH9.json .coverage_artifacts/WETH9.json -cp build/BadFeature.json .coverage_artifacts/BadFeature.json -cp build/DS*.json .coverage_artifacts \ No newline at end of file +cp lib/uniswap/UniswapExchange.json build/contracts/UniswapExchange.json +cp lib/uniswap/UniswapFactory.json build/contracts/UniswapFactory.json \ No newline at end of file From d0141dec07fe6b84ff1ae88b9582755c3dc071e7 Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Fri, 30 Oct 2020 17:18:53 +0200 Subject: [PATCH 059/113] Add eth-gas-reporter to truffle --- package-lock.json | 799 +++++++++++++++++++++++++++++++++++++++++++++- package.json | 5 +- truffle-config.js | 8 + 3 files changed, 809 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2cc5b63f5..9b7e592b3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4,6 +4,12 @@ "lockfileVersion": 1, "requires": true, "dependencies": { + "-": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/-/-/--0.0.1.tgz", + "integrity": "sha512-3HfneK3DGAm05fpyj20sT3apkNcvPpCuccOThOPdzz8sY7GgQGe0l93XH9bt+YzibcTIgUAIMoyVJI740RtgyQ==", + "dev": true + }, "@babel/code-frame": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", @@ -513,6 +519,24 @@ "@types/node": "*" } }, + "@types/concat-stream": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@types/concat-stream/-/concat-stream-1.6.0.tgz", + "integrity": "sha1-OU2+C7X+5Gs42JZzXoto7yOQ0A0=", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "@types/form-data": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/@types/form-data/-/form-data-0.0.33.tgz", + "integrity": "sha1-yayFsqX9GENbjIXZ7LUObWyJP/g=", + "dev": true, + "requires": { + "@types/node": "*" + } + }, "@types/json5": { "version": "0.0.29", "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", @@ -537,6 +561,12 @@ "@types/node": "*" } }, + "@types/qs": { + "version": "6.9.5", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.5.tgz", + "integrity": "sha512-/JHkVHtx/REVG0VVToGRGH2+23hsYLHdyG+GrvoUGlGAd0ErauXDyvHtRI/7H7mzLm+tBCKA7pfcpkQ1lf58iQ==", + "dev": true + }, "@types/secp256k1": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/@types/secp256k1/-/secp256k1-4.0.1.tgz", @@ -700,6 +730,12 @@ "is-string": "^1.0.4" } }, + "asap": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", + "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=", + "dev": true + }, "asn1": { "version": "0.2.4", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", @@ -837,6 +873,24 @@ "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.1.0.tgz", "integrity": "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==" }, + "bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "dev": true, + "requires": { + "file-uri-to-path": "1.0.0" + } + }, + "bip66": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/bip66/-/bip66-1.1.5.tgz", + "integrity": "sha1-AfqHSHhcpwlV1QESF9GzE5lpyiI=", + "dev": true, + "requires": { + "safe-buffer": "^5.0.1" + } + }, "blakejs": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/blakejs/-/blakejs-1.1.0.tgz", @@ -1010,6 +1064,12 @@ "isarray": "^1.0.0" } }, + "buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", + "dev": true + }, "buffer-to-arraybuffer": { "version": "0.0.5", "resolved": "https://registry.npmjs.org/buffer-to-arraybuffer/-/buffer-to-arraybuffer-0.0.5.tgz", @@ -1127,6 +1187,12 @@ "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==" }, + "charenc": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/charenc/-/charenc-0.0.2.tgz", + "integrity": "sha1-wKHS86cJLgN3S/qD8UwPxXkKhmc=", + "dev": true + }, "check-error": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", @@ -1226,6 +1292,50 @@ "string-width": "^1.0.1" } }, + "cli-table3": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.5.1.tgz", + "integrity": "sha512-7Qg2Jrep1S/+Q3EceiZtQcDPWxhAvBw+ERf1162v4sikJrvojMHFqXt8QIVha8UlH9rgU0BeWPytZ9/TzYqlUw==", + "dev": true, + "requires": { + "colors": "^1.1.2", + "object-assign": "^4.1.0", + "string-width": "^2.1.1" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + }, "cli-truncate": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-2.1.0.tgz", @@ -1354,8 +1464,7 @@ "colors": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", - "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", - "optional": true + "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==" }, "combined-stream": { "version": "1.0.8", @@ -1385,6 +1494,50 @@ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" }, + "concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, "confusing-browser-globals": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/confusing-browser-globals/-/confusing-browser-globals-1.0.9.tgz", @@ -1529,6 +1682,12 @@ } } }, + "crypt": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/crypt/-/crypt-0.0.2.tgz", + "integrity": "sha1-iNf/fsDfuG9xPch7u0LQRNPmxBs=", + "dev": true + }, "crypto-browserify": { "version": "3.12.0", "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", @@ -1693,6 +1852,17 @@ "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-6.2.0.tgz", "integrity": "sha512-HygQCKUBSFl8wKQZBSemMywRWcEDNidvNbjGVyZu3nbZ8qq9ubiPoGLMdRDpfSrpkkm9BXYFkpKxxFX38o/76w==" }, + "drbg.js": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/drbg.js/-/drbg.js-1.0.1.tgz", + "integrity": "sha1-Pja2xCs3BDgjzbwzLVjzHiRFSAs=", + "dev": true, + "requires": { + "browserify-aes": "^1.0.6", + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4" + } + }, "duplexer3": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", @@ -2461,6 +2631,330 @@ "js-sha3": "^0.5.7" } }, + "eth-gas-reporter": { + "version": "0.2.19", + "resolved": "https://registry.npmjs.org/eth-gas-reporter/-/eth-gas-reporter-0.2.19.tgz", + "integrity": "sha512-yQmbAa6O9/Yl/syNml2A0R+ZLQnJ9m9jogFXHzjMWVBMUVnAcEskOVyxaMYddkclZdYIMxE99tQy830C2jLsAQ==", + "dev": true, + "requires": { + "@ethersproject/abi": "^5.0.0-beta.146", + "@solidity-parser/parser": "^0.8.0", + "cli-table3": "^0.5.0", + "colors": "^1.1.2", + "ethereumjs-util": "6.2.0", + "ethers": "^4.0.40", + "fs-readdir-recursive": "^1.1.0", + "lodash": "^4.17.14", + "markdown-table": "^1.1.3", + "mocha": "^7.1.1", + "req-cwd": "^2.0.0", + "request": "^2.88.0", + "request-promise-native": "^1.0.5", + "sha1": "^1.1.1", + "sync-request": "^6.0.0" + }, + "dependencies": { + "ansi-colors": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz", + "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==", + "dev": true + }, + "bn.js": { + "version": "4.11.9", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", + "dev": true + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "dependencies": { + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "chokidar": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.3.0.tgz", + "integrity": "sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A==", + "dev": true, + "requires": { + "anymatch": "~3.1.1", + "braces": "~3.0.2", + "fsevents": "~2.1.1", + "glob-parent": "~5.1.0", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.2.0" + } + }, + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "diff": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "dev": true + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true + }, + "ethereumjs-util": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.0.tgz", + "integrity": "sha512-vb0XN9J2QGdZGIEKG2vXM+kUdEivUfU6Wmi5y0cg+LRhDYKnXIZ/Lz7XjFbHRR9VIKq2lVGLzGBkA++y2nOdOQ==", + "dev": true, + "requires": { + "@types/bn.js": "^4.11.3", + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "ethjs-util": "0.1.6", + "keccak": "^2.0.0", + "rlp": "^2.2.3", + "secp256k1": "^3.0.1" + } + }, + "ethers": { + "version": "4.0.48", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-4.0.48.tgz", + "integrity": "sha512-sZD5K8H28dOrcidzx9f8KYh8083n5BexIO3+SbE4jK83L85FxtpXZBCQdXb8gkg+7sBqomcLhhkU7UHL+F7I2g==", + "dev": true, + "requires": { + "aes-js": "3.0.0", + "bn.js": "^4.4.0", + "elliptic": "6.5.3", + "hash.js": "1.1.3", + "js-sha3": "0.5.7", + "scrypt-js": "2.0.4", + "setimmediate": "1.0.4", + "uuid": "2.0.1", + "xmlhttprequest": "1.8.0" + } + }, + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "glob": { + "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", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "hash.js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", + "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.0" + } + }, + "js-yaml": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "keccak": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/keccak/-/keccak-2.1.0.tgz", + "integrity": "sha512-m1wbJRTo+gWbctZWay9i26v5fFnYkOn7D5PCxJ3fZUGUEb49dE1Pm4BREUYCt/aoO6di7jeoGmhvqN9Nzylm3Q==", + "dev": true, + "requires": { + "bindings": "^1.5.0", + "inherits": "^2.0.4", + "nan": "^2.14.0", + "safe-buffer": "^5.2.0" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true + }, + "log-symbols": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz", + "integrity": "sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ==", + "dev": true, + "requires": { + "chalk": "^2.4.2" + } + }, + "mocha": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-7.2.0.tgz", + "integrity": "sha512-O9CIypScywTVpNaRrCAgoUnJgozpIofjKUYmJhiCIJMiuYnLI6otcb1/kpW9/n/tJODHGZ7i8aLQoDVsMtOKQQ==", + "dev": true, + "requires": { + "ansi-colors": "3.2.3", + "browser-stdout": "1.3.1", + "chokidar": "3.3.0", + "debug": "3.2.6", + "diff": "3.5.0", + "escape-string-regexp": "1.0.5", + "find-up": "3.0.0", + "glob": "7.1.3", + "growl": "1.10.5", + "he": "1.2.0", + "js-yaml": "3.13.1", + "log-symbols": "3.0.0", + "minimatch": "3.0.4", + "mkdirp": "0.5.5", + "ms": "2.1.1", + "node-environment-flags": "1.0.6", + "object.assign": "4.1.0", + "strip-json-comments": "2.0.1", + "supports-color": "6.0.0", + "which": "1.3.1", + "wide-align": "1.1.3", + "yargs": "13.3.2", + "yargs-parser": "13.1.2", + "yargs-unparser": "1.6.0" + } + }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, + "readdirp": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.2.0.tgz", + "integrity": "sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ==", + "dev": true, + "requires": { + "picomatch": "^2.0.4" + } + }, + "scrypt-js": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-2.0.4.tgz", + "integrity": "sha512-4KsaGcPnuhtCZQCxFxN3GVYIhKFPTdLd8PLC552XwbMndtD0cjRFAhDuuydXQ0h08ZfPgzqe6EKHozpuH74iDw==", + "dev": true + }, + "secp256k1": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-3.8.0.tgz", + "integrity": "sha512-k5ke5avRZbtl9Tqx/SA7CbY3NF6Ro+Sj9cZxezFzuBlLDmyqPiL8hJJ+EmzD8Ig4LUDByHJ3/iPOVoRixs/hmw==", + "dev": true, + "requires": { + "bindings": "^1.5.0", + "bip66": "^1.1.5", + "bn.js": "^4.11.8", + "create-hash": "^1.2.0", + "drbg.js": "^1.0.1", + "elliptic": "^6.5.2", + "nan": "^2.14.0", + "safe-buffer": "^5.1.2" + } + }, + "setimmediate": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.4.tgz", + "integrity": "sha1-IOgd5iLUoCWIzgyNqJc8vPHTE48=", + "dev": true + }, + "supports-color": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz", + "integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "uuid": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.1.tgz", + "integrity": "sha1-wqMN7bPlNdcsz4LjQ5QaULqFM6w=", + "dev": true + }, + "yargs-unparser": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.0.tgz", + "integrity": "sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw==", + "dev": true, + "requires": { + "flat": "^4.1.0", + "lodash": "^4.17.15", + "yargs": "^13.3.0" + } + } + } + }, "eth-lib": { "version": "0.1.29", "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.1.29.tgz", @@ -2899,6 +3393,12 @@ "flat-cache": "^2.0.1" } }, + "file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", + "dev": true + }, "fill-range": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", @@ -3052,6 +3552,12 @@ "minipass": "^2.6.0" } }, + "fs-readdir-recursive": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz", + "integrity": "sha512-GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA==", + "dev": true + }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -3870,6 +4376,12 @@ "resolved": "https://registry.npmjs.org/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.2.tgz", "integrity": "sha512-I0UBV/XOz1XkIJHEUDMZAbzCThU/H8DxmSfmdGcKPnVhu2VfFqr34jr9777IyaTYvxjedWhqVIilEDsCdP5G6g==" }, + "get-port": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/get-port/-/get-port-3.2.0.tgz", + "integrity": "sha1-3Xzn3hh8Bsi/NTeWrHHgmfCYDrw=", + "dev": true + }, "get-stream": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", @@ -4062,6 +4574,18 @@ "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==", "dev": true }, + "http-basic": { + "version": "8.1.3", + "resolved": "https://registry.npmjs.org/http-basic/-/http-basic-8.1.3.tgz", + "integrity": "sha512-/EcDMwJZh3mABI2NhGfHOGOeOZITqfkEO4p/xK+l3NpyncIHUQBoMvCSF/b5GqvKtySC2srL/GGG3+EtlqlmCw==", + "dev": true, + "requires": { + "caseless": "^0.12.0", + "concat-stream": "^1.6.2", + "http-response-object": "^3.0.1", + "parse-cache-control": "^1.0.1" + } + }, "http-cache-semantics": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", @@ -4091,6 +4615,23 @@ "resolved": "https://registry.npmjs.org/http-https/-/http-https-1.0.0.tgz", "integrity": "sha1-L5CN1fHbQGjAWM1ubUzjkskTOJs=" }, + "http-response-object": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/http-response-object/-/http-response-object-3.0.2.tgz", + "integrity": "sha512-bqX0XTF6fnXSQcEJ2Iuyr75yVakyjIDCqroJQ/aHfSdlM743Cwqoi2nDYMzLGWUcuTWGWy8AAvOKXTfiv6q9RA==", + "dev": true, + "requires": { + "@types/node": "^10.0.3" + }, + "dependencies": { + "@types/node": { + "version": "10.17.44", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.44.tgz", + "integrity": "sha512-vHPAyBX1ffLcy4fQHmDyIUMUb42gHZjPHU66nhvbMzAWJqHnySGZ6STwN3rwrnSd1FHB0DI/RWgGELgKSYRDmw==", + "dev": true + } + } + }, "http-signature": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", @@ -4973,6 +5514,31 @@ "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==" }, + "markdown-table": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-1.1.3.tgz", + "integrity": "sha512-1RUZVgQlpJSPWYbFSpmudq5nHY1doEIv89gBtF0s4gW1GF2XorxcA/70M5vq7rLv0a6mhOUccRsqkwhwLCIQ2Q==", + "dev": true + }, + "md5": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/md5/-/md5-2.3.0.tgz", + "integrity": "sha512-T1GITYmFaKuO91vxyoQMFETst+O71VUPEU3ze5GNzDm0OWdP8v1ziTaAEPUr/3kLsY3Sftgz242A1SetQiDL7g==", + "dev": true, + "requires": { + "charenc": "0.0.2", + "crypt": "0.0.2", + "is-buffer": "~1.1.6" + }, + "dependencies": { + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + } + } + }, "md5.js": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", @@ -5244,6 +5810,51 @@ } } }, + "mocha-junit-reporter": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mocha-junit-reporter/-/mocha-junit-reporter-2.0.0.tgz", + "integrity": "sha512-20HoWh2HEfhqmigfXOKUhZQyX23JImskc37ZOhIjBKoBEsb+4cAFRJpAVhFpnvsztLklW/gFVzsrobjLwmX4lA==", + "dev": true, + "requires": { + "debug": "^2.2.0", + "md5": "^2.1.0", + "mkdirp": "~0.5.1", + "strip-ansi": "^4.0.0", + "xml": "^1.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + }, "mock-fs": { "version": "4.13.0", "resolved": "https://registry.npmjs.org/mock-fs/-/mock-fs-4.13.0.tgz", @@ -5317,6 +5928,12 @@ "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==" }, + "nan": { + "version": "2.14.2", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.2.tgz", + "integrity": "sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ==", + "dev": true + }, "nano-json-stream-parser": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/nano-json-stream-parser/-/nano-json-stream-parser-0.1.2.tgz", @@ -5352,6 +5969,24 @@ "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-2.0.2.tgz", "integrity": "sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==" }, + "node-environment-flags": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.6.tgz", + "integrity": "sha512-5Evy2epuL+6TM0lCQGpFIj6KwiEsGh1SrHUhTbNX+sLbBtjidPZFAnVK9y5yU1+h//RitLbRHTIMyxQPtxMdHw==", + "dev": true, + "requires": { + "object.getownpropertydescriptors": "^2.0.3", + "semver": "^5.7.0" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, "node-fetch": { "version": "2.6.1", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", @@ -5486,6 +6121,16 @@ "has": "^1.0.3" } }, + "object.getownpropertydescriptors": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz", + "integrity": "sha512-Z53Oah9A3TdLoblT7VKJaTDdXdT+lQO+cNpKVnya5JDe9uLvzu1YyY1yFDFrcxrlRgWrEFH0jJtD/IbuwjcEVg==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0-next.1" + } + }, "object.values": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.1.tgz", @@ -5630,6 +6275,12 @@ "safe-buffer": "^5.1.1" } }, + "parse-cache-control": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parse-cache-control/-/parse-cache-control-1.0.1.tgz", + "integrity": "sha1-juqz5U+laSD+Fro493+iGqzC104=", + "dev": true + }, "parse-headers": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/parse-headers/-/parse-headers-2.0.3.tgz", @@ -5757,11 +6408,26 @@ "resolved": "https://registry.npmjs.org/process/-/process-0.5.2.tgz", "integrity": "sha1-FjjYqONML0QKkduVq5rrZ3/Bhc8=" }, + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true + }, "progress": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==" }, + "promise": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/promise/-/promise-8.1.0.tgz", + "integrity": "sha512-W04AqnILOL/sPRXziNicCjSNRruLAuIHEOVBazepu0545DDNGYHz7ar9ZgZ1fMU8/MA4mVxp5rkBWRi6OXIy3Q==", + "dev": true, + "requires": { + "asap": "~2.0.6" + } + }, "promise.allsettled": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/promise.allsettled/-/promise.allsettled-1.0.2.tgz", @@ -5981,6 +6647,32 @@ "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==" }, + "req-cwd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/req-cwd/-/req-cwd-2.0.0.tgz", + "integrity": "sha1-1AgrTURZgDZkD7c93qAe1T20nrw=", + "dev": true, + "requires": { + "req-from": "^2.0.0" + } + }, + "req-from": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/req-from/-/req-from-2.0.0.tgz", + "integrity": "sha1-10GI5H+TeW9Kpx327jWuaJ8+DnA=", + "dev": true, + "requires": { + "resolve-from": "^3.0.0" + }, + "dependencies": { + "resolve-from": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", + "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", + "dev": true + } + } + }, "request": { "version": "2.88.2", "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", @@ -6015,6 +6707,34 @@ } } }, + "request-promise-core": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.4.tgz", + "integrity": "sha512-TTbAfBBRdWD7aNNOoVOBH4pN/KigV6LyapYNNlAPA8JwbovRti1E88m3sYAwsLi5ryhPKsE9APwnjFTgdUjTpw==", + "dev": true, + "requires": { + "lodash": "^4.17.19" + }, + "dependencies": { + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true + } + } + }, + "request-promise-native": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/request-promise-native/-/request-promise-native-1.0.9.tgz", + "integrity": "sha512-wcW+sIUiWnKgNY0dqCpOZkUbF/I+YPi+f09JZIDa39Ec+q82CpSYniDp+ISgTTbKmnpJWASeJBPZmoxH84wt3g==", + "dev": true, + "requires": { + "request-promise-core": "1.1.4", + "stealthy-require": "^1.1.1", + "tough-cookie": "^2.3.3" + } + }, "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -6259,6 +6979,16 @@ "safe-buffer": "^5.0.1" } }, + "sha1": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/sha1/-/sha1-1.1.1.tgz", + "integrity": "sha1-rdqnqTFo85PxnrKxUJFhjicA+Eg=", + "dev": true, + "requires": { + "charenc": ">= 0.0.1", + "crypt": ">= 0.0.1" + } + }, "shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -6771,6 +7501,12 @@ "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" }, + "stealthy-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/stealthy-require/-/stealthy-require-1.1.1.tgz", + "integrity": "sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks=", + "dev": true + }, "strict-uri-encode": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", @@ -6955,6 +7691,26 @@ } } }, + "sync-request": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/sync-request/-/sync-request-6.1.0.tgz", + "integrity": "sha512-8fjNkrNlNCrVc/av+Jn+xxqfCjYaBoHqCsDz6mt030UMxJGr+GSfCV1dQt2gRtlL63+VPidwDVLr7V2OcTSdRw==", + "dev": true, + "requires": { + "http-response-object": "^3.0.1", + "sync-rpc": "^1.2.1", + "then-request": "^6.0.0" + } + }, + "sync-rpc": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/sync-rpc/-/sync-rpc-1.3.6.tgz", + "integrity": "sha512-J8jTXuZzRlvU7HemDgHi3pGnh/rkoqR/OZSjhTyyZrEkkYQbk7Z33AXp37mkPfPpfdOuj7Ex3H/TJM1z48uPQw==", + "dev": true, + "requires": { + "get-port": "^3.1.0" + } + }, "table": { "version": "5.4.6", "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", @@ -7040,6 +7796,33 @@ "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=" }, + "then-request": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/then-request/-/then-request-6.0.2.tgz", + "integrity": "sha512-3ZBiG7JvP3wbDzA9iNY5zJQcHL4jn/0BWtXIkagfz7QgOL/LqjCEOBQuJNZfu0XYnv5JhKh+cDxCPM4ILrqruA==", + "dev": true, + "requires": { + "@types/concat-stream": "^1.6.0", + "@types/form-data": "0.0.33", + "@types/node": "^8.0.0", + "@types/qs": "^6.2.31", + "caseless": "~0.12.0", + "concat-stream": "^1.6.0", + "form-data": "^2.2.0", + "http-basic": "^8.1.1", + "http-response-object": "^3.0.1", + "promise": "^8.0.0", + "qs": "^6.4.0" + }, + "dependencies": { + "@types/node": { + "version": "8.10.66", + "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.66.tgz", + "integrity": "sha512-tktOkFUA4kXx2hhhrB8bIFb5TbwzS4uOhKEmwiD+NoiL0qtP2OQ9mFldbgD4dV1djrlBYP6eBuQZiWjuHUpqFw==", + "dev": true + } + } + }, "through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", @@ -7168,6 +7951,12 @@ "mime-types": "~2.1.24" } }, + "typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", + "dev": true + }, "typedarray-to-buffer": { "version": "3.1.5", "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", @@ -7866,6 +8655,12 @@ "cookiejar": "^2.1.1" } }, + "xml": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/xml/-/xml-1.0.1.tgz", + "integrity": "sha1-eLpyAgApxbyHuKgaPPzXS0ovweU=", + "dev": true + }, "xml2js": { "version": "0.4.19", "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz", diff --git a/package.json b/package.json index af1f24804..8e922def5 100644 --- a/package.json +++ b/package.json @@ -89,8 +89,11 @@ "web3-eth-abi": "^1.2.9" }, "devDependencies": { + "-": "0.0.1", "eslint": "^7.5.0", "eslint-config-airbnb-base": "^14.0.0", - "eslint-plugin-import": "^2.20.1" + "eslint-plugin-import": "^2.20.1", + "eth-gas-reporter": "^0.2.19", + "mocha-junit-reporter": "^2.0.0" } } diff --git a/truffle-config.js b/truffle-config.js index 5900784be..4c008179b 100644 --- a/truffle-config.js +++ b/truffle-config.js @@ -80,7 +80,15 @@ module.exports = { // Set default mocha options here, use special reporters etc. mocha: { + useColors: true, timeout: 1000000, + reporter: "eth-gas-reporter", + reporterOptions: { + currency: "USD", + gasPrice: 50, + onlyCalledMethods: false, + excludeContracts: ["Migrations"], + }, }, // Configure your compilers From dc2f56efe5aeff12ee8c0ff79647b2b3511598f8 Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Mon, 2 Nov 2020 08:47:32 +0200 Subject: [PATCH 060/113] Set gas reporter to only show called methods --- truffle-config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/truffle-config.js b/truffle-config.js index 4c008179b..07d089a28 100644 --- a/truffle-config.js +++ b/truffle-config.js @@ -86,7 +86,7 @@ module.exports = { reporterOptions: { currency: "USD", gasPrice: 50, - onlyCalledMethods: false, + onlyCalledMethods: true, excludeContracts: ["Migrations"], }, }, From 2195dd2fd841ff64e804bdae686b902328d68b0f Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Mon, 2 Nov 2020 09:39:48 +0200 Subject: [PATCH 061/113] Consolidate truffle configuration in config base file --- truffle-config-contracts-legacy-1.3.js | 90 ++------------------- truffle-config-contracts-legacy-1.6.js | 90 ++------------------- truffle-config-contracts-test.js | 90 ++------------------- truffle-config-infrastructure-0.5.js | 90 ++------------------- truffle-config-infrastructure.js | 90 ++------------------- truffle-config-lib.js | 21 ++--- truffle-config-modules.js | 90 ++------------------- truffle-config-wallet.js | 90 ++------------------- truffle-config.base.js | 107 +++++++++++++++++++++++++ truffle-config.js | 98 ++-------------------- 10 files changed, 153 insertions(+), 703 deletions(-) create mode 100644 truffle-config.base.js diff --git a/truffle-config-contracts-legacy-1.3.js b/truffle-config-contracts-legacy-1.3.js index 5e90c847e..bb0369a50 100644 --- a/truffle-config-contracts-legacy-1.3.js +++ b/truffle-config-contracts-legacy-1.3.js @@ -1,95 +1,15 @@ -/** - * Use this file to configure your truffle project. It's seeded with some - * common settings for different networks and features like migrations, - * compilation and testing. Uncomment the ones you need or modify - * them to suit your project as necessary. - * - * More information about configuration can be found at: - * - * truffleframework.com/docs/advanced/configuration - * - * To deploy via Infura you'll need a wallet provider (like @truffle/hdwallet-provider) - * to sign your transactions before they're sent to a remote public node. Infura accounts - * are available for free at: infura.io/register. - * - * You'll also need a mnemonic - the twelve word phrase the wallet uses to generate - * public/private key pairs. If you're publishing your code to GitHub make sure you load this - * phrase from a file you've .gitignored so it doesn't accidentally become public. - * - */ - -// const HDWalletProvider = require('@truffle/hdwallet-provider'); -// const infuraKey = "fj4jll3k....."; -// -// const fs = require('fs'); -// const mnemonic = fs.readFileSync(".secret").toString().trim(); +const baseConfig = require("./truffle-config.base.js"); module.exports = { - /** - * Networks define how you connect to your ethereum client and let you set the - * defaults web3 uses to send transactions. If you don't specify one truffle - * will spin up a development blockchain for you on port 9545 when you - * run `develop` or `test`. You can ask a truffle command to use a specific - * network from the command line, e.g - * - * $ truffle test --network - */ + ...baseConfig, contracts_directory: "contracts-legacy/v1.3.0", contracts_build_directory: "build-legacy/v1.3.0", - networks: { - // Useful for testing. The `development` name is special - truffle uses it by default - // if it's defined here and no other network is specified at the command line. - // You should run a client (like ganache-cli, geth or parity) in a separate terminal - // tab if you use this network and you must also set the `host`, `port` and `network_id` - // options below to some value. - // - development: { - host: "127.0.0.1", // Localhost (default: none) - port: 8545, // Standard Ethereum port (default: none) - network_id: "1597649375983", - gas: 20700000 - }, - - // Another network with more advanced options... - // advanced: { - // port: 8777, // Custom port - // network_id: 1342, // Custom network - // gas: 8500000, // Gas sent with each transaction (default: ~6700000) - // gasPrice: 20000000000, // 20 gwei (in wei) (default: 100 gwei) - // from:
, // Account to send txs from (default: accounts[0]) - // websockets: true // Enable EventEmitter interface for web3 (default: false) - // }, - - // Useful for deploying to a public network. - // NB: It's important to wrap the provider as a function. - // ropsten: { - // provider: () => new HDWalletProvider(mnemonic, `https://ropsten.infura.io/v3/YOUR-PROJECT-ID`), - // network_id: 3, // Ropsten's id - // gas: 5500000, // Ropsten has a lower block limit than mainnet - // confirmations: 2, // # of confs to wait between deployments. (default: 0) - // timeoutBlocks: 200, // # of blocks before a deployment times out (minimum/default: 50) - // skipDryRun: true // Skip dry run before migrations? (default: false for public nets ) - // }, - - // Useful for private networks - // private: { - // provider: () => new HDWalletProvider(mnemonic, `https://network.io`), - // network_id: 2111, // This network is yours, in the cloud. - // production: true // Treats this network as if it was a public net. (default: false) - // } - }, - - // Set default mocha options here, use special reporters etc. - mocha: { - timeout: 100000, - }, - // Configure your compilers compilers: { solc: { - version: "0.5.4", // Fetch exact version from solc-bin (default: truffle's version) - docker: true, // Use "0.5.1" you've installed locally with docker (default: false) - settings: { // See the solidity docs for advice about optimization and evmVersion + version: "0.5.4", + docker: true, + settings: { optimizer: { enabled: true, runs: 999, diff --git a/truffle-config-contracts-legacy-1.6.js b/truffle-config-contracts-legacy-1.6.js index 8bf3721c4..9dbacb8df 100644 --- a/truffle-config-contracts-legacy-1.6.js +++ b/truffle-config-contracts-legacy-1.6.js @@ -1,95 +1,15 @@ -/** - * Use this file to configure your truffle project. It's seeded with some - * common settings for different networks and features like migrations, - * compilation and testing. Uncomment the ones you need or modify - * them to suit your project as necessary. - * - * More information about configuration can be found at: - * - * truffleframework.com/docs/advanced/configuration - * - * To deploy via Infura you'll need a wallet provider (like @truffle/hdwallet-provider) - * to sign your transactions before they're sent to a remote public node. Infura accounts - * are available for free at: infura.io/register. - * - * You'll also need a mnemonic - the twelve word phrase the wallet uses to generate - * public/private key pairs. If you're publishing your code to GitHub make sure you load this - * phrase from a file you've .gitignored so it doesn't accidentally become public. - * - */ - -// const HDWalletProvider = require('@truffle/hdwallet-provider'); -// const infuraKey = "fj4jll3k....."; -// -// const fs = require('fs'); -// const mnemonic = fs.readFileSync(".secret").toString().trim(); +const baseConfig = require("./truffle-config.base.js"); module.exports = { - /** - * Networks define how you connect to your ethereum client and let you set the - * defaults web3 uses to send transactions. If you don't specify one truffle - * will spin up a development blockchain for you on port 9545 when you - * run `develop` or `test`. You can ask a truffle command to use a specific - * network from the command line, e.g - * - * $ truffle test --network - */ + ...baseConfig, contracts_directory: "contracts-legacy/v1.6.0", contracts_build_directory: "build-legacy/v1.6.0", - networks: { - // Useful for testing. The `development` name is special - truffle uses it by default - // if it's defined here and no other network is specified at the command line. - // You should run a client (like ganache-cli, geth or parity) in a separate terminal - // tab if you use this network and you must also set the `host`, `port` and `network_id` - // options below to some value. - // - development: { - host: "127.0.0.1", // Localhost (default: none) - port: 8545, // Standard Ethereum port (default: none) - network_id: "1597649375983", - gas: 20700000 - }, - - // Another network with more advanced options... - // advanced: { - // port: 8777, // Custom port - // network_id: 1342, // Custom network - // gas: 8500000, // Gas sent with each transaction (default: ~6700000) - // gasPrice: 20000000000, // 20 gwei (in wei) (default: 100 gwei) - // from:
, // Account to send txs from (default: accounts[0]) - // websockets: true // Enable EventEmitter interface for web3 (default: false) - // }, - - // Useful for deploying to a public network. - // NB: It's important to wrap the provider as a function. - // ropsten: { - // provider: () => new HDWalletProvider(mnemonic, `https://ropsten.infura.io/v3/YOUR-PROJECT-ID`), - // network_id: 3, // Ropsten's id - // gas: 5500000, // Ropsten has a lower block limit than mainnet - // confirmations: 2, // # of confs to wait between deployments. (default: 0) - // timeoutBlocks: 200, // # of blocks before a deployment times out (minimum/default: 50) - // skipDryRun: true // Skip dry run before migrations? (default: false for public nets ) - // }, - - // Useful for private networks - // private: { - // provider: () => new HDWalletProvider(mnemonic, `https://network.io`), - // network_id: 2111, // This network is yours, in the cloud. - // production: true // Treats this network as if it was a public net. (default: false) - // } - }, - - // Set default mocha options here, use special reporters etc. - mocha: { - timeout: 100000, - }, - // Configure your compilers compilers: { solc: { - version: "0.5.4", // Fetch exact version from solc-bin (default: truffle's version) - docker: true, // Use "0.5.1" you've installed locally with docker (default: false) - settings: { // See the solidity docs for advice about optimization and evmVersion + version: "0.5.4", + docker: true, + settings: { optimizer: { enabled: true, runs: 999, diff --git a/truffle-config-contracts-test.js b/truffle-config-contracts-test.js index e8f5ddee4..42189d97c 100644 --- a/truffle-config-contracts-test.js +++ b/truffle-config-contracts-test.js @@ -1,94 +1,14 @@ -/** - * Use this file to configure your truffle project. It's seeded with some - * common settings for different networks and features like migrations, - * compilation and testing. Uncomment the ones you need or modify - * them to suit your project as necessary. - * - * More information about configuration can be found at: - * - * truffleframework.com/docs/advanced/configuration - * - * To deploy via Infura you'll need a wallet provider (like @truffle/hdwallet-provider) - * to sign your transactions before they're sent to a remote public node. Infura accounts - * are available for free at: infura.io/register. - * - * You'll also need a mnemonic - the twelve word phrase the wallet uses to generate - * public/private key pairs. If you're publishing your code to GitHub make sure you load this - * phrase from a file you've .gitignored so it doesn't accidentally become public. - * - */ - -// const HDWalletProvider = require('@truffle/hdwallet-provider'); -// const infuraKey = "fj4jll3k....."; -// -// const fs = require('fs'); -// const mnemonic = fs.readFileSync(".secret").toString().trim(); +const baseConfig = require("./truffle-config.base.js"); module.exports = { - /** - * Networks define how you connect to your ethereum client and let you set the - * defaults web3 uses to send transactions. If you don't specify one truffle - * will spin up a development blockchain for you on port 9545 when you - * run `develop` or `test`. You can ask a truffle command to use a specific - * network from the command line, e.g - * - * $ truffle test --network - */ + ...baseConfig, contracts_directory: "contracts-test", - networks: { - // Useful for testing. The `development` name is special - truffle uses it by default - // if it's defined here and no other network is specified at the command line. - // You should run a client (like ganache-cli, geth or parity) in a separate terminal - // tab if you use this network and you must also set the `host`, `port` and `network_id` - // options below to some value. - // - development: { - host: "127.0.0.1", // Localhost (default: none) - port: 8545, // Standard Ethereum port (default: none) - network_id: "1597649375983", - gas: 20700000 - }, - - // Another network with more advanced options... - // advanced: { - // port: 8777, // Custom port - // network_id: 1342, // Custom network - // gas: 8500000, // Gas sent with each transaction (default: ~6700000) - // gasPrice: 20000000000, // 20 gwei (in wei) (default: 100 gwei) - // from:
, // Account to send txs from (default: accounts[0]) - // websockets: true // Enable EventEmitter interface for web3 (default: false) - // }, - - // Useful for deploying to a public network. - // NB: It's important to wrap the provider as a function. - // ropsten: { - // provider: () => new HDWalletProvider(mnemonic, `https://ropsten.infura.io/v3/YOUR-PROJECT-ID`), - // network_id: 3, // Ropsten's id - // gas: 5500000, // Ropsten has a lower block limit than mainnet - // confirmations: 2, // # of confs to wait between deployments. (default: 0) - // timeoutBlocks: 200, // # of blocks before a deployment times out (minimum/default: 50) - // skipDryRun: true // Skip dry run before migrations? (default: false for public nets ) - // }, - - // Useful for private networks - // private: { - // provider: () => new HDWalletProvider(mnemonic, `https://network.io`), - // network_id: 2111, // This network is yours, in the cloud. - // production: true // Treats this network as if it was a public net. (default: false) - // } - }, - - // Set default mocha options here, use special reporters etc. - mocha: { - timeout: 100000, - }, - // Configure your compilers compilers: { solc: { - version: "0.6.12", // Fetch exact version from solc-bin (default: truffle's version) - docker: true, // Use "0.5.1" you've installed locally with docker (default: false) - settings: { // See the solidity docs for advice about optimization and evmVersion + version: "0.6.12", + docker: true, + settings: { optimizer: { enabled: true, runs: 999, diff --git a/truffle-config-infrastructure-0.5.js b/truffle-config-infrastructure-0.5.js index 307115deb..7df15c25d 100644 --- a/truffle-config-infrastructure-0.5.js +++ b/truffle-config-infrastructure-0.5.js @@ -1,94 +1,14 @@ -/** - * Use this file to configure your truffle project. It's seeded with some - * common settings for different networks and features like migrations, - * compilation and testing. Uncomment the ones you need or modify - * them to suit your project as necessary. - * - * More information about configuration can be found at: - * - * truffleframework.com/docs/advanced/configuration - * - * To deploy via Infura you'll need a wallet provider (like @truffle/hdwallet-provider) - * to sign your transactions before they're sent to a remote public node. Infura accounts - * are available for free at: infura.io/register. - * - * You'll also need a mnemonic - the twelve word phrase the wallet uses to generate - * public/private key pairs. If you're publishing your code to GitHub make sure you load this - * phrase from a file you've .gitignored so it doesn't accidentally become public. - * - */ - -// const HDWalletProvider = require('@truffle/hdwallet-provider'); -// const infuraKey = "fj4jll3k....."; -// -// const fs = require('fs'); -// const mnemonic = fs.readFileSync(".secret").toString().trim(); +const baseConfig = require("./truffle-config.base.js"); module.exports = { - /** - * Networks define how you connect to your ethereum client and let you set the - * defaults web3 uses to send transactions. If you don't specify one truffle - * will spin up a development blockchain for you on port 9545 when you - * run `develop` or `test`. You can ask a truffle command to use a specific - * network from the command line, e.g - * - * $ truffle test --network - */ + ...baseConfig, contracts_directory: "contracts/infrastructure_0.5", - networks: { - // Useful for testing. The `development` name is special - truffle uses it by default - // if it's defined here and no other network is specified at the command line. - // You should run a client (like ganache-cli, geth or parity) in a separate terminal - // tab if you use this network and you must also set the `host`, `port` and `network_id` - // options below to some value. - // - development: { - host: "127.0.0.1", // Localhost (default: none) - port: 8545, // Standard Ethereum port (default: none) - network_id: "1597649375983", - gas: 20700000 - }, - - // Another network with more advanced options... - // advanced: { - // port: 8777, // Custom port - // network_id: 1342, // Custom network - // gas: 8500000, // Gas sent with each transaction (default: ~6700000) - // gasPrice: 20000000000, // 20 gwei (in wei) (default: 100 gwei) - // from:
, // Account to send txs from (default: accounts[0]) - // websockets: true // Enable EventEmitter interface for web3 (default: false) - // }, - - // Useful for deploying to a public network. - // NB: It's important to wrap the provider as a function. - // ropsten: { - // provider: () => new HDWalletProvider(mnemonic, `https://ropsten.infura.io/v3/YOUR-PROJECT-ID`), - // network_id: 3, // Ropsten's id - // gas: 5500000, // Ropsten has a lower block limit than mainnet - // confirmations: 2, // # of confs to wait between deployments. (default: 0) - // timeoutBlocks: 200, // # of blocks before a deployment times out (minimum/default: 50) - // skipDryRun: true // Skip dry run before migrations? (default: false for public nets ) - // }, - - // Useful for private networks - // private: { - // provider: () => new HDWalletProvider(mnemonic, `https://network.io`), - // network_id: 2111, // This network is yours, in the cloud. - // production: true // Treats this network as if it was a public net. (default: false) - // } - }, - - // Set default mocha options here, use special reporters etc. - mocha: { - timeout: 100000, - }, - // Configure your compilers compilers: { solc: { - version: "0.5.4", // Fetch exact version from solc-bin (default: truffle's version) - docker: true, // Use "0.5.1" you've installed locally with docker (default: false) - settings: { // See the solidity docs for advice about optimization and evmVersion + version: "0.5.4", + docker: true, + settings: { optimizer: { enabled: true, runs: 999, diff --git a/truffle-config-infrastructure.js b/truffle-config-infrastructure.js index ad140bd44..730a7b1f2 100644 --- a/truffle-config-infrastructure.js +++ b/truffle-config-infrastructure.js @@ -1,94 +1,14 @@ -/** - * Use this file to configure your truffle project. It's seeded with some - * common settings for different networks and features like migrations, - * compilation and testing. Uncomment the ones you need or modify - * them to suit your project as necessary. - * - * More information about configuration can be found at: - * - * truffleframework.com/docs/advanced/configuration - * - * To deploy via Infura you'll need a wallet provider (like @truffle/hdwallet-provider) - * to sign your transactions before they're sent to a remote public node. Infura accounts - * are available for free at: infura.io/register. - * - * You'll also need a mnemonic - the twelve word phrase the wallet uses to generate - * public/private key pairs. If you're publishing your code to GitHub make sure you load this - * phrase from a file you've .gitignored so it doesn't accidentally become public. - * - */ - -// const HDWalletProvider = require('@truffle/hdwallet-provider'); -// const infuraKey = "fj4jll3k....."; -// -// const fs = require('fs'); -// const mnemonic = fs.readFileSync(".secret").toString().trim(); +const baseConfig = require("./truffle-config.base.js"); module.exports = { - /** - * Networks define how you connect to your ethereum client and let you set the - * defaults web3 uses to send transactions. If you don't specify one truffle - * will spin up a development blockchain for you on port 9545 when you - * run `develop` or `test`. You can ask a truffle command to use a specific - * network from the command line, e.g - * - * $ truffle test --network - */ + ...baseConfig, contracts_directory: "contracts/infrastructure", - networks: { - // Useful for testing. The `development` name is special - truffle uses it by default - // if it's defined here and no other network is specified at the command line. - // You should run a client (like ganache-cli, geth or parity) in a separate terminal - // tab if you use this network and you must also set the `host`, `port` and `network_id` - // options below to some value. - // - development: { - host: "127.0.0.1", // Localhost (default: none) - port: 8545, // Standard Ethereum port (default: none) - network_id: "1597649375983", - gas: 20700000 - }, - - // Another network with more advanced options... - // advanced: { - // port: 8777, // Custom port - // network_id: 1342, // Custom network - // gas: 8500000, // Gas sent with each transaction (default: ~6700000) - // gasPrice: 20000000000, // 20 gwei (in wei) (default: 100 gwei) - // from:
, // Account to send txs from (default: accounts[0]) - // websockets: true // Enable EventEmitter interface for web3 (default: false) - // }, - - // Useful for deploying to a public network. - // NB: It's important to wrap the provider as a function. - // ropsten: { - // provider: () => new HDWalletProvider(mnemonic, `https://ropsten.infura.io/v3/YOUR-PROJECT-ID`), - // network_id: 3, // Ropsten's id - // gas: 5500000, // Ropsten has a lower block limit than mainnet - // confirmations: 2, // # of confs to wait between deployments. (default: 0) - // timeoutBlocks: 200, // # of blocks before a deployment times out (minimum/default: 50) - // skipDryRun: true // Skip dry run before migrations? (default: false for public nets ) - // }, - - // Useful for private networks - // private: { - // provider: () => new HDWalletProvider(mnemonic, `https://network.io`), - // network_id: 2111, // This network is yours, in the cloud. - // production: true // Treats this network as if it was a public net. (default: false) - // } - }, - - // Set default mocha options here, use special reporters etc. - mocha: { - timeout: 100000, - }, - // Configure your compilers compilers: { solc: { - version: "0.6.12", // Fetch exact version from solc-bin (default: truffle's version) - docker: true, // Use "0.5.1" you've installed locally with docker (default: false) - settings: { // See the solidity docs for advice about optimization and evmVersion + version: "0.6.12", + docker: true, + settings: { optimizer: { enabled: true, runs: 999, diff --git a/truffle-config-lib.js b/truffle-config-lib.js index 55b35b410..22264b42e 100644 --- a/truffle-config-lib.js +++ b/truffle-config-lib.js @@ -1,23 +1,14 @@ +const baseConfig = require("./truffle-config.base.js"); + module.exports = { + ...baseConfig, contracts_directory: "lib", - networks: { - development: { - host: "127.0.0.1", - port: 8545, - network_id: "1597649375983", - gas: 20700000 - }, - }, - - mocha: { - timeout: 100000, - }, compilers: { solc: { - version: "0.5.4", // Fetch exact version from solc-bin (default: truffle's version) - docker: true, // Use "0.5.1" you've installed locally with docker (default: false) - settings: { // See the solidity docs for advice about optimization and evmVersion + version: "0.5.4", + docker: true, + settings: { optimizer: { enabled: true, runs: 200, diff --git a/truffle-config-modules.js b/truffle-config-modules.js index bf6cb630c..c46887de7 100644 --- a/truffle-config-modules.js +++ b/truffle-config-modules.js @@ -1,94 +1,14 @@ -/** - * Use this file to configure your truffle project. It's seeded with some - * common settings for different networks and features like migrations, - * compilation and testing. Uncomment the ones you need or modify - * them to suit your project as necessary. - * - * More information about configuration can be found at: - * - * truffleframework.com/docs/advanced/configuration - * - * To deploy via Infura you'll need a wallet provider (like @truffle/hdwallet-provider) - * to sign your transactions before they're sent to a remote public node. Infura accounts - * are available for free at: infura.io/register. - * - * You'll also need a mnemonic - the twelve word phrase the wallet uses to generate - * public/private key pairs. If you're publishing your code to GitHub make sure you load this - * phrase from a file you've .gitignored so it doesn't accidentally become public. - * - */ - -// const HDWalletProvider = require('@truffle/hdwallet-provider'); -// const infuraKey = "fj4jll3k....."; -// -// const fs = require('fs'); -// const mnemonic = fs.readFileSync(".secret").toString().trim(); +const baseConfig = require("./truffle-config.base.js"); module.exports = { - /** - * Networks define how you connect to your ethereum client and let you set the - * defaults web3 uses to send transactions. If you don't specify one truffle - * will spin up a development blockchain for you on port 9545 when you - * run `develop` or `test`. You can ask a truffle command to use a specific - * network from the command line, e.g - * - * $ truffle test --network - */ + ...baseConfig, contracts_directory: "contracts/modules", - networks: { - // Useful for testing. The `development` name is special - truffle uses it by default - // if it's defined here and no other network is specified at the command line. - // You should run a client (like ganache-cli, geth or parity) in a separate terminal - // tab if you use this network and you must also set the `host`, `port` and `network_id` - // options below to some value. - // - development: { - host: "127.0.0.1", // Localhost (default: none) - port: 8545, // Standard Ethereum port (default: none) - network_id: "1597649375983", - gas: 20700000 - }, - - // Another network with more advanced options... - // advanced: { - // port: 8777, // Custom port - // network_id: 1342, // Custom network - // gas: 8500000, // Gas sent with each transaction (default: ~6700000) - // gasPrice: 20000000000, // 20 gwei (in wei) (default: 100 gwei) - // from:
, // Account to send txs from (default: accounts[0]) - // websockets: true // Enable EventEmitter interface for web3 (default: false) - // }, - - // Useful for deploying to a public network. - // NB: It's important to wrap the provider as a function. - // ropsten: { - // provider: () => new HDWalletProvider(mnemonic, `https://ropsten.infura.io/v3/YOUR-PROJECT-ID`), - // network_id: 3, // Ropsten's id - // gas: 5500000, // Ropsten has a lower block limit than mainnet - // confirmations: 2, // # of confs to wait between deployments. (default: 0) - // timeoutBlocks: 200, // # of blocks before a deployment times out (minimum/default: 50) - // skipDryRun: true // Skip dry run before migrations? (default: false for public nets ) - // }, - - // Useful for private networks - // private: { - // provider: () => new HDWalletProvider(mnemonic, `https://network.io`), - // network_id: 2111, // This network is yours, in the cloud. - // production: true // Treats this network as if it was a public net. (default: false) - // } - }, - - // Set default mocha options here, use special reporters etc. - mocha: { - timeout: 100000, - }, - // Configure your compilers compilers: { solc: { - version: "0.6.12", // Fetch exact version from solc-bin (default: truffle's version) - docker: true, // Use "0.5.1" you've installed locally with docker (default: false) - settings: { // See the solidity docs for advice about optimization and evmVersion + version: "0.6.12", + docker: true, + settings: { optimizer: { enabled: true, runs: 999, diff --git a/truffle-config-wallet.js b/truffle-config-wallet.js index 129bd1997..74522d3c8 100644 --- a/truffle-config-wallet.js +++ b/truffle-config-wallet.js @@ -1,94 +1,14 @@ -/** - * Use this file to configure your truffle project. It's seeded with some - * common settings for different networks and features like migrations, - * compilation and testing. Uncomment the ones you need or modify - * them to suit your project as necessary. - * - * More information about configuration can be found at: - * - * truffleframework.com/docs/advanced/configuration - * - * To deploy via Infura you'll need a wallet provider (like @truffle/hdwallet-provider) - * to sign your transactions before they're sent to a remote public node. Infura accounts - * are available for free at: infura.io/register. - * - * You'll also need a mnemonic - the twelve word phrase the wallet uses to generate - * public/private key pairs. If you're publishing your code to GitHub make sure you load this - * phrase from a file you've .gitignored so it doesn't accidentally become public. - * - */ - -// const HDWalletProvider = require('@truffle/hdwallet-provider'); -// const infuraKey = "fj4jll3k....."; -// -// const fs = require('fs'); -// const mnemonic = fs.readFileSync(".secret").toString().trim(); +const baseConfig = require("./truffle-config.base.js"); module.exports = { - /** - * Networks define how you connect to your ethereum client and let you set the - * defaults web3 uses to send transactions. If you don't specify one truffle - * will spin up a development blockchain for you on port 9545 when you - * run `develop` or `test`. You can ask a truffle command to use a specific - * network from the command line, e.g - * - * $ truffle test --network - */ + ...baseConfig, contracts_directory: "contracts/wallet", - networks: { - // Useful for testing. The `development` name is special - truffle uses it by default - // if it's defined here and no other network is specified at the command line. - // You should run a client (like ganache-cli, geth or parity) in a separate terminal - // tab if you use this network and you must also set the `host`, `port` and `network_id` - // options below to some value. - // - development: { - host: "127.0.0.1", // Localhost (default: none) - port: 8545, // Standard Ethereum port (default: none) - network_id: "1597649375983", - gas: 20700000 - }, - - // Another network with more advanced options... - // advanced: { - // port: 8777, // Custom port - // network_id: 1342, // Custom network - // gas: 8500000, // Gas sent with each transaction (default: ~6700000) - // gasPrice: 20000000000, // 20 gwei (in wei) (default: 100 gwei) - // from:
, // Account to send txs from (default: accounts[0]) - // websockets: true // Enable EventEmitter interface for web3 (default: false) - // }, - - // Useful for deploying to a public network. - // NB: It's important to wrap the provider as a function. - // ropsten: { - // provider: () => new HDWalletProvider(mnemonic, `https://ropsten.infura.io/v3/YOUR-PROJECT-ID`), - // network_id: 3, // Ropsten's id - // gas: 5500000, // Ropsten has a lower block limit than mainnet - // confirmations: 2, // # of confs to wait between deployments. (default: 0) - // timeoutBlocks: 200, // # of blocks before a deployment times out (minimum/default: 50) - // skipDryRun: true // Skip dry run before migrations? (default: false for public nets ) - // }, - - // Useful for private networks - // private: { - // provider: () => new HDWalletProvider(mnemonic, `https://network.io`), - // network_id: 2111, // This network is yours, in the cloud. - // production: true // Treats this network as if it was a public net. (default: false) - // } - }, - - // Set default mocha options here, use special reporters etc. - mocha: { - timeout: 100000, - }, - // Configure your compilers compilers: { solc: { - version: "0.6.12", // Fetch exact version from solc-bin (default: truffle's version) - docker: true, // Use "0.5.1" you've installed locally with docker (default: false) - settings: { // See the solidity docs for advice about optimization and evmVersion + version: "0.6.12", + docker: true, + settings: { optimizer: { enabled: true, runs: 999, diff --git a/truffle-config.base.js b/truffle-config.base.js new file mode 100644 index 000000000..07d089a28 --- /dev/null +++ b/truffle-config.base.js @@ -0,0 +1,107 @@ +/** + * Use this file to configure your truffle project. It's seeded with some + * common settings for different networks and features like migrations, + * compilation and testing. Uncomment the ones you need or modify + * them to suit your project as necessary. + * + * More information about configuration can be found at: + * + * truffleframework.com/docs/advanced/configuration + * + * To deploy via Infura you'll need a wallet provider (like @truffle/hdwallet-provider) + * to sign your transactions before they're sent to a remote public node. Infura accounts + * are available for free at: infura.io/register. + * + * You'll also need a mnemonic - the twelve word phrase the wallet uses to generate + * public/private key pairs. If you're publishing your code to GitHub make sure you load this + * phrase from a file you've .gitignored so it doesn't accidentally become public. + * + */ + +// const HDWalletProvider = require('@truffle/hdwallet-provider'); +// const infuraKey = "fj4jll3k....."; +// +// const fs = require('fs'); +// const mnemonic = fs.readFileSync(".secret").toString().trim(); + +module.exports = { + /** + * Networks define how you connect to your ethereum client and let you set the + * defaults web3 uses to send transactions. If you don't specify one truffle + * will spin up a development blockchain for you on port 9545 when you + * run `develop` or `test`. You can ask a truffle command to use a specific + * network from the command line, e.g + * + * $ truffle test --network + */ + contracts_directory: "contracts/*.sol", + networks: { + // Useful for testing. The `development` name is special - truffle uses it by default + // if it's defined here and no other network is specified at the command line. + // You should run a client (like ganache-cli, geth or parity) in a separate terminal + // tab if you use this network and you must also set the `host`, `port` and `network_id` + // options below to some value. + // + development: { + host: "127.0.0.1", // Localhost (default: none) + port: 8545, // Standard Ethereum port (default: none) + network_id: "1597649375983", + gas: 20700000 + }, + + // Another network with more advanced options... + // advanced: { + // port: 8777, // Custom port + // network_id: 1342, // Custom network + // gas: 8500000, // Gas sent with each transaction (default: ~6700000) + // gasPrice: 20000000000, // 20 gwei (in wei) (default: 100 gwei) + // from:
, // Account to send txs from (default: accounts[0]) + // websockets: true // Enable EventEmitter interface for web3 (default: false) + // }, + + // Useful for deploying to a public network. + // NB: It's important to wrap the provider as a function. + // ropsten: { + // provider: () => new HDWalletProvider(mnemonic, `https://ropsten.infura.io/v3/YOUR-PROJECT-ID`), + // network_id: 3, // Ropsten's id + // gas: 5500000, // Ropsten has a lower block limit than mainnet + // confirmations: 2, // # of confs to wait between deployments. (default: 0) + // timeoutBlocks: 200, // # of blocks before a deployment times out (minimum/default: 50) + // skipDryRun: true // Skip dry run before migrations? (default: false for public nets ) + // }, + + // Useful for private networks + // private: { + // provider: () => new HDWalletProvider(mnemonic, `https://network.io`), + // network_id: 2111, // This network is yours, in the cloud. + // production: true // Treats this network as if it was a public net. (default: false) + // } + }, + + // Set default mocha options here, use special reporters etc. + mocha: { + useColors: true, + timeout: 1000000, + reporter: "eth-gas-reporter", + reporterOptions: { + currency: "USD", + gasPrice: 50, + onlyCalledMethods: true, + excludeContracts: ["Migrations"], + }, + }, + + // Configure your compilers + compilers: { + solc: { + version: "0.6.12", // Fetch exact version from solc-bin (default: truffle's version) + docker: true, // Use "0.5.1" you've installed locally with docker (default: false) + settings: { // See the solidity docs for advice about optimization and evmVersion + optimizer: { + enabled: true, + runs: 999, + }, + }, + }, + }, +}; diff --git a/truffle-config.js b/truffle-config.js index 07d089a28..a155fcc66 100644 --- a/truffle-config.js +++ b/truffle-config.js @@ -1,102 +1,14 @@ -/** - * Use this file to configure your truffle project. It's seeded with some - * common settings for different networks and features like migrations, - * compilation and testing. Uncomment the ones you need or modify - * them to suit your project as necessary. - * - * More information about configuration can be found at: - * - * truffleframework.com/docs/advanced/configuration - * - * To deploy via Infura you'll need a wallet provider (like @truffle/hdwallet-provider) - * to sign your transactions before they're sent to a remote public node. Infura accounts - * are available for free at: infura.io/register. - * - * You'll also need a mnemonic - the twelve word phrase the wallet uses to generate - * public/private key pairs. If you're publishing your code to GitHub make sure you load this - * phrase from a file you've .gitignored so it doesn't accidentally become public. - * - */ - -// const HDWalletProvider = require('@truffle/hdwallet-provider'); -// const infuraKey = "fj4jll3k....."; -// -// const fs = require('fs'); -// const mnemonic = fs.readFileSync(".secret").toString().trim(); +const baseConfig = require("./truffle-config.base.js"); module.exports = { - /** - * Networks define how you connect to your ethereum client and let you set the - * defaults web3 uses to send transactions. If you don't specify one truffle - * will spin up a development blockchain for you on port 9545 when you - * run `develop` or `test`. You can ask a truffle command to use a specific - * network from the command line, e.g - * - * $ truffle test --network - */ + ...baseConfig, contracts_directory: "contracts/*.sol", - networks: { - // Useful for testing. The `development` name is special - truffle uses it by default - // if it's defined here and no other network is specified at the command line. - // You should run a client (like ganache-cli, geth or parity) in a separate terminal - // tab if you use this network and you must also set the `host`, `port` and `network_id` - // options below to some value. - // - development: { - host: "127.0.0.1", // Localhost (default: none) - port: 8545, // Standard Ethereum port (default: none) - network_id: "1597649375983", - gas: 20700000 - }, - - // Another network with more advanced options... - // advanced: { - // port: 8777, // Custom port - // network_id: 1342, // Custom network - // gas: 8500000, // Gas sent with each transaction (default: ~6700000) - // gasPrice: 20000000000, // 20 gwei (in wei) (default: 100 gwei) - // from:
, // Account to send txs from (default: accounts[0]) - // websockets: true // Enable EventEmitter interface for web3 (default: false) - // }, - - // Useful for deploying to a public network. - // NB: It's important to wrap the provider as a function. - // ropsten: { - // provider: () => new HDWalletProvider(mnemonic, `https://ropsten.infura.io/v3/YOUR-PROJECT-ID`), - // network_id: 3, // Ropsten's id - // gas: 5500000, // Ropsten has a lower block limit than mainnet - // confirmations: 2, // # of confs to wait between deployments. (default: 0) - // timeoutBlocks: 200, // # of blocks before a deployment times out (minimum/default: 50) - // skipDryRun: true // Skip dry run before migrations? (default: false for public nets ) - // }, - - // Useful for private networks - // private: { - // provider: () => new HDWalletProvider(mnemonic, `https://network.io`), - // network_id: 2111, // This network is yours, in the cloud. - // production: true // Treats this network as if it was a public net. (default: false) - // } - }, - - // Set default mocha options here, use special reporters etc. - mocha: { - useColors: true, - timeout: 1000000, - reporter: "eth-gas-reporter", - reporterOptions: { - currency: "USD", - gasPrice: 50, - onlyCalledMethods: true, - excludeContracts: ["Migrations"], - }, - }, - // Configure your compilers compilers: { solc: { - version: "0.6.12", // Fetch exact version from solc-bin (default: truffle's version) - docker: true, // Use "0.5.1" you've installed locally with docker (default: false) - settings: { // See the solidity docs for advice about optimization and evmVersion + version: "0.6.12", + docker: true, + settings: { optimizer: { enabled: true, runs: 999, From 2c3961318d9182f0d21cce11a845cdce9e612fc5 Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Mon, 2 Nov 2020 09:55:14 +0200 Subject: [PATCH 062/113] Add codechecks for gas thresholds in CI --- .circleci/config.yml | 1 + codechecks.yml | 2 + package-lock.json | 345 +++++++++++++++++++++++++++++++++++++++++ package.json | 1 + truffle-config.base.js | 2 +- 5 files changed, 350 insertions(+), 1 deletion(-) create mode 100644 codechecks.yml diff --git a/.circleci/config.yml b/.circleci/config.yml index a4204388f..0887b623c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -83,6 +83,7 @@ jobs: - run: name: "Running unit tests" command: npm run ganache >/dev/null 2>&1 & npm run test + - run: npx codechecks - run: name: "Running coverage" command: | diff --git a/codechecks.yml b/codechecks.yml new file mode 100644 index 000000000..7dd55bd05 --- /dev/null +++ b/codechecks.yml @@ -0,0 +1,2 @@ +checks: + - name: eth-gas-reporter/codechecks \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 9b7e592b3..6fe1a3ed3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -33,6 +33,161 @@ "js-tokens": "^4.0.0" } }, + "@codechecks/client": { + "version": "0.1.10", + "resolved": "https://registry.npmjs.org/@codechecks/client/-/client-0.1.10.tgz", + "integrity": "sha512-rvX+LknmMohsLTU8mHJqIcNTo8fKfw6A5i7JvT6JJWqwCLi+TujHpRO8BLf48iF96+gU5viVvKfRaUyhc3wloA==", + "dev": true, + "requires": { + "bluebird": "^3.5.3", + "chalk": "^2.4.2", + "commander": "^2.19.0", + "debug": "^4.1.1", + "execa": "^1.0.0", + "glob": "^7.1.3", + "graceful-fs": "^4.1.15", + "js-yaml": "^3.13.1", + "json5": "^2.1.0", + "lodash": "^4.17.11", + "marked": "^0.7.0", + "marked-terminal": "^3.3.0", + "mkdirp": "^0.5.1", + "ms": "^2.1.1", + "promise": "^8.0.2", + "request": "^2.88.0", + "request-promise": "^4.2.2", + "ts-essentials": "^1.0.2", + "ts-node": "^8.0.2", + "url-join": "^4.0.0" + }, + "dependencies": { + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + }, + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "execa": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", + "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", + "dev": true, + "requires": { + "cross-spawn": "^6.0.0", + "get-stream": "^4.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + } + }, + "get-stream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "dev": true, + "requires": { + "pump": "^3.0.0" + } + }, + "glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true + }, + "json5": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.3.tgz", + "integrity": "sha512-KXPvOm8K9IJKFM0bmdn8QXh7udDh1g/giieX0NLCaMnb4hEiVFqnop2ImTXCc5e0/oHz3LTqmHGtExn5hfMkOA==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true + }, + "npm-run-path": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "dev": true, + "requires": { + "path-key": "^2.0.0" + } + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true + } + } + }, "@eslint/eslintrc": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.1.3.tgz", @@ -666,6 +821,12 @@ "color-convert": "^1.9.0" } }, + "ansicolors": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/ansicolors/-/ansicolors-0.3.2.tgz", + "integrity": "sha1-ZlWX3oap/+Oqm/vmyuXG6kJrSXk=", + "dev": true + }, "antlr4": { "version": "4.7.1", "resolved": "https://registry.npmjs.org/antlr4/-/antlr4-4.7.1.tgz", @@ -685,6 +846,12 @@ "resolved": "https://registry.npmjs.org/app-module-path/-/app-module-path-2.2.0.tgz", "integrity": "sha1-ZBqlXft9am8KgUHEucCqULbCTdU=" }, + "arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true + }, "argparse": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", @@ -1154,6 +1321,16 @@ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" }, + "cardinal": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/cardinal/-/cardinal-2.1.1.tgz", + "integrity": "sha1-fMEFXYItISlU0HsIXeolHMe8VQU=", + "dev": true, + "requires": { + "ansicolors": "~0.3.2", + "redeyed": "~2.1.0" + } + }, "caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", @@ -1282,6 +1459,23 @@ "restore-cursor": "^3.1.0" } }, + "cli-table": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/cli-table/-/cli-table-0.3.1.tgz", + "integrity": "sha1-9TsFJmqLGguTSz0IIebi3FkUriM=", + "dev": true, + "requires": { + "colors": "1.0.3" + }, + "dependencies": { + "colors": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz", + "integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs=", + "dev": true + } + } + }, "cli-table2": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/cli-table2/-/cli-table2-0.2.0.tgz", @@ -5407,6 +5601,12 @@ "resolved": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz", "integrity": "sha1-W/Rejkm6QYnhfUgnid/RW9FAt7Y=" }, + "lodash.toarray": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.toarray/-/lodash.toarray-4.4.0.tgz", + "integrity": "sha1-JMS/zWsvuji/0FlNsRedjptlZWE=", + "dev": true + }, "log-symbols": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.0.0.tgz", @@ -5514,12 +5714,46 @@ "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==" }, + "make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true + }, "markdown-table": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-1.1.3.tgz", "integrity": "sha512-1RUZVgQlpJSPWYbFSpmudq5nHY1doEIv89gBtF0s4gW1GF2XorxcA/70M5vq7rLv0a6mhOUccRsqkwhwLCIQ2Q==", "dev": true }, + "marked": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/marked/-/marked-0.7.0.tgz", + "integrity": "sha512-c+yYdCZJQrsRjTPhUx7VKkApw9bwDkNbHUKo1ovgcfDjb2kc8rLuRbIFyXL5WOEUwzSSKo3IXpph2K6DqB/KZg==", + "dev": true + }, + "marked-terminal": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/marked-terminal/-/marked-terminal-3.3.0.tgz", + "integrity": "sha512-+IUQJ5VlZoAFsM5MHNT7g3RHSkA3eETqhRCdXv4niUMAKHQ7lb1yvAcuGPmm4soxhmtX13u4Li6ZToXtvSEH+A==", + "dev": true, + "requires": { + "ansi-escapes": "^3.1.0", + "cardinal": "^2.1.1", + "chalk": "^2.4.1", + "cli-table": "^0.3.1", + "node-emoji": "^1.4.1", + "supports-hyperlinks": "^1.0.1" + }, + "dependencies": { + "ansi-escapes": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", + "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", + "dev": true + } + } + }, "md5": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/md5/-/md5-2.3.0.tgz", @@ -5969,6 +6203,15 @@ "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-2.0.2.tgz", "integrity": "sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==" }, + "node-emoji": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/node-emoji/-/node-emoji-1.10.0.tgz", + "integrity": "sha512-Yt3384If5H6BYGVHiHwTL+99OzJKHhgp82S8/dktEK73T26BazdgZ4JZh92xSVtGNJvz9UbXdNAc5hcrXV42vw==", + "dev": true, + "requires": { + "lodash.toarray": "^4.4.0" + } + }, "node-environment-flags": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.6.tgz", @@ -6642,6 +6885,23 @@ "picomatch": "^2.2.1" } }, + "redeyed": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/redeyed/-/redeyed-2.1.1.tgz", + "integrity": "sha1-iYS1gV2ZyyIEacme7v/jiRPmzAs=", + "dev": true, + "requires": { + "esprima": "~4.0.0" + }, + "dependencies": { + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true + } + } + }, "regexpp": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", @@ -6707,6 +6967,18 @@ } } }, + "request-promise": { + "version": "4.2.6", + "resolved": "https://registry.npmjs.org/request-promise/-/request-promise-4.2.6.tgz", + "integrity": "sha512-HCHI3DJJUakkOr8fNoCc73E5nU5bqITjOYFMDrKHYOXWXrgD/SBaC7LjwuPymUprRyuF06UK7hd/lMHkmUXglQ==", + "dev": true, + "requires": { + "bluebird": "^3.5.0", + "request-promise-core": "1.1.4", + "stealthy-require": "^1.1.1", + "tough-cookie": "^2.3.3" + } + }, "request-promise-core": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.4.tgz", @@ -7443,6 +7715,24 @@ "amdefine": ">=0.0.4" } }, + "source-map-support": { + "version": "0.5.19", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", + "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, "spdx-correct": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", @@ -7577,6 +7867,12 @@ "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", "dev": true }, + "strip-eof": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", + "dev": true + }, "strip-final-newline": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", @@ -7603,6 +7899,24 @@ "has-flag": "^3.0.0" } }, + "supports-hyperlinks": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-1.0.1.tgz", + "integrity": "sha512-HHi5kVSefKaJkGYXbDuKbUGRVxqnWGn3J2e39CYcNJEfWciGq2zYtOhXLTlvrOZW1QU7VX67w7fMmWafHX9Pfw==", + "dev": true, + "requires": { + "has-flag": "^2.0.0", + "supports-color": "^5.0.0" + }, + "dependencies": { + "has-flag": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", + "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", + "dev": true + } + } + }, "swarm-js": { "version": "0.1.40", "resolved": "https://registry.npmjs.org/swarm-js/-/swarm-js-0.1.40.tgz", @@ -7889,6 +8203,25 @@ "original-require": "1.0.1" } }, + "ts-essentials": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/ts-essentials/-/ts-essentials-1.0.4.tgz", + "integrity": "sha512-q3N1xS4vZpRouhYHDPwO0bDW3EZ6SK9CrrDHxi/D6BPReSjpVgWIOpLS2o0gSBZm+7q/wyKp6RVM1AeeW7uyfQ==", + "dev": true + }, + "ts-node": { + "version": "8.10.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.10.2.tgz", + "integrity": "sha512-ISJJGgkIpDdBhWVu3jufsWpK3Rzo7bdiIXJjQc0ynKxVOVcg2oIrf2H2cejminGrptVc6q6/uynAHNCuWGbpVA==", + "dev": true, + "requires": { + "arg": "^4.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "source-map-support": "^0.5.17", + "yn": "3.1.1" + } + }, "tsconfig-paths": { "version": "3.9.0", "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.9.0.tgz", @@ -8037,6 +8370,12 @@ } } }, + "url-join": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/url-join/-/url-join-4.0.1.tgz", + "integrity": "sha512-jk1+QP6ZJqyOiuEI9AEWQfju/nB2Pw466kbA0LEZljHwKeMgd9WrAEgEGxjPDD2+TNbbb37rTyhEfrCXfuKXnA==", + "dev": true + }, "url-parse-lax": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", @@ -8899,6 +9238,12 @@ } } } + }, + "yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "dev": true } } } diff --git a/package.json b/package.json index 8e922def5..c630ed847 100644 --- a/package.json +++ b/package.json @@ -90,6 +90,7 @@ }, "devDependencies": { "-": "0.0.1", + "@codechecks/client": "^0.1.10", "eslint": "^7.5.0", "eslint-config-airbnb-base": "^14.0.0", "eslint-plugin-import": "^2.20.1", diff --git a/truffle-config.base.js b/truffle-config.base.js index 07d089a28..17bed5484 100644 --- a/truffle-config.base.js +++ b/truffle-config.base.js @@ -85,9 +85,9 @@ module.exports = { reporter: "eth-gas-reporter", reporterOptions: { currency: "USD", - gasPrice: 50, onlyCalledMethods: true, excludeContracts: ["Migrations"], + outputFile: "gas-costs-report" }, }, From 328c01dd5bfda23d4858e2286899da48b96be743 Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Mon, 2 Nov 2020 11:23:37 +0200 Subject: [PATCH 063/113] Temporarily skip tests that can't be fixed as artifacts loading outside of build folder not yet supported --- test/baseWallet.js | 4 ++-- test/makerV2Manager_loan.js | 2 +- test/multisig.js | 2 +- test/relayer.js | 2 +- test/tokenExchanger.js | 2 +- test/transferManager.js | 2 +- test/upgraderToVersionManager.js | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/test/baseWallet.js b/test/baseWallet.js index 6a935c326..472513b2f 100644 --- a/test/baseWallet.js +++ b/test/baseWallet.js @@ -204,7 +204,7 @@ contract("BaseWallet", (accounts) => { }); }); - describe("Old BaseWallet V1.3", () => { + describe.skip("Old BaseWallet V1.3", () => { it("should work with new modules", async () => { const oldWallet = await OldWalletV13.new(); await oldWallet.init(owner, [module1.address]); @@ -215,7 +215,7 @@ contract("BaseWallet", (accounts) => { }); }); - describe("Old BaseWallet V1.6", () => { + describe.skip("Old BaseWallet V1.6", () => { it("should work with new modules", async () => { const oldWallet = await OldWalletV16.new(); await oldWallet.init(owner, [module1.address]); diff --git a/test/makerV2Manager_loan.js b/test/makerV2Manager_loan.js index a248a6567..4da423e83 100644 --- a/test/makerV2Manager_loan.js +++ b/test/makerV2Manager_loan.js @@ -651,7 +651,7 @@ contract("MakerV2Loan", (accounts) => { }); }); - describe("Upgrade of MakerV2Manager", () => { + describe.skip("Upgrade of MakerV2Manager", () => { let upgradedMakerV2; let daiAmount; let collateralAmount; diff --git a/test/multisig.js b/test/multisig.js index 1aabb20f8..9b0e9ccab 100644 --- a/test/multisig.js +++ b/test/multisig.js @@ -247,7 +247,7 @@ contract("MultiSigWallet", (accounts) => { it("should fail with the wrong nonce", async () => { const nonceOffset = 1; - await executeSendFailure([owner1, owner2], nonceOffset, true, false, "MSW: Not enough valid signatures"); + await executeSendFailure([owner1, owner2], nonceOffset, true, false, "MSW: Badly ordered signatures"); }); it("should fail with the wrong signature", async () => { diff --git a/test/relayer.js b/test/relayer.js index a2b4192ac..fe6e49c85 100644 --- a/test/relayer.js +++ b/test/relayer.js @@ -170,7 +170,7 @@ contract("RelayerManager", (accounts) => { ); }); - it("should fail when the gas of the transaction is less then the gasLimit ", async () => { + it.skip("should fail when the gas of the transaction is less then the gasLimit ", async () => { const params = [wallet.address, 2]; const nonce = await utils.getNonceForRelay(); const gasLimit = 2000000; diff --git a/test/tokenExchanger.js b/test/tokenExchanger.js index 69383a49f..9979a4baa 100644 --- a/test/tokenExchanger.js +++ b/test/tokenExchanger.js @@ -406,7 +406,7 @@ contract("TokenExchanger", (accounts) => { await dexRegistry.setAuthorised([kyberAdapter.address, uniswapV2Adapter.address], [true, true]); }); - it(`lets old wallets call ${method} successfully`, async () => { + it.skip(`lets old wallets call ${method} successfully`, async () => { // create wallet const oldWalletImplementation = await OldWallet.new(); const proxy = await Proxy.new(oldWalletImplementation.address); diff --git a/test/transferManager.js b/test/transferManager.js index da8308458..e7a4ddcc2 100644 --- a/test/transferManager.js +++ b/test/transferManager.js @@ -39,7 +39,7 @@ const ACTION_TRANSFER = 0; const RelayManager = require("../utils/relay-manager"); -contract("TransferManager", (accounts) => { +contract.skip("TransferManager", (accounts) => { const manager = new RelayManager(); const infrastructure = accounts[0]; diff --git a/test/upgraderToVersionManager.js b/test/upgraderToVersionManager.js index 05324694d..c88e86f5f 100644 --- a/test/upgraderToVersionManager.js +++ b/test/upgraderToVersionManager.js @@ -21,7 +21,7 @@ const ETH_LIMIT = 1000000; const { assertRevert } = require("../utils/utilities.js"); const RelayManager = require("../utils/relay-manager"); -contract("UpgraderToVersionManager", (accounts) => { +contract.skip("UpgraderToVersionManager", (accounts) => { const manager = new RelayManager(); const owner = accounts[1]; From 2b9bc18e1cfb1ec2e422a17a75dfa2eb496d6cac Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Mon, 2 Nov 2020 11:42:46 +0200 Subject: [PATCH 064/113] Update eth-gas-reporter output and artifacts upload in CI --- .circleci/config.yml | 5 +++++ .gitignore | 3 ++- truffle-config.base.js | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0887b623c..d2fac4408 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -83,6 +83,10 @@ jobs: - run: name: "Running unit tests" command: npm run ganache >/dev/null 2>&1 & npm run test + # Save coverage artifacts + - store_artifacts: + path: gas-usage-report.rst + destination: reports/gas-usage-report.log - run: npx codechecks - run: name: "Running coverage" @@ -94,6 +98,7 @@ jobs: # Save coverage artifacts - store_artifacts: path: coverage + destination: coverage-artifacts security-test: <<: *job_python steps: diff --git a/.gitignore b/.gitignore index bcec0dc79..19baa78ec 100644 --- a/.gitignore +++ b/.gitignore @@ -40,4 +40,5 @@ ganache-accounts.json coverage coverage.json -crytic-export \ No newline at end of file +crytic-export +gas-usage-report.log diff --git a/truffle-config.base.js b/truffle-config.base.js index 17bed5484..481aa65a4 100644 --- a/truffle-config.base.js +++ b/truffle-config.base.js @@ -87,7 +87,7 @@ module.exports = { currency: "USD", onlyCalledMethods: true, excludeContracts: ["Migrations"], - outputFile: "gas-costs-report" + outputFile: "gas-usage-report.log" }, }, From f084502d62961a1d7e436950b0a03492111ba1cb Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Mon, 2 Nov 2020 13:53:48 +0200 Subject: [PATCH 065/113] Add solidity coverage truffle plugin --- .solcover.js | 3 + package-lock.json | 1938 ++++++++++++++++++++++++++++++++++++++++ package.json | 5 +- truffle-config.base.js | 3 +- 4 files changed, 1946 insertions(+), 3 deletions(-) create mode 100644 .solcover.js diff --git a/.solcover.js b/.solcover.js new file mode 100644 index 000000000..5e0ec4b84 --- /dev/null +++ b/.solcover.js @@ -0,0 +1,3 @@ +module.exports = { + skipFiles: ['Migrations.sol'] +}; \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 6fe1a3ed3..7ff6e9d4c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -643,6 +643,32 @@ "@ethersproject/strings": "^5.0.4" } }, + "@nodelib/fs.scandir": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz", + "integrity": "sha512-eGmwYQn3gxo4r7jdQnkrrN6bY478C3P+a/y72IJukF8LjB6ZHeB3c+Ehacj3sYeSmUXGlnA67/PmbM9CVwL7Dw==", + "dev": true, + "requires": { + "@nodelib/fs.stat": "2.0.3", + "run-parallel": "^1.1.9" + } + }, + "@nodelib/fs.stat": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.3.tgz", + "integrity": "sha512-bQBFruR2TAwoevBEd/NWMoAAtNGzTRgdrqnYCc7dhzfoNvqPzLyqlEQnzZ3kVnNrSp25iyxE00/3h2fqGAGArA==", + "dev": true + }, + "@nodelib/fs.walk": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.4.tgz", + "integrity": "sha512-1V9XOY4rDW0rehzbrcqAmHnz8e7SKvX27gh8Gt2WgB0+pdzdiLV83p72kZPU+jvMbS1qU5mauP2iOvO8rhmurQ==", + "dev": true, + "requires": { + "@nodelib/fs.scandir": "2.1.3", + "fastq": "^1.6.0" + } + }, "@openzeppelin/contracts": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-3.0.1.tgz", @@ -666,6 +692,1148 @@ "defer-to-connect": "^1.0.1" } }, + "@truffle/error": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/@truffle/error/-/error-0.0.7.tgz", + "integrity": "sha512-UIfVKsXSXocKnn5+RNklUXNoGd/JVj7V8KmC48TQzmjU33HQI86PX0JDS7SpHMHasI3w9X//1q7Lu7nZtj3Zzg==", + "dev": true + }, + "@truffle/interface-adapter": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@truffle/interface-adapter/-/interface-adapter-0.3.3.tgz", + "integrity": "sha512-l3I4WFTfnBSIfG96IOBRtAIE6AHDAxcOUJE7W5zh9hocQwzQlGWc2yEyyTcLa0656TTM8RxaZZ2S/KdHHMvCaw==", + "dev": true, + "requires": { + "bn.js": "^4.11.8", + "ethers": "^4.0.32", + "lodash": "^4.17.13", + "web3": "1.2.2" + }, + "dependencies": { + "@types/node": { + "version": "12.19.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.19.3.tgz", + "integrity": "sha512-8Jduo8wvvwDzEVJCOvS/G6sgilOLvvhn1eMmK3TW8/T217O7u1jdrK6ImKLv80tVryaPSVeKu6sjDEiFjd4/eg==", + "dev": true + }, + "bn.js": { + "version": "4.11.9", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", + "dev": true + }, + "buffer": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.0.tgz", + "integrity": "sha512-cd+5r1VLBwUqTrmnzW+D7ABkJUM6mr7uv1dv+6jRw4Rcl7tFIFHDqHPL98LhpGFn3dbAt3gtLxtrWp4m1kFrqg==", + "dev": true, + "requires": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ethers": { + "version": "4.0.48", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-4.0.48.tgz", + "integrity": "sha512-sZD5K8H28dOrcidzx9f8KYh8083n5BexIO3+SbE4jK83L85FxtpXZBCQdXb8gkg+7sBqomcLhhkU7UHL+F7I2g==", + "dev": true, + "requires": { + "aes-js": "3.0.0", + "bn.js": "^4.4.0", + "elliptic": "6.5.3", + "hash.js": "1.1.3", + "js-sha3": "0.5.7", + "scrypt-js": "2.0.4", + "setimmediate": "1.0.4", + "uuid": "2.0.1", + "xmlhttprequest": "1.8.0" + } + }, + "eventemitter3": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.2.tgz", + "integrity": "sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q==", + "dev": true + }, + "fs-extra": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz", + "integrity": "sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "get-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", + "dev": true + }, + "hash.js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", + "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.0" + } + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "oboe": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/oboe/-/oboe-2.1.4.tgz", + "integrity": "sha1-IMiM2wwVNxuwQRklfU/dNLCqSfY=", + "dev": true, + "requires": { + "http-https": "^1.0.0" + } + }, + "p-cancelable": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.3.0.tgz", + "integrity": "sha512-RVbZPLso8+jFeq1MfNvgXtCRED2raz/dKpacfTNxsx6pLEpEomM7gah6VeHSYV3+vo0OAi4MkArtQcWWXuQoyw==", + "dev": true + }, + "prepend-http": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", + "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", + "dev": true + }, + "scrypt-js": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-2.0.4.tgz", + "integrity": "sha512-4KsaGcPnuhtCZQCxFxN3GVYIhKFPTdLd8PLC552XwbMndtD0cjRFAhDuuydXQ0h08ZfPgzqe6EKHozpuH74iDw==", + "dev": true + }, + "setimmediate": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.4.tgz", + "integrity": "sha1-IOgd5iLUoCWIzgyNqJc8vPHTE48=", + "dev": true + }, + "swarm-js": { + "version": "0.1.39", + "resolved": "https://registry.npmjs.org/swarm-js/-/swarm-js-0.1.39.tgz", + "integrity": "sha512-QLMqL2rzF6n5s50BptyD6Oi0R1aWlJC5Y17SRIVXRj6OR1DRIPM7nepvrxxkjA1zNzFz6mUOMjfeqeDaWB7OOg==", + "dev": true, + "requires": { + "bluebird": "^3.5.0", + "buffer": "^5.0.5", + "decompress": "^4.0.0", + "eth-lib": "^0.1.26", + "fs-extra": "^4.0.2", + "got": "^7.1.0", + "mime-types": "^2.1.16", + "mkdirp-promise": "^5.0.1", + "mock-fs": "^4.1.0", + "setimmediate": "^1.0.5", + "tar": "^4.0.2", + "xhr-request-promise": "^0.1.2" + }, + "dependencies": { + "got": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/got/-/got-7.1.0.tgz", + "integrity": "sha512-Y5WMo7xKKq1muPsxD+KmrR8DH5auG7fBdDVueZwETwV6VytKyU9OX/ddpq2/1hp1vIPvVb4T81dKQz3BivkNLw==", + "dev": true, + "requires": { + "decompress-response": "^3.2.0", + "duplexer3": "^0.1.4", + "get-stream": "^3.0.0", + "is-plain-obj": "^1.1.0", + "is-retry-allowed": "^1.0.0", + "is-stream": "^1.0.0", + "isurl": "^1.0.0-alpha5", + "lowercase-keys": "^1.0.0", + "p-cancelable": "^0.3.0", + "p-timeout": "^1.1.1", + "safe-buffer": "^5.0.1", + "timed-out": "^4.0.0", + "url-parse-lax": "^1.0.0", + "url-to-options": "^1.0.1" + } + }, + "setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=", + "dev": true + } + } + }, + "url-parse-lax": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", + "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", + "dev": true, + "requires": { + "prepend-http": "^1.0.1" + } + }, + "uuid": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.1.tgz", + "integrity": "sha1-wqMN7bPlNdcsz4LjQ5QaULqFM6w=", + "dev": true + }, + "web3": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/web3/-/web3-1.2.2.tgz", + "integrity": "sha512-/ChbmB6qZpfGx6eNpczt5YSUBHEA5V2+iUCbn85EVb3Zv6FVxrOo5Tv7Lw0gE2tW7EEjASbCyp3mZeiZaCCngg==", + "dev": true, + "requires": { + "@types/node": "^12.6.1", + "web3-bzz": "1.2.2", + "web3-core": "1.2.2", + "web3-eth": "1.2.2", + "web3-eth-personal": "1.2.2", + "web3-net": "1.2.2", + "web3-shh": "1.2.2", + "web3-utils": "1.2.2" + } + }, + "web3-bzz": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.2.2.tgz", + "integrity": "sha512-b1O2ObsqUN1lJxmFSjvnEC4TsaCbmh7Owj3IAIWTKqL9qhVgx7Qsu5O9cD13pBiSPNZJ68uJPaKq380QB4NWeA==", + "dev": true, + "requires": { + "@types/node": "^10.12.18", + "got": "9.6.0", + "swarm-js": "0.1.39", + "underscore": "1.9.1" + }, + "dependencies": { + "@types/node": { + "version": "10.17.44", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.44.tgz", + "integrity": "sha512-vHPAyBX1ffLcy4fQHmDyIUMUb42gHZjPHU66nhvbMzAWJqHnySGZ6STwN3rwrnSd1FHB0DI/RWgGELgKSYRDmw==", + "dev": true + } + } + }, + "web3-core": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.2.2.tgz", + "integrity": "sha512-miHAX3qUgxV+KYfaOY93Hlc3kLW2j5fH8FJy6kSxAv+d4d5aH0wwrU2IIoJylQdT+FeenQ38sgsCnFu9iZ1hCQ==", + "dev": true, + "requires": { + "@types/bn.js": "^4.11.4", + "@types/node": "^12.6.1", + "web3-core-helpers": "1.2.2", + "web3-core-method": "1.2.2", + "web3-core-requestmanager": "1.2.2", + "web3-utils": "1.2.2" + } + }, + "web3-core-helpers": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.2.2.tgz", + "integrity": "sha512-HJrRsIGgZa1jGUIhvGz4S5Yh6wtOIo/TMIsSLe+Xay+KVnbseJpPprDI5W3s7H2ODhMQTbogmmUFquZweW2ImQ==", + "dev": true, + "requires": { + "underscore": "1.9.1", + "web3-eth-iban": "1.2.2", + "web3-utils": "1.2.2" + } + }, + "web3-core-method": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.2.2.tgz", + "integrity": "sha512-szR4fDSBxNHaF1DFqE+j6sFR/afv9Aa36OW93saHZnrh+iXSrYeUUDfugeNcRlugEKeUCkd4CZylfgbK2SKYJA==", + "dev": true, + "requires": { + "underscore": "1.9.1", + "web3-core-helpers": "1.2.2", + "web3-core-promievent": "1.2.2", + "web3-core-subscriptions": "1.2.2", + "web3-utils": "1.2.2" + } + }, + "web3-core-promievent": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.2.2.tgz", + "integrity": "sha512-tKvYeT8bkUfKABcQswK6/X79blKTKYGk949urZKcLvLDEaWrM3uuzDwdQT3BNKzQ3vIvTggFPX9BwYh0F1WwqQ==", + "dev": true, + "requires": { + "any-promise": "1.3.0", + "eventemitter3": "3.1.2" + } + }, + "web3-core-requestmanager": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.2.2.tgz", + "integrity": "sha512-a+gSbiBRHtHvkp78U2bsntMGYGF2eCb6219aMufuZWeAZGXJ63Wc2321PCbA8hF9cQrZI4EoZ4kVLRI4OF15Hw==", + "dev": true, + "requires": { + "underscore": "1.9.1", + "web3-core-helpers": "1.2.2", + "web3-providers-http": "1.2.2", + "web3-providers-ipc": "1.2.2", + "web3-providers-ws": "1.2.2" + } + }, + "web3-core-subscriptions": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.2.2.tgz", + "integrity": "sha512-QbTgigNuT4eicAWWr7ahVpJyM8GbICsR1Ys9mJqzBEwpqS+RXTRVSkwZ2IsxO+iqv6liMNwGregbJLq4urMFcQ==", + "dev": true, + "requires": { + "eventemitter3": "3.1.2", + "underscore": "1.9.1", + "web3-core-helpers": "1.2.2" + } + }, + "web3-eth": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.2.2.tgz", + "integrity": "sha512-UXpC74mBQvZzd4b+baD4Ocp7g+BlwxhBHumy9seyE/LMIcMlePXwCKzxve9yReNpjaU16Mmyya6ZYlyiKKV8UA==", + "dev": true, + "requires": { + "underscore": "1.9.1", + "web3-core": "1.2.2", + "web3-core-helpers": "1.2.2", + "web3-core-method": "1.2.2", + "web3-core-subscriptions": "1.2.2", + "web3-eth-abi": "1.2.2", + "web3-eth-accounts": "1.2.2", + "web3-eth-contract": "1.2.2", + "web3-eth-ens": "1.2.2", + "web3-eth-iban": "1.2.2", + "web3-eth-personal": "1.2.2", + "web3-net": "1.2.2", + "web3-utils": "1.2.2" + } + }, + "web3-eth-abi": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.2.2.tgz", + "integrity": "sha512-Yn/ZMgoOLxhTVxIYtPJ0eS6pnAnkTAaJgUJh1JhZS4ekzgswMfEYXOwpMaD5eiqPJLpuxmZFnXnBZlnQ1JMXsw==", + "dev": true, + "requires": { + "ethers": "4.0.0-beta.3", + "underscore": "1.9.1", + "web3-utils": "1.2.2" + }, + "dependencies": { + "@types/node": { + "version": "10.17.44", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.44.tgz", + "integrity": "sha512-vHPAyBX1ffLcy4fQHmDyIUMUb42gHZjPHU66nhvbMzAWJqHnySGZ6STwN3rwrnSd1FHB0DI/RWgGELgKSYRDmw==", + "dev": true + }, + "elliptic": { + "version": "6.3.3", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.3.3.tgz", + "integrity": "sha1-VILZZG1UvLif19mU/J4ulWiHbj8=", + "dev": true, + "requires": { + "bn.js": "^4.4.0", + "brorand": "^1.0.1", + "hash.js": "^1.0.0", + "inherits": "^2.0.1" + } + }, + "ethers": { + "version": "4.0.0-beta.3", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-4.0.0-beta.3.tgz", + "integrity": "sha512-YYPogooSknTwvHg3+Mv71gM/3Wcrx+ZpCzarBj3mqs9njjRkrOo2/eufzhHloOCo3JSoNI4TQJJ6yU5ABm3Uog==", + "dev": true, + "requires": { + "@types/node": "^10.3.2", + "aes-js": "3.0.0", + "bn.js": "^4.4.0", + "elliptic": "6.3.3", + "hash.js": "1.1.3", + "js-sha3": "0.5.7", + "scrypt-js": "2.0.3", + "setimmediate": "1.0.4", + "uuid": "2.0.1", + "xmlhttprequest": "1.8.0" + } + }, + "scrypt-js": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-2.0.3.tgz", + "integrity": "sha1-uwBAvgMEPamgEqLOqfyfhSz8h9Q=", + "dev": true + } + } + }, + "web3-eth-accounts": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.2.2.tgz", + "integrity": "sha512-KzHOEyXOEZ13ZOkWN3skZKqSo5f4Z1ogPFNn9uZbKCz+kSp+gCAEKxyfbOsB/JMAp5h7o7pb6eYsPCUBJmFFiA==", + "dev": true, + "requires": { + "any-promise": "1.3.0", + "crypto-browserify": "3.12.0", + "eth-lib": "0.2.7", + "ethereumjs-common": "^1.3.2", + "ethereumjs-tx": "^2.1.1", + "scrypt-shim": "github:web3-js/scrypt-shim", + "underscore": "1.9.1", + "uuid": "3.3.2", + "web3-core": "1.2.2", + "web3-core-helpers": "1.2.2", + "web3-core-method": "1.2.2", + "web3-utils": "1.2.2" + }, + "dependencies": { + "eth-lib": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.7.tgz", + "integrity": "sha1-L5Pxex4jrsN1nNSj/iDBKGo/wco=", + "dev": true, + "requires": { + "bn.js": "^4.11.6", + "elliptic": "^6.4.0", + "xhr-request-promise": "^0.1.2" + } + }, + "uuid": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", + "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", + "dev": true + } + } + }, + "web3-eth-contract": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.2.2.tgz", + "integrity": "sha512-EKT2yVFws3FEdotDQoNsXTYL798+ogJqR2//CaGwx3p0/RvQIgfzEwp8nbgA6dMxCsn9KOQi7OtklzpnJMkjtA==", + "dev": true, + "requires": { + "@types/bn.js": "^4.11.4", + "underscore": "1.9.1", + "web3-core": "1.2.2", + "web3-core-helpers": "1.2.2", + "web3-core-method": "1.2.2", + "web3-core-promievent": "1.2.2", + "web3-core-subscriptions": "1.2.2", + "web3-eth-abi": "1.2.2", + "web3-utils": "1.2.2" + } + }, + "web3-eth-ens": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/web3-eth-ens/-/web3-eth-ens-1.2.2.tgz", + "integrity": "sha512-CFjkr2HnuyMoMFBoNUWojyguD4Ef+NkyovcnUc/iAb9GP4LHohKrODG4pl76R5u61TkJGobC2ij6TyibtsyVYg==", + "dev": true, + "requires": { + "eth-ens-namehash": "2.0.8", + "underscore": "1.9.1", + "web3-core": "1.2.2", + "web3-core-helpers": "1.2.2", + "web3-core-promievent": "1.2.2", + "web3-eth-abi": "1.2.2", + "web3-eth-contract": "1.2.2", + "web3-utils": "1.2.2" + } + }, + "web3-eth-iban": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.2.2.tgz", + "integrity": "sha512-gxKXBoUhaTFHr0vJB/5sd4i8ejF/7gIsbM/VvemHT3tF5smnmY6hcwSMmn7sl5Gs+83XVb/BngnnGkf+I/rsrQ==", + "dev": true, + "requires": { + "bn.js": "4.11.8", + "web3-utils": "1.2.2" + }, + "dependencies": { + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "dev": true + } + } + }, + "web3-eth-personal": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.2.2.tgz", + "integrity": "sha512-4w+GLvTlFqW3+q4xDUXvCEMU7kRZ+xm/iJC8gm1Li1nXxwwFbs+Y+KBK6ZYtoN1qqAnHR+plYpIoVo27ixI5Rg==", + "dev": true, + "requires": { + "@types/node": "^12.6.1", + "web3-core": "1.2.2", + "web3-core-helpers": "1.2.2", + "web3-core-method": "1.2.2", + "web3-net": "1.2.2", + "web3-utils": "1.2.2" + } + }, + "web3-net": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.2.2.tgz", + "integrity": "sha512-K07j2DXq0x4UOJgae65rWZKraOznhk8v5EGSTdFqASTx7vWE/m+NqBijBYGEsQY1lSMlVaAY9UEQlcXK5HzXTw==", + "dev": true, + "requires": { + "web3-core": "1.2.2", + "web3-core-method": "1.2.2", + "web3-utils": "1.2.2" + } + }, + "web3-providers-http": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.2.2.tgz", + "integrity": "sha512-BNZ7Hguy3eBszsarH5gqr9SIZNvqk9eKwqwmGH1LQS1FL3NdoOn7tgPPdddrXec4fL94CwgNk4rCU+OjjZRNDg==", + "dev": true, + "requires": { + "web3-core-helpers": "1.2.2", + "xhr2-cookies": "1.1.0" + } + }, + "web3-providers-ipc": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.2.2.tgz", + "integrity": "sha512-t97w3zi5Kn/LEWGA6D9qxoO0LBOG+lK2FjlEdCwDQatffB/+vYrzZ/CLYVQSoyFZAlsDoBasVoYSWZK1n39aHA==", + "dev": true, + "requires": { + "oboe": "2.1.4", + "underscore": "1.9.1", + "web3-core-helpers": "1.2.2" + } + }, + "web3-providers-ws": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.2.2.tgz", + "integrity": "sha512-Wb1mrWTGMTXOpJkL0yGvL/WYLt8fUIXx8k/l52QB2IiKzvyd42dTWn4+j8IKXGSYYzOm7NMqv6nhA5VDk12VfA==", + "dev": true, + "requires": { + "underscore": "1.9.1", + "web3-core-helpers": "1.2.2", + "websocket": "github:web3-js/WebSocket-Node#polyfill/globalThis" + } + }, + "web3-shh": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/web3-shh/-/web3-shh-1.2.2.tgz", + "integrity": "sha512-og258NPhlBn8yYrDWjoWBBb6zo1OlBgoWGT+LL5/LPqRbjPe09hlOYHgscAAr9zZGtohTOty7RrxYw6Z6oDWCg==", + "dev": true, + "requires": { + "web3-core": "1.2.2", + "web3-core-method": "1.2.2", + "web3-core-subscriptions": "1.2.2", + "web3-net": "1.2.2" + } + }, + "web3-utils": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.2.2.tgz", + "integrity": "sha512-joF+s3243TY5cL7Z7y4h1JsJpUCf/kmFmj+eJar7Y2yNIGVcW961VyrAms75tjUysSuHaUQ3eQXjBEUJueT52A==", + "dev": true, + "requires": { + "bn.js": "4.11.8", + "eth-lib": "0.2.7", + "ethereum-bloom-filters": "^1.0.6", + "ethjs-unit": "0.1.6", + "number-to-bn": "1.7.0", + "randombytes": "^2.1.0", + "underscore": "1.9.1", + "utf8": "3.0.0" + }, + "dependencies": { + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "dev": true + }, + "eth-lib": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.7.tgz", + "integrity": "sha1-L5Pxex4jrsN1nNSj/iDBKGo/wco=", + "dev": true, + "requires": { + "bn.js": "^4.11.6", + "elliptic": "^6.4.0", + "xhr-request-promise": "^0.1.2" + } + } + } + }, + "websocket": { + "version": "github:web3-js/WebSocket-Node#ef5ea2f41daf4a2113b80c9223df884b4d56c400", + "from": "github:web3-js/WebSocket-Node#polyfill/globalThis", + "dev": true, + "requires": { + "debug": "^2.2.0", + "es5-ext": "^0.10.50", + "nan": "^2.14.0", + "typedarray-to-buffer": "^3.1.5", + "yaeti": "^0.0.6" + } + } + } + }, + "@truffle/provider": { + "version": "0.1.19", + "resolved": "https://registry.npmjs.org/@truffle/provider/-/provider-0.1.19.tgz", + "integrity": "sha512-ke8iQmzW4Y99+8iff8xQcc+mCNU4AkwtaZ/iSpmVD8qpLytw8/DSNCm0RiEz9/+I93Q1zqI4Jnij/rXnkS2Njw==", + "dev": true, + "requires": { + "@truffle/error": "^0.0.7", + "@truffle/interface-adapter": "^0.3.0", + "web3": "1.2.1" + }, + "dependencies": { + "@types/node": { + "version": "10.17.44", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.44.tgz", + "integrity": "sha512-vHPAyBX1ffLcy4fQHmDyIUMUb42gHZjPHU66nhvbMzAWJqHnySGZ6STwN3rwrnSd1FHB0DI/RWgGELgKSYRDmw==", + "dev": true + }, + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "dev": true + }, + "buffer": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.0.tgz", + "integrity": "sha512-cd+5r1VLBwUqTrmnzW+D7ABkJUM6mr7uv1dv+6jRw4Rcl7tFIFHDqHPL98LhpGFn3dbAt3gtLxtrWp4m1kFrqg==", + "dev": true, + "requires": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ethers": { + "version": "4.0.0-beta.3", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-4.0.0-beta.3.tgz", + "integrity": "sha512-YYPogooSknTwvHg3+Mv71gM/3Wcrx+ZpCzarBj3mqs9njjRkrOo2/eufzhHloOCo3JSoNI4TQJJ6yU5ABm3Uog==", + "dev": true, + "requires": { + "@types/node": "^10.3.2", + "aes-js": "3.0.0", + "bn.js": "^4.4.0", + "elliptic": "6.3.3", + "hash.js": "1.1.3", + "js-sha3": "0.5.7", + "scrypt-js": "2.0.3", + "setimmediate": "1.0.4", + "uuid": "2.0.1", + "xmlhttprequest": "1.8.0" + }, + "dependencies": { + "elliptic": { + "version": "6.3.3", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.3.3.tgz", + "integrity": "sha1-VILZZG1UvLif19mU/J4ulWiHbj8=", + "dev": true, + "requires": { + "bn.js": "^4.4.0", + "brorand": "^1.0.1", + "hash.js": "^1.0.0", + "inherits": "^2.0.1" + } + }, + "setimmediate": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.4.tgz", + "integrity": "sha1-IOgd5iLUoCWIzgyNqJc8vPHTE48=", + "dev": true + } + } + }, + "eventemitter3": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.2.tgz", + "integrity": "sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q==", + "dev": true + }, + "fs-extra": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz", + "integrity": "sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "get-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", + "dev": true + }, + "hash.js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", + "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.0" + } + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "oboe": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/oboe/-/oboe-2.1.4.tgz", + "integrity": "sha1-IMiM2wwVNxuwQRklfU/dNLCqSfY=", + "dev": true, + "requires": { + "http-https": "^1.0.0" + } + }, + "p-cancelable": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.3.0.tgz", + "integrity": "sha512-RVbZPLso8+jFeq1MfNvgXtCRED2raz/dKpacfTNxsx6pLEpEomM7gah6VeHSYV3+vo0OAi4MkArtQcWWXuQoyw==", + "dev": true + }, + "prepend-http": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", + "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", + "dev": true + }, + "scrypt-js": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-2.0.3.tgz", + "integrity": "sha1-uwBAvgMEPamgEqLOqfyfhSz8h9Q=", + "dev": true + }, + "semver": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.2.0.tgz", + "integrity": "sha512-jdFC1VdUGT/2Scgbimf7FSx9iJLXoqfglSF+gJeuNWVpiE37OIbc1jywR/GJyFdz3mnkz2/id0L0J/cr0izR5A==", + "dev": true + }, + "swarm-js": { + "version": "0.1.39", + "resolved": "https://registry.npmjs.org/swarm-js/-/swarm-js-0.1.39.tgz", + "integrity": "sha512-QLMqL2rzF6n5s50BptyD6Oi0R1aWlJC5Y17SRIVXRj6OR1DRIPM7nepvrxxkjA1zNzFz6mUOMjfeqeDaWB7OOg==", + "dev": true, + "requires": { + "bluebird": "^3.5.0", + "buffer": "^5.0.5", + "decompress": "^4.0.0", + "eth-lib": "^0.1.26", + "fs-extra": "^4.0.2", + "got": "^7.1.0", + "mime-types": "^2.1.16", + "mkdirp-promise": "^5.0.1", + "mock-fs": "^4.1.0", + "setimmediate": "^1.0.5", + "tar": "^4.0.2", + "xhr-request-promise": "^0.1.2" + }, + "dependencies": { + "got": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/got/-/got-7.1.0.tgz", + "integrity": "sha512-Y5WMo7xKKq1muPsxD+KmrR8DH5auG7fBdDVueZwETwV6VytKyU9OX/ddpq2/1hp1vIPvVb4T81dKQz3BivkNLw==", + "dev": true, + "requires": { + "decompress-response": "^3.2.0", + "duplexer3": "^0.1.4", + "get-stream": "^3.0.0", + "is-plain-obj": "^1.1.0", + "is-retry-allowed": "^1.0.0", + "is-stream": "^1.0.0", + "isurl": "^1.0.0-alpha5", + "lowercase-keys": "^1.0.0", + "p-cancelable": "^0.3.0", + "p-timeout": "^1.1.1", + "safe-buffer": "^5.0.1", + "timed-out": "^4.0.0", + "url-parse-lax": "^1.0.0", + "url-to-options": "^1.0.1" + } + } + } + }, + "url-parse-lax": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", + "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", + "dev": true, + "requires": { + "prepend-http": "^1.0.1" + } + }, + "uuid": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.1.tgz", + "integrity": "sha1-wqMN7bPlNdcsz4LjQ5QaULqFM6w=", + "dev": true + }, + "web3": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/web3/-/web3-1.2.1.tgz", + "integrity": "sha512-nNMzeCK0agb5i/oTWNdQ1aGtwYfXzHottFP2Dz0oGIzavPMGSKyVlr8ibVb1yK5sJBjrWVnTdGaOC2zKDFuFRw==", + "dev": true, + "requires": { + "web3-bzz": "1.2.1", + "web3-core": "1.2.1", + "web3-eth": "1.2.1", + "web3-eth-personal": "1.2.1", + "web3-net": "1.2.1", + "web3-shh": "1.2.1", + "web3-utils": "1.2.1" + } + }, + "web3-bzz": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.2.1.tgz", + "integrity": "sha512-LdOO44TuYbGIPfL4ilkuS89GQovxUpmLz6C1UC7VYVVRILeZS740FVB3j9V4P4FHUk1RenaDfKhcntqgVCHtjw==", + "dev": true, + "requires": { + "got": "9.6.0", + "swarm-js": "0.1.39", + "underscore": "1.9.1" + } + }, + "web3-core": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.2.1.tgz", + "integrity": "sha512-5ODwIqgl8oIg/0+Ai4jsLxkKFWJYE0uLuE1yUKHNVCL4zL6n3rFjRMpKPokd6id6nJCNgeA64KdWQ4XfpnjdMg==", + "dev": true, + "requires": { + "web3-core-helpers": "1.2.1", + "web3-core-method": "1.2.1", + "web3-core-requestmanager": "1.2.1", + "web3-utils": "1.2.1" + } + }, + "web3-core-helpers": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.2.1.tgz", + "integrity": "sha512-Gx3sTEajD5r96bJgfuW377PZVFmXIH4TdqDhgGwd2lZQCcMi+DA4TgxJNJGxn0R3aUVzyyE76j4LBrh412mXrw==", + "dev": true, + "requires": { + "underscore": "1.9.1", + "web3-eth-iban": "1.2.1", + "web3-utils": "1.2.1" + } + }, + "web3-core-method": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.2.1.tgz", + "integrity": "sha512-Ghg2WS23qi6Xj8Od3VCzaImLHseEA7/usvnOItluiIc5cKs00WYWsNy2YRStzU9a2+z8lwQywPYp0nTzR/QXdQ==", + "dev": true, + "requires": { + "underscore": "1.9.1", + "web3-core-helpers": "1.2.1", + "web3-core-promievent": "1.2.1", + "web3-core-subscriptions": "1.2.1", + "web3-utils": "1.2.1" + } + }, + "web3-core-promievent": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.2.1.tgz", + "integrity": "sha512-IVUqgpIKoeOYblwpex4Hye6npM0aMR+kU49VP06secPeN0rHMyhGF0ZGveWBrGvf8WDPI7jhqPBFIC6Jf3Q3zw==", + "dev": true, + "requires": { + "any-promise": "1.3.0", + "eventemitter3": "3.1.2" + } + }, + "web3-core-requestmanager": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.2.1.tgz", + "integrity": "sha512-xfknTC69RfYmLKC+83Jz73IC3/sS2ZLhGtX33D4Q5nQ8yc39ElyAolxr9sJQS8kihOcM6u4J+8gyGMqsLcpIBg==", + "dev": true, + "requires": { + "underscore": "1.9.1", + "web3-core-helpers": "1.2.1", + "web3-providers-http": "1.2.1", + "web3-providers-ipc": "1.2.1", + "web3-providers-ws": "1.2.1" + } + }, + "web3-core-subscriptions": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.2.1.tgz", + "integrity": "sha512-nmOwe3NsB8V8UFsY1r+sW6KjdOS68h8nuh7NzlWxBQT/19QSUGiERRTaZXWu5BYvo1EoZRMxCKyCQpSSXLc08g==", + "dev": true, + "requires": { + "eventemitter3": "3.1.2", + "underscore": "1.9.1", + "web3-core-helpers": "1.2.1" + } + }, + "web3-eth": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.2.1.tgz", + "integrity": "sha512-/2xly4Yry5FW1i+uygPjhfvgUP/MS/Dk+PDqmzp5M88tS86A+j8BzKc23GrlA8sgGs0645cpZK/999LpEF5UdA==", + "dev": true, + "requires": { + "underscore": "1.9.1", + "web3-core": "1.2.1", + "web3-core-helpers": "1.2.1", + "web3-core-method": "1.2.1", + "web3-core-subscriptions": "1.2.1", + "web3-eth-abi": "1.2.1", + "web3-eth-accounts": "1.2.1", + "web3-eth-contract": "1.2.1", + "web3-eth-ens": "1.2.1", + "web3-eth-iban": "1.2.1", + "web3-eth-personal": "1.2.1", + "web3-net": "1.2.1", + "web3-utils": "1.2.1" + } + }, + "web3-eth-abi": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.2.1.tgz", + "integrity": "sha512-jI/KhU2a/DQPZXHjo2GW0myEljzfiKOn+h1qxK1+Y9OQfTcBMxrQJyH5AP89O6l6NZ1QvNdq99ThAxBFoy5L+g==", + "dev": true, + "requires": { + "ethers": "4.0.0-beta.3", + "underscore": "1.9.1", + "web3-utils": "1.2.1" + } + }, + "web3-eth-accounts": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.2.1.tgz", + "integrity": "sha512-26I4qq42STQ8IeKUyur3MdQ1NzrzCqPsmzqpux0j6X/XBD7EjZ+Cs0lhGNkSKH5dI3V8CJasnQ5T1mNKeWB7nQ==", + "dev": true, + "requires": { + "any-promise": "1.3.0", + "crypto-browserify": "3.12.0", + "eth-lib": "0.2.7", + "scryptsy": "2.1.0", + "semver": "6.2.0", + "underscore": "1.9.1", + "uuid": "3.3.2", + "web3-core": "1.2.1", + "web3-core-helpers": "1.2.1", + "web3-core-method": "1.2.1", + "web3-utils": "1.2.1" + }, + "dependencies": { + "eth-lib": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.7.tgz", + "integrity": "sha1-L5Pxex4jrsN1nNSj/iDBKGo/wco=", + "dev": true, + "requires": { + "bn.js": "^4.11.6", + "elliptic": "^6.4.0", + "xhr-request-promise": "^0.1.2" + } + }, + "uuid": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", + "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", + "dev": true + } + } + }, + "web3-eth-contract": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.2.1.tgz", + "integrity": "sha512-kYFESbQ3boC9bl2rYVghj7O8UKMiuKaiMkxvRH5cEDHil8V7MGEGZNH0slSdoyeftZVlaWSMqkRP/chfnKND0g==", + "dev": true, + "requires": { + "underscore": "1.9.1", + "web3-core": "1.2.1", + "web3-core-helpers": "1.2.1", + "web3-core-method": "1.2.1", + "web3-core-promievent": "1.2.1", + "web3-core-subscriptions": "1.2.1", + "web3-eth-abi": "1.2.1", + "web3-utils": "1.2.1" + } + }, + "web3-eth-ens": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/web3-eth-ens/-/web3-eth-ens-1.2.1.tgz", + "integrity": "sha512-lhP1kFhqZr2nnbu3CGIFFrAnNxk2veXpOXBY48Tub37RtobDyHijHgrj+xTh+mFiPokyrapVjpFsbGa+Xzye4Q==", + "dev": true, + "requires": { + "eth-ens-namehash": "2.0.8", + "underscore": "1.9.1", + "web3-core": "1.2.1", + "web3-core-helpers": "1.2.1", + "web3-core-promievent": "1.2.1", + "web3-eth-abi": "1.2.1", + "web3-eth-contract": "1.2.1", + "web3-utils": "1.2.1" + } + }, + "web3-eth-iban": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.2.1.tgz", + "integrity": "sha512-9gkr4QPl1jCU+wkgmZ8EwODVO3ovVj6d6JKMos52ggdT2YCmlfvFVF6wlGLwi0VvNa/p+0BjJzaqxnnG/JewjQ==", + "dev": true, + "requires": { + "bn.js": "4.11.8", + "web3-utils": "1.2.1" + } + }, + "web3-eth-personal": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.2.1.tgz", + "integrity": "sha512-RNDVSiaSoY4aIp8+Hc7z+X72H7lMb3fmAChuSBADoEc7DsJrY/d0R5qQDK9g9t2BO8oxgLrLNyBP/9ub2Hc6Bg==", + "dev": true, + "requires": { + "web3-core": "1.2.1", + "web3-core-helpers": "1.2.1", + "web3-core-method": "1.2.1", + "web3-net": "1.2.1", + "web3-utils": "1.2.1" + } + }, + "web3-net": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.2.1.tgz", + "integrity": "sha512-Yt1Bs7WgnLESPe0rri/ZoPWzSy55ovioaP35w1KZydrNtQ5Yq4WcrAdhBzcOW7vAkIwrsLQsvA+hrOCy7mNauw==", + "dev": true, + "requires": { + "web3-core": "1.2.1", + "web3-core-method": "1.2.1", + "web3-utils": "1.2.1" + } + }, + "web3-providers-http": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.2.1.tgz", + "integrity": "sha512-BDtVUVolT9b3CAzeGVA/np1hhn7RPUZ6YYGB/sYky+GjeO311Yoq8SRDUSezU92x8yImSC2B+SMReGhd1zL+bQ==", + "dev": true, + "requires": { + "web3-core-helpers": "1.2.1", + "xhr2-cookies": "1.1.0" + } + }, + "web3-providers-ipc": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.2.1.tgz", + "integrity": "sha512-oPEuOCwxVx8L4CPD0TUdnlOUZwGBSRKScCz/Ws2YHdr9Ium+whm+0NLmOZjkjQp5wovQbyBzNa6zJz1noFRvFA==", + "dev": true, + "requires": { + "oboe": "2.1.4", + "underscore": "1.9.1", + "web3-core-helpers": "1.2.1" + } + }, + "web3-providers-ws": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.2.1.tgz", + "integrity": "sha512-oqsQXzu+ejJACVHy864WwIyw+oB21nw/pI65/sD95Zi98+/HQzFfNcIFneF1NC4bVF3VNX4YHTNq2I2o97LAiA==", + "dev": true, + "requires": { + "underscore": "1.9.1", + "web3-core-helpers": "1.2.1", + "websocket": "github:web3-js/WebSocket-Node#polyfill/globalThis" + } + }, + "web3-shh": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/web3-shh/-/web3-shh-1.2.1.tgz", + "integrity": "sha512-/3Cl04nza5kuFn25bV3FJWa0s3Vafr5BlT933h26xovQ6HIIz61LmvNQlvX1AhFL+SNJOTcQmK1SM59vcyC8bA==", + "dev": true, + "requires": { + "web3-core": "1.2.1", + "web3-core-method": "1.2.1", + "web3-core-subscriptions": "1.2.1", + "web3-net": "1.2.1" + } + }, + "web3-utils": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.2.1.tgz", + "integrity": "sha512-Mrcn3l58L+yCKz3zBryM6JZpNruWuT0OCbag8w+reeNROSGVlXzUQkU+gtAwc9JCZ7tKUyg67+2YUGqUjVcyBA==", + "dev": true, + "requires": { + "bn.js": "4.11.8", + "eth-lib": "0.2.7", + "ethjs-unit": "0.1.6", + "number-to-bn": "1.7.0", + "randomhex": "0.1.5", + "underscore": "1.9.1", + "utf8": "3.0.0" + }, + "dependencies": { + "eth-lib": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.7.tgz", + "integrity": "sha1-L5Pxex4jrsN1nNSj/iDBKGo/wco=", + "dev": true, + "requires": { + "bn.js": "^4.11.6", + "elliptic": "^6.4.0", + "xhr-request-promise": "^0.1.2" + } + } + } + }, + "websocket": { + "version": "github:web3-js/WebSocket-Node#ef5ea2f41daf4a2113b80c9223df884b4d56c400", + "from": "github:web3-js/WebSocket-Node#polyfill/globalThis", + "dev": true, + "requires": { + "debug": "^2.2.0", + "es5-ext": "^0.10.50", + "nan": "^2.14.0", + "typedarray-to-buffer": "^3.1.5", + "yaeti": "^0.0.6" + } + } + } + }, "@types/bn.js": { "version": "4.11.6", "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-4.11.6.tgz", @@ -692,12 +1860,28 @@ "@types/node": "*" } }, + "@types/glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-SEYeGAIQIQX8NN6LDKprLjbrd5dARM5EXsd8GI/A5l0apYI1fGMWgPHSe4ZKL4eozlAyI+doUE9XbYS4xCkQ1w==", + "dev": true, + "requires": { + "@types/minimatch": "*", + "@types/node": "*" + } + }, "@types/json5": { "version": "0.0.29", "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=", "dev": true }, + "@types/minimatch": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz", + "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==", + "dev": true + }, "@types/node": { "version": "14.11.11", "resolved": "https://registry.npmjs.org/@types/node/-/node-14.11.11.tgz", @@ -764,6 +1948,12 @@ "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.1.tgz", "integrity": "sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng==" }, + "address": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/address/-/address-1.1.2.tgz", + "integrity": "sha512-aT6camzM4xEA54YVJYSqxz1kv4IHnQZRtThJJHhUMRExaU5spC7jX5ugSwTaTgJliIgs4VhZOk7htClvQ/LmRA==", + "dev": true + }, "aes-js": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz", @@ -832,6 +2022,12 @@ "resolved": "https://registry.npmjs.org/antlr4/-/antlr4-4.7.1.tgz", "integrity": "sha512-haHyTW7Y9joE5MVs37P2lNYfU2RWBLfcRDD8OWldcdZm5TiCE91B5Xl1oWSwiDUSd4rlExpt2pu1fksYQjRBYQ==" }, + "any-promise": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", + "integrity": "sha1-q8av7tzqUugJzcA3au0845Y10X8=", + "dev": true + }, "anymatch": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", @@ -876,6 +2072,12 @@ "is-string": "^1.0.5" } }, + "array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true + }, "array.prototype.flat": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.3.tgz", @@ -1058,6 +2260,58 @@ "safe-buffer": "^5.0.1" } }, + "bl": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.3.tgz", + "integrity": "sha512-pvcNpa0UU69UT341rO6AYy4FVAIkUHuZXRIWbq+zHnsVcRzDDjIAhGuuYoi0d//cwIwtt4pkpKycWEfjdV+vww==", + "dev": true, + "requires": { + "readable-stream": "^2.3.5", + "safe-buffer": "^5.1.1" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + } + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + } + } + } + } + }, "blakejs": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/blakejs/-/blakejs-1.1.0.tgz", @@ -1231,6 +2485,34 @@ "isarray": "^1.0.0" } }, + "buffer-alloc": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz", + "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==", + "dev": true, + "requires": { + "buffer-alloc-unsafe": "^1.1.0", + "buffer-fill": "^1.0.0" + } + }, + "buffer-alloc-unsafe": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz", + "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==", + "dev": true + }, + "buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=", + "dev": true + }, + "buffer-fill": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz", + "integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=", + "dev": true + }, "buffer-from": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", @@ -1917,6 +3199,12 @@ "assert-plus": "^1.0.0" } }, + "death": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/death/-/death-1.1.0.tgz", + "integrity": "sha1-AaqcQB7dknUFFEcLgmY5DGbGcxg=", + "dev": true + }, "debug": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", @@ -1935,6 +3223,22 @@ "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=" }, + "decompress": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/decompress/-/decompress-4.2.1.tgz", + "integrity": "sha512-e48kc2IjU+2Zw8cTb6VZcJQ3lgVbS4uuB1TfCHbiZIP/haNXm+SVyhu+87jts5/3ROpd82GSVCoNs/z8l4ZOaQ==", + "dev": true, + "requires": { + "decompress-tar": "^4.0.0", + "decompress-tarbz2": "^4.0.0", + "decompress-targz": "^4.0.0", + "decompress-unzip": "^4.0.1", + "graceful-fs": "^4.1.10", + "make-dir": "^1.0.0", + "pify": "^2.3.0", + "strip-dirs": "^2.0.0" + } + }, "decompress-response": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", @@ -1943,6 +3247,101 @@ "mimic-response": "^1.0.0" } }, + "decompress-tar": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/decompress-tar/-/decompress-tar-4.1.1.tgz", + "integrity": "sha512-JdJMaCrGpB5fESVyxwpCx4Jdj2AagLmv3y58Qy4GE6HMVjWz1FeVQk1Ct4Kye7PftcdOo/7U7UKzYBJgqnGeUQ==", + "dev": true, + "requires": { + "file-type": "^5.2.0", + "is-stream": "^1.1.0", + "tar-stream": "^1.5.2" + }, + "dependencies": { + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true + } + } + }, + "decompress-tarbz2": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/decompress-tarbz2/-/decompress-tarbz2-4.1.1.tgz", + "integrity": "sha512-s88xLzf1r81ICXLAVQVzaN6ZmX4A6U4z2nMbOwobxkLoIIfjVMBg7TeguTUXkKeXni795B6y5rnvDw7rxhAq9A==", + "dev": true, + "requires": { + "decompress-tar": "^4.1.0", + "file-type": "^6.1.0", + "is-stream": "^1.1.0", + "seek-bzip": "^1.0.5", + "unbzip2-stream": "^1.0.9" + }, + "dependencies": { + "file-type": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-6.2.0.tgz", + "integrity": "sha512-YPcTBDV+2Tm0VqjybVd32MHdlEGAtuxS3VAYsumFokDSMG+ROT5wawGlnHDoz7bfMcMDt9hxuXvXwoKUx2fkOg==", + "dev": true + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true + } + } + }, + "decompress-targz": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/decompress-targz/-/decompress-targz-4.1.1.tgz", + "integrity": "sha512-4z81Znfr6chWnRDNfFNqLwPvm4db3WuZkqV+UgXQzSngG3CEKdBkw5jrv3axjjL96glyiiKjsxJG3X6WBZwX3w==", + "dev": true, + "requires": { + "decompress-tar": "^4.1.1", + "file-type": "^5.2.0", + "is-stream": "^1.1.0" + }, + "dependencies": { + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true + } + } + }, + "decompress-unzip": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/decompress-unzip/-/decompress-unzip-4.0.1.tgz", + "integrity": "sha1-3qrM39FK6vhVePczroIQ+bSEj2k=", + "dev": true, + "requires": { + "file-type": "^3.8.0", + "get-stream": "^2.2.0", + "pify": "^2.3.0", + "yauzl": "^2.4.2" + }, + "dependencies": { + "file-type": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-3.9.0.tgz", + "integrity": "sha1-JXoHg4TR24CHvESdEH1SpSZyuek=", + "dev": true + }, + "get-stream": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-2.3.1.tgz", + "integrity": "sha1-Xzj5PzRgCWZu4BUKBUFn+Rvdld4=", + "dev": true, + "requires": { + "object-assign": "^4.0.1", + "pinkie-promise": "^2.0.0" + } + } + } + }, "dedent": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", @@ -2006,6 +3405,33 @@ "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" }, + "detect-port": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/detect-port/-/detect-port-1.3.0.tgz", + "integrity": "sha512-E+B1gzkl2gqxt1IhUzwjrxBKRqx1UzC3WLONHinn8S3T6lwV/agVCyitiFOsGJ/eYuEUBvD71MZHy3Pv1G9doQ==", + "dev": true, + "requires": { + "address": "^1.0.1", + "debug": "^2.6.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, "diff": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", @@ -2028,6 +3454,15 @@ } } }, + "dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "requires": { + "path-type": "^4.0.0" + } + }, "doctrine": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", @@ -3561,6 +4996,20 @@ "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz", "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==" }, + "fast-glob": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.4.tgz", + "integrity": "sha512-kr/Oo6PX51265qeuCYsyGypiO5uJFgBS0jksyG7FUeCyQzNwYnzrNIMR1NXfkZXsMYXYLRAHgISHBz8gQcxKHQ==", + "dev": true, + "requires": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.0", + "merge2": "^1.3.0", + "micromatch": "^4.0.2", + "picomatch": "^2.2.1" + } + }, "fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", @@ -3571,6 +5020,24 @@ "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=" }, + "fastq": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.9.0.tgz", + "integrity": "sha512-i7FVWL8HhVY+CTkwFxkN2mk3h+787ixS5S63eb78diVRc1MCssarHq3W5cj0av7YDSwmaV928RNag+U1etRQ7w==", + "dev": true, + "requires": { + "reusify": "^1.0.4" + } + }, + "fd-slicer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", + "integrity": "sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4=", + "dev": true, + "requires": { + "pend": "~1.2.0" + } + }, "figures": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", @@ -3587,6 +5054,12 @@ "flat-cache": "^2.0.1" } }, + "file-type": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-5.2.0.tgz", + "integrity": "sha1-LdvqfHP/42No365J3DOMBYwritY=", + "dev": true + }, "file-uri-to-path": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", @@ -3728,6 +5201,12 @@ "resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz", "integrity": "sha1-invTcYa23d84E/I4WLV+yq9eQdQ=" }, + "fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", + "dev": true + }, "fs-extra": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", @@ -4592,6 +6071,29 @@ "assert-plus": "^1.0.0" } }, + "ghost-testrpc": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/ghost-testrpc/-/ghost-testrpc-0.0.2.tgz", + "integrity": "sha512-i08dAEgJ2g8z5buJIrCTduwPIhih3DP+hOCTyyryikfV8T0bNvHnGXO67i0DD1H4GBDETTclPy9njZbfluQYrQ==", + "dev": true, + "requires": { + "chalk": "^2.4.2", + "node-emoji": "^1.10.0" + }, + "dependencies": { + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + } + } + }, "glob": { "version": "5.0.15", "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", @@ -4621,11 +6123,69 @@ "process": "~0.5.1" } }, + "global-modules": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-2.0.0.tgz", + "integrity": "sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A==", + "dev": true, + "requires": { + "global-prefix": "^3.0.0" + } + }, + "global-prefix": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-3.0.0.tgz", + "integrity": "sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg==", + "dev": true, + "requires": { + "ini": "^1.3.5", + "kind-of": "^6.0.2", + "which": "^1.3.1" + } + }, "globals": { "version": "11.12.0", "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==" }, + "globby": { + "version": "10.0.2", + "resolved": "https://registry.npmjs.org/globby/-/globby-10.0.2.tgz", + "integrity": "sha512-7dUi7RvCoT/xast/o/dLN53oqND4yk0nsHkhRgn9w65C4PofCLOoJ39iSOg+qVDdWQPIEj+eszMHQ+aLVwwQSg==", + "dev": true, + "requires": { + "@types/glob": "^7.1.1", + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.0.3", + "glob": "^7.1.3", + "ignore": "^5.1.1", + "merge2": "^1.2.3", + "slash": "^3.0.0" + }, + "dependencies": { + "glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "ignore": { + "version": "5.1.8", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", + "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==", + "dev": true + } + } + }, "got": { "version": "9.6.0", "resolved": "https://registry.npmjs.org/got/-/got-9.6.0.tgz", @@ -4969,6 +6529,12 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, + "ini": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", + "dev": true + }, "inquirer": { "version": "7.3.3", "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.3.3.tgz", @@ -5067,6 +6633,12 @@ } } }, + "interpret": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", + "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", + "dev": true + }, "ipaddr.js": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", @@ -5155,6 +6727,12 @@ "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.1.tgz", "integrity": "sha512-T/S49scO8plUiAOA2DBTBG3JHpn1yiw0kRp6dgiZ0v2/6twi5eiB0rHtHFH9ZIrvlWc6+4O+m4zg5+Z833aXgw==" }, + "is-natural-number": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-natural-number/-/is-natural-number-4.0.1.tgz", + "integrity": "sha1-q5124dtM7VHjXeDHLr7PCfc0zeg=", + "dev": true + }, "is-negative-zero": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.0.tgz", @@ -5388,6 +6966,12 @@ "graceful-fs": "^4.1.6" } }, + "jsonschema": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/jsonschema/-/jsonschema-1.4.0.tgz", + "integrity": "sha512-/YgW6pRMr6M7C+4o8kS+B/2myEpHCrxO4PEWnqJNBFMjn7EWXqlQ4tGwL6xTHeRplwuZmcAncdvfOad1nT2yMw==", + "dev": true + }, "jsprim": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", @@ -5416,6 +7000,12 @@ "json-buffer": "3.0.0" } }, + "kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true + }, "klaw": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz", @@ -5714,6 +7304,23 @@ "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==" }, + "make-dir": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", + "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", + "dev": true, + "requires": { + "pify": "^3.0.0" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } + } + }, "make-error": { "version": "1.3.6", "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", @@ -5803,6 +7410,12 @@ "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==" }, + "merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true + }, "methods": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", @@ -6598,6 +8211,12 @@ "sha.js": "^2.4.8" } }, + "pend": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", + "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA=", + "dev": true + }, "performance-now": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", @@ -6614,6 +8233,21 @@ "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", "dev": true }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", + "dev": true + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "dev": true, + "requires": { + "pinkie": "^2.0.0" + } + }, "pkg-dir": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", @@ -6768,6 +8402,12 @@ "safe-buffer": "^5.1.0" } }, + "randomhex": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/randomhex/-/randomhex-0.1.5.tgz", + "integrity": "sha1-us7vmCMpCRQA8qKRLGzQLxCU9YU=", + "dev": true + }, "range-parser": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", @@ -6885,6 +8525,24 @@ "picomatch": "^2.2.1" } }, + "rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", + "dev": true, + "requires": { + "resolve": "^1.1.6" + } + }, + "recursive-readdir": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/recursive-readdir/-/recursive-readdir-2.2.2.tgz", + "integrity": "sha512-nRCcW9Sj7NuZwa2XvH9co8NPeXUBhZP7CRKJtU+cS6PW9FpCIFoI5ib0NT1ZrbNuPoRy0ylyCaUL8Gih4LSyFg==", + "dev": true, + "requires": { + "minimatch": "3.0.4" + } + }, "redeyed": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/redeyed/-/redeyed-2.1.1.tgz", @@ -7049,6 +8707,12 @@ "signal-exit": "^3.0.2" } }, + "reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true + }, "rimraf": { "version": "2.7.1", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", @@ -7101,6 +8765,12 @@ "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==" }, + "run-parallel": { + "version": "1.1.10", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.1.10.tgz", + "integrity": "sha512-zb/1OuZ6flOlH6tQyMPUrE3x3Ulxjlo9WIVXR4yVYi4H9UXQaeIsPbLn2R3O3vQCnDKkAl2qHiuocKKX4Tz/Sw==", + "dev": true + }, "rxjs": { "version": "6.6.3", "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.3.tgz", @@ -7129,6 +8799,29 @@ "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz", "integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==" }, + "scrypt-shim": { + "version": "github:web3-js/scrypt-shim#aafdadda13e660e25e1c525d1f5b2443f5eb1ebb", + "from": "github:web3-js/scrypt-shim", + "dev": true, + "requires": { + "scryptsy": "^2.1.0", + "semver": "^6.3.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, + "scryptsy": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/scryptsy/-/scryptsy-2.1.0.tgz", + "integrity": "sha512-1CdSqHQowJBnMAFyPEBRfqag/YP9OF394FV+4YREIJX4ljD7OxvQRDayyoyyCk+senRjSkP6VnUNQmVQqB6g7w==", + "dev": true + }, "secp256k1": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-4.0.2.tgz", @@ -7139,6 +8832,23 @@ "node-gyp-build": "^4.2.0" } }, + "seek-bzip": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/seek-bzip/-/seek-bzip-1.0.6.tgz", + "integrity": "sha512-e1QtP3YL5tWww8uKaOCQ18UxIT2laNBXHjV/S2WYCiK4udiv8lkG89KRIoCjUagnAmCBurjF4zEVX2ByBbnCjQ==", + "dev": true, + "requires": { + "commander": "^2.8.1" + }, + "dependencies": { + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + } + } + }, "semver": { "version": "7.3.2", "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz", @@ -7274,6 +8984,33 @@ "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==" }, + "shelljs": { + "version": "0.8.4", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.4.tgz", + "integrity": "sha512-7gk3UZ9kOfPLIAbslLzyWeGiEqx9e3rxwZM0KE6EL8GlGwjym9Mrlx5/p33bWTu9YG6vcS4MBxYZDHYr5lr8BQ==", + "dev": true, + "requires": { + "glob": "^7.0.0", + "interpret": "^1.0.0", + "rechoir": "^0.6.2" + }, + "dependencies": { + "glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + } + } + }, "signal-exit": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", @@ -7706,6 +9443,113 @@ } } }, + "solidity-coverage": { + "version": "0.7.11", + "resolved": "https://registry.npmjs.org/solidity-coverage/-/solidity-coverage-0.7.11.tgz", + "integrity": "sha512-HtBhXNTK2pO6hj82lf3txZ8afoyIGSmduJHJSoeZ71RjiuNzjGFj4duEZY/kfqxYSq1yARERC6jOTZGfIAeRyA==", + "dev": true, + "requires": { + "@solidity-parser/parser": "^0.7.0", + "@truffle/provider": "^0.1.17", + "chalk": "^2.4.2", + "death": "^1.1.0", + "detect-port": "^1.3.0", + "fs-extra": "^8.1.0", + "ganache-cli": "^6.11.0", + "ghost-testrpc": "^0.0.2", + "global-modules": "^2.0.0", + "globby": "^10.0.1", + "jsonschema": "^1.2.4", + "lodash": "^4.17.15", + "node-emoji": "^1.10.0", + "pify": "^4.0.1", + "recursive-readdir": "^2.2.2", + "sc-istanbul": "^0.4.5", + "shelljs": "^0.8.3", + "web3": "^1.3.0" + }, + "dependencies": { + "@solidity-parser/parser": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.7.1.tgz", + "integrity": "sha512-5ma2uuwPAEX1TPl2rAPAAuGlBkKnn2oUKQvnhTFlDIB8U/KDWX77FpHtL6Rcz+OwqSCWx9IClxACgyIEJ/GhIw==", + "dev": true + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "dev": true, + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true + }, + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true + }, + "sc-istanbul": { + "version": "0.4.5", + "resolved": "https://registry.npmjs.org/sc-istanbul/-/sc-istanbul-0.4.5.tgz", + "integrity": "sha512-7wR5EZFLsC4w0wSm9BUuCgW+OGKAU7PNlW5L0qwVPbh+Q1sfVn2fyzfMXYCm6rkNA5ipaCOt94nApcguQwF5Gg==", + "dev": true, + "requires": { + "abbrev": "1.0.x", + "async": "1.x", + "escodegen": "1.8.x", + "esprima": "2.7.x", + "glob": "^5.0.15", + "handlebars": "^4.0.1", + "js-yaml": "3.x", + "mkdirp": "0.5.x", + "nopt": "3.x", + "once": "1.x", + "resolve": "1.1.x", + "supports-color": "^3.1.0", + "which": "^1.1.1", + "wordwrap": "^1.0.0" + }, + "dependencies": { + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "requires": { + "has-flag": "^1.0.0" + } + } + } + } + } + }, "source-map": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.2.0.tgz", @@ -7867,6 +9711,15 @@ "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", "dev": true }, + "strip-dirs": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/strip-dirs/-/strip-dirs-2.1.0.tgz", + "integrity": "sha512-JOCxOeKLm2CAS73y/U4ZeZPTkE+gNVCzKt7Eox84Iej1LT/2pTWYpZKJuxwQpvX1LiZb1xokNR7RLfuBAa7T3g==", + "dev": true, + "requires": { + "is-natural-number": "^4.0.1" + } + }, "strip-eof": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", @@ -8105,6 +9958,53 @@ "yallist": "^3.0.3" } }, + "tar-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.2.tgz", + "integrity": "sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A==", + "dev": true, + "requires": { + "bl": "^1.0.0", + "buffer-alloc": "^1.2.0", + "end-of-stream": "^1.0.0", + "fs-constants": "^1.0.0", + "readable-stream": "^2.3.0", + "to-buffer": "^1.1.1", + "xtend": "^4.0.0" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, "text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", @@ -8166,6 +10066,12 @@ "os-tmpdir": "~1.0.2" } }, + "to-buffer": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.1.1.tgz", + "integrity": "sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==", + "dev": true + }, "to-readable-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz", @@ -8331,6 +10237,28 @@ "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz", "integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==" }, + "unbzip2-stream": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz", + "integrity": "sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==", + "dev": true, + "requires": { + "buffer": "^5.2.1", + "through": "^2.3.8" + }, + "dependencies": { + "buffer": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.0.tgz", + "integrity": "sha512-cd+5r1VLBwUqTrmnzW+D7ABkJUM6mr7uv1dv+6jRw4Rcl7tFIFHDqHPL98LhpGFn3dbAt3gtLxtrWp4m1kFrqg==", + "dev": true, + "requires": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + } + } + }, "underscore": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.9.1.tgz", @@ -9239,6 +11167,16 @@ } } }, + "yauzl": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=", + "dev": true, + "requires": { + "buffer-crc32": "~0.2.3", + "fd-slicer": "~1.1.0" + } + }, "yn": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", diff --git a/package.json b/package.json index c630ed847..1961c2895 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "test": "npx truffle test", "ctest": "npm run compile && npm run test", "provision:lib:artefacts": "bash ./scripts/provision_lib_artefacts.sh", - "test:coverage": "bash ./scripts/provision_lib_artefacts.sh & npx etherlime coverage && istanbul check-coverage --statements 94 --branches 83 --functions 96 --lines 94", + "test:coverage": "npx truffle run coverage && istanbul check-coverage --statements 94 --branches 83 --functions 96 --lines 94", "lint:js": "eslint .", "lint:contracts": "npx solhint contracts/**/*.sol && npx solhint contracts/**/**/*.sol", "test:deployment": "./scripts/deploy.sh ganache `seq 1 7`", @@ -95,6 +95,7 @@ "eslint-config-airbnb-base": "^14.0.0", "eslint-plugin-import": "^2.20.1", "eth-gas-reporter": "^0.2.19", - "mocha-junit-reporter": "^2.0.0" + "mocha-junit-reporter": "^2.0.0", + "solidity-coverage": "^0.7.11" } } diff --git a/truffle-config.base.js b/truffle-config.base.js index 481aa65a4..b110d4a1e 100644 --- a/truffle-config.base.js +++ b/truffle-config.base.js @@ -34,7 +34,6 @@ module.exports = { * * $ truffle test --network */ - contracts_directory: "contracts/*.sol", networks: { // Useful for testing. The `development` name is special - truffle uses it by default // if it's defined here and no other network is specified at the command line. @@ -104,4 +103,6 @@ module.exports = { }, }, }, + + plugins: ["solidity-coverage"], }; From 45914bb9e4a427e6d5e8e6e1c1da929aba000846 Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Mon, 2 Nov 2020 15:09:27 +0200 Subject: [PATCH 066/113] Remove solc as we compile via docker only --- package-lock.json | 98 ----------------------------------------------- package.json | 1 - 2 files changed, 99 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7ff6e9d4c..e9d5703b4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2950,11 +2950,6 @@ "delayed-stream": "~1.0.0" } }, - "command-exists": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/command-exists/-/command-exists-1.2.9.tgz", - "integrity": "sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w==" - }, "commander": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/commander/-/commander-6.1.0.tgz", @@ -7006,14 +7001,6 @@ "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", "dev": true }, - "klaw": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz", - "integrity": "sha1-QIhDO0azsbolnXh4XY6W9zugJDk=", - "requires": { - "graceful-fs": "^4.1.9" - } - }, "levn": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", @@ -7395,11 +7382,6 @@ "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" }, - "memorystream": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", - "integrity": "sha1-htcJCzDORV1j+64S3aUaR93K+bI=" - }, "merge-descriptors": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", @@ -8670,11 +8652,6 @@ "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" }, - "require-from-string": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==" - }, "require-main-filename": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", @@ -8713,29 +8690,6 @@ "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", "dev": true }, - "rimraf": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", - "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", - "requires": { - "glob": "^7.1.3" - }, - "dependencies": { - "glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - } - } - }, "ripemd160": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", @@ -9079,58 +9033,6 @@ "resolved": "https://registry.npmjs.org/sliced/-/sliced-1.0.1.tgz", "integrity": "sha1-CzpmK10Ewxd7GSa+qCsD+Dei70E=" }, - "solc": { - "version": "0.6.12", - "resolved": "https://registry.npmjs.org/solc/-/solc-0.6.12.tgz", - "integrity": "sha512-Lm0Ql2G9Qc7yPP2Ba+WNmzw2jwsrd3u4PobHYlSOxaut3TtUbj9+5ZrT6f4DUpNPEoBaFUOEg9Op9C0mk7ge9g==", - "requires": { - "command-exists": "^1.2.8", - "commander": "3.0.2", - "fs-extra": "^0.30.0", - "js-sha3": "0.8.0", - "memorystream": "^0.3.1", - "require-from-string": "^2.0.0", - "semver": "^5.5.0", - "tmp": "0.0.33" - }, - "dependencies": { - "commander": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/commander/-/commander-3.0.2.tgz", - "integrity": "sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow==" - }, - "fs-extra": { - "version": "0.30.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.30.0.tgz", - "integrity": "sha1-8jP/zAjU2n1DLapEl3aYnbHfk/A=", - "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^2.1.0", - "klaw": "^1.0.0", - "path-is-absolute": "^1.0.0", - "rimraf": "^2.2.8" - } - }, - "js-sha3": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", - "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==" - }, - "jsonfile": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", - "integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=", - "requires": { - "graceful-fs": "^4.1.6" - } - }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" - } - } - }, "solhint": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/solhint/-/solhint-3.2.2.tgz", diff --git a/package.json b/package.json index 1961c2895..2dcd71ecd 100644 --- a/package.json +++ b/package.json @@ -81,7 +81,6 @@ "node-fetch": "^2.6.1", "openzeppelin-solidity": "2.3", "semver": "^7.1.3", - "solc": "0.6.12", "solhint": "^3.1.0", "tinyreq": "^3.4.1", "truffle": "^5.1.48", From 17aef9ef911e3a087ef706ba3fb6ee09606c4475 Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Mon, 2 Nov 2020 18:58:26 +0200 Subject: [PATCH 067/113] Fix artifacts path --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d2fac4408..62fe49b58 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -85,7 +85,7 @@ jobs: command: npm run ganache >/dev/null 2>&1 & npm run test # Save coverage artifacts - store_artifacts: - path: gas-usage-report.rst + path: gas-usage-report.log destination: reports/gas-usage-report.log - run: npx codechecks - run: From 267ab4d0631dc57939ae67b6dc97b3086120acd2 Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Wed, 4 Nov 2020 13:55:56 +0200 Subject: [PATCH 068/113] Add truffle-plugin-verify for etherscan verification --- .gitignore | 1 + migrations/2_deploy_contracts.js | 17 + package-lock.json | 1413 ++++++++++++++++++++++++++++-- package.json | 4 +- truffle-config.base.js | 15 +- 5 files changed, 1366 insertions(+), 84 deletions(-) create mode 100644 migrations/2_deploy_contracts.js diff --git a/.gitignore b/.gitignore index 19baa78ec..5259411dc 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ build-legacy tmp bin .outputParameter +flatten ## Core latex/pdflatex auxiliary files: *.aux diff --git a/migrations/2_deploy_contracts.js b/migrations/2_deploy_contracts.js new file mode 100644 index 000000000..2e73a81b7 --- /dev/null +++ b/migrations/2_deploy_contracts.js @@ -0,0 +1,17 @@ +/* globals artifacts */ + +const ApprovedTransfer = artifacts.require("ApprovedTransfer"); +const GuardianStorage = artifacts.require("GuardianStorage"); + +module.exports = (deployer, network) => { + console.log(`## ${network} network ##`); + deployer.deploy( + ApprovedTransfer, + "0x22Ce12a6dFCF7d67c3DbEF01B19707077b528223", + "0x3bD35C298Ea89EfA0EF2dB208aB562E9e3F89DF4", + "0x0479B49a95c6bF395F1fC7d0118b44c752C7c410", + "0x0A1545B32D7cdea1EeD2fb259A82AcFE5e75962C", + "0xc778417E063141139Fce010982780140Aa0cD5Ab"); + + deployer.deploy(GuardianStorage); +}; diff --git a/package-lock.json b/package-lock.json index e9d5703b4..f263b14fa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,6 +18,19 @@ "@babel/highlight": "^7.10.4" } }, + "@babel/helper-module-imports": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.12.1.tgz", + "integrity": "sha512-ZeC1TlMSvikvJNy1v/wPIazCu3NdOwgYZLIkmIyAsGhqkNpiDoQQRmaCK8YP4Pq3GPTLPV9WXaPCJKvx06JxKA==", + "requires": { + "@babel/types": "^7.12.1" + } + }, + "@babel/helper-plugin-utils": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==" + }, "@babel/helper-validator-identifier": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz", @@ -33,6 +46,58 @@ "js-tokens": "^4.0.0" } }, + "@babel/plugin-transform-runtime": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.12.1.tgz", + "integrity": "sha512-Ac/H6G9FEIkS2tXsZjL4RAdS3L3WHxci0usAnz7laPWUmFiGtj7tIASChqKZMHTSQTQY6xDbOq+V1/vIq3QrWg==", + "requires": { + "@babel/helper-module-imports": "^7.12.1", + "@babel/helper-plugin-utils": "^7.10.4", + "resolve": "^1.8.1", + "semver": "^5.5.1" + }, + "dependencies": { + "resolve": { + "version": "1.18.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.18.1.tgz", + "integrity": "sha512-lDfCPaMKfOJXjy0dPayzPdF1phampNWr3qFCjAu+rw/qbQmr5jWH5xN2hwh9QKfw9E5v4hwV7A+jrCmL8yjjqA==", + "requires": { + "is-core-module": "^2.0.0", + "path-parse": "^1.0.6" + } + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + } + } + }, + "@babel/runtime": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.1.tgz", + "integrity": "sha512-J5AIf3vPj3UwXaAzb5j1xM4WAQDX3EMgemF8rjCP3SoW09LfRKAXQKt6CoVYl230P6iWdRcBbnLDDdnqWxZSCA==", + "requires": { + "regenerator-runtime": "^0.13.4" + } + }, + "@babel/types": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.1.tgz", + "integrity": "sha512-BzSY3NJBKM4kyatSOWh3D/JJ2O3CVzBybHWxtgxnggaxEuaSTTDqeiSb/xk9lrkw2Tbqyivw5ZU4rT+EfznQsA==", + "requires": { + "@babel/helper-validator-identifier": "^7.10.4", + "lodash": "^4.17.19", + "to-fast-properties": "^2.0.0" + }, + "dependencies": { + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==" + } + } + }, "@codechecks/client": { "version": "0.1.10", "resolved": "https://registry.npmjs.org/@codechecks/client/-/client-0.1.10.tgz", @@ -698,6 +763,74 @@ "integrity": "sha512-UIfVKsXSXocKnn5+RNklUXNoGd/JVj7V8KmC48TQzmjU33HQI86PX0JDS7SpHMHasI3w9X//1q7Lu7nZtj3Zzg==", "dev": true }, + "@truffle/hdwallet-provider": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@truffle/hdwallet-provider/-/hdwallet-provider-1.1.1.tgz", + "integrity": "sha512-Gw5lk2dUs6NhLcaF49FuuL3Qv1Setpgr9uUhf7voIS/1OD4ar2CW9Zv7QJiR5m0PD/b8SUqbIckq0evY4Mendg==", + "requires": { + "@trufflesuite/web3-provider-engine": "15.0.13-1", + "@types/web3": "^1.0.20", + "any-promise": "^1.3.0", + "bindings": "^1.5.0", + "ethereum-cryptography": "^0.1.3", + "ethereum-protocol": "^1.0.1", + "ethereumjs-tx": "^1.0.0", + "ethereumjs-util": "^6.1.0", + "ethereumjs-wallet": "^0.6.3", + "source-map-support": "^0.5.19" + }, + "dependencies": { + "bn.js": { + "version": "4.11.9", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" + }, + "ethereum-common": { + "version": "0.0.18", + "resolved": "https://registry.npmjs.org/ethereum-common/-/ethereum-common-0.0.18.tgz", + "integrity": "sha1-L9w1dvIykDNYl26znaeDIT/5Uj8=" + }, + "ethereumjs-tx": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/ethereumjs-tx/-/ethereumjs-tx-1.3.7.tgz", + "integrity": "sha512-wvLMxzt1RPhAQ9Yi3/HKZTn0FZYpnsmQdbKYfUUpi4j1SEIcbkd9tndVjcPrufY3V7j2IebOpC00Zp2P/Ay2kA==", + "requires": { + "ethereum-common": "^0.0.18", + "ethereumjs-util": "^5.0.0" + }, + "dependencies": { + "ethereumjs-util": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz", + "integrity": "sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ==", + "requires": { + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "elliptic": "^6.5.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "^0.1.3", + "rlp": "^2.0.0", + "safe-buffer": "^5.1.1" + } + } + } + }, + "ethereumjs-util": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz", + "integrity": "sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw==", + "requires": { + "@types/bn.js": "^4.11.3", + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "elliptic": "^6.5.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "0.1.6", + "rlp": "^2.2.3" + } + } + } + }, "@truffle/interface-adapter": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/@truffle/interface-adapter/-/interface-adapter-0.3.3.tgz", @@ -1834,6 +1967,260 @@ } } }, + "@trufflesuite/eth-json-rpc-filters": { + "version": "4.1.2-1", + "resolved": "https://registry.npmjs.org/@trufflesuite/eth-json-rpc-filters/-/eth-json-rpc-filters-4.1.2-1.tgz", + "integrity": "sha512-/MChvC5dw2ck9NU1cZmdovCz2VKbOeIyR4tcxDvA5sT+NaL0rA2/R5U0yI7zsbo1zD+pgqav77rQHTzpUdDNJQ==", + "requires": { + "@trufflesuite/eth-json-rpc-middleware": "^4.4.2-0", + "await-semaphore": "^0.1.3", + "eth-query": "^2.1.2", + "json-rpc-engine": "^5.1.3", + "lodash.flatmap": "^4.5.0", + "safe-event-emitter": "^1.0.1" + } + }, + "@trufflesuite/eth-json-rpc-infura": { + "version": "4.0.3-0", + "resolved": "https://registry.npmjs.org/@trufflesuite/eth-json-rpc-infura/-/eth-json-rpc-infura-4.0.3-0.tgz", + "integrity": "sha512-xaUanOmo0YLqRsL0SfXpFienhdw5bpQ1WEXxMTRi57az4lwpZBv4tFUDvcerdwJrxX9wQqNmgUgd1BrR01dumw==", + "requires": { + "@trufflesuite/eth-json-rpc-middleware": "^4.4.2-1", + "cross-fetch": "^2.1.1", + "eth-json-rpc-errors": "^1.0.1", + "json-rpc-engine": "^5.1.3" + }, + "dependencies": { + "eth-json-rpc-errors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/eth-json-rpc-errors/-/eth-json-rpc-errors-1.1.1.tgz", + "integrity": "sha512-WT5shJ5KfNqHi9jOZD+ID8I1kuYWNrigtZat7GOQkvwo99f8SzAVaEcWhJUv656WiZOAg3P1RiJQANtUmDmbIg==", + "requires": { + "fast-safe-stringify": "^2.0.6" + } + } + } + }, + "@trufflesuite/eth-json-rpc-middleware": { + "version": "4.4.2-1", + "resolved": "https://registry.npmjs.org/@trufflesuite/eth-json-rpc-middleware/-/eth-json-rpc-middleware-4.4.2-1.tgz", + "integrity": "sha512-iEy9H8ja7/8aYES5HfrepGBKU9n/Y4OabBJEklVd/zIBlhCCBAWBqkIZgXt11nBXO/rYAeKwYuE3puH3ByYnLA==", + "requires": { + "@trufflesuite/eth-sig-util": "^1.4.2", + "btoa": "^1.2.1", + "clone": "^2.1.1", + "eth-json-rpc-errors": "^1.0.1", + "eth-query": "^2.1.2", + "ethereumjs-block": "^1.6.0", + "ethereumjs-tx": "^1.3.7", + "ethereumjs-util": "^5.1.2", + "ethereumjs-vm": "^2.6.0", + "fetch-ponyfill": "^4.0.0", + "json-rpc-engine": "^5.1.3", + "json-stable-stringify": "^1.0.1", + "pify": "^3.0.0", + "safe-event-emitter": "^1.0.1" + }, + "dependencies": { + "bn.js": { + "version": "4.11.9", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" + }, + "eth-json-rpc-errors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/eth-json-rpc-errors/-/eth-json-rpc-errors-1.1.1.tgz", + "integrity": "sha512-WT5shJ5KfNqHi9jOZD+ID8I1kuYWNrigtZat7GOQkvwo99f8SzAVaEcWhJUv656WiZOAg3P1RiJQANtUmDmbIg==", + "requires": { + "fast-safe-stringify": "^2.0.6" + } + }, + "ethereum-common": { + "version": "0.0.18", + "resolved": "https://registry.npmjs.org/ethereum-common/-/ethereum-common-0.0.18.tgz", + "integrity": "sha1-L9w1dvIykDNYl26znaeDIT/5Uj8=" + }, + "ethereumjs-tx": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/ethereumjs-tx/-/ethereumjs-tx-1.3.7.tgz", + "integrity": "sha512-wvLMxzt1RPhAQ9Yi3/HKZTn0FZYpnsmQdbKYfUUpi4j1SEIcbkd9tndVjcPrufY3V7j2IebOpC00Zp2P/Ay2kA==", + "requires": { + "ethereum-common": "^0.0.18", + "ethereumjs-util": "^5.0.0" + } + }, + "ethereumjs-util": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz", + "integrity": "sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ==", + "requires": { + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "elliptic": "^6.5.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "^0.1.3", + "rlp": "^2.0.0", + "safe-buffer": "^5.1.1" + } + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" + } + } + }, + "@trufflesuite/eth-sig-util": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/@trufflesuite/eth-sig-util/-/eth-sig-util-1.4.2.tgz", + "integrity": "sha512-+GyfN6b0LNW77hbQlH3ufZ/1eCON7mMrGym6tdYf7xiNw9Vv3jBO72bmmos1EId2NgBvPMhmYYm6DSLQFTmzrA==", + "requires": { + "ethereumjs-abi": "^0.6.8", + "ethereumjs-util": "^5.1.1" + }, + "dependencies": { + "bn.js": { + "version": "4.11.9", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" + }, + "ethereumjs-util": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz", + "integrity": "sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ==", + "requires": { + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "elliptic": "^6.5.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "^0.1.3", + "rlp": "^2.0.0", + "safe-buffer": "^5.1.1" + } + } + } + }, + "@trufflesuite/web3-provider-engine": { + "version": "15.0.13-1", + "resolved": "https://registry.npmjs.org/@trufflesuite/web3-provider-engine/-/web3-provider-engine-15.0.13-1.tgz", + "integrity": "sha512-6u3x/iIN5fyj8pib5QTUDmIOUiwAGhaqdSTXdqCu6v9zo2BEwdCqgEJd1uXDh3DBmPRDfiZ/ge8oUPy7LerpHg==", + "requires": { + "@trufflesuite/eth-json-rpc-filters": "^4.1.2-1", + "@trufflesuite/eth-json-rpc-infura": "^4.0.3-0", + "@trufflesuite/eth-json-rpc-middleware": "^4.4.2-1", + "@trufflesuite/eth-sig-util": "^1.4.2", + "async": "^2.5.0", + "backoff": "^2.5.0", + "clone": "^2.0.0", + "cross-fetch": "^2.1.0", + "eth-block-tracker": "^4.4.2", + "eth-json-rpc-errors": "^2.0.2", + "ethereumjs-block": "^1.2.2", + "ethereumjs-tx": "^1.2.0", + "ethereumjs-util": "^5.1.5", + "ethereumjs-vm": "^2.3.4", + "json-stable-stringify": "^1.0.1", + "promise-to-callback": "^1.0.0", + "readable-stream": "^2.2.9", + "request": "^2.85.0", + "semaphore": "^1.0.3", + "ws": "^5.1.1", + "xhr": "^2.2.0", + "xtend": "^4.0.1" + }, + "dependencies": { + "async": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", + "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", + "requires": { + "lodash": "^4.17.14" + } + }, + "bn.js": { + "version": "4.11.9", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" + }, + "ethereum-common": { + "version": "0.0.18", + "resolved": "https://registry.npmjs.org/ethereum-common/-/ethereum-common-0.0.18.tgz", + "integrity": "sha1-L9w1dvIykDNYl26znaeDIT/5Uj8=" + }, + "ethereumjs-tx": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/ethereumjs-tx/-/ethereumjs-tx-1.3.7.tgz", + "integrity": "sha512-wvLMxzt1RPhAQ9Yi3/HKZTn0FZYpnsmQdbKYfUUpi4j1SEIcbkd9tndVjcPrufY3V7j2IebOpC00Zp2P/Ay2kA==", + "requires": { + "ethereum-common": "^0.0.18", + "ethereumjs-util": "^5.0.0" + } + }, + "ethereumjs-util": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz", + "integrity": "sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ==", + "requires": { + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "elliptic": "^6.5.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "^0.1.3", + "rlp": "^2.0.0", + "safe-buffer": "^5.1.1" + } + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==" + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + } + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + } + } + }, + "ws": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-5.2.2.tgz", + "integrity": "sha512-jaHFD6PFv6UgoIVda6qZllptQsMlDEJkTQcybzzXDYM1XO9Y8em691FGMPmM46WGyLU4z9KMgQN+qrux/nhlHA==", + "requires": { + "async-limiter": "~1.0.0" + } + } + } + }, "@types/bn.js": { "version": "4.11.6", "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-4.11.6.tgz", @@ -1914,6 +2301,14 @@ "@types/node": "*" } }, + "@types/web3": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@types/web3/-/web3-1.2.2.tgz", + "integrity": "sha512-eFiYJKggNrOl0nsD+9cMh2MLk4zVBfXfGnVeRFbpiZzBE20eet4KLA3fXcjSuHaBn0RnQzwLAGdgzgzdet4C0A==", + "requires": { + "web3": "*" + } + }, "@uniswap/lib": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/@uniswap/lib/-/lib-1.1.4.tgz", @@ -1929,6 +2324,14 @@ "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz", "integrity": "sha1-kbR5JYinc4wl813W9jdSovh3YTU=" }, + "abstract-leveldown": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-2.6.3.tgz", + "integrity": "sha512-2++wDf/DYqkPR3o5tbfdhF96EfMApo1GpPfzOsR/ZYXdkSmELlvOOEAl9iKkRsktMPHdGjO4rtkBpf2I7TiTeA==", + "requires": { + "xtend": "~4.0.0" + } + }, "accepts": { "version": "1.3.7", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", @@ -2025,8 +2428,7 @@ "any-promise": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", - "integrity": "sha1-q8av7tzqUugJzcA3au0845Y10X8=", - "dev": true + "integrity": "sha1-q8av7tzqUugJzcA3au0845Y10X8=" }, "anymatch": { "version": "3.1.1", @@ -2165,6 +2567,29 @@ "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=" }, + "async-eventemitter": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/async-eventemitter/-/async-eventemitter-0.2.4.tgz", + "integrity": "sha512-pd20BwL7Yt1zwDFy+8MX8F1+WCT8aQeKj0kQnTrH9WaeRETlRamVhD0JtRPmrV4GfOJ2F9CvdQkZeZhnh2TuHw==", + "requires": { + "async": "^2.4.0" + }, + "dependencies": { + "async": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", + "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", + "requires": { + "lodash": "^4.17.14" + } + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==" + } + } + }, "async-limiter": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz", @@ -2175,6 +2600,11 @@ "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" }, + "await-semaphore": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/await-semaphore/-/await-semaphore-0.1.3.tgz", + "integrity": "sha512-d1W2aNSYcz/sxYO4pMGX9vq65qOTu0P800epMud+6cYYX0QcT7zyqcxec3VWzpgvdXo57UWmVbZpLMjX2m1I7Q==" + }, "aws-sdk": { "version": "2.774.0", "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.774.0.tgz", @@ -2201,28 +2631,71 @@ "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.10.1.tgz", "integrity": "sha512-zg7Hz2k5lI8kb7U32998pRRFin7zJlkfezGJjUc2heaD4Pw2wObakCDVzkKztTm/Ln7eiVvYsjqak0Ed4LkMDA==" }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" - }, - "base-x": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.8.tgz", - "integrity": "sha512-Rl/1AWP4J/zRrk54hhlxH4drNxPJXYUaKffODVI53/dAsV4t9fBxyxYKAVPU1XBHxYwOWP9h9H0hM2MVw4YfJA==", - "requires": { - "safe-buffer": "^5.0.1" - } - }, - "base64-js": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz", - "integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==" - }, - "bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "axios": { + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.19.2.tgz", + "integrity": "sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA==", + "dev": true, + "requires": { + "follow-redirects": "1.5.10" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "follow-redirects": { + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz", + "integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==", + "dev": true, + "requires": { + "debug": "=3.1.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "backoff": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/backoff/-/backoff-2.5.0.tgz", + "integrity": "sha1-9hbtqdPktmuMp/ynn2lXIsX44m8=", + "requires": { + "precond": "0.2" + } + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + }, + "base-x": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.8.tgz", + "integrity": "sha512-Rl/1AWP4J/zRrk54hhlxH4drNxPJXYUaKffODVI53/dAsV4t9fBxyxYKAVPU1XBHxYwOWP9h9H0hM2MVw4YfJA==", + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "base64-js": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz", + "integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==" + }, + "bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", "requires": { "tweetnacl": "^0.14.3" } @@ -2246,7 +2719,6 @@ "version": "1.5.0", "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", - "dev": true, "requires": { "file-uri-to-path": "1.0.0" } @@ -2475,6 +2947,11 @@ "safe-buffer": "^5.1.2" } }, + "btoa": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/btoa/-/btoa-1.2.1.tgz", + "integrity": "sha512-SB4/MIGlsiVkMcHmT+pSmIPoNDoHg+7cMzmt3Uxt628MTz2487DKSqK/fuhFBrkuqrYv5UCEnACpF4dTFNKc/g==" + }, "buffer": { "version": "4.9.2", "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz", @@ -2516,8 +2993,7 @@ "buffer-from": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", - "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", - "dev": true + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==" }, "buffer-to-arraybuffer": { "version": "0.0.5", @@ -2657,6 +3133,14 @@ "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=" }, + "checkpoint-store": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/checkpoint-store/-/checkpoint-store-1.1.0.tgz", + "integrity": "sha1-BOTLUWuRQziTWB5tRgGnjpVS6gY=", + "requires": { + "functional-red-black-tree": "^1.0.1" + } + }, "chokidar": { "version": "3.4.2", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.2.tgz", @@ -2723,6 +3207,12 @@ "safe-buffer": "^5.0.1" } }, + "circular": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/circular/-/circular-1.0.5.tgz", + "integrity": "sha1-fad6+Yu96c5LWzWM1Va13e0tMUk=", + "dev": true + }, "class-is": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/class-is/-/class-is-1.1.0.tgz", @@ -2741,6 +3231,22 @@ "restore-cursor": "^3.1.0" } }, + "cli-logger": { + "version": "0.5.40", + "resolved": "https://registry.npmjs.org/cli-logger/-/cli-logger-0.5.40.tgz", + "integrity": "sha1-CX8OEbByx8aYomxH9YiinCC0iws=", + "dev": true, + "requires": { + "circular": "^1.0.5", + "cli-util": "~1.1.27" + } + }, + "cli-regexp": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/cli-regexp/-/cli-regexp-0.1.2.tgz", + "integrity": "sha1-a82TsJ+y7RAl0woRVdWZeVSlNRI=", + "dev": true + }, "cli-table": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/cli-table/-/cli-table-0.3.1.tgz", @@ -2851,6 +3357,15 @@ } } }, + "cli-util": { + "version": "1.1.27", + "resolved": "https://registry.npmjs.org/cli-util/-/cli-util-1.1.27.tgz", + "integrity": "sha1-QtaeNqBAoyH8nPhRwVE8rcUJMFQ=", + "dev": true, + "requires": { + "cli-regexp": "~0.1.0" + } + }, "cli-width": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz", @@ -2911,6 +3426,11 @@ } } }, + "clone": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", + "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=" + }, "clone-response": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", @@ -3133,6 +3653,22 @@ "sha.js": "^2.4.8" } }, + "cross-fetch": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-2.2.3.tgz", + "integrity": "sha512-PrWWNH3yL2NYIb/7WF/5vFG3DCQiXDOVf8k3ijatbrtnwNuhMWLC7YF7uqf53tbTFDzHIUD8oITw4Bxt8ST3Nw==", + "requires": { + "node-fetch": "2.1.2", + "whatwg-fetch": "2.0.4" + }, + "dependencies": { + "node-fetch": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.1.2.tgz", + "integrity": "sha1-q4hOjn5X44qUR1POxwb3iNF2i7U=" + } + } + }, "cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -3360,6 +3896,14 @@ "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz", "integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==" }, + "deferred-leveldown": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/deferred-leveldown/-/deferred-leveldown-1.2.2.tgz", + "integrity": "sha512-uukrWD2bguRtXilKt6cAWKyoXrTSMo5m7crUdLfWQmu8kIm88w3QZoUL+6nhpfKVmhHANER6Re3sKoNoZ3IKMA==", + "requires": { + "abstract-leveldown": "~2.6.0" + } + }, "deffy": { "version": "2.2.4", "resolved": "https://registry.npmjs.org/deffy/-/deffy-2.2.4.tgz", @@ -3376,6 +3920,12 @@ "object-keys": "^1.0.12" } }, + "delay": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/delay/-/delay-4.3.0.tgz", + "integrity": "sha512-Lwaf3zVFDMBop1yDuFZ19F9WyGcZcGacsbdlZtWjQmM50tOcMntm1njF/Nb/Vjij3KaSvCF+sEYGKrrjObu2NA==", + "dev": true + }, "delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -3537,6 +4087,24 @@ "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" }, + "encoding": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", + "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", + "requires": { + "iconv-lite": "^0.6.2" + }, + "dependencies": { + "iconv-lite": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.2.tgz", + "integrity": "sha512-2y91h5OpQlolefMPmUlivelittSWy0rP+oYVpn6A7GwVHNE8AWzoYOBNmlwks3LobaJxgHCYZAnyNo2GgpNRNQ==", + "requires": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + } + } + } + }, "end-of-stream": { "version": "1.4.4", "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", @@ -3553,6 +4121,14 @@ "ansi-colors": "^4.1.1" } }, + "errno": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz", + "integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==", + "requires": { + "prr": "~1.0.1" + } + }, "error-ex": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", @@ -4246,6 +4822,26 @@ "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" }, + "eth-block-tracker": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/eth-block-tracker/-/eth-block-tracker-4.4.3.tgz", + "integrity": "sha512-A8tG4Z4iNg4mw5tP1Vung9N9IjgMNqpiMoJ/FouSFwNCGHv2X0mmOYwtQOJzki6XN7r7Tyo01S29p7b224I4jw==", + "requires": { + "@babel/plugin-transform-runtime": "^7.5.5", + "@babel/runtime": "^7.5.5", + "eth-query": "^2.1.0", + "json-rpc-random-id": "^1.0.1", + "pify": "^3.0.0", + "safe-event-emitter": "^1.0.1" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" + } + } + }, "eth-ens-namehash": { "version": "2.0.8", "resolved": "https://registry.npmjs.org/eth-ens-namehash/-/eth-ens-namehash-2.0.8.tgz", @@ -4579,6 +5175,14 @@ } } }, + "eth-json-rpc-errors": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/eth-json-rpc-errors/-/eth-json-rpc-errors-2.0.2.tgz", + "integrity": "sha512-uBCRM2w2ewusRHGxN8JhcuOb2RN3ueAOYH/0BhqdFmQkZx5lj5+fLKTz0mIVOzd4FG5/kUksCzCD7eTEim6gaA==", + "requires": { + "fast-safe-stringify": "^2.0.6" + } + }, "eth-lib": { "version": "0.1.29", "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.1.29.tgz", @@ -4614,6 +5218,23 @@ } } }, + "eth-query": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/eth-query/-/eth-query-2.1.2.tgz", + "integrity": "sha1-1nQdkAAQa1FRDHLbktY2VFam2l4=", + "requires": { + "json-rpc-random-id": "^1.0.0", + "xtend": "^4.0.1" + } + }, + "eth-rpc-errors": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eth-rpc-errors/-/eth-rpc-errors-3.0.0.tgz", + "integrity": "sha512-iPPNHPrLwUlR9xCSYm7HHQjWBasor3+KZfRvwEWxMz3ca0yqnlBeJrnyphkGIXZ4J7AMAaOLmwy4AWhnxOiLxg==", + "requires": { + "fast-safe-stringify": "^2.0.6" + } + }, "ethereum-bloom-filters": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/ethereum-bloom-filters/-/ethereum-bloom-filters-1.0.7.tgz", @@ -4629,42 +5250,310 @@ } } }, - "ethereum-cryptography": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", - "integrity": "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==", + "ethereum-common": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/ethereum-common/-/ethereum-common-0.2.0.tgz", + "integrity": "sha512-XOnAR/3rntJgbCdGhqdaLIxDLWKLmsZOGhHdBKadEr6gEnJLH52k93Ou+TUdFaPN3hJc3isBZBal3U/XZ15abA==" + }, + "ethereum-cryptography": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", + "integrity": "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==", + "requires": { + "@types/pbkdf2": "^3.0.0", + "@types/secp256k1": "^4.0.1", + "blakejs": "^1.1.0", + "browserify-aes": "^1.2.0", + "bs58check": "^2.1.2", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "hash.js": "^1.1.7", + "keccak": "^3.0.0", + "pbkdf2": "^3.0.17", + "randombytes": "^2.1.0", + "safe-buffer": "^5.1.2", + "scrypt-js": "^3.0.0", + "secp256k1": "^4.0.1", + "setimmediate": "^1.0.5" + } + }, + "ethereum-protocol": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ethereum-protocol/-/ethereum-protocol-1.0.1.tgz", + "integrity": "sha512-3KLX1mHuEsBW0dKG+c6EOJS1NBNqdCICvZW9sInmZTt5aY0oxmHVggYRE0lJu1tcnMD1K+AKHdLi6U43Awm1Vg==" + }, + "ethereumjs-abi": { + "version": "0.6.8", + "resolved": "https://registry.npmjs.org/ethereumjs-abi/-/ethereumjs-abi-0.6.8.tgz", + "integrity": "sha512-Tx0r/iXI6r+lRsdvkFDlut0N08jWMnKRZ6Gkq+Nmw75lZe4e6o3EkSnkaBP5NF6+m5PTGAr9JP43N3LyeoglsA==", + "requires": { + "bn.js": "^4.11.8", + "ethereumjs-util": "^6.0.0" + }, + "dependencies": { + "bn.js": { + "version": "4.11.9", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" + }, + "ethereumjs-util": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz", + "integrity": "sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw==", + "requires": { + "@types/bn.js": "^4.11.3", + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "elliptic": "^6.5.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "0.1.6", + "rlp": "^2.2.3" + } + } + } + }, + "ethereumjs-account": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/ethereumjs-account/-/ethereumjs-account-2.0.5.tgz", + "integrity": "sha512-bgDojnXGjhMwo6eXQC0bY6UK2liSFUSMwwylOmQvZbSl/D7NXQ3+vrGO46ZeOgjGfxXmgIeVNDIiHw7fNZM4VA==", + "requires": { + "ethereumjs-util": "^5.0.0", + "rlp": "^2.0.0", + "safe-buffer": "^5.1.1" + }, + "dependencies": { + "bn.js": { + "version": "4.11.9", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" + }, + "ethereumjs-util": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz", + "integrity": "sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ==", + "requires": { + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "elliptic": "^6.5.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "^0.1.3", + "rlp": "^2.0.0", + "safe-buffer": "^5.1.1" + } + } + } + }, + "ethereumjs-block": { + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/ethereumjs-block/-/ethereumjs-block-1.7.1.tgz", + "integrity": "sha512-B+sSdtqm78fmKkBq78/QLKJbu/4Ts4P2KFISdgcuZUPDm9x+N7qgBPIIFUGbaakQh8bzuquiRVbdmvPKqbILRg==", + "requires": { + "async": "^2.0.1", + "ethereum-common": "0.2.0", + "ethereumjs-tx": "^1.2.2", + "ethereumjs-util": "^5.0.0", + "merkle-patricia-tree": "^2.1.2" + }, + "dependencies": { + "async": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", + "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", + "requires": { + "lodash": "^4.17.14" + } + }, + "bn.js": { + "version": "4.11.9", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" + }, + "ethereumjs-tx": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/ethereumjs-tx/-/ethereumjs-tx-1.3.7.tgz", + "integrity": "sha512-wvLMxzt1RPhAQ9Yi3/HKZTn0FZYpnsmQdbKYfUUpi4j1SEIcbkd9tndVjcPrufY3V7j2IebOpC00Zp2P/Ay2kA==", + "requires": { + "ethereum-common": "^0.0.18", + "ethereumjs-util": "^5.0.0" + }, + "dependencies": { + "ethereum-common": { + "version": "0.0.18", + "resolved": "https://registry.npmjs.org/ethereum-common/-/ethereum-common-0.0.18.tgz", + "integrity": "sha1-L9w1dvIykDNYl26znaeDIT/5Uj8=" + } + } + }, + "ethereumjs-util": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz", + "integrity": "sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ==", + "requires": { + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "elliptic": "^6.5.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "^0.1.3", + "rlp": "^2.0.0", + "safe-buffer": "^5.1.1" + } + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==" + } + } + }, + "ethereumjs-common": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/ethereumjs-common/-/ethereumjs-common-1.5.2.tgz", + "integrity": "sha512-hTfZjwGX52GS2jcVO6E2sx4YuFnf0Fhp5ylo4pEPhEffNln7vS59Hr5sLnp3/QCazFLluuBZ+FZ6J5HTp0EqCA==" + }, + "ethereumjs-tx": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ethereumjs-tx/-/ethereumjs-tx-2.1.2.tgz", + "integrity": "sha512-zZEK1onCeiORb0wyCXUvg94Ve5It/K6GD1K+26KfFKodiBiS6d9lfCXlUKGBBdQ+bv7Day+JK0tj1K+BeNFRAw==", + "requires": { + "ethereumjs-common": "^1.5.0", + "ethereumjs-util": "^6.0.0" + }, + "dependencies": { + "bn.js": { + "version": "4.11.9", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" + }, + "ethereumjs-util": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz", + "integrity": "sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw==", + "requires": { + "@types/bn.js": "^4.11.3", + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "elliptic": "^6.5.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "0.1.6", + "rlp": "^2.2.3" + } + } + } + }, + "ethereumjs-util": { + "version": "7.0.7", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.0.7.tgz", + "integrity": "sha512-vU5rtZBlZsgkTw3o6PDKyB8li2EgLavnAbsKcfsH2YhHH1Le+PP8vEiMnAnvgc1B6uMoaM5GDCrVztBw0Q5K9g==", + "requires": { + "@types/bn.js": "^4.11.3", + "bn.js": "^5.1.2", + "create-hash": "^1.1.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "0.1.6", + "rlp": "^2.2.4" + } + }, + "ethereumjs-vm": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/ethereumjs-vm/-/ethereumjs-vm-2.6.0.tgz", + "integrity": "sha512-r/XIUik/ynGbxS3y+mvGnbOKnuLo40V5Mj1J25+HEO63aWYREIqvWeRO/hnROlMBE5WoniQmPmhiaN0ctiHaXw==", + "requires": { + "async": "^2.1.2", + "async-eventemitter": "^0.2.2", + "ethereumjs-account": "^2.0.3", + "ethereumjs-block": "~2.2.0", + "ethereumjs-common": "^1.1.0", + "ethereumjs-util": "^6.0.0", + "fake-merkle-patricia-tree": "^1.0.1", + "functional-red-black-tree": "^1.0.1", + "merkle-patricia-tree": "^2.3.2", + "rustbn.js": "~0.2.0", + "safe-buffer": "^5.1.1" + }, + "dependencies": { + "async": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", + "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", + "requires": { + "lodash": "^4.17.14" + } + }, + "bn.js": { + "version": "4.11.9", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" + }, + "ethereumjs-block": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/ethereumjs-block/-/ethereumjs-block-2.2.2.tgz", + "integrity": "sha512-2p49ifhek3h2zeg/+da6XpdFR3GlqY3BIEiqxGF8j9aSRIgkb7M1Ky+yULBKJOu8PAZxfhsYA+HxUk2aCQp3vg==", + "requires": { + "async": "^2.0.1", + "ethereumjs-common": "^1.5.0", + "ethereumjs-tx": "^2.1.1", + "ethereumjs-util": "^5.0.0", + "merkle-patricia-tree": "^2.1.2" + }, + "dependencies": { + "ethereumjs-util": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz", + "integrity": "sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ==", + "requires": { + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "elliptic": "^6.5.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "^0.1.3", + "rlp": "^2.0.0", + "safe-buffer": "^5.1.1" + } + } + } + }, + "ethereumjs-util": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz", + "integrity": "sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw==", + "requires": { + "@types/bn.js": "^4.11.3", + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "elliptic": "^6.5.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "0.1.6", + "rlp": "^2.2.3" + } + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==" + } + } + }, + "ethereumjs-wallet": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/ethereumjs-wallet/-/ethereumjs-wallet-0.6.5.tgz", + "integrity": "sha512-MDwjwB9VQVnpp/Dc1XzA6J1a3wgHQ4hSvA1uWNatdpOrtCbPVuQSKSyRnjLvS0a+KKMw2pvQ9Ybqpb3+eW8oNA==", "requires": { - "@types/pbkdf2": "^3.0.0", - "@types/secp256k1": "^4.0.1", - "blakejs": "^1.1.0", - "browserify-aes": "^1.2.0", + "aes-js": "^3.1.1", "bs58check": "^2.1.2", - "create-hash": "^1.2.0", - "create-hmac": "^1.1.7", - "hash.js": "^1.1.7", - "keccak": "^3.0.0", - "pbkdf2": "^3.0.17", - "randombytes": "^2.1.0", + "ethereum-cryptography": "^0.1.3", + "ethereumjs-util": "^6.0.0", + "randombytes": "^2.0.6", "safe-buffer": "^5.1.2", - "scrypt-js": "^3.0.0", - "secp256k1": "^4.0.1", - "setimmediate": "^1.0.5" - } - }, - "ethereumjs-common": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/ethereumjs-common/-/ethereumjs-common-1.5.2.tgz", - "integrity": "sha512-hTfZjwGX52GS2jcVO6E2sx4YuFnf0Fhp5ylo4pEPhEffNln7vS59Hr5sLnp3/QCazFLluuBZ+FZ6J5HTp0EqCA==" - }, - "ethereumjs-tx": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ethereumjs-tx/-/ethereumjs-tx-2.1.2.tgz", - "integrity": "sha512-zZEK1onCeiORb0wyCXUvg94Ve5It/K6GD1K+26KfFKodiBiS6d9lfCXlUKGBBdQ+bv7Day+JK0tj1K+BeNFRAw==", - "requires": { - "ethereumjs-common": "^1.5.0", - "ethereumjs-util": "^6.0.0" + "scryptsy": "^1.2.1", + "utf8": "^3.0.0", + "uuid": "^3.3.2" }, "dependencies": { + "aes-js": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.1.2.tgz", + "integrity": "sha512-e5pEa2kBnBOgR4Y/p20pskXI74UEz7de8ZGVo58asOtvSVG5YAbJeELPZxOmt+Bnz3rX753YKhfIn4X4l1PPRQ==" + }, "bn.js": { "version": "4.11.9", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", @@ -4683,22 +5572,17 @@ "ethjs-util": "0.1.6", "rlp": "^2.2.3" } + }, + "scryptsy": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/scryptsy/-/scryptsy-1.2.1.tgz", + "integrity": "sha1-oyJfpLJST4AnAHYeKFW987LZIWM=", + "requires": { + "pbkdf2": "^3.0.3" + } } } }, - "ethereumjs-util": { - "version": "7.0.7", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.0.7.tgz", - "integrity": "sha512-vU5rtZBlZsgkTw3o6PDKyB8li2EgLavnAbsKcfsH2YhHH1Le+PP8vEiMnAnvgc1B6uMoaM5GDCrVztBw0Q5K9g==", - "requires": { - "@types/bn.js": "^4.11.3", - "bn.js": "^5.1.2", - "create-hash": "^1.1.2", - "ethereum-cryptography": "^0.1.3", - "ethjs-util": "0.1.6", - "rlp": "^2.2.4" - } - }, "etherlime-config": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/etherlime-config/-/etherlime-config-1.0.0.tgz", @@ -4981,6 +5865,14 @@ "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" }, + "fake-merkle-patricia-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/fake-merkle-patricia-tree/-/fake-merkle-patricia-tree-1.0.1.tgz", + "integrity": "sha1-S4w6z7Ugr635hgsfFM2M40As3dM=", + "requires": { + "checkpoint-store": "^1.1.0" + } + }, "fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -5015,6 +5907,11 @@ "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=" }, + "fast-safe-stringify": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.7.tgz", + "integrity": "sha512-Utm6CdzT+6xsDk2m8S6uL8VHxNwI6Jub+e9NYTcAms28T84pTa25GJQV9j0CY0N1rM8hK4x6grpF2BQf+2qwVA==" + }, "fastq": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.9.0.tgz", @@ -5033,6 +5930,30 @@ "pend": "~1.2.0" } }, + "fetch-ponyfill": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/fetch-ponyfill/-/fetch-ponyfill-4.1.0.tgz", + "integrity": "sha1-rjzl9zLGReq4fkroeTQUcJsjmJM=", + "requires": { + "node-fetch": "~1.7.1" + }, + "dependencies": { + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" + }, + "node-fetch": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.3.tgz", + "integrity": "sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ==", + "requires": { + "encoding": "^0.1.11", + "is-stream": "^1.0.1" + } + } + } + }, "figures": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", @@ -5058,8 +5979,7 @@ "file-uri-to-path": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", - "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", - "dev": true + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" }, "fill-range": { "version": "7.0.1", @@ -6491,6 +7411,11 @@ "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==" }, + "immediate": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.3.0.tgz", + "integrity": "sha512-HR7EVodfFUdQCTIeySw+WDRFJlPcLOJbXfwwZ7Oom6tjsvZ3bOkCDJHehQC3nxJrv7+f9XecwazynjU8e4Vw3Q==" + }, "import-fresh": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.1.tgz", @@ -6671,7 +7596,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.0.0.tgz", "integrity": "sha512-jq1AH6C8MuteOoBPwkxHafmByhL9j5q4OaPGdbuD+ZtQJVzH+i6E3BJDQcBA09k57i2Hh2yQbEG8yObZ0jdlWw==", - "dev": true, "requires": { "has": "^1.0.3" } @@ -6691,6 +7615,11 @@ "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" }, + "is-fn": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fn/-/is-fn-1.0.0.tgz", + "integrity": "sha1-lUPV3nvPWwiiLsiiC65uKG1RDYw=" + }, "is-fullwidth-code-point": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", @@ -6924,6 +7853,20 @@ "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==" }, + "json-rpc-engine": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/json-rpc-engine/-/json-rpc-engine-5.3.0.tgz", + "integrity": "sha512-+diJ9s8rxB+fbJhT7ZEf8r8spaLRignLd8jTgQ/h5JSGppAHGtNMZtCoabipCaleR1B3GTGxbXBOqhaJSGmPGQ==", + "requires": { + "eth-rpc-errors": "^3.0.0", + "safe-event-emitter": "^1.0.1" + } + }, + "json-rpc-random-id": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-rpc-random-id/-/json-rpc-random-id-1.0.1.tgz", + "integrity": "sha1-uknZat7RRE27jaPSA3SKy7zeyMg=" + }, "json-schema": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", @@ -6934,6 +7877,14 @@ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" }, + "json-stable-stringify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", + "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", + "requires": { + "jsonify": "~0.0.0" + } + }, "json-stable-stringify-without-jsonify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", @@ -6961,6 +7912,11 @@ "graceful-fs": "^4.1.6" } }, + "jsonify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", + "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=" + }, "jsonschema": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/jsonschema/-/jsonschema-1.4.0.tgz", @@ -7001,6 +7957,119 @@ "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", "dev": true }, + "level-codec": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/level-codec/-/level-codec-7.0.1.tgz", + "integrity": "sha512-Ua/R9B9r3RasXdRmOtd+t9TCOEIIlts+TN/7XTT2unhDaL6sJn83S3rUyljbr6lVtw49N3/yA0HHjpV6Kzb2aQ==" + }, + "level-errors": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/level-errors/-/level-errors-1.0.5.tgz", + "integrity": "sha512-/cLUpQduF6bNrWuAC4pwtUKA5t669pCsCi2XbmojG2tFeOr9j6ShtdDCtFFQO1DRt+EVZhx9gPzP9G2bUaG4ig==", + "requires": { + "errno": "~0.1.1" + } + }, + "level-iterator-stream": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/level-iterator-stream/-/level-iterator-stream-1.3.1.tgz", + "integrity": "sha1-5Dt4sagUPm+pek9IXrjqUwNS8u0=", + "requires": { + "inherits": "^2.0.1", + "level-errors": "^1.0.3", + "readable-stream": "^1.0.33", + "xtend": "^4.0.0" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + }, + "readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + } + } + }, + "level-ws": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/level-ws/-/level-ws-0.0.0.tgz", + "integrity": "sha1-Ny5RIXeSSgBCSwtDrvK7QkltIos=", + "requires": { + "readable-stream": "~1.0.15", + "xtend": "~2.1.1" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + }, + "object-keys": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz", + "integrity": "sha1-KKaq50KN0sOpLz2V8hM13SBOAzY=" + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + }, + "xtend": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz", + "integrity": "sha1-bv7MKk2tjmlixJAbM3znuoe10os=", + "requires": { + "object-keys": "~0.4.0" + } + } + } + }, + "levelup": { + "version": "1.3.9", + "resolved": "https://registry.npmjs.org/levelup/-/levelup-1.3.9.tgz", + "integrity": "sha512-VVGHfKIlmw8w1XqpGOAGwq6sZm2WwWLmlDcULkKWQXEA5EopA8OBNJ2Ck2v6bdk8HeEZSbCSEgzXadyQFm76sQ==", + "requires": { + "deferred-leveldown": "~1.2.1", + "level-codec": "~7.0.0", + "level-errors": "~1.0.3", + "level-iterator-stream": "~1.3.0", + "prr": "~1.0.1", + "semver": "~5.4.1", + "xtend": "~4.0.0" + }, + "dependencies": { + "semver": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", + "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==" + } + } + }, "levn": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", @@ -7178,6 +8247,11 @@ "resolved": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz", "integrity": "sha1-W/Rejkm6QYnhfUgnid/RW9FAt7Y=" }, + "lodash.flatmap": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.flatmap/-/lodash.flatmap-4.5.0.tgz", + "integrity": "sha1-74y/QI9uSCaGYzRTBcaswLd4cC4=" + }, "lodash.toarray": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/lodash.toarray/-/lodash.toarray-4.4.0.tgz", @@ -7291,6 +8365,11 @@ "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==" }, + "ltgt": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ltgt/-/ltgt-2.2.1.tgz", + "integrity": "sha1-81ypHEk/e3PaDgdJUwTxezH4fuU=" + }, "make-dir": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", @@ -7382,6 +8461,34 @@ "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" }, + "memdown": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/memdown/-/memdown-1.4.1.tgz", + "integrity": "sha1-tOThkhdGZP+65BNhqlAPMRnv4hU=", + "requires": { + "abstract-leveldown": "~2.7.1", + "functional-red-black-tree": "^1.0.1", + "immediate": "^3.2.3", + "inherits": "~2.0.1", + "ltgt": "~2.2.0", + "safe-buffer": "~5.1.1" + }, + "dependencies": { + "abstract-leveldown": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-2.7.2.tgz", + "integrity": "sha512-+OVvxH2rHVEhWLdbudP6p0+dNMXu8JA1CbhP19T8paTYAcX7oJ4OVjT+ZUVpv7mITxXHqDMej+GdqXBmXkw09w==", + "requires": { + "xtend": "~4.0.0" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + } + } + }, "merge-descriptors": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", @@ -7398,6 +8505,78 @@ "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", "dev": true }, + "merkle-patricia-tree": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/merkle-patricia-tree/-/merkle-patricia-tree-2.3.2.tgz", + "integrity": "sha512-81PW5m8oz/pz3GvsAwbauj7Y00rqm81Tzad77tHBwU7pIAtN+TJnMSOJhxBKflSVYhptMMb9RskhqHqrSm1V+g==", + "requires": { + "async": "^1.4.2", + "ethereumjs-util": "^5.0.0", + "level-ws": "0.0.0", + "levelup": "^1.2.1", + "memdown": "^1.0.0", + "readable-stream": "^2.0.0", + "rlp": "^2.0.0", + "semaphore": ">=1.0.1" + }, + "dependencies": { + "bn.js": { + "version": "4.11.9", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" + }, + "ethereumjs-util": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz", + "integrity": "sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ==", + "requires": { + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "elliptic": "^6.5.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "^0.1.3", + "rlp": "^2.0.0", + "safe-buffer": "^5.1.1" + } + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + } + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + } + } + } + } + }, "methods": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", @@ -8163,8 +9342,7 @@ "path-parse": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", - "dev": true + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==" }, "path-to-regexp": { "version": "0.1.7", @@ -8246,6 +9424,11 @@ "semver-compare": "^1.0.0" } }, + "precond": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/precond/-/precond-0.2.3.tgz", + "integrity": "sha1-qpWRvKokkj8eD0hJ0kD0fvwQdaw=" + }, "prelude-ls": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", @@ -8270,8 +9453,7 @@ "process-nextick-args": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", - "dev": true + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" }, "progress": { "version": "2.0.3", @@ -8287,6 +9469,15 @@ "asap": "~2.0.6" } }, + "promise-to-callback": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/promise-to-callback/-/promise-to-callback-1.0.0.tgz", + "integrity": "sha1-XSp0kBC/tn2WNZj805YHRqaP7vc=", + "requires": { + "is-fn": "^1.0.0", + "set-immediate-shim": "^1.0.1" + } + }, "promise.allsettled": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/promise.allsettled/-/promise.allsettled-1.0.2.tgz", @@ -8308,6 +9499,11 @@ "ipaddr.js": "1.9.1" } }, + "prr": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", + "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=" + }, "psl": { "version": "1.8.0", "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", @@ -8542,6 +9738,11 @@ } } }, + "regenerator-runtime": { + "version": "0.13.7", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz", + "integrity": "sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew==" + }, "regexpp": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", @@ -8725,6 +9926,11 @@ "integrity": "sha512-zb/1OuZ6flOlH6tQyMPUrE3x3Ulxjlo9WIVXR4yVYi4H9UXQaeIsPbLn2R3O3vQCnDKkAl2qHiuocKKX4Tz/Sw==", "dev": true }, + "rustbn.js": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/rustbn.js/-/rustbn.js-0.2.0.tgz", + "integrity": "sha512-4VlvkRUuCJvr2J6Y0ImW7NvTCriMi7ErOAqWk1y69vAdoNIzCF3yPmgeNzx+RQTLEDFq5sHfscn1MwHxP9hNfA==" + }, "rxjs": { "version": "6.6.3", "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.3.tgz", @@ -8738,6 +9944,21 @@ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" }, + "safe-event-emitter": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/safe-event-emitter/-/safe-event-emitter-1.0.1.tgz", + "integrity": "sha512-e1wFe99A91XYYxoQbcq2ZJUWurxEyP8vfz7A7vuUe1s95q8r5ebraVaA1BukYJcpM6V16ugWoD9vngi8Ccu5fg==", + "requires": { + "events": "^3.0.0" + }, + "dependencies": { + "events": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.2.0.tgz", + "integrity": "sha512-/46HWwbfCX2xTawVfkKLGxMifJYQBWMwY1mjywRtb4c9x8l5NP3KoJtnIOiL1hfdRkIuYhETxQlo62IF8tcnlg==" + } + } + }, "safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", @@ -8803,6 +10024,11 @@ } } }, + "semaphore": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/semaphore/-/semaphore-1.1.0.tgz", + "integrity": "sha512-O4OZEaNtkMd/K0i6js9SL+gqy0ZCBMgUvlSqHKi4IBdjhe7wB8pwztUk1BbZ1fmrvpwFrPbHzqd2w5pTcJH6LA==" + }, "semver": { "version": "7.3.2", "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz", @@ -8896,6 +10122,11 @@ "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" }, + "set-immediate-shim": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", + "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=" + }, "setimmediate": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", @@ -9465,7 +10696,6 @@ "version": "0.5.19", "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", - "dev": true, "requires": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" @@ -9474,8 +10704,7 @@ "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" } } }, @@ -9974,6 +11203,11 @@ "integrity": "sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==", "dev": true }, + "to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=" + }, "to-readable-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz", @@ -10011,6 +11245,18 @@ "original-require": "1.0.1" } }, + "truffle-plugin-verify": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/truffle-plugin-verify/-/truffle-plugin-verify-0.5.0.tgz", + "integrity": "sha512-VDT0FlFZisceRMrmlkKKiN/EmvFI6n6piAq9PQTrqWX6DdC64cE1RpmeLewIqL5L+5CVeLcApJMd58BpLUqNJg==", + "dev": true, + "requires": { + "axios": "0.19.2", + "cli-logger": "0.5.40", + "delay": "4.3.0", + "querystring": "0.2.0" + } + }, "ts-essentials": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/ts-essentials/-/ts-essentials-1.0.4.tgz", @@ -10663,6 +11909,11 @@ } } }, + "whatwg-fetch": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz", + "integrity": "sha512-dcQ1GWpOD/eEQ97k66aiEVpNnapVj90/+R+SXTPYGHpYBBypfKJEQjLrvMZ7YXbKm21gXd4NcuxUTjiv1YtLng==" + }, "which": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", diff --git a/package.json b/package.json index 2dcd71ecd..2a3de45b7 100644 --- a/package.json +++ b/package.json @@ -60,6 +60,7 @@ "homepage": "https://github.com/argentlabs/argent-contracts#readme", "dependencies": { "@openzeppelin/contracts": "3.0.1", + "@truffle/hdwallet-provider": "^1.1.1", "@uniswap/lib": "^1.1.2", "@uniswap/v2-core": "^1.0.1", "ajv": "^6.10.0", @@ -95,6 +96,7 @@ "eslint-plugin-import": "^2.20.1", "eth-gas-reporter": "^0.2.19", "mocha-junit-reporter": "^2.0.0", - "solidity-coverage": "^0.7.11" + "solidity-coverage": "^0.7.11", + "truffle-plugin-verify": "^0.5.0" } } diff --git a/truffle-config.base.js b/truffle-config.base.js index b110d4a1e..bf8709fc6 100644 --- a/truffle-config.base.js +++ b/truffle-config.base.js @@ -18,7 +18,9 @@ * */ -// const HDWalletProvider = require('@truffle/hdwallet-provider'); +const HDWalletProvider = require("@truffle/hdwallet-provider"); +require("dotenv").config(); + // const infuraKey = "fj4jll3k....."; // // const fs = require('fs'); @@ -48,6 +50,11 @@ module.exports = { gas: 20700000 }, + ropsten: { + provider: () => new HDWalletProvider(`${process.env.MNEMONIC}`, `https://ropsten.infura.io/v3/${process.env.INFURA_ID}`), + network_id: 3, + }, + // Another network with more advanced options... // advanced: { // port: 8777, // Custom port @@ -104,5 +111,9 @@ module.exports = { }, }, - plugins: ["solidity-coverage"], + plugins: ["solidity-coverage", "truffle-plugin-verify"], + + api_keys: { + etherscan: process.env.ETHERSCAN_API_KEY + }, }; From c19780bb1eb16b6b6dd29403cbf797323272329c Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Wed, 4 Nov 2020 15:42:19 +0200 Subject: [PATCH 069/113] Remove obsolete solc configuration in base --- test/nftTransfer.js | 4 ++-- test/transferManager.js | 8 ++++---- truffle-config.base.js | 14 -------------- utils/utilities.js | 2 +- 4 files changed, 7 insertions(+), 21 deletions(-) diff --git a/test/nftTransfer.js b/test/nftTransfer.js index cef3508e7..c869564c3 100644 --- a/test/nftTransfer.js +++ b/test/nftTransfer.js @@ -232,9 +232,9 @@ contract("NftTransfer", (accounts) => { it("should delegate onERC721Received static calls to the NftTransfer feature", async () => { const ERC721_RECEIVED = ethers.utils.keccak256(ethers.utils.toUtf8Bytes("onERC721Received(address,address,uint256,bytes)")).slice(0, 10); const erc721ReceivedDelegate = await wallet1.enabled(ERC721_RECEIVED); - assert.equal(erc721ReceivedDelegate, versionManager.contractAddress); + assert.equal(erc721ReceivedDelegate, versionManager.address); - const walletAsTransferManager = deployer.wrapDeployedContract(NftTransfer, wallet1.contractAddress); + const walletAsTransferManager = await NftTransfer.at(wallet1.address); const result = await callStatic(walletAsTransferManager, "onERC721Received", infrastructure.address, infrastructure.address, 0, "0x"); assert.equal(result, ERC721_RECEIVED); }); diff --git a/test/transferManager.js b/test/transferManager.js index e7a4ddcc2..f857e79b2 100644 --- a/test/transferManager.js +++ b/test/transferManager.js @@ -896,16 +896,16 @@ contract.skip("TransferManager", (accounts) => { it("should delegate isValidSignature static calls to the TransferManager", async () => { const ERC1271_ISVALIDSIGNATURE_BYTES32 = ethers.utils.keccak256(ethers.utils.toUtf8Bytes("isValidSignature(bytes32,bytes)")).slice(0, 10); const isValidSignatureDelegate = await wallet.enabled(ERC1271_ISVALIDSIGNATURE_BYTES32); - assert.equal(isValidSignatureDelegate, versionManager.contractAddress); + assert.equal(isValidSignatureDelegate, versionManager.address); - const walletAsTransferManager = deployer.wrapDeployedContract(TransferManager, wallet.contractAddress); + const walletAsTransferManager = await TransferManager.at(wallet.address); const signHash = ethers.utils.keccak256("0x1234"); const sig = await utils.personalSign(signHash, owner); const valid = await walletAsTransferManager.isValidSignature(signHash, sig); assert.equal(valid, ERC1271_ISVALIDSIGNATURE_BYTES32); }); it("should revert isValidSignature static call for invalid signature", async () => { - const walletAsTransferManager = deployer.wrapDeployedContract(TransferManager, wallet.contractAddress); + const walletAsTransferManager = await TransferManager.at(wallet.address); const signHash = ethers.utils.keccak256("0x1234"); const sig = `${await utils.personalSign(signHash, owner)}a1`; @@ -914,7 +914,7 @@ contract.skip("TransferManager", (accounts) => { ); }); it("should revert isValidSignature static call for invalid signer", async () => { - const walletAsTransferManager = deployer.wrapDeployedContract(TransferManager, wallet.contractAddress); + const walletAsTransferManager = await TransferManager.at(wallet.address); const signHash = ethers.utils.keccak256("0x1234"); const sig = await utils.personalSign(signHash, nonowner); diff --git a/truffle-config.base.js b/truffle-config.base.js index bf8709fc6..d86884f8e 100644 --- a/truffle-config.base.js +++ b/truffle-config.base.js @@ -97,20 +97,6 @@ module.exports = { }, }, - // Configure your compilers - compilers: { - solc: { - version: "0.6.12", // Fetch exact version from solc-bin (default: truffle's version) - docker: true, // Use "0.5.1" you've installed locally with docker (default: false) - settings: { // See the solidity docs for advice about optimization and evmVersion - optimizer: { - enabled: true, - runs: 999, - }, - }, - }, - }, - plugins: ["solidity-coverage", "truffle-plugin-verify"], api_keys: { diff --git a/utils/utilities.js b/utils/utilities.js index 7371cca6a..62d5e56ee 100644 --- a/utils/utilities.js +++ b/utils/utilities.js @@ -180,7 +180,7 @@ module.exports = { ); return contract.callStatic[method](...args); }, - + async getBalance(account) { const balance = await web3.eth.getBalance(account); return new BN(balance); From 3d1844f826d0e09c48c6bfe0ffc06ad95959b257 Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Wed, 4 Nov 2020 17:48:20 +0200 Subject: [PATCH 070/113] Remove deployment script for 2.2 release --- deployment/7_upgrade_2_2.js | 326 ------------------------------------ 1 file changed, 326 deletions(-) delete mode 100644 deployment/7_upgrade_2_2.js diff --git a/deployment/7_upgrade_2_2.js b/deployment/7_upgrade_2_2.js deleted file mode 100644 index bfecf65d7..000000000 --- a/deployment/7_upgrade_2_2.js +++ /dev/null @@ -1,326 +0,0 @@ -const semver = require("semver"); -const childProcess = require("child_process"); -const MultiSig = require("../build/MultiSigWallet"); -const ModuleRegistry = require("../build/ModuleRegistry"); -const Upgrader = require("../build/UpgraderToVersionManager"); -const DeployManager = require("../utils/deploy-manager.js"); -const MultisigExecutor = require("../utils/multisigexecutor.js"); - -const ApprovedTransfer = require("../build/ApprovedTransfer"); -const CompoundManager = require("../build/CompoundManager"); -const GuardianManager = require("../build/GuardianManager"); -const LockManager = require("../build/LockManager"); -const NftTransfer = require("../build/NftTransfer"); -const RecoveryManager = require("../build/RecoveryManager"); -const TokenExchanger = require("../build/TokenExchanger"); -const MakerV2Manager = require("../build/MakerV2Manager"); -const TransferManager = require("../build/TransferManager"); -const RelayerManager = require("../build/RelayerManager"); -const VersionManager = require("../build/VersionManager"); - -const utils = require("../utils/utilities.js"); - -const TARGET_VERSION = "2.2.0"; -const MODULES_TO_ENABLE = [ - "VersionManager", -]; -const MODULES_TO_DISABLE = []; - -const BACKWARD_COMPATIBILITY = 4; - -const deploy = async (network) => { - if (!["kovan", "kovan-fork", "staging", "prod"].includes(network)) { - console.warn("------------------------------------------------------------------------"); - console.warn(`WARNING: The MakerManagerV2 module is not fully functional on ${network}`); - console.warn("------------------------------------------------------------------------"); - } - - const newModuleWrappers = []; - const newVersion = {}; - - // ////////////////////////////////// - // Setup - // ////////////////////////////////// - - const manager = new DeployManager(network); - await manager.setup(); - - const { configurator } = manager; - const { deployer } = manager; - const { abiUploader } = manager; - const { versionUploader } = manager; - const { gasPrice } = deployer.defaultOverrides; - const deploymentWallet = deployer.signer; - const { config } = configurator; - - const ModuleRegistryWrapper = await deployer.wrapDeployedContract(ModuleRegistry, config.contracts.ModuleRegistry); - const MultiSigWrapper = await deployer.wrapDeployedContract(MultiSig, config.contracts.MultiSigWallet); - const multisigExecutor = new MultisigExecutor(MultiSigWrapper, deploymentWallet, config.multisig.autosign, { gasPrice }); - - // ////////////////////////////////// - // Deploy new modules - // ////////////////////////////////// - - const VersionManagerWrapper = await deployer.deploy( - VersionManager, - {}, - config.contracts.ModuleRegistry, - config.modules.LockStorage, - config.modules.GuardianStorage, - config.modules.TransferStorage, - config.modules.LimitStorage, - ); - newModuleWrappers.push(VersionManagerWrapper); - - // ////////////////////////////////// - // Deploy new features - // ////////////////////////////////// - const ApprovedTransferWrapper = await deployer.deploy( - ApprovedTransfer, - {}, - config.modules.LockStorage, - config.modules.GuardianStorage, - config.modules.LimitStorage, - VersionManagerWrapper.contractAddress, - config.defi.weth, - ); - - const CompoundManagerWrapper = await deployer.deploy( - CompoundManager, - {}, - config.modules.LockStorage, - config.defi.compound.comptroller, - config.contracts.CompoundRegistry, - VersionManagerWrapper.contractAddress, - ); - - const GuardianManagerWrapper = await deployer.deploy( - GuardianManager, - {}, - config.modules.LockStorage, - config.modules.GuardianStorage, - VersionManagerWrapper.contractAddress, - config.settings.securityPeriod || 0, - config.settings.securityWindow || 0, - ); - - const LockManagerWrapper = await deployer.deploy( - LockManager, - {}, - config.modules.LockStorage, - config.modules.GuardianStorage, - VersionManagerWrapper.contractAddress, - config.settings.lockPeriod || 0, - ); - - const NftTransferWrapper = await deployer.deploy( - NftTransfer, - {}, - config.modules.LockStorage, - config.modules.TokenPriceRegistry, - VersionManagerWrapper.contractAddress, - config.CryptoKitties.contract, - ); - - const RecoveryManagerWrapper = await deployer.deploy( - RecoveryManager, - {}, - config.modules.LockStorage, - config.modules.GuardianStorage, - VersionManagerWrapper.contractAddress, - config.settings.recoveryPeriod || 0, - config.settings.lockPeriod || 0, - ); - - const TokenExchangerWrapper = await deployer.deploy( - TokenExchanger, - {}, - config.modules.LockStorage, - config.modules.TokenPriceRegistry, - VersionManagerWrapper.contractAddress, - config.contracts.DexRegistry, - config.defi.paraswap.contract, - "argent", - ); - - const MakerV2ManagerWrapper = await deployer.deploy( - MakerV2Manager, - {}, - config.modules.LockStorage, - config.defi.maker.migration, - config.defi.maker.pot, - config.defi.maker.jug, - config.contracts.MakerRegistry, - config.defi.uniswap.factory, - VersionManagerWrapper.contractAddress, - ); - - const TransferManagerWrapper = await deployer.deploy( - TransferManager, - {}, - config.modules.LockStorage, - config.modules.TransferStorage, - config.modules.LimitStorage, - config.modules.TokenPriceRegistry, - VersionManagerWrapper.contractAddress, - config.settings.securityPeriod || 0, - config.settings.securityWindow || 0, - config.settings.defaultLimit || "1000000000000000000", - config.defi.weth, - ["test", "staging", "prod"].includes(network) ? config.modules.TransferManager : "0x0000000000000000000000000000000000000000", - ); - - const RelayerManagerWrapper = await deployer.deploy( - RelayerManager, - {}, - config.modules.LockStorage, - config.modules.GuardianStorage, - config.modules.LimitStorage, - config.modules.TokenPriceRegistry, - VersionManagerWrapper.contractAddress, - ); - - // Add Features to Version Manager - const newFeatures = [ - GuardianManagerWrapper.contractAddress, - LockManagerWrapper.contractAddress, - RecoveryManagerWrapper.contractAddress, - ApprovedTransferWrapper.contractAddress, - TransferManagerWrapper.contractAddress, - TokenExchangerWrapper.contractAddress, - NftTransferWrapper.contractAddress, - CompoundManagerWrapper.contractAddress, - MakerV2ManagerWrapper.contractAddress, - RelayerManagerWrapper.contractAddress, - ]; - const newFeaturesWithNoInit = [ // all features except the TransferManager - GuardianManagerWrapper.contractAddress, - LockManagerWrapper.contractAddress, - RecoveryManagerWrapper.contractAddress, - ApprovedTransferWrapper.contractAddress, - TokenExchangerWrapper.contractAddress, - NftTransferWrapper.contractAddress, - CompoundManagerWrapper.contractAddress, - MakerV2ManagerWrapper.contractAddress, - RelayerManagerWrapper.contractAddress, - ]; - const newFeatureToInit = newFeatures.filter((f) => !newFeaturesWithNoInit.includes(f)); - const VersionManagerAddVersionTx = await VersionManagerWrapper.contract.addVersion(newFeatures, newFeatureToInit, { gasPrice }); - await VersionManagerWrapper.verboseWaitForTransaction(VersionManagerAddVersionTx, "Adding New Version"); - - // ////////////////////////////////// - // Set contracts' owners - // ////////////////////////////////// - - const changeOwnerTx = await VersionManagerWrapper.contract.changeOwner(config.contracts.MultiSigWallet, { gasPrice }); - await VersionManagerWrapper.verboseWaitForTransaction(changeOwnerTx, "Set the MultiSig as the owner of VersionManagerWrapper"); - - // ///////////////////////////////////////////////// - // Update config and Upload ABIs - // ///////////////////////////////////////////////// - - configurator.updateModuleAddresses({ - ApprovedTransfer: ApprovedTransferWrapper.contractAddress, - CompoundManager: CompoundManagerWrapper.contractAddress, - GuardianManager: GuardianManagerWrapper.contractAddress, - LockManager: LockManagerWrapper.contractAddress, - NftTransfer: NftTransferWrapper.contractAddress, - RecoveryManager: RecoveryManagerWrapper.contractAddress, - TokenExchanger: TokenExchangerWrapper.contractAddress, - MakerV2Manager: MakerV2ManagerWrapper.contractAddress, - TransferManager: TransferManagerWrapper.contractAddress, - RelayerManager: RelayerManagerWrapper.contractAddress, - - VersionManager: VersionManagerWrapper.contractAddress, - }); - - const gitHash = childProcess.execSync("git rev-parse HEAD").toString("utf8").replace(/\n$/, ""); - configurator.updateGitHash(gitHash); - await configurator.save(); - - await Promise.all([ - abiUploader.upload(ApprovedTransferWrapper, "modules"), - abiUploader.upload(CompoundManagerWrapper, "modules"), - abiUploader.upload(GuardianManagerWrapper, "modules"), - abiUploader.upload(LockManagerWrapper, "modules"), - abiUploader.upload(NftTransferWrapper, "modules"), - abiUploader.upload(RecoveryManagerWrapper, "modules"), - abiUploader.upload(TokenExchangerWrapper, "modules"), - abiUploader.upload(MakerV2ManagerWrapper, "modules"), - abiUploader.upload(TransferManagerWrapper, "modules"), - abiUploader.upload(RelayerManagerWrapper, "modules"), - - abiUploader.upload(VersionManagerWrapper, "modules"), - ]); - - // ////////////////////////////////// - // Register new modules - // ////////////////////////////////// - - for (let idx = 0; idx < newModuleWrappers.length; idx += 1) { - const wrapper = newModuleWrappers[idx]; - await multisigExecutor.executeCall(ModuleRegistryWrapper, "registerModule", - [wrapper.contractAddress, utils.asciiToBytes32(wrapper._contract.contractName)]); - } - - // ////////////////////////////////// - // Deploy and Register upgraders - // ////////////////////////////////// - - let fingerprint; - const versions = await versionUploader.load(BACKWARD_COMPATIBILITY); - for (let idx = 0; idx < versions.length; idx += 1) { - const version = versions[idx]; - let toAdd; let toRemove; - if (idx === 0) { - const moduleNamesToRemove = MODULES_TO_DISABLE.concat(MODULES_TO_ENABLE); - toRemove = version.modules.filter((module) => moduleNamesToRemove.includes(module.name)); - toAdd = newModuleWrappers.map((wrapper) => ({ - address: wrapper.contractAddress, - name: wrapper._contract.contractName, - })); - const toKeep = version.modules.filter((module) => !moduleNamesToRemove.includes(module.name)); - const modulesInNewVersion = toKeep.concat(toAdd); - fingerprint = utils.versionFingerprint(modulesInNewVersion); - newVersion.version = semver.lt(version.version, TARGET_VERSION) ? TARGET_VERSION : semver.inc(version.version, "patch"); - newVersion.createdAt = Math.floor((new Date()).getTime() / 1000); - newVersion.modules = modulesInNewVersion; - newVersion.fingerprint = fingerprint; - } else { - // add all modules present in newVersion that are not present in version - toAdd = newVersion.modules.filter((module) => !version.modules.map((m) => m.address).includes(module.address)); - // remove all modules from version that are no longer present in newVersion - toRemove = version.modules.filter((module) => !newVersion.modules.map((m) => m.address).includes(module.address)); - } - - const upgraderName = `${version.fingerprint}_${fingerprint}`; - - // if upgrading from a version strictly older than 2.1 (toRemove.length > 1), we use the "old LockStorage", - // which was part of the GuardianStorage prior to 2.1. Otherwise (toRemove.length === 1), we use the new LockStorage introduced in 2.1 - const lockStorage = (toRemove.length === 1) ? config.modules.LockStorage : config.modules.GuardianStorage; - - const UpgraderWrapper = await deployer.deploy( - Upgrader, - {}, - config.contracts.ModuleRegistry, - lockStorage, - toRemove.map((module) => module.address), - VersionManagerWrapper.contractAddress, // to add - ); - await multisigExecutor.executeCall(ModuleRegistryWrapper, "registerModule", - [UpgraderWrapper.contractAddress, utils.asciiToBytes32(upgraderName)]); - - await multisigExecutor.executeCall(ModuleRegistryWrapper, "registerUpgrader", - [UpgraderWrapper.contractAddress, utils.asciiToBytes32(upgraderName)]); - } - - // ////////////////////////////////// - // Upload Version - // ////////////////////////////////// - - await versionUploader.upload(newVersion); -}; - -module.exports = { - deploy, -}; From f763db290513cdb9211fdf15ae66c741646019aa Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Thu, 5 Nov 2020 09:34:45 +0200 Subject: [PATCH 071/113] Fix import path for DexRegistry --- contracts/infrastructure/DexRegistry.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/infrastructure/DexRegistry.sol b/contracts/infrastructure/DexRegistry.sol index 1e1d3eb9f..d0d4fe822 100644 --- a/contracts/infrastructure/DexRegistry.sol +++ b/contracts/infrastructure/DexRegistry.sol @@ -17,7 +17,7 @@ pragma solidity ^0.6.12; pragma experimental ABIEncoderV2; -import "../infrastructure/base/Owned.sol"; +import "./base/Owned.sol"; import "./IDexRegistry.sol"; /** From da47236cfd58af785f0c3a77903496ae58264506 Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Thu, 5 Nov 2020 15:24:34 +0200 Subject: [PATCH 072/113] Update staticcall tests for truffle syntax --- test/nftTransfer.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/nftTransfer.js b/test/nftTransfer.js index c869564c3..4b756760a 100644 --- a/test/nftTransfer.js +++ b/test/nftTransfer.js @@ -19,7 +19,6 @@ const ERC20Approver = artifacts.require("ERC20Approver"); const ZERO_BYTES32 = ethers.constants.HashZero; const RelayManager = require("../utils/relay-manager"); -const { callStatic } = require("../utils/utilities.js"); contract("NftTransfer", (accounts) => { const manager = new RelayManager(); @@ -235,7 +234,7 @@ contract("NftTransfer", (accounts) => { assert.equal(erc721ReceivedDelegate, versionManager.address); const walletAsTransferManager = await NftTransfer.at(wallet1.address); - const result = await callStatic(walletAsTransferManager, "onERC721Received", infrastructure.address, infrastructure.address, 0, "0x"); + const result = await walletAsTransferManager.onERC721Received.call(infrastructure, infrastructure, 0, "0x"); assert.equal(result, ERC721_RECEIVED); }); }); From 4b62b315bda0125651646725763efa6826b5ed6c Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Fri, 6 Nov 2020 10:24:03 +0200 Subject: [PATCH 073/113] Rename ganache network to development --- .gitignore | 2 +- package.json | 4 ++-- scripts/configReader.js | 2 +- {deployment => scripts}/module_upgrade_template.js | 3 +-- scripts/update_compound_registry.js | 2 +- scripts/update_dex_registry.js | 2 +- scripts/update_module_registry.js | 2 +- scripts/update_multisig_threshold.js | 2 +- scripts/update_wallet_in_factory.js | 2 +- utils/config/{ganache.json => development.json} | 0 utils/utilities.js | 9 --------- 11 files changed, 10 insertions(+), 20 deletions(-) rename {deployment => scripts}/module_upgrade_template.js (98%) rename utils/config/{ganache.json => development.json} (100%) diff --git a/.gitignore b/.gitignore index 5259411dc..5833f7bce 100644 --- a/.gitignore +++ b/.gitignore @@ -29,7 +29,7 @@ flatten .env utils/config/*.json -!utils/config/ganache.json +!utils/config/development.json !utils/config/kovan.json !utils/config/kovan-fork.json ganache-accounts.json diff --git a/package.json b/package.json index 2a3de45b7..f5cd1abe7 100644 --- a/package.json +++ b/package.json @@ -27,8 +27,8 @@ "test:coverage": "npx truffle run coverage && istanbul check-coverage --statements 94 --branches 83 --functions 96 --lines 94", "lint:js": "eslint .", "lint:contracts": "npx solhint contracts/**/*.sol && npx solhint contracts/**/**/*.sol", - "test:deployment": "./scripts/deploy.sh ganache `seq 1 7`", - "test:benchmark": "./scripts/deploy.sh ganache 999", + "test:deployment": "./scripts/deploy.sh development `seq 1 7`", + "test:benchmark": "./scripts/deploy.sh development 999", "validate:erc20": "bash ./scripts/validate_erc20.sh", "security:slither": "npm run security:slither:infrastructure && npm run security:slither:modules && npm run security:slither:wallet", "security:slither:infrastructure": "rm -rf build && npm run compile:infrastructure && slither . --ignore-compile --filter-paths lib --solc-disable-warnings --exclude-low --exclude-informational --exclude=naming-convention,unused-state-variables,solc-version,assembly-usage,low-level-calls,public-function-that-could-be-declared-as-external", diff --git a/scripts/configReader.js b/scripts/configReader.js index c62240a44..97fb13704 100644 --- a/scripts/configReader.js +++ b/scripts/configReader.js @@ -6,7 +6,7 @@ // // where: // - network = [test, staging, prod] -// note: ganache configuration in solution under ./utils/config/ganache.json +// note: development configuration in solution under ./utils/config/development.json // //////////////////////////////////////////////////////////////////// require("dotenv").config(); diff --git a/deployment/module_upgrade_template.js b/scripts/module_upgrade_template.js similarity index 98% rename from deployment/module_upgrade_template.js rename to scripts/module_upgrade_template.js index 7b249876c..304632342 100644 --- a/deployment/module_upgrade_template.js +++ b/scripts/module_upgrade_template.js @@ -40,13 +40,12 @@ const deploy = async (network) => { const { configurator } = manager; const { deployer } = manager; const { versionUploader } = manager; - const { gasPrice } = deployer.defaultOverrides; const deploymentWallet = deployer.signer; const { config } = configurator; const ModuleRegistryWrapper = await deployer.wrapDeployedContract(ModuleRegistry, config.contracts.ModuleRegistry); const MultiSigWrapper = await deployer.wrapDeployedContract(MultiSig, config.contracts.MultiSigWallet); - const multisigExecutor = new MultisigExecutor(MultiSigWrapper, deploymentWallet, config.multisig.autosign, { gasPrice }); + const multisigExecutor = new MultisigExecutor(MultiSigWrapper, deploymentWallet, config.multisig.autosign); // ////////////////////////////////// // Initialise the new version diff --git a/scripts/update_compound_registry.js b/scripts/update_compound_registry.js index a1a87bc5f..edb16b860 100644 --- a/scripts/update_compound_registry.js +++ b/scripts/update_compound_registry.js @@ -8,7 +8,7 @@ // ./execute_script.sh update_compound_registry.js --remove --token // // where: -// - network = [ganache, test, staging, prod] +// - network = [development, test, staging, prod] // //////////////////////////////////////////////////////////////////// /* global artifacts */ diff --git a/scripts/update_dex_registry.js b/scripts/update_dex_registry.js index 960f03497..51e2b9812 100644 --- a/scripts/update_dex_registry.js +++ b/scripts/update_dex_registry.js @@ -5,7 +5,7 @@ // ./execute_script.sh update_dex_registry.js --dex = // // where: -// - network = [ganache, test, staging, prod] +// - network = [development, test, staging, prod] // - dex status = [true, false] // //////////////////////////////////////////////////////////////////// diff --git a/scripts/update_module_registry.js b/scripts/update_module_registry.js index 1f8827a9a..ba5cdbdb3 100644 --- a/scripts/update_module_registry.js +++ b/scripts/update_module_registry.js @@ -8,7 +8,7 @@ // ./execute_script.sh update_module_registry.js --remove --module // // where: -// - network = [ganache, test, staging, prod] +// - network = [development, test, staging, prod] // //////////////////////////////////////////////////////////////////// /* global artifacts */ diff --git a/scripts/update_multisig_threshold.js b/scripts/update_multisig_threshold.js index 3a3e7e421..e023e7053 100644 --- a/scripts/update_multisig_threshold.js +++ b/scripts/update_multisig_threshold.js @@ -5,7 +5,7 @@ // ./execute_script.sh update_multisig_threshold.js --threshold // // where: -// - network = [ganache, test, staging, prod] +// - network = [development, test, staging, prod] // //////////////////////////////////////////////////////////////////// /* global artifacts */ diff --git a/scripts/update_wallet_in_factory.js b/scripts/update_wallet_in_factory.js index 1b38de6d5..09c98d909 100644 --- a/scripts/update_wallet_in_factory.js +++ b/scripts/update_wallet_in_factory.js @@ -5,7 +5,7 @@ // ./execute_script.sh update_wallet_in_factory.js // // where: -// - network = [ganache, test, staging, prod] +// - network = [development, test, staging, prod] // //////////////////////////////////////////////////////////////////// /* global artifacts */ diff --git a/utils/config/ganache.json b/utils/config/development.json similarity index 100% rename from utils/config/ganache.json rename to utils/config/development.json diff --git a/utils/utilities.js b/utils/utilities.js index 62d5e56ee..371466ea7 100644 --- a/utils/utilities.js +++ b/utils/utilities.js @@ -172,15 +172,6 @@ module.exports = { personalSign: async (signHash, signer) => ethers.utils.joinSignature(signer.signingKey.signDigest(signHash)), - callStatic: async (contractWrapper, method, ...args) => { - const contract = new ethers.Contract( - contractWrapper.contractAddress, - contractWrapper.contract.interface.abi, - ethers.getDefaultProvider(contractWrapper.provider.connection.url), - ); - return contract.callStatic[method](...args); - }, - async getBalance(account) { const balance = await web3.eth.getBalance(account); return new BN(balance); From b660913bf74c2de8516d4cbda438fd6e7dabd82f Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Fri, 6 Nov 2020 15:12:07 +0200 Subject: [PATCH 074/113] Migrate deployment scripts to truffle --- deployment/1_setup_test_environment.js | 44 +++++------ deployment/2_deploy_contracts.js | 50 ++++++------ deployment/3_setup_contracts.js | 64 ++++++++------- deployment/4_finalise_test_environment.js | 39 +++++----- deployment/5_deploy_modules.js | 60 +++++--------- deployment/6_register_modules.js | 95 ++++++++++++----------- migrations/2_deploy_contracts.js | 17 ---- package.json | 6 +- scripts/deploy.sh | 10 +-- truffle-config.base.js | 46 +++++++++-- utils/config/development.json | 2 +- utils/deploy-manager.js | 39 +++------- 12 files changed, 225 insertions(+), 247 deletions(-) delete mode 100644 migrations/2_deploy_contracts.js diff --git a/deployment/1_setup_test_environment.js b/deployment/1_setup_test_environment.js index 830ca54dc..543c56b4c 100644 --- a/deployment/1_setup_test_environment.js +++ b/deployment/1_setup_test_environment.js @@ -19,8 +19,7 @@ const DeployManager = require("../utils/deploy-manager.js"); const BYTES32_NULL = "0x0000000000000000000000000000000000000000000000000000000000000000"; // For development purpose -async function deployENSRegistry(deployer, owner, domain) { - const { gasPrice } = deployer.defaultOverrides; +async function deployENSRegistry(owner, domain) { // Deploy the public ENS registry const ensRegistryWithoutFallback = await ENSRegistry.new(); const ENSWrapper = await ENSRegistryWithFallback.new(ensRegistryWithoutFallback.address); @@ -31,18 +30,17 @@ async function deployENSRegistry(deployer, owner, domain) { const domainName = parts[0]; // Create the 'eth' and 'xyz' namespaces - const setSubnodeOwnerXYZ = await ENSWrapper.contract.setSubnodeOwner(BYTES32_NULL, utils.sha3(extension), owner, { gasPrice }); - await ENSWrapper.verboseWaitForTransaction(setSubnodeOwnerXYZ, `Setting Subnode Owner for ${extension}`); + console.log(`Setting Subnode Owner for ${extension}`); + await ENSWrapper.setSubnodeOwner(BYTES32_NULL, utils.sha3(extension), owner); // Create the 'argentx.xyz' wallet ENS namespace - const setSubnodeOwnerArgent = await ENSWrapper.contract.setSubnodeOwner(utils.namehash(extension), utils.sha3(domainName), owner, { gasPrice }); - await ENSWrapper.verboseWaitForTransaction(setSubnodeOwnerArgent, `Setting Subnode Owner for ${domainName}.${extension}`); + console.log(`Setting Subnode Owner for ${domainName}.${extension}`); + await ENSWrapper.setSubnodeOwner(utils.namehash(extension), utils.sha3(domainName), owner); return ENSWrapper.address; } -async function deployParaswap(deployer) { - const deploymentAccount = await deployer.signer.getAddress(); +async function deployParaswap(deploymentAccount) { const whitelist = await Whitelisted.new(); const partnerDeployer = await PartnerDeployer.new(); const partnerRegistry = await PartnerRegistry.new(partnerDeployer.address); @@ -58,26 +56,28 @@ async function deployParaswap(deployer) { return { paraswap: paraswap.address, kyberAdapter: kyberAdapter.address }; } -const deploy = async (network) => { - const manager = new DeployManager(network); - await manager.setup(); +module.exports = async (callback) => { + const idx = process.argv.indexOf("--network"); + const network = idx > -1 ? process.argv[idx + 1] : "development"; + console.log(`## ${network} network ##`); - const { configurator } = manager; - const { deployer } = manager; - const { gasPrice } = deployer.defaultOverrides; + // TODO: Maybe get the signer account a better way? + const accounts = await web3.eth.getAccounts(); + const deploymentAccount = accounts[0]; + const manager = new DeployManager(network, deploymentAccount); + await manager.setup(); + const { configurator } = manager; const { config } = configurator; - const deploymentAccount = await deployer.signer.getAddress(); - if (config.ENS.deployOwnRegistry) { // on some testnets, we use our own ENSRegistry - const address = await deployENSRegistry(deployer, deploymentAccount, config.ENS.domain); + const address = await deployENSRegistry(deploymentAccount, config.ENS.domain); configurator.updateENSRegistry(address); } if (config.defi.paraswap.deployOwn) { - const { paraswap, kyberAdapter } = await deployParaswap(deployer); + const { paraswap, kyberAdapter } = await deployParaswap(deploymentAccount); configurator.updateParaswap(paraswap, { Kyber: kyberAdapter }); } @@ -85,8 +85,7 @@ const deploy = async (network) => { const UniswapFactoryWrapper = await UniswapFactory.new(); configurator.updateUniswapFactory(UniswapFactoryWrapper.address); const UniswapExchangeTemplateWrapper = await UniswapExchange.new(); - const initializeFactoryTx = await UniswapFactoryWrapper.contract.initializeFactory(UniswapExchangeTemplateWrapper.address, { gasPrice }); - await UniswapFactoryWrapper.verboseWaitForTransaction(initializeFactoryTx, "Initializing UniswapFactory"); + await UniswapFactoryWrapper.initializeFactory(UniswapExchangeTemplateWrapper.address); } if (config.defi.maker.deployOwn) { @@ -103,8 +102,5 @@ const deploy = async (network) => { // save configuration await configurator.save(); -}; - -module.exports = { - deploy, + callback(); }; diff --git a/deployment/2_deploy_contracts.js b/deployment/2_deploy_contracts.js index c09d0f0da..8864a856b 100644 --- a/deployment/2_deploy_contracts.js +++ b/deployment/2_deploy_contracts.js @@ -24,25 +24,28 @@ const utils = require("../utils/utilities.js"); const DeployManager = require("../utils/deploy-manager.js"); const MultisigExecutor = require("../utils/multisigexecutor.js"); -const deploy = async (network) => { +module.exports = async (callback) => { // ////////////////////////////////// // Setup // ////////////////////////////////// + const idx = process.argv.indexOf("--network"); + const network = idx > -1 ? process.argv[idx + 1] : "development"; + console.log(`## ${network} network ##`); - const manager = new DeployManager(network); + // TODO: Maybe get the signer account a better way? + const accounts = await web3.eth.getAccounts(); + const deploymentAccount = accounts[0]; + + const manager = new DeployManager(network, deploymentAccount); await manager.setup(); const { configurator } = manager; - const { deployer } = manager; const { abiUploader } = manager; - const { gasPrice } = deployer.defaultOverrides; const newConfig = configurator.config; const prevConfig = configurator.copyConfig(); console.log("Previous Config:", prevConfig); - const deploymentWallet = deployer.signer; - const deploymentAccount = await deploymentWallet.getAddress(); const walletRootEns = prevConfig.ENS.domain; // ////////////////////////////////// @@ -50,13 +53,13 @@ const deploy = async (network) => { // ////////////////////////////////// // Deploy the Guardian Storage - const GuardianStorageWrapper = await deployer.deploy(GuardianStorage); + const GuardianStorageWrapper = await GuardianStorage.new(); // Deploy the Transfer Storage - const TransferStorageWrapper = await deployer.deploy(TransferStorage); + const TransferStorageWrapper = await TransferStorage.new(); // Deploy the new LockStorage - const LockStorageWrapper = await deployer.deploy(LockStorage); + const LockStorageWrapper = await LockStorage.new(); // Deploy the new LimitStorage - const LimitStorageWrapper = await deployer.deploy(LimitStorage); + const LimitStorageWrapper = await LimitStorage.new(); // ////////////////////////////////// // Deploy infrastructure contracts @@ -90,10 +93,10 @@ const deploy = async (network) => { const vatAddress = await ScdMcdMigrationWrapper.vat(); const MakerRegistryWrapper = await MakerRegistry.new(vatAddress); const wethJoinAddress = await ScdMcdMigrationWrapper.wethJoin(); - const addCollateralTransaction = await MakerRegistryWrapper.contract.addCollateral(wethJoinAddress, { gasPrice }); - await MakerRegistryWrapper.verboseWaitForTransaction(addCollateralTransaction, `Adding join adapter ${wethJoinAddress} to the MakerRegistry`); - const changeMakerRegistryOwnerTx = await MakerRegistryWrapper.contract.changeOwner(newConfig.contracts.MultiSigWallet, { gasPrice }); - await MakerRegistryWrapper.verboseWaitForTransaction(changeMakerRegistryOwnerTx, "Set the MultiSig as the owner of the MakerRegistry"); + console.log(`Adding join adapter ${wethJoinAddress} to the MakerRegistry`); + await MakerRegistryWrapper.addCollateral(wethJoinAddress); + console.log("Set the MultiSig as the owner of the MakerRegistry"); + await MakerRegistryWrapper.changeOwner(newConfig.contracts.MultiSigWallet); // ///////////////////////////////////////////////// // Making ENSManager owner of the root wallet ENS @@ -102,20 +105,19 @@ const deploy = async (network) => { const ENSRegistryWrapper = await ENS.at(newConfig.ENS.ensRegistry); // Get the address of the previous owner of the root wallet ENS (e.g. argent.xyz) - const previousWalletEnsOwner = await ENSRegistryWrapper.contract.owner(utils.namehash(walletRootEns)); + const previousWalletEnsOwner = await ENSRegistryWrapper.owner(utils.namehash(walletRootEns)); if (previousWalletEnsOwner.toLowerCase() === deploymentAccount.toLowerCase()) { // newly registered name -> change its owner from deploymentAccount to ENSManager address - const setOwnerTransaction = await ENSRegistryWrapper.contract.setOwner(utils.namehash(walletRootEns), ENSManagerWrapper.address, - { gasPrice }); - await ENSRegistryWrapper.verboseWaitForTransaction(setOwnerTransaction, "Replace deployment account by ENSManager as new owner of walletENS"); + console.log("Replace deployment account by ENSManager as new owner of walletENS"); + await ENSRegistryWrapper.setOwner(utils.namehash(walletRootEns), ENSManagerWrapper.address); } else if (previousWalletEnsOwner.toLowerCase() === prevConfig.contracts.ENSManager.toLowerCase()) { // change the owner from the previous ENSManager.address to the new one console.log("change the owner from the previous ENSManager to the new one"); const previousMultiSigWrapper = await MultiSig.at(prevConfig.contracts.MultiSigWallet); const previousENSManagerWrapper = await ENSManager.at(prevConfig.contracts.ENSManager); - const multisigExecutor = new MultisigExecutor(previousMultiSigWrapper, deploymentWallet, prevConfig.multisig.autosign, { gasPrice }); + const multisigExecutor = new MultisigExecutor(previousMultiSigWrapper, deploymentAccount, prevConfig.multisig.autosign); console.log(`Owner of ${walletRootEns} changed from old ENSManager to new ENSManager...`); await multisigExecutor.executeCall(previousENSManagerWrapper, "changeRootnodeOwner", [ENSManagerWrapper.address]); } else { @@ -128,9 +130,8 @@ const deploy = async (network) => { for (const underlying in newConfig.defi.compound.markets) { const cToken = newConfig.defi.compound.markets[underlying]; - const addUnderlyingTransaction = await CompoundRegistryWrapper.contract.addCToken(underlying, cToken, { gasPrice }); - await CompoundRegistryWrapper.verboseWaitForTransaction(addUnderlyingTransaction, - `Adding unerlying ${underlying} with cToken ${cToken} to the registry`); + console.log(`Adding unerlying ${underlying} with cToken ${cToken} to the registry`); + await CompoundRegistryWrapper.addCToken(underlying, cToken); } // ///////////////////////////////////////////////// @@ -171,8 +172,5 @@ const deploy = async (network) => { abiUploader.upload(DexRegistryWrapper, "contracts"), abiUploader.upload(BaseWalletWrapper, "contracts"), ]); -}; - -module.exports = { - deploy, + callback(); }; diff --git a/deployment/3_setup_contracts.js b/deployment/3_setup_contracts.js index 71c941bfe..b453c999c 100644 --- a/deployment/3_setup_contracts.js +++ b/deployment/3_setup_contracts.js @@ -9,57 +9,58 @@ const DexRegistry = artifacts.require("DexRegistry"); const DeployManager = require("../utils/deploy-manager.js"); -const deploy = async (network) => { +module.exports = async (callback) => { // ////////////////////////////////// // Setup // ////////////////////////////////// + const id = process.argv.indexOf("--network"); + const network = id > -1 ? process.argv[id + 1] : "development"; + console.log(`## ${network} network ##`); - const manager = new DeployManager(network); + // TODO: Maybe get the signer account a better way? + const accounts = await web3.eth.getAccounts(); + const deploymentAccount = accounts[0]; + + const manager = new DeployManager(network, deploymentAccount); await manager.setup(); const { configurator } = manager; - const { deployer } = manager; - const { gasPrice } = deployer.defaultOverrides; - const { config } = configurator; console.log("Config:", config); - const ENSResolverWrapper = await deployer.wrapDeployedContract(ENSResolver, config.contracts.ENSResolver); - const ENSManagerWrapper = await deployer.wrapDeployedContract(ENSManager, config.contracts.ENSManager); - const WalletFactoryWrapper = await deployer.wrapDeployedContract(WalletFactory, config.contracts.WalletFactory); - const ModuleRegistryWrapper = await deployer.wrapDeployedContract(ModuleRegistry, config.contracts.ModuleRegistry); - const CompoundRegistryWrapper = await deployer.wrapDeployedContract(CompoundRegistry, config.contracts.CompoundRegistry); - const TokenPriceRegistryWrapper = await deployer.wrapDeployedContract(TokenPriceRegistry, config.modules.TokenPriceRegistry); - const DexRegistryWrapper = await deployer.wrapDeployedContract(DexRegistry, config.contracts.DexRegistry); + const ENSResolverWrapper = await ENSResolver.at(config.contracts.ENSResolver); + const ENSManagerWrapper = await ENSManager.at(config.contracts.ENSManager); + const WalletFactoryWrapper = await WalletFactory.at(config.contracts.WalletFactory); + const ModuleRegistryWrapper = await ModuleRegistry.at(config.contracts.ModuleRegistry); + const CompoundRegistryWrapper = await CompoundRegistry.at(config.contracts.CompoundRegistry); + const TokenPriceRegistryWrapper = await TokenPriceRegistry.at(config.modules.TokenPriceRegistry); + const DexRegistryWrapper = await DexRegistry.at(config.contracts.DexRegistry); // Configure DexRegistry const authorisedExchanges = Object.values(config.defi.paraswap.authorisedExchanges); - const DexRegistrySetAuthorisedTx = await DexRegistryWrapper.contract.setAuthorised( - authorisedExchanges, Array(authorisedExchanges.length).fill(true), { gasPrice }, - ); - await DexRegistryWrapper.verboseWaitForTransaction(DexRegistrySetAuthorisedTx, "Setting up DexRegistry"); + console.log("Setting up DexRegistry"); + await DexRegistryWrapper.setAuthorised(authorisedExchanges, Array(authorisedExchanges.length).fill(true)); // ////////////////////////////////// // Set contracts' managers // ////////////////////////////////// - const ENSResolverAddManagerTx1 = await ENSResolverWrapper.contract.addManager(config.contracts.ENSManager, { gasPrice }); - await ENSResolverWrapper.verboseWaitForTransaction(ENSResolverAddManagerTx1, "Set the ENS Manager as the manager of the ENS Resolver"); + console.log("Set the ENS Manager as the manager of the ENS Resolver"); + await ENSResolverWrapper.addManager(config.contracts.ENSManager); - const ENSResolverAddManagerTx2 = await ENSResolverWrapper.contract.addManager(config.contracts.MultiSigWallet, { gasPrice }); - await ENSResolverWrapper.verboseWaitForTransaction(ENSResolverAddManagerTx2, "Set the Multisig as the manager of the ENS Resolver"); + console.log("Set the Multisig as the manager of the ENS Resolver"); + await ENSResolverWrapper.addManager(config.contracts.MultiSigWallet); - const ENSManagerAddManagerTx = await ENSManagerWrapper.contract.addManager(config.contracts.WalletFactory, { gasPrice }); - await ENSManagerWrapper.verboseWaitForTransaction(ENSManagerAddManagerTx, "Set the WalletFactory as the manager of the ENS Manager"); + console.log("Set the WalletFactory as the manager of the ENS Manager"); + await ENSManagerWrapper.addManager(config.contracts.WalletFactory); for (const idx in config.backend.accounts) { const account = config.backend.accounts[idx]; - const WalletFactoryAddManagerTx = await WalletFactoryWrapper.contract.addManager(account, { gasPrice }); - await WalletFactoryWrapper.verboseWaitForTransaction(WalletFactoryAddManagerTx, `Set ${account} as the manager of the WalletFactory`); + console.log(`Set ${account} as the manager of the WalletFactory`); + await WalletFactoryWrapper.addManager(account); - const TokenPriceRegistryAddManagerTx = await TokenPriceRegistryWrapper.contract.addManager(account, { gasPrice }); - await TokenPriceRegistryWrapper.verboseWaitForTransaction(TokenPriceRegistryAddManagerTx, - `Set ${account} as the manager of the TokenPriceRegistry`); + console.log(`Set ${account} as the manager of the TokenPriceRegistry`); + await TokenPriceRegistryWrapper.addManager(account); } // ////////////////////////////////// @@ -77,11 +78,8 @@ const deploy = async (network) => { for (let idx = 0; idx < wrappers.length; idx += 1) { const wrapper = wrappers[idx]; - const changeOwnerTx = await wrapper.contract.changeOwner(config.contracts.MultiSigWallet, { gasPrice }); - await wrapper.verboseWaitForTransaction(changeOwnerTx, `Set the MultiSig as the owner of ${wrapper._contract.contractName}`); + console.log(`Set the MultiSig as the owner of ${wrapper._contract.contractName}`); + await wrapper.changeOwner(config.contracts.MultiSigWallet); } -}; - -module.exports = { - deploy, + callback(); }; diff --git a/deployment/4_finalise_test_environment.js b/deployment/4_finalise_test_environment.js index 60ae636bd..379513e36 100644 --- a/deployment/4_finalise_test_environment.js +++ b/deployment/4_finalise_test_environment.js @@ -8,40 +8,43 @@ const DeployManager = require("../utils/deploy-manager.js"); const BYTES32_NULL = "0x0000000000000000000000000000000000000000000000000000000000000000"; -async function deployENSReverseRegistrar(deployer, config, owner, overrides) { - const ENSRegistryWrapper = deployer.wrapDeployedContract(ENS, config.ENS.ensRegistry); +async function deployENSReverseRegistrar(config, owner, overrides) { + const ENSRegistryWrapper = await ENS.at(config.ENS.ensRegistry); const ENSReverseRegistrarWrapper = await ENSReverseRegistrar.new(config.ENS.ensRegistry, config.contracts.ENSResolver); - const setSubnodeOwnerTx1 = await ENSRegistryWrapper.contract.setSubnodeOwner(BYTES32_NULL, utils.sha3("reverse"), owner, overrides); - await ENSRegistryWrapper.verboseWaitForTransaction(setSubnodeOwnerTx1, "Create the reverse namespace"); + console.log("Create the reverse namespace"); + await ENSRegistryWrapper.setSubnodeOwner(BYTES32_NULL, utils.sha3("reverse"), owner, overrides); - const setSubnodeOwnerTx2 = await ENSRegistryWrapper.contract.setSubnodeOwner( + console.log("Create the addr.reverse namespace and make the ENS reverse registrar the owner"); + await ENSRegistryWrapper.setSubnodeOwner( utils.namehash("reverse"), utils.sha3("addr"), ENSReverseRegistrarWrapper.address, overrides, ); - await ENSRegistryWrapper.verboseWaitForTransaction(setSubnodeOwnerTx2, - "Create the addr.reverse namespace and make the ENS reverse registrar the owner"); } -const deploy = async (network) => { - const manager = new DeployManager(network); +module.exports = async (callback) => { + // ////////////////////////////////// + // Setup + // ////////////////////////////////// + const idx = process.argv.indexOf("--network"); + const network = idx > -1 ? process.argv[idx + 1] : "development"; + console.log(`## ${network} network ##`); + + // TODO: Maybe get the signer account a better way? + const accounts = await web3.eth.getAccounts(); + const deploymentAccount = accounts[0]; + + const manager = new DeployManager(network, deploymentAccount); await manager.setup(); const { configurator } = manager; - const { deployer } = manager; - const { gasPrice } = deployer.defaultOverrides; - const { config } = configurator; - const deploymentAccount = await deployer.signer.getAddress(); - if (config.ENS.deployOwnRegistry) { - await deployENSReverseRegistrar(deployer, config, deploymentAccount, { gasPrice }); + await deployENSReverseRegistrar(config, deploymentAccount); } -}; -module.exports = { - deploy, + callback(); }; diff --git a/deployment/5_deploy_modules.js b/deployment/5_deploy_modules.js index b0eb6c402..deb86db3e 100644 --- a/deployment/5_deploy_modules.js +++ b/deployment/5_deploy_modules.js @@ -19,16 +19,22 @@ const DeployManager = require("../utils/deploy-manager.js"); // Version 2.1 // /////////////////////////////////////////////////////// -const deploy = async (network) => { +module.exports = async (callback) => { // ////////////////////////////////// // Setup // ////////////////////////////////// + const idx = process.argv.indexOf("--network"); + const network = idx > -1 ? process.argv[idx + 1] : "development"; + console.log(`## ${network} network ##`); - const manager = new DeployManager(network); + // TODO: Maybe get the signer account a better way? + const accounts = await web3.eth.getAccounts(); + const deploymentAccount = accounts[0]; + + const manager = new DeployManager(network, deploymentAccount); await manager.setup(); const { configurator } = manager; - const { deployer } = manager; const { abiUploader } = manager; const { config } = configurator; @@ -37,9 +43,7 @@ const deploy = async (network) => { // ////////////////////////////////// // Deploy VersionManager module // ////////////////////////////////// - const VersionManagerWrapper = await deployer.deploy( - VersionManager, - {}, + const VersionManagerWrapper = await VersionManager.new( config.contracts.ModuleRegistry, config.modules.LockStorage, config.modules.GuardianStorage, @@ -52,9 +56,7 @@ const deploy = async (network) => { // ////////////////////////////////// // Deploy the GuardianManager module - const GuardianManagerWrapper = await deployer.deploy( - GuardianManager, - {}, + const GuardianManagerWrapper = await GuardianManager.new( config.modules.LockStorage, config.modules.GuardianStorage, VersionManagerWrapper.address, @@ -62,18 +64,14 @@ const deploy = async (network) => { config.settings.securityWindow || 0, ); // Deploy the LockManager module - const LockManagerWrapper = await deployer.deploy( - LockManager, - {}, + const LockManagerWrapper = await LockManager.new( config.modules.LockStorage, config.modules.GuardianStorage, VersionManagerWrapper.address, config.settings.lockPeriod || 0, ); // Deploy the RecoveryManager module - const RecoveryManagerWrapper = await deployer.deploy( - RecoveryManager, - {}, + const RecoveryManagerWrapper = await RecoveryManager.new( config.modules.LockStorage, config.modules.GuardianStorage, VersionManagerWrapper.address, @@ -81,9 +79,7 @@ const deploy = async (network) => { config.settings.lockPeriod || 0, ); // Deploy the ApprovedTransfer module - const ApprovedTransferWrapper = await deployer.deploy( - ApprovedTransfer, - {}, + const ApprovedTransferWrapper = await ApprovedTransfer.new( config.modules.LockStorage, config.modules.GuardianStorage, config.modules.LimitStorage, @@ -91,9 +87,7 @@ const deploy = async (network) => { config.defi.weth, ); // Deploy the TransferManager module - const TransferManagerWrapper = await deployer.deploy( - TransferManager, - {}, + const TransferManagerWrapper = await TransferManager.new( config.modules.LockStorage, config.modules.TransferStorage, config.modules.LimitStorage, @@ -106,9 +100,7 @@ const deploy = async (network) => { ["test", "staging", "prod"].includes(network) ? config.modules.TransferManager : "0x0000000000000000000000000000000000000000", ); // Deploy the TokenExchanger module - const TokenExchangerWrapper = await deployer.deploy( - TokenExchanger, - {}, + const TokenExchangerWrapper = await TokenExchanger.new( config.modules.LockStorage, config.modules.TokenPriceRegistry, VersionManagerWrapper.address, @@ -117,27 +109,21 @@ const deploy = async (network) => { "argent", ); // Deploy the NFTTransfer module - const NftTransferWrapper = await deployer.deploy( - NftTransfer, - {}, + const NftTransferWrapper = await NftTransfer.new( config.modules.LockStorage, config.modules.TokenPriceRegistry, VersionManagerWrapper.address, config.CryptoKitties.contract, ); // Deploy the CompoundManager module - const CompoundManagerWrapper = await deployer.deploy( - CompoundManager, - {}, + const CompoundManagerWrapper = await CompoundManager.new( config.modules.LockStorage, config.defi.compound.comptroller, config.contracts.CompoundRegistry, VersionManagerWrapper.address, ); // Deploy MakerManagerV2 - const MakerV2ManagerWrapper = await deployer.deploy( - MakerV2Manager, - {}, + const MakerV2ManagerWrapper = await MakerV2Manager.new( config.modules.LockStorage, config.defi.maker.migration, config.defi.maker.pot, @@ -147,9 +133,7 @@ const deploy = async (network) => { VersionManagerWrapper.address, ); // Deploy RelayerManager - const RelayerManagerWrapper = await deployer.deploy( - RelayerManager, - {}, + const RelayerManagerWrapper = await RelayerManager.new( config.modules.LockStorage, config.modules.GuardianStorage, config.modules.LimitStorage, @@ -196,8 +180,6 @@ const deploy = async (network) => { ]); console.log("Config:", config); -}; -module.exports = { - deploy, + callback(); }; diff --git a/deployment/6_register_modules.js b/deployment/6_register_modules.js index 4f3b41de0..a3435d399 100644 --- a/deployment/6_register_modules.js +++ b/deployment/6_register_modules.js @@ -20,74 +20,77 @@ const utils = require("../utils/utilities.js"); const DeployManager = require("../utils/deploy-manager.js"); const MultisigExecutor = require("../utils/multisigexecutor.js"); -const deploy = async (network) => { +module.exports = async (callback) => { // ////////////////////////////////// // Setup // ////////////////////////////////// + const id = process.argv.indexOf("--network"); + const network = id > -1 ? process.argv[id + 1] : "development"; + console.log(`## ${network} network ##`); - const manager = new DeployManager(network); + // TODO: Maybe get the signer account a better way? + const accounts = await web3.eth.getAccounts(); + const deploymentAccount = accounts[0]; + + const manager = new DeployManager(network, deploymentAccount); await manager.setup(); const { configurator } = manager; - const { deployer } = manager; const { versionUploader } = manager; - const { gasPrice } = deployer.defaultOverrides; - - const deploymentWallet = deployer.signer; const { config } = configurator; console.log("Config:", config); - const GuardianManagerWrapper = await deployer.wrapDeployedContract(GuardianManager, config.modules.GuardianManager); - const LockManagerWrapper = await deployer.wrapDeployedContract(LockManager, config.modules.LockManager); - const RecoveryManagerWrapper = await deployer.wrapDeployedContract(RecoveryManager, config.modules.RecoveryManager); - const ApprovedTransferWrapper = await deployer.wrapDeployedContract(ApprovedTransfer, config.modules.ApprovedTransfer); - const TransferManagerWrapper = await deployer.wrapDeployedContract(TransferManager, config.modules.TransferManager); - const TokenExchangerWrapper = await deployer.wrapDeployedContract(TokenExchanger, config.modules.TokenExchanger); - const NftTransferWrapper = await deployer.wrapDeployedContract(NftTransfer, config.modules.NftTransfer); - const CompoundManagerWrapper = await deployer.wrapDeployedContract(CompoundManager, config.modules.CompoundManager); - const MakerV2ManagerWrapper = await deployer.wrapDeployedContract(MakerV2Manager, config.modules.MakerV2Manager); - const RelayerManagerWrapper = await deployer.wrapDeployedContract(RelayerManager, config.modules.RelayerManager); - const VersionManagerWrapper = await deployer.wrapDeployedContract(VersionManager, config.modules.VersionManager); - - const ModuleRegistryWrapper = await deployer.wrapDeployedContract(ModuleRegistry, config.contracts.ModuleRegistry); - const MultiSigWrapper = await deployer.wrapDeployedContract(MultiSig, config.contracts.MultiSigWallet); + const GuardianManagerWrapper = await GuardianManager.new(config.modules.GuardianManager); + const LockManagerWrapper = await LockManager.new(config.modules.LockManager); + const RecoveryManagerWrapper = await RecoveryManager.new(config.modules.RecoveryManager); + const ApprovedTransferWrapper = await ApprovedTransfer.new(config.modules.ApprovedTransfer); + const TransferManagerWrapper = await TransferManager.new(config.modules.TransferManager); + const TokenExchangerWrapper = await TokenExchanger.new(config.modules.TokenExchanger); + const NftTransferWrapper = await NftTransfer.new(config.modules.NftTransfer); + const CompoundManagerWrapper = await CompoundManager.new(config.modules.CompoundManager); + const MakerV2ManagerWrapper = await MakerV2Manager.new(config.modules.MakerV2Manager); + const RelayerManagerWrapper = await RelayerManager.new(config.modules.RelayerManager); + const VersionManagerWrapper = await VersionManager.new(config.modules.VersionManager); + + const ModuleRegistryWrapper = await ModuleRegistry.new(config.contracts.ModuleRegistry); + const MultiSigWrapper = await MultiSig.new(config.contracts.MultiSigWallet); const wrappers = [VersionManagerWrapper]; // Add Features to Version Manager const features = [ - GuardianManagerWrapper.contractAddress, - LockManagerWrapper.contractAddress, - RecoveryManagerWrapper.contractAddress, - ApprovedTransferWrapper.contractAddress, - TransferManagerWrapper.contractAddress, - TokenExchangerWrapper.contractAddress, - NftTransferWrapper.contractAddress, - CompoundManagerWrapper.contractAddress, - MakerV2ManagerWrapper.contractAddress, - RelayerManagerWrapper.contractAddress, + GuardianManagerWrapper.address, + LockManagerWrapper.address, + RecoveryManagerWrapper.address, + ApprovedTransferWrapper.address, + TransferManagerWrapper.address, + TokenExchangerWrapper.address, + NftTransferWrapper.address, + CompoundManagerWrapper.address, + MakerV2ManagerWrapper.address, + RelayerManagerWrapper.address, ]; const featuresWithNoInit = [ // all features except the TransferManager - GuardianManagerWrapper.contractAddress, - LockManagerWrapper.contractAddress, - RecoveryManagerWrapper.contractAddress, - ApprovedTransferWrapper.contractAddress, - TokenExchangerWrapper.contractAddress, - NftTransferWrapper.contractAddress, - CompoundManagerWrapper.contractAddress, - MakerV2ManagerWrapper.contractAddress, - RelayerManagerWrapper.contractAddress, + GuardianManagerWrapper.address, + LockManagerWrapper.address, + RecoveryManagerWrapper.address, + ApprovedTransferWrapper.address, + TokenExchangerWrapper.address, + NftTransferWrapper.address, + CompoundManagerWrapper.address, + MakerV2ManagerWrapper.address, + RelayerManagerWrapper.address, ]; const featureToInit = features.filter((f) => !featuresWithNoInit.includes(f)); - const VersionManagerAddVersionTx = await VersionManagerWrapper.contract.addVersion(features, featureToInit, { gasPrice }); - await VersionManagerWrapper.verboseWaitForTransaction(VersionManagerAddVersionTx, "Adding New Version"); + console.log("Adding New Version"); + await VersionManagerWrapper.addVersion(features, featureToInit); // ////////////////////////////////// // Register and configure VersionManager // ////////////////////////////////// - const multisigExecutor = new MultisigExecutor(MultiSigWrapper, deploymentWallet, config.multisig.autosign, { gasPrice }); + const multisigExecutor = new MultisigExecutor(MultiSigWrapper, deploymentAccount, config.multisig.autosign); for (let idx = 0; idx < wrappers.length; idx += 1) { const wrapper = wrappers[idx]; @@ -95,8 +98,8 @@ const deploy = async (network) => { [wrapper.address, utils.asciiToBytes32(wrapper._contract.contractName)]); } - const changeOwnerTx = await VersionManagerWrapper.contract.changeOwner(config.contracts.MultiSigWallet, { gasPrice }); - await VersionManagerWrapper.verboseWaitForTransaction(changeOwnerTx, "Set the MultiSig as the owner of VersionManagerWrapper"); + console.log("Set the MultiSig as the owner of VersionManagerWrapper"); + await VersionManagerWrapper.changeOwner(config.contracts.MultiSigWallet); // ////////////////////////////////// // Upload Version @@ -110,8 +113,6 @@ const deploy = async (network) => { createdAt: Math.floor((new Date()).getTime() / 1000), }; await versionUploader.upload(version); -}; -module.exports = { - deploy, + callback(); }; diff --git a/migrations/2_deploy_contracts.js b/migrations/2_deploy_contracts.js deleted file mode 100644 index 2e73a81b7..000000000 --- a/migrations/2_deploy_contracts.js +++ /dev/null @@ -1,17 +0,0 @@ -/* globals artifacts */ - -const ApprovedTransfer = artifacts.require("ApprovedTransfer"); -const GuardianStorage = artifacts.require("GuardianStorage"); - -module.exports = (deployer, network) => { - console.log(`## ${network} network ##`); - deployer.deploy( - ApprovedTransfer, - "0x22Ce12a6dFCF7d67c3DbEF01B19707077b528223", - "0x3bD35C298Ea89EfA0EF2dB208aB562E9e3F89DF4", - "0x0479B49a95c6bF395F1fC7d0118b44c752C7c410", - "0x0A1545B32D7cdea1EeD2fb259A82AcFE5e75962C", - "0xc778417E063141139Fce010982780140Aa0cD5Ab"); - - deployer.deploy(GuardianStorage); -}; diff --git a/package.json b/package.json index f5cd1abe7..ec6dc81f2 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "test": "test" }, "scripts": { - "compile:lib": "npx truffle compile --config truffle-config-lib.js", + "compile:lib": "npx truffle compile --config truffle-config-lib.js && npm run provision:lib:artefacts", "compile:legacy:1.3": "npx truffle compile --config truffle-config-contracts-legacy-1.3.js", "compile:legacy:1.6": "npx truffle compile --config truffle-config-contracts-legacy-1.6.js", "compile:legacy": "npm run compile:legacy:1.3 && npm run compile:legacy:1.6", @@ -17,7 +17,7 @@ "compile:wallet": "npx truffle compile --config truffle-config-wallet.js", "compile:test": "npx truffle compile --config truffle-config-contracts-test.js", "compile": "npm run compile:infrastructure && npm run compile:modules && npm run compile:wallet", - "cc": "rm -rf build && rm -rf build-legacy && npm run compile:lib && npm run compile && npm run compile:legacy && npm run compile:test && npm run provision:lib:artefacts", + "cc": "rm -rf build && rm -rf build-legacy && npm run compile:lib && npm run compile && npm run compile:legacy && npm run compile:test", "ganache": "npx ganache-cli --chainId 1895 --networkId 1597649375983 --gasLimit=20700000 -e 10000 --acctKeys=\"./ganache-accounts.json\" --account=\"0x7ab741b57e8d94dd7e1a29055646bafde7010f38a900f55bbd7647880faa6ee8, 100000000000000000000000000000000000000\" --account=\"0x2030b463177db2da82908ef90fa55ddfcef56e8183caf60db464bc398e736e6f, 100000000000000000000000000000000000000\" --account=\"0x62ecd49c4ccb41a70ad46532aed63cf815de15864bc415c87d507afd6a5e8da2, 100000000000000000000000000000000000000\" --account=\"0xf473040b1a83739a9c7cc1f5719fab0f5bf178f83314d98557c58aae1910e03a, 100000000000000000000000000000000000000\" --account=\"0x823d590ed2cb5e8493bb0efc834771c1cde36f9fc49b9fe3620ebd0754ad6ea2, 100000000000000000000000000000000000000\" --account=\"0xd6d710943471e4c37ceb787857e7a2b41ca57f9cb4307ee9a9b21436a8e709c3, 100000000000000000000000000000000000000\" --account=\"0x187bb12e927c1652377405f81d93ce948a593f7d66cfba383ee761858b05921a, 100000000000000000000000000000000000000\" --account=\"0xf41486fdb04505e7966c8720a353ed92ce0d6830f8a5e915fbde735106a06d25, 100000000000000000000000000000000000000\" --account=\"0x6ca40ba4cca775643398385022264c0c414da1abd21d08d9e7136796a520a543, 100000000000000000000000000000000000000\" --account=\"0xfac0bc9325ad342033afe956e83f0bf8f1e863c1c3e956bc75d66961fe4cd186, 100000000000000000000000000000000000000\"", "kovan-fork": "npx ganache-cli -i 42 -l 20700000 -f https://kovan.infura.io/v3/$(cat .env | sed -En 's/INFURA_KEY=''\"''([^''\"'']+)''\"''/\\1/p')@16988040", "kovan-fork-latest": "npx ganache-cli -i 42 -l 20700000 -f https://kovan.infura.io/v3/$(cat .env | sed -En 's/INFURA_KEY=''\"''([^''\"'']+)''\"''/\\1/p')", @@ -27,7 +27,7 @@ "test:coverage": "npx truffle run coverage && istanbul check-coverage --statements 94 --branches 83 --functions 96 --lines 94", "lint:js": "eslint .", "lint:contracts": "npx solhint contracts/**/*.sol && npx solhint contracts/**/**/*.sol", - "test:deployment": "./scripts/deploy.sh development `seq 1 7`", + "test:deployment": "./scripts/deploy.sh development `seq 1 6`", "test:benchmark": "./scripts/deploy.sh development 999", "validate:erc20": "bash ./scripts/validate_erc20.sh", "security:slither": "npm run security:slither:infrastructure && npm run security:slither:modules && npm run security:slither:wallet", diff --git a/scripts/deploy.sh b/scripts/deploy.sh index 40f43011d..38ca29d94 100755 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -3,9 +3,9 @@ # Usage: ./deploy.sh [network] [aws-profile-suffix] [...steps] # ./deploy.sh [network] [...steps] (if network == aws-profile-suffix) # -# Examples: ./deploy.sh dev 1 2 3 4 -# ./deploy.sh ganache 1 2 3 4 5 6 -# ./deploy.sh ropsten dev 5 6 +# Examples: ./deploy.sh development 1 2 3 4 +# ./deploy.sh test 1 2 3 4 5 6 +# ./deploy.sh staging 5 6 set -e # stop the script if any subprocess fails @@ -34,9 +34,9 @@ do echo "Waiting for ganache to launch on port 8545..." while ! nc -z localhost 8545; do sleep 1; done echo "ganache running on port 8545" - npx etherlime deploy --file $FILE --network $NETWORK --compile false + npx truffle exec $FILE --network $NETWORK else - AWS_PROFILE=argent-$PROFILE AWS_SDK_LOAD_CONFIG=true npx etherlime deploy --file $FILE --network $NETWORK --compile false + AWS_PROFILE=argent-$PROFILE AWS_SDK_LOAD_CONFIG=true npx truffle exec $FILE --network $NETWORK fi if [ $? -ne 0 ]; then exit 1 # exit with failure status diff --git a/truffle-config.base.js b/truffle-config.base.js index d86884f8e..b8c8dfe16 100644 --- a/truffle-config.base.js +++ b/truffle-config.base.js @@ -17,12 +17,21 @@ * phrase from a file you've .gitignored so it doesn't accidentally become public. * */ +require("dotenv").config(); const HDWalletProvider = require("@truffle/hdwallet-provider"); -require("dotenv").config(); +const DeployManager = require("./utils/deploy-manager.js"); + +const _gasPrice = process.env.DEPLOYER_GAS_PRICE || 20000000000; +const _gasLimit = 6000000; + +async function getKeys(network) { + const manager = new DeployManager(network); + await manager.setup(); + const { pkey, infuraKey } = manager; + return (pkey, infuraKey); +} -// const infuraKey = "fj4jll3k....."; -// // const fs = require('fs'); // const mnemonic = fs.readFileSync(".secret").toString().trim(); @@ -50,9 +59,34 @@ module.exports = { gas: 20700000 }, - ropsten: { - provider: () => new HDWalletProvider(`${process.env.MNEMONIC}`, `https://ropsten.infura.io/v3/${process.env.INFURA_ID}`), - network_id: 3, + test: { + provider: async () => { + const { pkey, infuraKey } = await getKeys("test"); + return new HDWalletProvider(pkey, `https://ropsten.infura.io/v3/${infuraKey}`); + }, + network_id: 3, // ropsten + gas: _gasLimit, + gasPrice: _gasPrice, + }, + + staging: { + provider: async () => { + const { pkey, infuraKey } = await getKeys("staging"); + return new HDWalletProvider(pkey, `https://mainnet.infura.io/v3/${infuraKey}`); + }, + network_id: 1, // mainnet + gas: _gasLimit, + gasPrice: _gasPrice, + }, + + prod: { + provider: async () => { + const { pkey, infuraKey } = await getKeys("prod"); + return new HDWalletProvider(pkey, `https://mainnet.infura.io/v3/${infuraKey}`); + }, + network_id: 1, // mainnet + gas: _gasLimit, + gasPrice: _gasPrice, }, // Another network with more advanced options... diff --git a/utils/config/development.json b/utils/config/development.json index d0a36d727..abe6794a2 100644 --- a/utils/config/development.json +++ b/utils/config/development.json @@ -1 +1 @@ -{"ENS":{"deployOwnRegistry":true,"ensRegistry":"0xec5a038096A3bbb667F6f6bAeB6452E3dEa08FAE","domain":"argent.xyz"},"backend":{"accounts":["0xD9995BAE12FEe327256FFec1e3184d492bD94C31"]},"multisig":{"owners":["0xD9995BAE12FEe327256FFec1e3184d492bD94C31"],"threshold":1,"autosign":true},"settings":{"deployer":{"type":"ganache"},"lockPeriod":480,"recoveryPeriod":480,"securityPeriod":240,"securityWindow":240,"feeRatio":15,"defaultLimit":"1000000000000000000"},"CryptoKitties":{"contract":"0x0000000000000000000000000000000000000000"},"defi":{"weth":"0x0000000000000000000000000000000000000000","maker":{"deployOwn":true,"tub":"0x0000000000000000000000000000000000000000","pot":"0x0000000000000000000000000000000000000000","jug":"0x0000000000000000000000000000000000000000","migration":"0xe61A2910280f84c79B08cea5Ea1250aA3D94A956"},"uniswap":{"deployOwn":true,"factory":"0x593258e0672cAB972d493087C0400012973b3392"},"compound":{"comptroller":"0x0000000000000000000000000000000000000000","markets":{"0x0000000000000000000000000000000000000000":"0x0000000000000000000000000000000000000000"}},"paraswap":{"deployOwn":true,"contract":"0x403cB18300b16b3019Ea1b3a74F5C2bB2036B8a5","authorisedExchanges":{"Kyber":"0x0e902fAaeA3931C6cBe2aE6952D35bF6F94dda5b"}}},"contracts":{"MultiSigWallet":"0x4A654B3814e634f705BC68f0b8aC88708Bf273C5","WalletFactory":"0xBfC94C3625D9939F42A010aeB43d7B52423a28a7","ENSResolver":"0xb3FF69d8fe13D8e3e079cC19c37d79d5f4BcE931","ENSManager":"0x4E053eD2c9F52ac3e49ae91610044d2dafB49DE3","TokenPriceProvider":"0xE09C322B745434Fbb2D18c107c13795D4bDF3657","ModuleRegistry":"0x28654Ae24FC1A9F8B67Aa7c59E2C649Bb0b95da3","BaseWallet":"0xe7E43334B154F6f206FbE5a8ad6Bf833eB53A9Ec","CompoundRegistry":"0x4F25631Fd027DF7718853469f00c40Ca9F7C9ec3","MakerRegistry":"0x355d26E5f04255F60E910F1aA1251DE5D10996E8","DexRegistry":"0x20704257D0dFcea212e0477ecDF9c83358398cA1"},"modules":{"GuardianStorage":"0x230cB3766cd793Fc5a4a0758e80bdb68aa7A0AA1","TransferStorage":"0x0e3aB1A327703c20792c09F6F9a6C5341b74466C","GuardianManager":"0xD8516Fe9e2b04cd16c3d8DF32919EaA4bEa1d290","LockManager":"0xff13C8EA0c254c2483DB68A39C837DAE7c76AB99","RecoveryManager":"0x7BBE875A29C7F3057124eE40947A4b0AD891862C","ApprovedTransfer":"0x24bCE36F41AF503806fa93Bf8e403649f70b676F","TokenExchanger":"0x79136e33B3AB104a50F8D6987dd541E8DdaCbAfF","NftTransfer":"0xC5634C4fEF9C125e7F41526B77ffd814a2726024","MakerManager":"0x2718cAce241213B18F67C6d66B245EE77DB0Ce2a","TransferManager":"0xeDa4A2478d48162f638bDd5449aC303C7F16989D","CompoundManager":"0x71E86c118CcbEA7Ab080E0fCD2A0c165C4722E4D","MakerV2Manager":"0x2AFe5ec8F1b61EE207af4ccda0b26F8C32EEf968","LimitStorage":"0x0353C0A8774bF8C0014f43460a1968D55bddE070","TokenPriceStorage":"0x5dA4F81c17776495e3d7999ad9217748D257f074","RelayerModule":"0x171eb25c80da6adF0436668126285ca51e37eB30","RelayerManager":"0x837b4CAD2aB35281de25Fa9Bad1f7ba93590a286","VersionManager":"0x12f117EA2266DB9c697A677a41e27383Dc631575","LockStorage":"0x0979bb118063E91911015296657C6a9cC39a3AD8","TokenPriceRegistry":"0xa254E4C169D60Aa31B4E5FD55D198b6FCd869578"},"gitCommit":"80a9a710b7a48e300bf3548ab770d635f6c59582"} \ No newline at end of file +{"ENS":{"deployOwnRegistry":true,"ensRegistry":"0x457E2683CDc9d8f76d06684D542c4c41f2C8CC80","domain":"argent.xyz"},"backend":{"accounts":["0xD9995BAE12FEe327256FFec1e3184d492bD94C31"]},"multisig":{"owners":["0xD9995BAE12FEe327256FFec1e3184d492bD94C31"],"threshold":1,"autosign":true},"settings":{"deployer":{"type":"ganache"},"lockPeriod":480,"recoveryPeriod":480,"securityPeriod":240,"securityWindow":240,"feeRatio":15,"defaultLimit":"1000000000000000000"},"CryptoKitties":{"contract":"0x0000000000000000000000000000000000000000"},"defi":{"weth":"0x0000000000000000000000000000000000000000","maker":{"deployOwn":true,"tub":"0x0000000000000000000000000000000000000000","pot":"0x0000000000000000000000000000000000000000","jug":"0x0000000000000000000000000000000000000000","migration":"0x55DC317D8AFc1245b099731AEbD072bE38C7F123"},"uniswap":{"deployOwn":true,"factory":"0xDbb27d0d4f633a9a0907B7e337D2e807D0eEf8C2"},"compound":{"comptroller":"0x0000000000000000000000000000000000000000","markets":{"0x0000000000000000000000000000000000000000":"0x0000000000000000000000000000000000000000"}},"paraswap":{"deployOwn":true,"contract":"0x5ed62bB47087fAbec9E3f25021cfcf6c6DD57112","authorisedExchanges":{"Kyber":"0x005470e4FE3F11617333E94F0e9B551b47e3DC4c"}}},"contracts":{"MultiSigWallet":"0x70D303EE4654367127F527e986F16d283c07fDCd","WalletFactory":"0x2B3DF3fAC32e463F00ff744173A250985F8510b4","ENSResolver":"0xF15EE839f3813F217f0df432974866f212f6a0A7","ENSManager":"0x96c0Dc08b9DFc5747D039C40FA663Ec0c9E5fC9E","TokenPriceProvider":"0xE09C322B745434Fbb2D18c107c13795D4bDF3657","ModuleRegistry":"0x7E93afFaa1452a7e07B961Aab04EF20a4Bc12b78","BaseWallet":"0xe2ba44F6f166B2517A1F624a70CE36929E5736C5","CompoundRegistry":"0x6A27dC5551BB85B1EA6B0553FA0D193e63747d3a","MakerRegistry":"0x355d26E5f04255F60E910F1aA1251DE5D10996E8","DexRegistry":"0xB94A262865431c08Df44128A67F01fB027FEEb0C"},"modules":{"GuardianStorage":"0x33741315204Fa482A836EEA515563768B29D0069","TransferStorage":"0xb43360D140C857330D4e0e9B9867961efF5E2171","GuardianManager":"0xD822e79E2CA49c668f7d97DB1906330bc64459EB","LockManager":"0x7e7acD252559062f0E6355847f4Fbb1c62872f14","RecoveryManager":"0x4A74DE038616791359aEfED19f3f6B75FF6dd340","ApprovedTransfer":"0x61B2D9C034cD0DAE1738D039cdF9af860ee6B31A","TokenExchanger":"0xC790c0E4D6811884b52121A5A8d0c0198F515030","NftTransfer":"0x75eC71B541b0b2e0f9A4a2bea381c23fd7B0fB0c","MakerManager":"0x2718cAce241213B18F67C6d66B245EE77DB0Ce2a","TransferManager":"0x42ecEbe8946c4954aFc0C2333977adCb243614ed","CompoundManager":"0xD7A53fDd46a663C678da0580A66843Ae9b7783Da","MakerV2Manager":"0x66F622060ecA4812756d6151c99044151607eb8d","LimitStorage":"0x878ABC3e7a97f4a4f5348A6161AbA4E2c912c31f","TokenPriceStorage":"0x5dA4F81c17776495e3d7999ad9217748D257f074","RelayerModule":"0x171eb25c80da6adF0436668126285ca51e37eB30","RelayerManager":"0xA403649d49d0AAEAB6aEcc7bd0e6fE2f3b6Af84C","VersionManager":"0xF346Ee8d0b5738E037DbF22355949411187Da4bC","LockStorage":"0x3892c37f1bcea23c795A8a72cECaa6096811fB46","TokenPriceRegistry":"0x9c37898845881B6b9aB2f281258314dA326d06A5"},"gitCommit":"0bce1eb6f9067f71b43cc11f851047f2b88c9a69"} \ No newline at end of file diff --git a/utils/deploy-manager.js b/utils/deploy-manager.js index 9aa3c601f..11ec14ba7 100644 --- a/utils/deploy-manager.js +++ b/utils/deploy-manager.js @@ -1,7 +1,5 @@ require("dotenv").config(); -const etherlime = require("etherlime-lib"); const path = require("path"); -const ethers = require("ethers"); const Configurator = require("./configurator.js"); const ConfiguratorLoader = require("./configurator-loader.js"); @@ -9,14 +7,10 @@ const PrivateKeyLoader = require("./private-key-loader.js"); const ABIUploader = require("./abi-uploader.js"); const VersionUploader = require("./version-uploader.js"); -const defaultConfigs = { - gasPrice: ethers.BigNumber.from(process.env.DEPLOYER_GAS_PRICE || 20000000000), - gasLimit: 6000000, -}; - class DeployManager { - constructor(network) { + constructor(network, deploymentAccount) { this.network = network; + this.deploymentAccount = deploymentAccount; this.env = process.env.CONFIG_ENVIRONMENT; this.remotelyManagedNetworks = (process.env.S3_BUCKET_SUFFIXES || "").split(":"); @@ -38,35 +32,24 @@ class DeployManager { await this.configurator.load(); const { config } = this.configurator; + if (config.settings.deployer.type === "infura") { + const { key, envvar } = config.settings.deployer.options; + this.infuraKey = key || process.env[envvar]; + } // getting private key if any is available - let pkey; if (config.settings.privateKey && config.settings.privateKey.type === "plain") { const { value, envvar } = config.settings.privateKey.options; - pkey = value || process.env[envvar]; + this.pkey = value || process.env[envvar]; } else if (config.settings.privateKey && config.settings.privateKey.type === "s3") { const { options } = config.settings.privateKey; const pkeyLoader = new PrivateKeyLoader(options.bucket, options.key); - pkey = await pkeyLoader.fetch(); - } - - // setting deployer - if (config.settings.deployer.type === "ganache") { - this.deployer = new etherlime.EtherlimeGanacheDeployer(pkey); // will use etherlime accounts if pkey is undefined - } else if (config.settings.deployer.type === "infura") { - const { network, key, envvar } = config.settings.deployer.options; - this.deployer = new etherlime.InfuraPrivateKeyDeployer(pkey, network, key || process.env[envvar]); - } else if (config.settings.deployer.type === "jsonrpc") { - const { url } = config.settings.deployer.options; - this.deployer = new etherlime.JSONRPCPrivateKeyDeployer(pkey, url); + this.pkey = await pkeyLoader.fetch(); } - // set default gasPrice and gasLimit - this.deployer.setDefaultOverrides(defaultConfigs); - // setting backend accounts and multi-sig owner for test environments not managed on S3 + // setting backend accounts and multi-sig owner for environments not managed on S3 if (!this.remotelyManagedNetworks.includes(this.network)) { - const account = await this.deployer.signer.getAddress(); - this.configurator.updateBackendAccounts([account]); - this.configurator.updateMultisigOwner([account]); + this.configurator.updateBackendAccounts([this.deploymentAccount]); + this.configurator.updateMultisigOwner([this.deploymentAccount]); } // abi upload From 8a4a783f7aaab522d565dd9c71c273ba2ffd8f37 Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Fri, 6 Nov 2020 16:13:48 +0200 Subject: [PATCH 075/113] Move reading the network parameter to DeployManager class logic --- deployment/1_setup_test_environment.js | 6 +----- deployment/2_deploy_contracts.js | 9 +-------- deployment/3_setup_contracts.js | 9 +-------- deployment/4_finalise_test_environment.js | 9 +-------- deployment/5_deploy_modules.js | 10 ++-------- deployment/6_register_modules.js | 9 +-------- utils/deploy-manager.js | 6 +++++- 7 files changed, 12 insertions(+), 46 deletions(-) diff --git a/deployment/1_setup_test_environment.js b/deployment/1_setup_test_environment.js index 543c56b4c..b6a7d6aea 100644 --- a/deployment/1_setup_test_environment.js +++ b/deployment/1_setup_test_environment.js @@ -57,15 +57,11 @@ async function deployParaswap(deploymentAccount) { } module.exports = async (callback) => { - const idx = process.argv.indexOf("--network"); - const network = idx > -1 ? process.argv[idx + 1] : "development"; - console.log(`## ${network} network ##`); - // TODO: Maybe get the signer account a better way? const accounts = await web3.eth.getAccounts(); const deploymentAccount = accounts[0]; - const manager = new DeployManager(network, deploymentAccount); + const manager = new DeployManager(deploymentAccount); await manager.setup(); const { configurator } = manager; const { config } = configurator; diff --git a/deployment/2_deploy_contracts.js b/deployment/2_deploy_contracts.js index 8864a856b..921b5a38e 100644 --- a/deployment/2_deploy_contracts.js +++ b/deployment/2_deploy_contracts.js @@ -25,18 +25,11 @@ const DeployManager = require("../utils/deploy-manager.js"); const MultisigExecutor = require("../utils/multisigexecutor.js"); module.exports = async (callback) => { - // ////////////////////////////////// - // Setup - // ////////////////////////////////// - const idx = process.argv.indexOf("--network"); - const network = idx > -1 ? process.argv[idx + 1] : "development"; - console.log(`## ${network} network ##`); - // TODO: Maybe get the signer account a better way? const accounts = await web3.eth.getAccounts(); const deploymentAccount = accounts[0]; - const manager = new DeployManager(network, deploymentAccount); + const manager = new DeployManager(deploymentAccount); await manager.setup(); const { configurator } = manager; diff --git a/deployment/3_setup_contracts.js b/deployment/3_setup_contracts.js index b453c999c..e208688d7 100644 --- a/deployment/3_setup_contracts.js +++ b/deployment/3_setup_contracts.js @@ -10,18 +10,11 @@ const DexRegistry = artifacts.require("DexRegistry"); const DeployManager = require("../utils/deploy-manager.js"); module.exports = async (callback) => { - // ////////////////////////////////// - // Setup - // ////////////////////////////////// - const id = process.argv.indexOf("--network"); - const network = id > -1 ? process.argv[id + 1] : "development"; - console.log(`## ${network} network ##`); - // TODO: Maybe get the signer account a better way? const accounts = await web3.eth.getAccounts(); const deploymentAccount = accounts[0]; - const manager = new DeployManager(network, deploymentAccount); + const manager = new DeployManager(deploymentAccount); await manager.setup(); const { configurator } = manager; diff --git a/deployment/4_finalise_test_environment.js b/deployment/4_finalise_test_environment.js index 379513e36..c51915667 100644 --- a/deployment/4_finalise_test_environment.js +++ b/deployment/4_finalise_test_environment.js @@ -25,18 +25,11 @@ async function deployENSReverseRegistrar(config, owner, overrides) { } module.exports = async (callback) => { - // ////////////////////////////////// - // Setup - // ////////////////////////////////// - const idx = process.argv.indexOf("--network"); - const network = idx > -1 ? process.argv[idx + 1] : "development"; - console.log(`## ${network} network ##`); - // TODO: Maybe get the signer account a better way? const accounts = await web3.eth.getAccounts(); const deploymentAccount = accounts[0]; - const manager = new DeployManager(network, deploymentAccount); + const manager = new DeployManager(deploymentAccount); await manager.setup(); const { configurator } = manager; diff --git a/deployment/5_deploy_modules.js b/deployment/5_deploy_modules.js index deb86db3e..818931306 100644 --- a/deployment/5_deploy_modules.js +++ b/deployment/5_deploy_modules.js @@ -20,18 +20,12 @@ const DeployManager = require("../utils/deploy-manager.js"); // /////////////////////////////////////////////////////// module.exports = async (callback) => { - // ////////////////////////////////// - // Setup - // ////////////////////////////////// - const idx = process.argv.indexOf("--network"); - const network = idx > -1 ? process.argv[idx + 1] : "development"; - console.log(`## ${network} network ##`); - // TODO: Maybe get the signer account a better way? const accounts = await web3.eth.getAccounts(); const deploymentAccount = accounts[0]; - const manager = new DeployManager(network, deploymentAccount); + const manager = new DeployManager(deploymentAccount); + const { network } = manager; await manager.setup(); const { configurator } = manager; diff --git a/deployment/6_register_modules.js b/deployment/6_register_modules.js index a3435d399..b3e35980e 100644 --- a/deployment/6_register_modules.js +++ b/deployment/6_register_modules.js @@ -21,18 +21,11 @@ const DeployManager = require("../utils/deploy-manager.js"); const MultisigExecutor = require("../utils/multisigexecutor.js"); module.exports = async (callback) => { - // ////////////////////////////////// - // Setup - // ////////////////////////////////// - const id = process.argv.indexOf("--network"); - const network = id > -1 ? process.argv[id + 1] : "development"; - console.log(`## ${network} network ##`); - // TODO: Maybe get the signer account a better way? const accounts = await web3.eth.getAccounts(); const deploymentAccount = accounts[0]; - const manager = new DeployManager(network, deploymentAccount); + const manager = new DeployManager(deploymentAccount); await manager.setup(); const { configurator } = manager; diff --git a/utils/deploy-manager.js b/utils/deploy-manager.js index 11ec14ba7..dda5bdcf6 100644 --- a/utils/deploy-manager.js +++ b/utils/deploy-manager.js @@ -8,7 +8,11 @@ const ABIUploader = require("./abi-uploader.js"); const VersionUploader = require("./version-uploader.js"); class DeployManager { - constructor(network, deploymentAccount) { + constructor(deploymentAccount) { + const idx = process.argv.indexOf("--network"); + const network = idx > -1 ? process.argv[idx + 1] : "development"; + console.log(`## ${network} network ##`); + this.network = network; this.deploymentAccount = deploymentAccount; this.env = process.env.CONFIG_ENVIRONMENT; From 2c725f02b2639bb56d6fefbf2411561a7467dfd5 Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Fri, 6 Nov 2020 16:15:01 +0200 Subject: [PATCH 076/113] Remove benchmark scripts --- .circleci/config.yml | 4 +- deployment/888_benchmark_2_0.js | 409 --------------------- deployment/999_benchmark.js | 605 -------------------------------- 3 files changed, 2 insertions(+), 1016 deletions(-) delete mode 100644 deployment/888_benchmark_2_0.js delete mode 100644 deployment/999_benchmark.js diff --git a/.circleci/config.yml b/.circleci/config.yml index 62fe49b58..dade43d79 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -60,8 +60,8 @@ jobs: name: "Lint Solidity contracts" command: npm run lint:contracts - run: - name: "Testing deployment scripts and benchmark gas costs" - command: npm run ganache >/dev/null 2>&1 & npm run test:deployment && npm run test:benchmark + name: "Test deployment scripts" + command: npm run ganache >/dev/null 2>&1 & npm run test:deployment - run: name: "Compiling external library contracts" command: npm run compile:lib diff --git a/deployment/888_benchmark_2_0.js b/deployment/888_benchmark_2_0.js deleted file mode 100644 index 52917e4bd..000000000 --- a/deployment/888_benchmark_2_0.js +++ /dev/null @@ -1,409 +0,0 @@ -/* eslint max-classes-per-file: ["error", 2] */ -/* global artifacts */ - -const ethers = require("ethers"); -const chai = require("chai"); -const Table = require("cli-table2"); -const tinyreq = require("tinyreq"); - -const BaseWallet = artifacts.require("BaseWallet"); -const Proxy = artifacts.require("Proxy"); -const ModuleRegistry = artifacts.require("ModuleRegistry"); -const MultiSig = artifacts.require("MultiSigWallet"); - -const NewGuardianManager = artifacts.require("GuardianManager"); -const NewTokenExchanger = artifacts.require("TokenExchanger"); -const NewLockManager = artifacts.require("LockManager"); -const NewRecoveryManager = artifacts.require("RecoveryManager"); -const NewApprovedTransfer = artifacts.require("ApprovedTransfer"); -const NewTransferManager = artifacts.require("TransferManager"); -const NewNftTransfer = artifacts.require("NftTransfer"); -const NewCompoundManager = artifacts.require("CompoundManager"); -const NewMakerV2Manager = artifacts.require("MakerV2Manager"); -const RelayerManager = artifacts.require("RelayerManager"); -const VersionManager = artifacts.require("VersionManager"); - -const UpgraderToVersionManager = artifacts.require("UpgraderToVersionManager"); -const LimitStorage = artifacts.require("LimitStorage"); -const LockStorage = artifacts.require("LockStorage"); -const TokenPriceRegistry = artifacts.require("TokenPriceRegistry"); -const DexRegistry = artifacts.require("DexRegistry"); - -const TransferManager = require("../build-legacy/v1.6.0/TransferManager"); -const ApprovedTransfer = require("../build-legacy/v1.6.0/ApprovedTransfer"); -const GuardianManager = require("../build-legacy/v1.6.0/GuardianManager"); -const LockManager = require("../build-legacy/v1.6.0/LockManager"); -const NftTransfer = require("../build-legacy/v1.6.0/NftTransfer"); -const RecoveryManager = require("../build-legacy/v1.6.0/RecoveryManager"); -const TokenExchanger = require("../build-legacy/v1.6.0/TokenExchanger"); -const MakerV2Manager = require("../build-legacy/v1.6.0/MakerV2Manager"); -const CompoundManager = require("../build-legacy/v1.6.0/CompoundManager"); - -const DeployManager = require("../utils/deploy-manager"); -const RelayManager = require("../utils/relay-manager"); -const MultisigExecutor = require("../utils/multisigexecutor.js"); - -const { sortWalletByAddress } = require("../utils/utilities.js"); - -const { expect } = chai; - -class Logger { - constructor() { - this._items = []; - } - - async loadData() { - const coinmarketcap = await tinyreq({ url: "https://api.coinmarketcap.com/v2/ticker/1027/" }); - try { - this._ethusd = JSON.parse(coinmarketcap).data.quotes.USD.price; - } catch (error) { - this._ethusd = "500"; - } - - const etherchain = await tinyreq({ url: "https://www.etherchain.org/api/gasPriceOracle" }); - try { - this._gas_price = JSON.parse(etherchain); - } catch (error) { - this._gas_price = JSON.parse('{"safeLow":"3","standard":"5","fast":"10","fastest":"10"}'); - } - } - - addItem(key, value) { - this._items.push({ key, value }); - } - - output() { - const colWidths = [75, 15]; - const head = [`Task [1 ETH = ${this._ethusd} USD]`, "Gas"]; - for (const speed in this._gas_price) { - const gasPrice = parseInt(this._gas_price[speed], 10); - head.push(`${speed} (${gasPrice} gwei)`); - colWidths.push(20); - } - const style = { head: [], border: [] }; - - const table = new Table({ head, colWidths, style }); - - this._items.forEach((item) => { - const row = [item.key, item.value.toLocaleString()]; - for (const speed in this._gas_price) { - const gasPrice = parseInt(this._gas_price[speed], 10); - const price = item.value * gasPrice * 0.000000001 * parseInt(this._ethusd, 10); - row.push(price.toLocaleString("en-US", { style: "currency", currency: "USD" })); - } - table.push(row); - }); - return table.toString(); - } -} - -class Benchmark { - constructor(network) { - this.network = network; - this._logger = new Logger(); - } - - // /////////////////// - // //// setup //////// - // /////////////////// - - async setup() { - const manager = new DeployManager(this.network); - await manager.setup(); - - const { configurator } = manager; - - this.deployer = manager.deployer; - this.deploymentWallet = this.deployer.signer; - const { config } = configurator; - - const signers = (await this.deployer.provider.listAccounts()).map((account) => this.deployer.provider.getSigner(account)); - this.signers = [signers[0], ...sortWalletByAddress(signers.slice(1), "_address")]; - this.accounts = this.signers.map((s) => s._address); - this.config = config; - - this.testManager = new RelayManager(this.accounts); - - this.GuardianManagerWrapper = await this.deployer.wrapDeployedContract(GuardianManager, config.modules.GuardianManager); - this.LockManagerWrapper = await this.deployer.wrapDeployedContract(LockManager, config.modules.LockManager); - this.RecoveryManagerWrapper = await this.deployer.wrapDeployedContract(RecoveryManager, config.modules.RecoveryManager); - this.ApprovedTransferWrapper = await this.deployer.wrapDeployedContract(ApprovedTransfer, config.modules.ApprovedTransfer); - this.TransferManagerWrapper = await this.deployer.wrapDeployedContract(TransferManager, config.modules.TransferManager); - this.TokenExchangerWrapper = await this.deployer.wrapDeployedContract(TokenExchanger, config.modules.TokenExchanger); - this.NftTransferWrapper = await this.deployer.wrapDeployedContract(NftTransfer, config.modules.NftTransfer); - this.CompoundManagerWrapper = await this.deployer.wrapDeployedContract(CompoundManager, config.modules.CompoundManager); - this.MakerV2ManagerWrapper = await this.deployer.wrapDeployedContract(MakerV2Manager, config.modules.MakerV2Manager); - - this.ModuleRegistryWrapper = await this.deployer.wrapDeployedContract(ModuleRegistry, config.contracts.ModuleRegistry); - this.MultiSigWrapper = await this.deployer.wrapDeployedContract(MultiSig, config.contracts.MultiSigWallet); - this.BaseWalletWrapper = await this.deployer.wrapDeployedContract(BaseWallet, config.contracts.BaseWallet); - - this.multisigExecutor = new MultisigExecutor(this.MultiSigWrapper, this.signers[0], true); - } - - async setupWallet() { - this.allModules = [ - this.GuardianManagerWrapper.contractAddress, - this.LockManagerWrapper.contractAddress, - this.RecoveryManagerWrapper.contractAddress, - this.ApprovedTransferWrapper.contractAddress, - this.TransferManagerWrapper.contractAddress, - this.TokenExchangerWrapper.contractAddress, - this.NftTransferWrapper.contractAddress, - this.CompoundManagerWrapper.contractAddress, - this.MakerV2ManagerWrapper.contractAddress, - ]; - - const proxy = await this.deployer.deploy(Proxy, {}, this.BaseWalletWrapper.contractAddress); - this.wallet = this.deployer.wrapDeployedContract(BaseWallet, proxy.contractAddress); - this.walletAddress = this.wallet.contractAddress; - await this.wallet.init(this.accounts[0], this.allModules); - - await this.deploymentWallet.sendTransaction({ - to: this.walletAddress, - value: ethers.utils.parseEther("1.0"), - }); - } - - async testUpgradeAllModules() { - // Deploy Infrastructure contracts - const LockStorageWrapper = await this.deployer.deploy(LockStorage); - const LimitStorageWrapper = await this.deployer.deploy(LimitStorage); - const TokenPriceRegistryWrapper = await this.deployer.deploy(TokenPriceRegistry); - const DexRegistryWrapper = await this.deployer.deploy(DexRegistry); - - // Create new modules - const VersionManagerWrapper = await this.deployer.deploy( - VersionManager, - {}, - this.config.contracts.ModuleRegistry, - LockStorageWrapper.contractAddress, - this.config.modules.GuardianStorage, - this.config.modules.TransferStorage, - LimitStorageWrapper.contractAddress, - ); - - // Create new features - const newApprovedTransferWrapper = await this.deployer.deploy( - NewApprovedTransfer, - {}, - LockStorageWrapper.contractAddress, - this.config.modules.GuardianStorage, - LimitStorageWrapper.contractAddress, - VersionManagerWrapper.contractAddress, - this.config.defi.weth, - ); - - const newCompoundManagerWrapper = await this.deployer.deploy( - NewCompoundManager, - {}, - LockStorageWrapper.contractAddress, - this.config.defi.compound.comptroller, - this.config.contracts.CompoundRegistry, - VersionManagerWrapper.contractAddress, - ); - - const newGuardianManager = await this.deployer.deploy( - NewGuardianManager, - {}, - LockStorageWrapper.contractAddress, - this.config.modules.GuardianStorage, - VersionManagerWrapper.contractAddress, - this.config.settings.securityPeriod || 0, - this.config.settings.securityWindow || 0, - ); - - const newLockManagerWrapper = await this.deployer.deploy( - NewLockManager, - {}, - LockStorageWrapper.contractAddress, - this.config.modules.GuardianStorage, - VersionManagerWrapper.contractAddress, - this.config.settings.lockPeriod || 0, - ); - - const newNftTransferWrapper = await this.deployer.deploy( - NewNftTransfer, - {}, - LockStorageWrapper.contractAddress, - TokenPriceRegistryWrapper.contractAddress, - VersionManagerWrapper.contractAddress, - this.config.CryptoKitties.contract, - ); - - const newRecoveryManagerWrapper = await this.deployer.deploy( - NewRecoveryManager, - {}, - LockStorageWrapper.contractAddress, - this.config.modules.GuardianStorage, - VersionManagerWrapper.contractAddress, - this.config.settings.recoveryPeriod || 0, - this.config.settings.lockPeriod || 0, - ); - - const newTokenExchangerWrapper = await this.deployer.deploy( - NewTokenExchanger, - {}, - LockStorageWrapper.contractAddress, - TokenPriceRegistryWrapper.contractAddress, - VersionManagerWrapper.contractAddress, - DexRegistryWrapper.contractAddress, - this.config.defi.paraswap.contract, - "argent", - ); - - const newMakerV2ManagerWrapper = await this.deployer.deploy( - NewMakerV2Manager, - {}, - LockStorageWrapper.contractAddress, - this.config.defi.maker.migration, - this.config.defi.maker.pot, - this.config.defi.maker.jug, - this.config.contracts.MakerRegistry, - this.config.defi.uniswap.factory, - VersionManagerWrapper.contractAddress, - ); - - const newTransferManagerWrapper = await this.deployer.deploy( - NewTransferManager, - {}, - LockStorageWrapper.contractAddress, - this.config.modules.TransferStorage, - LimitStorageWrapper.contractAddress, - TokenPriceRegistryWrapper.contractAddress, - VersionManagerWrapper.contractAddress, - this.config.settings.securityPeriod || 0, - this.config.settings.securityWindow || 0, - this.config.settings.defaultLimit || "1000000000000000000", - this.config.defi.weth, - "0x0000000000000000000000000000000000000000", - ); - - const relayerManagerWrapper = await this.deployer.deploy( - RelayerManager, - {}, - LockStorageWrapper.contractAddress, - this.config.modules.GuardianStorage, - LimitStorageWrapper.contractAddress, - TokenPriceRegistryWrapper.contractAddress, - VersionManagerWrapper.contractAddress, - ); - - // Add Features to Version Manager - await VersionManagerWrapper.addVersion([ - newGuardianManager.contractAddress, - newLockManagerWrapper.contractAddress, - newRecoveryManagerWrapper.contractAddress, - newApprovedTransferWrapper.contractAddress, - newTransferManagerWrapper.contractAddress, - newTokenExchangerWrapper.contractAddress, - newNftTransferWrapper.contractAddress, - newCompoundManagerWrapper.contractAddress, - newMakerV2ManagerWrapper.contractAddress, - relayerManagerWrapper.contractAddress, - ], [ - newTransferManagerWrapper.contractAddress, - ]); - - // Register new modules - await this.multisigExecutor.executeCall( - this.ModuleRegistryWrapper, - "registerModule", [ - VersionManagerWrapper.contractAddress, - ethers.utils.formatBytes32String("VersionManagerWrapper"), - ], - ); - - // Create upgrader - const upgrader = await this.deployer.deploy( - UpgraderToVersionManager, - {}, - this.ModuleRegistryWrapper.contractAddress, - this.config.modules.GuardianStorage, - this.allModules, - VersionManagerWrapper.contractAddress, - ); - await this.multisigExecutor.executeCall( - this.ModuleRegistryWrapper, - "registerModule", - [upgrader.contractAddress, ethers.utils.formatBytes32String("V1toV2")], - ); - // Upgrade from V1 to V2 - const tx = await this.ApprovedTransferWrapper.from(this.accounts[0]).addModule(this.wallet.contractAddress, upgrader.contractAddress); - const txReceipt = await this.ApprovedTransferWrapper.verboseWaitForTransaction(tx); - - // Test if the upgrade worked - const isVMAuthorised = await this.wallet.authorised(VersionManagerWrapper.contractAddress); - const isUpgraderAuthorised = await this.wallet.authorised(upgrader.contractAddress); - const numModules = await this.wallet.modules(); - expect(isVMAuthorised).to.be.true; // eslint-disable-line no-unused-expressions - expect(isUpgraderAuthorised).to.be.false; // eslint-disable-line no-unused-expressions - expect(numModules.toNumber()).to.eq(1); - - this._logger.addItem("Upgrade all modules on a wallet", txReceipt.gasUsed.toString()); - } - - // /////////////////// - // /// use cases ///// - // /////////////////// - - async estimateUpgradeWalletAllModules() { - await this.testUpgradeAllModules(); - } - - // /////////////////// - // //// utils //////// - // /////////////////// - - async relay(target, method, params, wallet, signers, estimate = false) { - const result = await this.testManager.relay(target, method, params, wallet, signers, this.accounts[9], estimate); - return result; - } - - async relayEstimate(target, method, params, wallet, signers) { - const result = await this.relay(target, method, params, wallet, signers, true); - return result; - } - - getAllEstimateMethods() { - let props = []; - let obj = this; - - do { - props = props.concat(Object.getOwnPropertyNames(obj)); - obj = Object.getPrototypeOf(obj); - } while (obj); - - return props.filter((prop) => prop.startsWith("estimateUpgradeWalletAllModules")); - // return props.filter((prop) => prop.startsWith("estimate")); - } - - async output() { - await this._logger.loadData(); - return this._logger.output(); - } -} - -const deploy = async (network) => { - const benchmark = new Benchmark(network); - await benchmark.setup(); - let methods = benchmark.getAllEstimateMethods(); - const argvMethods = process.argv.filter((x) => x.startsWith("estimate")); - if (argvMethods.length > 0) { - methods = methods.filter((method) => argvMethods.indexOf(method) >= 0); - } - - for (let index = 0; index < methods.length; index += 1) { - const method = methods[index]; - console.log(`Running ${method}...`); - await benchmark.setupWallet(); - await benchmark[method](); - } - - const output = await benchmark.output(); - console.log(output); -}; - -module.exports = { - deploy, -}; diff --git a/deployment/999_benchmark.js b/deployment/999_benchmark.js deleted file mode 100644 index 9d2b0446f..000000000 --- a/deployment/999_benchmark.js +++ /dev/null @@ -1,605 +0,0 @@ -/* eslint max-classes-per-file: ["error", 2] */ -/* global artifacts */ -const ethers = require("ethers"); -const Table = require("cli-table2"); -const tinyreq = require("tinyreq"); - -const BaseWallet = artifacts.require("BaseWallet"); -const Proxy = artifacts.require("Proxy"); -const ModuleRegistry = artifacts.require("ModuleRegistry"); -const MultiSig = artifacts.require("MultiSigWallet"); -const WalletFactory = artifacts.require("WalletFactory"); - -const GuardianManager = artifacts.require("GuardianManager"); -const TokenExchanger = artifacts.require("TokenExchanger"); -const LockManager = artifacts.require("LockManager"); -const RecoveryManager = artifacts.require("RecoveryManager"); -const ApprovedTransfer = artifacts.require("ApprovedTransfer"); -const TransferManager = artifacts.require("TransferManager"); -const NftTransfer = artifacts.require("NftTransfer"); -const CompoundManager = artifacts.require("CompoundManager"); -const MakerV2Manager = artifacts.require("MakerV2Manager"); -const RelayerManager = artifacts.require("RelayerManager"); -const VersionManager = artifacts.require("VersionManager"); - -const DeployManager = require("../utils/deploy-manager"); -const RelayManager = require("../utils/relay-manager"); -const MultisigExecutor = require("../utils/multisigexecutor.js"); - -const ETH_TOKEN = "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"; -const { sortWalletByAddress, increaseTime, getNonceForRelay } = require("../utils/utilities.js"); - -class Logger { - constructor() { - this._items = []; - } - - async loadData() { - const coinmarketcap = await tinyreq({ url: "https://api.coinmarketcap.com/v2/ticker/1027/" }); - try { - this._ethusd = JSON.parse(coinmarketcap).data.quotes.USD.price; - } catch (error) { - this._ethusd = "500"; - } - - const etherchain = await tinyreq({ url: "https://www.etherchain.org/api/gasPriceOracle" }); - try { - this._gas_price = JSON.parse(etherchain); - } catch (error) { - this._gas_price = JSON.parse('{"safeLow":"3","standard":"5","fast":"10","fastest":"10"}'); - } - } - - addItem(key, value) { - this._items.push({ key, value }); - } - - output() { - const colWidths = [75, 15]; - const head = [`Task [1 ETH = ${this._ethusd} USD]`, "Gas"]; - for (const speed in this._gas_price) { - const gasPrice = parseInt(this._gas_price[speed], 10); - head.push(`${speed} (${gasPrice} gwei)`); - colWidths.push(20); - } - const style = { head: [], border: [] }; - - const table = new Table({ head, colWidths, style }); - - this._items.forEach((item) => { - const row = [item.key, item.value.toLocaleString()]; - for (const speed in this._gas_price) { - const gasPrice = parseInt(this._gas_price[speed], 10); - const price = item.value * gasPrice * 0.000000001 * parseInt(this._ethusd, 10); - row.push(price.toLocaleString("en-US", { style: "currency", currency: "USD" })); - } - table.push(row); - }); - return table.toString(); - } -} - -class Benchmark { - constructor(network) { - this.network = network; - this._logger = new Logger(); - } - - // /////////////////// - // //// setup //////// - // /////////////////// - - async setup() { - const manager = new DeployManager(this.network); - await manager.setup(); - - const { configurator } = manager; - - this.deployer = manager.deployer; - this.deploymentWallet = this.deployer.signer; - const { config } = configurator; - - const signers = (await this.deployer.provider.listAccounts()).map((account) => this.deployer.provider.getSigner(account)); - this.signers = [signers[0], ...sortWalletByAddress(signers.slice(1), "_address")]; - this.accounts = this.signers.map((s) => s._address); - this.config = config; - - this.testManager = new RelayManager(); - - // Features - this.GuardianManagerWrapper = await this.deployer.wrapDeployedContract(GuardianManager, config.modules.GuardianManager); - this.LockManagerWrapper = await this.deployer.wrapDeployedContract(LockManager, config.modules.LockManager); - this.RecoveryManagerWrapper = await this.deployer.wrapDeployedContract(RecoveryManager, config.modules.RecoveryManager); - this.ApprovedTransferWrapper = await this.deployer.wrapDeployedContract(ApprovedTransfer, config.modules.ApprovedTransfer); - this.TransferManagerWrapper = await this.deployer.wrapDeployedContract(TransferManager, config.modules.TransferManager); - this.TokenExchangerWrapper = await this.deployer.wrapDeployedContract(TokenExchanger, config.modules.TokenExchanger); - this.NftTransferWrapper = await this.deployer.wrapDeployedContract(NftTransfer, config.modules.NftTransfer); - this.CompoundManagerWrapper = await this.deployer.wrapDeployedContract(CompoundManager, config.modules.CompoundManager); - this.MakerV2ManagerWrapper = await this.deployer.wrapDeployedContract(MakerV2Manager, config.modules.MakerV2Manager); - this.RelayerManagerWrapper = await this.deployer.wrapDeployedContract(RelayerManager, config.modules.RelayerManager); - - // Module - this.VersionManagerWrapper = await this.deployer.wrapDeployedContract(VersionManager, config.modules.VersionManager); - - this.ModuleRegistryWrapper = await this.deployer.wrapDeployedContract(ModuleRegistry, config.contracts.ModuleRegistry); - this.MultiSigWrapper = await this.deployer.wrapDeployedContract(MultiSig, config.contracts.MultiSigWallet); - this.WalletFactoryWrapper = await this.deployer.wrapDeployedContract(WalletFactory, config.contracts.WalletFactory); - this.BaseWalletWrapper = await this.deployer.wrapDeployedContract(BaseWallet, config.contracts.BaseWallet); - - this.multisigExecutor = new MultisigExecutor(this.MultiSigWrapper, this.signers[0], true); - - this.testManager.setRelayerManager(this.RelayerManagerWrapper); - // Add new version to Version Manager - await this.multisigExecutor.executeCall( - this.VersionManagerWrapper, - "addVersion", [ - [ - this.GuardianManagerWrapper.address, - this.LockManagerWrapper.address, - this.RecoveryManagerWrapper.address, - this.ApprovedTransferWrapper.address, - this.TransferManagerWrapper.address, - this.TokenExchangerWrapper.address, - this.NftTransferWrapper.address, - this.CompoundManagerWrapper.address, - this.MakerV2ManagerWrapper.address, - this.RelayerManagerWrapper.address, - ], [ - this.TransferManagerWrapper.address, - ], - ], - ); - } - - async setupWallet() { - const proxy = await this.deployer.deploy(Proxy, {}, this.BaseWalletWrapper.address); - this.wallet = this.deployer.wrapDeployedContract(BaseWallet, proxy.address); - this.walletAddress = this.wallet.address; - // init the wallet - await this.wallet.init(this.accounts[0], [this.VersionManagerWrapper.address]); - await this.VersionManagerWrapper.upgradeWallet(this.wallet.address, await this.VersionManagerWrapper.lastVersion()); - // add first guardian - [, this.firstGuardian] = this.signers; - await this.GuardianManagerWrapper.addGuardian(this.walletAddress, this.accounts[1]); - // send some funds - await this.deploymentWallet.sendTransaction({ - to: this.walletAddress, - value: ethers.utils.parseEther("1.0"), - }); - } - - async testUpgradeAllFeatures() { - // Create new features - this.ApprovedTransferWrapper = await this.deployer.deploy( - ApprovedTransfer, - {}, - this.config.modules.LockStorage, - this.config.modules.GuardianStorage, - this.config.modules.LimitStorage, - this.config.modules.VersionManager, - this.config.defi.weth, - ); - - this.CompoundManagerWrapper = await this.deployer.deploy( - CompoundManager, - {}, - this.config.modules.LockStorage, - this.config.defi.compound.comptroller, - this.config.contracts.CompoundRegistry, - this.config.modules.VersionManager, - ); - - this.GuardianManagerWrapper = await this.deployer.deploy( - GuardianManager, - {}, - this.config.modules.LockStorage, - this.config.modules.GuardianStorage, - this.config.modules.VersionManager, - this.config.settings.securityPeriod || 0, - this.config.settings.securityWindow || 0, - ); - - this.LockManagerWrapper = await this.deployer.deploy( - LockManager, - {}, - this.config.modules.LockStorage, - this.config.modules.GuardianStorage, - this.config.modules.VersionManager, - this.config.settings.lockPeriod || 0, - ); - - this.NftTransferWrapper = await this.deployer.deploy( - NftTransfer, - {}, - this.config.modules.LockStorage, - this.config.modules.TokenPriceRegistry, - this.config.modules.VersionManager, - this.config.CryptoKitties.contract, - ); - - this.RecoveryManagerWrapper = await this.deployer.deploy( - RecoveryManager, - {}, - this.config.modules.LockStorage, - this.config.modules.GuardianStorage, - this.config.modules.VersionManager, - this.config.settings.recoveryPeriod || 0, - this.config.settings.lockPeriod || 0, - ); - - this.TokenExchangerWrapper = await this.deployer.deploy( - TokenExchanger, - {}, - this.config.modules.LockStorage, - this.config.modules.TokenPriceRegistry, - this.config.modules.VersionManager, - this.config.contracts.DexRegistry, - this.config.defi.paraswap.contract, - "argent", - ); - - this.MakerV2ManagerWrapper = await this.deployer.deploy( - MakerV2Manager, - {}, - this.config.modules.LockStorage, - this.config.defi.maker.migration, - this.config.defi.maker.pot, - this.config.defi.maker.jug, - this.config.contracts.MakerRegistry, - this.config.defi.uniswap.factory, - this.config.modules.VersionManager, - ); - - this.TransferManagerWrapper = await this.deployer.deploy( - TransferManager, - {}, - this.config.modules.LockStorage, - this.config.modules.TransferStorage, - this.config.modules.LimitStorage, - this.config.modules.TokenPriceRegistry, - this.config.modules.VersionManager, - this.config.settings.securityPeriod || 0, - this.config.settings.securityWindow || 0, - this.config.settings.defaultLimit || "1000000000000000000", - this.config.defi.weth, - "0x0000000000000000000000000000000000000000", - ); - - this.RelayerManagerWrapper = await this.deployer.deploy( - RelayerManager, - {}, - this.config.modules.LockStorage, - this.config.modules.GuardianStorage, - this.config.modules.LimitStorage, - this.config.modules.TokenPriceRegistry, - this.config.modules.VersionManager, - ); - - // Add Features to Version Manager - await this.multisigExecutor.executeCall( - this.VersionManagerWrapper, - "addVersion", [ - [ - this.GuardianManagerWrapper.address, - this.LockManagerWrapper.address, - this.RecoveryManagerWrapper.address, - this.ApprovedTransferWrapper.address, - this.TransferManagerWrapper.address, - this.TokenExchangerWrapper.address, - this.NftTransferWrapper.address, - this.CompoundManagerWrapper.address, - this.MakerV2ManagerWrapper.address, - this.RelayerManagerWrapper.address, - ], [ - this.TransferManagerWrapper.address, - ], - ], - ); - - // Upgrade a wallet from 2.0 to 2.1 - const fromVersion = await this.VersionManagerWrapper.walletVersions(this.wallet.address); - const lastVersion = await this.VersionManagerWrapper.lastVersion(); - const tx = await this.VersionManagerWrapper.from(this.accounts[0]).upgradeWallet(this.wallet.address, lastVersion); - const txReceipt = tx.receipt; - const toVersion = await this.VersionManagerWrapper.walletVersions(this.wallet.address); - assert.equal(fromVersion.toNumber() + 1, toVersion.toNumber(), "Bad Update"); - console.log(`Wallet updated from version ${fromVersion.toString()} to version ${toVersion.toString()}`); - - this._logger.addItem("Upgrade all modules on a wallet", txReceipt.gasUsed.toString()); - } - - // /////////////////// - // /// use cases ///// - // /////////////////// - - async estimateCreateWalletAllModules() { - const gasUsed = await this.WalletFactoryWrapper.estimate.createWallet( - this.accounts[4], this.VersionManagerWrapper.address, this.accounts[4], 1, - ); - this._logger.addItem("Create a wallet (all modules)", gasUsed); - } - - async estimateAddGuardianDirect() { - let gasUsed = await this.GuardianManagerWrapper.estimate.addGuardian(this.walletAddress, this.accounts[2]); - this._logger.addItem("Request add guardian (direct)", gasUsed); - - await this.GuardianManagerWrapper.addGuardian(this.walletAddress, this.accounts[2]); - await increaseTime(this.config.settings.securityPeriod + this.config.settings.securityWindow / 2); - - gasUsed = await this.GuardianManagerWrapper.estimate.confirmGuardianAddition(this.walletAddress, this.accounts[2]); - this._logger.addItem("Confirm add guardian (direct)", gasUsed); - } - - async estimateRevokeGuardianDirect() { - let gasUsed = await this.GuardianManagerWrapper.estimate.revokeGuardian(this.walletAddress, this.accounts[1]); - this._logger.addItem("Request revoke guardian (direct)", gasUsed); - - await this.GuardianManagerWrapper.revokeGuardian(this.walletAddress, this.accounts[1]); - await increaseTime(this.config.settings.securityPeriod + this.config.settings.securityWindow / 2); - - gasUsed = await this.GuardianManagerWrapper.estimate.confirmGuardianRevokation(this.walletAddress, this.accounts[1]); - this._logger.addItem("Confirm revoke guardian (direct)", gasUsed); - } - - async estimateAddGuardianRelayed() { - const gasUsed = await this.relay( - this.GuardianManagerWrapper, - "addGuardian", - [this.walletAddress, this.accounts[2]], - this.wallet, - [this.signers[0]], - ); - this._logger.addItem("Request add guardian (relayed)", gasUsed); - } - - async estimateRevokeGuardianRelayed() { - const gasUsed = await this.relay( - this.GuardianManagerWrapper, - "revokeGuardian", - [this.walletAddress, this.accounts[1]], - this.wallet, - [this.signers[0]], - ); - this._logger.addItem("Request revoke guardian (relayed)", gasUsed); - } - - async estimateLockWalletDirect() { - const gasUsed = await this.LockManagerWrapper.estimate.lock(this.walletAddress, { from: this.firstGuardian }); - this._logger.addItem("Lock wallet (direct)", gasUsed); - } - - async estimateUnlockWalletDirect() { - // lock wallet - await this.LockManagerWrapper.lock(this.walletAddress, { from: this.firstGuardian }); - - // estimate unlock wallet - const gasUsed = await this.LockManagerWrapper.estimate.unlock(this.walletAddress, { from: this.firstGuardian }); - this._logger.addItem("Unlock wallet (direct)", gasUsed); - } - - async estimateLockWalletRelayed() { - // estimate lock wallet - const gasUsed = await this.relay( - this.LockManagerWrapper, - "lock", - [this.walletAddress], - this.wallet, - [this.firstGuardian], - ); - this._logger.addItem("Lock wallet (relayed)", gasUsed); - } - - async estimateUnlockWalletRelayed() { - // lock wallet - await this.relay(this.LockManagerWrapper, "lock", [this.walletAddress], this.wallet, [this.firstGuardian]); - - // estimate unlock wallet - const gasUsed = await this.relay(this.LockManagerWrapper, "unlock", - [this.walletAddress], this.wallet, [this.firstGuardian]); - this._logger.addItem("Unlock wallet (relayed)", gasUsed); - } - - async estimateExecuteRecoveryWithOneGuardian() { - // estimate execute recovery - const recoveryAddress = this.accounts[3]; - const gasUsed = await this.relay(this.RecoveryManagerWrapper, "executeRecovery", - [this.walletAddress, recoveryAddress], this.wallet, [this.firstGuardian]); - this._logger.addItem("Execute recovery", gasUsed); - } - - async estimateChangeLimitDirect() { - const gasUsed = await this.TransferManagerWrapper.estimate.changeLimit(this.walletAddress, 4000000); - this._logger.addItem("Change limit (direct)", gasUsed); - } - - async estimateChangeLimitRelayed() { - const gasUsed = await this.relay(this.TransferManagerWrapper, "changeLimit", - [this.walletAddress, 67000000], this.wallet, [this.signers[0]]); - this._logger.addItem("Change limit (relayed)", gasUsed); - } - - async estimateETHTransferNoLimitDirect() { - // disable limit - await this.TransferManagerWrapper.disableLimit(this.walletAddress); - await increaseTime(this.config.settings.securityPeriod + 1); - - // transfer - const gasUsed = await this.TransferManagerWrapper.estimate.transferToken( - this.walletAddress, ETH_TOKEN, this.accounts[1], 1000000, "0x", - ); - this._logger.addItem("ETH transfer, limit disabled (direct)", gasUsed); - } - - async estimateTransferNoLimitRelayed() { - // disable limit - await this.TransferManagerWrapper.disableLimit(this.walletAddress); - await increaseTime(this.config.settings.securityPeriod + 1); - - // transfer - const gasUsed = await this.relay( - this.TransferManagerWrapper, - "transferToken", - [this.walletAddress, ETH_TOKEN, this.accounts[1], 1000000, "0x"], - this.wallet, [this.signers[0]], - ); - this._logger.addItem("ETH transfer, limit disabled (relayed)", gasUsed); - } - - async estimateETHSmallTransferDirect() { - await this.TransferManagerWrapper.transferToken(this.walletAddress, ETH_TOKEN, this.accounts[5], 200, "0x"); - const gasUsed = await this.TransferManagerWrapper.estimate.transferToken( - this.walletAddress, ETH_TOKEN, this.accounts[5], 200, "0x", - ); - this._logger.addItem("ETH small transfer (direct)", gasUsed); - } - - async estimateSmallTransferRelayedNoRefund() { - const gasUsed = await this.relay( - this.TransferManagerWrapper, - "transferToken", - [this.walletAddress, ETH_TOKEN, this.accounts[1], 1000, "0x"], - this.wallet, - [this.signers[0]], - ); - this._logger.addItem("ETH small transfer No refund (relayed)", gasUsed); - } - - async estimateSmallTransferRelayedWithRefund() { - const nonce = await getNonceForRelay(); - const relayParams = [ - this.TransferManagerWrapper, - "transferToken", - [this.walletAddress, ETH_TOKEN, this.accounts[1], 1000, "0x"], - this.wallet, - [this.signers[0]], - this.accounts[9], - false, - 2000000, - nonce, - 10, - ETH_TOKEN]; - const txReceipt = await this.testManager.relay(...relayParams); - const gasUsed = await txReceipt.gasUsed.toString(); - - this._logger.addItem("ETH small transfer with ETH refund (relayed)", gasUsed); - } - - async estimateETHTransferToWhitelistedAccountDirect() { - await this.TransferManagerWrapper.addToWhitelist(this.walletAddress, this.accounts[3]); - await increaseTime(this.config.settings.securityPeriod + 1); - - const gasUsed = await this.TransferManagerWrapper.estimate.transferToken( - this.walletAddress, ETH_TOKEN, this.accounts[3], 2000000, "0x", - ); - this._logger.addItem("ETH transfer to whitelisted account (direct)", gasUsed); - } - - async estimateTransferToWhitelistedAccountRelayed() { - await this.TransferManagerWrapper.addToWhitelist(this.walletAddress, this.accounts[3]); - await increaseTime(this.config.settings.securityPeriod + 1); - - const gasUsed = await this.relay( - this.TransferManagerWrapper, - "transferToken", - [this.walletAddress, ETH_TOKEN, this.accounts[3], 2000000, "0x"], - this.wallet, - [this.signers[0]], - ); - this._logger.addItem("ETH transfer to whitelisted account (relayed)", gasUsed); - } - - async estimateETHLargeTransferToUntrustedAccount() { - const gasUsed = await this.TransferManagerWrapper.estimate.transferToken( - this.walletAddress, ETH_TOKEN, this.accounts[2], 2000000, "0x", - ); - this._logger.addItem("ETH large transfer to untrusted account", gasUsed); - } - - async estimateLargeTransferApprovalByOneGuardian() { - // estimate approve large transfer - const gasUsed = await this.relay( - this.ApprovedTransferWrapper, - "transferToken", - [this.walletAddress, ETH_TOKEN, this.accounts[3], 2000000, "0x"], - this.wallet, - [this.signers[0], this.signers[1]], - ); - this._logger.addItem("ETH large transfer approval by one guardian", gasUsed); - } - - async estimateLargeTransferApprovalByTwoGuardians() { - // add 2 more guardians - await this.GuardianManagerWrapper.addGuardian(this.walletAddress, this.accounts[2]); - await this.GuardianManagerWrapper.addGuardian(this.walletAddress, this.accounts[3]); - - await increaseTime(this.config.settings.securityPeriod + this.config.settings.securityWindow / 2); - - await this.GuardianManagerWrapper.confirmGuardianAddition(this.walletAddress, this.accounts[2]); - await this.GuardianManagerWrapper.confirmGuardianAddition(this.walletAddress, this.accounts[3]); - - // estimate approve large transfer - const signers = [this.signers[0], this.signers[1], this.signers[2]]; - const gasUsed = await this.relay( - this.ApprovedTransferWrapper, - "transferToken", - [this.walletAddress, ETH_TOKEN, this.accounts[5], 2000000, "0x"], - this.wallet, - signers, - ); - this._logger.addItem("ETH large transfer approval by two guardians", gasUsed); - } - - async estimateUpgradeWalletAllFeatures() { - await this.testUpgradeAllFeatures(); - } - - // /////////////////// - // //// utils //////// - // /////////////////// - - async relay(target, method, params, wallet, signers) { - const txReceipt = await this.testManager.relay(target, method, params, wallet, signers, this.accounts[9], false); - return txReceipt.gasUsed.toString(); - } - - getAllEstimateMethods() { - let props = []; - let obj = this; - - do { - props = props.concat(Object.getOwnPropertyNames(obj)); - obj = Object.getPrototypeOf(obj); - } while (obj); - - return props.filter((prop) => prop.startsWith("estimate")); - } - - async output() { - await this._logger.loadData(); - return this._logger.output(); - } -} - -const deploy = async (network) => { - const benchmark = new Benchmark(network); - await benchmark.setup(); - let methods = benchmark.getAllEstimateMethods(); - const argvMethods = process.argv.filter((x) => x.startsWith("estimate")); - if (argvMethods.length > 0) { - methods = methods.filter((method) => argvMethods.indexOf(method) >= 0); - } - - for (let index = 0; index < methods.length; index += 1) { - const method = methods[index]; - console.log(`Running ${method}...`); - await benchmark.setupWallet(); - await benchmark[method](); - } - - const output = await benchmark.output(); - console.log(output); -}; - -module.exports = { - deploy, -}; From 39aa7c147cc3efbf699f3f4f9065d231577090a2 Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Sat, 7 Nov 2020 09:15:34 +0200 Subject: [PATCH 077/113] Package updates --- package-lock.json | 2475 ++++++++++++++++++++++++++++----------------- package.json | 47 +- 2 files changed, 1554 insertions(+), 968 deletions(-) diff --git a/package-lock.json b/package-lock.json index f263b14fa..8d5b0abd8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,32 +14,37 @@ "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==", + "dev": true, "requires": { "@babel/highlight": "^7.10.4" } }, "@babel/helper-module-imports": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.12.1.tgz", - "integrity": "sha512-ZeC1TlMSvikvJNy1v/wPIazCu3NdOwgYZLIkmIyAsGhqkNpiDoQQRmaCK8YP4Pq3GPTLPV9WXaPCJKvx06JxKA==", + "version": "7.12.5", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.12.5.tgz", + "integrity": "sha512-SR713Ogqg6++uexFRORf/+nPXMmWIn80TALu0uaFb+iQIUoR7bOC7zBWyzBs5b3tBBJXuyD0cRu1F15GyzjOWA==", + "dev": true, "requires": { - "@babel/types": "^7.12.1" + "@babel/types": "^7.12.5" } }, "@babel/helper-plugin-utils": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", - "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==" + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==", + "dev": true }, "@babel/helper-validator-identifier": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz", - "integrity": "sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw==" + "integrity": "sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw==", + "dev": true }, "@babel/highlight": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz", "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==", + "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.10.4", "chalk": "^2.0.0", @@ -50,6 +55,7 @@ "version": "7.12.1", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.12.1.tgz", "integrity": "sha512-Ac/H6G9FEIkS2tXsZjL4RAdS3L3WHxci0usAnz7laPWUmFiGtj7tIASChqKZMHTSQTQY6xDbOq+V1/vIq3QrWg==", + "dev": true, "requires": { "@babel/helper-module-imports": "^7.12.1", "@babel/helper-plugin-utils": "^7.10.4", @@ -61,6 +67,7 @@ "version": "1.18.1", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.18.1.tgz", "integrity": "sha512-lDfCPaMKfOJXjy0dPayzPdF1phampNWr3qFCjAu+rw/qbQmr5jWH5xN2hwh9QKfw9E5v4hwV7A+jrCmL8yjjqA==", + "dev": true, "requires": { "is-core-module": "^2.0.0", "path-parse": "^1.0.6" @@ -69,33 +76,29 @@ "semver": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true } } }, "@babel/runtime": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.1.tgz", - "integrity": "sha512-J5AIf3vPj3UwXaAzb5j1xM4WAQDX3EMgemF8rjCP3SoW09LfRKAXQKt6CoVYl230P6iWdRcBbnLDDdnqWxZSCA==", + "version": "7.12.5", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.5.tgz", + "integrity": "sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg==", + "dev": true, "requires": { "regenerator-runtime": "^0.13.4" } }, "@babel/types": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.1.tgz", - "integrity": "sha512-BzSY3NJBKM4kyatSOWh3D/JJ2O3CVzBybHWxtgxnggaxEuaSTTDqeiSb/xk9lrkw2Tbqyivw5ZU4rT+EfznQsA==", + "version": "7.12.6", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.6.tgz", + "integrity": "sha512-hwyjw6GvjBLiyy3W0YQf0Z5Zf4NpYejUnKFcfcUhZCSffoBBp30w6wP2Wn6pk31jMYZvcOrB/1b7cGXvEoKogA==", + "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.10.4", "lodash": "^4.17.19", "to-fast-properties": "^2.0.0" - }, - "dependencies": { - "lodash": { - "version": "4.17.20", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", - "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==" - } } }, "@codechecks/client": { @@ -254,9 +257,9 @@ } }, "@eslint/eslintrc": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.1.3.tgz", - "integrity": "sha512-4YVwPkANLeNtRjMekzux1ci8hIaH5eGKktGqR0d3LWsKNn5B2X/1Z6Trxy7jQXl9EBGE6Yj02O+t09FMeRllaA==", + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.2.1.tgz", + "integrity": "sha512-XRUeBZ5zBWLYgSANMpThFddrZZkEbGHgUdt5UJjZfnlN9BGCiUBrf+nvbRupSjMvqzwnQN0qwCmOxITt1cfywA==", "dev": true, "requires": { "ajv": "^6.12.4", @@ -297,12 +300,6 @@ "type-fest": "^0.8.1" } }, - "lodash": { - "version": "4.17.20", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", - "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", - "dev": true - }, "strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", @@ -539,9 +536,9 @@ } }, "@ethersproject/providers": { - "version": "5.0.13", - "resolved": "https://registry.npmjs.org/@ethersproject/providers/-/providers-5.0.13.tgz", - "integrity": "sha512-5jsuk1FwXxmoQApGs8LSQyS43KP01pHA+6cQ1OPov5pT5Pcqe6ffh6UD1//BZ9Vjf+5e9AQqIk8w7FkGyROuCA==", + "version": "5.0.14", + "resolved": "https://registry.npmjs.org/@ethersproject/providers/-/providers-5.0.14.tgz", + "integrity": "sha512-K9QRRkkHWyprm3g4L8U9aPx5uyivznL4RYemkN2shCQumyGqFJ5SO+OtQrgebVm0JpGwFAUGugnhRUh49sjErw==", "requires": { "@ethersproject/abstract-provider": "^5.0.4", "@ethersproject/abstract-signer": "^5.0.4", @@ -663,9 +660,9 @@ } }, "@ethersproject/wallet": { - "version": "5.0.6", - "resolved": "https://registry.npmjs.org/@ethersproject/wallet/-/wallet-5.0.6.tgz", - "integrity": "sha512-dRqx3+Degc5pvjaeeTHuk2EuTRM3b6ce/TiV0HRZhRXYnKyyjg0iYXEZo/b6p3rnV+Xhwxkc0+I/ISPkNpictA==", + "version": "5.0.7", + "resolved": "https://registry.npmjs.org/@ethersproject/wallet/-/wallet-5.0.7.tgz", + "integrity": "sha512-n2GX1+2Tc0qV8dguUcLkjNugINKvZY7u/5fEsn0skW9rz5+jHTR5IKMV6jSfXA+WjQT8UCNMvkI3CNcdhaPbTQ==", "requires": { "@ethersproject/abstract-provider": "^5.0.4", "@ethersproject/abstract-signer": "^5.0.4", @@ -742,17 +739,20 @@ "@sindresorhus/is": { "version": "0.14.0", "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", - "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==" + "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==", + "dev": true }, "@solidity-parser/parser": { "version": "0.8.1", "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.8.1.tgz", - "integrity": "sha512-DF7H6T8I4lo2IZOE2NZwt3631T8j1gjpQLjmvY2xBNK50c4ltslR4XPKwT6RkeSd4+xCAK0GHC/k7sbRDBE4Yw==" + "integrity": "sha512-DF7H6T8I4lo2IZOE2NZwt3631T8j1gjpQLjmvY2xBNK50c4ltslR4XPKwT6RkeSd4+xCAK0GHC/k7sbRDBE4Yw==", + "dev": true }, "@szmarczak/http-timer": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz", "integrity": "sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==", + "dev": true, "requires": { "defer-to-connect": "^1.0.1" } @@ -764,9 +764,10 @@ "dev": true }, "@truffle/hdwallet-provider": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@truffle/hdwallet-provider/-/hdwallet-provider-1.1.1.tgz", - "integrity": "sha512-Gw5lk2dUs6NhLcaF49FuuL3Qv1Setpgr9uUhf7voIS/1OD4ar2CW9Zv7QJiR5m0PD/b8SUqbIckq0evY4Mendg==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@truffle/hdwallet-provider/-/hdwallet-provider-1.2.0.tgz", + "integrity": "sha512-EPatDbyRuGbB/MLt9ZBokmtjyLjaNpuHfUIWuv4mQMrH1Nu82H5AAZYLh4Z1BZliDZpqB03a0yUMmK/4R0BN9g==", + "dev": true, "requires": { "@trufflesuite/web3-provider-engine": "15.0.13-1", "@types/web3": "^1.0.20", @@ -783,17 +784,20 @@ "bn.js": { "version": "4.11.9", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", + "dev": true }, "ethereum-common": { "version": "0.0.18", "resolved": "https://registry.npmjs.org/ethereum-common/-/ethereum-common-0.0.18.tgz", - "integrity": "sha1-L9w1dvIykDNYl26znaeDIT/5Uj8=" + "integrity": "sha1-L9w1dvIykDNYl26znaeDIT/5Uj8=", + "dev": true }, "ethereumjs-tx": { "version": "1.3.7", "resolved": "https://registry.npmjs.org/ethereumjs-tx/-/ethereumjs-tx-1.3.7.tgz", "integrity": "sha512-wvLMxzt1RPhAQ9Yi3/HKZTn0FZYpnsmQdbKYfUUpi4j1SEIcbkd9tndVjcPrufY3V7j2IebOpC00Zp2P/Ay2kA==", + "dev": true, "requires": { "ethereum-common": "^0.0.18", "ethereumjs-util": "^5.0.0" @@ -803,6 +807,7 @@ "version": "5.2.1", "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz", "integrity": "sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ==", + "dev": true, "requires": { "bn.js": "^4.11.0", "create-hash": "^1.1.2", @@ -819,6 +824,7 @@ "version": "6.2.1", "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz", "integrity": "sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw==", + "dev": true, "requires": { "@types/bn.js": "^4.11.3", "bn.js": "^4.11.0", @@ -1971,6 +1977,7 @@ "version": "4.1.2-1", "resolved": "https://registry.npmjs.org/@trufflesuite/eth-json-rpc-filters/-/eth-json-rpc-filters-4.1.2-1.tgz", "integrity": "sha512-/MChvC5dw2ck9NU1cZmdovCz2VKbOeIyR4tcxDvA5sT+NaL0rA2/R5U0yI7zsbo1zD+pgqav77rQHTzpUdDNJQ==", + "dev": true, "requires": { "@trufflesuite/eth-json-rpc-middleware": "^4.4.2-0", "await-semaphore": "^0.1.3", @@ -1984,6 +1991,7 @@ "version": "4.0.3-0", "resolved": "https://registry.npmjs.org/@trufflesuite/eth-json-rpc-infura/-/eth-json-rpc-infura-4.0.3-0.tgz", "integrity": "sha512-xaUanOmo0YLqRsL0SfXpFienhdw5bpQ1WEXxMTRi57az4lwpZBv4tFUDvcerdwJrxX9wQqNmgUgd1BrR01dumw==", + "dev": true, "requires": { "@trufflesuite/eth-json-rpc-middleware": "^4.4.2-1", "cross-fetch": "^2.1.1", @@ -1995,6 +2003,7 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/eth-json-rpc-errors/-/eth-json-rpc-errors-1.1.1.tgz", "integrity": "sha512-WT5shJ5KfNqHi9jOZD+ID8I1kuYWNrigtZat7GOQkvwo99f8SzAVaEcWhJUv656WiZOAg3P1RiJQANtUmDmbIg==", + "dev": true, "requires": { "fast-safe-stringify": "^2.0.6" } @@ -2005,6 +2014,7 @@ "version": "4.4.2-1", "resolved": "https://registry.npmjs.org/@trufflesuite/eth-json-rpc-middleware/-/eth-json-rpc-middleware-4.4.2-1.tgz", "integrity": "sha512-iEy9H8ja7/8aYES5HfrepGBKU9n/Y4OabBJEklVd/zIBlhCCBAWBqkIZgXt11nBXO/rYAeKwYuE3puH3ByYnLA==", + "dev": true, "requires": { "@trufflesuite/eth-sig-util": "^1.4.2", "btoa": "^1.2.1", @@ -2025,12 +2035,14 @@ "bn.js": { "version": "4.11.9", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", + "dev": true }, "eth-json-rpc-errors": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/eth-json-rpc-errors/-/eth-json-rpc-errors-1.1.1.tgz", "integrity": "sha512-WT5shJ5KfNqHi9jOZD+ID8I1kuYWNrigtZat7GOQkvwo99f8SzAVaEcWhJUv656WiZOAg3P1RiJQANtUmDmbIg==", + "dev": true, "requires": { "fast-safe-stringify": "^2.0.6" } @@ -2038,12 +2050,14 @@ "ethereum-common": { "version": "0.0.18", "resolved": "https://registry.npmjs.org/ethereum-common/-/ethereum-common-0.0.18.tgz", - "integrity": "sha1-L9w1dvIykDNYl26znaeDIT/5Uj8=" + "integrity": "sha1-L9w1dvIykDNYl26znaeDIT/5Uj8=", + "dev": true }, "ethereumjs-tx": { "version": "1.3.7", "resolved": "https://registry.npmjs.org/ethereumjs-tx/-/ethereumjs-tx-1.3.7.tgz", "integrity": "sha512-wvLMxzt1RPhAQ9Yi3/HKZTn0FZYpnsmQdbKYfUUpi4j1SEIcbkd9tndVjcPrufY3V7j2IebOpC00Zp2P/Ay2kA==", + "dev": true, "requires": { "ethereum-common": "^0.0.18", "ethereumjs-util": "^5.0.0" @@ -2053,6 +2067,7 @@ "version": "5.2.1", "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz", "integrity": "sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ==", + "dev": true, "requires": { "bn.js": "^4.11.0", "create-hash": "^1.1.2", @@ -2066,7 +2081,8 @@ "pify": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true } } }, @@ -2074,6 +2090,7 @@ "version": "1.4.2", "resolved": "https://registry.npmjs.org/@trufflesuite/eth-sig-util/-/eth-sig-util-1.4.2.tgz", "integrity": "sha512-+GyfN6b0LNW77hbQlH3ufZ/1eCON7mMrGym6tdYf7xiNw9Vv3jBO72bmmos1EId2NgBvPMhmYYm6DSLQFTmzrA==", + "dev": true, "requires": { "ethereumjs-abi": "^0.6.8", "ethereumjs-util": "^5.1.1" @@ -2082,12 +2099,14 @@ "bn.js": { "version": "4.11.9", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", + "dev": true }, "ethereumjs-util": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz", "integrity": "sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ==", + "dev": true, "requires": { "bn.js": "^4.11.0", "create-hash": "^1.1.2", @@ -2104,6 +2123,7 @@ "version": "15.0.13-1", "resolved": "https://registry.npmjs.org/@trufflesuite/web3-provider-engine/-/web3-provider-engine-15.0.13-1.tgz", "integrity": "sha512-6u3x/iIN5fyj8pib5QTUDmIOUiwAGhaqdSTXdqCu6v9zo2BEwdCqgEJd1uXDh3DBmPRDfiZ/ge8oUPy7LerpHg==", + "dev": true, "requires": { "@trufflesuite/eth-json-rpc-filters": "^4.1.2-1", "@trufflesuite/eth-json-rpc-infura": "^4.0.3-0", @@ -2133,6 +2153,7 @@ "version": "2.6.3", "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", + "dev": true, "requires": { "lodash": "^4.17.14" } @@ -2140,17 +2161,20 @@ "bn.js": { "version": "4.11.9", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", + "dev": true }, "ethereum-common": { "version": "0.0.18", "resolved": "https://registry.npmjs.org/ethereum-common/-/ethereum-common-0.0.18.tgz", - "integrity": "sha1-L9w1dvIykDNYl26znaeDIT/5Uj8=" + "integrity": "sha1-L9w1dvIykDNYl26znaeDIT/5Uj8=", + "dev": true }, "ethereumjs-tx": { "version": "1.3.7", "resolved": "https://registry.npmjs.org/ethereumjs-tx/-/ethereumjs-tx-1.3.7.tgz", "integrity": "sha512-wvLMxzt1RPhAQ9Yi3/HKZTn0FZYpnsmQdbKYfUUpi4j1SEIcbkd9tndVjcPrufY3V7j2IebOpC00Zp2P/Ay2kA==", + "dev": true, "requires": { "ethereum-common": "^0.0.18", "ethereumjs-util": "^5.0.0" @@ -2160,6 +2184,7 @@ "version": "5.2.1", "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz", "integrity": "sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ==", + "dev": true, "requires": { "bn.js": "^4.11.0", "create-hash": "^1.1.2", @@ -2170,15 +2195,11 @@ "safe-buffer": "^5.1.1" } }, - "lodash": { - "version": "4.17.20", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", - "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==" - }, "readable-stream": { "version": "2.3.7", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, "requires": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", @@ -2192,7 +2213,8 @@ "safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true } } }, @@ -2200,6 +2222,7 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, "requires": { "safe-buffer": "~5.1.0" }, @@ -2207,7 +2230,8 @@ "safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true } } }, @@ -2215,6 +2239,7 @@ "version": "5.2.2", "resolved": "https://registry.npmjs.org/ws/-/ws-5.2.2.tgz", "integrity": "sha512-jaHFD6PFv6UgoIVda6qZllptQsMlDEJkTQcybzzXDYM1XO9Y8em691FGMPmM46WGyLU4z9KMgQN+qrux/nhlHA==", + "dev": true, "requires": { "async-limiter": "~1.0.0" } @@ -2225,6 +2250,7 @@ "version": "4.11.6", "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-4.11.6.tgz", "integrity": "sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg==", + "dev": true, "requires": { "@types/node": "*" } @@ -2272,17 +2298,20 @@ "@types/node": { "version": "14.11.11", "resolved": "https://registry.npmjs.org/@types/node/-/node-14.11.11.tgz", - "integrity": "sha512-UcaAZrL8uO5GNS+NLxkYg1RiOMgdLxCXGqs+TTupltXN8rTvUEKTOpqCV3tlcAIZJXzcBQajzmjdrvuPvnuMUw==" + "integrity": "sha512-UcaAZrL8uO5GNS+NLxkYg1RiOMgdLxCXGqs+TTupltXN8rTvUEKTOpqCV3tlcAIZJXzcBQajzmjdrvuPvnuMUw==", + "dev": true }, "@types/parse-json": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==" + "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==", + "dev": true }, "@types/pbkdf2": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/@types/pbkdf2/-/pbkdf2-3.1.0.tgz", "integrity": "sha512-Cf63Rv7jCQ0LaL8tNXmEyqTHuIJxRdlS5vMh1mj5voN4+QFhVZnlZruezqpWYDiJ8UTzhP0VmeLXCmBk66YrMQ==", + "dev": true, "requires": { "@types/node": "*" } @@ -2297,6 +2326,7 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/@types/secp256k1/-/secp256k1-4.0.1.tgz", "integrity": "sha512-+ZjSA8ELlOp8SlKi0YLB2tz9d5iPNEmOBd+8Rz21wTMdaXQIa9b6TEnD6l5qKOCypE7FSyPyck12qZJxSDNoog==", + "dev": true, "requires": { "@types/node": "*" } @@ -2305,6 +2335,7 @@ "version": "1.2.2", "resolved": "https://registry.npmjs.org/@types/web3/-/web3-1.2.2.tgz", "integrity": "sha512-eFiYJKggNrOl0nsD+9cMh2MLk4zVBfXfGnVeRFbpiZzBE20eet4KLA3fXcjSuHaBn0RnQzwLAGdgzgzdet4C0A==", + "dev": true, "requires": { "web3": "*" } @@ -2322,12 +2353,14 @@ "abbrev": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz", - "integrity": "sha1-kbR5JYinc4wl813W9jdSovh3YTU=" + "integrity": "sha1-kbR5JYinc4wl813W9jdSovh3YTU=", + "dev": true }, "abstract-leveldown": { "version": "2.6.3", "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-2.6.3.tgz", "integrity": "sha512-2++wDf/DYqkPR3o5tbfdhF96EfMApo1GpPfzOsR/ZYXdkSmELlvOOEAl9iKkRsktMPHdGjO4rtkBpf2I7TiTeA==", + "dev": true, "requires": { "xtend": "~4.0.0" } @@ -2336,6 +2369,7 @@ "version": "1.3.7", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", + "dev": true, "requires": { "mime-types": "~2.1.24", "negotiator": "0.6.2" @@ -2344,12 +2378,14 @@ "acorn": { "version": "6.4.2", "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.2.tgz", - "integrity": "sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ==" + "integrity": "sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ==", + "dev": true }, "acorn-jsx": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.1.tgz", - "integrity": "sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng==" + "integrity": "sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng==", + "dev": true }, "address": { "version": "1.1.2", @@ -2366,6 +2402,7 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", + "dev": true, "requires": { "clean-stack": "^2.0.0", "indent-string": "^4.0.0" @@ -2386,12 +2423,14 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", + "dev": true, "optional": true }, "ansi-colors": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==" + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "dev": true }, "ansi-escapes": { "version": "4.3.1", @@ -2404,12 +2443,14 @@ "ansi-regex": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true }, "ansi-styles": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, "requires": { "color-convert": "^1.9.0" } @@ -2423,17 +2464,20 @@ "antlr4": { "version": "4.7.1", "resolved": "https://registry.npmjs.org/antlr4/-/antlr4-4.7.1.tgz", - "integrity": "sha512-haHyTW7Y9joE5MVs37P2lNYfU2RWBLfcRDD8OWldcdZm5TiCE91B5Xl1oWSwiDUSd4rlExpt2pu1fksYQjRBYQ==" + "integrity": "sha512-haHyTW7Y9joE5MVs37P2lNYfU2RWBLfcRDD8OWldcdZm5TiCE91B5Xl1oWSwiDUSd4rlExpt2pu1fksYQjRBYQ==", + "dev": true }, "any-promise": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", - "integrity": "sha1-q8av7tzqUugJzcA3au0845Y10X8=" + "integrity": "sha1-q8av7tzqUugJzcA3au0845Y10X8=", + "dev": true }, "anymatch": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==", + "dev": true, "requires": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" @@ -2442,7 +2486,8 @@ "app-module-path": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/app-module-path/-/app-module-path-2.2.0.tgz", - "integrity": "sha1-ZBqlXft9am8KgUHEucCqULbCTdU=" + "integrity": "sha1-ZBqlXft9am8KgUHEucCqULbCTdU=", + "dev": true }, "arg": { "version": "4.1.3", @@ -2454,6 +2499,7 @@ "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, "requires": { "sprintf-js": "~1.0.2" } @@ -2461,7 +2507,8 @@ "array-flatten": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" + "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=", + "dev": true }, "array-includes": { "version": "3.1.1", @@ -2494,6 +2541,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/array.prototype.map/-/array.prototype.map-1.0.2.tgz", "integrity": "sha512-Az3OYxgsa1g7xDYp86l0nnN4bcmuEITGe1rbdEBVkrqkzMgDcbdQ2R7r41pNzti+4NMces3H8gMmuioZUilLgw==", + "dev": true, "requires": { "define-properties": "^1.1.3", "es-abstract": "^1.17.0-next.1", @@ -2511,6 +2559,7 @@ "version": "0.2.4", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", + "dev": true, "requires": { "safer-buffer": "~2.1.0" } @@ -2519,6 +2568,7 @@ "version": "5.4.1", "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.4.1.tgz", "integrity": "sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==", + "dev": true, "requires": { "bn.js": "^4.0.0", "inherits": "^2.0.1", @@ -2529,48 +2579,46 @@ "bn.js": { "version": "4.11.9", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", + "dev": true } } }, "assert-plus": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true }, "assertion-error": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", - "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==" - }, - "assured": { - "version": "1.0.15", - "resolved": "https://registry.npmjs.org/assured/-/assured-1.0.15.tgz", - "integrity": "sha512-EVb4T+6m5VdlTJ6gbv4WjBM1rHfzXP2BspsQ6VLswcnIQSabjJy7A9YEuG4/KmfF+9OEuT5xhqVJ+V1tClD5ww==", - "requires": { - "noop6": "^1.0.1", - "sliced": "^1.0.1" - } + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", + "dev": true }, "ast-parents": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/ast-parents/-/ast-parents-0.0.1.tgz", - "integrity": "sha1-UI/Q8F0MSHddnszaLhdEIyYejdM=" + "integrity": "sha1-UI/Q8F0MSHddnszaLhdEIyYejdM=", + "dev": true }, "astral-regex": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", - "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==" + "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", + "dev": true }, "async": { "version": "1.5.2", "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=" + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", + "dev": true }, "async-eventemitter": { "version": "0.2.4", "resolved": "https://registry.npmjs.org/async-eventemitter/-/async-eventemitter-0.2.4.tgz", "integrity": "sha512-pd20BwL7Yt1zwDFy+8MX8F1+WCT8aQeKj0kQnTrH9WaeRETlRamVhD0JtRPmrV4GfOJ2F9CvdQkZeZhnh2TuHw==", + "dev": true, "requires": { "async": "^2.4.0" }, @@ -2579,36 +2627,35 @@ "version": "2.6.3", "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", + "dev": true, "requires": { "lodash": "^4.17.14" } - }, - "lodash": { - "version": "4.17.20", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", - "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==" } } }, "async-limiter": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz", - "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==" + "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==", + "dev": true }, "asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "dev": true }, "await-semaphore": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/await-semaphore/-/await-semaphore-0.1.3.tgz", - "integrity": "sha512-d1W2aNSYcz/sxYO4pMGX9vq65qOTu0P800epMud+6cYYX0QcT7zyqcxec3VWzpgvdXo57UWmVbZpLMjX2m1I7Q==" + "integrity": "sha512-d1W2aNSYcz/sxYO4pMGX9vq65qOTu0P800epMud+6cYYX0QcT7zyqcxec3VWzpgvdXo57UWmVbZpLMjX2m1I7Q==", + "dev": true }, "aws-sdk": { - "version": "2.774.0", - "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.774.0.tgz", - "integrity": "sha512-3a/fM1E3nCPwT4AVbysOWCMmsu/TOdJDD3urjywWE/qO1JShxRwLSdRLD1xRkacR9JcnydfkmdU0qk+VsM3nqg==", + "version": "2.787.0", + "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.787.0.tgz", + "integrity": "sha512-3WlUdWqUB8Vhdvj/7TENr/7SEmQzxmnHxOJ8l2WjZbcMRSuI0/9Ym4p1TC3hf21VDVDhkdGlw60QqpZQ1qb+Mg==", "requires": { "buffer": "4.9.2", "events": "1.1.1", @@ -2624,12 +2671,14 @@ "aws-sign2": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", + "dev": true }, "aws4": { "version": "1.10.1", "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.10.1.tgz", - "integrity": "sha512-zg7Hz2k5lI8kb7U32998pRRFin7zJlkfezGJjUc2heaD4Pw2wObakCDVzkKztTm/Ln7eiVvYsjqak0Ed4LkMDA==" + "integrity": "sha512-zg7Hz2k5lI8kb7U32998pRRFin7zJlkfezGJjUc2heaD4Pw2wObakCDVzkKztTm/Ln7eiVvYsjqak0Ed4LkMDA==", + "dev": true }, "axios": { "version": "0.19.2", @@ -2670,6 +2719,7 @@ "version": "2.5.0", "resolved": "https://registry.npmjs.org/backoff/-/backoff-2.5.0.tgz", "integrity": "sha1-9hbtqdPktmuMp/ynn2lXIsX44m8=", + "dev": true, "requires": { "precond": "0.2" } @@ -2677,12 +2727,14 @@ "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true }, "base-x": { "version": "3.0.8", "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.8.tgz", "integrity": "sha512-Rl/1AWP4J/zRrk54hhlxH4drNxPJXYUaKffODVI53/dAsV4t9fBxyxYKAVPU1XBHxYwOWP9h9H0hM2MVw4YfJA==", + "dev": true, "requires": { "safe-buffer": "^5.0.1" } @@ -2696,6 +2748,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "dev": true, "requires": { "tweetnacl": "^0.14.3" } @@ -2708,17 +2761,20 @@ "bignumber.js": { "version": "9.0.1", "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.1.tgz", - "integrity": "sha512-IdZR9mh6ahOBv/hYGiXyVuyCetmGJhtYkqLBpTStdhEGjegpPlUawydyaF3pbIOFynJTpllEs+NP+CS9jKFLjA==" + "integrity": "sha512-IdZR9mh6ahOBv/hYGiXyVuyCetmGJhtYkqLBpTStdhEGjegpPlUawydyaF3pbIOFynJTpllEs+NP+CS9jKFLjA==", + "dev": true }, "binary-extensions": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.1.0.tgz", - "integrity": "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==" + "integrity": "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==", + "dev": true }, "bindings": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "dev": true, "requires": { "file-uri-to-path": "1.0.0" } @@ -2787,27 +2843,32 @@ "blakejs": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/blakejs/-/blakejs-1.1.0.tgz", - "integrity": "sha1-ad+S75U6qIylGjLfarHFShVfx6U=" + "integrity": "sha1-ad+S75U6qIylGjLfarHFShVfx6U=", + "dev": true }, "bluebird": { "version": "3.7.2", "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", - "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==" + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", + "dev": true }, "bn-chai": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/bn-chai/-/bn-chai-1.0.1.tgz", - "integrity": "sha512-7rJXt21DwYiLLpvzLaACixBBoUGkRV1iuFD3wElEhw8Ji9IiY/QsJRtvW+c7ChRgEOyLQkGaSGFUUqBKm21SNA==" + "integrity": "sha512-7rJXt21DwYiLLpvzLaACixBBoUGkRV1iuFD3wElEhw8Ji9IiY/QsJRtvW+c7ChRgEOyLQkGaSGFUUqBKm21SNA==", + "dev": true }, "bn.js": { "version": "5.1.3", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.1.3.tgz", - "integrity": "sha512-GkTiFpjFtUzU9CbMeJ5iazkCzGL3jrhzerzZIuqLABjbwRaFt33I9tUdSNryIptM+RxDet6OKm2WnLXzW51KsQ==" + "integrity": "sha512-GkTiFpjFtUzU9CbMeJ5iazkCzGL3jrhzerzZIuqLABjbwRaFt33I9tUdSNryIptM+RxDet6OKm2WnLXzW51KsQ==", + "dev": true }, "body-parser": { "version": "1.19.0", "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==", + "dev": true, "requires": { "bytes": "3.1.0", "content-type": "~1.0.4", @@ -2825,6 +2886,7 @@ "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, "requires": { "ms": "2.0.0" } @@ -2832,7 +2894,8 @@ "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true } } }, @@ -2840,6 +2903,7 @@ "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -2849,6 +2913,7 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, "requires": { "fill-range": "^7.0.1" } @@ -2861,12 +2926,14 @@ "browser-stdout": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", - "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==" + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "dev": true }, "browserify-aes": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", + "dev": true, "requires": { "buffer-xor": "^1.0.3", "cipher-base": "^1.0.0", @@ -2880,6 +2947,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", + "dev": true, "requires": { "browserify-aes": "^1.0.4", "browserify-des": "^1.0.0", @@ -2890,6 +2958,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", + "dev": true, "requires": { "cipher-base": "^1.0.1", "des.js": "^1.0.0", @@ -2901,6 +2970,7 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", + "dev": true, "requires": { "bn.js": "^4.1.0", "randombytes": "^2.0.1" @@ -2909,7 +2979,8 @@ "bn.js": { "version": "4.11.9", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", + "dev": true } } }, @@ -2917,6 +2988,7 @@ "version": "4.2.1", "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.1.tgz", "integrity": "sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg==", + "dev": true, "requires": { "bn.js": "^5.1.1", "browserify-rsa": "^4.0.1", @@ -2933,6 +3005,7 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", "integrity": "sha1-vhYedsNU9veIrkBx9j806MTwpCo=", + "dev": true, "requires": { "base-x": "^3.0.2" } @@ -2941,6 +3014,7 @@ "version": "2.1.2", "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-2.1.2.tgz", "integrity": "sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==", + "dev": true, "requires": { "bs58": "^4.0.0", "create-hash": "^1.1.0", @@ -2950,7 +3024,8 @@ "btoa": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/btoa/-/btoa-1.2.1.tgz", - "integrity": "sha512-SB4/MIGlsiVkMcHmT+pSmIPoNDoHg+7cMzmt3Uxt628MTz2487DKSqK/fuhFBrkuqrYv5UCEnACpF4dTFNKc/g==" + "integrity": "sha512-SB4/MIGlsiVkMcHmT+pSmIPoNDoHg+7cMzmt3Uxt628MTz2487DKSqK/fuhFBrkuqrYv5UCEnACpF4dTFNKc/g==", + "dev": true }, "buffer": { "version": "4.9.2", @@ -2993,42 +3068,41 @@ "buffer-from": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", - "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==" + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", + "dev": true }, "buffer-to-arraybuffer": { "version": "0.0.5", "resolved": "https://registry.npmjs.org/buffer-to-arraybuffer/-/buffer-to-arraybuffer-0.0.5.tgz", - "integrity": "sha1-YGSkD6dutDxyOrqe+PbhIW0QURo=" + "integrity": "sha1-YGSkD6dutDxyOrqe+PbhIW0QURo=", + "dev": true }, "buffer-xor": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", - "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=" + "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", + "dev": true }, "bufferutil": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.1.tgz", - "integrity": "sha512-xowrxvpxojqkagPcWRQVXZl0YXhRhAtBEIq3VoER1NH5Mw1n1o0ojdspp+GS2J//2gCVyrzQDApQ4unGF+QOoA==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.2.tgz", + "integrity": "sha512-AtnG3W6M8B2n4xDQ5R+70EXvOpnXsFYg/AK2yTZd+HQ/oxAdz+GI+DvjmhBw3L0ole+LJ0ngqY4JMbDzkfNzhA==", + "dev": true, "requires": { - "node-gyp-build": "~3.7.0" - }, - "dependencies": { - "node-gyp-build": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-3.7.0.tgz", - "integrity": "sha512-L/Eg02Epx6Si2NXmedx+Okg+4UHqmaf3TNcxd50SF9NQGcJaON3AtU++kax69XV7YWz4tUspqZSAsVofhFKG2w==" - } + "node-gyp-build": "^4.2.0" } }, "bytes": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", - "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==" + "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==", + "dev": true }, "cacheable-request": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz", "integrity": "sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==", + "dev": true, "requires": { "clone-response": "^1.0.2", "get-stream": "^5.1.0", @@ -3042,14 +3116,26 @@ "lowercase-keys": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", - "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==" + "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", + "dev": true } } }, + "call-bind": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.0.tgz", + "integrity": "sha512-AEXsYIyyDY3MCzbwdhzG3Jx1R0J2wetQyUynn6dYHAO+bg8l1k7jwZtRv4ryryFs7EP+NDlikJlVe59jr0cM2w==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.0" + } + }, "caller-callsite": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/caller-callsite/-/caller-callsite-2.0.0.tgz", "integrity": "sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ=", + "dev": true, "requires": { "callsites": "^2.0.0" }, @@ -3057,7 +3143,8 @@ "callsites": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz", - "integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=" + "integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=", + "dev": true } } }, @@ -3065,6 +3152,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-2.0.0.tgz", "integrity": "sha1-Ro+DBE42mrIBD6xfBs7uFbsssfQ=", + "dev": true, "requires": { "caller-callsite": "^2.0.0" } @@ -3072,12 +3160,14 @@ "callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==" + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true }, "camelcase": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true }, "cardinal": { "version": "2.1.1", @@ -3092,12 +3182,14 @@ "caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", + "dev": true }, "chai": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/chai/-/chai-4.2.0.tgz", "integrity": "sha512-XQU3bhBukrOsQCuwZndwGcCVQHyZi53fQ6Ys1Fym7E4olpIqqZZhhoFJoaKVvV17lWQoXYwgWN2nF5crA8J2jw==", + "dev": true, "requires": { "assertion-error": "^1.1.0", "check-error": "^1.0.2", @@ -3111,6 +3203,7 @@ "version": "2.4.1", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, "requires": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", @@ -3131,12 +3224,14 @@ "check-error": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", - "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=" + "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", + "dev": true }, "checkpoint-store": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/checkpoint-store/-/checkpoint-store-1.1.0.tgz", "integrity": "sha1-BOTLUWuRQziTWB5tRgGnjpVS6gY=", + "dev": true, "requires": { "functional-red-black-tree": "^1.0.1" } @@ -3145,6 +3240,7 @@ "version": "3.4.2", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.2.tgz", "integrity": "sha512-IZHaDeBeI+sZJRX7lGcXsdzgvZqKv6sECqsbErJA4mHWfpRrD8B97kSFN4cQz6nGBGiuFia1MKR4d6c1o8Cv7A==", + "dev": true, "requires": { "anymatch": "~3.1.1", "braces": "~3.0.2", @@ -3159,17 +3255,20 @@ "chownr": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", - "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==" + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", + "dev": true }, "ci-info": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", - "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==" + "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", + "dev": true }, "cids": { "version": "0.7.5", "resolved": "https://registry.npmjs.org/cids/-/cids-0.7.5.tgz", "integrity": "sha512-zT7mPeghoWAu+ppn8+BS1tQ5qGmbMfB4AregnQjA/qHY3GC1m1ptI9GkWNlgeu38r7CuRdXB47uY2XgAYt6QVA==", + "dev": true, "requires": { "buffer": "^5.5.0", "class-is": "^1.1.0", @@ -3179,18 +3278,20 @@ }, "dependencies": { "buffer": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.6.0.tgz", - "integrity": "sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw==", + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, "requires": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4" + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" } }, "multicodec": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-1.0.4.tgz", "integrity": "sha512-NDd7FeS3QamVtbgfvu5h7fd1IlbaC4EQ0/pgU4zqE2vdHCmBGsUa0TiM8/TdSeG6BMPC92OOCf8F1ocE/Wkrrg==", + "dev": true, "requires": { "buffer": "^5.6.0", "varint": "^5.0.0" @@ -3202,6 +3303,7 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "dev": true, "requires": { "inherits": "^2.0.1", "safe-buffer": "^5.0.1" @@ -3216,12 +3318,14 @@ "class-is": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/class-is/-/class-is-1.1.0.tgz", - "integrity": "sha512-rhjH9AG1fvabIDoGRVH587413LPjTZgmDF9fOFCbFJQV4yuocX1mHxxvXI4g3cGwbVY9wAYIoKlg1N79frJKQw==" + "integrity": "sha512-rhjH9AG1fvabIDoGRVH587413LPjTZgmDF9fOFCbFJQV4yuocX1mHxxvXI4g3cGwbVY9wAYIoKlg1N79frJKQw==", + "dev": true }, "clean-stack": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", - "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==" + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", + "dev": true }, "cli-cursor": { "version": "3.1.0", @@ -3264,16 +3368,6 @@ } } }, - "cli-table2": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/cli-table2/-/cli-table2-0.2.0.tgz", - "integrity": "sha1-LR738hig54biFFQFYtS9F3/jLZc=", - "requires": { - "colors": "^1.1.2", - "lodash": "^3.10.1", - "string-width": "^1.0.1" - } - }, "cli-table3": { "version": "0.5.1", "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.5.1.tgz", @@ -3322,6 +3416,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-2.1.0.tgz", "integrity": "sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg==", + "dev": true, "requires": { "slice-ansi": "^3.0.0", "string-width": "^4.2.0" @@ -3330,17 +3425,20 @@ "ansi-regex": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==" + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true }, "is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true }, "string-width": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", + "dev": true, "requires": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -3351,6 +3449,7 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, "requires": { "ansi-regex": "^5.0.0" } @@ -3375,6 +3474,7 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "dev": true, "requires": { "string-width": "^3.1.0", "strip-ansi": "^5.2.0", @@ -3384,22 +3484,26 @@ "ansi-regex": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true }, "emoji-regex": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==" + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true }, "is-fullwidth-code-point": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true }, "string-width": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, "requires": { "emoji-regex": "^7.0.1", "is-fullwidth-code-point": "^2.0.0", @@ -3410,6 +3514,7 @@ "version": "5.2.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, "requires": { "ansi-regex": "^4.1.0" } @@ -3418,6 +3523,7 @@ "version": "5.1.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "dev": true, "requires": { "ansi-styles": "^3.2.0", "string-width": "^3.0.0", @@ -3429,12 +3535,14 @@ "clone": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", - "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=" + "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=", + "dev": true }, "clone-response": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", + "dev": true, "requires": { "mimic-response": "^1.0.0" } @@ -3442,12 +3550,14 @@ "code-point-at": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "dev": true }, "color-convert": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, "requires": { "color-name": "1.1.3" } @@ -3455,35 +3565,41 @@ "color-name": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true }, "colors": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", - "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==" + "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", + "dev": true }, "combined-stream": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, "requires": { "delayed-stream": "~1.0.0" } }, "commander": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-6.1.0.tgz", - "integrity": "sha512-wl7PNrYWd2y5mp1OK/LhTlv8Ff4kQJQRXXAvF+uU/TPNiVJUxZLRYGj/B0y/lPGAVcSbJqH2Za/cvHmrPMC8mA==" + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.0.tgz", + "integrity": "sha512-zP4jEKbe8SHzKJYQmq8Y9gYjtO/POJLgIdKgV7B9qNmABVFVc+ctqSX6iXh4mCpJfRBOabiZ2YKPg8ciDw6C+Q==", + "dev": true }, "compare-versions": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-3.6.0.tgz", - "integrity": "sha512-W6Af2Iw1z4CB7q4uU4hv646dW9GQuBM+YpC0UvUCWSD8w90SJjp+ujJuXaEMtAXBtSqGfMPuFOVn4/+FlaqfBA==" + "integrity": "sha512-W6Af2Iw1z4CB7q4uU4hv646dW9GQuBM+YpC0UvUCWSD8w90SJjp+ujJuXaEMtAXBtSqGfMPuFOVn4/+FlaqfBA==", + "dev": true }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true }, "concat-stream": { "version": "1.6.2", @@ -3530,9 +3646,9 @@ } }, "confusing-browser-globals": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/confusing-browser-globals/-/confusing-browser-globals-1.0.9.tgz", - "integrity": "sha512-KbS1Y0jMtyPgIxjO7ZzMAuUpAKMt1SzCL9fsrKsX6b0zJPTaT0SiSPmewwVZg9UAO83HVIlEhZF84LIjZ0lmAw==", + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/confusing-browser-globals/-/confusing-browser-globals-1.0.10.tgz", + "integrity": "sha512-gNld/3lySHwuhaVluJUKLePYirM3QNCKzVxqAdhJII9/WXKVX5PURzMVJspS1jTslSqjeuG4KMVTSouit5YPHA==", "dev": true }, "contains-path": { @@ -3545,6 +3661,7 @@ "version": "0.5.3", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==", + "dev": true, "requires": { "safe-buffer": "5.1.2" }, @@ -3552,7 +3669,8 @@ "safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true } } }, @@ -3560,6 +3678,7 @@ "version": "2.5.2", "resolved": "https://registry.npmjs.org/content-hash/-/content-hash-2.5.2.tgz", "integrity": "sha512-FvIQKy0S1JaWV10sMsA7TRx8bpU+pqPkhbsfvOJAdjRXvYxEckAwQWGwtRjiaJfh+E0DvcWUGqcdjwMGFjsSdw==", + "dev": true, "requires": { "cids": "^0.7.1", "multicodec": "^0.5.5", @@ -3569,32 +3688,38 @@ "content-type": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", - "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" + "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", + "dev": true }, "cookie": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", - "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==" + "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==", + "dev": true }, "cookie-signature": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" + "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=", + "dev": true }, "cookiejar": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.2.tgz", - "integrity": "sha512-Mw+adcfzPxcPeI+0WlvRrr/3lGVO0bD75SxX6811cxSh1Wbxx7xZBGK1eVtDf6si8rg2lhnUjsVLMFMfbRIuwA==" + "integrity": "sha512-Mw+adcfzPxcPeI+0WlvRrr/3lGVO0bD75SxX6811cxSh1Wbxx7xZBGK1eVtDf6si8rg2lhnUjsVLMFMfbRIuwA==", + "dev": true }, "core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true }, "cors": { "version": "2.8.5", "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", + "dev": true, "requires": { "object-assign": "^4", "vary": "^1" @@ -3604,6 +3729,7 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.0.0.tgz", "integrity": "sha512-pondGvTuVYDk++upghXJabWzL6Kxu6f26ljFw64Swq9v6sQPUL3EUlVDV56diOjpCayKihL6hVe8exIACU4XcA==", + "dev": true, "requires": { "@types/parse-json": "^4.0.0", "import-fresh": "^3.2.1", @@ -3616,6 +3742,7 @@ "version": "4.0.4", "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz", "integrity": "sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==", + "dev": true, "requires": { "bn.js": "^4.1.0", "elliptic": "^6.5.3" @@ -3624,7 +3751,8 @@ "bn.js": { "version": "4.11.9", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", + "dev": true } } }, @@ -3632,6 +3760,7 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "dev": true, "requires": { "cipher-base": "^1.0.1", "inherits": "^2.0.1", @@ -3644,6 +3773,7 @@ "version": "1.1.7", "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", + "dev": true, "requires": { "cipher-base": "^1.0.3", "create-hash": "^1.1.0", @@ -3657,6 +3787,7 @@ "version": "2.2.3", "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-2.2.3.tgz", "integrity": "sha512-PrWWNH3yL2NYIb/7WF/5vFG3DCQiXDOVf8k3ijatbrtnwNuhMWLC7YF7uqf53tbTFDzHIUD8oITw4Bxt8ST3Nw==", + "dev": true, "requires": { "node-fetch": "2.1.2", "whatwg-fetch": "2.0.4" @@ -3665,7 +3796,8 @@ "node-fetch": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.1.2.tgz", - "integrity": "sha1-q4hOjn5X44qUR1POxwb3iNF2i7U=" + "integrity": "sha1-q4hOjn5X44qUR1POxwb3iNF2i7U=", + "dev": true } } }, @@ -3673,6 +3805,7 @@ "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, "requires": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -3683,6 +3816,7 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, "requires": { "isexe": "^2.0.0" } @@ -3699,6 +3833,7 @@ "version": "3.12.0", "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", + "dev": true, "requires": { "browserify-cipher": "^1.0.0", "browserify-sign": "^4.0.0", @@ -3717,6 +3852,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", + "dev": true, "requires": { "es5-ext": "^0.10.50", "type": "^1.0.1" @@ -3726,6 +3862,7 @@ "version": "1.14.1", "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "dev": true, "requires": { "assert-plus": "^1.0.0" } @@ -3740,6 +3877,7 @@ "version": "4.2.0", "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "dev": true, "requires": { "ms": "2.1.2" } @@ -3747,12 +3885,14 @@ "decamelize": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true }, "decode-uri-component": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", - "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=" + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", + "dev": true }, "decompress": { "version": "4.2.1", @@ -3774,6 +3914,7 @@ "version": "3.3.0", "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", + "dev": true, "requires": { "mimic-response": "^1.0.0" } @@ -3876,12 +4017,14 @@ "dedent": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", - "integrity": "sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw=" + "integrity": "sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw=", + "dev": true }, "deep-eql": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", + "dev": true, "requires": { "type-detect": "^4.0.0" } @@ -3889,29 +4032,24 @@ "deep-is": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", - "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=" + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true }, "defer-to-connect": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz", - "integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==" + "integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==", + "dev": true }, "deferred-leveldown": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/deferred-leveldown/-/deferred-leveldown-1.2.2.tgz", "integrity": "sha512-uukrWD2bguRtXilKt6cAWKyoXrTSMo5m7crUdLfWQmu8kIm88w3QZoUL+6nhpfKVmhHANER6Re3sKoNoZ3IKMA==", + "dev": true, "requires": { "abstract-leveldown": "~2.6.0" } }, - "deffy": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/deffy/-/deffy-2.2.4.tgz", - "integrity": "sha512-pLc9lsbsWjr6RxmJ2OLyvm+9l4j1yK69h+TML/gUit/t3vTijpkNGh8LioaJYTGO7F25m6HZndADcUOo2PsiUg==", - "requires": { - "typpy": "^2.0.0" - } - }, "define-properties": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", @@ -3929,17 +4067,20 @@ "delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "dev": true }, "depd": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", + "dev": true }, "des.js": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz", "integrity": "sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==", + "dev": true, "requires": { "inherits": "^2.0.1", "minimalistic-assert": "^1.0.0" @@ -3948,7 +4089,8 @@ "destroy": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", - "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" + "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=", + "dev": true }, "detect-port": { "version": "1.3.0", @@ -3980,12 +4122,14 @@ "diff": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==" + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true }, "diffie-hellman": { "version": "5.0.3", "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", + "dev": true, "requires": { "bn.js": "^4.1.0", "miller-rabin": "^4.0.0", @@ -3995,7 +4139,8 @@ "bn.js": { "version": "4.11.9", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", + "dev": true } } }, @@ -4012,6 +4157,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, "requires": { "esutils": "^2.0.2" } @@ -4019,12 +4165,14 @@ "dom-walk": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/dom-walk/-/dom-walk-0.1.2.tgz", - "integrity": "sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w==" + "integrity": "sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w==", + "dev": true }, "dotenv": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-6.2.0.tgz", - "integrity": "sha512-HygQCKUBSFl8wKQZBSemMywRWcEDNidvNbjGVyZu3nbZ8qq9ubiPoGLMdRDpfSrpkkm9BXYFkpKxxFX38o/76w==" + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.2.0.tgz", + "integrity": "sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw==", + "dev": true }, "drbg.js": { "version": "1.0.1", @@ -4040,12 +4188,14 @@ "duplexer3": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", - "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=" + "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=", + "dev": true }, "ecc-jsbn": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "dev": true, "requires": { "jsbn": "~0.1.0", "safer-buffer": "^2.1.0" @@ -4054,7 +4204,8 @@ "ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=", + "dev": true }, "elliptic": { "version": "6.5.3", @@ -4085,12 +4236,14 @@ "encodeurl": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" + "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=", + "dev": true }, "encoding": { "version": "0.1.13", "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", + "dev": true, "requires": { "iconv-lite": "^0.6.2" }, @@ -4099,6 +4252,7 @@ "version": "0.6.2", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.2.tgz", "integrity": "sha512-2y91h5OpQlolefMPmUlivelittSWy0rP+oYVpn6A7GwVHNE8AWzoYOBNmlwks3LobaJxgHCYZAnyNo2GgpNRNQ==", + "dev": true, "requires": { "safer-buffer": ">= 2.1.2 < 3.0.0" } @@ -4109,6 +4263,7 @@ "version": "1.4.4", "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dev": true, "requires": { "once": "^1.4.0" } @@ -4117,6 +4272,7 @@ "version": "2.3.6", "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", + "dev": true, "requires": { "ansi-colors": "^4.1.1" } @@ -4125,6 +4281,7 @@ "version": "0.1.7", "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz", "integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==", + "dev": true, "requires": { "prr": "~1.0.1" } @@ -4133,6 +4290,7 @@ "version": "1.3.2", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, "requires": { "is-arrayish": "^0.2.1" } @@ -4211,12 +4369,14 @@ "es-array-method-boxes-properly": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz", - "integrity": "sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA==" + "integrity": "sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA==", + "dev": true }, "es-get-iterator": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/es-get-iterator/-/es-get-iterator-1.1.0.tgz", "integrity": "sha512-UfrmHuWQlNMTs35e1ypnvikg6jCz3SK8v8ImvmDsh36fCVUR1MqoFDiyn0/k52C8NqO3YsO8Oe0azeesNuqSsQ==", + "dev": true, "requires": { "es-abstract": "^1.17.4", "has-symbols": "^1.0.1", @@ -4230,7 +4390,8 @@ "isarray": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==" + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true } } }, @@ -4248,6 +4409,7 @@ "version": "0.10.53", "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.53.tgz", "integrity": "sha512-Xs2Stw6NiNHWypzRTY1MtaG/uJlwCk8kH81920ma8mvN8Xq1gsfhZvpkImLQArw8AHnv8MT2I45J3c0R8slE+Q==", + "dev": true, "requires": { "es6-iterator": "~2.0.3", "es6-symbol": "~3.1.3", @@ -4258,6 +4420,7 @@ "version": "2.0.3", "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", + "dev": true, "requires": { "d": "1", "es5-ext": "^0.10.35", @@ -4268,6 +4431,7 @@ "version": "3.1.3", "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", + "dev": true, "requires": { "d": "^1.0.1", "ext": "^1.1.2" @@ -4276,7 +4440,8 @@ "escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=", + "dev": true }, "escape-string-regexp": { "version": "1.0.5", @@ -4287,6 +4452,7 @@ "version": "1.8.1", "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.8.1.tgz", "integrity": "sha1-WltTr0aTEQvrsIZ6o0MN07cKEBg=", + "dev": true, "requires": { "esprima": "^2.7.1", "estraverse": "^1.9.1", @@ -4296,13 +4462,13 @@ } }, "eslint": { - "version": "7.11.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.11.0.tgz", - "integrity": "sha512-G9+qtYVCHaDi1ZuWzBsOWo2wSwd70TXnU6UHA3cTYHp7gCTXZcpggWFoUVAMRarg68qtPoNfFbzPh+VdOgmwmw==", + "version": "7.13.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.13.0.tgz", + "integrity": "sha512-uCORMuOO8tUzJmsdRtrvcGq5qposf7Rw0LwkTJkoDbOycVQtQjmnhZSuLQnozLE4TmAzlMVV45eCHmQ1OpDKUQ==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", - "@eslint/eslintrc": "^0.1.3", + "@eslint/eslintrc": "^0.2.1", "ajv": "^6.10.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", @@ -4469,12 +4635,6 @@ "type-check": "~0.4.0" } }, - "lodash": { - "version": "4.17.20", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", - "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", - "dev": true - }, "optionator": { "version": "0.9.1", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", @@ -4543,14 +4703,28 @@ } }, "eslint-config-airbnb-base": { - "version": "14.2.0", - "resolved": "https://registry.npmjs.org/eslint-config-airbnb-base/-/eslint-config-airbnb-base-14.2.0.tgz", - "integrity": "sha512-Snswd5oC6nJaevs3nZoLSTvGJBvzTfnBqOIArkf3cbyTyq9UD79wOk8s+RiL6bhca0p/eRO6veczhf6A/7Jy8Q==", + "version": "14.2.1", + "resolved": "https://registry.npmjs.org/eslint-config-airbnb-base/-/eslint-config-airbnb-base-14.2.1.tgz", + "integrity": "sha512-GOrQyDtVEc1Xy20U7vsB2yAoB4nBlfH5HZJeatRXHleO+OS5Ot+MWij4Dpltw4/DyIkqUfqz1epfhVR5XWWQPA==", "dev": true, "requires": { - "confusing-browser-globals": "^1.0.9", - "object.assign": "^4.1.0", + "confusing-browser-globals": "^1.0.10", + "object.assign": "^4.1.2", "object.entries": "^1.1.2" + }, + "dependencies": { + "object.assign": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", + "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "has-symbols": "^1.0.1", + "object-keys": "^1.1.1" + } + } } }, "eslint-import-resolver-node": { @@ -4737,6 +4911,7 @@ "version": "4.0.3", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz", "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==", + "dev": true, "requires": { "esrecurse": "^4.1.0", "estraverse": "^4.1.1" @@ -4745,7 +4920,8 @@ "estraverse": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==" + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true } } }, @@ -4753,6 +4929,7 @@ "version": "1.4.3", "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.3.tgz", "integrity": "sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==", + "dev": true, "requires": { "eslint-visitor-keys": "^1.1.0" } @@ -4760,12 +4937,14 @@ "eslint-visitor-keys": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==" + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true }, "espree": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/espree/-/espree-5.0.1.tgz", "integrity": "sha512-qWAZcWh4XE/RwzLJejfcofscgMc9CamR6Tn1+XRXNzrvUSSbiAjGOI/fggztjIi7y9VLPqnICMIPiGyr8JaZ0A==", + "dev": true, "requires": { "acorn": "^6.0.7", "acorn-jsx": "^5.0.0", @@ -4775,12 +4954,14 @@ "esprima": { "version": "2.7.3", "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", - "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=" + "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=", + "dev": true }, "esquery": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.3.1.tgz", "integrity": "sha512-olpvt9QG0vniUBZspVRN6lwB7hOZoTRtT+jzR+tS4ffYx2mzbw+z0XCOk44aaLYKApNX5nMm+E+P6o25ip/DHQ==", + "dev": true, "requires": { "estraverse": "^5.1.0" }, @@ -4788,7 +4969,8 @@ "estraverse": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", - "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==" + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "dev": true } } }, @@ -4796,6 +4978,7 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, "requires": { "estraverse": "^5.2.0" }, @@ -4803,29 +4986,34 @@ "estraverse": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", - "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==" + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "dev": true } } }, "estraverse": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz", - "integrity": "sha1-r2fy3JIlgkFZUJJgkaQAXSnJu0Q=" + "integrity": "sha1-r2fy3JIlgkFZUJJgkaQAXSnJu0Q=", + "dev": true }, "esutils": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==" + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true }, "etag": { "version": "1.8.1", "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", - "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" + "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=", + "dev": true }, "eth-block-tracker": { "version": "4.4.3", "resolved": "https://registry.npmjs.org/eth-block-tracker/-/eth-block-tracker-4.4.3.tgz", "integrity": "sha512-A8tG4Z4iNg4mw5tP1Vung9N9IjgMNqpiMoJ/FouSFwNCGHv2X0mmOYwtQOJzki6XN7r7Tyo01S29p7b224I4jw==", + "dev": true, "requires": { "@babel/plugin-transform-runtime": "^7.5.5", "@babel/runtime": "^7.5.5", @@ -4838,7 +5026,8 @@ "pify": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true } } }, @@ -4846,6 +5035,7 @@ "version": "2.0.8", "resolved": "https://registry.npmjs.org/eth-ens-namehash/-/eth-ens-namehash-2.0.8.tgz", "integrity": "sha1-IprEbsqG1S4MmR58sq74P/D2i88=", + "dev": true, "requires": { "idna-uts46-hx": "^2.3.1", "js-sha3": "^0.5.7" @@ -5179,6 +5369,7 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/eth-json-rpc-errors/-/eth-json-rpc-errors-2.0.2.tgz", "integrity": "sha512-uBCRM2w2ewusRHGxN8JhcuOb2RN3ueAOYH/0BhqdFmQkZx5lj5+fLKTz0mIVOzd4FG5/kUksCzCD7eTEim6gaA==", + "dev": true, "requires": { "fast-safe-stringify": "^2.0.6" } @@ -5187,6 +5378,7 @@ "version": "0.1.29", "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.1.29.tgz", "integrity": "sha512-bfttrr3/7gG4E02HoWTDUcDDslN003OlOoBxk9virpAZQ1ja/jDgwkWB8QfJF7ojuEowrqy+lzp9VcJG7/k5bQ==", + "dev": true, "requires": { "bn.js": "^4.11.6", "elliptic": "^6.4.0", @@ -5199,17 +5391,20 @@ "bn.js": { "version": "4.11.9", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", + "dev": true }, "safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true }, "ws": { "version": "3.3.3", "resolved": "https://registry.npmjs.org/ws/-/ws-3.3.3.tgz", "integrity": "sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA==", + "dev": true, "requires": { "async-limiter": "~1.0.0", "safe-buffer": "~5.1.0", @@ -5222,6 +5417,7 @@ "version": "2.1.2", "resolved": "https://registry.npmjs.org/eth-query/-/eth-query-2.1.2.tgz", "integrity": "sha1-1nQdkAAQa1FRDHLbktY2VFam2l4=", + "dev": true, "requires": { "json-rpc-random-id": "^1.0.0", "xtend": "^4.0.1" @@ -5231,6 +5427,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/eth-rpc-errors/-/eth-rpc-errors-3.0.0.tgz", "integrity": "sha512-iPPNHPrLwUlR9xCSYm7HHQjWBasor3+KZfRvwEWxMz3ca0yqnlBeJrnyphkGIXZ4J7AMAaOLmwy4AWhnxOiLxg==", + "dev": true, "requires": { "fast-safe-stringify": "^2.0.6" } @@ -5239,6 +5436,7 @@ "version": "1.0.7", "resolved": "https://registry.npmjs.org/ethereum-bloom-filters/-/ethereum-bloom-filters-1.0.7.tgz", "integrity": "sha512-cDcJJSJ9GMAcURiAWO3DxIEhTL/uWqlQnvgKpuYQzYPrt/izuGU+1ntQmHt0IRq6ADoSYHFnB+aCEFIldjhkMQ==", + "dev": true, "requires": { "js-sha3": "^0.8.0" }, @@ -5246,19 +5444,22 @@ "js-sha3": { "version": "0.8.0", "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", - "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==" + "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==", + "dev": true } } }, "ethereum-common": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/ethereum-common/-/ethereum-common-0.2.0.tgz", - "integrity": "sha512-XOnAR/3rntJgbCdGhqdaLIxDLWKLmsZOGhHdBKadEr6gEnJLH52k93Ou+TUdFaPN3hJc3isBZBal3U/XZ15abA==" + "integrity": "sha512-XOnAR/3rntJgbCdGhqdaLIxDLWKLmsZOGhHdBKadEr6gEnJLH52k93Ou+TUdFaPN3hJc3isBZBal3U/XZ15abA==", + "dev": true }, "ethereum-cryptography": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", "integrity": "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==", + "dev": true, "requires": { "@types/pbkdf2": "^3.0.0", "@types/secp256k1": "^4.0.1", @@ -5280,12 +5481,14 @@ "ethereum-protocol": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/ethereum-protocol/-/ethereum-protocol-1.0.1.tgz", - "integrity": "sha512-3KLX1mHuEsBW0dKG+c6EOJS1NBNqdCICvZW9sInmZTt5aY0oxmHVggYRE0lJu1tcnMD1K+AKHdLi6U43Awm1Vg==" + "integrity": "sha512-3KLX1mHuEsBW0dKG+c6EOJS1NBNqdCICvZW9sInmZTt5aY0oxmHVggYRE0lJu1tcnMD1K+AKHdLi6U43Awm1Vg==", + "dev": true }, "ethereumjs-abi": { "version": "0.6.8", "resolved": "https://registry.npmjs.org/ethereumjs-abi/-/ethereumjs-abi-0.6.8.tgz", "integrity": "sha512-Tx0r/iXI6r+lRsdvkFDlut0N08jWMnKRZ6Gkq+Nmw75lZe4e6o3EkSnkaBP5NF6+m5PTGAr9JP43N3LyeoglsA==", + "dev": true, "requires": { "bn.js": "^4.11.8", "ethereumjs-util": "^6.0.0" @@ -5294,12 +5497,14 @@ "bn.js": { "version": "4.11.9", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", + "dev": true }, "ethereumjs-util": { "version": "6.2.1", "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz", "integrity": "sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw==", + "dev": true, "requires": { "@types/bn.js": "^4.11.3", "bn.js": "^4.11.0", @@ -5316,6 +5521,7 @@ "version": "2.0.5", "resolved": "https://registry.npmjs.org/ethereumjs-account/-/ethereumjs-account-2.0.5.tgz", "integrity": "sha512-bgDojnXGjhMwo6eXQC0bY6UK2liSFUSMwwylOmQvZbSl/D7NXQ3+vrGO46ZeOgjGfxXmgIeVNDIiHw7fNZM4VA==", + "dev": true, "requires": { "ethereumjs-util": "^5.0.0", "rlp": "^2.0.0", @@ -5325,12 +5531,14 @@ "bn.js": { "version": "4.11.9", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", + "dev": true }, "ethereumjs-util": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz", "integrity": "sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ==", + "dev": true, "requires": { "bn.js": "^4.11.0", "create-hash": "^1.1.2", @@ -5347,6 +5555,7 @@ "version": "1.7.1", "resolved": "https://registry.npmjs.org/ethereumjs-block/-/ethereumjs-block-1.7.1.tgz", "integrity": "sha512-B+sSdtqm78fmKkBq78/QLKJbu/4Ts4P2KFISdgcuZUPDm9x+N7qgBPIIFUGbaakQh8bzuquiRVbdmvPKqbILRg==", + "dev": true, "requires": { "async": "^2.0.1", "ethereum-common": "0.2.0", @@ -5359,6 +5568,7 @@ "version": "2.6.3", "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", + "dev": true, "requires": { "lodash": "^4.17.14" } @@ -5366,12 +5576,14 @@ "bn.js": { "version": "4.11.9", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", + "dev": true }, "ethereumjs-tx": { "version": "1.3.7", "resolved": "https://registry.npmjs.org/ethereumjs-tx/-/ethereumjs-tx-1.3.7.tgz", "integrity": "sha512-wvLMxzt1RPhAQ9Yi3/HKZTn0FZYpnsmQdbKYfUUpi4j1SEIcbkd9tndVjcPrufY3V7j2IebOpC00Zp2P/Ay2kA==", + "dev": true, "requires": { "ethereum-common": "^0.0.18", "ethereumjs-util": "^5.0.0" @@ -5380,7 +5592,8 @@ "ethereum-common": { "version": "0.0.18", "resolved": "https://registry.npmjs.org/ethereum-common/-/ethereum-common-0.0.18.tgz", - "integrity": "sha1-L9w1dvIykDNYl26znaeDIT/5Uj8=" + "integrity": "sha1-L9w1dvIykDNYl26znaeDIT/5Uj8=", + "dev": true } } }, @@ -5388,6 +5601,7 @@ "version": "5.2.1", "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz", "integrity": "sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ==", + "dev": true, "requires": { "bn.js": "^4.11.0", "create-hash": "^1.1.2", @@ -5397,23 +5611,20 @@ "rlp": "^2.0.0", "safe-buffer": "^5.1.1" } - }, - "lodash": { - "version": "4.17.20", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", - "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==" } } }, "ethereumjs-common": { "version": "1.5.2", "resolved": "https://registry.npmjs.org/ethereumjs-common/-/ethereumjs-common-1.5.2.tgz", - "integrity": "sha512-hTfZjwGX52GS2jcVO6E2sx4YuFnf0Fhp5ylo4pEPhEffNln7vS59Hr5sLnp3/QCazFLluuBZ+FZ6J5HTp0EqCA==" + "integrity": "sha512-hTfZjwGX52GS2jcVO6E2sx4YuFnf0Fhp5ylo4pEPhEffNln7vS59Hr5sLnp3/QCazFLluuBZ+FZ6J5HTp0EqCA==", + "dev": true }, "ethereumjs-tx": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ethereumjs-tx/-/ethereumjs-tx-2.1.2.tgz", "integrity": "sha512-zZEK1onCeiORb0wyCXUvg94Ve5It/K6GD1K+26KfFKodiBiS6d9lfCXlUKGBBdQ+bv7Day+JK0tj1K+BeNFRAw==", + "dev": true, "requires": { "ethereumjs-common": "^1.5.0", "ethereumjs-util": "^6.0.0" @@ -5422,12 +5633,14 @@ "bn.js": { "version": "4.11.9", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", + "dev": true }, "ethereumjs-util": { "version": "6.2.1", "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz", "integrity": "sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw==", + "dev": true, "requires": { "@types/bn.js": "^4.11.3", "bn.js": "^4.11.0", @@ -5444,6 +5657,7 @@ "version": "7.0.7", "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.0.7.tgz", "integrity": "sha512-vU5rtZBlZsgkTw3o6PDKyB8li2EgLavnAbsKcfsH2YhHH1Le+PP8vEiMnAnvgc1B6uMoaM5GDCrVztBw0Q5K9g==", + "dev": true, "requires": { "@types/bn.js": "^4.11.3", "bn.js": "^5.1.2", @@ -5457,6 +5671,7 @@ "version": "2.6.0", "resolved": "https://registry.npmjs.org/ethereumjs-vm/-/ethereumjs-vm-2.6.0.tgz", "integrity": "sha512-r/XIUik/ynGbxS3y+mvGnbOKnuLo40V5Mj1J25+HEO63aWYREIqvWeRO/hnROlMBE5WoniQmPmhiaN0ctiHaXw==", + "dev": true, "requires": { "async": "^2.1.2", "async-eventemitter": "^0.2.2", @@ -5475,6 +5690,7 @@ "version": "2.6.3", "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", + "dev": true, "requires": { "lodash": "^4.17.14" } @@ -5482,12 +5698,14 @@ "bn.js": { "version": "4.11.9", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", + "dev": true }, "ethereumjs-block": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/ethereumjs-block/-/ethereumjs-block-2.2.2.tgz", "integrity": "sha512-2p49ifhek3h2zeg/+da6XpdFR3GlqY3BIEiqxGF8j9aSRIgkb7M1Ky+yULBKJOu8PAZxfhsYA+HxUk2aCQp3vg==", + "dev": true, "requires": { "async": "^2.0.1", "ethereumjs-common": "^1.5.0", @@ -5500,6 +5718,7 @@ "version": "5.2.1", "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz", "integrity": "sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ==", + "dev": true, "requires": { "bn.js": "^4.11.0", "create-hash": "^1.1.2", @@ -5516,6 +5735,7 @@ "version": "6.2.1", "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz", "integrity": "sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw==", + "dev": true, "requires": { "@types/bn.js": "^4.11.3", "bn.js": "^4.11.0", @@ -5525,11 +5745,6 @@ "ethjs-util": "0.1.6", "rlp": "^2.2.3" } - }, - "lodash": { - "version": "4.17.20", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", - "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==" } } }, @@ -5537,6 +5752,7 @@ "version": "0.6.5", "resolved": "https://registry.npmjs.org/ethereumjs-wallet/-/ethereumjs-wallet-0.6.5.tgz", "integrity": "sha512-MDwjwB9VQVnpp/Dc1XzA6J1a3wgHQ4hSvA1uWNatdpOrtCbPVuQSKSyRnjLvS0a+KKMw2pvQ9Ybqpb3+eW8oNA==", + "dev": true, "requires": { "aes-js": "^3.1.1", "bs58check": "^2.1.2", @@ -5552,17 +5768,20 @@ "aes-js": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.1.2.tgz", - "integrity": "sha512-e5pEa2kBnBOgR4Y/p20pskXI74UEz7de8ZGVo58asOtvSVG5YAbJeELPZxOmt+Bnz3rX753YKhfIn4X4l1PPRQ==" + "integrity": "sha512-e5pEa2kBnBOgR4Y/p20pskXI74UEz7de8ZGVo58asOtvSVG5YAbJeELPZxOmt+Bnz3rX753YKhfIn4X4l1PPRQ==", + "dev": true }, "bn.js": { "version": "4.11.9", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", + "dev": true }, "ethereumjs-util": { "version": "6.2.1", "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz", "integrity": "sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw==", + "dev": true, "requires": { "@types/bn.js": "^4.11.3", "bn.js": "^4.11.0", @@ -5577,109 +5796,17 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/scryptsy/-/scryptsy-1.2.1.tgz", "integrity": "sha1-oyJfpLJST4AnAHYeKFW987LZIWM=", + "dev": true, "requires": { "pbkdf2": "^3.0.3" } } } }, - "etherlime-config": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/etherlime-config/-/etherlime-config-1.0.0.tgz", - "integrity": "sha512-Z0heb7c7qA4pxqhV63neqmJNR/Cux9JXrERSOvP+KuiJ9Z5tn/MG0eHArBWiR7U3kPu8AXZIJaAvBoeyJkN7VQ==" - }, - "etherlime-lib": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/etherlime-lib/-/etherlime-lib-1.1.3.tgz", - "integrity": "sha512-0H5hH7GG/3/2VxGJTjZth9zUUTsRAlDG+IY8ePZ95d276/N0GkPIdXjPdHmM+yQc/mMObMOuf/zmxPUP+wlq2g==", - "requires": { - "etherlime-config": "^1.0.0", - "etherlime-logger": "^1.1.2", - "etherlime-utils": "^1.1.2", - "ethers": "git+https://github.com/LimeChain/ethers.js.git#master", - "typescript": "^3.5.1" - }, - "dependencies": { - "bn.js": { - "version": "4.11.9", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" - }, - "elliptic": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.2.tgz", - "integrity": "sha512-f4x70okzZbIQl/NSRLkI/+tteV/9WqL98zx+SQ69KbXxmVrmjwsNUPn/gYJJ0sHvEak24cZgHIPegRePAtA/xw==", - "requires": { - "bn.js": "^4.4.0", - "brorand": "^1.0.1", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.0" - } - }, - "ethers": { - "version": "git+https://github.com/LimeChain/ethers.js.git#7eceb12e0a05ed1e44834556f6a32e20918abf1b", - "from": "git+https://github.com/LimeChain/ethers.js.git#master", - "requires": { - "aes-js": "3.0.0", - "bn.js": "^4.4.0", - "elliptic": "6.5.2", - "hash.js": "1.1.3", - "js-sha3": "0.5.7", - "scrypt-js": "2.0.4", - "setimmediate": "1.0.4", - "uuid": "2.0.1", - "xmlhttprequest": "1.8.0" - } - }, - "hash.js": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", - "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", - "requires": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.0" - } - }, - "scrypt-js": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-2.0.4.tgz", - "integrity": "sha512-4KsaGcPnuhtCZQCxFxN3GVYIhKFPTdLd8PLC552XwbMndtD0cjRFAhDuuydXQ0h08ZfPgzqe6EKHozpuH74iDw==" - }, - "setimmediate": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.4.tgz", - "integrity": "sha1-IOgd5iLUoCWIzgyNqJc8vPHTE48=" - }, - "uuid": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.1.tgz", - "integrity": "sha1-wqMN7bPlNdcsz4LjQ5QaULqFM6w=" - } - } - }, - "etherlime-logger": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/etherlime-logger/-/etherlime-logger-1.2.1.tgz", - "integrity": "sha512-BnrU4NpwT5fsmk1v3v3z9fB45wxhbKIJJ5i7LOxxMUf9zg9iDfmNbQaX6QJ7Q6zmaKEoszF8u/fRwrAUt8G78Q==", - "requires": { - "fs-extra": "7.0.1" - } - }, - "etherlime-utils": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/etherlime-utils/-/etherlime-utils-1.1.4.tgz", - "integrity": "sha512-kzvjA9f7e7mlOIY4pUve5+ynoVYIqThIzU6ENQjF/d6ZyIyEA3LR7MLTHwkuVHyJq6iV7nKnMTPZZfGlW9I71Q==", - "requires": { - "chalk": "2.4.1" - } - }, "ethers": { - "version": "5.0.18", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.0.18.tgz", - "integrity": "sha512-WCiKGfAt09hBS1HZspu+JTgeunFcUCVRhCXO8X+VadBJGTRlG722XXib79Vz2oyBperz90CcjkBPdNly61Ah4A==", + "version": "5.0.19", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.0.19.tgz", + "integrity": "sha512-0AZnUgZh98q888WAd1oI3aLeI+iyDtrupjANVtPPS7O63lVopkR/No8A1NqSkgl/rU+b2iuu2mUZor6GD4RG2w==", "requires": { "@ethersproject/abi": "5.0.7", "@ethersproject/abstract-provider": "5.0.5", @@ -5699,7 +5826,7 @@ "@ethersproject/networks": "5.0.4", "@ethersproject/pbkdf2": "5.0.4", "@ethersproject/properties": "5.0.4", - "@ethersproject/providers": "5.0.13", + "@ethersproject/providers": "5.0.14", "@ethersproject/random": "5.0.4", "@ethersproject/rlp": "5.0.4", "@ethersproject/sha2": "5.0.4", @@ -5708,7 +5835,7 @@ "@ethersproject/strings": "5.0.5", "@ethersproject/transactions": "5.0.6", "@ethersproject/units": "5.0.6", - "@ethersproject/wallet": "5.0.6", + "@ethersproject/wallet": "5.0.7", "@ethersproject/web": "5.0.9", "@ethersproject/wordlists": "5.0.5" } @@ -5717,6 +5844,7 @@ "version": "0.1.6", "resolved": "https://registry.npmjs.org/ethjs-unit/-/ethjs-unit-0.1.6.tgz", "integrity": "sha1-xmWSHkduh7ziqdWIpv4EBbLEFpk=", + "dev": true, "requires": { "bn.js": "4.11.6", "number-to-bn": "1.7.0" @@ -5725,7 +5853,8 @@ "bn.js": { "version": "4.11.6", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", - "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=" + "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=", + "dev": true } } }, @@ -5733,6 +5862,7 @@ "version": "0.1.6", "resolved": "https://registry.npmjs.org/ethjs-util/-/ethjs-util-0.1.6.tgz", "integrity": "sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w==", + "dev": true, "requires": { "is-hex-prefixed": "1.0.0", "strip-hex-prefix": "1.0.0" @@ -5741,7 +5871,8 @@ "eventemitter3": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.4.tgz", - "integrity": "sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ==" + "integrity": "sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ==", + "dev": true }, "events": { "version": "1.1.1", @@ -5752,15 +5883,17 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "dev": true, "requires": { "md5.js": "^1.3.4", "safe-buffer": "^5.1.1" } }, "execa": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/execa/-/execa-4.0.3.tgz", - "integrity": "sha512-WFDXGHckXPWZX19t1kCsXzOpqX9LWYNqn4C+HqZlk/V0imTkzJZqf87ZBhvpHaftERYknpk0fjSylnXVlVgI0A==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-4.1.0.tgz", + "integrity": "sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==", + "dev": true, "requires": { "cross-spawn": "^7.0.0", "get-stream": "^5.0.0", @@ -5777,6 +5910,7 @@ "version": "4.17.1", "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz", "integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==", + "dev": true, "requires": { "accepts": "~1.3.7", "array-flatten": "1.1.1", @@ -5814,6 +5948,7 @@ "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, "requires": { "ms": "2.0.0" } @@ -5821,12 +5956,14 @@ "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true }, "safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true } } }, @@ -5834,6 +5971,7 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/ext/-/ext-1.4.0.tgz", "integrity": "sha512-Key5NIsUxdqKg3vIsdw9dSuXpPCQ297y6wBjL30edxwPgt2E44WcWBZey/ZvUc6sERLTxKdyCu4gZFmUbk1Q7A==", + "dev": true, "requires": { "type": "^2.0.0" }, @@ -5841,14 +5979,16 @@ "type": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/type/-/type-2.1.0.tgz", - "integrity": "sha512-G9absDWvhAWCV2gmF1zKud3OyC61nZDwWvBL2DApaVFogI07CprggiQAOOjvp2NRjYWFzPyu7vwtDrQFq8jeSA==" + "integrity": "sha512-G9absDWvhAWCV2gmF1zKud3OyC61nZDwWvBL2DApaVFogI07CprggiQAOOjvp2NRjYWFzPyu7vwtDrQFq8jeSA==", + "dev": true } } }, "extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true }, "external-editor": { "version": "3.1.0", @@ -5863,12 +6003,14 @@ "extsprintf": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", + "dev": true }, "fake-merkle-patricia-tree": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/fake-merkle-patricia-tree/-/fake-merkle-patricia-tree-1.0.1.tgz", "integrity": "sha1-S4w6z7Ugr635hgsfFM2M40As3dM=", + "dev": true, "requires": { "checkpoint-store": "^1.1.0" } @@ -5881,7 +6023,8 @@ "fast-diff": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz", - "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==" + "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==", + "dev": true }, "fast-glob": { "version": "3.2.4", @@ -5905,12 +6048,14 @@ "fast-levenshtein": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=" + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true }, "fast-safe-stringify": { "version": "2.0.7", "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.7.tgz", - "integrity": "sha512-Utm6CdzT+6xsDk2m8S6uL8VHxNwI6Jub+e9NYTcAms28T84pTa25GJQV9j0CY0N1rM8hK4x6grpF2BQf+2qwVA==" + "integrity": "sha512-Utm6CdzT+6xsDk2m8S6uL8VHxNwI6Jub+e9NYTcAms28T84pTa25GJQV9j0CY0N1rM8hK4x6grpF2BQf+2qwVA==", + "dev": true }, "fastq": { "version": "1.9.0", @@ -5934,6 +6079,7 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/fetch-ponyfill/-/fetch-ponyfill-4.1.0.tgz", "integrity": "sha1-rjzl9zLGReq4fkroeTQUcJsjmJM=", + "dev": true, "requires": { "node-fetch": "~1.7.1" }, @@ -5941,12 +6087,14 @@ "is-stream": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true }, "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.11", "is-stream": "^1.0.1" @@ -5966,6 +6114,7 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", + "dev": true, "requires": { "flat-cache": "^2.0.1" } @@ -5979,12 +6128,14 @@ "file-uri-to-path": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", - "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", + "dev": true }, "fill-range": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, "requires": { "to-regex-range": "^5.0.1" } @@ -5993,6 +6144,7 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", + "dev": true, "requires": { "debug": "2.6.9", "encodeurl": "~1.0.2", @@ -6007,6 +6159,7 @@ "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, "requires": { "ms": "2.0.0" } @@ -6014,7 +6167,8 @@ "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true } } }, @@ -6022,6 +6176,7 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, "requires": { "locate-path": "^5.0.0", "path-exists": "^4.0.0" @@ -6031,6 +6186,7 @@ "version": "3.2.0", "resolved": "https://registry.npmjs.org/find-versions/-/find-versions-3.2.0.tgz", "integrity": "sha512-P8WRou2S+oe222TOCHitLy8zj+SIsVJh52VP4lvXkaFVnOFFdoWv1H1Jjvel1aI6NCFOAaeAVm8qrI0odiLcww==", + "dev": true, "requires": { "semver-regex": "^2.0.0" } @@ -6039,6 +6195,7 @@ "version": "4.1.1", "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.1.tgz", "integrity": "sha512-FmTtBsHskrU6FJ2VxCnsDb84wu9zhmO3cUX2kGFb5tuwhfXxGciiT0oRY+cck35QmG+NmGh5eLz6lLCpWTqwpA==", + "dev": true, "requires": { "is-buffer": "~2.0.3" } @@ -6047,6 +6204,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", + "dev": true, "requires": { "flatted": "^2.0.0", "rimraf": "2.6.3", @@ -6057,6 +6215,7 @@ "version": "7.1.6", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "dev": true, "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -6070,6 +6229,7 @@ "version": "2.6.3", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "dev": true, "requires": { "glob": "^7.1.3" } @@ -6079,22 +6239,20 @@ "flatted": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz", - "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==" - }, - "follow-redirects": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.0.tgz", - "integrity": "sha512-aq6gF1BEKje4a9i9+5jimNFIpq4Q1WiwBToeRK5NvZBd/TRsmW8BsJfOEGkr76TbOyPVD3OVDN910EcUNtRYEA==" + "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==", + "dev": true }, "forever-agent": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "dev": true }, "form-data": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "dev": true, "requires": { "asynckit": "^0.4.0", "combined-stream": "^1.0.6", @@ -6104,12 +6262,14 @@ "forwarded": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", - "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=" + "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=", + "dev": true }, "fresh": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" + "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=", + "dev": true }, "fs": { "version": "0.0.1-security", @@ -6123,9 +6283,10 @@ "dev": true }, "fs-extra": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", - "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz", + "integrity": "sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==", + "dev": true, "requires": { "graceful-fs": "^4.1.2", "jsonfile": "^4.0.0", @@ -6136,6 +6297,7 @@ "version": "1.2.7", "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.7.tgz", "integrity": "sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==", + "dev": true, "requires": { "minipass": "^2.6.0" } @@ -6149,12 +6311,14 @@ "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true }, "fsevents": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", + "dev": true, "optional": true }, "function-bind": { @@ -6162,23 +6326,17 @@ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" }, - "function.name": { - "version": "1.0.13", - "resolved": "https://registry.npmjs.org/function.name/-/function.name-1.0.13.tgz", - "integrity": "sha512-mVrqdoy5npWZyoXl4DxCeuVF6delDcQjVS9aPdvLYlBxtMTZDR2B5GVEQEoM1jJyspCqg3C0v4ABkLE7tp9xFA==", - "requires": { - "noop6": "^1.0.1" - } - }, "functional-red-black-tree": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=" + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true }, "ganache-cli": { - "version": "6.12.0", - "resolved": "https://registry.npmjs.org/ganache-cli/-/ganache-cli-6.12.0.tgz", - "integrity": "sha512-WV354mOSCbVH+qR609ftpz/1zsZPRsHMaQ4jo9ioBQAkguYNVU5arfgIE0+0daU0Vl9WJ/OMhRyl0XRswd/j9A==", + "version": "6.12.1", + "resolved": "https://registry.npmjs.org/ganache-cli/-/ganache-cli-6.12.1.tgz", + "integrity": "sha512-zoefZLQpQyEJH9jgtVYgM+ENFLAC9iwys07IDCsju2Ieq9KSTLH89RxSP4bhizXKV/h/+qaWpfyCBGWnBfqgIQ==", + "dev": true, "requires": { "ethereumjs-util": "6.2.1", "source-map-support": "0.5.12", @@ -6187,73 +6345,73 @@ "dependencies": { "@types/bn.js": { "version": "4.11.6", - "resolved": false, - "integrity": "sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg==", + "bundled": true, + "dev": true, "requires": { "@types/node": "*" } }, "@types/node": { "version": "14.11.2", - "resolved": false, - "integrity": "sha512-jiE3QIxJ8JLNcb1Ps6rDbysDhN4xa8DJJvuC9prr6w+1tIh+QAbYyNF3tyiZNLDBIuBCf4KEcV2UvQm/V60xfA==" + "bundled": true, + "dev": true }, "@types/pbkdf2": { "version": "3.1.0", - "resolved": false, - "integrity": "sha512-Cf63Rv7jCQ0LaL8tNXmEyqTHuIJxRdlS5vMh1mj5voN4+QFhVZnlZruezqpWYDiJ8UTzhP0VmeLXCmBk66YrMQ==", + "bundled": true, + "dev": true, "requires": { "@types/node": "*" } }, "@types/secp256k1": { "version": "4.0.1", - "resolved": false, - "integrity": "sha512-+ZjSA8ELlOp8SlKi0YLB2tz9d5iPNEmOBd+8Rz21wTMdaXQIa9b6TEnD6l5qKOCypE7FSyPyck12qZJxSDNoog==", + "bundled": true, + "dev": true, "requires": { "@types/node": "*" } }, "ansi-regex": { "version": "4.1.0", - "resolved": false, - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" + "bundled": true, + "dev": true }, "ansi-styles": { "version": "3.2.1", - "resolved": false, - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "bundled": true, + "dev": true, "requires": { "color-convert": "^1.9.0" } }, "base-x": { "version": "3.0.8", - "resolved": false, - "integrity": "sha512-Rl/1AWP4J/zRrk54hhlxH4drNxPJXYUaKffODVI53/dAsV4t9fBxyxYKAVPU1XBHxYwOWP9h9H0hM2MVw4YfJA==", + "bundled": true, + "dev": true, "requires": { "safe-buffer": "^5.0.1" } }, "blakejs": { "version": "1.1.0", - "resolved": false, - "integrity": "sha1-ad+S75U6qIylGjLfarHFShVfx6U=" + "bundled": true, + "dev": true }, "bn.js": { "version": "4.11.9", - "resolved": false, - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" + "bundled": true, + "dev": true }, "brorand": { "version": "1.1.0", - "resolved": false, - "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" + "bundled": true, + "dev": true }, "browserify-aes": { "version": "1.2.0", - "resolved": false, - "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", + "bundled": true, + "dev": true, "requires": { "buffer-xor": "^1.0.3", "cipher-base": "^1.0.0", @@ -6265,16 +6423,16 @@ }, "bs58": { "version": "4.0.1", - "resolved": false, - "integrity": "sha1-vhYedsNU9veIrkBx9j806MTwpCo=", + "bundled": true, + "dev": true, "requires": { "base-x": "^3.0.2" } }, "bs58check": { "version": "2.1.2", - "resolved": false, - "integrity": "sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==", + "bundled": true, + "dev": true, "requires": { "bs58": "^4.0.0", "create-hash": "^1.1.0", @@ -6283,23 +6441,23 @@ }, "buffer-from": { "version": "1.1.1", - "resolved": false, - "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==" + "bundled": true, + "dev": true }, "buffer-xor": { "version": "1.0.3", - "resolved": false, - "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=" + "bundled": true, + "dev": true }, "camelcase": { "version": "5.3.1", - "resolved": false, - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" + "bundled": true, + "dev": true }, "cipher-base": { "version": "1.0.4", - "resolved": false, - "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "bundled": true, + "dev": true, "requires": { "inherits": "^2.0.1", "safe-buffer": "^5.0.1" @@ -6307,8 +6465,8 @@ }, "cliui": { "version": "5.0.0", - "resolved": false, - "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "bundled": true, + "dev": true, "requires": { "string-width": "^3.1.0", "strip-ansi": "^5.2.0", @@ -6317,21 +6475,21 @@ }, "color-convert": { "version": "1.9.3", - "resolved": false, - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "bundled": true, + "dev": true, "requires": { "color-name": "1.1.3" } }, "color-name": { "version": "1.1.3", - "resolved": false, - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" + "bundled": true, + "dev": true }, "create-hash": { "version": "1.2.0", - "resolved": false, - "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "bundled": true, + "dev": true, "requires": { "cipher-base": "^1.0.1", "inherits": "^2.0.1", @@ -6342,8 +6500,8 @@ }, "create-hmac": { "version": "1.1.7", - "resolved": false, - "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", + "bundled": true, + "dev": true, "requires": { "cipher-base": "^1.0.3", "create-hash": "^1.1.0", @@ -6355,8 +6513,8 @@ }, "cross-spawn": { "version": "6.0.5", - "resolved": false, - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "bundled": true, + "dev": true, "requires": { "nice-try": "^1.0.4", "path-key": "^2.0.1", @@ -6367,13 +6525,13 @@ }, "decamelize": { "version": "1.2.0", - "resolved": false, - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" + "bundled": true, + "dev": true }, "elliptic": { "version": "6.5.3", - "resolved": false, - "integrity": "sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==", + "bundled": true, + "dev": true, "requires": { "bn.js": "^4.4.0", "brorand": "^1.0.1", @@ -6386,21 +6544,21 @@ }, "emoji-regex": { "version": "7.0.3", - "resolved": false, - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==" + "bundled": true, + "dev": true }, "end-of-stream": { "version": "1.4.4", - "resolved": false, - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "bundled": true, + "dev": true, "requires": { "once": "^1.4.0" } }, "ethereum-cryptography": { "version": "0.1.3", - "resolved": false, - "integrity": "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==", + "bundled": true, + "dev": true, "requires": { "@types/pbkdf2": "^3.0.0", "@types/secp256k1": "^4.0.1", @@ -6421,8 +6579,8 @@ }, "ethereumjs-util": { "version": "6.2.1", - "resolved": false, - "integrity": "sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw==", + "bundled": true, + "dev": true, "requires": { "@types/bn.js": "^4.11.3", "bn.js": "^4.11.0", @@ -6435,8 +6593,8 @@ }, "ethjs-util": { "version": "0.1.6", - "resolved": false, - "integrity": "sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w==", + "bundled": true, + "dev": true, "requires": { "is-hex-prefixed": "1.0.0", "strip-hex-prefix": "1.0.0" @@ -6444,8 +6602,8 @@ }, "evp_bytestokey": { "version": "1.0.3", - "resolved": false, - "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "bundled": true, + "dev": true, "requires": { "md5.js": "^1.3.4", "safe-buffer": "^5.1.1" @@ -6453,8 +6611,8 @@ }, "execa": { "version": "1.0.0", - "resolved": false, - "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", + "bundled": true, + "dev": true, "requires": { "cross-spawn": "^6.0.0", "get-stream": "^4.0.0", @@ -6467,29 +6625,29 @@ }, "find-up": { "version": "3.0.0", - "resolved": false, - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "bundled": true, + "dev": true, "requires": { "locate-path": "^3.0.0" } }, "get-caller-file": { "version": "2.0.5", - "resolved": false, - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" + "bundled": true, + "dev": true }, "get-stream": { "version": "4.1.0", - "resolved": false, - "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "bundled": true, + "dev": true, "requires": { "pump": "^3.0.0" } }, "hash-base": { "version": "3.1.0", - "resolved": false, - "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", + "bundled": true, + "dev": true, "requires": { "inherits": "^2.0.4", "readable-stream": "^3.6.0", @@ -6498,8 +6656,8 @@ }, "hash.js": { "version": "1.1.7", - "resolved": false, - "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "bundled": true, + "dev": true, "requires": { "inherits": "^2.0.3", "minimalistic-assert": "^1.0.1" @@ -6507,8 +6665,8 @@ }, "hmac-drbg": { "version": "1.0.1", - "resolved": false, - "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "bundled": true, + "dev": true, "requires": { "hash.js": "^1.0.3", "minimalistic-assert": "^1.0.0", @@ -6517,38 +6675,38 @@ }, "inherits": { "version": "2.0.4", - "resolved": false, - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + "bundled": true, + "dev": true }, "invert-kv": { "version": "2.0.0", - "resolved": false, - "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==" + "bundled": true, + "dev": true }, "is-fullwidth-code-point": { "version": "2.0.0", - "resolved": false, - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" + "bundled": true, + "dev": true }, "is-hex-prefixed": { "version": "1.0.0", - "resolved": false, - "integrity": "sha1-fY035q135dEnFIkTxXPggtd39VQ=" + "bundled": true, + "dev": true }, "is-stream": { "version": "1.1.0", - "resolved": false, - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" + "bundled": true, + "dev": true }, "isexe": { "version": "2.0.0", - "resolved": false, - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" + "bundled": true, + "dev": true }, "keccak": { "version": "3.0.1", - "resolved": false, - "integrity": "sha512-epq90L9jlFWCW7+pQa6JOnKn2Xgl2mtI664seYR6MHskvI9agt7AnDqmAlp9TqU4/caMYbA08Hi5DMZAl5zdkA==", + "bundled": true, + "dev": true, "requires": { "node-addon-api": "^2.0.0", "node-gyp-build": "^4.2.0" @@ -6556,16 +6714,16 @@ }, "lcid": { "version": "2.0.0", - "resolved": false, - "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", + "bundled": true, + "dev": true, "requires": { "invert-kv": "^2.0.0" } }, "locate-path": { "version": "3.0.0", - "resolved": false, - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "bundled": true, + "dev": true, "requires": { "p-locate": "^3.0.0", "path-exists": "^3.0.0" @@ -6573,16 +6731,16 @@ }, "map-age-cleaner": { "version": "0.1.3", - "resolved": false, - "integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==", + "bundled": true, + "dev": true, "requires": { "p-defer": "^1.0.0" } }, "md5.js": { "version": "1.3.5", - "resolved": false, - "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", + "bundled": true, + "dev": true, "requires": { "hash-base": "^3.0.0", "inherits": "^2.0.1", @@ -6591,8 +6749,8 @@ }, "mem": { "version": "4.3.0", - "resolved": false, - "integrity": "sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==", + "bundled": true, + "dev": true, "requires": { "map-age-cleaner": "^0.1.1", "mimic-fn": "^2.0.0", @@ -6601,54 +6759,54 @@ }, "mimic-fn": { "version": "2.1.0", - "resolved": false, - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==" + "bundled": true, + "dev": true }, "minimalistic-assert": { "version": "1.0.1", - "resolved": false, - "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" + "bundled": true, + "dev": true }, "minimalistic-crypto-utils": { "version": "1.0.1", - "resolved": false, - "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=" + "bundled": true, + "dev": true }, "nice-try": { "version": "1.0.5", - "resolved": false, - "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==" + "bundled": true, + "dev": true }, "node-addon-api": { "version": "2.0.2", - "resolved": false, - "integrity": "sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==" + "bundled": true, + "dev": true }, "node-gyp-build": { "version": "4.2.3", - "resolved": false, - "integrity": "sha512-MN6ZpzmfNCRM+3t57PTJHgHyw/h4OWnZ6mR8P5j/uZtqQr46RRuDE/P+g3n0YR/AiYXeWixZZzaip77gdICfRg==" + "bundled": true, + "dev": true }, "npm-run-path": { "version": "2.0.2", - "resolved": false, - "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "bundled": true, + "dev": true, "requires": { "path-key": "^2.0.0" } }, "once": { "version": "1.4.0", - "resolved": false, - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "bundled": true, + "dev": true, "requires": { "wrappy": "1" } }, "os-locale": { "version": "3.1.0", - "resolved": false, - "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", + "bundled": true, + "dev": true, "requires": { "execa": "^1.0.0", "lcid": "^2.0.0", @@ -6657,54 +6815,54 @@ }, "p-defer": { "version": "1.0.0", - "resolved": false, - "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=" + "bundled": true, + "dev": true }, "p-finally": { "version": "1.0.0", - "resolved": false, - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=" + "bundled": true, + "dev": true }, "p-is-promise": { "version": "2.1.0", - "resolved": false, - "integrity": "sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg==" + "bundled": true, + "dev": true }, "p-limit": { "version": "2.3.0", - "resolved": false, - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "bundled": true, + "dev": true, "requires": { "p-try": "^2.0.0" } }, "p-locate": { "version": "3.0.0", - "resolved": false, - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "bundled": true, + "dev": true, "requires": { "p-limit": "^2.0.0" } }, "p-try": { "version": "2.2.0", - "resolved": false, - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" + "bundled": true, + "dev": true }, "path-exists": { "version": "3.0.0", - "resolved": false, - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" + "bundled": true, + "dev": true }, "path-key": { "version": "2.0.1", - "resolved": false, - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=" + "bundled": true, + "dev": true }, "pbkdf2": { "version": "3.1.1", - "resolved": false, - "integrity": "sha512-4Ejy1OPxi9f2tt1rRV7Go7zmfDQ+ZectEQz3VGUQhgq62HtIRPDyG/JtnwIxs6x3uNMwo2V7q1fMvKjb+Tnpqg==", + "bundled": true, + "dev": true, "requires": { "create-hash": "^1.1.2", "create-hmac": "^1.1.4", @@ -6715,8 +6873,8 @@ }, "pump": { "version": "3.0.0", - "resolved": false, - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "bundled": true, + "dev": true, "requires": { "end-of-stream": "^1.1.0", "once": "^1.3.1" @@ -6724,16 +6882,16 @@ }, "randombytes": { "version": "2.1.0", - "resolved": false, - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "bundled": true, + "dev": true, "requires": { "safe-buffer": "^5.1.0" } }, "readable-stream": { "version": "3.6.0", - "resolved": false, - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "bundled": true, + "dev": true, "requires": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", @@ -6742,18 +6900,18 @@ }, "require-directory": { "version": "2.1.1", - "resolved": false, - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" + "bundled": true, + "dev": true }, "require-main-filename": { "version": "2.0.0", - "resolved": false, - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==" + "bundled": true, + "dev": true }, "ripemd160": { "version": "2.0.2", - "resolved": false, - "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "bundled": true, + "dev": true, "requires": { "hash-base": "^3.0.0", "inherits": "^2.0.1" @@ -6761,26 +6919,26 @@ }, "rlp": { "version": "2.2.6", - "resolved": false, - "integrity": "sha512-HAfAmL6SDYNWPUOJNrM500x4Thn4PZsEy5pijPh40U9WfNk0z15hUYzO9xVIMAdIHdFtD8CBDHd75Td1g36Mjg==", + "bundled": true, + "dev": true, "requires": { "bn.js": "^4.11.1" } }, "safe-buffer": { "version": "5.2.1", - "resolved": false, - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" + "bundled": true, + "dev": true }, "scrypt-js": { "version": "3.0.1", - "resolved": false, - "integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==" + "bundled": true, + "dev": true }, "secp256k1": { "version": "4.0.2", - "resolved": false, - "integrity": "sha512-UDar4sKvWAksIlfX3xIaQReADn+WFnHvbVujpcbr+9Sf/69odMwy2MUsz5CKLQgX9nsIyrjuxL2imVyoNHa3fg==", + "bundled": true, + "dev": true, "requires": { "elliptic": "^6.5.2", "node-addon-api": "^2.0.0", @@ -6789,23 +6947,23 @@ }, "semver": { "version": "5.7.1", - "resolved": false, - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + "bundled": true, + "dev": true }, "set-blocking": { "version": "2.0.0", - "resolved": false, - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" + "bundled": true, + "dev": true }, "setimmediate": { "version": "1.0.5", - "resolved": false, - "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=" + "bundled": true, + "dev": true }, "sha.js": { "version": "2.4.11", - "resolved": false, - "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "bundled": true, + "dev": true, "requires": { "inherits": "^2.0.1", "safe-buffer": "^5.0.1" @@ -6813,31 +6971,31 @@ }, "shebang-command": { "version": "1.2.0", - "resolved": false, - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "bundled": true, + "dev": true, "requires": { "shebang-regex": "^1.0.0" } }, "shebang-regex": { "version": "1.0.0", - "resolved": false, - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=" + "bundled": true, + "dev": true }, "signal-exit": { "version": "3.0.3", - "resolved": false, - "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==" + "bundled": true, + "dev": true }, "source-map": { "version": "0.6.1", - "resolved": false, - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + "bundled": true, + "dev": true }, "source-map-support": { "version": "0.5.12", - "resolved": false, - "integrity": "sha512-4h2Pbvyy15EE02G+JOZpUCmqWJuqrs+sEkzewTm++BPi7Hvn/HwcqLAcNxYAyI0x13CpPPn+kMjl+hplXMHITQ==", + "bundled": true, + "dev": true, "requires": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" @@ -6845,8 +7003,8 @@ }, "string-width": { "version": "3.1.0", - "resolved": false, - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "bundled": true, + "dev": true, "requires": { "emoji-regex": "^7.0.1", "is-fullwidth-code-point": "^2.0.0", @@ -6855,55 +7013,55 @@ }, "string_decoder": { "version": "1.3.0", - "resolved": false, - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "bundled": true, + "dev": true, "requires": { "safe-buffer": "~5.2.0" } }, "strip-ansi": { "version": "5.2.0", - "resolved": false, - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "bundled": true, + "dev": true, "requires": { "ansi-regex": "^4.1.0" } }, "strip-eof": { "version": "1.0.0", - "resolved": false, - "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=" + "bundled": true, + "dev": true }, "strip-hex-prefix": { "version": "1.0.0", - "resolved": false, - "integrity": "sha1-DF8VX+8RUTczd96du1iNoFUA428=", + "bundled": true, + "dev": true, "requires": { "is-hex-prefixed": "1.0.0" } }, "util-deprecate": { "version": "1.0.2", - "resolved": false, - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + "bundled": true, + "dev": true }, "which": { "version": "1.3.1", - "resolved": false, - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "bundled": true, + "dev": true, "requires": { "isexe": "^2.0.0" } }, "which-module": { "version": "2.0.0", - "resolved": false, - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" + "bundled": true, + "dev": true }, "wrap-ansi": { "version": "5.1.0", - "resolved": false, - "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "bundled": true, + "dev": true, "requires": { "ansi-styles": "^3.2.0", "string-width": "^3.0.0", @@ -6912,18 +7070,18 @@ }, "wrappy": { "version": "1.0.2", - "resolved": false, - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + "bundled": true, + "dev": true }, "y18n": { "version": "4.0.0", - "resolved": false, - "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==" + "bundled": true, + "dev": true }, "yargs": { "version": "13.2.4", - "resolved": false, - "integrity": "sha512-HG/DWAJa1PAnHT9JAhNa8AbAv3FPaiLzioSjCcmuXXhP8MlpHO5vwls4g4j6n30Z74GVQj8Xa62dWVx1QCGklg==", + "bundled": true, + "dev": true, "requires": { "cliui": "^5.0.0", "find-up": "^3.0.0", @@ -6940,8 +7098,8 @@ }, "yargs-parser": { "version": "13.1.2", - "resolved": false, - "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", + "bundled": true, + "dev": true, "requires": { "camelcase": "^5.0.0", "decamelize": "^1.2.0" @@ -6952,17 +7110,31 @@ "get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true }, "get-func-name": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", - "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=" + "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", + "dev": true + }, + "get-intrinsic": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.0.1.tgz", + "integrity": "sha512-ZnWP+AmS1VUaLgTRy47+zKtjTxz+0xMpx3I52i+aalBK1QP19ggLF3Db89KJX7kjfOfP2eoa01qc++GwPgufPg==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" + } }, "get-own-enumerable-property-symbols": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.2.tgz", - "integrity": "sha512-I0UBV/XOz1XkIJHEUDMZAbzCThU/H8DxmSfmdGcKPnVhu2VfFqr34jr9777IyaTYvxjedWhqVIilEDsCdP5G6g==" + "integrity": "sha512-I0UBV/XOz1XkIJHEUDMZAbzCThU/H8DxmSfmdGcKPnVhu2VfFqr34jr9777IyaTYvxjedWhqVIilEDsCdP5G6g==", + "dev": true }, "get-port": { "version": "3.2.0", @@ -6974,6 +7146,7 @@ "version": "5.2.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "dev": true, "requires": { "pump": "^3.0.0" } @@ -6982,6 +7155,7 @@ "version": "0.1.7", "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "dev": true, "requires": { "assert-plus": "^1.0.0" } @@ -7013,6 +7187,7 @@ "version": "5.0.15", "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", + "dev": true, "requires": { "inflight": "^1.0.4", "inherits": "2", @@ -7025,6 +7200,7 @@ "version": "5.1.1", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", + "dev": true, "requires": { "is-glob": "^4.0.1" } @@ -7033,6 +7209,7 @@ "version": "4.3.2", "resolved": "https://registry.npmjs.org/global/-/global-4.3.2.tgz", "integrity": "sha1-52mJJopsdMOJCLEwWxD8DjlOnQ8=", + "dev": true, "requires": { "min-document": "^2.19.0", "process": "~0.5.1" @@ -7061,7 +7238,8 @@ "globals": { "version": "11.12.0", "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==" + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true }, "globby": { "version": "10.0.2", @@ -7105,6 +7283,7 @@ "version": "9.6.0", "resolved": "https://registry.npmjs.org/got/-/got-9.6.0.tgz", "integrity": "sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==", + "dev": true, "requires": { "@sindresorhus/is": "^0.14.0", "@szmarczak/http-timer": "^1.1.2", @@ -7123,6 +7302,7 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "dev": true, "requires": { "pump": "^3.0.0" } @@ -7132,17 +7312,20 @@ "graceful-fs": { "version": "4.2.4", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", - "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==" + "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==", + "dev": true }, "growl": { "version": "1.10.5", "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", - "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==" + "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", + "dev": true }, "handlebars": { "version": "4.7.6", "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.6.tgz", "integrity": "sha512-1f2BACcBfiwAfStCKZNrUCgqNZkGsAT7UM3kkYtXuLo0KnaVfjKOyf7PRzB6++aK9STyT1Pd2ZCPe3EGOXleXA==", + "dev": true, "requires": { "minimist": "^1.2.5", "neo-async": "^2.6.0", @@ -7154,19 +7337,22 @@ "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true } } }, "har-schema": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", + "dev": true }, "har-validator": { "version": "5.1.5", "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", + "dev": true, "requires": { "ajv": "^6.12.3", "har-schema": "^2.0.0" @@ -7183,12 +7369,14 @@ "has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true }, "has-symbol-support-x": { "version": "1.4.2", "resolved": "https://registry.npmjs.org/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz", - "integrity": "sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw==" + "integrity": "sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw==", + "dev": true }, "has-symbols": { "version": "1.0.1", @@ -7199,6 +7387,7 @@ "version": "1.4.1", "resolved": "https://registry.npmjs.org/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz", "integrity": "sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw==", + "dev": true, "requires": { "has-symbol-support-x": "^1.4.1" } @@ -7207,6 +7396,7 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", + "dev": true, "requires": { "inherits": "^2.0.4", "readable-stream": "^3.6.0", @@ -7225,7 +7415,8 @@ "he": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==" + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "dev": true }, "hmac-drbg": { "version": "1.0.1", @@ -7258,12 +7449,14 @@ "http-cache-semantics": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", - "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==" + "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==", + "dev": true }, "http-errors": { "version": "1.7.2", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==", + "dev": true, "requires": { "depd": "~1.1.2", "inherits": "2.0.3", @@ -7275,14 +7468,16 @@ "inherits": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true } } }, "http-https": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/http-https/-/http-https-1.0.0.tgz", - "integrity": "sha1-L5CN1fHbQGjAWM1ubUzjkskTOJs=" + "integrity": "sha1-L5CN1fHbQGjAWM1ubUzjkskTOJs=", + "dev": true }, "http-response-object": { "version": "3.0.2", @@ -7305,6 +7500,7 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "dev": true, "requires": { "assert-plus": "^1.0.0", "jsprim": "^1.2.2", @@ -7314,12 +7510,14 @@ "human-signals": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz", - "integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==" + "integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==", + "dev": true }, "husky": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/husky/-/husky-4.3.0.tgz", "integrity": "sha512-tTMeLCLqSBqnflBZnlVDhpaIMucSGaYyX6855jM4AguGeWCeSzNdb1mfyWduTZ3pe3SJVvVWGL0jO1iKZVPfTA==", + "dev": true, "requires": { "chalk": "^4.0.0", "ci-info": "^2.0.0", @@ -7337,6 +7535,7 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, "requires": { "color-convert": "^2.0.1" } @@ -7345,6 +7544,7 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "dev": true, "requires": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -7354,6 +7554,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, "requires": { "color-name": "~1.1.4" } @@ -7361,17 +7562,20 @@ "color-name": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true }, "has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, "requires": { "has-flag": "^4.0.0" } @@ -7390,6 +7594,7 @@ "version": "2.3.1", "resolved": "https://registry.npmjs.org/idna-uts46-hx/-/idna-uts46-hx-2.3.1.tgz", "integrity": "sha512-PWoF9Keq6laYdIRwwCdhTPl60xRqAloYNMQLiyUnG42VjT53oW07BXIRM+NK7eQjzXjAk2gUvX9caRxlnF9TAA==", + "dev": true, "requires": { "punycode": "2.1.0" }, @@ -7397,7 +7602,8 @@ "punycode": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.0.tgz", - "integrity": "sha1-X4Y+3Im5bbCQdLrXlHvwkFbKTn0=" + "integrity": "sha1-X4Y+3Im5bbCQdLrXlHvwkFbKTn0=", + "dev": true } } }, @@ -7409,17 +7615,20 @@ "ignore": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==" + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true }, "immediate": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.3.0.tgz", - "integrity": "sha512-HR7EVodfFUdQCTIeySw+WDRFJlPcLOJbXfwwZ7Oom6tjsvZ3bOkCDJHehQC3nxJrv7+f9XecwazynjU8e4Vw3Q==" + "integrity": "sha512-HR7EVodfFUdQCTIeySw+WDRFJlPcLOJbXfwwZ7Oom6tjsvZ3bOkCDJHehQC3nxJrv7+f9XecwazynjU8e4Vw3Q==", + "dev": true }, "import-fresh": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.1.tgz", "integrity": "sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ==", + "dev": true, "requires": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" @@ -7428,17 +7637,20 @@ "imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=" + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true }, "indent-string": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", - "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==" + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "dev": true }, "inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, "requires": { "once": "^1.3.0", "wrappy": "1" @@ -7562,22 +7774,26 @@ "ipaddr.js": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", - "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==" + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "dev": true }, "is-arguments": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.0.4.tgz", - "integrity": "sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA==" + "integrity": "sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA==", + "dev": true }, "is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=" + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true }, "is-binary-path": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, "requires": { "binary-extensions": "^2.0.0" } @@ -7585,7 +7801,8 @@ "is-buffer": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz", - "integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==" + "integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==", + "dev": true }, "is-callable": { "version": "1.2.2", @@ -7596,6 +7813,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.0.0.tgz", "integrity": "sha512-jq1AH6C8MuteOoBPwkxHafmByhL9j5q4OaPGdbuD+ZtQJVzH+i6E3BJDQcBA09k57i2Hh2yQbEG8yObZ0jdlWw==", + "dev": true, "requires": { "has": "^1.0.3" } @@ -7608,22 +7826,26 @@ "is-directory": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz", - "integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=" + "integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=", + "dev": true }, "is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true }, "is-fn": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-fn/-/is-fn-1.0.0.tgz", - "integrity": "sha1-lUPV3nvPWwiiLsiiC65uKG1RDYw=" + "integrity": "sha1-lUPV3nvPWwiiLsiiC65uKG1RDYw=", + "dev": true }, "is-fullwidth-code-point": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, "requires": { "number-is-nan": "^1.0.0" } @@ -7631,12 +7853,14 @@ "is-function": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-function/-/is-function-1.0.2.tgz", - "integrity": "sha512-lw7DUp0aWXYg+CBCN+JKkcE0Q2RayZnSvnZBlwgxHBQhqt5pZNVy4Ri7H9GmmXkdu7LUthszM+Tor1u/2iBcpQ==" + "integrity": "sha512-lw7DUp0aWXYg+CBCN+JKkcE0Q2RayZnSvnZBlwgxHBQhqt5pZNVy4Ri7H9GmmXkdu7LUthszM+Tor1u/2iBcpQ==", + "dev": true }, "is-glob": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "dev": true, "requires": { "is-extglob": "^2.1.1" } @@ -7644,12 +7868,14 @@ "is-hex-prefixed": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz", - "integrity": "sha1-fY035q135dEnFIkTxXPggtd39VQ=" + "integrity": "sha1-fY035q135dEnFIkTxXPggtd39VQ=", + "dev": true }, "is-map": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.1.tgz", - "integrity": "sha512-T/S49scO8plUiAOA2DBTBG3JHpn1yiw0kRp6dgiZ0v2/6twi5eiB0rHtHFH9ZIrvlWc6+4O+m4zg5+Z833aXgw==" + "integrity": "sha512-T/S49scO8plUiAOA2DBTBG3JHpn1yiw0kRp6dgiZ0v2/6twi5eiB0rHtHFH9ZIrvlWc6+4O+m4zg5+Z833aXgw==", + "dev": true }, "is-natural-number": { "version": "4.0.1", @@ -7665,22 +7891,26 @@ "is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true }, "is-obj": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", - "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=" + "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", + "dev": true }, "is-object": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-object/-/is-object-1.0.1.tgz", - "integrity": "sha1-iVJojF7C/9awPsyF52ngKQMINHA=" + "integrity": "sha1-iVJojF7C/9awPsyF52ngKQMINHA=", + "dev": true }, "is-plain-obj": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", - "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=" + "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", + "dev": true }, "is-regex": { "version": "1.1.1", @@ -7693,27 +7923,32 @@ "is-regexp": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-regexp/-/is-regexp-1.0.0.tgz", - "integrity": "sha1-/S2INUXEa6xaYz57mgnof6LLUGk=" + "integrity": "sha1-/S2INUXEa6xaYz57mgnof6LLUGk=", + "dev": true }, "is-retry-allowed": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz", - "integrity": "sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg==" + "integrity": "sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg==", + "dev": true }, "is-set": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.1.tgz", - "integrity": "sha512-eJEzOtVyenDs1TMzSQ3kU3K+E0GUS9sno+F0OBT97xsgcJsF9nXMBtkT9/kut5JEpM7oL7X/0qxR17K3mcwIAA==" + "integrity": "sha512-eJEzOtVyenDs1TMzSQ3kU3K+E0GUS9sno+F0OBT97xsgcJsF9nXMBtkT9/kut5JEpM7oL7X/0qxR17K3mcwIAA==", + "dev": true }, "is-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", - "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==" + "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==", + "dev": true }, "is-string": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.5.tgz", - "integrity": "sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ==" + "integrity": "sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ==", + "dev": true }, "is-symbol": { "version": "1.0.3", @@ -7726,7 +7961,8 @@ "is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "dev": true }, "isarray": { "version": "1.0.0", @@ -7736,17 +7972,20 @@ "isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true }, "isstream": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", + "dev": true }, "istanbul": { "version": "0.4.5", "resolved": "https://registry.npmjs.org/istanbul/-/istanbul-0.4.5.tgz", "integrity": "sha1-ZcfXPUxNqE1POsMQuRj7C4Azczs=", + "dev": true, "requires": { "abbrev": "1.0.x", "async": "1.x", @@ -7767,12 +8006,14 @@ "has-flag": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", - "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=" + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true }, "supports-color": { "version": "3.2.3", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, "requires": { "has-flag": "^1.0.0" } @@ -7783,6 +8024,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/isurl/-/isurl-1.0.0.tgz", "integrity": "sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w==", + "dev": true, "requires": { "has-to-string-tag-x": "^1.2.0", "is-object": "^1.0.1" @@ -7791,12 +8033,14 @@ "iterate-iterator": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/iterate-iterator/-/iterate-iterator-1.0.1.tgz", - "integrity": "sha512-3Q6tudGN05kbkDQDI4CqjaBf4qf85w6W6GnuZDtUVYwKgtC1q8yxYX7CZed7N+tLzQqS6roujWvszf13T+n9aw==" + "integrity": "sha512-3Q6tudGN05kbkDQDI4CqjaBf4qf85w6W6GnuZDtUVYwKgtC1q8yxYX7CZed7N+tLzQqS6roujWvszf13T+n9aw==", + "dev": true }, "iterate-value": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/iterate-value/-/iterate-value-1.0.2.tgz", "integrity": "sha512-A6fMAio4D2ot2r/TYzr4yUWrmwNdsN5xL7+HUiyACE4DXm+q8HtPcnFTp+NnW3k4N05tZ7FVYFFb2CR13NxyHQ==", + "dev": true, "requires": { "es-get-iterator": "^1.0.2", "iterate-iterator": "^1.0.1" @@ -7815,12 +8059,14 @@ "js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true }, "js-yaml": { "version": "3.14.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.0.tgz", "integrity": "sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A==", + "dev": true, "requires": { "argparse": "^1.0.7", "esprima": "^4.0.0" @@ -7829,34 +8075,40 @@ "esprima": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true } } }, "jsbn": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "dev": true }, "json-buffer": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", - "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=" + "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=", + "dev": true }, "json-parse-better-errors": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", - "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==" + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", + "dev": true }, "json-parse-even-better-errors": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==" + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true }, "json-rpc-engine": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/json-rpc-engine/-/json-rpc-engine-5.3.0.tgz", "integrity": "sha512-+diJ9s8rxB+fbJhT7ZEf8r8spaLRignLd8jTgQ/h5JSGppAHGtNMZtCoabipCaleR1B3GTGxbXBOqhaJSGmPGQ==", + "dev": true, "requires": { "eth-rpc-errors": "^3.0.0", "safe-event-emitter": "^1.0.1" @@ -7865,12 +8117,14 @@ "json-rpc-random-id": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json-rpc-random-id/-/json-rpc-random-id-1.0.1.tgz", - "integrity": "sha1-uknZat7RRE27jaPSA3SKy7zeyMg=" + "integrity": "sha1-uknZat7RRE27jaPSA3SKy7zeyMg=", + "dev": true }, "json-schema": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", + "dev": true }, "json-schema-traverse": { "version": "0.4.1", @@ -7881,6 +8135,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", + "dev": true, "requires": { "jsonify": "~0.0.0" } @@ -7888,12 +8143,14 @@ "json-stable-stringify-without-jsonify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=" + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true }, "json-stringify-safe": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", + "dev": true }, "json5": { "version": "1.0.1", @@ -7908,6 +8165,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "dev": true, "requires": { "graceful-fs": "^4.1.6" } @@ -7915,7 +8173,8 @@ "jsonify": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", - "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=" + "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", + "dev": true }, "jsonschema": { "version": "1.4.0", @@ -7927,6 +8186,7 @@ "version": "1.4.1", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "dev": true, "requires": { "assert-plus": "1.0.0", "extsprintf": "1.3.0", @@ -7938,6 +8198,7 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/keccak/-/keccak-3.0.1.tgz", "integrity": "sha512-epq90L9jlFWCW7+pQa6JOnKn2Xgl2mtI664seYR6MHskvI9agt7AnDqmAlp9TqU4/caMYbA08Hi5DMZAl5zdkA==", + "dev": true, "requires": { "node-addon-api": "^2.0.0", "node-gyp-build": "^4.2.0" @@ -7947,6 +8208,7 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz", "integrity": "sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==", + "dev": true, "requires": { "json-buffer": "3.0.0" } @@ -7960,12 +8222,14 @@ "level-codec": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/level-codec/-/level-codec-7.0.1.tgz", - "integrity": "sha512-Ua/R9B9r3RasXdRmOtd+t9TCOEIIlts+TN/7XTT2unhDaL6sJn83S3rUyljbr6lVtw49N3/yA0HHjpV6Kzb2aQ==" + "integrity": "sha512-Ua/R9B9r3RasXdRmOtd+t9TCOEIIlts+TN/7XTT2unhDaL6sJn83S3rUyljbr6lVtw49N3/yA0HHjpV6Kzb2aQ==", + "dev": true }, "level-errors": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/level-errors/-/level-errors-1.0.5.tgz", "integrity": "sha512-/cLUpQduF6bNrWuAC4pwtUKA5t669pCsCi2XbmojG2tFeOr9j6ShtdDCtFFQO1DRt+EVZhx9gPzP9G2bUaG4ig==", + "dev": true, "requires": { "errno": "~0.1.1" } @@ -7974,6 +8238,7 @@ "version": "1.3.1", "resolved": "https://registry.npmjs.org/level-iterator-stream/-/level-iterator-stream-1.3.1.tgz", "integrity": "sha1-5Dt4sagUPm+pek9IXrjqUwNS8u0=", + "dev": true, "requires": { "inherits": "^2.0.1", "level-errors": "^1.0.3", @@ -7984,12 +8249,14 @@ "isarray": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true }, "readable-stream": { "version": "1.1.14", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "dev": true, "requires": { "core-util-is": "~1.0.0", "inherits": "~2.0.1", @@ -8000,7 +8267,8 @@ "string_decoder": { "version": "0.10.31", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true } } }, @@ -8008,6 +8276,7 @@ "version": "0.0.0", "resolved": "https://registry.npmjs.org/level-ws/-/level-ws-0.0.0.tgz", "integrity": "sha1-Ny5RIXeSSgBCSwtDrvK7QkltIos=", + "dev": true, "requires": { "readable-stream": "~1.0.15", "xtend": "~2.1.1" @@ -8016,17 +8285,20 @@ "isarray": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true }, "object-keys": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz", - "integrity": "sha1-KKaq50KN0sOpLz2V8hM13SBOAzY=" + "integrity": "sha1-KKaq50KN0sOpLz2V8hM13SBOAzY=", + "dev": true }, "readable-stream": { "version": "1.0.34", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "dev": true, "requires": { "core-util-is": "~1.0.0", "inherits": "~2.0.1", @@ -8037,12 +8309,14 @@ "string_decoder": { "version": "0.10.31", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true }, "xtend": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz", "integrity": "sha1-bv7MKk2tjmlixJAbM3znuoe10os=", + "dev": true, "requires": { "object-keys": "~0.4.0" } @@ -8053,6 +8327,7 @@ "version": "1.3.9", "resolved": "https://registry.npmjs.org/levelup/-/levelup-1.3.9.tgz", "integrity": "sha512-VVGHfKIlmw8w1XqpGOAGwq6sZm2WwWLmlDcULkKWQXEA5EopA8OBNJ2Ck2v6bdk8HeEZSbCSEgzXadyQFm76sQ==", + "dev": true, "requires": { "deferred-leveldown": "~1.2.1", "level-codec": "~7.0.0", @@ -8066,7 +8341,8 @@ "semver": { "version": "5.4.1", "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", - "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==" + "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==", + "dev": true } } }, @@ -8074,6 +8350,7 @@ "version": "0.3.0", "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "dev": true, "requires": { "prelude-ls": "~1.1.2", "type-check": "~0.3.2" @@ -8082,22 +8359,24 @@ "lines-and-columns": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz", - "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=" + "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=", + "dev": true }, "lint-staged": { - "version": "10.4.2", - "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-10.4.2.tgz", - "integrity": "sha512-OLCA9K1hS+Sl179SO6kX0JtnsaKj/MZalEhUj5yAgXsb63qPI/Gfn6Ua1KuZdbfkZNEu3/n5C/obYCu70IMt9g==", + "version": "10.5.1", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-10.5.1.tgz", + "integrity": "sha512-fTkTGFtwFIJJzn/PbUO3RXyEBHIhbfYBE7+rJyLcOXabViaO/h6OslgeK6zpeUtzkDrzkgyAYDTLAwx6JzDTHw==", + "dev": true, "requires": { "chalk": "^4.1.0", "cli-truncate": "^2.1.0", - "commander": "^6.0.0", + "commander": "^6.2.0", "cosmiconfig": "^7.0.0", - "debug": "^4.1.1", + "debug": "^4.2.0", "dedent": "^0.7.0", "enquirer": "^2.3.6", - "execa": "^4.0.3", - "listr2": "^2.6.0", + "execa": "^4.1.0", + "listr2": "^3.2.2", "log-symbols": "^4.0.0", "micromatch": "^4.0.2", "normalize-path": "^3.0.0", @@ -8110,6 +8389,7 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, "requires": { "color-convert": "^2.0.1" } @@ -8118,6 +8398,7 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "dev": true, "requires": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -8127,6 +8408,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, "requires": { "color-name": "~1.1.4" } @@ -8134,17 +8416,20 @@ "color-name": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true }, "has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, "requires": { "has-flag": "^4.0.0" } @@ -8152,9 +8437,10 @@ } }, "listr2": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/listr2/-/listr2-2.6.2.tgz", - "integrity": "sha512-6x6pKEMs8DSIpA/tixiYY2m/GcbgMplMVmhQAaLFxEtNSKLeWTGjtmU57xvv6QCm2XcqzyNXL/cTSVf4IChCRA==", + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/listr2/-/listr2-3.2.2.tgz", + "integrity": "sha512-AajqcZEUikF2ioph6PfH3dIuxJclhr3i3kHgTOP0xeXdWQohrvJAAmqVcV43/GI987HFY/vzT73jYXoa4esDHg==", + "dev": true, "requires": { "chalk": "^4.1.0", "cli-truncate": "^2.1.0", @@ -8162,7 +8448,7 @@ "indent-string": "^4.0.0", "log-update": "^4.0.0", "p-map": "^4.0.0", - "rxjs": "^6.6.2", + "rxjs": "^6.6.3", "through": "^2.3.8" }, "dependencies": { @@ -8170,6 +8456,7 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, "requires": { "color-convert": "^2.0.1" } @@ -8178,6 +8465,7 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "dev": true, "requires": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -8187,6 +8475,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, "requires": { "color-name": "~1.1.4" } @@ -8194,17 +8483,20 @@ "color-name": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true }, "has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, "requires": { "has-flag": "^4.0.0" } @@ -8238,19 +8530,22 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, "requires": { "p-locate": "^4.1.0" } }, "lodash": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz", - "integrity": "sha1-W/Rejkm6QYnhfUgnid/RW9FAt7Y=" + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true }, "lodash.flatmap": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.flatmap/-/lodash.flatmap-4.5.0.tgz", - "integrity": "sha1-74y/QI9uSCaGYzRTBcaswLd4cC4=" + "integrity": "sha1-74y/QI9uSCaGYzRTBcaswLd4cC4=", + "dev": true }, "lodash.toarray": { "version": "4.4.0", @@ -8262,6 +8557,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.0.0.tgz", "integrity": "sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA==", + "dev": true, "requires": { "chalk": "^4.0.0" }, @@ -8270,6 +8566,7 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, "requires": { "color-convert": "^2.0.1" } @@ -8278,6 +8575,7 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "dev": true, "requires": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -8287,6 +8585,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, "requires": { "color-name": "~1.1.4" } @@ -8294,17 +8593,20 @@ "color-name": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true }, "has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, "requires": { "has-flag": "^4.0.0" } @@ -8315,6 +8617,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/log-update/-/log-update-4.0.0.tgz", "integrity": "sha512-9fkkDevMefjg0mmzWFBW8YkFP91OrizzkW3diF7CpG+S2EYdy4+TVfGwz1zeF8x7hCx1ovSPTOE9Ngib74qqUg==", + "dev": true, "requires": { "ansi-escapes": "^4.3.0", "cli-cursor": "^3.1.0", @@ -8326,6 +8629,7 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, "requires": { "color-convert": "^2.0.1" } @@ -8334,6 +8638,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, "requires": { "color-name": "~1.1.4" } @@ -8341,17 +8646,20 @@ "color-name": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true }, "is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true }, "slice-ansi": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", + "dev": true, "requires": { "ansi-styles": "^4.0.0", "astral-regex": "^2.0.0", @@ -8363,12 +8671,14 @@ "lowercase-keys": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", - "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==" + "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", + "dev": true }, "ltgt": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/ltgt/-/ltgt-2.2.1.tgz", - "integrity": "sha1-81ypHEk/e3PaDgdJUwTxezH4fuU=" + "integrity": "sha1-81ypHEk/e3PaDgdJUwTxezH4fuU=", + "dev": true }, "make-dir": { "version": "1.3.0", @@ -8450,6 +8760,7 @@ "version": "1.3.5", "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", + "dev": true, "requires": { "hash-base": "^3.0.0", "inherits": "^2.0.1", @@ -8459,12 +8770,14 @@ "media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" + "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", + "dev": true }, "memdown": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/memdown/-/memdown-1.4.1.tgz", "integrity": "sha1-tOThkhdGZP+65BNhqlAPMRnv4hU=", + "dev": true, "requires": { "abstract-leveldown": "~2.7.1", "functional-red-black-tree": "^1.0.1", @@ -8478,6 +8791,7 @@ "version": "2.7.2", "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-2.7.2.tgz", "integrity": "sha512-+OVvxH2rHVEhWLdbudP6p0+dNMXu8JA1CbhP19T8paTYAcX7oJ4OVjT+ZUVpv7mITxXHqDMej+GdqXBmXkw09w==", + "dev": true, "requires": { "xtend": "~4.0.0" } @@ -8485,19 +8799,22 @@ "safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true } } }, "merge-descriptors": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" + "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=", + "dev": true }, "merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==" + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true }, "merge2": { "version": "1.4.1", @@ -8509,6 +8826,7 @@ "version": "2.3.2", "resolved": "https://registry.npmjs.org/merkle-patricia-tree/-/merkle-patricia-tree-2.3.2.tgz", "integrity": "sha512-81PW5m8oz/pz3GvsAwbauj7Y00rqm81Tzad77tHBwU7pIAtN+TJnMSOJhxBKflSVYhptMMb9RskhqHqrSm1V+g==", + "dev": true, "requires": { "async": "^1.4.2", "ethereumjs-util": "^5.0.0", @@ -8523,12 +8841,14 @@ "bn.js": { "version": "4.11.9", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", + "dev": true }, "ethereumjs-util": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz", "integrity": "sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ==", + "dev": true, "requires": { "bn.js": "^4.11.0", "create-hash": "^1.1.2", @@ -8543,6 +8863,7 @@ "version": "2.3.7", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, "requires": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", @@ -8556,7 +8877,8 @@ "safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true } } }, @@ -8564,6 +8886,7 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, "requires": { "safe-buffer": "~5.1.0" }, @@ -8571,7 +8894,8 @@ "safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true } } } @@ -8580,12 +8904,14 @@ "methods": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" + "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=", + "dev": true }, "micromatch": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz", "integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==", + "dev": true, "requires": { "braces": "^3.0.1", "picomatch": "^2.0.5" @@ -8595,6 +8921,7 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", + "dev": true, "requires": { "bn.js": "^4.0.0", "brorand": "^1.0.1" @@ -8603,24 +8930,28 @@ "bn.js": { "version": "4.11.9", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", + "dev": true } } }, "mime": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "dev": true }, "mime-db": { "version": "1.44.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz", - "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==" + "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==", + "dev": true }, "mime-types": { "version": "2.1.27", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz", "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==", + "dev": true, "requires": { "mime-db": "1.44.0" } @@ -8633,12 +8964,14 @@ "mimic-response": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", - "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==" + "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", + "dev": true }, "min-document": { "version": "2.19.0", "resolved": "https://registry.npmjs.org/min-document/-/min-document-2.19.0.tgz", "integrity": "sha1-e9KC4/WELtKVu3SM3Z8f+iyCRoU=", + "dev": true, "requires": { "dom-walk": "^0.1.0" } @@ -8657,6 +8990,7 @@ "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, "requires": { "brace-expansion": "^1.1.7" } @@ -8664,12 +8998,14 @@ "minimist": { "version": "1.2.5", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "dev": true }, "minipass": { "version": "2.9.0", "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz", "integrity": "sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==", + "dev": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -8679,6 +9015,7 @@ "version": "1.3.3", "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.3.3.tgz", "integrity": "sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q==", + "dev": true, "requires": { "minipass": "^2.9.0" } @@ -8687,6 +9024,7 @@ "version": "0.5.5", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "dev": true, "requires": { "minimist": "^1.2.5" } @@ -8695,6 +9033,7 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/mkdirp-promise/-/mkdirp-promise-5.0.1.tgz", "integrity": "sha1-6bj2jlUsaKnBcTuEiD96HdA5uKE=", + "dev": true, "requires": { "mkdirp": "*" } @@ -8703,6 +9042,7 @@ "version": "8.1.2", "resolved": "https://registry.npmjs.org/mocha/-/mocha-8.1.2.tgz", "integrity": "sha512-I8FRAcuACNMLQn3lS4qeWLxXqLvGf6r2CaLstDpZmMUUSmvW6Cnm1AuHxgbc7ctZVRcfwspCRbDHymPsi3dkJw==", + "dev": true, "requires": { "ansi-colors": "4.1.1", "browser-stdout": "1.3.1", @@ -8735,6 +9075,7 @@ "version": "4.1.1", "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, "requires": { "ms": "^2.1.1" } @@ -8742,12 +9083,14 @@ "escape-string-regexp": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==" + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true }, "find-up": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, "requires": { "locate-path": "^6.0.0", "path-exists": "^4.0.0" @@ -8757,6 +9100,7 @@ "version": "7.1.6", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "dev": true, "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -8769,12 +9113,14 @@ "has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true }, "locate-path": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, "requires": { "p-locate": "^5.0.0" } @@ -8783,6 +9129,7 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.0.2.tgz", "integrity": "sha512-iwqZSOoWIW+Ew4kAGUlN16J4M7OB3ysMLSZtnhmqx7njIHFPlxWBX8xo3lVTyFVq6mI/lL9qt2IsN1sHwaxJkg==", + "dev": true, "requires": { "p-try": "^2.0.0" } @@ -8791,6 +9138,7 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, "requires": { "p-limit": "^3.0.2" } @@ -8798,12 +9146,14 @@ "strip-json-comments": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.0.1.tgz", - "integrity": "sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw==" + "integrity": "sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw==", + "dev": true }, "supports-color": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "dev": true, "requires": { "has-flag": "^4.0.0" } @@ -8812,6 +9162,7 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, "requires": { "isexe": "^2.0.0" } @@ -8866,29 +9217,33 @@ "mock-fs": { "version": "4.13.0", "resolved": "https://registry.npmjs.org/mock-fs/-/mock-fs-4.13.0.tgz", - "integrity": "sha512-DD0vOdofJdoaRNtnWcrXe6RQbpHkPPmtqGq14uRX0F8ZKJ5nv89CVTYl/BZdppDxBDaV0hl75htg3abpEWlPZA==" + "integrity": "sha512-DD0vOdofJdoaRNtnWcrXe6RQbpHkPPmtqGq14uRX0F8ZKJ5nv89CVTYl/BZdppDxBDaV0hl75htg3abpEWlPZA==", + "dev": true }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true }, "multibase": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/multibase/-/multibase-0.6.1.tgz", "integrity": "sha512-pFfAwyTjbbQgNc3G7D48JkJxWtoJoBMaR4xQUOuB8RnCgRqaYmWNFeJTTvrJ2w51bjLq2zTby6Rqj9TQ9elSUw==", + "dev": true, "requires": { "base-x": "^3.0.8", "buffer": "^5.5.0" }, "dependencies": { "buffer": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.6.0.tgz", - "integrity": "sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw==", + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, "requires": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4" + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" } } } @@ -8897,6 +9252,7 @@ "version": "0.5.7", "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-0.5.7.tgz", "integrity": "sha512-PscoRxm3f+88fAtELwUnZxGDkduE2HD9Q6GHUOywQLjOGT/HAdhjLDYNZ1e7VR0s0TP0EwZ16LNUTFpoBGivOA==", + "dev": true, "requires": { "varint": "^5.0.0" } @@ -8905,6 +9261,7 @@ "version": "0.4.21", "resolved": "https://registry.npmjs.org/multihashes/-/multihashes-0.4.21.tgz", "integrity": "sha512-uVSvmeCWf36pU2nB4/1kzYZjsXD9vofZKpgudqkceYY5g2aZZXJ5r9lxuzoRLl1OAp28XljXsEJ/X/85ZsKmKw==", + "dev": true, "requires": { "buffer": "^5.5.0", "multibase": "^0.7.0", @@ -8912,18 +9269,20 @@ }, "dependencies": { "buffer": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.6.0.tgz", - "integrity": "sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw==", + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, "requires": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4" + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" } }, "multibase": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/multibase/-/multibase-0.7.0.tgz", "integrity": "sha512-TW8q03O0f6PNFTQDvh3xxH03c8CjGaaYrjkl9UQPG6rz53TQzzxJVCIWVjzcbN/Q5Y53Zd0IBQBMVktVgNx4Fg==", + "dev": true, "requires": { "base-x": "^3.0.8", "buffer": "^5.5.0" @@ -8945,37 +9304,44 @@ "nano-json-stream-parser": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/nano-json-stream-parser/-/nano-json-stream-parser-0.1.2.tgz", - "integrity": "sha1-DMj20OK2IrR5xA1JnEbWS3Vcb18=" + "integrity": "sha1-DMj20OK2IrR5xA1JnEbWS3Vcb18=", + "dev": true }, "natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=" + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true }, "negotiator": { "version": "0.6.2", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", - "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==" + "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==", + "dev": true }, "neo-async": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", - "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==" + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true }, "next-tick": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", - "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=" + "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=", + "dev": true }, "nice-try": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", - "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==" + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true }, "node-addon-api": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-2.0.2.tgz", - "integrity": "sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==" + "integrity": "sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==", + "dev": true }, "node-emoji": { "version": "1.10.0", @@ -9012,17 +9378,14 @@ "node-gyp-build": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.2.3.tgz", - "integrity": "sha512-MN6ZpzmfNCRM+3t57PTJHgHyw/h4OWnZ6mR8P5j/uZtqQr46RRuDE/P+g3n0YR/AiYXeWixZZzaip77gdICfRg==" - }, - "noop6": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/noop6/-/noop6-1.0.9.tgz", - "integrity": "sha512-DB3Hwyd89dPr5HqEPg3YHjzvwh/mCqizC1zZ8vyofqc+TQRyPDnT4wgXXbLGF4z9YAzwwTLi8pNLhGqcbSjgkA==" + "integrity": "sha512-MN6ZpzmfNCRM+3t57PTJHgHyw/h4OWnZ6mR8P5j/uZtqQr46RRuDE/P+g3n0YR/AiYXeWixZZzaip77gdICfRg==", + "dev": true }, "nopt": { "version": "3.0.6", "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", + "dev": true, "requires": { "abbrev": "1" } @@ -9060,17 +9423,20 @@ "normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true }, "normalize-url": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.0.tgz", - "integrity": "sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ==" + "integrity": "sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ==", + "dev": true }, "npm-run-path": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, "requires": { "path-key": "^3.0.0" } @@ -9078,12 +9444,14 @@ "number-is-nan": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "dev": true }, "number-to-bn": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/number-to-bn/-/number-to-bn-1.7.0.tgz", "integrity": "sha1-uzYjWS9+X54AMLGXe9QaDFP+HqA=", + "dev": true, "requires": { "bn.js": "4.11.6", "strip-hex-prefix": "1.0.0" @@ -9092,19 +9460,22 @@ "bn.js": { "version": "4.11.6", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", - "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=" + "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=", + "dev": true } } }, "oauth-sign": { "version": "0.9.0", "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", - "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==" + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", + "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=" + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true }, "object-inspect": { "version": "1.8.0", @@ -9120,6 +9491,7 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", + "dev": true, "requires": { "define-properties": "^1.1.2", "function-bind": "^1.1.1", @@ -9164,6 +9536,7 @@ "version": "2.1.5", "resolved": "https://registry.npmjs.org/oboe/-/oboe-2.1.5.tgz", "integrity": "sha1-VVQoTFQ6ImbXo48X4HOCH73jk80=", + "dev": true, "requires": { "http-https": "^1.0.0" } @@ -9172,6 +9545,7 @@ "version": "2.3.0", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "dev": true, "requires": { "ee-first": "1.1.1" } @@ -9180,6 +9554,7 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, "requires": { "wrappy": "1" } @@ -9195,7 +9570,8 @@ "opencollective-postinstall": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/opencollective-postinstall/-/opencollective-postinstall-2.0.3.tgz", - "integrity": "sha512-8AV/sCtuzUeTo8gQK5qDZzARrulB3egtLzFgteqB2tcT4Mw7B8Kt7JcDHmltjz6FOAHsvTevk70gZEbhM4ZS9Q==" + "integrity": "sha512-8AV/sCtuzUeTo8gQK5qDZzARrulB3egtLzFgteqB2tcT4Mw7B8Kt7JcDHmltjz6FOAHsvTevk70gZEbhM4ZS9Q==", + "dev": true }, "openzeppelin-solidity": { "version": "2.3.0", @@ -9206,6 +9582,7 @@ "version": "0.8.3", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "dev": true, "requires": { "deep-is": "~0.1.3", "fast-levenshtein": "~2.0.6", @@ -9218,7 +9595,8 @@ "original-require": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/original-require/-/original-require-1.0.1.tgz", - "integrity": "sha1-DxMEcVhM0zURxew4yNWSE/msXiA=" + "integrity": "sha1-DxMEcVhM0zURxew4yNWSE/msXiA=", + "dev": true }, "os-tmpdir": { "version": "1.0.2", @@ -9228,17 +9606,20 @@ "p-cancelable": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz", - "integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==" + "integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==", + "dev": true }, "p-finally": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=" + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "dev": true }, "p-limit": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, "requires": { "p-try": "^2.0.0" } @@ -9247,6 +9628,7 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, "requires": { "p-limit": "^2.2.0" } @@ -9255,6 +9637,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", + "dev": true, "requires": { "aggregate-error": "^3.0.0" } @@ -9263,6 +9646,7 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-1.2.1.tgz", "integrity": "sha1-XrOzU7f86Z8QGhA4iAuwVOu+o4Y=", + "dev": true, "requires": { "p-finally": "^1.0.0" } @@ -9270,12 +9654,14 @@ "p-try": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true }, "parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, "requires": { "callsites": "^3.0.0" } @@ -9284,6 +9670,7 @@ "version": "5.1.6", "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.6.tgz", "integrity": "sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw==", + "dev": true, "requires": { "asn1.js": "^5.2.0", "browserify-aes": "^1.0.0", @@ -9301,12 +9688,14 @@ "parse-headers": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/parse-headers/-/parse-headers-2.0.3.tgz", - "integrity": "sha512-QhhZ+DCCit2Coi2vmAKbq5RGTRcQUOE2+REgv8vdyu7MnYx2eZztegqtTx99TZ86GTIwqiy3+4nQTWZ2tgmdCA==" + "integrity": "sha512-QhhZ+DCCit2Coi2vmAKbq5RGTRcQUOE2+REgv8vdyu7MnYx2eZztegqtTx99TZ86GTIwqiy3+4nQTWZ2tgmdCA==", + "dev": true }, "parse-json": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.1.0.tgz", "integrity": "sha512-+mi/lmVVNKFNVyLXV31ERiy2CY5E1/F6QtJFEzoChPRwwngMNXRDQ9GJ5WdE2Z2P4AujsOi0/+2qHID68KwfIQ==", + "dev": true, "requires": { "@babel/code-frame": "^7.0.0", "error-ex": "^1.3.1", @@ -9317,52 +9706,62 @@ "parseurl": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", - "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "dev": true }, "path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true }, "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true }, "path-is-inside": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", - "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=" + "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", + "dev": true }, "path-key": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==" + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true }, "path-parse": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==" + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "dev": true }, "path-to-regexp": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" + "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=", + "dev": true }, "path-type": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==" + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true }, "pathval": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.0.tgz", - "integrity": "sha1-uULm1L3mUwBe9rcTYd74cn0GReA=" + "integrity": "sha1-uULm1L3mUwBe9rcTYd74cn0GReA=", + "dev": true }, "pbkdf2": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.1.tgz", "integrity": "sha512-4Ejy1OPxi9f2tt1rRV7Go7zmfDQ+ZectEQz3VGUQhgq62HtIRPDyG/JtnwIxs6x3uNMwo2V7q1fMvKjb+Tnpqg==", + "dev": true, "requires": { "create-hash": "^1.1.2", "create-hmac": "^1.1.4", @@ -9380,12 +9779,14 @@ "performance-now": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", + "dev": true }, "picomatch": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", - "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==" + "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", + "dev": true }, "pify": { "version": "2.3.0", @@ -9412,6 +9813,7 @@ "version": "4.2.0", "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, "requires": { "find-up": "^4.0.0" } @@ -9420,6 +9822,7 @@ "version": "3.2.0", "resolved": "https://registry.npmjs.org/please-upgrade-node/-/please-upgrade-node-3.2.0.tgz", "integrity": "sha512-gQR3WpIgNIKwBMVLkpMUeR3e1/E1y42bqDQZfql+kDeXd8COYfM8PQA4X6y7a8u9Ua9FHmsrrmirW2vHs45hWg==", + "dev": true, "requires": { "semver-compare": "^1.0.0" } @@ -9427,38 +9830,45 @@ "precond": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/precond/-/precond-0.2.3.tgz", - "integrity": "sha1-qpWRvKokkj8eD0hJ0kD0fvwQdaw=" + "integrity": "sha1-qpWRvKokkj8eD0hJ0kD0fvwQdaw=", + "dev": true }, "prelude-ls": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=" + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "dev": true }, "prepend-http": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", - "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=" + "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", + "dev": true }, "prettier": { "version": "1.19.1", "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.19.1.tgz", "integrity": "sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==", + "dev": true, "optional": true }, "process": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/process/-/process-0.5.2.tgz", - "integrity": "sha1-FjjYqONML0QKkduVq5rrZ3/Bhc8=" + "integrity": "sha1-FjjYqONML0QKkduVq5rrZ3/Bhc8=", + "dev": true }, "process-nextick-args": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true }, "progress": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==" + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true }, "promise": { "version": "8.1.0", @@ -9473,6 +9883,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/promise-to-callback/-/promise-to-callback-1.0.0.tgz", "integrity": "sha1-XSp0kBC/tn2WNZj805YHRqaP7vc=", + "dev": true, "requires": { "is-fn": "^1.0.0", "set-immediate-shim": "^1.0.1" @@ -9482,6 +9893,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/promise.allsettled/-/promise.allsettled-1.0.2.tgz", "integrity": "sha512-UpcYW5S1RaNKT6pd+s9jp9K9rlQge1UXKskec0j6Mmuq7UJCvlS2J2/s/yuPN8ehftf9HXMxWlKiPbGGUzpoRg==", + "dev": true, "requires": { "array.prototype.map": "^1.0.1", "define-properties": "^1.1.3", @@ -9494,6 +9906,7 @@ "version": "2.0.6", "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.6.tgz", "integrity": "sha512-dh/frvCBVmSsDYzw6n926jv974gddhkFPfiN8hPOi30Wax25QZyZEGveluCgliBnqmuM+UJmBErbAUFIoDbjOw==", + "dev": true, "requires": { "forwarded": "~0.1.2", "ipaddr.js": "1.9.1" @@ -9502,17 +9915,20 @@ "prr": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", - "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=" + "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=", + "dev": true }, "psl": { "version": "1.8.0", "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", - "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==" + "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", + "dev": true }, "public-encrypt": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", + "dev": true, "requires": { "bn.js": "^4.1.0", "browserify-rsa": "^4.0.0", @@ -9525,7 +9941,8 @@ "bn.js": { "version": "4.11.9", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", + "dev": true } } }, @@ -9533,6 +9950,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dev": true, "requires": { "end-of-stream": "^1.1.0", "once": "^1.3.1" @@ -9546,12 +9964,14 @@ "qs": { "version": "6.7.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", - "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==" + "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==", + "dev": true }, "query-string": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/query-string/-/query-string-5.1.1.tgz", "integrity": "sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==", + "dev": true, "requires": { "decode-uri-component": "^0.2.0", "object-assign": "^4.1.0", @@ -9567,6 +9987,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, "requires": { "safe-buffer": "^5.1.0" } @@ -9575,6 +9996,7 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", + "dev": true, "requires": { "randombytes": "^2.0.5", "safe-buffer": "^5.1.0" @@ -9589,12 +10011,14 @@ "range-parser": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", - "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==" + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "dev": true }, "raw-body": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz", "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==", + "dev": true, "requires": { "bytes": "3.1.0", "http-errors": "1.7.2", @@ -9689,6 +10113,7 @@ "version": "3.6.0", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, "requires": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", @@ -9699,6 +10124,7 @@ "version": "3.4.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.4.0.tgz", "integrity": "sha512-0xe001vZBnJEK+uKcj8qOhyAKPzIT+gStxWr3LCB0DwcXR5NZJ3IaC+yGnHCYzB/S7ov3m3EEbZI2zeNvX+hGQ==", + "dev": true, "requires": { "picomatch": "^2.2.1" } @@ -9741,12 +10167,14 @@ "regenerator-runtime": { "version": "0.13.7", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz", - "integrity": "sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew==" + "integrity": "sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew==", + "dev": true }, "regexpp": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", - "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==" + "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", + "dev": true }, "req-cwd": { "version": "2.0.0", @@ -9778,6 +10206,7 @@ "version": "2.88.2", "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", + "dev": true, "requires": { "aws-sign2": "~0.7.0", "aws4": "^1.8.0", @@ -9804,7 +10233,8 @@ "qs": { "version": "6.5.2", "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", - "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", + "dev": true } } }, @@ -9851,27 +10281,32 @@ "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true }, "require-main-filename": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==" + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "dev": true }, "resolve": { "version": "1.1.7", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", - "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=" + "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=", + "dev": true }, "resolve-from": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==" + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true }, "responselike": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", + "dev": true, "requires": { "lowercase-keys": "^1.0.0" } @@ -9895,6 +10330,7 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "dev": true, "requires": { "hash-base": "^3.0.0", "inherits": "^2.0.1" @@ -9904,6 +10340,7 @@ "version": "2.2.6", "resolved": "https://registry.npmjs.org/rlp/-/rlp-2.2.6.tgz", "integrity": "sha512-HAfAmL6SDYNWPUOJNrM500x4Thn4PZsEy5pijPh40U9WfNk0z15hUYzO9xVIMAdIHdFtD8CBDHd75Td1g36Mjg==", + "dev": true, "requires": { "bn.js": "^4.11.1" }, @@ -9911,7 +10348,8 @@ "bn.js": { "version": "4.11.9", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", + "dev": true } } }, @@ -9929,7 +10367,8 @@ "rustbn.js": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/rustbn.js/-/rustbn.js-0.2.0.tgz", - "integrity": "sha512-4VlvkRUuCJvr2J6Y0ImW7NvTCriMi7ErOAqWk1y69vAdoNIzCF3yPmgeNzx+RQTLEDFq5sHfscn1MwHxP9hNfA==" + "integrity": "sha512-4VlvkRUuCJvr2J6Y0ImW7NvTCriMi7ErOAqWk1y69vAdoNIzCF3yPmgeNzx+RQTLEDFq5sHfscn1MwHxP9hNfA==", + "dev": true }, "rxjs": { "version": "6.6.3", @@ -9942,12 +10381,14 @@ "safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true }, "safe-event-emitter": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/safe-event-emitter/-/safe-event-emitter-1.0.1.tgz", "integrity": "sha512-e1wFe99A91XYYxoQbcq2ZJUWurxEyP8vfz7A7vuUe1s95q8r5ebraVaA1BukYJcpM6V16ugWoD9vngi8Ccu5fg==", + "dev": true, "requires": { "events": "^3.0.0" }, @@ -9955,7 +10396,8 @@ "events": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/events/-/events-3.2.0.tgz", - "integrity": "sha512-/46HWwbfCX2xTawVfkKLGxMifJYQBWMwY1mjywRtb4c9x8l5NP3KoJtnIOiL1hfdRkIuYhETxQlo62IF8tcnlg==" + "integrity": "sha512-/46HWwbfCX2xTawVfkKLGxMifJYQBWMwY1mjywRtb4c9x8l5NP3KoJtnIOiL1hfdRkIuYhETxQlo62IF8tcnlg==", + "dev": true } } }, @@ -10001,6 +10443,7 @@ "version": "4.0.2", "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-4.0.2.tgz", "integrity": "sha512-UDar4sKvWAksIlfX3xIaQReADn+WFnHvbVujpcbr+9Sf/69odMwy2MUsz5CKLQgX9nsIyrjuxL2imVyoNHa3fg==", + "dev": true, "requires": { "elliptic": "^6.5.2", "node-addon-api": "^2.0.0", @@ -10027,7 +10470,8 @@ "semaphore": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/semaphore/-/semaphore-1.1.0.tgz", - "integrity": "sha512-O4OZEaNtkMd/K0i6js9SL+gqy0ZCBMgUvlSqHKi4IBdjhe7wB8pwztUk1BbZ1fmrvpwFrPbHzqd2w5pTcJH6LA==" + "integrity": "sha512-O4OZEaNtkMd/K0i6js9SL+gqy0ZCBMgUvlSqHKi4IBdjhe7wB8pwztUk1BbZ1fmrvpwFrPbHzqd2w5pTcJH6LA==", + "dev": true }, "semver": { "version": "7.3.2", @@ -10037,17 +10481,20 @@ "semver-compare": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz", - "integrity": "sha1-De4hahyUGrN+nvsXiPavxf9VN/w=" + "integrity": "sha1-De4hahyUGrN+nvsXiPavxf9VN/w=", + "dev": true }, "semver-regex": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/semver-regex/-/semver-regex-2.0.0.tgz", - "integrity": "sha512-mUdIBBvdn0PLOeP3TEkMH7HHeUP3GjsXCwKarjv/kGmUFOYg1VqEemKhoQpWMu6X2I8kHeuVdGibLGkVK+/5Qw==" + "integrity": "sha512-mUdIBBvdn0PLOeP3TEkMH7HHeUP3GjsXCwKarjv/kGmUFOYg1VqEemKhoQpWMu6X2I8kHeuVdGibLGkVK+/5Qw==", + "dev": true }, "send": { "version": "0.17.1", "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==", + "dev": true, "requires": { "debug": "2.6.9", "depd": "~1.1.2", @@ -10068,6 +10515,7 @@ "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, "requires": { "ms": "2.0.0" }, @@ -10075,14 +10523,16 @@ "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true } } }, "ms": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true } } }, @@ -10090,6 +10540,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-4.0.0.tgz", "integrity": "sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==", + "dev": true, "requires": { "randombytes": "^2.1.0" } @@ -10098,6 +10549,7 @@ "version": "1.14.1", "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz", "integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==", + "dev": true, "requires": { "encodeurl": "~1.0.2", "escape-html": "~1.0.3", @@ -10109,6 +10561,7 @@ "version": "0.1.12", "resolved": "https://registry.npmjs.org/servify/-/servify-0.1.12.tgz", "integrity": "sha512-/xE6GvsKKqyo1BAY+KxOWXcLpPsUUyji7Qg3bVD7hh1eRze5bR1uYiuDA/k3Gof1s9BTzQZEJK8sNcNGFIzeWw==", + "dev": true, "requires": { "body-parser": "^1.16.0", "cors": "^2.8.1", @@ -10120,27 +10573,32 @@ "set-blocking": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true }, "set-immediate-shim": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", - "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=" + "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=", + "dev": true }, "setimmediate": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", - "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=" + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=", + "dev": true }, "setprototypeof": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", - "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==" + "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==", + "dev": true }, "sha.js": { "version": "2.4.11", "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "dev": true, "requires": { "inherits": "^2.0.1", "safe-buffer": "^5.0.1" @@ -10160,6 +10618,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, "requires": { "shebang-regex": "^3.0.0" } @@ -10167,7 +10626,8 @@ "shebang-regex": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==" + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true }, "shelljs": { "version": "0.8.4", @@ -10204,12 +10664,14 @@ "simple-concat": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", - "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==" + "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", + "dev": true }, "simple-get": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-2.8.1.tgz", "integrity": "sha512-lSSHRSw3mQNUGPAYRqo7xy9dhKmxFXIjLjp4KHpf99GEH2VH7C3AM+Qfx6du6jhfUi6Vm7XnbEVEf7Wb6N8jRw==", + "dev": true, "requires": { "decompress-response": "^3.3.0", "once": "^1.3.1", @@ -10219,12 +10681,14 @@ "slash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==" + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true }, "slice-ansi": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-3.0.0.tgz", "integrity": "sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==", + "dev": true, "requires": { "ansi-styles": "^4.0.0", "astral-regex": "^2.0.0", @@ -10235,6 +10699,7 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, "requires": { "color-convert": "^2.0.1" } @@ -10243,6 +10708,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, "requires": { "color-name": "~1.1.4" } @@ -10250,24 +10716,22 @@ "color-name": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true }, "is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true } } }, - "sliced": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/sliced/-/sliced-1.0.1.tgz", - "integrity": "sha1-CzpmK10Ewxd7GSa+qCsD+Dei70E=" - }, "solhint": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/solhint/-/solhint-3.2.2.tgz", - "integrity": "sha512-cd9AQhmbsIp6YhMc4ezSawx9VQEASEvl4iThGSRFFozmTRM7c0lSxYrcrSk04jHMuw0g3IdnbxwmQV6hpxNhqA==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/solhint/-/solhint-3.3.1.tgz", + "integrity": "sha512-JXAOLM2UQrLOtx4fKXzleq6CR0N7AlRfki+dFyvab93x4DoHeHQ4Ic2LMScT8V0AddXgbKtR8xdIIZKLh07dNg==", + "dev": true, "requires": { "@solidity-parser/parser": "^0.8.1", "ajv": "^6.6.1", @@ -10289,17 +10753,20 @@ "ansi-escapes": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", - "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==" + "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", + "dev": true }, "ansi-regex": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true }, "chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, "requires": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", @@ -10310,6 +10777,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", + "dev": true, "requires": { "restore-cursor": "^2.0.0" } @@ -10317,17 +10785,20 @@ "cli-width": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.1.tgz", - "integrity": "sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw==" + "integrity": "sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw==", + "dev": true }, "commander": { "version": "2.18.0", "resolved": "https://registry.npmjs.org/commander/-/commander-2.18.0.tgz", - "integrity": "sha512-6CYPa+JP2ftfRU2qkDK+UTVeQYosOg/2GbcjIcKPHfinyOLPVGXu/ovN86RP49Re5ndJK1N0kuiidFFuepc4ZQ==" + "integrity": "sha512-6CYPa+JP2ftfRU2qkDK+UTVeQYosOg/2GbcjIcKPHfinyOLPVGXu/ovN86RP49Re5ndJK1N0kuiidFFuepc4ZQ==", + "dev": true }, "cosmiconfig": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.2.1.tgz", "integrity": "sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA==", + "dev": true, "requires": { "import-fresh": "^2.0.0", "is-directory": "^0.3.1", @@ -10339,6 +10810,7 @@ "version": "6.0.5", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, "requires": { "nice-try": "^1.0.4", "path-key": "^2.0.1", @@ -10350,7 +10822,8 @@ "semver": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true } } }, @@ -10358,6 +10831,7 @@ "version": "5.16.0", "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.16.0.tgz", "integrity": "sha512-S3Rz11i7c8AA5JPv7xAH+dOyq/Cu/VXHiHXBPOU1k/JAM5dXqQPt3qcrhpHSorXmrpu2g0gkIBVXAqCpzfoZIg==", + "dev": true, "requires": { "@babel/code-frame": "^7.0.0", "ajv": "^6.9.1", @@ -10398,9 +10872,10 @@ }, "dependencies": { "import-fresh": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.1.tgz", - "integrity": "sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ==", + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.2.tgz", + "integrity": "sha512-cTPNrlvJT6twpYy+YmKUKrTSjWFs3bjYjAhCwm+z4EOCubZxAuO+hHpRN64TqjEaYSHs7tJAE0w1CKMGmsG/lw==", + "dev": true, "requires": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" @@ -10409,12 +10884,14 @@ "resolve-from": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==" + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true }, "semver": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true } } }, @@ -10422,6 +10899,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", + "dev": true, "requires": { "escape-string-regexp": "^1.0.5" } @@ -10430,6 +10908,7 @@ "version": "7.1.6", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "dev": true, "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -10443,6 +10922,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-2.0.0.tgz", "integrity": "sha1-2BNVwVYS04bGH53dOSLUMEgipUY=", + "dev": true, "requires": { "caller-path": "^2.0.0", "resolve-from": "^3.0.0" @@ -10452,6 +10932,7 @@ "version": "6.5.2", "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.5.2.tgz", "integrity": "sha512-cntlB5ghuB0iuO65Ovoi8ogLHiWGs/5yNrtUcKjFhSSiVeAIVpD7koaSU9RM8mpXw5YDi9RdYXGQMaOURB7ycQ==", + "dev": true, "requires": { "ansi-escapes": "^3.2.0", "chalk": "^2.4.2", @@ -10471,12 +10952,14 @@ "ansi-regex": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true }, "strip-ansi": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, "requires": { "ansi-regex": "^4.1.0" } @@ -10486,27 +10969,26 @@ "is-fullwidth-code-point": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" - }, - "lodash": { - "version": "4.17.20", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", - "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==" + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true }, "mimic-fn": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", - "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==" + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", + "dev": true }, "mute-stream": { "version": "0.0.7", "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", - "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=" + "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", + "dev": true }, "onetime": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", + "dev": true, "requires": { "mimic-fn": "^1.0.0" } @@ -10515,6 +10997,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "dev": true, "requires": { "error-ex": "^1.3.1", "json-parse-better-errors": "^1.0.1" @@ -10523,17 +11006,20 @@ "path-key": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=" + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true }, "resolve-from": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", - "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=" + "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", + "dev": true }, "restore-cursor": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", + "dev": true, "requires": { "onetime": "^2.0.0", "signal-exit": "^3.0.2" @@ -10542,12 +11028,14 @@ "semver": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true }, "shebang-command": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, "requires": { "shebang-regex": "^1.0.0" } @@ -10555,12 +11043,14 @@ "shebang-regex": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=" + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true }, "string-width": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, "requires": { "is-fullwidth-code-point": "^2.0.0", "strip-ansi": "^4.0.0" @@ -10570,6 +11060,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, "requires": { "ansi-regex": "^3.0.0" } @@ -10687,6 +11178,7 @@ "version": "0.2.0", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.2.0.tgz", "integrity": "sha1-2rc/vPwrqBm03gO9b26qSBZLP50=", + "dev": true, "optional": true, "requires": { "amdefine": ">=0.0.4" @@ -10696,6 +11188,7 @@ "version": "0.5.19", "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", + "dev": true, "requires": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" @@ -10704,7 +11197,8 @@ "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true } } }, @@ -10743,12 +11237,14 @@ "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true }, "sshpk": { "version": "1.16.1", "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", + "dev": true, "requires": { "asn1": "~0.2.3", "assert-plus": "^1.0.0", @@ -10764,7 +11260,8 @@ "statuses": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", - "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" + "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=", + "dev": true }, "stealthy-require": { "version": "1.1.1", @@ -10775,17 +11272,20 @@ "strict-uri-encode": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", - "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=" + "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=", + "dev": true }, "string-argv": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.1.tgz", - "integrity": "sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg==" + "integrity": "sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg==", + "dev": true }, "string-width": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -10814,6 +11314,7 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, "requires": { "safe-buffer": "~5.2.0" } @@ -10822,6 +11323,7 @@ "version": "3.3.0", "resolved": "https://registry.npmjs.org/stringify-object/-/stringify-object-3.3.0.tgz", "integrity": "sha512-rHqiFh1elqCQ9WPLIC8I0Q/g/wj5J1eMkyoiD6eoQApWHP0FtlK7rqnhmabL5VUY9JQCcqwwvlOaSuutekgyrw==", + "dev": true, "requires": { "get-own-enumerable-property-symbols": "^3.0.0", "is-obj": "^1.0.1", @@ -10832,6 +11334,7 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, "requires": { "ansi-regex": "^2.0.0" } @@ -10860,12 +11363,14 @@ "strip-final-newline": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", - "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==" + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true }, "strip-hex-prefix": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz", "integrity": "sha1-DF8VX+8RUTczd96du1iNoFUA428=", + "dev": true, "requires": { "is-hex-prefixed": "1.0.0" } @@ -10873,12 +11378,14 @@ "strip-json-comments": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=" + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true }, "supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, "requires": { "has-flag": "^3.0.0" } @@ -10905,6 +11412,7 @@ "version": "0.1.40", "resolved": "https://registry.npmjs.org/swarm-js/-/swarm-js-0.1.40.tgz", "integrity": "sha512-yqiOCEoA4/IShXkY3WKwP5PvZhmoOOD8clsKA7EEcRILMkTEYHCQ21HDCAcVpmIxZq4LyZvWeRJ6quIyHk1caA==", + "dev": true, "requires": { "bluebird": "^3.5.0", "buffer": "^5.0.5", @@ -10920,33 +11428,26 @@ }, "dependencies": { "buffer": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.6.0.tgz", - "integrity": "sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw==", - "requires": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4" - } - }, - "fs-extra": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz", - "integrity": "sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==", + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" } }, "get-stream": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=" + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", + "dev": true }, "got": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/got/-/got-7.1.0.tgz", "integrity": "sha512-Y5WMo7xKKq1muPsxD+KmrR8DH5auG7fBdDVueZwETwV6VytKyU9OX/ddpq2/1hp1vIPvVb4T81dKQz3BivkNLw==", + "dev": true, "requires": { "decompress-response": "^3.2.0", "duplexer3": "^0.1.4", @@ -10967,22 +11468,26 @@ "is-stream": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true }, "p-cancelable": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.3.0.tgz", - "integrity": "sha512-RVbZPLso8+jFeq1MfNvgXtCRED2raz/dKpacfTNxsx6pLEpEomM7gah6VeHSYV3+vo0OAi4MkArtQcWWXuQoyw==" + "integrity": "sha512-RVbZPLso8+jFeq1MfNvgXtCRED2raz/dKpacfTNxsx6pLEpEomM7gah6VeHSYV3+vo0OAi4MkArtQcWWXuQoyw==", + "dev": true }, "prepend-http": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", - "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=" + "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", + "dev": true }, "url-parse-lax": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", + "dev": true, "requires": { "prepend-http": "^1.0.1" } @@ -11013,6 +11518,7 @@ "version": "5.4.6", "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==", + "dev": true, "requires": { "ajv": "^6.10.2", "lodash": "^4.17.14", @@ -11023,32 +11529,38 @@ "ansi-regex": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true }, "astral-regex": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", - "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==" + "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", + "dev": true }, "emoji-regex": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==" + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true }, "is-fullwidth-code-point": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true }, "lodash": { "version": "4.17.20", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", - "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==" + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true }, "slice-ansi": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", + "dev": true, "requires": { "ansi-styles": "^3.2.0", "astral-regex": "^1.0.0", @@ -11059,6 +11571,7 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, "requires": { "emoji-regex": "^7.0.1", "is-fullwidth-code-point": "^2.0.0", @@ -11069,6 +11582,7 @@ "version": "5.2.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, "requires": { "ansi-regex": "^4.1.0" } @@ -11079,6 +11593,7 @@ "version": "4.4.13", "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.13.tgz", "integrity": "sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA==", + "dev": true, "requires": { "chownr": "^1.1.1", "fs-minipass": "^1.2.5", @@ -11139,7 +11654,8 @@ "text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=" + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true }, "then-request": { "version": "6.0.2", @@ -11176,18 +11692,8 @@ "timed-out": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", - "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=" - }, - "tinyreq": { - "version": "3.4.2", - "resolved": "https://registry.npmjs.org/tinyreq/-/tinyreq-3.4.2.tgz", - "integrity": "sha512-VHl9n2w2t1HD9ftvbmYMA99g/yeioIRhpxT5cazb/jo2Vld5ZtPEVW4PhBFgNXjdL2ch8j6z0cawDCF7eIFZsQ==", - "requires": { - "assured": "^1.0.12", - "follow-redirects": "^1.4.1", - "noop6": "^1.0.7", - "ul": "^5.2.13" - } + "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=", + "dev": true }, "tmp": { "version": "0.0.33", @@ -11206,17 +11712,20 @@ "to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=" + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", + "dev": true }, "to-readable-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz", - "integrity": "sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==" + "integrity": "sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==", + "dev": true }, "to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, "requires": { "is-number": "^7.0.0" } @@ -11224,21 +11733,24 @@ "toidentifier": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", - "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==" + "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==", + "dev": true }, "tough-cookie": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "dev": true, "requires": { "psl": "^1.1.28", "punycode": "^2.1.1" } }, "truffle": { - "version": "5.1.49", - "resolved": "https://registry.npmjs.org/truffle/-/truffle-5.1.49.tgz", - "integrity": "sha512-SkCfYRPhruowxH+qpJBAvM0u5+j/LK51U85ErXeiuRhyCNEWMNjUtISHTlEZ0KLr0Kki68iXk+o2UekN4Nlp5g==", + "version": "5.1.52", + "resolved": "https://registry.npmjs.org/truffle/-/truffle-5.1.52.tgz", + "integrity": "sha512-8KwPuHumZnfDBJOoUEdXo7BFr1a/RSh1CDI4AoHsIC+STajJnr7EvJdaniJRlA3S+6Hn12b3PY8Zaarba8VSvQ==", + "dev": true, "requires": { "app-module-path": "^2.2.0", "mocha": "8.1.2", @@ -11297,6 +11809,7 @@ "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "dev": true, "requires": { "safe-buffer": "^5.0.1" } @@ -11304,17 +11817,20 @@ "tweetnacl": { "version": "0.14.5", "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "dev": true }, "type": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", - "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==" + "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==", + "dev": true }, "type-check": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "dev": true, "requires": { "prelude-ls": "~1.1.2" } @@ -11322,7 +11838,8 @@ "type-detect": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==" + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true }, "type-fest": { "version": "0.11.0", @@ -11333,6 +11850,7 @@ "version": "1.6.18", "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "dev": true, "requires": { "media-typer": "0.3.0", "mime-types": "~2.1.24" @@ -11348,42 +11866,23 @@ "version": "3.1.5", "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", + "dev": true, "requires": { "is-typedarray": "^1.0.0" } }, - "typescript": { - "version": "3.9.7", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.7.tgz", - "integrity": "sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw==" - }, - "typpy": { - "version": "2.3.12", - "resolved": "https://registry.npmjs.org/typpy/-/typpy-2.3.12.tgz", - "integrity": "sha512-VginyZYxadNyFnB763lvFGNUqsIRtJt2V33pLfdnjRreObbKaxexUC+39EVb3MavWU9ggekvT1ojEU0kvtumfA==", - "requires": { - "function.name": "^1.0.3" - } - }, "uglify-js": { "version": "3.11.3", "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.11.3.tgz", "integrity": "sha512-wDRziHG94mNj2n3R864CvYw/+pc9y/RNImiTyrrf8BzgWn75JgFSwYvXrtZQMnMnOp/4UTrf3iCSQxSStPiByA==", + "dev": true, "optional": true }, - "ul": { - "version": "5.2.15", - "resolved": "https://registry.npmjs.org/ul/-/ul-5.2.15.tgz", - "integrity": "sha512-svLEUy8xSCip5IWnsRa0UOg+2zP0Wsj4qlbjTmX6GJSmvKMHADBuHOm1dpNkWqWPIGuVSqzUkV3Cris5JrlTRQ==", - "requires": { - "deffy": "^2.2.2", - "typpy": "^2.3.4" - } - }, "ultron": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz", - "integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==" + "integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==", + "dev": true }, "unbzip2-stream": { "version": "1.4.3", @@ -11410,17 +11909,20 @@ "underscore": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.9.1.tgz", - "integrity": "sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg==" + "integrity": "sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg==", + "dev": true }, "universalify": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true }, "unpipe": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", + "dev": true }, "uri-js": { "version": "4.4.0", @@ -11456,6 +11958,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", + "dev": true, "requires": { "prepend-http": "^2.0.0" } @@ -11463,42 +11966,41 @@ "url-set-query": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/url-set-query/-/url-set-query-1.0.0.tgz", - "integrity": "sha1-AW6M/Xwg7gXK/neV6JK9BwL6ozk=" + "integrity": "sha1-AW6M/Xwg7gXK/neV6JK9BwL6ozk=", + "dev": true }, "url-to-options": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/url-to-options/-/url-to-options-1.0.1.tgz", - "integrity": "sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k=" + "integrity": "sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k=", + "dev": true }, "utf-8-validate": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.2.tgz", - "integrity": "sha512-SwV++i2gTD5qh2XqaPzBnNX88N6HdyhQrNNRykvcS0QKvItV9u3vPEJr+X5Hhfb1JC0r0e1alL0iB09rY8+nmw==", + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.3.tgz", + "integrity": "sha512-jtJM6fpGv8C1SoH4PtG22pGto6x+Y8uPprW0tw3//gGFhDDTiuksgradgFN6yRayDP4SyZZa6ZMGHLIa17+M8A==", + "dev": true, "requires": { - "node-gyp-build": "~3.7.0" - }, - "dependencies": { - "node-gyp-build": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-3.7.0.tgz", - "integrity": "sha512-L/Eg02Epx6Si2NXmedx+Okg+4UHqmaf3TNcxd50SF9NQGcJaON3AtU++kax69XV7YWz4tUspqZSAsVofhFKG2w==" - } + "node-gyp-build": "^4.2.0" } }, "utf8": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/utf8/-/utf8-3.0.0.tgz", - "integrity": "sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ==" + "integrity": "sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ==", + "dev": true }, "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true }, "utils-merge": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" + "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=", + "dev": true }, "uuid": { "version": "3.3.2", @@ -11506,9 +12008,9 @@ "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==" }, "v8-compile-cache": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.1.1.tgz", - "integrity": "sha512-8OQ9CL+VWyt3JStj7HX7/ciTL2V3Rl1Wf5OL+SNTm0yK1KvtReVulksyeRnCANHHuUxHlQig+JJDlUhBt1NQDQ==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.2.0.tgz", + "integrity": "sha512-gTpR5XQNKFwOd4clxfnhaqvfqMpqEwr4tOtCyz4MtYZX2JYhfr1JvBFKdS+7K/9rfpZR3VLX+YWBbKoxCgS43Q==", "dev": true }, "validate-npm-package-license": { @@ -11524,17 +12026,20 @@ "varint": { "version": "5.0.2", "resolved": "https://registry.npmjs.org/varint/-/varint-5.0.2.tgz", - "integrity": "sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow==" + "integrity": "sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow==", + "dev": true }, "vary": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" + "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", + "dev": true }, "verror": { "version": "1.10.0", "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "dev": true, "requires": { "assert-plus": "^1.0.0", "core-util-is": "1.0.2", @@ -11545,6 +12050,7 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/web3/-/web3-1.3.0.tgz", "integrity": "sha512-4q9dna0RecnrlgD/bD1C5S+81Untbd6Z/TBD7rb+D5Bvvc0Wxjr4OP70x+LlnwuRDjDtzBwJbNUblh2grlVArw==", + "dev": true, "requires": { "web3-bzz": "1.3.0", "web3-core": "1.3.0", @@ -11559,6 +12065,7 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.3.0.tgz", "integrity": "sha512-ibYAnKab+sgTo/UdfbrvYfWblXjjgSMgyy9/FHa6WXS14n/HVB+HfWqGz2EM3fok8Wy5XoKGMvdqvERQ/mzq1w==", + "dev": true, "requires": { "@types/node": "^12.12.6", "got": "9.6.0", @@ -11567,9 +12074,10 @@ }, "dependencies": { "@types/node": { - "version": "12.12.68", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.68.tgz", - "integrity": "sha512-3RW2s24ewB7F9dAHvgb9FRvNHn6nO9IK6Eaknbz7HTOe2a5GVne5XbUh5+YA+kcCn67glyHhClUUdFP73LWrgQ==" + "version": "12.19.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.19.3.tgz", + "integrity": "sha512-8Jduo8wvvwDzEVJCOvS/G6sgilOLvvhn1eMmK3TW8/T217O7u1jdrK6ImKLv80tVryaPSVeKu6sjDEiFjd4/eg==", + "dev": true } } }, @@ -11577,6 +12085,7 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.3.0.tgz", "integrity": "sha512-BwWvAaKJf4KFG9QsKRi3MNoNgzjI6szyUlgme1qNPxUdCkaS3Rdpa0VKYNHP7M/YTk82/59kNE66mH5vmoaXjA==", + "dev": true, "requires": { "@types/bn.js": "^4.11.5", "@types/node": "^12.12.6", @@ -11588,9 +12097,10 @@ }, "dependencies": { "@types/node": { - "version": "12.12.68", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.68.tgz", - "integrity": "sha512-3RW2s24ewB7F9dAHvgb9FRvNHn6nO9IK6Eaknbz7HTOe2a5GVne5XbUh5+YA+kcCn67glyHhClUUdFP73LWrgQ==" + "version": "12.19.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.19.3.tgz", + "integrity": "sha512-8Jduo8wvvwDzEVJCOvS/G6sgilOLvvhn1eMmK3TW8/T217O7u1jdrK6ImKLv80tVryaPSVeKu6sjDEiFjd4/eg==", + "dev": true } } }, @@ -11598,6 +12108,7 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.3.0.tgz", "integrity": "sha512-+MFb1kZCrRctf7UYE7NCG4rGhSXaQJ/KF07di9GVK1pxy1K0+rFi61ZobuV1ky9uQp+uhhSPts4Zp55kRDB5sw==", + "dev": true, "requires": { "underscore": "1.9.1", "web3-eth-iban": "1.3.0", @@ -11608,6 +12119,7 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.3.0.tgz", "integrity": "sha512-h0yFDrYVzy5WkLxC/C3q+hiMnzxdWm9p1T1rslnuHgOp6nYfqzu/6mUIXrsS4h/OWiGJt+BZ0xVZmtC31HDWtg==", + "dev": true, "requires": { "@ethersproject/transactions": "^5.0.0-beta.135", "underscore": "1.9.1", @@ -11621,6 +12133,7 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.3.0.tgz", "integrity": "sha512-blv69wrXw447TP3iPvYJpllkhW6B18nfuEbrfcr3n2Y0v1Jx8VJacNZFDFsFIcgXcgUIVCtOpimU7w9v4+rtaw==", + "dev": true, "requires": { "eventemitter3": "4.0.4" } @@ -11629,6 +12142,7 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.3.0.tgz", "integrity": "sha512-3yMbuGcomtzlmvTVqNRydxsx7oPlw3ioRL6ReF9PeNYDkUsZaUib+6Dp5eBt7UXh5X+SIn/xa1smhDHz5/HpAw==", + "dev": true, "requires": { "underscore": "1.9.1", "web3-core-helpers": "1.3.0", @@ -11641,6 +12155,7 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.3.0.tgz", "integrity": "sha512-MUUQUAhJDb+Nz3S97ExVWveH4utoUnsbPWP+q1HJH437hEGb4vunIb9KvN3hFHLB+aHJfPeStM/4yYTz5PeuyQ==", + "dev": true, "requires": { "eventemitter3": "4.0.4", "underscore": "1.9.1", @@ -11651,6 +12166,7 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.3.0.tgz", "integrity": "sha512-/bzJcxXPM9EM18JM5kO2JjZ3nEqVo3HxqU93aWAEgJNqaP/Lltmufl2GpvIB2Hvj+FXAjAXquxUdQ2/xP7BzHQ==", + "dev": true, "requires": { "underscore": "1.9.1", "web3-core": "1.3.0", @@ -11671,6 +12187,7 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.3.0.tgz", "integrity": "sha512-1OrZ9+KGrBeBRd3lO8upkpNua9+7cBsQAgor9wbA25UrcUYSyL8teV66JNRu9gFxaTbkpdrGqM7J/LXpraXWrg==", + "dev": true, "requires": { "@ethersproject/abi": "5.0.0-beta.153", "underscore": "1.9.1", @@ -11681,6 +12198,7 @@ "version": "5.0.0-beta.153", "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.0.0-beta.153.tgz", "integrity": "sha512-aXweZ1Z7vMNzJdLpR1CZUAIgnwjrZeUSvN9syCwlBaEBUFJmFY+HHnfuTI5vIhVs/mRkfJVrbEyl51JZQqyjAg==", + "dev": true, "requires": { "@ethersproject/address": ">=5.0.0-beta.128", "@ethersproject/bignumber": ">=5.0.0-beta.130", @@ -11699,6 +12217,7 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.3.0.tgz", "integrity": "sha512-/Q7EVW4L2wWUbNRtOTwAIrYvJid/5UnKMw67x/JpvRMwYC+e+744P536Ja6SG4X3MnzFvd3E/jruV4qa6k+zIw==", + "dev": true, "requires": { "crypto-browserify": "3.12.0", "eth-lib": "0.2.8", @@ -11716,12 +12235,14 @@ "bn.js": { "version": "4.11.9", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", + "dev": true }, "eth-lib": { "version": "0.2.8", "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.8.tgz", "integrity": "sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw==", + "dev": true, "requires": { "bn.js": "^4.11.6", "elliptic": "^6.4.0", @@ -11734,6 +12255,7 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.3.0.tgz", "integrity": "sha512-3SCge4SRNCnzLxf0R+sXk6vyTOl05g80Z5+9/B5pERwtPpPWaQGw8w01vqYqsYBKC7zH+dxhMaUgVzU2Dgf7bQ==", + "dev": true, "requires": { "@types/bn.js": "^4.11.5", "underscore": "1.9.1", @@ -11750,6 +12272,7 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/web3-eth-ens/-/web3-eth-ens-1.3.0.tgz", "integrity": "sha512-WnOru+EcuM5dteiVYJcHXo/I7Wq+ei8RrlS2nir49M0QpYvUPGbCGgTbifcjJQTWamgORtWdljSA1s2Asdb74w==", + "dev": true, "requires": { "content-hash": "^2.5.2", "eth-ens-namehash": "2.0.8", @@ -11766,6 +12289,7 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.3.0.tgz", "integrity": "sha512-v9mZWhR4fPF17/KhHLiWir4YHWLe09O3B/NTdhWqw3fdAMJNztzMHGzgHxA/4fU+rhrs/FhDzc4yt32zMEXBZw==", + "dev": true, "requires": { "bn.js": "^4.11.9", "web3-utils": "1.3.0" @@ -11774,7 +12298,8 @@ "bn.js": { "version": "4.11.9", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", + "dev": true } } }, @@ -11782,6 +12307,7 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.3.0.tgz", "integrity": "sha512-2czUhElsJdLpuNfun9GeLiClo5O6Xw+bLSjl3f4bNG5X2V4wcIjX2ygep/nfstLLtkz8jSkgl/bV7esANJyeRA==", + "dev": true, "requires": { "@types/node": "^12.12.6", "web3-core": "1.3.0", @@ -11792,9 +12318,10 @@ }, "dependencies": { "@types/node": { - "version": "12.12.68", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.68.tgz", - "integrity": "sha512-3RW2s24ewB7F9dAHvgb9FRvNHn6nO9IK6Eaknbz7HTOe2a5GVne5XbUh5+YA+kcCn67glyHhClUUdFP73LWrgQ==" + "version": "12.19.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.19.3.tgz", + "integrity": "sha512-8Jduo8wvvwDzEVJCOvS/G6sgilOLvvhn1eMmK3TW8/T217O7u1jdrK6ImKLv80tVryaPSVeKu6sjDEiFjd4/eg==", + "dev": true } } }, @@ -11802,6 +12329,7 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.3.0.tgz", "integrity": "sha512-Xz02KylOyrB2YZzCkysEDrY7RbKxb7LADzx3Zlovfvuby7HBwtXVexXKtoGqksa+ns1lvjQLLQGb+OeLi7Sr7w==", + "dev": true, "requires": { "web3-core": "1.3.0", "web3-core-method": "1.3.0", @@ -11812,6 +12340,7 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.3.0.tgz", "integrity": "sha512-cMKhUI6PqlY/EC+ZDacAxajySBu8AzW8jOjt1Pe/mbRQgS0rcZyvLePGTTuoyaA8C21F8UW+EE5jj7YsNgOuqA==", + "dev": true, "requires": { "web3-core-helpers": "1.3.0", "xhr2-cookies": "1.1.0" @@ -11821,6 +12350,7 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.3.0.tgz", "integrity": "sha512-0CrLuRofR+1J38nEj4WsId/oolwQEM6Yl1sOt41S/6bNI7htdkwgVhSloFIMJMDFHtRw229QIJ6wIaKQz0X1Og==", + "dev": true, "requires": { "oboe": "2.1.5", "underscore": "1.9.1", @@ -11831,6 +12361,7 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.3.0.tgz", "integrity": "sha512-Im5MthhJnJst8nSoq0TgbyOdaiFQFa5r6sHPOVllhgIgViDqzbnlAFW9sNzQ0Q8VXPNfPIQKi9cOrHlSRNPjRw==", + "dev": true, "requires": { "eventemitter3": "4.0.4", "underscore": "1.9.1", @@ -11842,6 +12373,7 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/web3-shh/-/web3-shh-1.3.0.tgz", "integrity": "sha512-IZTojA4VCwVq+7eEIHuL1tJXtU+LJDhO8Y2QmuwetEWW1iBgWCGPHZasipWP+7kDpSm/5lo5GRxL72FF/Os/tA==", + "dev": true, "requires": { "web3-core": "1.3.0", "web3-core-method": "1.3.0", @@ -11853,6 +12385,7 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.3.0.tgz", "integrity": "sha512-2mS5axFCbkhicmoDRuJeuo0TVGQDgC2sPi/5dblfVC+PMtX0efrb8Xlttv/eGkq7X4E83Pds34FH98TP2WOUZA==", + "dev": true, "requires": { "bn.js": "^4.11.9", "eth-lib": "0.2.8", @@ -11867,12 +12400,14 @@ "bn.js": { "version": "4.11.9", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", + "dev": true }, "eth-lib": { "version": "0.2.8", "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.8.tgz", "integrity": "sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw==", + "dev": true, "requires": { "bn.js": "^4.11.6", "elliptic": "^6.4.0", @@ -11885,6 +12420,7 @@ "version": "1.0.32", "resolved": "https://registry.npmjs.org/websocket/-/websocket-1.0.32.tgz", "integrity": "sha512-i4yhcllSP4wrpoPMU2N0TQ/q0O94LRG/eUQjEAamRltjQ1oT1PFFKOG4i877OlJgCG8rw6LrrowJp+TYCEWF7Q==", + "dev": true, "requires": { "bufferutil": "^4.0.1", "debug": "^2.2.0", @@ -11898,6 +12434,7 @@ "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, "requires": { "ms": "2.0.0" } @@ -11905,19 +12442,22 @@ "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true } } }, "whatwg-fetch": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz", - "integrity": "sha512-dcQ1GWpOD/eEQ97k66aiEVpNnapVj90/+R+SXTPYGHpYBBypfKJEQjLrvMZ7YXbKm21gXd4NcuxUTjiv1YtLng==" + "integrity": "sha512-dcQ1GWpOD/eEQ97k66aiEVpNnapVj90/+R+SXTPYGHpYBBypfKJEQjLrvMZ7YXbKm21gXd4NcuxUTjiv1YtLng==", + "dev": true }, "which": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, "requires": { "isexe": "^2.0.0" } @@ -11925,17 +12465,20 @@ "which-module": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true }, "which-pm-runs": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/which-pm-runs/-/which-pm-runs-1.0.0.tgz", - "integrity": "sha1-Zws6+8VS4LVd9rd4DKdGFfI60cs=" + "integrity": "sha1-Zws6+8VS4LVd9rd4DKdGFfI60cs=", + "dev": true }, "wide-align": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", + "dev": true, "requires": { "string-width": "^1.0.2 || 2" } @@ -11943,22 +12486,26 @@ "word-wrap": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==" + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "dev": true }, "wordwrap": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=" + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "dev": true }, "workerpool": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.0.0.tgz", - "integrity": "sha512-fU2OcNA/GVAJLLyKUoHkAgIhKb0JoCpSjLC/G2vYKxUjVmQwGbRVeoPJ1a8U4pnVofz4AQV5Y/NEw8oKqxEBtA==" + "integrity": "sha512-fU2OcNA/GVAJLLyKUoHkAgIhKb0JoCpSjLC/G2vYKxUjVmQwGbRVeoPJ1a8U4pnVofz4AQV5Y/NEw8oKqxEBtA==", + "dev": true }, "wrap-ansi": { "version": "6.2.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dev": true, "requires": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -11968,12 +12515,14 @@ "ansi-regex": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==" + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true }, "ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, "requires": { "color-convert": "^2.0.1" } @@ -11982,6 +12531,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, "requires": { "color-name": "~1.1.4" } @@ -11989,17 +12539,20 @@ "color-name": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true }, "is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true }, "string-width": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", + "dev": true, "requires": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -12010,6 +12563,7 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, "requires": { "ansi-regex": "^5.0.0" } @@ -12019,12 +12573,14 @@ "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true }, "write": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", + "dev": true, "requires": { "mkdirp": "^0.5.1" } @@ -12038,6 +12594,7 @@ "version": "2.5.0", "resolved": "https://registry.npmjs.org/xhr/-/xhr-2.5.0.tgz", "integrity": "sha512-4nlO/14t3BNUZRXIXfXe+3N6w3s1KoxcJUUURctd64BLRe67E4gRwp4PjywtDY72fXpZ1y6Ch0VZQRY/gMPzzQ==", + "dev": true, "requires": { "global": "~4.3.0", "is-function": "^1.0.1", @@ -12049,6 +12606,7 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/xhr-request/-/xhr-request-1.1.0.tgz", "integrity": "sha512-Y7qzEaR3FDtL3fP30k9wO/e+FBnBByZeybKOhASsGP30NIkRAAkKD/sCnLvgEfAIEC1rcmK7YG8f4oEnIrrWzA==", + "dev": true, "requires": { "buffer-to-arraybuffer": "^0.0.5", "object-assign": "^4.1.1", @@ -12063,6 +12621,7 @@ "version": "0.1.3", "resolved": "https://registry.npmjs.org/xhr-request-promise/-/xhr-request-promise-0.1.3.tgz", "integrity": "sha512-YUBytBsuwgitWtdRzXDDkWAXzhdGB8bYm0sSzMPZT7Z2MBjMSTHFsyCT1yCRATY+XC69DUrQraRAEgcoCRaIPg==", + "dev": true, "requires": { "xhr-request": "^1.1.0" } @@ -12071,6 +12630,7 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/xhr2-cookies/-/xhr2-cookies-1.1.0.tgz", "integrity": "sha1-fXdEnQmZGX8VXLc7I99yUF7YnUg=", + "dev": true, "requires": { "cookiejar": "^2.1.1" } @@ -12098,37 +12658,44 @@ "xmlhttprequest": { "version": "1.8.0", "resolved": "https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz", - "integrity": "sha1-Z/4HXFwk/vOfnWX197f+dRcZaPw=" + "integrity": "sha1-Z/4HXFwk/vOfnWX197f+dRcZaPw=", + "dev": true }, "xtend": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==" + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "dev": true }, "y18n": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==" + "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", + "dev": true }, "yaeti": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/yaeti/-/yaeti-0.0.6.tgz", - "integrity": "sha1-8m9ITXJoTPQr7ft2lwqhYI+/lXc=" + "integrity": "sha1-8m9ITXJoTPQr7ft2lwqhYI+/lXc=", + "dev": true }, "yallist": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true }, "yaml": { "version": "1.10.0", "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.0.tgz", - "integrity": "sha512-yr2icI4glYaNG+KWONODapy2/jDdMSDnrONSjblABjD9B4Z5LgiircSt8m8sRZFNi08kG9Sm0uSHtEmP3zaEGg==" + "integrity": "sha512-yr2icI4glYaNG+KWONODapy2/jDdMSDnrONSjblABjD9B4Z5LgiircSt8m8sRZFNi08kG9Sm0uSHtEmP3zaEGg==", + "dev": true }, "yargs": { "version": "13.3.2", "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", + "dev": true, "requires": { "cliui": "^5.0.0", "find-up": "^3.0.0", @@ -12145,17 +12712,20 @@ "ansi-regex": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true }, "emoji-regex": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==" + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true }, "find-up": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, "requires": { "locate-path": "^3.0.0" } @@ -12163,12 +12733,14 @@ "is-fullwidth-code-point": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true }, "locate-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, "requires": { "p-locate": "^3.0.0", "path-exists": "^3.0.0" @@ -12178,6 +12750,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, "requires": { "p-limit": "^2.0.0" } @@ -12185,12 +12758,14 @@ "path-exists": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true }, "string-width": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, "requires": { "emoji-regex": "^7.0.1", "is-fullwidth-code-point": "^2.0.0", @@ -12201,6 +12776,7 @@ "version": "5.2.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, "requires": { "ansi-regex": "^4.1.0" } @@ -12211,6 +12787,7 @@ "version": "13.1.2", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", + "dev": true, "requires": { "camelcase": "^5.0.0", "decamelize": "^1.2.0" @@ -12220,6 +12797,7 @@ "version": "1.6.1", "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.1.tgz", "integrity": "sha512-qZV14lK9MWsGCmcr7u5oXGH0dbGqZAIxTDrWXZDo5zUr6b6iUmelNKO6x6R1dQT24AH3LgRxJpr8meWy2unolA==", + "dev": true, "requires": { "camelcase": "^5.3.1", "decamelize": "^1.2.0", @@ -12231,17 +12809,20 @@ "ansi-regex": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true }, "emoji-regex": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==" + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true }, "find-up": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, "requires": { "locate-path": "^3.0.0" } @@ -12249,12 +12830,14 @@ "is-fullwidth-code-point": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true }, "locate-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, "requires": { "p-locate": "^3.0.0", "path-exists": "^3.0.0" @@ -12264,6 +12847,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, "requires": { "p-limit": "^2.0.0" } @@ -12271,12 +12855,14 @@ "path-exists": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true }, "string-width": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, "requires": { "emoji-regex": "^7.0.1", "is-fullwidth-code-point": "^2.0.0", @@ -12287,6 +12873,7 @@ "version": "5.2.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, "requires": { "ansi-regex": "^4.1.0" } @@ -12295,6 +12882,7 @@ "version": "14.2.3", "resolved": "https://registry.npmjs.org/yargs/-/yargs-14.2.3.tgz", "integrity": "sha512-ZbotRWhF+lkjijC/VhmOT9wSgyBQ7+zr13+YLkhfsSiTriYsMzkTUFP18pFhWwBeMa5gUc1MzbhrO6/VB7c9Xg==", + "dev": true, "requires": { "cliui": "^5.0.0", "decamelize": "^1.2.0", @@ -12313,6 +12901,7 @@ "version": "15.0.1", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-15.0.1.tgz", "integrity": "sha512-0OAMV2mAZQrs3FkNpDQcBk1x5HXb8X4twADss4S0Iuk+2dGnLOE/fRHrsYm542GduMveyA77OF4wrNJuanRCWw==", + "dev": true, "requires": { "camelcase": "^5.0.0", "decamelize": "^1.2.0" diff --git a/package.json b/package.json index ec6dc81f2..ce85e580a 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "test": "test" }, "scripts": { - "compile:lib": "npx truffle compile --config truffle-config-lib.js && npm run provision:lib:artefacts", + "compile:lib": "npx truffle compile --config truffle-config-lib.js", "compile:legacy:1.3": "npx truffle compile --config truffle-config-contracts-legacy-1.3.js", "compile:legacy:1.6": "npx truffle compile --config truffle-config-contracts-legacy-1.6.js", "compile:legacy": "npm run compile:legacy:1.3 && npm run compile:legacy:1.6", @@ -17,7 +17,7 @@ "compile:wallet": "npx truffle compile --config truffle-config-wallet.js", "compile:test": "npx truffle compile --config truffle-config-contracts-test.js", "compile": "npm run compile:infrastructure && npm run compile:modules && npm run compile:wallet", - "cc": "rm -rf build && rm -rf build-legacy && npm run compile:lib && npm run compile && npm run compile:legacy && npm run compile:test", + "cc": "rm -rf build && rm -rf build-legacy && npm run compile:lib && npm run compile && npm run compile:legacy && npm run compile:test && npm run provision:lib:artefacts", "ganache": "npx ganache-cli --chainId 1895 --networkId 1597649375983 --gasLimit=20700000 -e 10000 --acctKeys=\"./ganache-accounts.json\" --account=\"0x7ab741b57e8d94dd7e1a29055646bafde7010f38a900f55bbd7647880faa6ee8, 100000000000000000000000000000000000000\" --account=\"0x2030b463177db2da82908ef90fa55ddfcef56e8183caf60db464bc398e736e6f, 100000000000000000000000000000000000000\" --account=\"0x62ecd49c4ccb41a70ad46532aed63cf815de15864bc415c87d507afd6a5e8da2, 100000000000000000000000000000000000000\" --account=\"0xf473040b1a83739a9c7cc1f5719fab0f5bf178f83314d98557c58aae1910e03a, 100000000000000000000000000000000000000\" --account=\"0x823d590ed2cb5e8493bb0efc834771c1cde36f9fc49b9fe3620ebd0754ad6ea2, 100000000000000000000000000000000000000\" --account=\"0xd6d710943471e4c37ceb787857e7a2b41ca57f9cb4307ee9a9b21436a8e709c3, 100000000000000000000000000000000000000\" --account=\"0x187bb12e927c1652377405f81d93ce948a593f7d66cfba383ee761858b05921a, 100000000000000000000000000000000000000\" --account=\"0xf41486fdb04505e7966c8720a353ed92ce0d6830f8a5e915fbde735106a06d25, 100000000000000000000000000000000000000\" --account=\"0x6ca40ba4cca775643398385022264c0c414da1abd21d08d9e7136796a520a543, 100000000000000000000000000000000000000\" --account=\"0xfac0bc9325ad342033afe956e83f0bf8f1e863c1c3e956bc75d66961fe4cd186, 100000000000000000000000000000000000000\"", "kovan-fork": "npx ganache-cli -i 42 -l 20700000 -f https://kovan.infura.io/v3/$(cat .env | sed -En 's/INFURA_KEY=''\"''([^''\"'']+)''\"''/\\1/p')@16988040", "kovan-fork-latest": "npx ganache-cli -i 42 -l 20700000 -f https://kovan.infura.io/v3/$(cat .env | sed -En 's/INFURA_KEY=''\"''([^''\"'']+)''\"''/\\1/p')", @@ -60,43 +60,40 @@ "homepage": "https://github.com/argentlabs/argent-contracts#readme", "dependencies": { "@openzeppelin/contracts": "3.0.1", - "@truffle/hdwallet-provider": "^1.1.1", "@uniswap/lib": "^1.1.2", "@uniswap/v2-core": "^1.0.1", "ajv": "^6.10.0", - "aws-sdk": "^2.521.0", - "bn-chai": "^1.0.1", - "bn.js": "^5.1.1", - "chai": "^4.2.0", - "cli-table2": "^0.2.0", - "dotenv": "^6.2.0", - "ethereumjs-util": "^7.0.4", - "etherlime-lib": "1.1.3", - "ethers": "^5.0.7", + "aws-sdk": "^2.787.0", + "ethers": "^5.0.19", "fs": "0.0.1-security", - "ganache-cli": "^6.12.0", - "husky": "^4.2.3", "inquirer": "^7.0.0", - "istanbul": "^0.4.5", - "lint-staged": "^10.2.11", "node-fetch": "^2.6.1", "openzeppelin-solidity": "2.3", - "semver": "^7.1.3", - "solhint": "^3.1.0", - "tinyreq": "^3.4.1", - "truffle": "^5.1.48", - "web3": "^1.3.0", - "web3-eth-abi": "^1.2.9" + "semver": "^7.1.3" }, "devDependencies": { "-": "0.0.1", "@codechecks/client": "^0.1.10", - "eslint": "^7.5.0", - "eslint-config-airbnb-base": "^14.0.0", + "@truffle/hdwallet-provider": "^1.2.0", + "bn-chai": "^1.0.1", + "bn.js": "^5.1.3", + "chai": "^4.2.0", + "dotenv": "^8.2.0", + "eslint": "^7.13.0", + "eslint-config-airbnb-base": "^14.2.1", "eslint-plugin-import": "^2.20.1", "eth-gas-reporter": "^0.2.19", + "ethereumjs-util": "^7.0.7", + "ganache-cli": "^6.12.1", + "husky": "^4.3.0", + "istanbul": "^0.4.5", + "lint-staged": "^10.5.1", "mocha-junit-reporter": "^2.0.0", + "solhint": "^3.3.1", "solidity-coverage": "^0.7.11", - "truffle-plugin-verify": "^0.5.0" + "truffle": "^5.1.52", + "truffle-plugin-verify": "^0.5.0", + "web3": "^1.3.0", + "web3-eth-abi": "^1.3.0" } } From 33b5461b820b0fb884c496e78efa3cfeee3d056e Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Sat, 7 Nov 2020 10:08:54 +0200 Subject: [PATCH 078/113] Reorder circle build steps so everything is compiled before deployment tests run --- .circleci/config.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index dade43d79..aad4078e3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -56,12 +56,12 @@ jobs: version: 19.03.13 - <<: *step_pull_solc_docker - <<: *step_setup_global_packages + - run: + name: "Lint JavaScript" + command: npm run lint:js - run: name: "Lint Solidity contracts" command: npm run lint:contracts - - run: - name: "Test deployment scripts" - command: npm run ganache >/dev/null 2>&1 & npm run test:deployment - run: name: "Compiling external library contracts" command: npm run compile:lib @@ -78,8 +78,8 @@ jobs: name: "Provision lib artefacts" command: npm run provision:lib:artefacts - run: - name: "Lint JavaScript" - command: npm run lint:js + name: "Test deployment scripts" + command: npm run ganache >/dev/null 2>&1 & npm run test:deployment - run: name: "Running unit tests" command: npm run ganache >/dev/null 2>&1 & npm run test From 50a5f363b3cb6d43d295f6247fc92361033ec3d5 Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Sun, 8 Nov 2020 09:26:59 +0200 Subject: [PATCH 079/113] Turn off eslint rules for import/no-unresolved and import/no-extraneous-dependencies --- .eslintrc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.eslintrc b/.eslintrc index a0f42e22b..9d85e7cf1 100644 --- a/.eslintrc +++ b/.eslintrc @@ -21,7 +21,10 @@ "function-paren-newline": "off", "comma-dangle": "off", "object-curly-newline": "off", - "no-unused-expressions": "off" + "no-unused-expressions": "off", + "import/no-extraneous-dependencies": "off", + "import/no-unresolved": "off" + }, "parserOptions": { "ecmaVersion": 2018 From 6ea2c041b4e45381c22e40985285d55581a4bc5c Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Sun, 8 Nov 2020 10:03:21 +0200 Subject: [PATCH 080/113] Abstract signing message hash --- scripts/deploy.sh | 1 + scripts/execute_script.sh | 1 + test/multisig.js | 16 ++-------------- utils/multisigexecutor.js | 6 +++--- utils/relay-manager.js | 11 ++++++----- utils/utilities.js | 23 +++++++++++++---------- 6 files changed, 26 insertions(+), 32 deletions(-) diff --git a/scripts/deploy.sh b/scripts/deploy.sh index 38ca29d94..3654cb62d 100755 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -25,6 +25,7 @@ rm -rf build npm run compile:lib npm run compile npm run compile:legacy +npm run provision:lib:artefacts for IDX in "$@" do diff --git a/scripts/execute_script.sh b/scripts/execute_script.sh index ef2a46fba..6e341fdc9 100755 --- a/scripts/execute_script.sh +++ b/scripts/execute_script.sh @@ -14,6 +14,7 @@ if [ $NOCOMPILE != "--no-compile" ]; then npm run compile:lib npm run compile npm run compile:legacy + npm run provision:lib:artefacts FILE=$NOCOMPILE else FILE=$1 diff --git a/test/multisig.js b/test/multisig.js index 9b0e9ccab..720c5a0ba 100644 --- a/test/multisig.js +++ b/test/multisig.js @@ -1,8 +1,4 @@ /* global artifacts */ -const fs = require("fs"); -const ethers = require("ethers"); -const ethUtil = require("ethereumjs-util"); - const MultiSigWallet = artifacts.require("MultiSigWallet"); const TestRegistry = artifacts.require("TestRegistry"); @@ -40,22 +36,14 @@ contract("MultiSigWallet", (accounts) => { assert.equal(bal.toNumber(), value); }); - async function getSignatures(signedData, signers, sortSigners = true, returnBadSignatures = false) { + async function getSignatures(messageHash, signers, sortSigners = true, returnBadSignatures = false) { // Sort the signers let sortedSigners = signers; if (sortSigners) { sortedSigners = utilities.sortWalletByAddress(signers); } - const dataBuff = ethUtil.toBuffer(signedData); - const msgHashBuff = ethUtil.hashPersonalMessage(dataBuff); - - const accountsJson = JSON.parse(fs.readFileSync("./ganache-accounts.json", "utf8")); const sigs = `0x${sortedSigners.map((signer) => { - const pkey = accountsJson.private_keys[signer.toLowerCase()]; - const sig = ethUtil.ecsign(msgHashBuff, Buffer.from(pkey, "hex")); - const signature = ethUtil.toRpcSig(sig.v, sig.r, sig.s); - const split = ethers.utils.splitSignature(signature); - let joinedSignature = ethers.utils.joinSignature(split).slice(2); + let joinedSignature = utilities.signMessageHash(signer, messageHash); if (returnBadSignatures) { joinedSignature += "a1"; diff --git a/utils/multisigexecutor.js b/utils/multisigexecutor.js index e5baca174..9aa1f9075 100644 --- a/utils/multisigexecutor.js +++ b/utils/multisigexecutor.js @@ -1,5 +1,6 @@ const ethers = require("ethers"); const inquirer = require("inquirer"); +const utils = require("./utilities.js"); class MultisigExecutor { constructor(multisigWrapper, ownerWallet, autoSign = true, overrides = {}) { @@ -21,8 +22,7 @@ class MultisigExecutor { if (this._autoSign === true) { // Get the off chain signature - const signHashBuffer = Buffer.from(signHash.slice(2), "hex"); - let signature = await this._ownerWallet.signMessage(signHashBuffer); + let signature = await utils.signMessageHash(this._ownerWallet, signHash); // to make sure signature ends with 27/28 const split = ethers.utils.splitSignature(signature); @@ -81,7 +81,7 @@ class MultisigExecutor { ethers.utils.hexZeroPad(ethers.utils.hexlify(nonce), 32), ].map((hex) => hex.slice(2)).join("")}`; - return web3.utils.sha3(input); + return input; } } diff --git a/utils/relay-manager.js b/utils/relay-manager.js index e77147a1f..e5fdf7758 100644 --- a/utils/relay-manager.js +++ b/utils/relay-manager.js @@ -1,5 +1,6 @@ const ethers = require("ethers"); -const { signOffchain, ETH_TOKEN, getNonceForRelay, getChainId, getAccount } = require("./utilities.js"); +const { ETH_TOKEN } = require("./utilities.js"); +const utils = require("./utilities.js"); class RelayManager { setRelayerManager(relayerManager) { @@ -15,11 +16,11 @@ class RelayManager { _refundToken = ETH_TOKEN, _refundAddress = ethers.constants.AddressZero, _gasLimitRelay = (_gasLimit * 1.1)) { - const relayerAccount = _relayerAccount || await getAccount(9); - const nonce = _nonce || await getNonceForRelay(); + const relayerAccount = _relayerAccount || await utils.getAccount(9); + const nonce = _nonce || await utils.getNonceForRelay(); const methodData = _module.contract.methods[_method](..._params).encodeABI(); - const chainId = await getChainId(); - const signatures = await signOffchain( + const chainId = await utils.getChainId(); + const signatures = await utils.signOffchain( _signers, this.relayerManager.address, _module.address, diff --git a/utils/utilities.js b/utils/utilities.js index 371466ea7..d8297fadb 100644 --- a/utils/utilities.js +++ b/utils/utilities.js @@ -39,7 +39,7 @@ module.exports = { }), signOffchain: async (signers, from, to, value, data, chainId, nonce, gasPrice, gasLimit, refundToken, refundAddress) => { - const input = `0x${[ + const messageHash = `0x${[ "0x19", "0x00", from, @@ -54,18 +54,21 @@ module.exports = { refundAddress, ].map((hex) => hex.slice(2)).join("")}`; - const dataBuff = ethUtil.toBuffer(ethers.utils.keccak256(input)); + const sigs = `0x${signers.map((signer) => this.signMessageHash(signer, messageHash)).join("")}`; + return sigs; + }, + + signMessageHash(signer, messageHash) { + const dataBuff = ethUtil.toBuffer(ethers.utils.keccak256(messageHash)); const msgHashBuff = ethUtil.hashPersonalMessage(dataBuff); const accountsJson = JSON.parse(fs.readFileSync("./ganache-accounts.json", "utf8")); - const sigs = `0x${signers.map((signer) => { - const pkey = accountsJson.private_keys[signer.toLowerCase()]; - const sig = ethUtil.ecsign(msgHashBuff, Buffer.from(pkey, "hex")); - const signature = ethUtil.toRpcSig(sig.v, sig.r, sig.s); - const split = ethers.utils.splitSignature(signature); - return ethers.utils.joinSignature(split).slice(2); - }).join("")}`; - return sigs; + + const pkey = accountsJson.private_keys[signer.toLowerCase()]; + const sig = ethUtil.ecsign(msgHashBuff, Buffer.from(pkey, "hex")); + const signature = ethUtil.toRpcSig(sig.v, sig.r, sig.s); + const split = ethers.utils.splitSignature(signature); + return ethers.utils.joinSignature(split).slice(2); }, sortWalletByAddress(wallets) { From 04d7596ebebceba4d880cee765cf7ba2250535ef Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Sun, 8 Nov 2020 14:36:41 +0200 Subject: [PATCH 081/113] Improve assertRevert function --- utils/utilities.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/utils/utilities.js b/utils/utilities.js index d8297fadb..6f3d2cf4b 100644 --- a/utils/utilities.js +++ b/utils/utilities.js @@ -38,7 +38,7 @@ module.exports = { }); }), - signOffchain: async (signers, from, to, value, data, chainId, nonce, gasPrice, gasLimit, refundToken, refundAddress) => { + async signOffchain(signers, from, to, value, data, chainId, nonce, gasPrice, gasLimit, refundToken, refundAddress) { const messageHash = `0x${[ "0x19", "0x00", @@ -259,10 +259,12 @@ module.exports = { ({ reason } = err); if (reason) { assert.equal(reason, revertMessage); - } else if (!revertMessage) { + } else if (!revertMessage && err.hijackedStack) { assert.notEqual(err.hijackedStack.indexOf("VM Exception while processing transaction: revert"), -1); - } else { + } else if (err.hijackedStack) { assert.notEqual(err.hijackedStack.indexOf(revertMessage), -1); + } else { + assert.fail("Could not validate error message", err); } } }, From 0aff643ef0f7c58412db6ca48b51e9521b6e32ef Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Mon, 9 Nov 2020 08:18:54 +0200 Subject: [PATCH 082/113] Increase timeout for deployment scripts test --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index aad4078e3..2cbd84aa6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -80,6 +80,7 @@ jobs: - run: name: "Test deployment scripts" command: npm run ganache >/dev/null 2>&1 & npm run test:deployment + no_output_timeout: 30m - run: name: "Running unit tests" command: npm run ganache >/dev/null 2>&1 & npm run test From d87f5cb0f441afae5abd9d5c044dcdfe467576af Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Mon, 9 Nov 2020 09:45:17 +0200 Subject: [PATCH 083/113] Downgrade truffle due to https://github.com/trufflesuite/ganache-cli/issues/702 --- package-lock.json | 15 ++++++++------- package.json | 2 +- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8d5b0abd8..f26faef54 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4373,12 +4373,13 @@ "dev": true }, "es-get-iterator": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/es-get-iterator/-/es-get-iterator-1.1.0.tgz", - "integrity": "sha512-UfrmHuWQlNMTs35e1ypnvikg6jCz3SK8v8ImvmDsh36fCVUR1MqoFDiyn0/k52C8NqO3YsO8Oe0azeesNuqSsQ==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-get-iterator/-/es-get-iterator-1.1.1.tgz", + "integrity": "sha512-qorBw8Y7B15DVLaJWy6WdEV/ZkieBcu6QCq/xzWzGOKJqgG1j754vXRfZ3NY7HSShneqU43mPB4OkQBTkvHhFw==", "dev": true, "requires": { - "es-abstract": "^1.17.4", + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.1", "has-symbols": "^1.0.1", "is-arguments": "^1.0.4", "is-map": "^2.0.1", @@ -11747,9 +11748,9 @@ } }, "truffle": { - "version": "5.1.52", - "resolved": "https://registry.npmjs.org/truffle/-/truffle-5.1.52.tgz", - "integrity": "sha512-8KwPuHumZnfDBJOoUEdXo7BFr1a/RSh1CDI4AoHsIC+STajJnr7EvJdaniJRlA3S+6Hn12b3PY8Zaarba8VSvQ==", + "version": "5.1.48", + "resolved": "https://registry.npmjs.org/truffle/-/truffle-5.1.48.tgz", + "integrity": "sha512-Z8485qH5Db8P05dVy7SHQHcaa+hXAekvPcVkkv8zONsVBqOmS3q48eajukdeKNbLlfPWb3m7TYdPzrGFBDcFiQ==", "dev": true, "requires": { "app-module-path": "^2.2.0", diff --git a/package.json b/package.json index ce85e580a..c2c047bd5 100644 --- a/package.json +++ b/package.json @@ -91,7 +91,7 @@ "mocha-junit-reporter": "^2.0.0", "solhint": "^3.3.1", "solidity-coverage": "^0.7.11", - "truffle": "^5.1.52", + "truffle": "^5.1.48", "truffle-plugin-verify": "^0.5.0", "web3": "^1.3.0", "web3-eth-abi": "^1.3.0" From e29469d53f8a75c1fe79d62c45a37cbda56ba027 Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Mon, 9 Nov 2020 09:48:36 +0200 Subject: [PATCH 084/113] Update scripts to truffle syntax --- deployment/2_deploy_contracts.js | 1 - deployment/3_setup_contracts.js | 1 - deployment/5_deploy_modules.js | 2 -- deployment/6_register_modules.js | 2 -- scripts/deploy_custom_upgrader.js | 20 ++++++++++---------- scripts/deploy_defi.js | 23 +++++++++++------------ scripts/deploy_wallet_detector.js | 15 ++++++--------- scripts/module_upgrade_template.js | 22 ++++++++++++---------- scripts/set_tradable_tokens.js | 17 ++++++++--------- scripts/update_compound_registry.js | 14 ++++++-------- scripts/update_dex_registry.js | 18 ++++++++---------- scripts/update_module_registry.js | 18 ++++++++---------- scripts/update_multisig_threshold.js | 14 ++++++-------- scripts/update_wallet_detector.js | 18 ++++++++---------- scripts/update_wallet_in_factory.js | 13 +++++-------- truffle-config.base.js | 12 +++++++----- utils/config/development.json | 2 +- utils/multisigexecutor.js | 6 +++--- 18 files changed, 99 insertions(+), 119 deletions(-) diff --git a/deployment/2_deploy_contracts.js b/deployment/2_deploy_contracts.js index 921b5a38e..ae4ab6d47 100644 --- a/deployment/2_deploy_contracts.js +++ b/deployment/2_deploy_contracts.js @@ -37,7 +37,6 @@ module.exports = async (callback) => { const newConfig = configurator.config; const prevConfig = configurator.copyConfig(); - console.log("Previous Config:", prevConfig); const walletRootEns = prevConfig.ENS.domain; diff --git a/deployment/3_setup_contracts.js b/deployment/3_setup_contracts.js index e208688d7..1483f2138 100644 --- a/deployment/3_setup_contracts.js +++ b/deployment/3_setup_contracts.js @@ -19,7 +19,6 @@ module.exports = async (callback) => { const { configurator } = manager; const { config } = configurator; - console.log("Config:", config); const ENSResolverWrapper = await ENSResolver.at(config.contracts.ENSResolver); const ENSManagerWrapper = await ENSManager.at(config.contracts.ENSManager); diff --git a/deployment/5_deploy_modules.js b/deployment/5_deploy_modules.js index 818931306..0e1162f35 100644 --- a/deployment/5_deploy_modules.js +++ b/deployment/5_deploy_modules.js @@ -173,7 +173,5 @@ module.exports = async (callback) => { abiUploader.upload(VersionManagerWrapper, "modules"), ]); - console.log("Config:", config); - callback(); }; diff --git a/deployment/6_register_modules.js b/deployment/6_register_modules.js index b3e35980e..b426a7907 100644 --- a/deployment/6_register_modules.js +++ b/deployment/6_register_modules.js @@ -30,9 +30,7 @@ module.exports = async (callback) => { const { configurator } = manager; const { versionUploader } = manager; - const { config } = configurator; - console.log("Config:", config); const GuardianManagerWrapper = await GuardianManager.new(config.modules.GuardianManager); const LockManagerWrapper = await LockManager.new(config.modules.LockManager); diff --git a/scripts/deploy_custom_upgrader.js b/scripts/deploy_custom_upgrader.js index 1ec947de1..c10147e87 100644 --- a/scripts/deploy_custom_upgrader.js +++ b/scripts/deploy_custom_upgrader.js @@ -1,4 +1,4 @@ -// AWS_PROFILE=argent-test AWS_SDK_LOAD_CONFIG=true etherlime deploy --file ./scripts/deploy_custom_upgrader.js --compile false +// AWS_PROFILE=argent-test AWS_SDK_LOAD_CONFIG=true npx truffle exec ./scripts/deploy_custom_upgrader.js /* global artifacts */ const ModuleRegistry = artifacts.require("ModuleRegistry"); @@ -9,8 +9,7 @@ const utils = require("../utils/utilities.js"); const DeployManager = require("../utils/deploy-manager.js"); const MultisigExecutor = require("../utils/multisigexecutor.js"); -async function deploy() { - const network = "test"; +async function main() { const modulesToRemove = []; const modulesToAdd = [ "0x624EbBd0f4169E2e11861618045491b6A4e29E77", @@ -20,17 +19,18 @@ async function deploy() { ]; const upgraderName = "0x4ef2f261_0xee7263da"; - const manager = new DeployManager(network); + // TODO: Maybe get the signer account a better way? + const accounts = await web3.eth.getAccounts(); + const deploymentAccount = accounts[0]; + const manager = new DeployManager(deploymentAccount); await manager.setup(); const { configurator } = manager; - const { deployer } = manager; - const deploymentWallet = deployer.signer; const { config } = configurator; const ModuleRegistryWrapper = await ModuleRegistry.at(config.contracts.ModuleRegistry); const MultiSigWrapper = await MultiSig.at(config.contracts.MultiSigWallet); - const multisigExecutor = new MultisigExecutor(MultiSigWrapper, deploymentWallet, config.multisig.autosign); + const multisigExecutor = new MultisigExecutor(MultiSigWrapper, deploymentAccount, config.multisig.autosign); const UpgraderWrapper = await Upgrader.new( modulesToRemove, @@ -41,6 +41,6 @@ async function deploy() { [UpgraderWrapper.address, utils.asciiToBytes32(upgraderName)]); } -module.exports = { - deploy, -}; +main().catch((err) => { + throw err; +}); diff --git a/scripts/deploy_defi.js b/scripts/deploy_defi.js index 561cc10f5..e4eaae254 100644 --- a/scripts/deploy_defi.js +++ b/scripts/deploy_defi.js @@ -1,4 +1,4 @@ -// AWS_PROFILE=argent-test AWS_SDK_LOAD_CONFIG=true etherlime deploy --file ./scripts/deploy_defi.js --compile false +// AWS_PROFILE=argent-test AWS_SDK_LOAD_CONFIG=true npx truffle exec ./scripts/deploy_defi.js /* global artifacts */ const BN = require("bn.js"); @@ -33,14 +33,13 @@ function sleep(ms) { return new Promise((resolve) => setTimeout(resolve, ms)); } -async function deploy() { - const idx = process.argv.indexOf("--network"); - const network = idx > -1 ? process.argv[idx + 1] : "test"; - - const deployManager = new DeployManager(network); +async function main() { + // TODO: Maybe get the signer account a better way? + const accounts = await web3.eth.getAccounts(); + const deploymentAccount = accounts[0]; + const deployManager = new DeployManager(deploymentAccount); await deployManager.setup(); const { deployer } = deployManager; - const manager = deployer.signer; // the pit /* ************* Deploy Maker *************** */ const vox = await Vox.new(USD_PER_DAI); @@ -60,7 +59,7 @@ async function deploy() { pip.address, pep.address, vox.address, - manager); + deploymentAccount); // let the Tub mint PETH and DAI await skr.setOwner(tub.address); @@ -88,7 +87,7 @@ async function deploy() { const ethLiquidity = new BN(web3.utils.toWei("1")); const mkrLiquidity = ethLiquidity.mul(WAD).div(ETH_PER_MKR); - await gov.mint(manager, mkrLiquidity); + await gov.mint(deploymentAccount, mkrLiquidity); await uniswapFactory.createExchange(gov.address, { gasLimit: 450000 }); let exchange = "0x0000000000000000000000000000000000000000"; @@ -110,6 +109,6 @@ async function deploy() { console.log("********************************"); } -module.exports = { - deploy, -}; +main().catch((err) => { + throw err; +}); diff --git a/scripts/deploy_wallet_detector.js b/scripts/deploy_wallet_detector.js index 870f126fc..61a6b62af 100644 --- a/scripts/deploy_wallet_detector.js +++ b/scripts/deploy_wallet_detector.js @@ -13,8 +13,6 @@ const ArgentWalletDetector = artifacts.require("ArgentWalletDetector"); const DeployManager = require("../utils/deploy-manager.js"); -const defaultNetwork = "test"; - const PROXYWALLET_CODEHASH = [ "0x0b44c9be520023d9f6091278e7e5a8853257eb9fb3d78e6951315df59679e3b2", // factory prod Mar-30-2020 "0x83baa4b265772664a88dcfc8be0e24e1fe969a3c66f03851c6aa2f5da73cd7fd", // factory prod Feb-04-2019 @@ -29,18 +27,17 @@ const BASEWALLET_IMPL = [ ]; // mainnet only async function main() { - // Read Command Line Arguments - const idx = process.argv.indexOf("--network"); - const network = idx > -1 ? process.argv[idx + 1] : defaultNetwork; - - const deployManager = new DeployManager(network); + // TODO: Maybe get the signer account a better way? + const accounts = await web3.eth.getAccounts(); + const deploymentAccount = accounts[0]; + const deployManager = new DeployManager(deploymentAccount); await deployManager.setup(); - const { deployer, configurator, abiUploader } = deployManager; + const { configurator, abiUploader } = deployManager; const { config } = configurator; // Deploy ArgentWalletDetector contract console.log("Deploying ArgentWalletDetector..."); - const ArgentWalletDetectortWrapper = await deployer.deploy(ArgentWalletDetector, {}, PROXYWALLET_CODEHASH, BASEWALLET_IMPL); + const ArgentWalletDetectortWrapper = await ArgentWalletDetector.new(PROXYWALLET_CODEHASH, BASEWALLET_IMPL); // Transfer ownership to the multisig console.log("Transferring ownership to the Multisig..."); diff --git a/scripts/module_upgrade_template.js b/scripts/module_upgrade_template.js index 304632342..e83191c93 100644 --- a/scripts/module_upgrade_template.js +++ b/scripts/module_upgrade_template.js @@ -20,7 +20,7 @@ const MODULES_TO_DISABLE = []; const BACKWARD_COMPATIBILITY = 3; -const deploy = async (network) => { +const main = async (network) => { if (!["kovan", "kovan-fork", "staging", "prod"].includes(network)) { console.warn("------------------------------------------------------------------------"); console.warn(`WARNING: The MakerManagerV2 module is not fully functional on ${network}`); @@ -34,23 +34,25 @@ const deploy = async (network) => { // Setup // ////////////////////////////////// - const manager = new DeployManager(network); + // TODO: Maybe get the signer account a better way? + const accounts = await web3.eth.getAccounts(); + const deploymentAccount = accounts[0]; + const manager = new DeployManager(deploymentAccount); await manager.setup(); const { configurator } = manager; const { deployer } = manager; const { versionUploader } = manager; - const deploymentWallet = deployer.signer; const { config } = configurator; - const ModuleRegistryWrapper = await deployer.wrapDeployedContract(ModuleRegistry, config.contracts.ModuleRegistry); - const MultiSigWrapper = await deployer.wrapDeployedContract(MultiSig, config.contracts.MultiSigWallet); - const multisigExecutor = new MultisigExecutor(MultiSigWrapper, deploymentWallet, config.multisig.autosign); + const ModuleRegistryWrapper = await ModuleRegistry.at(config.contracts.ModuleRegistry); + const MultiSigWrapper = await MultiSig.at(config.contracts.MultiSigWallet); + const multisigExecutor = new MultisigExecutor(MultiSigWrapper, deploymentAccount, config.multisig.autosign); // ////////////////////////////////// // Initialise the new version // ////////////////////////////////// - const VersionManagerWrapper = await deployer.wrapDeployedContract(VersionManager, config.modules.VersionManager); + const VersionManagerWrapper = await VersionManager.at(config.modules.VersionManager); // ////////////////////////////////// // Setup new infrastructure @@ -145,6 +147,6 @@ const deploy = async (network) => { await versionUploader.upload(newVersion); }; -module.exports = { - deploy, -}; +main().catch((err) => { + throw err; +}); diff --git a/scripts/set_tradable_tokens.js b/scripts/set_tradable_tokens.js index e71e9af75..916c8ed17 100644 --- a/scripts/set_tradable_tokens.js +++ b/scripts/set_tradable_tokens.js @@ -22,25 +22,24 @@ const MultisigExecutor = require("../utils/multisigexecutor.js"); async function main() { // Read Command Line Arguments - let idx = process.argv.indexOf("--network"); - const network = process.argv[idx + 1]; - - idx = process.argv.indexOf("--input"); + let idx = process.argv.indexOf("--input"); const input = process.argv[idx + 1]; idx = process.argv.indexOf("--dry"); const dry = (idx !== -1); // Setup deployer - const manager = new DeployManager(network); + // TODO: Maybe get the signer account a better way? + const accounts = await web3.eth.getAccounts(); + const deploymentAccount = accounts[0]; + const manager = new DeployManager(deploymentAccount); await manager.setup(); const { configurator } = manager; const { deployer } = manager; - const deploymentWallet = deployer.signer; const { config } = configurator; const { gasPrice, gasLimit } = deployer.defaultOverrides; - const TokenPriceRegistryWrapper = await deployer.wrapDeployedContract(TokenPriceRegistry, config.modules.TokenPriceRegistry); + const TokenPriceRegistryWrapper = await TokenPriceRegistry.at(config.modules.TokenPriceRegistry); const data = JSON.parse(fs.readFileSync(input, "utf8")); const addresses = Object.keys(data); @@ -67,8 +66,8 @@ async function main() { const tokens = filteredData.map((item) => item[0]); const tradable = filteredData.map((item) => item[1]); - const MultiSigWrapper = await deployer.wrapDeployedContract(MultiSig, config.contracts.MultiSigWallet); - const multisigExecutor = new MultisigExecutor(MultiSigWrapper, deploymentWallet, config.multisig.autosign, { gasPrice, gasLimit }); + const MultiSigWrapper = await MultiSig.at(config.contracts.MultiSigWallet); + const multisigExecutor = new MultisigExecutor(MultiSigWrapper, deploymentAccount, config.multisig.autosign, { gasPrice, gasLimit }); await multisigExecutor.executeCall(TokenPriceRegistryWrapper, "setTradableForTokenList", [tokens, tradable]); } diff --git a/scripts/update_compound_registry.js b/scripts/update_compound_registry.js index edb16b860..ddf3cd941 100644 --- a/scripts/update_compound_registry.js +++ b/scripts/update_compound_registry.js @@ -22,10 +22,7 @@ async function main() { let add; // Read Command Line Arguments - let idx = process.argv.indexOf("--network"); - const network = process.argv[idx + 1]; - - idx = process.argv.indexOf("--add"); + let idx = process.argv.indexOf("--add"); if (idx > 0) { add = true; } else { @@ -45,16 +42,17 @@ async function main() { const ctoken = process.argv[idx + 1]; // Setup deployer - const manager = new DeployManager(network); + // TODO: Maybe get the signer account a better way? + const accounts = await web3.eth.getAccounts(); + const deploymentAccount = accounts[0]; + const manager = new DeployManager(deploymentAccount); await manager.setup(); const { configurator } = manager; - const { deployer } = manager; - const deploymentWallet = deployer.signer; const { config } = configurator; const CompoundRegistryWrapper = await CompoundRegistry.at(config.contracts.CompoundRegistry); const MultiSigWrapper = await MultiSig.at(config.contracts.MultiSigWallet); - const multisigExecutor = new MultisigExecutor(MultiSigWrapper, deploymentWallet, config.multisig.autosign); + const multisigExecutor = new MultisigExecutor(MultiSigWrapper, deploymentAccount, config.multisig.autosign); if (add) { console.log(`Adding token ${token} to Compound`); diff --git a/scripts/update_dex_registry.js b/scripts/update_dex_registry.js index 51e2b9812..7c3bf6994 100644 --- a/scripts/update_dex_registry.js +++ b/scripts/update_dex_registry.js @@ -21,10 +21,7 @@ async function main() { const dexStatus = []; // Read Command Line Arguments - let idx = process.argv.indexOf("--network"); - const network = process.argv[idx + 1]; - - idx = process.argv.indexOf("--dex"); + const idx = process.argv.indexOf("--dex"); const { length } = process.argv; for (let i = idx + 1; i < length; i += 1) { @@ -38,16 +35,17 @@ async function main() { } // Setup deployer - const manager = new DeployManager(network); + // TODO: Maybe get the signer account a better way? + const accounts = await web3.eth.getAccounts(); + const deploymentAccount = accounts[0]; + const manager = new DeployManager(deploymentAccount); await manager.setup(); const { configurator } = manager; - const { deployer } = manager; - const deploymentWallet = deployer.signer; const { config } = configurator; - const DexRegistryWrapper = await deployer.wrapDeployedContract(DexRegistry, config.contracts.DexRegistry); - const MultiSigWrapper = await deployer.wrapDeployedContract(MultiSig, config.contracts.MultiSigWallet); - const multisigExecutor = new MultisigExecutor(MultiSigWrapper, deploymentWallet, config.multisig.autosign); + const DexRegistryWrapper = await DexRegistry.at(config.contracts.DexRegistry); + const MultiSigWrapper = await MultiSig.at(config.contracts.MultiSigWallet); + const multisigExecutor = new MultisigExecutor(MultiSigWrapper, deploymentAccount, config.multisig.autosign); console.log(`Updating registry for dex [${dexAddress}] with value [${dexStatus}]`); await multisigExecutor.executeCall(DexRegistryWrapper, "setAuthorised", [dexAddress, dexStatus]); diff --git a/scripts/update_module_registry.js b/scripts/update_module_registry.js index ba5cdbdb3..57b0d3d59 100644 --- a/scripts/update_module_registry.js +++ b/scripts/update_module_registry.js @@ -23,10 +23,7 @@ async function main() { let add; // Read Command Line Arguments - let idx = process.argv.indexOf("--network"); - const network = process.argv[idx + 1]; - - idx = process.argv.indexOf("--add"); + let idx = process.argv.indexOf("--add"); if (idx > 0) { add = true; } else { @@ -46,16 +43,17 @@ async function main() { const targetName = process.argv[idx + 1]; // Setup deployer - const manager = new DeployManager(network); + // TODO: Maybe get the signer account a better way? + const accounts = await web3.eth.getAccounts(); + const deploymentAccount = accounts[0]; + const manager = new DeployManager(deploymentAccount); await manager.setup(); const { configurator } = manager; - const { deployer } = manager; - const deploymentWallet = deployer.signer; const { config } = configurator; - const ModuleRegistryWrapper = await deployer.wrapDeployedContract(ModuleRegistry, config.contracts.ModuleRegistry); - const MultiSigWrapper = await deployer.wrapDeployedContract(MultiSig, config.contracts.MultiSigWallet); - const multisigExecutor = new MultisigExecutor(MultiSigWrapper, deploymentWallet, config.multisig.autosign); + const ModuleRegistryWrapper = await ModuleRegistry.at(config.contracts.ModuleRegistry); + const MultiSigWrapper = await MultiSig.at(config.contracts.MultiSigWallet); + const multisigExecutor = new MultisigExecutor(MultiSigWrapper, deploymentAccount, config.multisig.autosign); if (add) { console.log(`Registering module ${targetName} to ModuleRegistry`); diff --git a/scripts/update_multisig_threshold.js b/scripts/update_multisig_threshold.js index e023e7053..8903ff91f 100644 --- a/scripts/update_multisig_threshold.js +++ b/scripts/update_multisig_threshold.js @@ -16,22 +16,20 @@ const MultisigExecutor = require("../utils/multisigexecutor.js"); async function main() { // Read Command Line Arguments - let idx = process.argv.indexOf("--network"); - const network = process.argv[idx + 1]; - - idx = process.argv.indexOf("--threshold"); + const idx = process.argv.indexOf("--threshold"); const threshold = process.argv[idx + 1]; // Setup deployer - const manager = new DeployManager(network); + // TODO: Maybe get the signer account a better way? + const accounts = await web3.eth.getAccounts(); + const deploymentAccount = accounts[0]; + const manager = new DeployManager(deploymentAccount); await manager.setup(); const { configurator } = manager; - const { deployer } = manager; - const deploymentWallet = deployer.signer; const { config } = configurator; const MultiSigWrapper = await MultiSig.at(config.contracts.MultiSigWallet); - const multisigExecutor = new MultisigExecutor(MultiSigWrapper, deploymentWallet, config.multisig.autosign); + const multisigExecutor = new MultisigExecutor(MultiSigWrapper, deploymentAccount, config.multisig.autosign); // deregister await multisigExecutor.executeCall(MultiSigWrapper, "changeThreshold", [threshold]); diff --git a/scripts/update_wallet_detector.js b/scripts/update_wallet_detector.js index b598d4548..ffc6f29b9 100644 --- a/scripts/update_wallet_detector.js +++ b/scripts/update_wallet_detector.js @@ -31,10 +31,7 @@ async function main() { let implementation; // Read Command Line Arguments - let idx = process.argv.indexOf("--network"); - const network = process.argv[idx + 1]; - - idx = process.argv.indexOf("--wallet"); + let idx = process.argv.indexOf("--wallet"); if (idx > 0) { wallet = process.argv[idx + 1]; } else { @@ -53,16 +50,17 @@ async function main() { } // Setup deployer - const manager = new DeployManager(network); + // TODO: Maybe get the signer account a better way? + const accounts = await web3.eth.getAccounts(); + const deploymentAccount = accounts[0]; + const manager = new DeployManager(deploymentAccount); await manager.setup(); const { configurator } = manager; - const { deployer } = manager; - const deploymentWallet = deployer.signer; const { config } = configurator; - const ArgentWalletDetectorWrapper = await deployer.wrapDeployedContract(ArgentWalletDetector, config.contracts.ArgentWalletDetector); - const MultiSigWrapper = await deployer.wrapDeployedContract(MultiSig, config.contracts.MultiSigWallet); - const multisigExecutor = new MultisigExecutor(MultiSigWrapper, deploymentWallet, config.multisig.autosign); + const ArgentWalletDetectorWrapper = await ArgentWalletDetector.at(config.contracts.ArgentWalletDetector); + const MultiSigWrapper = await MultiSig.at(config.contracts.MultiSigWallet); + const multisigExecutor = new MultisigExecutor(MultiSigWrapper, deploymentAccount, config.multisig.autosign); if (wallet) { console.log(`Adding wallet code and implementation from ${wallet}`); diff --git a/scripts/update_wallet_in_factory.js b/scripts/update_wallet_in_factory.js index 09c98d909..4ad54cf5a 100644 --- a/scripts/update_wallet_in_factory.js +++ b/scripts/update_wallet_in_factory.js @@ -17,15 +17,12 @@ const MultisigExecutor = require("../utils/multisigexecutor.js"); const DeployManager = require("../utils/deploy-manager.js"); async function main() { - // Read Command Line Arguments - const idx = process.argv.indexOf("--network"); - const network = process.argv[idx + 1]; - - const deployManager = new DeployManager(network); + // TODO: Maybe get the signer account a better way? + const accounts = await web3.eth.getAccounts(); + const deploymentAccount = accounts[0]; + const deployManager = new DeployManager(deploymentAccount); await deployManager.setup(); const { configurator } = deployManager; - const { deployer } = deployManager; - const manager = deployer.signer; const { config } = configurator; console.log("Config:", config); @@ -37,7 +34,7 @@ async function main() { console.log("Setting up WalletFactory with new BaseWallet..."); const walletFactoryWrapper = await WalletFactory.at(config.contracts.WalletFactory); const multisigWrapper = await MultiSigWallet.at(config.contracts.MultiSigWallet); - const multisigExecutor = new MultisigExecutor(multisigWrapper, manager, config.multisig.autosign); + const multisigExecutor = new MultisigExecutor(multisigWrapper, deploymentAccount, config.multisig.autosign); await multisigExecutor.executeCall( walletFactoryWrapper, "changeWalletImplementation", diff --git a/truffle-config.base.js b/truffle-config.base.js index b8c8dfe16..380d284f1 100644 --- a/truffle-config.base.js +++ b/truffle-config.base.js @@ -25,8 +25,10 @@ const DeployManager = require("./utils/deploy-manager.js"); const _gasPrice = process.env.DEPLOYER_GAS_PRICE || 20000000000; const _gasLimit = 6000000; -async function getKeys(network) { - const manager = new DeployManager(network); +async function getKeys() { + const accounts = await web3.eth.getAccounts(); + const deploymentAccount = accounts[0]; + const manager = new DeployManager(deploymentAccount); await manager.setup(); const { pkey, infuraKey } = manager; return (pkey, infuraKey); @@ -61,7 +63,7 @@ module.exports = { test: { provider: async () => { - const { pkey, infuraKey } = await getKeys("test"); + const { pkey, infuraKey } = await getKeys(); return new HDWalletProvider(pkey, `https://ropsten.infura.io/v3/${infuraKey}`); }, network_id: 3, // ropsten @@ -71,7 +73,7 @@ module.exports = { staging: { provider: async () => { - const { pkey, infuraKey } = await getKeys("staging"); + const { pkey, infuraKey } = await getKeys(); return new HDWalletProvider(pkey, `https://mainnet.infura.io/v3/${infuraKey}`); }, network_id: 1, // mainnet @@ -81,7 +83,7 @@ module.exports = { prod: { provider: async () => { - const { pkey, infuraKey } = await getKeys("prod"); + const { pkey, infuraKey } = await getKeys(); return new HDWalletProvider(pkey, `https://mainnet.infura.io/v3/${infuraKey}`); }, network_id: 1, // mainnet diff --git a/utils/config/development.json b/utils/config/development.json index abe6794a2..a66a79612 100644 --- a/utils/config/development.json +++ b/utils/config/development.json @@ -1 +1 @@ -{"ENS":{"deployOwnRegistry":true,"ensRegistry":"0x457E2683CDc9d8f76d06684D542c4c41f2C8CC80","domain":"argent.xyz"},"backend":{"accounts":["0xD9995BAE12FEe327256FFec1e3184d492bD94C31"]},"multisig":{"owners":["0xD9995BAE12FEe327256FFec1e3184d492bD94C31"],"threshold":1,"autosign":true},"settings":{"deployer":{"type":"ganache"},"lockPeriod":480,"recoveryPeriod":480,"securityPeriod":240,"securityWindow":240,"feeRatio":15,"defaultLimit":"1000000000000000000"},"CryptoKitties":{"contract":"0x0000000000000000000000000000000000000000"},"defi":{"weth":"0x0000000000000000000000000000000000000000","maker":{"deployOwn":true,"tub":"0x0000000000000000000000000000000000000000","pot":"0x0000000000000000000000000000000000000000","jug":"0x0000000000000000000000000000000000000000","migration":"0x55DC317D8AFc1245b099731AEbD072bE38C7F123"},"uniswap":{"deployOwn":true,"factory":"0xDbb27d0d4f633a9a0907B7e337D2e807D0eEf8C2"},"compound":{"comptroller":"0x0000000000000000000000000000000000000000","markets":{"0x0000000000000000000000000000000000000000":"0x0000000000000000000000000000000000000000"}},"paraswap":{"deployOwn":true,"contract":"0x5ed62bB47087fAbec9E3f25021cfcf6c6DD57112","authorisedExchanges":{"Kyber":"0x005470e4FE3F11617333E94F0e9B551b47e3DC4c"}}},"contracts":{"MultiSigWallet":"0x70D303EE4654367127F527e986F16d283c07fDCd","WalletFactory":"0x2B3DF3fAC32e463F00ff744173A250985F8510b4","ENSResolver":"0xF15EE839f3813F217f0df432974866f212f6a0A7","ENSManager":"0x96c0Dc08b9DFc5747D039C40FA663Ec0c9E5fC9E","TokenPriceProvider":"0xE09C322B745434Fbb2D18c107c13795D4bDF3657","ModuleRegistry":"0x7E93afFaa1452a7e07B961Aab04EF20a4Bc12b78","BaseWallet":"0xe2ba44F6f166B2517A1F624a70CE36929E5736C5","CompoundRegistry":"0x6A27dC5551BB85B1EA6B0553FA0D193e63747d3a","MakerRegistry":"0x355d26E5f04255F60E910F1aA1251DE5D10996E8","DexRegistry":"0xB94A262865431c08Df44128A67F01fB027FEEb0C"},"modules":{"GuardianStorage":"0x33741315204Fa482A836EEA515563768B29D0069","TransferStorage":"0xb43360D140C857330D4e0e9B9867961efF5E2171","GuardianManager":"0xD822e79E2CA49c668f7d97DB1906330bc64459EB","LockManager":"0x7e7acD252559062f0E6355847f4Fbb1c62872f14","RecoveryManager":"0x4A74DE038616791359aEfED19f3f6B75FF6dd340","ApprovedTransfer":"0x61B2D9C034cD0DAE1738D039cdF9af860ee6B31A","TokenExchanger":"0xC790c0E4D6811884b52121A5A8d0c0198F515030","NftTransfer":"0x75eC71B541b0b2e0f9A4a2bea381c23fd7B0fB0c","MakerManager":"0x2718cAce241213B18F67C6d66B245EE77DB0Ce2a","TransferManager":"0x42ecEbe8946c4954aFc0C2333977adCb243614ed","CompoundManager":"0xD7A53fDd46a663C678da0580A66843Ae9b7783Da","MakerV2Manager":"0x66F622060ecA4812756d6151c99044151607eb8d","LimitStorage":"0x878ABC3e7a97f4a4f5348A6161AbA4E2c912c31f","TokenPriceStorage":"0x5dA4F81c17776495e3d7999ad9217748D257f074","RelayerModule":"0x171eb25c80da6adF0436668126285ca51e37eB30","RelayerManager":"0xA403649d49d0AAEAB6aEcc7bd0e6fE2f3b6Af84C","VersionManager":"0xF346Ee8d0b5738E037DbF22355949411187Da4bC","LockStorage":"0x3892c37f1bcea23c795A8a72cECaa6096811fB46","TokenPriceRegistry":"0x9c37898845881B6b9aB2f281258314dA326d06A5"},"gitCommit":"0bce1eb6f9067f71b43cc11f851047f2b88c9a69"} \ No newline at end of file +{"ENS":{"deployOwnRegistry":true,"ensRegistry":"0xE227EC69d7ed2E1280494D77690d3d5ac7fA8547","domain":"argent.xyz"},"backend":{"accounts":["0xD9995BAE12FEe327256FFec1e3184d492bD94C31"]},"multisig":{"owners":["0xD9995BAE12FEe327256FFec1e3184d492bD94C31"],"threshold":1,"autosign":true},"settings":{"deployer":{"type":"ganache"},"lockPeriod":480,"recoveryPeriod":480,"securityPeriod":240,"securityWindow":240,"feeRatio":15,"defaultLimit":"1000000000000000000"},"CryptoKitties":{"contract":"0x0000000000000000000000000000000000000000"},"defi":{"weth":"0x0000000000000000000000000000000000000000","maker":{"deployOwn":true,"tub":"0x0000000000000000000000000000000000000000","pot":"0x0000000000000000000000000000000000000000","jug":"0x0000000000000000000000000000000000000000","migration":"0xd054DB8F8b84E61C9BF5198DD7c517f979017e60"},"uniswap":{"deployOwn":true,"factory":"0x55C914A069a49c4163b1dC5FbB216e3ae0339f98"},"compound":{"comptroller":"0x0000000000000000000000000000000000000000","markets":{"0x0000000000000000000000000000000000000000":"0x0000000000000000000000000000000000000000"}},"paraswap":{"deployOwn":true,"contract":"0xc49b23b3403fcEDa2b512D2178fA7020E8f5227E","authorisedExchanges":{"Kyber":"0xcF809DD0f9fd4d4b64BcEf64de890BF5579A74A2"}}},"contracts":{"MultiSigWallet":"0x6fe839bB42366Ef4Fbe04DD90b067DE155B6d5d4","WalletFactory":"0x067E7E3b0f114C441101Fe842F989f0a16d8f3fC","ENSResolver":"0xa55b6ea534C49729aa36a45dA984b94D72c4B7fc","ENSManager":"0x68A50159BaD708FEb9b59C225d24B6E8c7e3adA5","TokenPriceProvider":"0xE09C322B745434Fbb2D18c107c13795D4bDF3657","ModuleRegistry":"0x3892F2720e2e466C1C329Fd5B02bd77C56afeDAa","BaseWallet":"0x45B16B4dd212a74Ed0EF732E97F61511890AecbA","CompoundRegistry":"0x80aa3B3Ef7c33CA88AD6A6ef94eAa7f087c851B4","MakerRegistry":"0x355d26E5f04255F60E910F1aA1251DE5D10996E8","DexRegistry":"0x61912B4Ed9451D7E23AbDf4E293d5FAEbB272391"},"modules":{"GuardianStorage":"0xdfEC702352373E8f98C144DB9Bcc2660AC0CFB67","TransferStorage":"0xADb40701fb11c2F7D6d85c69d57d37A1adbA726e","GuardianManager":"0x64bFB77eE77007eDe3a341d25e525a5279Eb3869","LockManager":"0xb8AF1CA990cF7b5024e1929533B1250B1368617b","RecoveryManager":"0xE9feb89C481FD835268B8B4c2C5485A408943D1B","ApprovedTransfer":"0x374e2596E4136a37b4125FAeC4318baEae9aFC0e","TokenExchanger":"0x68A1D3730CE2aF03C56E4147a6C75b4A23541f9D","NftTransfer":"0x92c04A7200AC1d15138c5e7603207329F0d0803C","MakerManager":"0x2718cAce241213B18F67C6d66B245EE77DB0Ce2a","TransferManager":"0xd3691920F8a81D5Cf9f05985F2Ec52dAC40C9C8e","CompoundManager":"0x626d6e36de0538f5fAd653Db719A6B7acB917Ce3","MakerV2Manager":"0xC36f9c2a26473F9e1acdbab3A9954039084C3F04","LimitStorage":"0xE9A2D3f36cf9c3c8F72653E957cD61DBe7429a6c","TokenPriceStorage":"0x5dA4F81c17776495e3d7999ad9217748D257f074","RelayerModule":"0x171eb25c80da6adF0436668126285ca51e37eB30","RelayerManager":"0x9DefAb8845d8BfA594049a3d11a927260EcA737c","VersionManager":"0x1177CB6e1fD784d0Bf0701E35514Ab2065dAA463","LockStorage":"0xC18AC53d02D77c20b4f9483a8d97B24b9B5F1717","TokenPriceRegistry":"0x81666aF14bea4784999D694Ba7AF7D7bDedE9007"},"gitCommit":"9b2fc8285aa5a584e28d4b2403910804adb13e67"} \ No newline at end of file diff --git a/utils/multisigexecutor.js b/utils/multisigexecutor.js index 9aa1f9075..d7dd981ad 100644 --- a/utils/multisigexecutor.js +++ b/utils/multisigexecutor.js @@ -3,9 +3,9 @@ const inquirer = require("inquirer"); const utils = require("./utilities.js"); class MultisigExecutor { - constructor(multisigWrapper, ownerWallet, autoSign = true, overrides = {}) { + constructor(multisigWrapper, ownerAccount, autoSign = true, overrides = {}) { this._multisigWrapper = multisigWrapper; - this._ownerWallet = ownerWallet; + this._ownerAccount = ownerAccount; this._autoSign = autoSign; this._overrides = { gasLimit: 1000000, ...overrides }; } @@ -22,7 +22,7 @@ class MultisigExecutor { if (this._autoSign === true) { // Get the off chain signature - let signature = await utils.signMessageHash(this._ownerWallet, signHash); + let signature = await utils.signMessageHash(this._ownerAccount, signHash); // to make sure signature ends with 27/28 const split = ethers.utils.splitSignature(signature); From d56786b350494eb473be5983ad6c3daf3420a089 Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Mon, 9 Nov 2020 10:03:35 +0200 Subject: [PATCH 085/113] Increase timout for deployment scripts --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 2cbd84aa6..6b52285e6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -80,7 +80,7 @@ jobs: - run: name: "Test deployment scripts" command: npm run ganache >/dev/null 2>&1 & npm run test:deployment - no_output_timeout: 30m + no_output_timeout: 60m - run: name: "Running unit tests" command: npm run ganache >/dev/null 2>&1 & npm run test From dada1cb2f851270431b985acf2c38f3bf9f0f7d9 Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Mon, 9 Nov 2020 11:28:12 +0200 Subject: [PATCH 086/113] Add --no-compile flag to deploy script --- package.json | 3 +-- scripts/deploy.sh | 24 ++++++++++++++++-------- utils/config/development.json | 2 +- 3 files changed, 18 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index c2c047bd5..1f943cf01 100644 --- a/package.json +++ b/package.json @@ -27,8 +27,7 @@ "test:coverage": "npx truffle run coverage && istanbul check-coverage --statements 94 --branches 83 --functions 96 --lines 94", "lint:js": "eslint .", "lint:contracts": "npx solhint contracts/**/*.sol && npx solhint contracts/**/**/*.sol", - "test:deployment": "./scripts/deploy.sh development `seq 1 6`", - "test:benchmark": "./scripts/deploy.sh development 999", + "test:deployment": "./scripts/deploy.sh --no-compile development `seq 1 6`", "validate:erc20": "bash ./scripts/validate_erc20.sh", "security:slither": "npm run security:slither:infrastructure && npm run security:slither:modules && npm run security:slither:wallet", "security:slither:infrastructure": "rm -rf build && npm run compile:infrastructure && slither . --ignore-compile --filter-paths lib --solc-disable-warnings --exclude-low --exclude-informational --exclude=naming-convention,unused-state-variables,solc-version,assembly-usage,low-level-calls,public-function-that-could-be-declared-as-external", diff --git a/scripts/deploy.sh b/scripts/deploy.sh index 3654cb62d..96acafe93 100755 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -1,7 +1,7 @@ #!/bin/bash # -# Usage: ./deploy.sh [network] [aws-profile-suffix] [...steps] -# ./deploy.sh [network] [...steps] (if network == aws-profile-suffix) +# Usage: ./deploy.sh [--no-compile] [network] [aws-profile-suffix] [...steps] +# ./deploy.sh [--no-compile] [network] [...steps] (if network == aws-profile-suffix) # # Examples: ./deploy.sh development 1 2 3 4 # ./deploy.sh test 1 2 3 4 5 6 @@ -10,9 +10,21 @@ set -e # stop the script if any subprocess fails -NETWORK=$1 +NOCOMPILE=$1 shift +if [ $NOCOMPILE != "--no-compile" ]; then + rm -rf build + npm run compile:lib + npm run compile + npm run compile:legacy + npm run provision:lib:artefacts + NETWORK=$NOCOMPILE +else + NETWORK=$1 + shift +fi + re='^[0-9]+$' if [[ $1 =~ $re ]] ; then PROFILE=$NETWORK @@ -21,11 +33,7 @@ else shift fi -rm -rf build -npm run compile:lib -npm run compile -npm run compile:legacy -npm run provision:lib:artefacts + for IDX in "$@" do diff --git a/utils/config/development.json b/utils/config/development.json index a66a79612..a1fa5511a 100644 --- a/utils/config/development.json +++ b/utils/config/development.json @@ -1 +1 @@ -{"ENS":{"deployOwnRegistry":true,"ensRegistry":"0xE227EC69d7ed2E1280494D77690d3d5ac7fA8547","domain":"argent.xyz"},"backend":{"accounts":["0xD9995BAE12FEe327256FFec1e3184d492bD94C31"]},"multisig":{"owners":["0xD9995BAE12FEe327256FFec1e3184d492bD94C31"],"threshold":1,"autosign":true},"settings":{"deployer":{"type":"ganache"},"lockPeriod":480,"recoveryPeriod":480,"securityPeriod":240,"securityWindow":240,"feeRatio":15,"defaultLimit":"1000000000000000000"},"CryptoKitties":{"contract":"0x0000000000000000000000000000000000000000"},"defi":{"weth":"0x0000000000000000000000000000000000000000","maker":{"deployOwn":true,"tub":"0x0000000000000000000000000000000000000000","pot":"0x0000000000000000000000000000000000000000","jug":"0x0000000000000000000000000000000000000000","migration":"0xd054DB8F8b84E61C9BF5198DD7c517f979017e60"},"uniswap":{"deployOwn":true,"factory":"0x55C914A069a49c4163b1dC5FbB216e3ae0339f98"},"compound":{"comptroller":"0x0000000000000000000000000000000000000000","markets":{"0x0000000000000000000000000000000000000000":"0x0000000000000000000000000000000000000000"}},"paraswap":{"deployOwn":true,"contract":"0xc49b23b3403fcEDa2b512D2178fA7020E8f5227E","authorisedExchanges":{"Kyber":"0xcF809DD0f9fd4d4b64BcEf64de890BF5579A74A2"}}},"contracts":{"MultiSigWallet":"0x6fe839bB42366Ef4Fbe04DD90b067DE155B6d5d4","WalletFactory":"0x067E7E3b0f114C441101Fe842F989f0a16d8f3fC","ENSResolver":"0xa55b6ea534C49729aa36a45dA984b94D72c4B7fc","ENSManager":"0x68A50159BaD708FEb9b59C225d24B6E8c7e3adA5","TokenPriceProvider":"0xE09C322B745434Fbb2D18c107c13795D4bDF3657","ModuleRegistry":"0x3892F2720e2e466C1C329Fd5B02bd77C56afeDAa","BaseWallet":"0x45B16B4dd212a74Ed0EF732E97F61511890AecbA","CompoundRegistry":"0x80aa3B3Ef7c33CA88AD6A6ef94eAa7f087c851B4","MakerRegistry":"0x355d26E5f04255F60E910F1aA1251DE5D10996E8","DexRegistry":"0x61912B4Ed9451D7E23AbDf4E293d5FAEbB272391"},"modules":{"GuardianStorage":"0xdfEC702352373E8f98C144DB9Bcc2660AC0CFB67","TransferStorage":"0xADb40701fb11c2F7D6d85c69d57d37A1adbA726e","GuardianManager":"0x64bFB77eE77007eDe3a341d25e525a5279Eb3869","LockManager":"0xb8AF1CA990cF7b5024e1929533B1250B1368617b","RecoveryManager":"0xE9feb89C481FD835268B8B4c2C5485A408943D1B","ApprovedTransfer":"0x374e2596E4136a37b4125FAeC4318baEae9aFC0e","TokenExchanger":"0x68A1D3730CE2aF03C56E4147a6C75b4A23541f9D","NftTransfer":"0x92c04A7200AC1d15138c5e7603207329F0d0803C","MakerManager":"0x2718cAce241213B18F67C6d66B245EE77DB0Ce2a","TransferManager":"0xd3691920F8a81D5Cf9f05985F2Ec52dAC40C9C8e","CompoundManager":"0x626d6e36de0538f5fAd653Db719A6B7acB917Ce3","MakerV2Manager":"0xC36f9c2a26473F9e1acdbab3A9954039084C3F04","LimitStorage":"0xE9A2D3f36cf9c3c8F72653E957cD61DBe7429a6c","TokenPriceStorage":"0x5dA4F81c17776495e3d7999ad9217748D257f074","RelayerModule":"0x171eb25c80da6adF0436668126285ca51e37eB30","RelayerManager":"0x9DefAb8845d8BfA594049a3d11a927260EcA737c","VersionManager":"0x1177CB6e1fD784d0Bf0701E35514Ab2065dAA463","LockStorage":"0xC18AC53d02D77c20b4f9483a8d97B24b9B5F1717","TokenPriceRegistry":"0x81666aF14bea4784999D694Ba7AF7D7bDedE9007"},"gitCommit":"9b2fc8285aa5a584e28d4b2403910804adb13e67"} \ No newline at end of file +{"ENS":{"deployOwnRegistry":true,"ensRegistry":"0xA639CA57eD09E526d78A9A1A04071B4499fB446b","domain":"argent.xyz"},"backend":{"accounts":["0xD9995BAE12FEe327256FFec1e3184d492bD94C31"]},"multisig":{"owners":["0xD9995BAE12FEe327256FFec1e3184d492bD94C31"],"threshold":1,"autosign":true},"settings":{"deployer":{"type":"ganache"},"lockPeriod":480,"recoveryPeriod":480,"securityPeriod":240,"securityWindow":240,"feeRatio":15,"defaultLimit":"1000000000000000000"},"CryptoKitties":{"contract":"0x0000000000000000000000000000000000000000"},"defi":{"weth":"0x0000000000000000000000000000000000000000","maker":{"deployOwn":true,"tub":"0x0000000000000000000000000000000000000000","pot":"0x0000000000000000000000000000000000000000","jug":"0x0000000000000000000000000000000000000000","migration":"0x7C33A4317eC522B0839a37A148485d90D35D45Ac"},"uniswap":{"deployOwn":true,"factory":"0x21D72e062B32593b391973abfB525A0f26Fb5b04"},"compound":{"comptroller":"0x0000000000000000000000000000000000000000","markets":{"0x0000000000000000000000000000000000000000":"0x0000000000000000000000000000000000000000"}},"paraswap":{"deployOwn":true,"contract":"0x165d6f36fCde1e4e446602A75ab29C8CD8154d27","authorisedExchanges":{"Kyber":"0x308907419A1349aaF89a286A6caa8B7Bc5302487"}}},"contracts":{"MultiSigWallet":"0x3a1FfAd1E766c5450e4217680a2Ca25fa4a7AFA7","WalletFactory":"0x7955448285966eC14A7763CA255455b4f40F3484","ENSResolver":"0x3CcE0184e07dF9e93e22b566c5056e435aFdB588","ENSManager":"0x84820AA92539a5C5a12a30e0087c8e6963aFf577","TokenPriceProvider":"0xE09C322B745434Fbb2D18c107c13795D4bDF3657","ModuleRegistry":"0xdA013269e9a0904e44bfaEF07e72c7e8cC429e11","BaseWallet":"0xddA6f8E60b703d540c074D27BdA37b2e530353Ff","CompoundRegistry":"0x009e63C8761cd04616176005FB66Dc8a39ce416D","MakerRegistry":"0x355d26E5f04255F60E910F1aA1251DE5D10996E8","DexRegistry":"0x22878F21d9A8A55C3da2CEc8083DDcb2E1774e6e"},"modules":{"GuardianStorage":"0x8B9Bbb58AC0fb032b78E3d99d424ae1eDC4C0283","TransferStorage":"0x7890b27eA3a4F9bE2393eE931DDeFeEDfc2FEd9D","GuardianManager":"0x9e62082be2aC03f46Efac92e41d9db43b31a74ff","LockManager":"0xC0f60ca8C4e87Ef593BDbd0030A557007ce42858","RecoveryManager":"0xee17f7697466C6d56619f58e475fa2F2aEA11F37","ApprovedTransfer":"0x6a9f87BCE6332BFdf6f1C875eFc8e32aDF246887","TokenExchanger":"0x5bD2B564f90657B4200C7479138D4CC0aE3B301D","NftTransfer":"0x7deC6031A8911c12dA6060dc58453Fc2Eddf9Ac3","MakerManager":"0x2718cAce241213B18F67C6d66B245EE77DB0Ce2a","TransferManager":"0xa7ce7c4C6573e63B148C30E9CFE07F921393B655","CompoundManager":"0xd7c9d0A3E8059C2eB3eba9a470eEC28924a91b4B","MakerV2Manager":"0x72A19c30C9ffA6420d19371A9D0fAc5F9D3E6175","LimitStorage":"0x08AFa29A777d610BA3C35cA7D0B7da84B6DC9635","TokenPriceStorage":"0x5dA4F81c17776495e3d7999ad9217748D257f074","RelayerModule":"0x171eb25c80da6adF0436668126285ca51e37eB30","RelayerManager":"0x4e35AfF2a6974D5EED616e9D4f7d512c2f8eF7f4","VersionManager":"0x9C5AA8E811e6842842dff6d91b1076A81687ed0d","LockStorage":"0x25C9F9365722A4ba1Df59E999aA4E3Ce864d278B","TokenPriceRegistry":"0x92AAf4A6E00fcC0d7307da38D5043d5c4c9a6d09"},"gitCommit":"0e8f2e54823013456b191f0801aef2c1aa681812"} \ No newline at end of file From e6402e4ccf622cdde924b81a3db6c698bd8ead22 Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Mon, 9 Nov 2020 14:22:21 +0200 Subject: [PATCH 087/113] Switch contracts that are compiled alone back to the main contracts/modules folder --- .../{ApprovedTransfer => }/ApprovedTransfer.sol | 10 +++++----- .../{RelayerManager => }/RelayerManager.sol | 14 +++++++------- .../{TokenExchanger => }/TokenExchanger.sol | 10 +++++----- .../{TransferManager => }/TransferManager.sol | 14 +++++++------- package.json | 2 +- 5 files changed, 25 insertions(+), 25 deletions(-) rename contracts/modules/{ApprovedTransfer => }/ApprovedTransfer.sol (96%) rename contracts/modules/{RelayerManager => }/RelayerManager.sol (97%) rename contracts/modules/{TokenExchanger => }/TokenExchanger.sol (98%) rename contracts/modules/{TransferManager => }/TransferManager.sol (98%) diff --git a/contracts/modules/ApprovedTransfer/ApprovedTransfer.sol b/contracts/modules/ApprovedTransfer.sol similarity index 96% rename from contracts/modules/ApprovedTransfer/ApprovedTransfer.sol rename to contracts/modules/ApprovedTransfer.sol index 4f1d5bcf4..1cddec440 100644 --- a/contracts/modules/ApprovedTransfer/ApprovedTransfer.sol +++ b/contracts/modules/ApprovedTransfer.sol @@ -17,11 +17,11 @@ pragma solidity ^0.6.12; pragma experimental ABIEncoderV2; -import "../common/Utils.sol"; -import "../common/LimitUtils.sol"; -import "../common/BaseTransfer.sol"; -import "../../infrastructure/storage/ILimitStorage.sol"; -import "../../infrastructure/storage/IGuardianStorage.sol"; +import "./common/Utils.sol"; +import "./common/LimitUtils.sol"; +import "./common/BaseTransfer.sol"; +import "../infrastructure/storage/ILimitStorage.sol"; +import "../infrastructure/storage/IGuardianStorage.sol"; /** * @title ApprovedTransfer diff --git a/contracts/modules/RelayerManager/RelayerManager.sol b/contracts/modules/RelayerManager.sol similarity index 97% rename from contracts/modules/RelayerManager/RelayerManager.sol rename to contracts/modules/RelayerManager.sol index 64ccf3cf4..f05b36e8e 100644 --- a/contracts/modules/RelayerManager/RelayerManager.sol +++ b/contracts/modules/RelayerManager.sol @@ -17,13 +17,13 @@ pragma solidity ^0.6.12; pragma experimental ABIEncoderV2; -import "../common/Utils.sol"; -import "../common/BaseFeature.sol"; -import "../common/GuardianUtils.sol"; -import "../common/LimitUtils.sol"; -import "../../infrastructure/storage/ILimitStorage.sol"; -import "../../infrastructure/ITokenPriceRegistry.sol"; -import "../../infrastructure/storage/IGuardianStorage.sol"; +import "./common/Utils.sol"; +import "./common/BaseFeature.sol"; +import "./common/GuardianUtils.sol"; +import "./common/LimitUtils.sol"; +import "../infrastructure/storage/ILimitStorage.sol"; +import "../infrastructure/ITokenPriceRegistry.sol"; +import "../infrastructure/storage/IGuardianStorage.sol"; /** * @title RelayerManager diff --git a/contracts/modules/TokenExchanger/TokenExchanger.sol b/contracts/modules/TokenExchanger.sol similarity index 98% rename from contracts/modules/TokenExchanger/TokenExchanger.sol rename to contracts/modules/TokenExchanger.sol index 38bb01921..402c37337 100644 --- a/contracts/modules/TokenExchanger/TokenExchanger.sol +++ b/contracts/modules/TokenExchanger.sol @@ -17,11 +17,11 @@ pragma solidity ^0.6.12; pragma experimental ABIEncoderV2; -import "../common/BaseFeature.sol"; -import "../../../lib/other/ERC20.sol"; -import "../../../lib/paraswap/IAugustusSwapper.sol"; -import "../../infrastructure/ITokenPriceRegistry.sol"; -import "../../infrastructure/IDexRegistry.sol"; +import "./common/BaseFeature.sol"; +import "../../lib/other/ERC20.sol"; +import "../../lib/paraswap/IAugustusSwapper.sol"; +import "../infrastructure/ITokenPriceRegistry.sol"; +import "../infrastructure/IDexRegistry.sol"; /** * @title TokenExchanger diff --git a/contracts/modules/TransferManager/TransferManager.sol b/contracts/modules/TransferManager.sol similarity index 98% rename from contracts/modules/TransferManager/TransferManager.sol rename to contracts/modules/TransferManager.sol index 4ec179b29..1b209e9de 100644 --- a/contracts/modules/TransferManager/TransferManager.sol +++ b/contracts/modules/TransferManager.sol @@ -17,13 +17,13 @@ pragma solidity ^0.6.12; pragma experimental ABIEncoderV2; -import "../common/Utils.sol"; -import "../common/BaseTransfer.sol"; -import "../common/LimitUtils.sol"; -import "../../infrastructure/storage/ILimitStorage.sol"; -import "../../infrastructure/storage/ITransferStorage.sol"; -import "../../infrastructure/ITokenPriceRegistry.sol"; -import "../../../lib/other/ERC20.sol"; +import "./common/Utils.sol"; +import "./common/BaseTransfer.sol"; +import "./common/LimitUtils.sol"; +import "../infrastructure/storage/ILimitStorage.sol"; +import "../infrastructure/storage/ITransferStorage.sol"; +import "../infrastructure/ITokenPriceRegistry.sol"; +import "../../lib/other/ERC20.sol"; /** * @title TransferManager diff --git a/package.json b/package.json index 1f943cf01..37829baed 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "compile:infrastructure_0.5": "npx truffle compile --config truffle-config-infrastructure-0.5.js", "compile:infrastructure_0.6": "npx truffle compile --config truffle-config-infrastructure.js", "compile:infrastructure": "npm run compile:infrastructure_0.5 && npm run compile:infrastructure_0.6", - "compile:modules": "npx truffle compile --config truffle-config-modules.js && rm build/ApprovedTransfer.json && npx truffle compile --workingDirectory contracts/modules/ApprovedTransfer --runs=999 && rm build/RelayerManager.json && npx truffle compile --workingDirectory contracts/modules/RelayerManager --runs=999 && rm build/TransferManager.json && npx truffle compile --workingDirectory contracts/modules/TransferManager --runs=999 && rm build/TokenExchanger.json && npx truffle compile --workingDirectory contracts/modules/TokenExchanger --runs=999", + "compile:modules": "npx truffle compile --config truffle-config-modules.js && rm build/contracts/ApprovedTransfer.json && npx truffle compile --contracts_directory=./contracts/modules/ApprovedTransfer*.sol && rm build/contracts/RelayerManager.json && npx truffle compile --contracts_directory=./contracts/modules/RelayerManager*.sol && rm build/contracts/TransferManager.json && npx truffle compile --contracts_directory=./contracts/modules/TransferManager*.sol && rm build/contracts/TokenExchanger.json && npx truffle compile --contracts_directory=./contracts/modules/TokenExchanger*.sol", "compile:wallet": "npx truffle compile --config truffle-config-wallet.js", "compile:test": "npx truffle compile --config truffle-config-contracts-test.js", "compile": "npm run compile:infrastructure && npm run compile:modules && npm run compile:wallet", From 4ba30aea209d2dc48d33e61abdfe681d3c52ce18 Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Mon, 16 Nov 2020 12:41:53 +0200 Subject: [PATCH 088/113] Add truffle-flatten --- package-lock.json | 192 +++++++++++++++++++++++++++++++++++++++++ package.json | 1 + truffle-config.base.js | 2 +- 3 files changed, 194 insertions(+), 1 deletion(-) diff --git a/package-lock.json b/package-lock.json index f26faef54..6522f2e6e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -736,6 +736,92 @@ "resolved": "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-3.0.1.tgz", "integrity": "sha512-uSrD7hZ0ViuHGqHZbeHawZBi/uy7aBiNramXAt2dFFuSuoU4u9insS3V3zdVfOnYSPreUo636xSOuQIFN4//HA==" }, + "@resolver-engine/core": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@resolver-engine/core/-/core-0.2.1.tgz", + "integrity": "sha512-nsLQHmPJ77QuifqsIvqjaF5B9aHnDzJjp73Q1z6apY3e9nqYrx4Dtowhpsf7Jwftg/XzVDEMQC+OzUBNTS+S1A==", + "dev": true, + "requires": { + "debug": "^3.1.0", + "request": "^2.85.0" + }, + "dependencies": { + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + } + } + }, + "@resolver-engine/fs": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@resolver-engine/fs/-/fs-0.2.1.tgz", + "integrity": "sha512-7kJInM1Qo2LJcKyDhuYzh9ZWd+mal/fynfL9BNjWOiTcOpX+jNfqb/UmGUqros5pceBITlWGqS4lU709yHFUbg==", + "dev": true, + "requires": { + "@resolver-engine/core": "^0.2.1", + "debug": "^3.1.0" + }, + "dependencies": { + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + } + } + }, + "@resolver-engine/imports": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/@resolver-engine/imports/-/imports-0.2.2.tgz", + "integrity": "sha512-u5/HUkvo8q34AA+hnxxqqXGfby5swnH0Myw91o3Sm2TETJlNKXibFGSKBavAH+wvWdBi4Z5gS2Odu0PowgVOUg==", + "dev": true, + "requires": { + "@resolver-engine/core": "^0.2.1", + "debug": "^3.1.0", + "hosted-git-info": "^2.6.0" + }, + "dependencies": { + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + } + } + }, + "@resolver-engine/imports-fs": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/@resolver-engine/imports-fs/-/imports-fs-0.2.2.tgz", + "integrity": "sha512-gFCgMvCwyppjwq0UzIjde/WI+yDs3oatJhozG9xdjJdewwtd7LiF0T5i9lrHAUtqrQbqoFE4E+ZMRVHWpWHpKQ==", + "dev": true, + "requires": { + "@resolver-engine/fs": "^0.2.1", + "@resolver-engine/imports": "^0.2.2", + "debug": "^3.1.0" + }, + "dependencies": { + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + } + } + }, "@sindresorhus/is": { "version": "0.14.0", "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", @@ -11758,6 +11844,106 @@ "original-require": "1.0.1" } }, + "truffle-flatten": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/truffle-flatten/-/truffle-flatten-1.0.8.tgz", + "integrity": "sha512-ZUL3IcrxEIptS8AF6NtXjNNzaE6u+lWUN+hdEbBImAL+/e+A+QU10A53uZws6r9n/G+ahBsW+u/3QCgH8pyxMg==", + "dev": true, + "requires": { + "fs-extra": "^8.1.0", + "lodash": "4.17.15", + "truffle-flattener": "^1.4.2" + }, + "dependencies": { + "fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "dev": true, + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "lodash": { + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", + "dev": true + } + } + }, + "truffle-flattener": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/truffle-flattener/-/truffle-flattener-1.5.0.tgz", + "integrity": "sha512-vmzWG/L5OXoNruMV6u2l2IaheI091e+t+fFCOR9sl46EE3epkSRIwGCmIP/EYDtPsFBIG7e6exttC9/GlfmxEQ==", + "dev": true, + "requires": { + "@resolver-engine/imports-fs": "^0.2.2", + "@solidity-parser/parser": "^0.8.0", + "find-up": "^2.1.0", + "mkdirp": "^1.0.4", + "tsort": "0.0.1" + }, + "dependencies": { + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, + "mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true + }, + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + } + } + }, "truffle-plugin-verify": { "version": "0.5.0", "resolved": "https://registry.npmjs.org/truffle-plugin-verify/-/truffle-plugin-verify-0.5.0.tgz", @@ -11806,6 +11992,12 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" }, + "tsort": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/tsort/-/tsort-0.0.1.tgz", + "integrity": "sha1-4igPXoF/i/QnVlf9D5rr1E9aJ4Y=", + "dev": true + }, "tunnel-agent": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", diff --git a/package.json b/package.json index 37829baed..bfd2f1201 100644 --- a/package.json +++ b/package.json @@ -91,6 +91,7 @@ "solhint": "^3.3.1", "solidity-coverage": "^0.7.11", "truffle": "^5.1.48", + "truffle-flatten": "^1.0.8", "truffle-plugin-verify": "^0.5.0", "web3": "^1.3.0", "web3-eth-abi": "^1.3.0" diff --git a/truffle-config.base.js b/truffle-config.base.js index 380d284f1..fe73fdb93 100644 --- a/truffle-config.base.js +++ b/truffle-config.base.js @@ -133,7 +133,7 @@ module.exports = { }, }, - plugins: ["solidity-coverage", "truffle-plugin-verify"], + plugins: ["solidity-coverage", "truffle-plugin-verify", "truffle-flatten"], api_keys: { etherscan: process.env.ETHERSCAN_API_KEY From 0924d12b6ff5309fd50223d7f0a47d9e7d55f247 Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Mon, 16 Nov 2020 12:42:17 +0200 Subject: [PATCH 089/113] Fix a linting issue with old deployer.deploy syntax carried over in rebase --- test/versionManager.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/versionManager.js b/test/versionManager.js index d1cc9b566..196572b24 100644 --- a/test/versionManager.js +++ b/test/versionManager.js @@ -151,16 +151,16 @@ contract("VersionManager", (accounts) => { it("should not allow the fallback to be called via a non-static call", async () => { // Deploy new VersionManager with TransferManager - const versionManager2 = await deployer.deploy(VersionManager, {}, + const versionManager2 = await VersionManager.new( registry.contractAddress, lockStorage.contractAddress, guardianStorage.contractAddress, ethers.constants.AddressZero, ethers.constants.AddressZero); - const tokenPriceRegistry = await deployer.deploy(TokenPriceRegistry); - const transferStorage = await deployer.deploy(TransferStorage); - const limitStorage = await deployer.deploy(LimitStorage); - const transferManager = await deployer.deploy(TransferManager, {}, + const tokenPriceRegistry = await TokenPriceRegistry.new(); + const transferStorage = await TransferStorage.new(); + const limitStorage = await LimitStorage.new(); + const transferManager = await TransferManager.new( lockStorage.contractAddress, transferStorage.contractAddress, limitStorage.contractAddress, @@ -175,7 +175,7 @@ contract("VersionManager", (accounts) => { await registry.registerModule(versionManager2.contractAddress, ethers.utils.formatBytes32String("VersionManager2")); // Deploy Upgrader to new VersionManager - const upgrader = await deployer.deploy(UpgraderToVersionManager, {}, + const upgrader = await UpgraderToVersionManager.new( registry.contractAddress, lockStorage.contractAddress, [versionManager.contractAddress], // toDisable From e83bf3cbfe842c98b252db366aa7060048cf3b7e Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Mon, 16 Nov 2020 13:50:59 +0200 Subject: [PATCH 090/113] Switch etherlime .contractAddress syntax to .address --- test/versionManager.js | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/test/versionManager.js b/test/versionManager.js index 196572b24..5029c3dd2 100644 --- a/test/versionManager.js +++ b/test/versionManager.js @@ -152,43 +152,43 @@ contract("VersionManager", (accounts) => { it("should not allow the fallback to be called via a non-static call", async () => { // Deploy new VersionManager with TransferManager const versionManager2 = await VersionManager.new( - registry.contractAddress, - lockStorage.contractAddress, - guardianStorage.contractAddress, + registry.address, + lockStorage.address, + guardianStorage.address, ethers.constants.AddressZero, ethers.constants.AddressZero); const tokenPriceRegistry = await TokenPriceRegistry.new(); const transferStorage = await TransferStorage.new(); const limitStorage = await LimitStorage.new(); const transferManager = await TransferManager.new( - lockStorage.contractAddress, - transferStorage.contractAddress, - limitStorage.contractAddress, - tokenPriceRegistry.contractAddress, - versionManager2.contractAddress, + lockStorage.address, + transferStorage.address, + limitStorage.address, + tokenPriceRegistry.address, + versionManager2.address, 3600, 3600, 10000, ethers.constants.AddressZero, ethers.constants.AddressZero); - await versionManager2.addVersion([transferManager.contractAddress], []); - await registry.registerModule(versionManager2.contractAddress, ethers.utils.formatBytes32String("VersionManager2")); + await versionManager2.addVersion([transferManager.address], []); + await registry.registerModule(versionManager2.address, ethers.utils.formatBytes32String("VersionManager2")); // Deploy Upgrader to new VersionManager const upgrader = await UpgraderToVersionManager.new( - registry.contractAddress, - lockStorage.contractAddress, - [versionManager.contractAddress], // toDisable - versionManager2.contractAddress); - await registry.registerModule(upgrader.contractAddress, ethers.utils.formatBytes32String("Upgrader")); + registry.address, + lockStorage.address, + [versionManager.address], // toDisable + versionManager2.address); + await registry.registerModule(upgrader.address, ethers.utils.formatBytes32String("Upgrader")); // Upgrade wallet to new VersionManger - await versionManager.from(owner).addModule(wallet.contractAddress, upgrader.contractAddress); + await versionManager.from(owner).addModule(wallet.address, upgrader.address); // Attempt to call a malicious (non-static) call on the old VersionManager const data = testFeature.contract.interface.functions.badStaticCall.encode([]); await assert.revertWith( - transferManager.from(owner).callContract(wallet.contractAddress, versionManager.contractAddress, 0, data), + transferManager.from(owner).callContract(wallet.address, versionManager.address, 0, data), "VM: not in a staticcall", ); }); From 7021aae80b1ecc9a7533db3a8675e5998ac2a348 Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Mon, 16 Nov 2020 14:09:57 +0200 Subject: [PATCH 091/113] Switch to deterministic accounts generation in ganache-cli --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index bfd2f1201..43ce11ce5 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "compile:test": "npx truffle compile --config truffle-config-contracts-test.js", "compile": "npm run compile:infrastructure && npm run compile:modules && npm run compile:wallet", "cc": "rm -rf build && rm -rf build-legacy && npm run compile:lib && npm run compile && npm run compile:legacy && npm run compile:test && npm run provision:lib:artefacts", - "ganache": "npx ganache-cli --chainId 1895 --networkId 1597649375983 --gasLimit=20700000 -e 10000 --acctKeys=\"./ganache-accounts.json\" --account=\"0x7ab741b57e8d94dd7e1a29055646bafde7010f38a900f55bbd7647880faa6ee8, 100000000000000000000000000000000000000\" --account=\"0x2030b463177db2da82908ef90fa55ddfcef56e8183caf60db464bc398e736e6f, 100000000000000000000000000000000000000\" --account=\"0x62ecd49c4ccb41a70ad46532aed63cf815de15864bc415c87d507afd6a5e8da2, 100000000000000000000000000000000000000\" --account=\"0xf473040b1a83739a9c7cc1f5719fab0f5bf178f83314d98557c58aae1910e03a, 100000000000000000000000000000000000000\" --account=\"0x823d590ed2cb5e8493bb0efc834771c1cde36f9fc49b9fe3620ebd0754ad6ea2, 100000000000000000000000000000000000000\" --account=\"0xd6d710943471e4c37ceb787857e7a2b41ca57f9cb4307ee9a9b21436a8e709c3, 100000000000000000000000000000000000000\" --account=\"0x187bb12e927c1652377405f81d93ce948a593f7d66cfba383ee761858b05921a, 100000000000000000000000000000000000000\" --account=\"0xf41486fdb04505e7966c8720a353ed92ce0d6830f8a5e915fbde735106a06d25, 100000000000000000000000000000000000000\" --account=\"0x6ca40ba4cca775643398385022264c0c414da1abd21d08d9e7136796a520a543, 100000000000000000000000000000000000000\" --account=\"0xfac0bc9325ad342033afe956e83f0bf8f1e863c1c3e956bc75d66961fe4cd186, 100000000000000000000000000000000000000\"", + "ganache": "npx ganache-cli --chainId 1895 --networkId 1597649375983 --gasLimit=20700000 -e 10000 --acctKeys=\"./ganache-accounts.json\" --deterministic", "kovan-fork": "npx ganache-cli -i 42 -l 20700000 -f https://kovan.infura.io/v3/$(cat .env | sed -En 's/INFURA_KEY=''\"''([^''\"'']+)''\"''/\\1/p')@16988040", "kovan-fork-latest": "npx ganache-cli -i 42 -l 20700000 -f https://kovan.infura.io/v3/$(cat .env | sed -En 's/INFURA_KEY=''\"''([^''\"'']+)''\"''/\\1/p')", "test": "npx truffle test", From e38de819e47b38d678d9c8d101ab02b4fb7526d7 Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Mon, 16 Nov 2020 14:57:58 +0200 Subject: [PATCH 092/113] Fix versionManager test --- test/versionManager.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/versionManager.js b/test/versionManager.js index 5029c3dd2..d8d822021 100644 --- a/test/versionManager.js +++ b/test/versionManager.js @@ -183,12 +183,12 @@ contract("VersionManager", (accounts) => { await registry.registerModule(upgrader.address, ethers.utils.formatBytes32String("Upgrader")); // Upgrade wallet to new VersionManger - await versionManager.from(owner).addModule(wallet.address, upgrader.address); + await versionManager.addModule(wallet.address, upgrader.address, { from: owner }); // Attempt to call a malicious (non-static) call on the old VersionManager - const data = testFeature.contract.interface.functions.badStaticCall.encode([]); - await assert.revertWith( - transferManager.from(owner).callContract(wallet.address, versionManager.address, 0, data), + const data = await testFeature.contract.methods.badStaticCall().encodeABI(); + await utils.assertRevert( + transferManager.callContract(wallet.address, versionManager.address, 0, data, { from: owner }), "VM: not in a staticcall", ); }); From fd7205c0d7a832fe519a489c852df5bcf5325226 Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Mon, 16 Nov 2020 15:25:34 +0200 Subject: [PATCH 093/113] Add truffle-assertions package and migrate utils.assertRevert to use truffleAssert.reverts --- package-lock.json | 16 ++++++++++++ package.json | 1 + test/approvedTransfer.js | 7 ++--- test/argentWalletDetector.js | 5 ++-- test/baseContracts.js | 12 ++++----- test/baseWallet.js | 19 +++++++------- test/compoundManager_invest.js | 13 ++++----- test/compoundManager_loan.js | 21 ++++++++------- test/ens.js | 9 ++++--- test/factory.js | 27 ++++++++++--------- test/guardianManager.js | 45 ++++++++++++++++---------------- test/lockManager.js | 11 ++++---- test/makerV2Manager_loan.js | 35 +++++++++++++------------ test/multisig.js | 24 +++++++++-------- test/nftTransfer.js | 3 ++- test/recoveryManager.js | 35 +++++++++++++------------ test/relayer.js | 23 ++++++++-------- test/simpleUpgrader.js | 11 ++++---- test/tokenExchanger.js | 5 ++-- test/tokenPriceRegistry.js | 15 +++++++---- test/transferManager.js | 21 ++++++++------- test/upgraderToVersionManager.js | 4 +-- test/versionManager.js | 20 +++++++------- utils/utilities.js | 19 -------------- 24 files changed, 211 insertions(+), 190 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6522f2e6e..5d2e21bff 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8634,6 +8634,12 @@ "integrity": "sha1-74y/QI9uSCaGYzRTBcaswLd4cC4=", "dev": true }, + "lodash.isequal": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", + "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=", + "dev": true + }, "lodash.toarray": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/lodash.toarray/-/lodash.toarray-4.4.0.tgz", @@ -11844,6 +11850,16 @@ "original-require": "1.0.1" } }, + "truffle-assertions": { + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/truffle-assertions/-/truffle-assertions-0.9.2.tgz", + "integrity": "sha512-9g2RhaxU2F8DeWhqoGQvL/bV8QVoSnQ6PY+ZPvYRP5eF7+/8LExb4mjLx/FeliLTjc3Tv1SABG05Gu5qQ/ErmA==", + "dev": true, + "requires": { + "assertion-error": "^1.1.0", + "lodash.isequal": "^4.5.0" + } + }, "truffle-flatten": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/truffle-flatten/-/truffle-flatten-1.0.8.tgz", diff --git a/package.json b/package.json index 43ce11ce5..b7d6d1c48 100644 --- a/package.json +++ b/package.json @@ -91,6 +91,7 @@ "solhint": "^3.3.1", "solidity-coverage": "^0.7.11", "truffle": "^5.1.48", + "truffle-assertions": "^0.9.2", "truffle-flatten": "^1.0.8", "truffle-plugin-verify": "^0.5.0", "web3": "^1.3.0", diff --git a/test/approvedTransfer.js b/test/approvedTransfer.js index 861e35ffb..fd4d67201 100644 --- a/test/approvedTransfer.js +++ b/test/approvedTransfer.js @@ -1,5 +1,6 @@ /* global artifacts */ const ethers = require("ethers"); +const truffleAssert = require("truffle-assertions"); const Proxy = artifacts.require("Proxy"); const BaseWallet = artifacts.require("BaseWallet"); @@ -17,7 +18,7 @@ const TestContract = artifacts.require("TestContract"); const TestLimitFeature = artifacts.require("TestLimitFeature"); const RelayManager = require("../utils/relay-manager"); -const { sortWalletByAddress, parseRelayReceipt, ETH_TOKEN, getBalance, assertRevert } = require("../utils/utilities.js"); +const { sortWalletByAddress, parseRelayReceipt, ETH_TOKEN, getBalance } = require("../utils/utilities.js"); const utils = require("../utils/utilities.js"); const ZERO_BYTES32 = ethers.constants.HashZero; @@ -150,7 +151,7 @@ contract("ApprovedTransfer", (accounts) => { describe("Transfer", () => { async function expectFailingTransferToken(_token, _signers, _reason) { - await assertRevert( + await truffleAssert.reverts( manager.relay( approvedTransfer, "transferToken", @@ -267,7 +268,7 @@ contract("ApprovedTransfer", (accounts) => { contract = await TestContract.new(); const dataToTransfer = contract.contract.methods.setState([1]).encodeABI(); - await assertRevert( + await truffleAssert.reverts( manager.relay( approvedTransfer, "callContract", diff --git a/test/argentWalletDetector.js b/test/argentWalletDetector.js index a0df2a9fb..b502e979d 100644 --- a/test/argentWalletDetector.js +++ b/test/argentWalletDetector.js @@ -1,6 +1,7 @@ /* global artifacts */ const { expect, assert } = require("chai"); const ethers = require("ethers"); +const truffleAssert = require("truffle-assertions"); const ArgentWalletDetector = artifacts.require("ArgentWalletDetector"); const Proxy = artifacts.require("Proxy"); @@ -79,11 +80,11 @@ describe("ArgentWalletDetector", () => { }); it("should fail to add an empty code", async () => { - await utils.assertRevert(detector.addCode(ZERO_BYTES32), EMPTY_CODE_MSG); + await truffleAssert.reverts(detector.addCode(ZERO_BYTES32), EMPTY_CODE_MSG); }); it("should fail to add an empty implementation", async () => { - await utils.assertRevert(detector.addImplementation(ZERO_ADDRESS), EMPTY_IMPL_MSG); + await truffleAssert.reverts(detector.addImplementation(ZERO_ADDRESS), EMPTY_IMPL_MSG); }); it("should add code and implementation from a wallet", async () => { diff --git a/test/baseContracts.js b/test/baseContracts.js index 423e979f1..f2dd19193 100644 --- a/test/baseContracts.js +++ b/test/baseContracts.js @@ -1,6 +1,6 @@ /* global artifacts */ const ethers = require("ethers"); -const utils = require("../utils/utilities.js"); +const truffleAssert = require("truffle-assertions"); const Managed = artifacts.require("Managed"); @@ -30,7 +30,7 @@ contract("Managed and Owned", (accounts) => { }); it("should not be able to change owner to zero address", async () => { - await utils.assertRevert(managed.changeOwner(ethers.constants.AddressZero), "Address must not be null"); + await truffleAssert.reverts(managed.changeOwner(ethers.constants.AddressZero), "Address must not be null"); }); }); @@ -53,11 +53,11 @@ contract("Managed and Owned", (accounts) => { }); it("should not be able to add manager if not called by owner", async () => { - await utils.assertRevert(managed.addManager(manager1, { from: nonOwner }), "Must be owner"); + await truffleAssert.reverts(managed.addManager(manager1, { from: nonOwner }), "Must be owner"); }); it("should not be able to set manager to zero address", async () => { - await utils.assertRevert(managed.addManager(ethers.constants.AddressZero), "M: Address must not be null"); + await truffleAssert.reverts(managed.addManager(ethers.constants.AddressZero), "M: Address must not be null"); }); it("should be able to set manager twice without error", async () => { @@ -88,11 +88,11 @@ contract("Managed and Owned", (accounts) => { it("should not be able to revoke manager if not called by owner", async () => { await managed.addManager(manager1); - await utils.assertRevert(managed.revokeManager(manager1, { from: nonOwner }), "Must be owner"); + await truffleAssert.reverts(managed.revokeManager(manager1, { from: nonOwner }), "Must be owner"); }); it("should not be able to revoke a nonexisting managerr", async () => { - await utils.assertRevert(managed.revokeManager(manager2), "M: Target must be an existing manager"); + await truffleAssert.reverts(managed.revokeManager(manager2), "M: Target must be an existing manager"); }); }); }); diff --git a/test/baseWallet.js b/test/baseWallet.js index 472513b2f..e591267d0 100644 --- a/test/baseWallet.js +++ b/test/baseWallet.js @@ -1,5 +1,6 @@ /* global artifacts */ const ethers = require("ethers"); +const truffleAssert = require("truffle-assertions"); const Proxy = artifacts.require("Proxy"); const BaseWallet = artifacts.require("BaseWallet"); @@ -13,7 +14,7 @@ const GuardianStorage = artifacts.require("GuardianStorage"); const LockStorage = artifacts.require("LockStorage"); const TestFeature = artifacts.require("TestFeature"); -const { getBalance, assertRevert } = require("../utils/utilities.js"); +const { getBalance } = require("../utils/utilities.js"); contract("BaseWallet", (accounts) => { const owner = accounts[1]; @@ -126,15 +127,15 @@ contract("BaseWallet", (accounts) => { it("should not reinitialize a wallet", async () => { await wallet.init(owner, [module1.address]); await module1.upgradeWallet(wallet.address, await module1.lastVersion(), { from: owner }); - await assertRevert(wallet.init(owner, [module1.address]), "BW: wallet already initialised"); + await truffleAssert.reverts(wallet.init(owner, [module1.address]), "BW: wallet already initialised"); }); it("should not initialize a wallet with no module", async () => { - await assertRevert(wallet.init(owner, []), "BW: construction requires at least 1 module"); + await truffleAssert.reverts(wallet.init(owner, []), "BW: construction requires at least 1 module"); }); it("should not initialize a wallet with duplicate modules", async () => { - await assertRevert(wallet.init(owner, [module1.address, module1.address]), "BW: module is already added"); + await truffleAssert.reverts(wallet.init(owner, [module1.address, module1.address]), "BW: module is already added"); }); }); @@ -157,14 +158,14 @@ contract("BaseWallet", (accounts) => { describe("Authorisations", () => { it("should not let a non-module deauthorise a module", async () => { await wallet.init(owner, [module1.address]); - await assertRevert(wallet.authoriseModule(module1.address, false), "BW: msg.sender not an authorized module"); + await truffleAssert.reverts(wallet.authoriseModule(module1.address, false), "BW: msg.sender not an authorized module"); }); it("should not let a feature set the owner to address(0)", async () => { await wallet.init(owner, [module1.address]); await module1.upgradeWallet(wallet.address, await module1.lastVersion(), { from: owner }); - await assertRevert(feature1.invalidOwnerChange(wallet.address), "BW: address cannot be null"); + await truffleAssert.reverts(feature1.invalidOwnerChange(wallet.address), "BW: address cannot be null"); }); }); @@ -199,7 +200,7 @@ contract("BaseWallet", (accounts) => { // trying to execute static call delegated to module1 (it should fail) const walletAsModule = await TestFeature.at(wallet.address); - await assertRevert(walletAsModule.getBoolean(), "BW: must be an authorised module for static call"); + await truffleAssert.reverts(walletAsModule.getBoolean(), "BW: must be an authorised module for static call"); }); }); }); @@ -211,7 +212,7 @@ contract("BaseWallet", (accounts) => { await module1.upgradeWallet(oldWallet.address, await module1.lastVersion(), { from: owner }); await feature1.callDapp(oldWallet.address); await feature1.callDapp2(oldWallet.address, 2, false); - await assertRevert(feature1.fail(oldWallet.address, "just because")); + await truffleAssert.reverts(feature1.fail(oldWallet.address, "just because")); }); }); @@ -222,7 +223,7 @@ contract("BaseWallet", (accounts) => { await module1.upgradeWallet(oldWallet.address, await module1.lastVersion(), { from: owner }); await feature1.callDapp(oldWallet.address); await feature1.callDapp2(oldWallet.address, 2, true); - await assertRevert(feature1.fail(oldWallet.address, "just because")); + await truffleAssert.reverts(feature1.fail(oldWallet.address, "just because")); }); }); }); diff --git a/test/compoundManager_invest.js b/test/compoundManager_invest.js index 68e3e3d62..dc634900e 100644 --- a/test/compoundManager_invest.js +++ b/test/compoundManager_invest.js @@ -1,4 +1,5 @@ /* global artifacts */ +const truffleAssert = require("truffle-assertions"); const { formatBytes32String } = require("ethers").utils; const ethers = require("ethers"); const chai = require("chai"); @@ -274,17 +275,17 @@ contract("Invest Manager with Compound", (accounts) => { it("should fail to invest in ERC20 with an unknown token", async () => { const params = [wallet.address, ethers.constants.AddressZero, web3.utils.toWei("1"), 0]; - await utils.assertRevert(investManager.addInvestment(...params, { from: owner }), "CM: No market for target token"); + await truffleAssert.reverts(investManager.addInvestment(...params, { from: owner }), "CM: No market for target token"); }); it("should fail to invest in ERC20 with an amount of zero", async () => { const params = [wallet.address, token.address, 0, 0]; - await utils.assertRevert(investManager.addInvestment(...params, { from: owner }), "CM: amount cannot be 0"); + await truffleAssert.reverts(investManager.addInvestment(...params, { from: owner }), "CM: amount cannot be 0"); }); it("should fail to invest in ERC20 when not holding any ERC20", async () => { const params = [wallet.address, token.address, web3.utils.toWei("1"), 0]; - await utils.assertRevert(investManager.addInvestment(...params, { from: owner }), "CM: mint failed"); + await truffleAssert.reverts(investManager.addInvestment(...params, { from: owner }), "CM: mint failed"); }); }); @@ -313,12 +314,12 @@ contract("Invest Manager with Compound", (accounts) => { it("should fail to remove an ERC20 investment when passing an invalid fraction value", async () => { const params = [wallet.address, token.address, 50000]; - await utils.assertRevert(investManager.removeInvestment(...params, { from: owner }), "CM: invalid fraction value"); + await truffleAssert.reverts(investManager.removeInvestment(...params, { from: owner }), "CM: invalid fraction value"); }); it("should fail to remove an ERC20 investment when not holding any of the corresponding cToken", async () => { const params = [wallet.address, token.address, 5000]; - await utils.assertRevert(investManager.removeInvestment(...params, { from: owner }), "CM: amount cannot be 0"); + await truffleAssert.reverts(investManager.removeInvestment(...params, { from: owner }), "CM: amount cannot be 0"); }); it("should fail to remove all of an ERC20 investment when it collateralizes a loan", async () => { @@ -333,7 +334,7 @@ contract("Invest Manager with Compound", (accounts) => { debtAmount]; await investManager.openLoan(...openLoanParams, { from: owner }); const removeInvestmentParams = [wallet.address, token.address, 10000]; - await utils.assertRevert(investManager.removeInvestment(...removeInvestmentParams, { from: owner }), "CM: redeem failed"); + await truffleAssert.reverts(investManager.removeInvestment(...removeInvestmentParams, { from: owner }), "CM: redeem failed"); }); }); }); diff --git a/test/compoundManager_loan.js b/test/compoundManager_loan.js index faf88f33c..480dc5665 100644 --- a/test/compoundManager_loan.js +++ b/test/compoundManager_loan.js @@ -1,5 +1,6 @@ /* global artifacts */ +const truffleAssert = require("truffle-assertions"); const ethers = require("ethers"); const chai = require("chai"); const BN = require("bn.js"); @@ -342,7 +343,7 @@ contract("Loan Module", (accounts) => { expect(loan._ethValue).to.be.gt.BN(0); await oracle.setUnderlyingPrice(cToken1.address, 0); - await utils.assertRevert(loanManager.getLoan(wallet.address, ZERO_BYTES32), "CM: failed to get account liquidity"); + await truffleAssert.reverts(loanManager.getLoan(wallet.address, ZERO_BYTES32), "CM: failed to get account liquidity"); await oracle.setUnderlyingPrice(cToken1.address, WAD.divn(10)); loan = await loanManager.getLoan(ethers.constants.AddressZero, ZERO_BYTES32); @@ -439,27 +440,27 @@ contract("Loan Module", (accounts) => { it("should fail to borrow an unknown token", async () => { const params = [wallet.address, ZERO_BYTES32, ethers.constants.AddressZero, web3.utils.toWei("1")]; - await utils.assertRevert(loanManager.addDebt(...params, { from: owner }), "CM: No market for target token"); + await truffleAssert.reverts(loanManager.addDebt(...params, { from: owner }), "CM: No market for target token"); }); it("should fail to borrow 0 token", async () => { const params = [wallet.address, ZERO_BYTES32, ETH_TOKEN, 0]; - await utils.assertRevert(loanManager.addDebt(...params, { from: owner }), "CM: amount cannot be 0"); + await truffleAssert.reverts(loanManager.addDebt(...params, { from: owner }), "CM: amount cannot be 0"); }); it("should fail to borrow token with no collateral", async () => { const params = [wallet.address, ZERO_BYTES32, ETH_TOKEN, web3.utils.toWei("1")]; - await utils.assertRevert(loanManager.addDebt(...params, { from: owner }), "CM: borrow failed"); + await truffleAssert.reverts(loanManager.addDebt(...params, { from: owner }), "CM: borrow failed"); }); it("should fail to repay an unknown token", async () => { const params = [wallet.address, ZERO_BYTES32, ethers.constants.AddressZero, web3.utils.toWei("1")]; - await utils.assertRevert(loanManager.removeDebt(...params, { from: owner }), "CM: No market for target token"); + await truffleAssert.reverts(loanManager.removeDebt(...params, { from: owner }), "CM: No market for target token"); }); it("should fail to repay 0 token", async () => { const params = [wallet.address, ZERO_BYTES32, ETH_TOKEN, 0]; - await utils.assertRevert(loanManager.removeDebt(...params, { from: owner }), "CM: amount cannot be 0"); + await truffleAssert.reverts(loanManager.removeDebt(...params, { from: owner }), "CM: amount cannot be 0"); }); it("should fail to repay too much debt token", async () => { @@ -470,17 +471,17 @@ contract("Loan Module", (accounts) => { collateral: ETH_TOKEN, collateralAmount, debt: token1, debtAmount, relayed: false, }); const removeDebtParams = [wallet.address, loanId, token1.address, web3.utils.toWei("0.002")]; - await utils.assertRevert(loanManager.removeDebt(...removeDebtParams, { from: owner }), "CM: repayBorrow failed"); + await truffleAssert.reverts(loanManager.removeDebt(...removeDebtParams, { from: owner }), "CM: repayBorrow failed"); }); it("should fail to remove an unknown collateral token", async () => { const params = [wallet.address, ZERO_BYTES32, ethers.constants.AddressZero, web3.utils.toWei("1")]; - await utils.assertRevert(loanManager.removeCollateral(...params, { from: owner }), "CM: No market for target token"); + await truffleAssert.reverts(loanManager.removeCollateral(...params, { from: owner }), "CM: No market for target token"); }); it("should fail to remove 0 collateral token", async () => { const params = [wallet.address, ZERO_BYTES32, ETH_TOKEN, web3.utils.toWei("0")]; - await utils.assertRevert(loanManager.removeCollateral(...params, { from: owner }), "CM: amount cannot be 0"); + await truffleAssert.reverts(loanManager.removeCollateral(...params, { from: owner }), "CM: amount cannot be 0"); }); it("should fail to remove too much collateral token", async () => { @@ -491,7 +492,7 @@ contract("Loan Module", (accounts) => { collateral: ETH_TOKEN, collateralAmount, debt: token1, debtAmount, relayed: false, }); const removeDebtParams = [wallet.address, loanId, token1.address, web3.utils.toWei("0.002")]; - await utils.assertRevert(loanManager.removeCollateral(...removeDebtParams, { from: owner }), "CM: redeemUnderlying failed"); + await truffleAssert.reverts(loanManager.removeCollateral(...removeDebtParams, { from: owner }), "CM: redeemUnderlying failed"); }); }); diff --git a/test/ens.js b/test/ens.js index 83ae239d7..c9ce817d6 100644 --- a/test/ens.js +++ b/test/ens.js @@ -7,6 +7,7 @@ const ENSManager = artifacts.require("ArgentENSManager"); const ENSResolver = artifacts.require("ArgentENSResolver"); const ENSReverseRegistrar = artifacts.require("ReverseRegistrar"); +const truffleAssert = require("truffle-assertions"); const utilities = require("../utils/utilities.js"); const ZERO_BYTES32 = ethers.constants.HashZero; @@ -100,7 +101,7 @@ contract("ENS contracts", (accounts) => { it("should fail to register an ENS name when the caller is not a manager", async () => { const label = "wallet"; - await utilities.assertRevert(ensManager.register(label, owner, { from: anonmanager }), "M: Must be manager"); + await truffleAssert.reverts(ensManager.register(label, owner, { from: anonmanager }), "M: Must be manager"); }); it("should be able to change the root node owner", async () => { @@ -112,7 +113,7 @@ contract("ENS contracts", (accounts) => { it("should not be able to change the root node owner if not the owner", async () => { const randomAddress = await utilities.getRandomAddress(); - await utilities.assertRevert(ensManager.changeRootnodeOwner(randomAddress, { from: amanager }), "Must be owner"); + await truffleAssert.reverts(ensManager.changeRootnodeOwner(randomAddress, { from: amanager }), "Must be owner"); }); it("should be able to change the ens resolver", async () => { @@ -124,11 +125,11 @@ contract("ENS contracts", (accounts) => { it("should not be able to change the ens resolver if not owner", async () => { const randomAddress = await utilities.getRandomAddress(); - await utilities.assertRevert(ensManager.changeENSResolver(randomAddress, { from: amanager }), "Must be owner"); + await truffleAssert.reverts(ensManager.changeENSResolver(randomAddress, { from: amanager }), "Must be owner"); }); it("should not be able to change the ens resolver to an empty address", async () => { - await utilities.assertRevert(ensManager.changeENSResolver(ethers.constants.AddressZero), "WF: address cannot be null"); + await truffleAssert.reverts(ensManager.changeENSResolver(ethers.constants.AddressZero), "WF: address cannot be null"); }); }); diff --git a/test/factory.js b/test/factory.js index f703d88c1..cca879d07 100644 --- a/test/factory.js +++ b/test/factory.js @@ -1,5 +1,6 @@ /* global artifacts */ const ethers = require("ethers"); +const truffleAssert = require("truffle-assertions"); const BaseWallet = artifacts.require("BaseWallet"); const VersionManager = artifacts.require("VersionManager"); @@ -55,21 +56,21 @@ contract("WalletFactory", (accounts) => { describe("Create and configure the factory", () => { it("should not allow to be created with empty ModuleRegistry", async () => { - await utils.assertRevert(Factory.new( + await truffleAssert.reverts(Factory.new( ZERO_ADDRESS, implementation.address, guardianStorage.address), "WF: ModuleRegistry address not defined"); }); it("should not allow to be created with empty WalletImplementation", async () => { - await utils.assertRevert(Factory.new( + await truffleAssert.reverts(Factory.new( moduleRegistry.address, ZERO_ADDRESS, guardianStorage.address), "WF: WalletImplementation address not defined"); }); it("should not allow to be created with empty GuardianStorage", async () => { - await utils.assertRevert(Factory.new( + await truffleAssert.reverts(Factory.new( moduleRegistry.address, implementation.address, ZERO_ADDRESS), "WF: GuardianStorage address not defined"); @@ -83,12 +84,12 @@ contract("WalletFactory", (accounts) => { }); it("should not allow owner to change the module registry to zero address", async () => { - await utils.assertRevert(factory.changeModuleRegistry(ethers.constants.AddressZero), "WF: address cannot be null"); + await truffleAssert.reverts(factory.changeModuleRegistry(ethers.constants.AddressZero), "WF: address cannot be null"); }); it("should not allow non-owner to change the module registry", async () => { const randomAddress = utils.getRandomAddress(); - await utils.assertRevert(factory.changeModuleRegistry(randomAddress, { from: other }), "Must be owner"); + await truffleAssert.reverts(factory.changeModuleRegistry(randomAddress, { from: other }), "Must be owner"); }); }); @@ -138,17 +139,17 @@ contract("WalletFactory", (accounts) => { it("should fail to create when the guardian is empty", async () => { // we create the wallet - await utils.assertRevert(factory.createWallet(owner, versionManager.address, ZERO_ADDRESS, 1), + await truffleAssert.reverts(factory.createWallet(owner, versionManager.address, ZERO_ADDRESS, 1), "WF: guardian cannot be null"); }); it("should fail to create when there are is no VersionManager", async () => { - await utils.assertRevert(factory.createWallet(owner, ethers.constants.AddressZero, guardian, 1), + await truffleAssert.reverts(factory.createWallet(owner, ethers.constants.AddressZero, guardian, 1), "WF: invalid _versionManager"); }); it("should fail to create with zero address as owner", async () => { - await utils.assertRevert( + await truffleAssert.reverts( factory.createWallet(ethers.constants.AddressZero, versionManager.address, guardian, 1), "WF: owner cannot be null", ); @@ -156,7 +157,7 @@ contract("WalletFactory", (accounts) => { it("should fail to create with unregistered module", async () => { const randomAddress = utils.getRandomAddress(); - await utils.assertRevert(factory.createWallet(owner, randomAddress, guardian, 1), + await truffleAssert.reverts(factory.createWallet(owner, randomAddress, guardian, 1), "WF: invalid _versionManager"); }); }); @@ -266,12 +267,12 @@ contract("WalletFactory", (accounts) => { // we test that the wallet is at the correct address assert.equal(futureAddr, event.args.wallet, "should have the correct address"); // we create the second wallet - await utils.assertRevert(factory.createCounterfactualWallet(owner, versionManager.address, guardian, salt, 1)); + await truffleAssert.reverts(factory.createCounterfactualWallet(owner, versionManager.address, guardian, salt, 1)); }); it("should fail to create counterfactually when there are no modules (with guardian)", async () => { const salt = utils.generateSaltValue(); - await utils.assertRevert( + await truffleAssert.reverts( factory.createCounterfactualWallet( owner, ethers.constants.AddressZero, guardian, salt, 1 ), @@ -281,7 +282,7 @@ contract("WalletFactory", (accounts) => { it("should fail to create when the guardian is empty", async () => { const salt = utils.generateSaltValue(); - await utils.assertRevert( + await truffleAssert.reverts( factory.createCounterfactualWallet(owner, versionManager.address, ZERO_ADDRESS, salt, 1), "WF: guardian cannot be null", ); @@ -306,7 +307,7 @@ contract("WalletFactory", (accounts) => { it("should fail to get an address when the guardian is empty", async () => { const salt = utils.generateSaltValue(); - await utils.assertRevert( + await truffleAssert.reverts( factory.getAddressForCounterfactualWallet(owner, versionManager.address, ZERO_ADDRESS, salt, 1), "WF: guardian cannot be null", ); diff --git a/test/guardianManager.js b/test/guardianManager.js index 3b048967d..bd4e30c76 100644 --- a/test/guardianManager.js +++ b/test/guardianManager.js @@ -1,5 +1,6 @@ /* global artifacts */ const ethers = require("ethers"); +const truffleAssert = require("truffle-assertions"); const GuardianManager = artifacts.require("GuardianManager"); const LockStorage = artifacts.require("LockStorage"); @@ -100,7 +101,7 @@ contract("GuardianManager", (accounts) => { await guardianManager.addGuardian(wallet.address, guardian2, { from: owner }); await utilities.increaseTime(48); // 42 == 2 * security_period - await utilities.assertRevert(guardianManager.confirmGuardianAddition(wallet.address, guardian2), + await truffleAssert.reverts(guardianManager.confirmGuardianAddition(wallet.address, guardian2), "GM: Too late to confirm guardian addition"); const count = (await guardianStorage.guardianCount(wallet.address)).toNumber(); @@ -112,7 +113,7 @@ contract("GuardianManager", (accounts) => { it("should not allow confirming too early", async () => { await guardianManager.addGuardian(wallet.address, guardian1, { from: owner }); await guardianManager.addGuardian(wallet.address, guardian2, { from: owner }); - await utilities.assertRevert(guardianManager.confirmGuardianAddition(wallet.address, guardian2), + await truffleAssert.reverts(guardianManager.confirmGuardianAddition(wallet.address, guardian2), "GM: Too early to confirm guardian addition"); }); @@ -123,7 +124,7 @@ contract("GuardianManager", (accounts) => { await guardianManager.addGuardian(wallet.address, guardian2, { from: owner }); await utilities.increaseTime(48); // 42 == 2 * security_period - await utilities.assertRevert(guardianManager.confirmGuardianAddition(wallet.address, guardian2), + await truffleAssert.reverts(guardianManager.confirmGuardianAddition(wallet.address, guardian2), "GM: Too late to confirm guardian addition"); // second time @@ -142,25 +143,25 @@ contract("GuardianManager", (accounts) => { }); it("should only let the owner add an EOA guardian", async () => { - await utilities.assertRevert(guardianManager.addGuardian(wallet.address, guardian1, { from: nonowner }), + await truffleAssert.reverts(guardianManager.addGuardian(wallet.address, guardian1, { from: nonowner }), "BF: must be owner or feature"); }); it("should not allow adding wallet owner as guardian", async () => { - await utilities.assertRevert(guardianManager.addGuardian(wallet.address, owner, { from: owner }), + await truffleAssert.reverts(guardianManager.addGuardian(wallet.address, owner, { from: owner }), "GM: target guardian cannot be owner"); }); it("should not allow adding an existing guardian twice", async () => { await guardianManager.addGuardian(wallet.address, guardian1, { from: owner }); - await utilities.assertRevert(guardianManager.addGuardian(wallet.address, guardian1, { from: owner }), + await truffleAssert.reverts(guardianManager.addGuardian(wallet.address, guardian1, { from: owner }), "GM: target is already a guardian"); }); it("should not allow adding a duplicate request to add a guardian to the request queue", async () => { await guardianManager.addGuardian(wallet.address, guardian1, { from: owner }); await guardianManager.addGuardian(wallet.address, guardian2, { from: owner }); - await utilities.assertRevert(guardianManager.addGuardian(wallet.address, guardian2, { from: owner }), + await truffleAssert.reverts(guardianManager.addGuardian(wallet.address, guardian2, { from: owner }), "GM: addition of target as guardian is already pending"); }); @@ -261,14 +262,14 @@ contract("GuardianManager", (accounts) => { }); it("should not let owner add a Smart Contract guardian that does not have an owner manager", async () => { - await utilities.assertRevert(guardianManager.addGuardian(wallet.address, dumbContract.address, { from: owner }), + await truffleAssert.reverts(guardianManager.addGuardian(wallet.address, dumbContract.address, { from: owner }), "GM: guardian must be EOA or implement owner()"); }); it("it should fail to add a non-compliant guardian", async () => { await guardianManager.addGuardian(wallet.address, guardian1, { from: owner }); const nonCompliantGuardian = await NonCompliantGuardian.new(); - await utilities.assertRevert(guardianManager.addGuardian(wallet.address, nonCompliantGuardian.address, { from: owner }), + await truffleAssert.reverts(guardianManager.addGuardian(wallet.address, nonCompliantGuardian.address, { from: owner }), "GM: guardian must be EOA or implement owner()"); }); }); @@ -300,13 +301,13 @@ contract("GuardianManager", (accounts) => { }); it("should not be able to revoke a nonexistent guardian", async () => { - await utilities.assertRevert(guardianManager.revokeGuardian(wallet.address, nonowner, { from: owner }), + await truffleAssert.reverts(guardianManager.revokeGuardian(wallet.address, nonowner, { from: owner }), "GM: must be an existing guardian"); }); it("should not confirm a guardian revokation too early", async () => { await guardianManager.revokeGuardian(wallet.address, guardian1, { from: owner }); - await utilities.assertRevert(guardianManager.confirmGuardianRevokation(wallet.address, guardian1), + await truffleAssert.reverts(guardianManager.confirmGuardianRevokation(wallet.address, guardian1), "GM: Too early to confirm guardian revokation"); }); @@ -314,13 +315,13 @@ contract("GuardianManager", (accounts) => { await guardianManager.revokeGuardian(wallet.address, guardian1, { from: owner }); await utilities.increaseTime(48); // 48 == 2 * security_period - await utilities.assertRevert(guardianManager.confirmGuardianRevokation(wallet.address, guardian1), + await truffleAssert.reverts(guardianManager.confirmGuardianRevokation(wallet.address, guardian1), "GM: Too late to confirm guardian revokation"); }); it("should not be able to revoke a guardian twice", async () => { await guardianManager.revokeGuardian(wallet.address, guardian1, { from: owner }); - await utilities.assertRevert(guardianManager.revokeGuardian(wallet.address, guardian1, { from: owner }), + await truffleAssert.reverts(guardianManager.revokeGuardian(wallet.address, guardian1, { from: owner }), "GM: revokation of target as guardian is already pending"); }); @@ -329,7 +330,7 @@ contract("GuardianManager", (accounts) => { await guardianManager.revokeGuardian(wallet.address, guardian1, { from: owner }); await utilities.increaseTime(48); // 48 == 2 * security_period - await utilities.assertRevert(guardianManager.confirmGuardianRevokation(wallet.address, guardian1), + await truffleAssert.reverts(guardianManager.confirmGuardianRevokation(wallet.address, guardian1), "GM: Too late to confirm guardian revokation"); // second time @@ -389,12 +390,12 @@ contract("GuardianManager", (accounts) => { await guardianManager.addGuardian(wallet.address, guardian2, { from: owner }); await guardianManager.cancelGuardianAddition(wallet.address, guardian2, { from: owner }); await utilities.increaseTime(30); - await utilities.assertRevert(guardianManager.confirmGuardianAddition(wallet.address, guardian2), + await truffleAssert.reverts(guardianManager.confirmGuardianAddition(wallet.address, guardian2), "GM: no pending addition as guardian for target"); }); it("owner should not be able to cancel a nonexistent addition of a guardian request", async () => { - await utilities.assertRevert(guardianManager.cancelGuardianAddition(wallet.address, guardian2, { from: owner }), + await truffleAssert.reverts(guardianManager.cancelGuardianAddition(wallet.address, guardian2, { from: owner }), "GM: no pending addition as guardian for target"); }); @@ -403,12 +404,12 @@ contract("GuardianManager", (accounts) => { await guardianManager.revokeGuardian(wallet.address, guardian1, { from: owner }); await guardianManager.cancelGuardianRevokation(wallet.address, guardian1, { from: owner }); await utilities.increaseTime(30); - await utilities.assertRevert(guardianManager.confirmGuardianRevokation(wallet.address, guardian1), + await truffleAssert.reverts(guardianManager.confirmGuardianRevokation(wallet.address, guardian1), "GM: no pending guardian revokation for target"); }); it("owner should not be able to cancel a nonexistent pending revokation of guardian", async () => { - await utilities.assertRevert(guardianManager.cancelGuardianRevokation(wallet.address, nonowner, { from: owner }), + await truffleAssert.reverts(guardianManager.cancelGuardianRevokation(wallet.address, nonowner, { from: owner }), "GM: no pending guardian revokation for target"); }); @@ -417,7 +418,7 @@ contract("GuardianManager", (accounts) => { await manager.relay(guardianManager, "addGuardian", [wallet.address, guardian2], wallet, [owner]); await manager.relay(guardianManager, "cancelGuardianAddition", [wallet.address, guardian2], wallet, [owner]); await utilities.increaseTime(30); - await utilities.assertRevert(guardianManager.confirmGuardianAddition(wallet.address, guardian2), + await truffleAssert.reverts(guardianManager.confirmGuardianAddition(wallet.address, guardian2), "GM: no pending addition as guardian for target"); }); @@ -426,19 +427,19 @@ contract("GuardianManager", (accounts) => { await manager.relay(guardianManager, "revokeGuardian", [wallet.address, guardian1], wallet, [owner]); await manager.relay(guardianManager, "cancelGuardianRevokation", [wallet.address, guardian1], wallet, [owner]); await utilities.increaseTime(30); - await utilities.assertRevert(guardianManager.confirmGuardianRevokation(wallet.address, guardian1), + await truffleAssert.reverts(guardianManager.confirmGuardianRevokation(wallet.address, guardian1), "GM: no pending guardian revokation for target"); }); }); describe("Guardian Storage", () => { it("should not allow non modules to addGuardian", async () => { - await utilities.assertRevert(guardianStorage.addGuardian(wallet.address, guardian4), + await truffleAssert.reverts(guardianStorage.addGuardian(wallet.address, guardian4), "TS: must be an authorized module to call this method"); }); it("should not allow non modules to revokeGuardian", async () => { - await utilities.assertRevert(guardianStorage.revokeGuardian(wallet.address, guardian1), + await truffleAssert.reverts(guardianStorage.revokeGuardian(wallet.address, guardian1), "TS: must be an authorized module to call this method"); }); }); diff --git a/test/lockManager.js b/test/lockManager.js index 57cf8b533..713b35b81 100644 --- a/test/lockManager.js +++ b/test/lockManager.js @@ -1,5 +1,6 @@ /* global artifacts */ const ethers = require("ethers"); +const truffleAssert = require("truffle-assertions"); const RelayerManager = artifacts.require("RelayerManager"); const GuardianManager = artifacts.require("GuardianManager"); @@ -133,13 +134,13 @@ contract("LockManager", (accounts) => { }); it("should fail to lock/unlock by non-guardian EOAs (blockchain transaction)", async () => { - await utilities.assertRevert(lockManager.lock(wallet.address, { from: nonguardian }), "LM: must be guardian or feature"); + await truffleAssert.reverts(lockManager.lock(wallet.address, { from: nonguardian }), "LM: must be guardian or feature"); await lockManager.lock(wallet.address, { from: guardian1 }); const state = await lockManager.isLocked(wallet.address); assert.isTrue(state, "should be locked by guardian1"); - await utilities.assertRevert(lockManager.unlock(wallet.address, { from: nonguardian }), "LM: must be guardian or feature"); + await truffleAssert.reverts(lockManager.unlock(wallet.address, { from: nonguardian }), "LM: must be guardian or feature"); }); }); @@ -170,7 +171,7 @@ contract("LockManager", (accounts) => { }); it("should fail to lock/unlock by Smart Contract guardians when signer is not authorized (relayed transaction)", async () => { - await utilities.assertRevert(manager.relay(lockManager, "lock", [wallet.address], wallet, [nonguardian]), "RM: Invalid signatures"); + await truffleAssert.reverts(manager.relay(lockManager, "lock", [wallet.address], wallet, [nonguardian]), "RM: Invalid signatures"); }); }); @@ -202,7 +203,7 @@ contract("LockManager", (accounts) => { // unlock await lockManager.unlock(wallet.address, { from: guardian1 }); // try to unlock again - await utilities.assertRevert(lockManager.unlock(wallet.address, { from: guardian1 }), + await truffleAssert.reverts(lockManager.unlock(wallet.address, { from: guardian1 }), "LM: wallet must be locked"); }); @@ -211,7 +212,7 @@ contract("LockManager", (accounts) => { await manager.relay(recoveryManager, "executeRecovery", [wallet.address, accounts[5]], wallet, [guardian1]); // try to unlock - await utilities.assertRevert(lockManager.unlock(wallet.address, { from: guardian1 }), + await truffleAssert.reverts(lockManager.unlock(wallet.address, { from: guardian1 }), "LM: cannot unlock a wallet that was locked by another feature"); }); }); diff --git a/test/makerV2Manager_loan.js b/test/makerV2Manager_loan.js index 4da423e83..64e6ad709 100644 --- a/test/makerV2Manager_loan.js +++ b/test/makerV2Manager_loan.js @@ -1,5 +1,6 @@ /* global artifacts */ +const truffleAssert = require("truffle-assertions"); const ethers = require("ethers"); const chai = require("chai"); const BN = require("bn.js"); @@ -225,14 +226,14 @@ contract("MakerV2Loan", (accounts) => { }); it("should not open a loan for the wrong debt token", async () => { - await utils.assertRevert( + await truffleAssert.reverts( makerV2.openLoan(walletAddress, ETH_TOKEN, collateralAmount, sai.address, daiAmount, { from: owner }), "MV2: debt token not DAI", ); }); it("should not open a loan for an unsupported collateral token", async () => { - await utils.assertRevert( + await truffleAssert.reverts( makerV2.openLoan(walletAddress, sai.address, collateralAmount, dai.address, daiAmount, { from: owner }), "MV2: unsupported collateral", ); @@ -296,7 +297,7 @@ contract("MakerV2Loan", (accounts) => { const wallet2 = await BaseWallet.at(proxy.address); await wallet2.init(owner2, [versionManager.address]); - await utils.assertRevert( + await truffleAssert.reverts( makerV2.addCollateral(wallet2.address, loanId, ETH_TOKEN, web3.utils.toWei("0.010"), { from: owner2 }), "MV2: unauthorized loanId", ); @@ -318,7 +319,7 @@ contract("MakerV2Loan", (accounts) => { it("should not remove collateral with invalid collateral amount", async () => { const loanId = await testOpenLoan({ collateralAmount, daiAmount, relayed: false }); - await utils.assertRevert( + await truffleAssert.reverts( makerV2.removeCollateral(walletAddress, loanId, ETH_TOKEN, new BN(2).pow(new BN(255)), { from: owner }), "MV2: int overflow", ); @@ -330,7 +331,7 @@ contract("MakerV2Loan", (accounts) => { const wallet2 = await BaseWallet.at(proxy.address); await wallet2.init(owner2, [versionManager.address]); - await utils.assertRevert( + await truffleAssert.reverts( makerV2.removeCollateral(wallet2.address, loanId, ETH_TOKEN, web3.utils.toWei("0.010"), { from: owner2 }), "MV2: unauthorized loanId", ); @@ -394,7 +395,7 @@ contract("MakerV2Loan", (accounts) => { const wallet2 = await BaseWallet.at(proxy.address); await wallet2.init(owner2, [versionManager.address]); - await utils.assertRevert( + await truffleAssert.reverts( makerV2.addDebt(wallet2.address, loanId, ETH_TOKEN, web3.utils.toWei("0.010"), { from: owner2 }), "MV2: unauthorized loanId", ); @@ -431,7 +432,7 @@ contract("MakerV2Loan", (accounts) => { it("should not repay debt when only dust left", async () => { const { collateralAmount, daiAmount } = await getTestAmounts(ETH_TOKEN); const loanId = await testOpenLoan({ collateralAmount, daiAmount, relayed: false }); - await utils.assertRevert( + await truffleAssert.reverts( makerV2.removeDebt(walletAddress, loanId, dai.address, daiAmount.subn(1), { from: owner }), "MV2: repay less or full", ); @@ -444,7 +445,7 @@ contract("MakerV2Loan", (accounts) => { const wallet2 = await BaseWallet.at(proxy.address); await wallet2.init(owner2, [versionManager.address]); - await utils.assertRevert( + await truffleAssert.reverts( makerV2.removeDebt(wallet2.address, loanId, ETH_TOKEN, web3.utils.toWei("0.010"), { from: owner2 }), "MV2: unauthorized loanId", ); @@ -488,7 +489,7 @@ contract("MakerV2Loan", (accounts) => { const wallet2 = await BaseWallet.at(proxy.address); await wallet2.init(owner2, [versionManager.address]); - await utils.assertRevert( + await truffleAssert.reverts( makerV2.closeLoan(wallet2.address, loanId, { from: owner2 }), "MV2: unauthorized loanId", ); @@ -516,12 +517,12 @@ contract("MakerV2Loan", (accounts) => { it("should not add a collateral when Join is not in the Vat", async () => { const badJoin = await GemJoin.new(vat.address, formatBytes32String("BAD"), bat.address); - await utils.assertRevert(makerRegistry.addCollateral(badJoin.address), "MR: _joinAdapter not authorised in vat"); + await truffleAssert.reverts(makerRegistry.addCollateral(badJoin.address), "MR: _joinAdapter not authorised in vat"); }); it("should not add a duplicate collateral", async () => { await makerRegistry.addCollateral(batJoin.address); - await utils.assertRevert(makerRegistry.addCollateral(batJoin.address), "MR: collateral already added"); + await truffleAssert.reverts(makerRegistry.addCollateral(batJoin.address), "MR: collateral already added"); await makerRegistry.removeCollateral(bat.address); // cleanup }); @@ -534,7 +535,7 @@ contract("MakerV2Loan", (accounts) => { }); it("should not remove a non-existing collateral", async () => { - await utils.assertRevert(makerRegistry.removeCollateral(bat.address), "MR: collateral does not exist"); + await truffleAssert.reverts(makerRegistry.removeCollateral(bat.address), "MR: collateral does not exist"); }); }); @@ -592,7 +593,7 @@ contract("MakerV2Loan", (accounts) => { const vaultId = txNewCdpEvent.args.cdp; const loanId = utils.numberToBytes32(vaultId); // We are NOT transferring the vault from the owner to the wallet - await utils.assertRevert( + await truffleAssert.reverts( makerV2.acquireLoan(walletAddress, loanId, { from: owner }), "MV2: wrong vault owner", ); }); @@ -613,7 +614,7 @@ contract("MakerV2Loan", (accounts) => { // Transfer the vault to the fake wallet await cdpManager.give(vaultId, fakeWallet.address, { from: owner }); - await utils.assertRevert( + await truffleAssert.reverts( makerV2.acquireLoan(fakeWallet.address, loanId, { from: owner }), "MV2: failed give", ); }); @@ -645,7 +646,7 @@ contract("MakerV2Loan", (accounts) => { const loanId = utils.numberToBytes32(vaultId); // Transfer the vault to the fake wallet await cdpManager.give(vaultId, fakeWallet.address, { from: owner }); - await utils.assertRevert( + await truffleAssert.reverts( makerV2.acquireLoan(fakeWallet.address, loanId, { from: owner }), "MV2: reentrant call", ); }); @@ -760,7 +761,7 @@ contract("MakerV2Loan", (accounts) => { }); it("should not allow non-feature to give vault", async () => { - await utils.assertRevert(makerV2.giveVault(walletAddress, formatBytes32String(""), { from: owner }), "BF: must be a wallet feature"); + await truffleAssert.reverts(makerV2.giveVault(walletAddress, formatBytes32String(""), { from: owner }), "BF: must be a wallet feature"); }); it("should not allow (fake) feature to give unowned vault", async () => { @@ -777,7 +778,7 @@ contract("MakerV2Loan", (accounts) => { await versionManager.upgradeWallet(walletAddress, lastVersion, { gasLimit: 2000000, from: owner }); // Use the bad module to attempt a bad giveVault call const callData = makerV2.contract.methods.giveVault([walletAddress, utils.numberToBytes32(666)]).encodeABI(); - await utils.assertRevert(badFeature.callContract(makerV2.address, 0, callData, { from: owner }), "MV2: unauthorized loanId"); + await truffleAssert.reverts(badFeature.callContract(makerV2.address, 0, callData, { from: owner }), "MV2: unauthorized loanId"); }); }); }); diff --git a/test/multisig.js b/test/multisig.js index 720c5a0ba..62665ac0a 100644 --- a/test/multisig.js +++ b/test/multisig.js @@ -1,4 +1,6 @@ /* global artifacts */ +const truffleAssert = require("truffle-assertions"); + const MultiSigWallet = artifacts.require("MultiSigWallet"); const TestRegistry = artifacts.require("TestRegistry"); @@ -82,7 +84,7 @@ contract("MultiSigWallet", (accounts) => { const signedData = MultisigExecutor.signHash(multisig.address, reg.address, value, data, nonce); const signatures = await getSignatures(signedData, signers, sortSigners, returnBadSignatures); - await utilities.assertRevert(multisig.execute(reg.address, value, data, signatures), errorMessage); + await truffleAssert.reverts(multisig.execute(reg.address, value, data, signatures), errorMessage); } async function getMultiSigParams(functioName, params) { @@ -95,11 +97,11 @@ contract("MultiSigWallet", (accounts) => { describe("Creating and changing the multisig", () => { it("should not be able to instantiate without owners", async () => { - await utilities.assertRevert(MultiSigWallet.new(2, []), "MSW: Not enough or too many owners"); + await truffleAssert.reverts(MultiSigWallet.new(2, []), "MSW: Not enough or too many owners"); }); it("should not be able to instantiate with 0 threshold", async () => { - await utilities.assertRevert(MultiSigWallet.new(0, owners), "MSW: Invalid threshold"); + await truffleAssert.reverts(MultiSigWallet.new(0, owners), "MSW: Invalid threshold"); }); it("should store owners correctly", async () => { @@ -118,15 +120,15 @@ contract("MultiSigWallet", (accounts) => { }); it("should not be able to execute addOwner externally", async () => { - await utilities.assertRevert(multisig.addOwner(newowner), "MSW: Calling account is not wallet"); + await truffleAssert.reverts(multisig.addOwner(newowner), "MSW: Calling account is not wallet"); }); it("should not be able to execute removeOwner externally", async () => { - await utilities.assertRevert(multisig.removeOwner(newowner), "MSW: Calling account is not wallet"); + await truffleAssert.reverts(multisig.removeOwner(newowner), "MSW: Calling account is not wallet"); }); it("should not be able to execute changeThreshold externally", async () => { - await utilities.assertRevert(multisig.changeThreshold(15), "MSW: Calling account is not wallet"); + await truffleAssert.reverts(multisig.changeThreshold(15), "MSW: Calling account is not wallet"); }); it("should be able to add new owner", async () => { @@ -151,12 +153,12 @@ contract("MultiSigWallet", (accounts) => { const randomAddress = await utilities.getRandomAddress(); const { data, signatures } = await getMultiSigParams("addOwner", [randomAddress]); - await utilities.assertRevert(multisig.execute(multisig.address, 0, data, signatures), "MSW: External call failed"); + await truffleAssert.reverts(multisig.execute(multisig.address, 0, data, signatures), "MSW: External call failed"); }); it("should not be able to add owner twice", async () => { const { data, signatures } = await getMultiSigParams("addOwner", [owner1]); - await utilities.assertRevert(multisig.execute(multisig.address, 0, data, signatures), "MSW: External call failed"); + await truffleAssert.reverts(multisig.execute(multisig.address, 0, data, signatures), "MSW: External call failed"); }); it("should be able to remove existing owner", async () => { @@ -172,13 +174,13 @@ contract("MultiSigWallet", (accounts) => { await multisig.execute(multisig.address, 0, values1.data, values1.signatures); const values2 = await getMultiSigParams("removeOwner", [owner2]); - await utilities.assertRevert(multisig.execute(multisig.address, 0, values2.data, values2.signatures), "MSW: External call failed"); + await truffleAssert.reverts(multisig.execute(multisig.address, 0, values2.data, values2.signatures), "MSW: External call failed"); }); it("should not be able to remove a nonexisting owner", async () => { const randomAddress = await utilities.getRandomAddress(); const { data, signatures } = await getMultiSigParams("removeOwner", [randomAddress]); - await utilities.assertRevert(multisig.execute(multisig.address, 0, data, signatures), "MSW: External call failed"); + await truffleAssert.reverts(multisig.execute(multisig.address, 0, data, signatures), "MSW: External call failed"); }); it("should be able to change the threshold", async () => { @@ -194,7 +196,7 @@ contract("MultiSigWallet", (accounts) => { it("should not be able to change the threshold to be more than the current number of owners", async () => { const { data, signatures } = await getMultiSigParams("changeThreshold", [4]); - await utilities.assertRevert(multisig.execute(multisig.address, 0, data, signatures), "MSW: External call failed"); + await truffleAssert.reverts(multisig.execute(multisig.address, 0, data, signatures), "MSW: External call failed"); }); }); diff --git a/test/nftTransfer.js b/test/nftTransfer.js index 4b756760a..aec1879d5 100644 --- a/test/nftTransfer.js +++ b/test/nftTransfer.js @@ -1,5 +1,6 @@ /* global artifacts */ const ethers = require("ethers"); +const truffleAssert = require("truffle-assertions"); const utils = require("../utils/utilities.js"); const Proxy = artifacts.require("Proxy"); @@ -111,7 +112,7 @@ contract("NftTransfer", (accounts) => { if (shouldSucceed) { await txPromise; } else { - utils.assertRevert(txPromise, expectedError); + truffleAssert.reverts(txPromise, expectedError); } } if (shouldSucceed) { diff --git a/test/recoveryManager.js b/test/recoveryManager.js index 1be4eb525..a01055f67 100644 --- a/test/recoveryManager.js +++ b/test/recoveryManager.js @@ -1,4 +1,5 @@ /* global artifacts */ +const truffleAssert = require("truffle-assertions"); const ethers = require("ethers"); const BN = require("bn.js"); @@ -137,7 +138,7 @@ contract("RecoveryManager", (accounts) => { it("should not let owner execute the recovery procedure", async () => { const expectedRevertMsg = guardians.length >= 3 ? WRONG_SIGNATURE_NUMBER_REVERT_MSG : INVALID_SIGNATURES_REVERT_MSG; - await utils.assertRevert( + await truffleAssert.reverts( manager.relay( recoveryManager, "executeRecovery", @@ -150,7 +151,7 @@ contract("RecoveryManager", (accounts) => { it("should not let a majority of guardians and owner execute the recovery procedure", async () => { const majority = guardians.slice(0, Math.ceil((guardians.length) / 2) - 1); - await utils.assertRevert( + await truffleAssert.reverts( manager.relay( recoveryManager, "executeRecovery", @@ -166,7 +167,7 @@ contract("RecoveryManager", (accounts) => { it("should not let a minority of guardians execute the recovery procedure", async () => { const minority = guardians.slice(0, Math.ceil((guardians.length) / 2) - 1); - await utils.assertRevert( + await truffleAssert.reverts( manager.relay( recoveryManager, "executeRecovery", @@ -240,7 +241,7 @@ contract("RecoveryManager", (accounts) => { }); it("should not let 1 guardian cancel the recovery procedure", async () => { - await utils.assertRevert( + await truffleAssert.reverts( manager.relay( recoveryManager, "cancelRecovery", @@ -255,7 +256,7 @@ contract("RecoveryManager", (accounts) => { }); it("should not let the owner cancel the recovery procedure", async () => { - await utils.assertRevert( + await truffleAssert.reverts( manager.relay( recoveryManager, "cancelRecovery", @@ -270,7 +271,7 @@ contract("RecoveryManager", (accounts) => { }); it("should not allow duplicate guardian signatures", async () => { - await utils.assertRevert( + await truffleAssert.reverts( manager.relay( recoveryManager, "cancelRecovery", @@ -285,7 +286,7 @@ contract("RecoveryManager", (accounts) => { }); it("should not allow non guardians signatures", async () => { - await utils.assertRevert( + await truffleAssert.reverts( manager.relay( recoveryManager, "cancelRecovery", @@ -312,7 +313,7 @@ contract("RecoveryManager", (accounts) => { it("should not let owner + minority of guardians execute an ownership transfer", async () => { const minority = guardians.slice(0, Math.ceil((guardians.length) / 2) - 1); - await utils.assertRevert( + await truffleAssert.reverts( manager.relay( recoveryManager, "transferOwnership", @@ -328,7 +329,7 @@ contract("RecoveryManager", (accounts) => { it("should not let majority of guardians execute an ownership transfer without owner", async () => { const majority = guardians.slice(0, Math.ceil((guardians.length) / 2)); - await utils.assertRevert( + await truffleAssert.reverts( manager.relay( recoveryManager, "transferOwnership", @@ -345,7 +346,7 @@ contract("RecoveryManager", (accounts) => { describe("RecoveryManager high level logic", () => { it("should not be able to instantiate the RecoveryManager with lock period shorter than the recovery period", async () => { - await utils.assertRevert(RecoveryManager.new( + await truffleAssert.reverts(RecoveryManager.new( lockStorage.address, guardianStorage.address, versionManager.address, @@ -357,7 +358,7 @@ contract("RecoveryManager", (accounts) => { describe("Execute Recovery", () => { it("should not allow recovery to be executed with no guardians", async () => { const noGuardians = []; - await utils.assertRevert(manager.relay( + await truffleAssert.reverts(manager.relay( recoveryManager, "executeRecovery", [wallet.address, newowner], @@ -389,7 +390,7 @@ contract("RecoveryManager", (accounts) => { it("should not allow duplicate guardian signatures", async () => { const badMajority = [guardian1, guardian1]; - await utils.assertRevert( + await truffleAssert.reverts( manager.relay( recoveryManager, "executeRecovery", @@ -473,7 +474,7 @@ contract("RecoveryManager", (accounts) => { utils.ETH_TOKEN, ethers.constants.AddressZero, ); - await utils.assertRevert( + await truffleAssert.reverts( relayerManager.execute( wallet.address, recoveryManager.address, @@ -578,7 +579,7 @@ contract("RecoveryManager", (accounts) => { it("should not allow owner not signing", async () => { await addGuardians([guardian1]); - await utils.assertRevert( + await truffleAssert.reverts( manager.relay( recoveryManager, "transferOwnership", @@ -591,7 +592,7 @@ contract("RecoveryManager", (accounts) => { it("should not allow duplicate owner signatures", async () => { await addGuardians([guardian1]); - await utils.assertRevert( + await truffleAssert.reverts( manager.relay( recoveryManager, "transferOwnership", @@ -604,7 +605,7 @@ contract("RecoveryManager", (accounts) => { it("should not allow duplicate guardian signatures", async () => { await addGuardians([guardian1, guardian2, guardian3]); - await utils.assertRevert( + await truffleAssert.reverts( manager.relay( recoveryManager, "transferOwnership", @@ -617,7 +618,7 @@ contract("RecoveryManager", (accounts) => { it("should not allow non guardian signatures", async () => { await addGuardians([guardian1]); - await utils.assertRevert( + await truffleAssert.reverts( manager.relay( recoveryManager, "transferOwnership", diff --git a/test/relayer.js b/test/relayer.js index fe6e49c85..7c4e1c1b8 100644 --- a/test/relayer.js +++ b/test/relayer.js @@ -1,4 +1,5 @@ /* global artifacts */ +const truffleAssert = require("truffle-assertions"); const ethers = require("ethers"); const BN = require("bn.js"); const { formatBytes32String } = require("ethers").utils; @@ -127,14 +128,14 @@ contract("RelayerManager", (accounts) => { describe("relaying feature transactions", () => { it("should fail when _data is less than 36 bytes", async () => { const params = []; // the first argument is not the wallet address, which should make the relaying revert - await utils.assertRevert( + await truffleAssert.reverts( manager.relay(testFeature, "clearInt", params, wallet, [owner]), "RM: Invalid dataWallet", ); }); it("should fail when feature is not authorised", async () => { const params = [wallet.address, 2]; - await utils.assertRevert( + await truffleAssert.reverts( manager.relay(testFeatureNew, "setIntOwnerOnly", params, wallet, [owner]), "RM: feature not authorised", ); }); @@ -165,7 +166,7 @@ contract("RelayerManager", (accounts) => { it("should fail when the first param is not the wallet ", async () => { const params = [owner, 4]; - await utils.assertRevert( + await truffleAssert.reverts( manager.relay(testFeature, "setIntOwnerOnly", params, wallet, [owner]), "RM: Target of _data != _wallet", ); }); @@ -198,7 +199,7 @@ contract("RelayerManager", (accounts) => { it("should fail when a wrong number of signatures is provided", async () => { const params = [wallet.address, 2]; const relayParams = [testFeature, "setIntOwnerOnly", params, wallet, [owner, recipient]]; - await utils.assertRevert(manager.relay(...relayParams), "RM: Wrong number of signatures"); + await truffleAssert.reverts(manager.relay(...relayParams), "RM: Wrong number of signatures"); }); it("should fail a duplicate transaction", async () => { @@ -207,7 +208,7 @@ contract("RelayerManager", (accounts) => { const relayParams = [testFeature, "setIntOwnerOnly", params, wallet, [owner], accounts[9], false, 2000000, nonce]; await manager.relay(...relayParams); - await utils.assertRevert( + await truffleAssert.reverts( manager.relay(...relayParams), "RM: Duplicate request", ); }); @@ -227,7 +228,7 @@ contract("RelayerManager", (accounts) => { ETH_TOKEN, ethers.constants.AddressZero, ]; - await utils.assertRevert( + await truffleAssert.reverts( manager.relay(relayerManager, "execute", params, wallet, [owner]), "BF: disabled method", ); }); @@ -317,12 +318,12 @@ contract("RelayerManager", (accounts) => { it("should fail the transaction when there is not enough ETH for the refund", async () => { await provisionFunds(10, 0); - await utils.assertRevert(callAndRefund({ refundToken: ETH_TOKEN }), "VM: wallet invoke reverted"); + await truffleAssert.reverts(callAndRefund({ refundToken: ETH_TOKEN }), "VM: wallet invoke reverted"); }); it("should fail the transaction when there is not enough ERC20 for the refund", async () => { await provisionFunds(0, 10); - await utils.assertRevert(callAndRefund({ refundToken: erc20.address }), "ERC20: transfer amount exceeds balance"); + await truffleAssert.reverts(callAndRefund({ refundToken: erc20.address }), "ERC20: transfer amount exceeds balance"); }); it("should include the refund in the daily limit", async () => { @@ -370,7 +371,7 @@ contract("RelayerManager", (accounts) => { }); it("should fail if required signatures is 0 and OwnerRequirement is not Anyone", async () => { - await utils.assertRevert( + await truffleAssert.reverts( manager.relay(badFeature, "setIntOwnerOnly", [wallet.address, 2], wallet, [owner]), "RM: Wrong signature requirement", ); }); @@ -380,7 +381,7 @@ contract("RelayerManager", (accounts) => { await setLimitAndDailySpent({ limit: 1000000000, alreadySpent: 999999990 }); const dailySpent = await limitFeature.getDailySpent(wallet.address); assert.isTrue(dailySpent.toNumber() === 999999990, "initial daily spent should be 999999990"); - await utils.assertRevert(callAndRefund({ refundToken: ETH_TOKEN }), "RM: refund is above daily limit"); + await truffleAssert.reverts(callAndRefund({ refundToken: ETH_TOKEN }), "RM: refund is above daily limit"); }); }); @@ -405,7 +406,7 @@ contract("RelayerManager", (accounts) => { }); it("should fail to add module which is not registered", async () => { - await utils.assertRevert(versionManager.addModule(wallet.address, versionManagerV2.address, { from: owner }), + await truffleAssert.reverts(versionManager.addModule(wallet.address, versionManagerV2.address, { from: owner }), "VM: module is not registered"); }); }); diff --git a/test/simpleUpgrader.js b/test/simpleUpgrader.js index c72c76e0f..8c0560539 100644 --- a/test/simpleUpgrader.js +++ b/test/simpleUpgrader.js @@ -1,5 +1,6 @@ /* global artifacts */ +const truffleAssert = require("truffle-assertions"); const ethers = require("ethers"); const { formatBytes32String, parseBytes32String } = require("ethers").utils; const utils = require("../utils/utilities.js"); @@ -104,7 +105,7 @@ contract("SimpleUpgrader", (accounts) => { let isAuthorised = await wallet.authorised(initialModule.address); assert.equal(isAuthorised, true, "initial module should be authorised"); // try (and fail) to add moduleToAdd to wallet - await utils.assertRevert(initialModule.addModule(wallet.address, moduleToAdd.address, { from: owner }), "VM: module is not registered"); + await truffleAssert.reverts(initialModule.addModule(wallet.address, moduleToAdd.address, { from: owner }), "VM: module is not registered"); isAuthorised = await wallet.authorised(moduleToAdd.address); assert.equal(isAuthorised, false, "unregistered module should not be authorised"); }); @@ -125,7 +126,7 @@ contract("SimpleUpgrader", (accounts) => { await registry.registerModule(upgrader.address, formatBytes32String("V1toV2")); // check we can't upgrade from V1 to V2 - await utils.assertRevert(moduleV1.addModule(wallet.address, upgrader.address, { from: owner }), "SU: Not all modules are registered"); + await truffleAssert.reverts(moduleV1.addModule(wallet.address, upgrader.address, { from: owner }), "SU: Not all modules are registered"); // register module V2 await registry.registerModule(moduleV2.address, formatBytes32String("V2")); // now we can upgrade @@ -180,7 +181,7 @@ contract("SimpleUpgrader", (accounts) => { const event = await utils.getEvent(txReceipt, relayerV1, "TransactionExecuted"); assert.isTrue(!event.args.success, "Relayed upgrade to 0 module should have failed."); } else { - utils.assertRevert(moduleV1.addModule(...params2, { from: owner }), "BW: wallet must have at least one module"); + truffleAssert.reverts(moduleV1.addModule(...params2, { from: owner }), "BW: wallet must have at least one module"); } return; } @@ -291,7 +292,7 @@ contract("SimpleUpgrader", (accounts) => { await lockManager.lock(wallet.address, { from: guardian }); // Try to upgrade while wallet is locked - await utils.assertRevert(versionManager.addModule(wallet.address, upgrader.address, { from: owner }), "BF: wallet locked"); + await truffleAssert.reverts(versionManager.addModule(wallet.address, upgrader.address, { from: owner }), "BF: wallet locked"); // Check wallet is still locked const locked = await lockManager.isLocked(wallet.address); @@ -319,7 +320,7 @@ contract("SimpleUpgrader", (accounts) => { assert.isTrue(locked, "wallet should be locked"); // Try to upgrade while wallet is under recovery - await utils.assertRevert(versionManager.addModule(wallet.address, upgrader.address, { from: owner }), "BF: wallet locked"); + await truffleAssert.reverts(versionManager.addModule(wallet.address, upgrader.address, { from: owner }), "BF: wallet locked"); // Check wallet is still locked locked = await lockManager.isLocked(wallet.address); diff --git a/test/tokenExchanger.js b/test/tokenExchanger.js index 9979a4baa..8a204b3a3 100644 --- a/test/tokenExchanger.js +++ b/test/tokenExchanger.js @@ -1,5 +1,6 @@ /* global artifacts */ +const truffleAssert = require("truffle-assertions"); const ethers = require("ethers"); const { AddressZero } = require("ethers").constants; @@ -383,7 +384,7 @@ contract("TokenExchanger", (accounts) => { variableAmount, }); await tokenPriceRegistry.setTradableForTokenList([toToken], [false]); - await utils.assertRevert(exchanger[method](...params, { gasLimit: 2000000, from: owner }), "TE: Token not tradable"); + await truffleAssert.reverts(exchanger[method](...params, { gasLimit: 2000000, from: owner }), "TE: Token not tradable"); await tokenPriceRegistry.setTradableForTokenList([toToken], [true]); }); @@ -401,7 +402,7 @@ contract("TokenExchanger", (accounts) => { fixedAmount, variableAmount, }); - await utils.assertRevert(exchanger[method](...params, { gasLimit: 2000000, from: owner }), "DR: Unauthorised DEX"); + await truffleAssert.reverts(exchanger[method](...params, { gasLimit: 2000000, from: owner }), "DR: Unauthorised DEX"); // reset whitelist await dexRegistry.setAuthorised([kyberAdapter.address, uniswapV2Adapter.address], [true, true]); }); diff --git a/test/tokenPriceRegistry.js b/test/tokenPriceRegistry.js index efd69b637..f3e381163 100644 --- a/test/tokenPriceRegistry.js +++ b/test/tokenPriceRegistry.js @@ -1,4 +1,5 @@ /* global artifacts */ +const truffleAssert = require("truffle-assertions"); const chai = require("chai"); const BN = require("bn.js"); const bnChai = require("bn-chai"); @@ -41,7 +42,7 @@ contract("TokenPriceRegistry", (accounts) => { }); it("does not let managers change price with invalid array lengths", async () => { - await utils.assertRevert( + await truffleAssert.reverts( tokenPriceRegistry.setPriceForTokenList([tokenAddress], [222222, 333333], { from: manager }), "TPS: Array length mismatch"); }); @@ -49,13 +50,17 @@ contract("TokenPriceRegistry", (accounts) => { it("does not let managers change price before security period", async () => { await tokenPriceRegistry.setPriceForTokenList([tokenAddress], [111111], { from: manager }); await utils.increaseTime(3500); - await utils.assertRevert(tokenPriceRegistry.setPriceForTokenList([tokenAddress], [222222], { from: manager }), "TPS: Price updated too early"); + await truffleAssert.reverts( + tokenPriceRegistry.setPriceForTokenList([tokenAddress], [222222], { from: manager }), + "TPS: Price updated too early"); }); it("lets the owner change security period", async () => { await tokenPriceRegistry.setPriceForTokenList([tokenAddress], [111111], { from: manager }); await utils.increaseTime(1600); - await utils.assertRevert(tokenPriceRegistry.setPriceForTokenList([tokenAddress], [222222], { from: manager }), "TPS: Price updated too early"); + await truffleAssert.reverts( + tokenPriceRegistry.setPriceForTokenList([tokenAddress], [222222], { from: manager }), + "TPS: Price updated too early"); await tokenPriceRegistry.setMinPriceUpdatePeriod(0, { from: owner }); await tokenPriceRegistry.setPriceForTokenList([tokenAddress], [222222], { from: manager }); const afterPrice = await tokenPriceRegistry.getTokenPrice(tokenAddress); @@ -80,10 +85,10 @@ contract("TokenPriceRegistry", (accounts) => { await tokenPriceRegistry.setTradableForTokenList([tokenAddress], [false], { from: manager }); const tradable = await tokenPriceRegistry.isTokenTradable(tokenAddress); assert.isFalse(tradable); - await utils.assertRevert(tokenPriceRegistry.setTradableForTokenList([tokenAddress], [true], { from: manager }), "TPS: Unauthorised"); + await truffleAssert.reverts(tokenPriceRegistry.setTradableForTokenList([tokenAddress], [true], { from: manager }), "TPS: Unauthorised"); }); it("does not let managers change tradable with invalid array lengths", async () => { - await utils.assertRevert( + await truffleAssert.reverts( tokenPriceRegistry.setTradableForTokenList([tokenAddress], [false, false], { from: manager }), "TPS: Array length mismatch"); }); diff --git a/test/transferManager.js b/test/transferManager.js index f857e79b2..dc372315d 100644 --- a/test/transferManager.js +++ b/test/transferManager.js @@ -1,5 +1,6 @@ /* global artifacts */ +const truffleAssert = require("truffle-assertions"); const ethers = require("ethers"); const chai = require("chai"); const BN = require("bn.js"); @@ -189,7 +190,7 @@ contract.skip("TransferManager", (accounts) => { it("should not be able to whitelist a token twice", async () => { await transferManager.addToWhitelist(wallet.address, recipient, { from: owner }); await increaseTime(3); - await utils.assertRevert( + await truffleAssert.reverts( transferManager.addToWhitelist(wallet.address, recipient, { from: owner }), "TT: target already whitelisted", ); }); @@ -678,19 +679,19 @@ contract.skip("TransferManager", (accounts) => { it("should not be able to call the wallet itselt", async () => { const dataToTransfer = contract.contract.methods.setState([4]).encodeABI(); const params = [wallet.address, wallet.address, 10, dataToTransfer]; - await utils.assertRevert(transferManager.callContract(...params, { from: owner }), "BT: Forbidden contract"); + await truffleAssert.reverts(transferManager.callContract(...params, { from: owner }), "BT: Forbidden contract"); }); it("should not be able to call a feature of the wallet", async () => { const dataToTransfer = contract.contract.methods.setState([4]).encodeABI(); const params = [wallet.address, transferManager.address, 10, dataToTransfer]; - await utils.assertRevert(transferManager.callContract(...params, { from: owner }), "BT: Forbidden contract"); + await truffleAssert.reverts(transferManager.callContract(...params, { from: owner }), "BT: Forbidden contract"); }); it("should not be able to call a supported ERC20 token contract", async () => { const dataToTransfer = contract.contract.methods.setState([4]).encodeABI(); const params = [wallet.address, erc20.address, 10, dataToTransfer]; - await utils.assertRevert(transferManager.callContract(...params, { from: owner }), "TM: Forbidden contract"); + await truffleAssert.reverts(transferManager.callContract(...params, { from: owner }), "TM: Forbidden contract"); }); it("should be able to call a supported token contract which is whitelisted", async () => { @@ -716,7 +717,7 @@ contract.skip("TransferManager", (accounts) => { }); it("should fail to call a contract and transfer ETH when the amount is above the daily limit ", async () => { - await utils.assertRevert(doCallContract({ value: ETH_LIMIT + 10000, state: 6 }, "above daily limit")); + await truffleAssert.reverts(doCallContract({ value: ETH_LIMIT + 10000, state: 6 }, "above daily limit")); }); }); @@ -813,7 +814,7 @@ contract.skip("TransferManager", (accounts) => { it("should not be able to spend more than approved in call", async () => { await transferManager.approveToken(wallet.address, erc20.address, contract.address, 10, { from: owner }); const dataToTransfer = contract.contract.methods.setStateAndPayToken([3, erc20.address, 6]).encodeABI(); - await utils.assertRevert(transferManager.approveTokenAndCallContract( + await truffleAssert.reverts(transferManager.approveTokenAndCallContract( wallet.address, erc20.address, contract.address, @@ -848,7 +849,7 @@ contract.skip("TransferManager", (accounts) => { await transferManager.addToWhitelist(wallet.address, consumer, { from: owner }); await increaseTime(3); const dataToTransfer = contract.contract.methods.setStateAndPayTokenWithConsumer([6, erc20.address, amount]).encodeABI(); - await utils.assertRevert( + await truffleAssert.reverts( transferManager.approveTokenAndCallContract( wallet.address, erc20.address, consumer, amount, contract.address, dataToTransfer, { from: owner } ), @@ -868,7 +869,7 @@ contract.skip("TransferManager", (accounts) => { const startingBalance = await erc20.balanceOf(wallet.address); await erc20.burn(wallet.address, startingBalance); const dataToTransfer = contract.contract.methods.setStateAndPayToken([3, erc20.address, 1]).encodeABI(); - await utils.assertRevert(transferManager.approveTokenAndCallContract( + await truffleAssert.reverts(transferManager.approveTokenAndCallContract( wallet.address, erc20.address, contract.address, @@ -909,7 +910,7 @@ contract.skip("TransferManager", (accounts) => { const signHash = ethers.utils.keccak256("0x1234"); const sig = `${await utils.personalSign(signHash, owner)}a1`; - await assert.revertWith( + await truffleAssert.reverts( walletAsTransferManager.isValidSignature(signHash, sig), "TM: invalid signature length", ); }); @@ -918,7 +919,7 @@ contract.skip("TransferManager", (accounts) => { const signHash = ethers.utils.keccak256("0x1234"); const sig = await utils.personalSign(signHash, nonowner); - await assert.revertWith( + await truffleAssert.reverts( walletAsTransferManager.isValidSignature(signHash, sig), "TM: Invalid signer", ); }); diff --git a/test/upgraderToVersionManager.js b/test/upgraderToVersionManager.js index c88e86f5f..81ade83e5 100644 --- a/test/upgraderToVersionManager.js +++ b/test/upgraderToVersionManager.js @@ -1,5 +1,6 @@ /* global artifacts */ const ethers = require("ethers"); +const truffleAssert = require("truffle-assertions"); const Proxy = artifacts.require("Proxy"); const BaseWallet = artifacts.require("BaseWallet"); @@ -18,7 +19,6 @@ const SECURITY_PERIOD = 3600; const SECURITY_WINDOW = 3600; const ETH_LIMIT = 1000000; -const { assertRevert } = require("../utils/utilities.js"); const RelayManager = require("../utils/relay-manager"); contract.skip("UpgraderToVersionManager", (accounts) => { @@ -103,7 +103,7 @@ contract.skip("UpgraderToVersionManager", (accounts) => { await versionManager.addVersion([], []); const lastVersion = await versionManager.lastVersion(); await versionManager.setMinVersion(lastVersion); - await assertRevert( + await truffleAssert.reverts( previousTransferManager.addModule(wallet.address, upgrader.address, { from: owner }), "VM: invalid _toVersion", ); diff --git a/test/versionManager.js b/test/versionManager.js index d8d822021..17a401b00 100644 --- a/test/versionManager.js +++ b/test/versionManager.js @@ -1,5 +1,6 @@ /* global artifacts */ const ethers = require("ethers"); +const truffleAssert = require("truffle-assertions"); const GuardianManager = artifacts.require("GuardianManager"); const LockStorage = artifacts.require("LockStorage"); @@ -16,7 +17,6 @@ const TokenPriceRegistry = artifacts.require("TokenPriceRegistry"); const TransferManager = artifacts.require("TransferManager"); const UpgraderToVersionManager = artifacts.require("UpgraderToVersionManager"); -const utils = require("../utils/utilities.js"); const RelayManager = require("../utils/relay-manager"); contract("VersionManager", (accounts) => { @@ -74,12 +74,12 @@ contract("VersionManager", (accounts) => { describe("VersionManager owner", () => { it("should not let the VersionManager owner add a storage twice", async () => { - await utils.assertRevert(versionManager.addStorage(lockStorage.address), "VM: storage already added"); + await truffleAssert.reverts(versionManager.addStorage(lockStorage.address), "VM: storage already added"); }); it("should not let the VersionManager owner add an inconsistent version", async () => { // Should fail: the _featuresToInit array includes a feature not listed in the _features array - await utils.assertRevert( + await truffleAssert.reverts( versionManager.addVersion([relayerManager.address], [guardianManager.address]), "VM: invalid _featuresToInit", ); @@ -88,12 +88,12 @@ contract("VersionManager", (accounts) => { it("should not let the VersionManager owner set an invalid minVersion", async () => { const lastVersion = await versionManager.lastVersion(); - await utils.assertRevert( + await truffleAssert.reverts( versionManager.setMinVersion(0), "VM: invalid _minVersion", ); - await utils.assertRevert( + await truffleAssert.reverts( versionManager.setMinVersion(lastVersion.addn(1)), "VM: invalid _minVersion", ); @@ -102,7 +102,7 @@ contract("VersionManager", (accounts) => { describe("Wallet owner", () => { it("should not let the relayer call a forbidden method", async () => { - await utils.assertRevert( + await truffleAssert.reverts( manager.relay(versionManager, "setOwner", [wallet.address, owner], wallet, [owner]), "VM: unknown method", ); @@ -110,7 +110,7 @@ contract("VersionManager", (accounts) => { it("should fail to upgrade a wallet when already on the last version", async () => { const lastVersion = await versionManager.lastVersion(); - await utils.assertRevert( + await truffleAssert.reverts( versionManager.upgradeWallet(wallet.address, lastVersion, { from: owner }), "VM: already on new version", ); @@ -121,7 +121,7 @@ contract("VersionManager", (accounts) => { await versionManager.addVersion([], []); await versionManager.setMinVersion(await versionManager.lastVersion()); - await utils.assertRevert( + await truffleAssert.reverts( versionManager.upgradeWallet(wallet.address, badVersion, { from: owner }), "VM: invalid _toVersion", ); @@ -141,7 +141,7 @@ contract("VersionManager", (accounts) => { assert.equal(lock, 0, "Lock should have been unset"); const newGuardianStorage = await GuardianStorage.new(); // not authorised in VersionManager - await utils.assertRevert( + await truffleAssert.reverts( testFeature.invokeStorage(wallet.address, newGuardianStorage.address, data1, { from: owner }), "VM: invalid storage invoked", ); @@ -187,7 +187,7 @@ contract("VersionManager", (accounts) => { // Attempt to call a malicious (non-static) call on the old VersionManager const data = await testFeature.contract.methods.badStaticCall().encodeABI(); - await utils.assertRevert( + await truffleAssert.reverts( transferManager.callContract(wallet.address, versionManager.address, 0, data, { from: owner }), "VM: not in a staticcall", ); diff --git a/utils/utilities.js b/utils/utilities.js index 6f3d2cf4b..34d526bb4 100644 --- a/utils/utilities.js +++ b/utils/utilities.js @@ -250,25 +250,6 @@ module.exports = { .slice(2)}${ethers.utils.hexZeroPad(ethers.utils.hexlify(timestamp), 16).slice(2)}`; }, - async assertRevert(promise, revertMessage) { - let reason; - try { - await promise; - assert.fail(`Transaction succeeded, but expected error ${revertMessage}`); - } catch (err) { - ({ reason } = err); - if (reason) { - assert.equal(reason, revertMessage); - } else if (!revertMessage && err.hijackedStack) { - assert.notEqual(err.hijackedStack.indexOf("VM Exception while processing transaction: revert"), -1); - } else if (err.hijackedStack) { - assert.notEqual(err.hijackedStack.indexOf(revertMessage), -1); - } else { - assert.fail("Could not validate error message", err); - } - } - }, - async getAccount(index) { const accounts = await web3.eth.getAccounts(); return accounts[index]; From 6f181d6308aee78d5aa06a445feb4a92b83f0062 Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Tue, 17 Nov 2020 10:00:46 +0200 Subject: [PATCH 094/113] Upgrade solidity-coverage to latest --- package-lock.json | 1616 +++++++++++++-------------------------------- package.json | 2 +- 2 files changed, 460 insertions(+), 1158 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5d2e21bff..790191141 100644 --- a/package-lock.json +++ b/package-lock.json @@ -844,9 +844,9 @@ } }, "@truffle/error": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/@truffle/error/-/error-0.0.7.tgz", - "integrity": "sha512-UIfVKsXSXocKnn5+RNklUXNoGd/JVj7V8KmC48TQzmjU33HQI86PX0JDS7SpHMHasI3w9X//1q7Lu7nZtj3Zzg==", + "version": "0.0.11", + "resolved": "https://registry.npmjs.org/@truffle/error/-/error-0.0.11.tgz", + "integrity": "sha512-ju6TucjlJkfYMmdraYY/IBJaFb+Sa+huhYtOoyOJ+G29KcgytUVnDzKGwC7Kgk6IsxQMm62Mc1E0GZzFbGGipw==", "dev": true }, "@truffle/hdwallet-provider": { @@ -924,21 +924,38 @@ } }, "@truffle/interface-adapter": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@truffle/interface-adapter/-/interface-adapter-0.3.3.tgz", - "integrity": "sha512-l3I4WFTfnBSIfG96IOBRtAIE6AHDAxcOUJE7W5zh9hocQwzQlGWc2yEyyTcLa0656TTM8RxaZZ2S/KdHHMvCaw==", + "version": "0.4.18", + "resolved": "https://registry.npmjs.org/@truffle/interface-adapter/-/interface-adapter-0.4.18.tgz", + "integrity": "sha512-P9JVSYD/CX3V+NgTWu+Bf71sLh8pMwrCpbiYRB93pRw/1H3ZTvt5iDC2MVvVxCs8FkSiy4OZzQK/DJ8+hXAmYw==", "dev": true, "requires": { "bn.js": "^4.11.8", "ethers": "^4.0.32", - "lodash": "^4.17.13", - "web3": "1.2.2" + "source-map-support": "^0.5.19", + "web3": "1.2.9" }, "dependencies": { + "@ethersproject/abi": { + "version": "5.0.0-beta.153", + "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.0.0-beta.153.tgz", + "integrity": "sha512-aXweZ1Z7vMNzJdLpR1CZUAIgnwjrZeUSvN9syCwlBaEBUFJmFY+HHnfuTI5vIhVs/mRkfJVrbEyl51JZQqyjAg==", + "dev": true, + "requires": { + "@ethersproject/address": ">=5.0.0-beta.128", + "@ethersproject/bignumber": ">=5.0.0-beta.130", + "@ethersproject/bytes": ">=5.0.0-beta.129", + "@ethersproject/constants": ">=5.0.0-beta.128", + "@ethersproject/hash": ">=5.0.0-beta.128", + "@ethersproject/keccak256": ">=5.0.0-beta.127", + "@ethersproject/logger": ">=5.0.0-beta.129", + "@ethersproject/properties": ">=5.0.0-beta.131", + "@ethersproject/strings": ">=5.0.0-beta.130" + } + }, "@types/node": { - "version": "12.19.3", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.19.3.tgz", - "integrity": "sha512-8Jduo8wvvwDzEVJCOvS/G6sgilOLvvhn1eMmK3TW8/T217O7u1jdrK6ImKLv80tVryaPSVeKu6sjDEiFjd4/eg==", + "version": "10.17.44", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.44.tgz", + "integrity": "sha512-vHPAyBX1ffLcy4fQHmDyIUMUb42gHZjPHU66nhvbMzAWJqHnySGZ6STwN3rwrnSd1FHB0DI/RWgGELgKSYRDmw==", "dev": true }, "bn.js": { @@ -947,23 +964,15 @@ "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", "dev": true }, - "buffer": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.0.tgz", - "integrity": "sha512-cd+5r1VLBwUqTrmnzW+D7ABkJUM6mr7uv1dv+6jRw4Rcl7tFIFHDqHPL98LhpGFn3dbAt3gtLxtrWp4m1kFrqg==", - "dev": true, - "requires": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "eth-lib": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.7.tgz", + "integrity": "sha1-L5Pxex4jrsN1nNSj/iDBKGo/wco=", "dev": true, "requires": { - "ms": "2.0.0" + "bn.js": "^4.11.6", + "elliptic": "^6.4.0", + "xhr-request-promise": "^0.1.2" } }, "ethers": { @@ -989,23 +998,6 @@ "integrity": "sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q==", "dev": true }, - "fs-extra": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz", - "integrity": "sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - }, - "get-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", - "dev": true - }, "hash.js": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", @@ -1016,24 +1008,6 @@ "minimalistic-assert": "^1.0.0" } }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", - "dev": true - }, - "lodash": { - "version": "4.17.20", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", - "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", - "dev": true - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - }, "oboe": { "version": "2.1.4", "resolved": "https://registry.npmjs.org/oboe/-/oboe-2.1.4.tgz", @@ -1043,18 +1017,6 @@ "http-https": "^1.0.0" } }, - "p-cancelable": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.3.0.tgz", - "integrity": "sha512-RVbZPLso8+jFeq1MfNvgXtCRED2raz/dKpacfTNxsx6pLEpEomM7gah6VeHSYV3+vo0OAi4MkArtQcWWXuQoyw==", - "dev": true - }, - "prepend-http": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", - "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", - "dev": true - }, "scrypt-js": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-2.0.4.tgz", @@ -1067,65 +1029,6 @@ "integrity": "sha1-IOgd5iLUoCWIzgyNqJc8vPHTE48=", "dev": true }, - "swarm-js": { - "version": "0.1.39", - "resolved": "https://registry.npmjs.org/swarm-js/-/swarm-js-0.1.39.tgz", - "integrity": "sha512-QLMqL2rzF6n5s50BptyD6Oi0R1aWlJC5Y17SRIVXRj6OR1DRIPM7nepvrxxkjA1zNzFz6mUOMjfeqeDaWB7OOg==", - "dev": true, - "requires": { - "bluebird": "^3.5.0", - "buffer": "^5.0.5", - "decompress": "^4.0.0", - "eth-lib": "^0.1.26", - "fs-extra": "^4.0.2", - "got": "^7.1.0", - "mime-types": "^2.1.16", - "mkdirp-promise": "^5.0.1", - "mock-fs": "^4.1.0", - "setimmediate": "^1.0.5", - "tar": "^4.0.2", - "xhr-request-promise": "^0.1.2" - }, - "dependencies": { - "got": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/got/-/got-7.1.0.tgz", - "integrity": "sha512-Y5WMo7xKKq1muPsxD+KmrR8DH5auG7fBdDVueZwETwV6VytKyU9OX/ddpq2/1hp1vIPvVb4T81dKQz3BivkNLw==", - "dev": true, - "requires": { - "decompress-response": "^3.2.0", - "duplexer3": "^0.1.4", - "get-stream": "^3.0.0", - "is-plain-obj": "^1.1.0", - "is-retry-allowed": "^1.0.0", - "is-stream": "^1.0.0", - "isurl": "^1.0.0-alpha5", - "lowercase-keys": "^1.0.0", - "p-cancelable": "^0.3.0", - "p-timeout": "^1.1.1", - "safe-buffer": "^5.0.1", - "timed-out": "^4.0.0", - "url-parse-lax": "^1.0.0", - "url-to-options": "^1.0.1" - } - }, - "setimmediate": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", - "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=", - "dev": true - } - } - }, - "url-parse-lax": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", - "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", - "dev": true, - "requires": { - "prepend-http": "^1.0.1" - } - }, "uuid": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.1.tgz", @@ -1133,213 +1036,168 @@ "dev": true }, "web3": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/web3/-/web3-1.2.2.tgz", - "integrity": "sha512-/ChbmB6qZpfGx6eNpczt5YSUBHEA5V2+iUCbn85EVb3Zv6FVxrOo5Tv7Lw0gE2tW7EEjASbCyp3mZeiZaCCngg==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3/-/web3-1.2.9.tgz", + "integrity": "sha512-Mo5aBRm0JrcNpN/g4VOrDzudymfOnHRC3s2VarhYxRA8aWgF5rnhQ0ziySaugpic1gksbXPe105pUWyRqw8HUA==", "dev": true, "requires": { - "@types/node": "^12.6.1", - "web3-bzz": "1.2.2", - "web3-core": "1.2.2", - "web3-eth": "1.2.2", - "web3-eth-personal": "1.2.2", - "web3-net": "1.2.2", - "web3-shh": "1.2.2", - "web3-utils": "1.2.2" + "web3-bzz": "1.2.9", + "web3-core": "1.2.9", + "web3-eth": "1.2.9", + "web3-eth-personal": "1.2.9", + "web3-net": "1.2.9", + "web3-shh": "1.2.9", + "web3-utils": "1.2.9" } }, "web3-bzz": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.2.2.tgz", - "integrity": "sha512-b1O2ObsqUN1lJxmFSjvnEC4TsaCbmh7Owj3IAIWTKqL9qhVgx7Qsu5O9cD13pBiSPNZJ68uJPaKq380QB4NWeA==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.2.9.tgz", + "integrity": "sha512-ogVQr9jHodu9HobARtvUSmWG22cv2EUQzlPeejGWZ7j5h20HX40EDuWyomGY5VclIj5DdLY76Tmq88RTf/6nxA==", "dev": true, "requires": { "@types/node": "^10.12.18", "got": "9.6.0", - "swarm-js": "0.1.39", + "swarm-js": "^0.1.40", "underscore": "1.9.1" - }, - "dependencies": { - "@types/node": { - "version": "10.17.44", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.44.tgz", - "integrity": "sha512-vHPAyBX1ffLcy4fQHmDyIUMUb42gHZjPHU66nhvbMzAWJqHnySGZ6STwN3rwrnSd1FHB0DI/RWgGELgKSYRDmw==", - "dev": true - } } }, "web3-core": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.2.2.tgz", - "integrity": "sha512-miHAX3qUgxV+KYfaOY93Hlc3kLW2j5fH8FJy6kSxAv+d4d5aH0wwrU2IIoJylQdT+FeenQ38sgsCnFu9iZ1hCQ==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.2.9.tgz", + "integrity": "sha512-fSYv21IP658Ty2wAuU9iqmW7V+75DOYMVZsDH/c14jcF/1VXnedOcxzxSj3vArsCvXZNe6XC5/wAuGZyQwR9RA==", "dev": true, "requires": { "@types/bn.js": "^4.11.4", "@types/node": "^12.6.1", - "web3-core-helpers": "1.2.2", - "web3-core-method": "1.2.2", - "web3-core-requestmanager": "1.2.2", - "web3-utils": "1.2.2" + "bignumber.js": "^9.0.0", + "web3-core-helpers": "1.2.9", + "web3-core-method": "1.2.9", + "web3-core-requestmanager": "1.2.9", + "web3-utils": "1.2.9" + }, + "dependencies": { + "@types/node": { + "version": "12.19.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.19.4.tgz", + "integrity": "sha512-o3oj1bETk8kBwzz1WlO6JWL/AfAA3Vm6J1B3C9CsdxHYp7XgPiH7OEXPUbZTndHlRaIElrANkQfe6ZmfJb3H2w==", + "dev": true + } } }, "web3-core-helpers": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.2.2.tgz", - "integrity": "sha512-HJrRsIGgZa1jGUIhvGz4S5Yh6wtOIo/TMIsSLe+Xay+KVnbseJpPprDI5W3s7H2ODhMQTbogmmUFquZweW2ImQ==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.2.9.tgz", + "integrity": "sha512-t0WAG3orLCE3lqi77ZoSRNFok3VQWZXTniZigDQjyOJYMAX7BU3F3js8HKbjVnAxlX3tiKoDxI0KBk9F3AxYuw==", "dev": true, "requires": { "underscore": "1.9.1", - "web3-eth-iban": "1.2.2", - "web3-utils": "1.2.2" + "web3-eth-iban": "1.2.9", + "web3-utils": "1.2.9" } }, "web3-core-method": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.2.2.tgz", - "integrity": "sha512-szR4fDSBxNHaF1DFqE+j6sFR/afv9Aa36OW93saHZnrh+iXSrYeUUDfugeNcRlugEKeUCkd4CZylfgbK2SKYJA==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.2.9.tgz", + "integrity": "sha512-bjsIoqP3gs7A/gP8+QeLUCyOKJ8bopteCSNbCX36Pxk6TYfYWNuC6hP+2GzUuqdP3xaZNe+XEElQFUNpR3oyAg==", "dev": true, "requires": { + "@ethersproject/transactions": "^5.0.0-beta.135", "underscore": "1.9.1", - "web3-core-helpers": "1.2.2", - "web3-core-promievent": "1.2.2", - "web3-core-subscriptions": "1.2.2", - "web3-utils": "1.2.2" + "web3-core-helpers": "1.2.9", + "web3-core-promievent": "1.2.9", + "web3-core-subscriptions": "1.2.9", + "web3-utils": "1.2.9" } }, "web3-core-promievent": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.2.2.tgz", - "integrity": "sha512-tKvYeT8bkUfKABcQswK6/X79blKTKYGk949urZKcLvLDEaWrM3uuzDwdQT3BNKzQ3vIvTggFPX9BwYh0F1WwqQ==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.2.9.tgz", + "integrity": "sha512-0eAUA2zjgXTleSrnc1wdoKQPPIHU6KHf4fAscu4W9kKrR+mqP1KsjYrxY9wUyjNnXxfQ+5M29ipvbiaK8OqdOw==", "dev": true, "requires": { - "any-promise": "1.3.0", "eventemitter3": "3.1.2" } }, "web3-core-requestmanager": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.2.2.tgz", - "integrity": "sha512-a+gSbiBRHtHvkp78U2bsntMGYGF2eCb6219aMufuZWeAZGXJ63Wc2321PCbA8hF9cQrZI4EoZ4kVLRI4OF15Hw==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.2.9.tgz", + "integrity": "sha512-1PwKV2m46ALUnIN5VPPgjOj8yMLJhhqZYvYJE34hTN5SErOkwhzx5zScvo5MN7v7KyQGFnpVCZKKGCiEnDmtFA==", "dev": true, "requires": { "underscore": "1.9.1", - "web3-core-helpers": "1.2.2", - "web3-providers-http": "1.2.2", - "web3-providers-ipc": "1.2.2", - "web3-providers-ws": "1.2.2" + "web3-core-helpers": "1.2.9", + "web3-providers-http": "1.2.9", + "web3-providers-ipc": "1.2.9", + "web3-providers-ws": "1.2.9" } }, "web3-core-subscriptions": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.2.2.tgz", - "integrity": "sha512-QbTgigNuT4eicAWWr7ahVpJyM8GbICsR1Ys9mJqzBEwpqS+RXTRVSkwZ2IsxO+iqv6liMNwGregbJLq4urMFcQ==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.2.9.tgz", + "integrity": "sha512-Y48TvXPSPxEM33OmXjGVDMzTd0j8X0t2+sDw66haeBS8eYnrEzasWuBZZXDq0zNUsqyxItgBGDn+cszkgEnFqg==", "dev": true, "requires": { "eventemitter3": "3.1.2", "underscore": "1.9.1", - "web3-core-helpers": "1.2.2" + "web3-core-helpers": "1.2.9" } }, "web3-eth": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.2.2.tgz", - "integrity": "sha512-UXpC74mBQvZzd4b+baD4Ocp7g+BlwxhBHumy9seyE/LMIcMlePXwCKzxve9yReNpjaU16Mmyya6ZYlyiKKV8UA==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.2.9.tgz", + "integrity": "sha512-sIKO4iE9FEBa/CYUd6GdPd7GXt/wISqxUd8PlIld6+hvMJj02lgO7Z7p5T9mZIJcIZJGvZX81ogx8oJ9yif+Ag==", "dev": true, "requires": { "underscore": "1.9.1", - "web3-core": "1.2.2", - "web3-core-helpers": "1.2.2", - "web3-core-method": "1.2.2", - "web3-core-subscriptions": "1.2.2", - "web3-eth-abi": "1.2.2", - "web3-eth-accounts": "1.2.2", - "web3-eth-contract": "1.2.2", - "web3-eth-ens": "1.2.2", - "web3-eth-iban": "1.2.2", - "web3-eth-personal": "1.2.2", - "web3-net": "1.2.2", - "web3-utils": "1.2.2" + "web3-core": "1.2.9", + "web3-core-helpers": "1.2.9", + "web3-core-method": "1.2.9", + "web3-core-subscriptions": "1.2.9", + "web3-eth-abi": "1.2.9", + "web3-eth-accounts": "1.2.9", + "web3-eth-contract": "1.2.9", + "web3-eth-ens": "1.2.9", + "web3-eth-iban": "1.2.9", + "web3-eth-personal": "1.2.9", + "web3-net": "1.2.9", + "web3-utils": "1.2.9" } }, "web3-eth-abi": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.2.2.tgz", - "integrity": "sha512-Yn/ZMgoOLxhTVxIYtPJ0eS6pnAnkTAaJgUJh1JhZS4ekzgswMfEYXOwpMaD5eiqPJLpuxmZFnXnBZlnQ1JMXsw==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.2.9.tgz", + "integrity": "sha512-3YwUYbh/DMfDbhMWEebAdjSd5bj3ZQieOjLzWFHU23CaLEqT34sUix1lba+hgUH/EN6A7bKAuKOhR3p0OvTn7Q==", "dev": true, "requires": { - "ethers": "4.0.0-beta.3", + "@ethersproject/abi": "5.0.0-beta.153", "underscore": "1.9.1", - "web3-utils": "1.2.2" - }, - "dependencies": { - "@types/node": { - "version": "10.17.44", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.44.tgz", - "integrity": "sha512-vHPAyBX1ffLcy4fQHmDyIUMUb42gHZjPHU66nhvbMzAWJqHnySGZ6STwN3rwrnSd1FHB0DI/RWgGELgKSYRDmw==", - "dev": true - }, - "elliptic": { - "version": "6.3.3", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.3.3.tgz", - "integrity": "sha1-VILZZG1UvLif19mU/J4ulWiHbj8=", - "dev": true, - "requires": { - "bn.js": "^4.4.0", - "brorand": "^1.0.1", - "hash.js": "^1.0.0", - "inherits": "^2.0.1" - } - }, - "ethers": { - "version": "4.0.0-beta.3", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-4.0.0-beta.3.tgz", - "integrity": "sha512-YYPogooSknTwvHg3+Mv71gM/3Wcrx+ZpCzarBj3mqs9njjRkrOo2/eufzhHloOCo3JSoNI4TQJJ6yU5ABm3Uog==", - "dev": true, - "requires": { - "@types/node": "^10.3.2", - "aes-js": "3.0.0", - "bn.js": "^4.4.0", - "elliptic": "6.3.3", - "hash.js": "1.1.3", - "js-sha3": "0.5.7", - "scrypt-js": "2.0.3", - "setimmediate": "1.0.4", - "uuid": "2.0.1", - "xmlhttprequest": "1.8.0" - } - }, - "scrypt-js": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-2.0.3.tgz", - "integrity": "sha1-uwBAvgMEPamgEqLOqfyfhSz8h9Q=", - "dev": true - } + "web3-utils": "1.2.9" } }, "web3-eth-accounts": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.2.2.tgz", - "integrity": "sha512-KzHOEyXOEZ13ZOkWN3skZKqSo5f4Z1ogPFNn9uZbKCz+kSp+gCAEKxyfbOsB/JMAp5h7o7pb6eYsPCUBJmFFiA==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.2.9.tgz", + "integrity": "sha512-jkbDCZoA1qv53mFcRHCinoCsgg8WH+M0YUO1awxmqWXRmCRws1wW0TsuSQ14UThih5Dxolgl+e+aGWxG58LMwg==", "dev": true, "requires": { - "any-promise": "1.3.0", "crypto-browserify": "3.12.0", - "eth-lib": "0.2.7", + "eth-lib": "^0.2.8", "ethereumjs-common": "^1.3.2", "ethereumjs-tx": "^2.1.1", - "scrypt-shim": "github:web3-js/scrypt-shim", + "scrypt-js": "^3.0.1", "underscore": "1.9.1", "uuid": "3.3.2", - "web3-core": "1.2.2", - "web3-core-helpers": "1.2.2", - "web3-core-method": "1.2.2", - "web3-utils": "1.2.2" + "web3-core": "1.2.9", + "web3-core-helpers": "1.2.9", + "web3-core-method": "1.2.9", + "web3-utils": "1.2.9" }, "dependencies": { "eth-lib": { - "version": "0.2.7", - "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.7.tgz", - "integrity": "sha1-L5Pxex4jrsN1nNSj/iDBKGo/wco=", + "version": "0.2.8", + "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.8.tgz", + "integrity": "sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw==", "dev": true, "requires": { "bn.js": "^4.11.6", @@ -1347,6 +1205,12 @@ "xhr-request-promise": "^0.1.2" } }, + "scrypt-js": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz", + "integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==", + "dev": true + }, "uuid": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", @@ -1356,46 +1220,47 @@ } }, "web3-eth-contract": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.2.2.tgz", - "integrity": "sha512-EKT2yVFws3FEdotDQoNsXTYL798+ogJqR2//CaGwx3p0/RvQIgfzEwp8nbgA6dMxCsn9KOQi7OtklzpnJMkjtA==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.2.9.tgz", + "integrity": "sha512-PYMvJf7EG/HyssUZa+pXrc8IB06K/YFfWYyW4R7ed3sab+9wWUys1TlWxBCBuiBXOokSAyM6H6P6/cKEx8FT8Q==", "dev": true, "requires": { "@types/bn.js": "^4.11.4", "underscore": "1.9.1", - "web3-core": "1.2.2", - "web3-core-helpers": "1.2.2", - "web3-core-method": "1.2.2", - "web3-core-promievent": "1.2.2", - "web3-core-subscriptions": "1.2.2", - "web3-eth-abi": "1.2.2", - "web3-utils": "1.2.2" + "web3-core": "1.2.9", + "web3-core-helpers": "1.2.9", + "web3-core-method": "1.2.9", + "web3-core-promievent": "1.2.9", + "web3-core-subscriptions": "1.2.9", + "web3-eth-abi": "1.2.9", + "web3-utils": "1.2.9" } }, "web3-eth-ens": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/web3-eth-ens/-/web3-eth-ens-1.2.2.tgz", - "integrity": "sha512-CFjkr2HnuyMoMFBoNUWojyguD4Ef+NkyovcnUc/iAb9GP4LHohKrODG4pl76R5u61TkJGobC2ij6TyibtsyVYg==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-eth-ens/-/web3-eth-ens-1.2.9.tgz", + "integrity": "sha512-kG4+ZRgZ8I1WYyOBGI8QVRHfUSbbJjvJAGA1AF/NOW7JXQ+x7gBGeJw6taDWJhSshMoEKWcsgvsiuoG4870YxQ==", "dev": true, "requires": { + "content-hash": "^2.5.2", "eth-ens-namehash": "2.0.8", "underscore": "1.9.1", - "web3-core": "1.2.2", - "web3-core-helpers": "1.2.2", - "web3-core-promievent": "1.2.2", - "web3-eth-abi": "1.2.2", - "web3-eth-contract": "1.2.2", - "web3-utils": "1.2.2" + "web3-core": "1.2.9", + "web3-core-helpers": "1.2.9", + "web3-core-promievent": "1.2.9", + "web3-eth-abi": "1.2.9", + "web3-eth-contract": "1.2.9", + "web3-utils": "1.2.9" } }, "web3-eth-iban": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.2.2.tgz", - "integrity": "sha512-gxKXBoUhaTFHr0vJB/5sd4i8ejF/7gIsbM/VvemHT3tF5smnmY6hcwSMmn7sl5Gs+83XVb/BngnnGkf+I/rsrQ==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.2.9.tgz", + "integrity": "sha512-RtdVvJE0pyg9dHLy0GzDiqgnLnssSzfz/JYguhC1wsj9+Gnq1M6Diy3NixACWUAp6ty/zafyOaZnNQ+JuH9TjQ==", "dev": true, "requires": { "bn.js": "4.11.8", - "web3-utils": "1.2.2" + "web3-utils": "1.2.9" }, "dependencies": { "bn.js": { @@ -1407,78 +1272,95 @@ } }, "web3-eth-personal": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.2.2.tgz", - "integrity": "sha512-4w+GLvTlFqW3+q4xDUXvCEMU7kRZ+xm/iJC8gm1Li1nXxwwFbs+Y+KBK6ZYtoN1qqAnHR+plYpIoVo27ixI5Rg==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.2.9.tgz", + "integrity": "sha512-cFiNrktxZ1C/rIdJFzQTvFn3/0zcsR3a+Jf8Y3KxeQDHszQtosjLWptP7bsUmDwEh4hzh0Cy3KpOxlYBWB8bJQ==", "dev": true, "requires": { "@types/node": "^12.6.1", - "web3-core": "1.2.2", - "web3-core-helpers": "1.2.2", - "web3-core-method": "1.2.2", - "web3-net": "1.2.2", - "web3-utils": "1.2.2" + "web3-core": "1.2.9", + "web3-core-helpers": "1.2.9", + "web3-core-method": "1.2.9", + "web3-net": "1.2.9", + "web3-utils": "1.2.9" + }, + "dependencies": { + "@types/node": { + "version": "12.19.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.19.4.tgz", + "integrity": "sha512-o3oj1bETk8kBwzz1WlO6JWL/AfAA3Vm6J1B3C9CsdxHYp7XgPiH7OEXPUbZTndHlRaIElrANkQfe6ZmfJb3H2w==", + "dev": true + } } }, "web3-net": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.2.2.tgz", - "integrity": "sha512-K07j2DXq0x4UOJgae65rWZKraOznhk8v5EGSTdFqASTx7vWE/m+NqBijBYGEsQY1lSMlVaAY9UEQlcXK5HzXTw==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.2.9.tgz", + "integrity": "sha512-d2mTn8jPlg+SI2hTj2b32Qan6DmtU9ap/IUlJTeQbZQSkTLf0u9suW8Vjwyr4poJYXTurdSshE7OZsPNn30/ZA==", "dev": true, "requires": { - "web3-core": "1.2.2", - "web3-core-method": "1.2.2", - "web3-utils": "1.2.2" + "web3-core": "1.2.9", + "web3-core-method": "1.2.9", + "web3-utils": "1.2.9" } }, "web3-providers-http": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.2.2.tgz", - "integrity": "sha512-BNZ7Hguy3eBszsarH5gqr9SIZNvqk9eKwqwmGH1LQS1FL3NdoOn7tgPPdddrXec4fL94CwgNk4rCU+OjjZRNDg==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.2.9.tgz", + "integrity": "sha512-F956tCIj60Ttr0UvEHWFIhx+be3He8msoPzyA44/kfzzYoMAsCFRn5cf0zQG6al0znE75g6HlWVSN6s3yAh51A==", "dev": true, "requires": { - "web3-core-helpers": "1.2.2", + "web3-core-helpers": "1.2.9", "xhr2-cookies": "1.1.0" } }, "web3-providers-ipc": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.2.2.tgz", - "integrity": "sha512-t97w3zi5Kn/LEWGA6D9qxoO0LBOG+lK2FjlEdCwDQatffB/+vYrzZ/CLYVQSoyFZAlsDoBasVoYSWZK1n39aHA==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.2.9.tgz", + "integrity": "sha512-NQ8QnBleoHA2qTJlqoWu7EJAD/FR5uimf7Ielzk4Z2z+m+6UAuJdJMSuQNj+Umhz9L/Ys6vpS1vHx9NizFl+aQ==", "dev": true, "requires": { "oboe": "2.1.4", "underscore": "1.9.1", - "web3-core-helpers": "1.2.2" + "web3-core-helpers": "1.2.9" } }, "web3-providers-ws": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.2.2.tgz", - "integrity": "sha512-Wb1mrWTGMTXOpJkL0yGvL/WYLt8fUIXx8k/l52QB2IiKzvyd42dTWn4+j8IKXGSYYzOm7NMqv6nhA5VDk12VfA==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.2.9.tgz", + "integrity": "sha512-6+UpvINeI//dglZoAKStUXqxDOXJy6Iitv2z3dbgInG4zb8tkYl/VBDL80UjUg3ZvzWG0g7EKY2nRPEpON2TFA==", "dev": true, "requires": { + "eventemitter3": "^4.0.0", "underscore": "1.9.1", - "web3-core-helpers": "1.2.2", - "websocket": "github:web3-js/WebSocket-Node#polyfill/globalThis" + "web3-core-helpers": "1.2.9", + "websocket": "^1.0.31" + }, + "dependencies": { + "eventemitter3": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", + "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==", + "dev": true + } } }, "web3-shh": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/web3-shh/-/web3-shh-1.2.2.tgz", - "integrity": "sha512-og258NPhlBn8yYrDWjoWBBb6zo1OlBgoWGT+LL5/LPqRbjPe09hlOYHgscAAr9zZGtohTOty7RrxYw6Z6oDWCg==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-shh/-/web3-shh-1.2.9.tgz", + "integrity": "sha512-PWa8b/EaxaMinFaxy6cV0i0EOi2M7a/ST+9k9nhyhCjVa2vzXuNoBNo2IUOmeZ0WP2UQB8ByJ2+p4htlJaDOjA==", "dev": true, "requires": { - "web3-core": "1.2.2", - "web3-core-method": "1.2.2", - "web3-core-subscriptions": "1.2.2", - "web3-net": "1.2.2" + "web3-core": "1.2.9", + "web3-core-method": "1.2.9", + "web3-core-subscriptions": "1.2.9", + "web3-net": "1.2.9" } }, "web3-utils": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.2.2.tgz", - "integrity": "sha512-joF+s3243TY5cL7Z7y4h1JsJpUCf/kmFmj+eJar7Y2yNIGVcW961VyrAms75tjUysSuHaUQ3eQXjBEUJueT52A==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.2.9.tgz", + "integrity": "sha512-9hcpuis3n/LxFzEVjwnVgvJzTirS2S9/MiNAa7l4WOEoywY+BSNwnRX4MuHnjkh9NY25B6QOjuNG6FNnSjTw1w==", "dev": true, "requires": { "bn.js": "4.11.8", @@ -1496,45 +1378,39 @@ "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", "dev": true - }, - "eth-lib": { - "version": "0.2.7", - "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.7.tgz", - "integrity": "sha1-L5Pxex4jrsN1nNSj/iDBKGo/wco=", - "dev": true, - "requires": { - "bn.js": "^4.11.6", - "elliptic": "^6.4.0", - "xhr-request-promise": "^0.1.2" - } } } - }, - "websocket": { - "version": "github:web3-js/WebSocket-Node#ef5ea2f41daf4a2113b80c9223df884b4d56c400", - "from": "github:web3-js/WebSocket-Node#polyfill/globalThis", - "dev": true, - "requires": { - "debug": "^2.2.0", - "es5-ext": "^0.10.50", - "nan": "^2.14.0", - "typedarray-to-buffer": "^3.1.5", - "yaeti": "^0.0.6" - } } } }, "@truffle/provider": { - "version": "0.1.19", - "resolved": "https://registry.npmjs.org/@truffle/provider/-/provider-0.1.19.tgz", - "integrity": "sha512-ke8iQmzW4Y99+8iff8xQcc+mCNU4AkwtaZ/iSpmVD8qpLytw8/DSNCm0RiEz9/+I93Q1zqI4Jnij/rXnkS2Njw==", + "version": "0.2.25", + "resolved": "https://registry.npmjs.org/@truffle/provider/-/provider-0.2.25.tgz", + "integrity": "sha512-BohKgT2357c2dYCH2IQwldQ4EJkfsWUClpb3j+kR8ng02vbsyAPe0HMH463I+h+tiDKvL757dBltXpe0DBJusg==", "dev": true, "requires": { - "@truffle/error": "^0.0.7", - "@truffle/interface-adapter": "^0.3.0", - "web3": "1.2.1" + "@truffle/error": "^0.0.11", + "@truffle/interface-adapter": "^0.4.18", + "web3": "1.2.9" }, "dependencies": { + "@ethersproject/abi": { + "version": "5.0.0-beta.153", + "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.0.0-beta.153.tgz", + "integrity": "sha512-aXweZ1Z7vMNzJdLpR1CZUAIgnwjrZeUSvN9syCwlBaEBUFJmFY+HHnfuTI5vIhVs/mRkfJVrbEyl51JZQqyjAg==", + "dev": true, + "requires": { + "@ethersproject/address": ">=5.0.0-beta.128", + "@ethersproject/bignumber": ">=5.0.0-beta.130", + "@ethersproject/bytes": ">=5.0.0-beta.129", + "@ethersproject/constants": ">=5.0.0-beta.128", + "@ethersproject/hash": ">=5.0.0-beta.128", + "@ethersproject/keccak256": ">=5.0.0-beta.127", + "@ethersproject/logger": ">=5.0.0-beta.129", + "@ethersproject/properties": ">=5.0.0-beta.131", + "@ethersproject/strings": ">=5.0.0-beta.130" + } + }, "@types/node": { "version": "10.17.44", "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.44.tgz", @@ -1547,61 +1423,15 @@ "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", "dev": true }, - "buffer": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.0.tgz", - "integrity": "sha512-cd+5r1VLBwUqTrmnzW+D7ABkJUM6mr7uv1dv+6jRw4Rcl7tFIFHDqHPL98LhpGFn3dbAt3gtLxtrWp4m1kFrqg==", - "dev": true, - "requires": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "ethers": { - "version": "4.0.0-beta.3", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-4.0.0-beta.3.tgz", - "integrity": "sha512-YYPogooSknTwvHg3+Mv71gM/3Wcrx+ZpCzarBj3mqs9njjRkrOo2/eufzhHloOCo3JSoNI4TQJJ6yU5ABm3Uog==", + "eth-lib": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.7.tgz", + "integrity": "sha1-L5Pxex4jrsN1nNSj/iDBKGo/wco=", "dev": true, "requires": { - "@types/node": "^10.3.2", - "aes-js": "3.0.0", - "bn.js": "^4.4.0", - "elliptic": "6.3.3", - "hash.js": "1.1.3", - "js-sha3": "0.5.7", - "scrypt-js": "2.0.3", - "setimmediate": "1.0.4", - "uuid": "2.0.1", - "xmlhttprequest": "1.8.0" - }, - "dependencies": { - "elliptic": { - "version": "6.3.3", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.3.3.tgz", - "integrity": "sha1-VILZZG1UvLif19mU/J4ulWiHbj8=", - "dev": true, - "requires": { - "bn.js": "^4.4.0", - "brorand": "^1.0.1", - "hash.js": "^1.0.0", - "inherits": "^2.0.1" - } - }, - "setimmediate": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.4.tgz", - "integrity": "sha1-IOgd5iLUoCWIzgyNqJc8vPHTE48=", - "dev": true - } + "bn.js": "^4.11.6", + "elliptic": "^6.4.0", + "xhr-request-promise": "^0.1.2" } }, "eventemitter3": { @@ -1610,45 +1440,6 @@ "integrity": "sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q==", "dev": true }, - "fs-extra": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz", - "integrity": "sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - }, - "get-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", - "dev": true - }, - "hash.js": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", - "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.0" - } - }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", - "dev": true - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - }, "oboe": { "version": "2.1.4", "resolved": "https://registry.npmjs.org/oboe/-/oboe-2.1.4.tgz", @@ -1658,403 +1449,322 @@ "http-https": "^1.0.0" } }, - "p-cancelable": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.3.0.tgz", - "integrity": "sha512-RVbZPLso8+jFeq1MfNvgXtCRED2raz/dKpacfTNxsx6pLEpEomM7gah6VeHSYV3+vo0OAi4MkArtQcWWXuQoyw==", - "dev": true - }, - "prepend-http": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", - "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", - "dev": true - }, - "scrypt-js": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-2.0.3.tgz", - "integrity": "sha1-uwBAvgMEPamgEqLOqfyfhSz8h9Q=", - "dev": true - }, - "semver": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.2.0.tgz", - "integrity": "sha512-jdFC1VdUGT/2Scgbimf7FSx9iJLXoqfglSF+gJeuNWVpiE37OIbc1jywR/GJyFdz3mnkz2/id0L0J/cr0izR5A==", - "dev": true - }, - "swarm-js": { - "version": "0.1.39", - "resolved": "https://registry.npmjs.org/swarm-js/-/swarm-js-0.1.39.tgz", - "integrity": "sha512-QLMqL2rzF6n5s50BptyD6Oi0R1aWlJC5Y17SRIVXRj6OR1DRIPM7nepvrxxkjA1zNzFz6mUOMjfeqeDaWB7OOg==", - "dev": true, - "requires": { - "bluebird": "^3.5.0", - "buffer": "^5.0.5", - "decompress": "^4.0.0", - "eth-lib": "^0.1.26", - "fs-extra": "^4.0.2", - "got": "^7.1.0", - "mime-types": "^2.1.16", - "mkdirp-promise": "^5.0.1", - "mock-fs": "^4.1.0", - "setimmediate": "^1.0.5", - "tar": "^4.0.2", - "xhr-request-promise": "^0.1.2" - }, - "dependencies": { - "got": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/got/-/got-7.1.0.tgz", - "integrity": "sha512-Y5WMo7xKKq1muPsxD+KmrR8DH5auG7fBdDVueZwETwV6VytKyU9OX/ddpq2/1hp1vIPvVb4T81dKQz3BivkNLw==", - "dev": true, - "requires": { - "decompress-response": "^3.2.0", - "duplexer3": "^0.1.4", - "get-stream": "^3.0.0", - "is-plain-obj": "^1.1.0", - "is-retry-allowed": "^1.0.0", - "is-stream": "^1.0.0", - "isurl": "^1.0.0-alpha5", - "lowercase-keys": "^1.0.0", - "p-cancelable": "^0.3.0", - "p-timeout": "^1.1.1", - "safe-buffer": "^5.0.1", - "timed-out": "^4.0.0", - "url-parse-lax": "^1.0.0", - "url-to-options": "^1.0.1" - } - } - } - }, - "url-parse-lax": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", - "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", - "dev": true, - "requires": { - "prepend-http": "^1.0.1" - } - }, - "uuid": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.1.tgz", - "integrity": "sha1-wqMN7bPlNdcsz4LjQ5QaULqFM6w=", - "dev": true - }, "web3": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/web3/-/web3-1.2.1.tgz", - "integrity": "sha512-nNMzeCK0agb5i/oTWNdQ1aGtwYfXzHottFP2Dz0oGIzavPMGSKyVlr8ibVb1yK5sJBjrWVnTdGaOC2zKDFuFRw==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3/-/web3-1.2.9.tgz", + "integrity": "sha512-Mo5aBRm0JrcNpN/g4VOrDzudymfOnHRC3s2VarhYxRA8aWgF5rnhQ0ziySaugpic1gksbXPe105pUWyRqw8HUA==", "dev": true, "requires": { - "web3-bzz": "1.2.1", - "web3-core": "1.2.1", - "web3-eth": "1.2.1", - "web3-eth-personal": "1.2.1", - "web3-net": "1.2.1", - "web3-shh": "1.2.1", - "web3-utils": "1.2.1" + "web3-bzz": "1.2.9", + "web3-core": "1.2.9", + "web3-eth": "1.2.9", + "web3-eth-personal": "1.2.9", + "web3-net": "1.2.9", + "web3-shh": "1.2.9", + "web3-utils": "1.2.9" } }, "web3-bzz": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.2.1.tgz", - "integrity": "sha512-LdOO44TuYbGIPfL4ilkuS89GQovxUpmLz6C1UC7VYVVRILeZS740FVB3j9V4P4FHUk1RenaDfKhcntqgVCHtjw==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.2.9.tgz", + "integrity": "sha512-ogVQr9jHodu9HobARtvUSmWG22cv2EUQzlPeejGWZ7j5h20HX40EDuWyomGY5VclIj5DdLY76Tmq88RTf/6nxA==", "dev": true, "requires": { + "@types/node": "^10.12.18", "got": "9.6.0", - "swarm-js": "0.1.39", + "swarm-js": "^0.1.40", "underscore": "1.9.1" } }, "web3-core": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.2.1.tgz", - "integrity": "sha512-5ODwIqgl8oIg/0+Ai4jsLxkKFWJYE0uLuE1yUKHNVCL4zL6n3rFjRMpKPokd6id6nJCNgeA64KdWQ4XfpnjdMg==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.2.9.tgz", + "integrity": "sha512-fSYv21IP658Ty2wAuU9iqmW7V+75DOYMVZsDH/c14jcF/1VXnedOcxzxSj3vArsCvXZNe6XC5/wAuGZyQwR9RA==", "dev": true, "requires": { - "web3-core-helpers": "1.2.1", - "web3-core-method": "1.2.1", - "web3-core-requestmanager": "1.2.1", - "web3-utils": "1.2.1" + "@types/bn.js": "^4.11.4", + "@types/node": "^12.6.1", + "bignumber.js": "^9.0.0", + "web3-core-helpers": "1.2.9", + "web3-core-method": "1.2.9", + "web3-core-requestmanager": "1.2.9", + "web3-utils": "1.2.9" + }, + "dependencies": { + "@types/node": { + "version": "12.19.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.19.4.tgz", + "integrity": "sha512-o3oj1bETk8kBwzz1WlO6JWL/AfAA3Vm6J1B3C9CsdxHYp7XgPiH7OEXPUbZTndHlRaIElrANkQfe6ZmfJb3H2w==", + "dev": true + } } }, "web3-core-helpers": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.2.1.tgz", - "integrity": "sha512-Gx3sTEajD5r96bJgfuW377PZVFmXIH4TdqDhgGwd2lZQCcMi+DA4TgxJNJGxn0R3aUVzyyE76j4LBrh412mXrw==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.2.9.tgz", + "integrity": "sha512-t0WAG3orLCE3lqi77ZoSRNFok3VQWZXTniZigDQjyOJYMAX7BU3F3js8HKbjVnAxlX3tiKoDxI0KBk9F3AxYuw==", "dev": true, "requires": { "underscore": "1.9.1", - "web3-eth-iban": "1.2.1", - "web3-utils": "1.2.1" + "web3-eth-iban": "1.2.9", + "web3-utils": "1.2.9" } }, "web3-core-method": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.2.1.tgz", - "integrity": "sha512-Ghg2WS23qi6Xj8Od3VCzaImLHseEA7/usvnOItluiIc5cKs00WYWsNy2YRStzU9a2+z8lwQywPYp0nTzR/QXdQ==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.2.9.tgz", + "integrity": "sha512-bjsIoqP3gs7A/gP8+QeLUCyOKJ8bopteCSNbCX36Pxk6TYfYWNuC6hP+2GzUuqdP3xaZNe+XEElQFUNpR3oyAg==", "dev": true, "requires": { + "@ethersproject/transactions": "^5.0.0-beta.135", "underscore": "1.9.1", - "web3-core-helpers": "1.2.1", - "web3-core-promievent": "1.2.1", - "web3-core-subscriptions": "1.2.1", - "web3-utils": "1.2.1" + "web3-core-helpers": "1.2.9", + "web3-core-promievent": "1.2.9", + "web3-core-subscriptions": "1.2.9", + "web3-utils": "1.2.9" } }, "web3-core-promievent": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.2.1.tgz", - "integrity": "sha512-IVUqgpIKoeOYblwpex4Hye6npM0aMR+kU49VP06secPeN0rHMyhGF0ZGveWBrGvf8WDPI7jhqPBFIC6Jf3Q3zw==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.2.9.tgz", + "integrity": "sha512-0eAUA2zjgXTleSrnc1wdoKQPPIHU6KHf4fAscu4W9kKrR+mqP1KsjYrxY9wUyjNnXxfQ+5M29ipvbiaK8OqdOw==", "dev": true, "requires": { - "any-promise": "1.3.0", "eventemitter3": "3.1.2" } }, "web3-core-requestmanager": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.2.1.tgz", - "integrity": "sha512-xfknTC69RfYmLKC+83Jz73IC3/sS2ZLhGtX33D4Q5nQ8yc39ElyAolxr9sJQS8kihOcM6u4J+8gyGMqsLcpIBg==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.2.9.tgz", + "integrity": "sha512-1PwKV2m46ALUnIN5VPPgjOj8yMLJhhqZYvYJE34hTN5SErOkwhzx5zScvo5MN7v7KyQGFnpVCZKKGCiEnDmtFA==", "dev": true, "requires": { "underscore": "1.9.1", - "web3-core-helpers": "1.2.1", - "web3-providers-http": "1.2.1", - "web3-providers-ipc": "1.2.1", - "web3-providers-ws": "1.2.1" + "web3-core-helpers": "1.2.9", + "web3-providers-http": "1.2.9", + "web3-providers-ipc": "1.2.9", + "web3-providers-ws": "1.2.9" } }, "web3-core-subscriptions": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.2.1.tgz", - "integrity": "sha512-nmOwe3NsB8V8UFsY1r+sW6KjdOS68h8nuh7NzlWxBQT/19QSUGiERRTaZXWu5BYvo1EoZRMxCKyCQpSSXLc08g==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.2.9.tgz", + "integrity": "sha512-Y48TvXPSPxEM33OmXjGVDMzTd0j8X0t2+sDw66haeBS8eYnrEzasWuBZZXDq0zNUsqyxItgBGDn+cszkgEnFqg==", "dev": true, "requires": { "eventemitter3": "3.1.2", "underscore": "1.9.1", - "web3-core-helpers": "1.2.1" + "web3-core-helpers": "1.2.9" } }, "web3-eth": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.2.1.tgz", - "integrity": "sha512-/2xly4Yry5FW1i+uygPjhfvgUP/MS/Dk+PDqmzp5M88tS86A+j8BzKc23GrlA8sgGs0645cpZK/999LpEF5UdA==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.2.9.tgz", + "integrity": "sha512-sIKO4iE9FEBa/CYUd6GdPd7GXt/wISqxUd8PlIld6+hvMJj02lgO7Z7p5T9mZIJcIZJGvZX81ogx8oJ9yif+Ag==", "dev": true, "requires": { "underscore": "1.9.1", - "web3-core": "1.2.1", - "web3-core-helpers": "1.2.1", - "web3-core-method": "1.2.1", - "web3-core-subscriptions": "1.2.1", - "web3-eth-abi": "1.2.1", - "web3-eth-accounts": "1.2.1", - "web3-eth-contract": "1.2.1", - "web3-eth-ens": "1.2.1", - "web3-eth-iban": "1.2.1", - "web3-eth-personal": "1.2.1", - "web3-net": "1.2.1", - "web3-utils": "1.2.1" + "web3-core": "1.2.9", + "web3-core-helpers": "1.2.9", + "web3-core-method": "1.2.9", + "web3-core-subscriptions": "1.2.9", + "web3-eth-abi": "1.2.9", + "web3-eth-accounts": "1.2.9", + "web3-eth-contract": "1.2.9", + "web3-eth-ens": "1.2.9", + "web3-eth-iban": "1.2.9", + "web3-eth-personal": "1.2.9", + "web3-net": "1.2.9", + "web3-utils": "1.2.9" } }, "web3-eth-abi": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.2.1.tgz", - "integrity": "sha512-jI/KhU2a/DQPZXHjo2GW0myEljzfiKOn+h1qxK1+Y9OQfTcBMxrQJyH5AP89O6l6NZ1QvNdq99ThAxBFoy5L+g==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.2.9.tgz", + "integrity": "sha512-3YwUYbh/DMfDbhMWEebAdjSd5bj3ZQieOjLzWFHU23CaLEqT34sUix1lba+hgUH/EN6A7bKAuKOhR3p0OvTn7Q==", "dev": true, "requires": { - "ethers": "4.0.0-beta.3", + "@ethersproject/abi": "5.0.0-beta.153", "underscore": "1.9.1", - "web3-utils": "1.2.1" + "web3-utils": "1.2.9" } }, "web3-eth-accounts": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.2.1.tgz", - "integrity": "sha512-26I4qq42STQ8IeKUyur3MdQ1NzrzCqPsmzqpux0j6X/XBD7EjZ+Cs0lhGNkSKH5dI3V8CJasnQ5T1mNKeWB7nQ==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.2.9.tgz", + "integrity": "sha512-jkbDCZoA1qv53mFcRHCinoCsgg8WH+M0YUO1awxmqWXRmCRws1wW0TsuSQ14UThih5Dxolgl+e+aGWxG58LMwg==", "dev": true, "requires": { - "any-promise": "1.3.0", "crypto-browserify": "3.12.0", - "eth-lib": "0.2.7", - "scryptsy": "2.1.0", - "semver": "6.2.0", + "eth-lib": "^0.2.8", + "ethereumjs-common": "^1.3.2", + "ethereumjs-tx": "^2.1.1", + "scrypt-js": "^3.0.1", "underscore": "1.9.1", "uuid": "3.3.2", - "web3-core": "1.2.1", - "web3-core-helpers": "1.2.1", - "web3-core-method": "1.2.1", - "web3-utils": "1.2.1" + "web3-core": "1.2.9", + "web3-core-helpers": "1.2.9", + "web3-core-method": "1.2.9", + "web3-utils": "1.2.9" }, "dependencies": { "eth-lib": { - "version": "0.2.7", - "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.7.tgz", - "integrity": "sha1-L5Pxex4jrsN1nNSj/iDBKGo/wco=", + "version": "0.2.8", + "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.8.tgz", + "integrity": "sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw==", "dev": true, "requires": { "bn.js": "^4.11.6", "elliptic": "^6.4.0", "xhr-request-promise": "^0.1.2" } - }, - "uuid": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", - "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", - "dev": true } } }, "web3-eth-contract": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.2.1.tgz", - "integrity": "sha512-kYFESbQ3boC9bl2rYVghj7O8UKMiuKaiMkxvRH5cEDHil8V7MGEGZNH0slSdoyeftZVlaWSMqkRP/chfnKND0g==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.2.9.tgz", + "integrity": "sha512-PYMvJf7EG/HyssUZa+pXrc8IB06K/YFfWYyW4R7ed3sab+9wWUys1TlWxBCBuiBXOokSAyM6H6P6/cKEx8FT8Q==", "dev": true, "requires": { + "@types/bn.js": "^4.11.4", "underscore": "1.9.1", - "web3-core": "1.2.1", - "web3-core-helpers": "1.2.1", - "web3-core-method": "1.2.1", - "web3-core-promievent": "1.2.1", - "web3-core-subscriptions": "1.2.1", - "web3-eth-abi": "1.2.1", - "web3-utils": "1.2.1" + "web3-core": "1.2.9", + "web3-core-helpers": "1.2.9", + "web3-core-method": "1.2.9", + "web3-core-promievent": "1.2.9", + "web3-core-subscriptions": "1.2.9", + "web3-eth-abi": "1.2.9", + "web3-utils": "1.2.9" } }, "web3-eth-ens": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/web3-eth-ens/-/web3-eth-ens-1.2.1.tgz", - "integrity": "sha512-lhP1kFhqZr2nnbu3CGIFFrAnNxk2veXpOXBY48Tub37RtobDyHijHgrj+xTh+mFiPokyrapVjpFsbGa+Xzye4Q==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-eth-ens/-/web3-eth-ens-1.2.9.tgz", + "integrity": "sha512-kG4+ZRgZ8I1WYyOBGI8QVRHfUSbbJjvJAGA1AF/NOW7JXQ+x7gBGeJw6taDWJhSshMoEKWcsgvsiuoG4870YxQ==", "dev": true, "requires": { + "content-hash": "^2.5.2", "eth-ens-namehash": "2.0.8", "underscore": "1.9.1", - "web3-core": "1.2.1", - "web3-core-helpers": "1.2.1", - "web3-core-promievent": "1.2.1", - "web3-eth-abi": "1.2.1", - "web3-eth-contract": "1.2.1", - "web3-utils": "1.2.1" + "web3-core": "1.2.9", + "web3-core-helpers": "1.2.9", + "web3-core-promievent": "1.2.9", + "web3-eth-abi": "1.2.9", + "web3-eth-contract": "1.2.9", + "web3-utils": "1.2.9" } }, "web3-eth-iban": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.2.1.tgz", - "integrity": "sha512-9gkr4QPl1jCU+wkgmZ8EwODVO3ovVj6d6JKMos52ggdT2YCmlfvFVF6wlGLwi0VvNa/p+0BjJzaqxnnG/JewjQ==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.2.9.tgz", + "integrity": "sha512-RtdVvJE0pyg9dHLy0GzDiqgnLnssSzfz/JYguhC1wsj9+Gnq1M6Diy3NixACWUAp6ty/zafyOaZnNQ+JuH9TjQ==", "dev": true, "requires": { "bn.js": "4.11.8", - "web3-utils": "1.2.1" + "web3-utils": "1.2.9" } }, "web3-eth-personal": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.2.1.tgz", - "integrity": "sha512-RNDVSiaSoY4aIp8+Hc7z+X72H7lMb3fmAChuSBADoEc7DsJrY/d0R5qQDK9g9t2BO8oxgLrLNyBP/9ub2Hc6Bg==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.2.9.tgz", + "integrity": "sha512-cFiNrktxZ1C/rIdJFzQTvFn3/0zcsR3a+Jf8Y3KxeQDHszQtosjLWptP7bsUmDwEh4hzh0Cy3KpOxlYBWB8bJQ==", "dev": true, "requires": { - "web3-core": "1.2.1", - "web3-core-helpers": "1.2.1", - "web3-core-method": "1.2.1", - "web3-net": "1.2.1", - "web3-utils": "1.2.1" + "@types/node": "^12.6.1", + "web3-core": "1.2.9", + "web3-core-helpers": "1.2.9", + "web3-core-method": "1.2.9", + "web3-net": "1.2.9", + "web3-utils": "1.2.9" + }, + "dependencies": { + "@types/node": { + "version": "12.19.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.19.4.tgz", + "integrity": "sha512-o3oj1bETk8kBwzz1WlO6JWL/AfAA3Vm6J1B3C9CsdxHYp7XgPiH7OEXPUbZTndHlRaIElrANkQfe6ZmfJb3H2w==", + "dev": true + } } }, "web3-net": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.2.1.tgz", - "integrity": "sha512-Yt1Bs7WgnLESPe0rri/ZoPWzSy55ovioaP35w1KZydrNtQ5Yq4WcrAdhBzcOW7vAkIwrsLQsvA+hrOCy7mNauw==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.2.9.tgz", + "integrity": "sha512-d2mTn8jPlg+SI2hTj2b32Qan6DmtU9ap/IUlJTeQbZQSkTLf0u9suW8Vjwyr4poJYXTurdSshE7OZsPNn30/ZA==", "dev": true, "requires": { - "web3-core": "1.2.1", - "web3-core-method": "1.2.1", - "web3-utils": "1.2.1" + "web3-core": "1.2.9", + "web3-core-method": "1.2.9", + "web3-utils": "1.2.9" } }, "web3-providers-http": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.2.1.tgz", - "integrity": "sha512-BDtVUVolT9b3CAzeGVA/np1hhn7RPUZ6YYGB/sYky+GjeO311Yoq8SRDUSezU92x8yImSC2B+SMReGhd1zL+bQ==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.2.9.tgz", + "integrity": "sha512-F956tCIj60Ttr0UvEHWFIhx+be3He8msoPzyA44/kfzzYoMAsCFRn5cf0zQG6al0znE75g6HlWVSN6s3yAh51A==", "dev": true, "requires": { - "web3-core-helpers": "1.2.1", + "web3-core-helpers": "1.2.9", "xhr2-cookies": "1.1.0" } }, "web3-providers-ipc": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.2.1.tgz", - "integrity": "sha512-oPEuOCwxVx8L4CPD0TUdnlOUZwGBSRKScCz/Ws2YHdr9Ium+whm+0NLmOZjkjQp5wovQbyBzNa6zJz1noFRvFA==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.2.9.tgz", + "integrity": "sha512-NQ8QnBleoHA2qTJlqoWu7EJAD/FR5uimf7Ielzk4Z2z+m+6UAuJdJMSuQNj+Umhz9L/Ys6vpS1vHx9NizFl+aQ==", "dev": true, "requires": { "oboe": "2.1.4", "underscore": "1.9.1", - "web3-core-helpers": "1.2.1" + "web3-core-helpers": "1.2.9" } }, "web3-providers-ws": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.2.1.tgz", - "integrity": "sha512-oqsQXzu+ejJACVHy864WwIyw+oB21nw/pI65/sD95Zi98+/HQzFfNcIFneF1NC4bVF3VNX4YHTNq2I2o97LAiA==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.2.9.tgz", + "integrity": "sha512-6+UpvINeI//dglZoAKStUXqxDOXJy6Iitv2z3dbgInG4zb8tkYl/VBDL80UjUg3ZvzWG0g7EKY2nRPEpON2TFA==", "dev": true, "requires": { + "eventemitter3": "^4.0.0", "underscore": "1.9.1", - "web3-core-helpers": "1.2.1", - "websocket": "github:web3-js/WebSocket-Node#polyfill/globalThis" + "web3-core-helpers": "1.2.9", + "websocket": "^1.0.31" + }, + "dependencies": { + "eventemitter3": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", + "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==", + "dev": true + } } }, "web3-shh": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/web3-shh/-/web3-shh-1.2.1.tgz", - "integrity": "sha512-/3Cl04nza5kuFn25bV3FJWa0s3Vafr5BlT933h26xovQ6HIIz61LmvNQlvX1AhFL+SNJOTcQmK1SM59vcyC8bA==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-shh/-/web3-shh-1.2.9.tgz", + "integrity": "sha512-PWa8b/EaxaMinFaxy6cV0i0EOi2M7a/ST+9k9nhyhCjVa2vzXuNoBNo2IUOmeZ0WP2UQB8ByJ2+p4htlJaDOjA==", "dev": true, "requires": { - "web3-core": "1.2.1", - "web3-core-method": "1.2.1", - "web3-core-subscriptions": "1.2.1", - "web3-net": "1.2.1" + "web3-core": "1.2.9", + "web3-core-method": "1.2.9", + "web3-core-subscriptions": "1.2.9", + "web3-net": "1.2.9" } }, "web3-utils": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.2.1.tgz", - "integrity": "sha512-Mrcn3l58L+yCKz3zBryM6JZpNruWuT0OCbag8w+reeNROSGVlXzUQkU+gtAwc9JCZ7tKUyg67+2YUGqUjVcyBA==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.2.9.tgz", + "integrity": "sha512-9hcpuis3n/LxFzEVjwnVgvJzTirS2S9/MiNAa7l4WOEoywY+BSNwnRX4MuHnjkh9NY25B6QOjuNG6FNnSjTw1w==", "dev": true, "requires": { "bn.js": "4.11.8", "eth-lib": "0.2.7", + "ethereum-bloom-filters": "^1.0.6", "ethjs-unit": "0.1.6", "number-to-bn": "1.7.0", - "randomhex": "0.1.5", + "randombytes": "^2.1.0", "underscore": "1.9.1", "utf8": "3.0.0" - }, - "dependencies": { - "eth-lib": { - "version": "0.2.7", - "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.7.tgz", - "integrity": "sha1-L5Pxex4jrsN1nNSj/iDBKGo/wco=", - "dev": true, - "requires": { - "bn.js": "^4.11.6", - "elliptic": "^6.4.0", - "xhr-request-promise": "^0.1.2" - } - } - } - }, - "websocket": { - "version": "github:web3-js/WebSocket-Node#ef5ea2f41daf4a2113b80c9223df884b4d56c400", - "from": "github:web3-js/WebSocket-Node#polyfill/globalThis", - "dev": true, - "requires": { - "debug": "^2.2.0", - "es5-ext": "^0.10.50", - "nan": "^2.14.0", - "typedarray-to-buffer": "^3.1.5", - "yaeti": "^0.0.6" } } } @@ -2833,97 +2543,45 @@ "bcrypt-pbkdf": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", - "dev": true, - "requires": { - "tweetnacl": "^0.14.3" - } - }, - "bech32": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz", - "integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==" - }, - "bignumber.js": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.1.tgz", - "integrity": "sha512-IdZR9mh6ahOBv/hYGiXyVuyCetmGJhtYkqLBpTStdhEGjegpPlUawydyaF3pbIOFynJTpllEs+NP+CS9jKFLjA==", - "dev": true - }, - "binary-extensions": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.1.0.tgz", - "integrity": "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==", - "dev": true - }, - "bindings": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", - "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", - "dev": true, - "requires": { - "file-uri-to-path": "1.0.0" - } - }, - "bip66": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/bip66/-/bip66-1.1.5.tgz", - "integrity": "sha1-AfqHSHhcpwlV1QESF9GzE5lpyiI=", - "dev": true, - "requires": { - "safe-buffer": "^5.0.1" - } - }, - "bl": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.3.tgz", - "integrity": "sha512-pvcNpa0UU69UT341rO6AYy4FVAIkUHuZXRIWbq+zHnsVcRzDDjIAhGuuYoi0d//cwIwtt4pkpKycWEfjdV+vww==", - "dev": true, - "requires": { - "readable-stream": "^2.3.5", - "safe-buffer": "^5.1.1" - }, - "dependencies": { - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - }, - "dependencies": { - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - } - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - }, - "dependencies": { - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - } - } - } + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "dev": true, + "requires": { + "tweetnacl": "^0.14.3" + } + }, + "bech32": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz", + "integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==" + }, + "bignumber.js": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.1.tgz", + "integrity": "sha512-IdZR9mh6ahOBv/hYGiXyVuyCetmGJhtYkqLBpTStdhEGjegpPlUawydyaF3pbIOFynJTpllEs+NP+CS9jKFLjA==", + "dev": true + }, + "binary-extensions": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.1.0.tgz", + "integrity": "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==", + "dev": true + }, + "bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "dev": true, + "requires": { + "file-uri-to-path": "1.0.0" + } + }, + "bip66": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/bip66/-/bip66-1.1.5.tgz", + "integrity": "sha1-AfqHSHhcpwlV1QESF9GzE5lpyiI=", + "dev": true, + "requires": { + "safe-buffer": "^5.0.1" } }, "blakejs": { @@ -3123,34 +2781,6 @@ "isarray": "^1.0.0" } }, - "buffer-alloc": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz", - "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==", - "dev": true, - "requires": { - "buffer-alloc-unsafe": "^1.1.0", - "buffer-fill": "^1.0.0" - } - }, - "buffer-alloc-unsafe": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz", - "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==", - "dev": true - }, - "buffer-crc32": { - "version": "0.2.13", - "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", - "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=", - "dev": true - }, - "buffer-fill": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz", - "integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=", - "dev": true - }, "buffer-from": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", @@ -3980,22 +3610,6 @@ "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", "dev": true }, - "decompress": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/decompress/-/decompress-4.2.1.tgz", - "integrity": "sha512-e48kc2IjU+2Zw8cTb6VZcJQ3lgVbS4uuB1TfCHbiZIP/haNXm+SVyhu+87jts5/3ROpd82GSVCoNs/z8l4ZOaQ==", - "dev": true, - "requires": { - "decompress-tar": "^4.0.0", - "decompress-tarbz2": "^4.0.0", - "decompress-targz": "^4.0.0", - "decompress-unzip": "^4.0.1", - "graceful-fs": "^4.1.10", - "make-dir": "^1.0.0", - "pify": "^2.3.0", - "strip-dirs": "^2.0.0" - } - }, "decompress-response": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", @@ -4005,101 +3619,6 @@ "mimic-response": "^1.0.0" } }, - "decompress-tar": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/decompress-tar/-/decompress-tar-4.1.1.tgz", - "integrity": "sha512-JdJMaCrGpB5fESVyxwpCx4Jdj2AagLmv3y58Qy4GE6HMVjWz1FeVQk1Ct4Kye7PftcdOo/7U7UKzYBJgqnGeUQ==", - "dev": true, - "requires": { - "file-type": "^5.2.0", - "is-stream": "^1.1.0", - "tar-stream": "^1.5.2" - }, - "dependencies": { - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", - "dev": true - } - } - }, - "decompress-tarbz2": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/decompress-tarbz2/-/decompress-tarbz2-4.1.1.tgz", - "integrity": "sha512-s88xLzf1r81ICXLAVQVzaN6ZmX4A6U4z2nMbOwobxkLoIIfjVMBg7TeguTUXkKeXni795B6y5rnvDw7rxhAq9A==", - "dev": true, - "requires": { - "decompress-tar": "^4.1.0", - "file-type": "^6.1.0", - "is-stream": "^1.1.0", - "seek-bzip": "^1.0.5", - "unbzip2-stream": "^1.0.9" - }, - "dependencies": { - "file-type": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-6.2.0.tgz", - "integrity": "sha512-YPcTBDV+2Tm0VqjybVd32MHdlEGAtuxS3VAYsumFokDSMG+ROT5wawGlnHDoz7bfMcMDt9hxuXvXwoKUx2fkOg==", - "dev": true - }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", - "dev": true - } - } - }, - "decompress-targz": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/decompress-targz/-/decompress-targz-4.1.1.tgz", - "integrity": "sha512-4z81Znfr6chWnRDNfFNqLwPvm4db3WuZkqV+UgXQzSngG3CEKdBkw5jrv3axjjL96glyiiKjsxJG3X6WBZwX3w==", - "dev": true, - "requires": { - "decompress-tar": "^4.1.1", - "file-type": "^5.2.0", - "is-stream": "^1.1.0" - }, - "dependencies": { - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", - "dev": true - } - } - }, - "decompress-unzip": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/decompress-unzip/-/decompress-unzip-4.0.1.tgz", - "integrity": "sha1-3qrM39FK6vhVePczroIQ+bSEj2k=", - "dev": true, - "requires": { - "file-type": "^3.8.0", - "get-stream": "^2.2.0", - "pify": "^2.3.0", - "yauzl": "^2.4.2" - }, - "dependencies": { - "file-type": { - "version": "3.9.0", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-3.9.0.tgz", - "integrity": "sha1-JXoHg4TR24CHvESdEH1SpSZyuek=", - "dev": true - }, - "get-stream": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-2.3.1.tgz", - "integrity": "sha1-Xzj5PzRgCWZu4BUKBUFn+Rvdld4=", - "dev": true, - "requires": { - "object-assign": "^4.0.1", - "pinkie-promise": "^2.0.0" - } - } - } - }, "dedent": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", @@ -6153,15 +5672,6 @@ "reusify": "^1.0.4" } }, - "fd-slicer": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", - "integrity": "sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4=", - "dev": true, - "requires": { - "pend": "~1.2.0" - } - }, "fetch-ponyfill": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/fetch-ponyfill/-/fetch-ponyfill-4.1.0.tgz", @@ -6206,12 +5716,6 @@ "flat-cache": "^2.0.1" } }, - "file-type": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-5.2.0.tgz", - "integrity": "sha1-LdvqfHP/42No365J3DOMBYwritY=", - "dev": true - }, "file-uri-to-path": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", @@ -6363,12 +5867,6 @@ "resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz", "integrity": "sha1-invTcYa23d84E/I4WLV+yq9eQdQ=" }, - "fs-constants": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", - "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", - "dev": true - }, "fs-extra": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz", @@ -7964,12 +7462,6 @@ "integrity": "sha512-T/S49scO8plUiAOA2DBTBG3JHpn1yiw0kRp6dgiZ0v2/6twi5eiB0rHtHFH9ZIrvlWc6+4O+m4zg5+Z833aXgw==", "dev": true }, - "is-natural-number": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-natural-number/-/is-natural-number-4.0.1.tgz", - "integrity": "sha1-q5124dtM7VHjXeDHLr7PCfc0zeg=", - "dev": true - }, "is-negative-zero": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.0.tgz", @@ -8773,23 +8265,6 @@ "integrity": "sha1-81ypHEk/e3PaDgdJUwTxezH4fuU=", "dev": true }, - "make-dir": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", - "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", - "dev": true, - "requires": { - "pify": "^3.0.0" - }, - "dependencies": { - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - } - } - }, "make-error": { "version": "1.3.6", "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", @@ -9863,12 +9338,6 @@ "sha.js": "^2.4.8" } }, - "pend": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", - "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA=", - "dev": true - }, "performance-now": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", @@ -9887,21 +9356,6 @@ "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", "dev": true }, - "pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", - "dev": true - }, - "pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", - "dev": true, - "requires": { - "pinkie": "^2.0.0" - } - }, "pkg-dir": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", @@ -10095,12 +9549,6 @@ "safe-buffer": "^5.1.0" } }, - "randomhex": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/randomhex/-/randomhex-0.1.5.tgz", - "integrity": "sha1-us7vmCMpCRQA8qKRLGzQLxCU9YU=", - "dev": true - }, "range-parser": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", @@ -10509,29 +9957,6 @@ "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz", "integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==" }, - "scrypt-shim": { - "version": "github:web3-js/scrypt-shim#aafdadda13e660e25e1c525d1f5b2443f5eb1ebb", - "from": "github:web3-js/scrypt-shim", - "dev": true, - "requires": { - "scryptsy": "^2.1.0", - "semver": "^6.3.0" - }, - "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } - } - }, - "scryptsy": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/scryptsy/-/scryptsy-2.1.0.tgz", - "integrity": "sha512-1CdSqHQowJBnMAFyPEBRfqag/YP9OF394FV+4YREIJX4ljD7OxvQRDayyoyyCk+senRjSkP6VnUNQmVQqB6g7w==", - "dev": true - }, "secp256k1": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-4.0.2.tgz", @@ -10543,23 +9968,6 @@ "node-gyp-build": "^4.2.0" } }, - "seek-bzip": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/seek-bzip/-/seek-bzip-1.0.6.tgz", - "integrity": "sha512-e1QtP3YL5tWww8uKaOCQ18UxIT2laNBXHjV/S2WYCiK4udiv8lkG89KRIoCjUagnAmCBurjF4zEVX2ByBbnCjQ==", - "dev": true, - "requires": { - "commander": "^2.8.1" - }, - "dependencies": { - "commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true - } - } - }, "semaphore": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/semaphore/-/semaphore-1.1.0.tgz", @@ -11161,13 +10569,13 @@ } }, "solidity-coverage": { - "version": "0.7.11", - "resolved": "https://registry.npmjs.org/solidity-coverage/-/solidity-coverage-0.7.11.tgz", - "integrity": "sha512-HtBhXNTK2pO6hj82lf3txZ8afoyIGSmduJHJSoeZ71RjiuNzjGFj4duEZY/kfqxYSq1yARERC6jOTZGfIAeRyA==", + "version": "0.7.12", + "resolved": "https://registry.npmjs.org/solidity-coverage/-/solidity-coverage-0.7.12.tgz", + "integrity": "sha512-9iCiZU1rppeZEaprN9j7QSNWzOyMqipQ1VYMPbeipVr2HI0qdxkmg/QtizyJyHz35eClmuxyBNEzXTMaFnldTA==", "dev": true, "requires": { - "@solidity-parser/parser": "^0.7.0", - "@truffle/provider": "^0.1.17", + "@solidity-parser/parser": "^0.8.1", + "@truffle/provider": "^0.2.24", "chalk": "^2.4.2", "death": "^1.1.0", "detect-port": "^1.3.0", @@ -11183,15 +10591,9 @@ "recursive-readdir": "^2.2.2", "sc-istanbul": "^0.4.5", "shelljs": "^0.8.3", - "web3": "^1.3.0" + "web3-utils": "^1.3.0" }, "dependencies": { - "@solidity-parser/parser": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.7.1.tgz", - "integrity": "sha512-5ma2uuwPAEX1TPl2rAPAAuGlBkKnn2oUKQvnhTFlDIB8U/KDWX77FpHtL6Rcz+OwqSCWx9IClxACgyIEJ/GhIw==", - "dev": true - }, "chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", @@ -11220,12 +10622,6 @@ "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", "dev": true }, - "lodash": { - "version": "4.17.20", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", - "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", - "dev": true - }, "pify": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", @@ -11438,15 +10834,6 @@ "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", "dev": true }, - "strip-dirs": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/strip-dirs/-/strip-dirs-2.1.0.tgz", - "integrity": "sha512-JOCxOeKLm2CAS73y/U4ZeZPTkE+gNVCzKt7Eox84Iej1LT/2pTWYpZKJuxwQpvX1LiZb1xokNR7RLfuBAa7T3g==", - "dev": true, - "requires": { - "is-natural-number": "^4.0.1" - } - }, "strip-eof": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", @@ -11697,53 +11084,6 @@ "yallist": "^3.0.3" } }, - "tar-stream": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.2.tgz", - "integrity": "sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A==", - "dev": true, - "requires": { - "bl": "^1.0.0", - "buffer-alloc": "^1.2.0", - "end-of-stream": "^1.0.0", - "fs-constants": "^1.0.0", - "readable-stream": "^2.3.0", - "to-buffer": "^1.1.1", - "xtend": "^4.0.0" - }, - "dependencies": { - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, "text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", @@ -11796,12 +11136,6 @@ "os-tmpdir": "~1.0.2" } }, - "to-buffer": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.1.1.tgz", - "integrity": "sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==", - "dev": true - }, "to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", @@ -12093,28 +11427,6 @@ "integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==", "dev": true }, - "unbzip2-stream": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz", - "integrity": "sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==", - "dev": true, - "requires": { - "buffer": "^5.2.1", - "through": "^2.3.8" - }, - "dependencies": { - "buffer": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.0.tgz", - "integrity": "sha512-cd+5r1VLBwUqTrmnzW+D7ABkJUM6mr7uv1dv+6jRw4Rcl7tFIFHDqHPL98LhpGFn3dbAt3gtLxtrWp4m1kFrqg==", - "dev": true, - "requires": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - } - } - }, "underscore": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.9.1.tgz", @@ -13118,16 +12430,6 @@ } } }, - "yauzl": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", - "integrity": "sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=", - "dev": true, - "requires": { - "buffer-crc32": "~0.2.3", - "fd-slicer": "~1.1.0" - } - }, "yn": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", diff --git a/package.json b/package.json index b7d6d1c48..ccf9260f9 100644 --- a/package.json +++ b/package.json @@ -89,7 +89,7 @@ "lint-staged": "^10.5.1", "mocha-junit-reporter": "^2.0.0", "solhint": "^3.3.1", - "solidity-coverage": "^0.7.11", + "solidity-coverage": "^0.7.12", "truffle": "^5.1.48", "truffle-assertions": "^0.9.2", "truffle-flatten": "^1.0.8", From 01f23ffffbca74d996ecff1348c6d0822f33ec34 Mon Sep 17 00:00:00 2001 From: cgewecke Date: Wed, 18 Nov 2020 22:10:42 -0800 Subject: [PATCH 095/113] Add coverage script for truffle experiment --- .eslintignore | 3 +- .solcover.js | 25 +- contracts/Migrations.sol | 19 - migrations/1_initial_migration.js | 7 - package-lock.json | 1748 ++++++++++++++++++++++++++++- package.json | 3 +- scripts/coverage.js | 200 ++++ test/baseWallet.js | 7 +- test/tokenExchanger.js | 4 +- test/transferManager.js | 6 +- 10 files changed, 1981 insertions(+), 41 deletions(-) delete mode 100644 contracts/Migrations.sol delete mode 100644 migrations/1_initial_migration.js create mode 100644 scripts/coverage.js diff --git a/.eslintignore b/.eslintignore index f07074c00..277ae0f6c 100644 --- a/.eslintignore +++ b/.eslintignore @@ -4,4 +4,5 @@ build/* contracts/* contracts-test/* coverage/* -lib/* \ No newline at end of file +lib/* +scripts/coverage.js \ No newline at end of file diff --git a/.solcover.js b/.solcover.js index 5e0ec4b84..262ed745b 100644 --- a/.solcover.js +++ b/.solcover.js @@ -1,3 +1,26 @@ +// ganache-cli \ +// --chainId 1895 \ (core-option: _chainId) +// --networkId 1597649375983 \ (core-option: network_id) +// --gasLimit=20700000 \ (solidity-coverage sets this) +// -e 10000 \ (default_balance_ether) +// --acctKeys=\"./ganache-accounts.json\" (core-option: accounts) +// --deterministic", (maybe hd_path?) + +const ganacheAccounts = require('./ganache-accounts.json'); +let accounts = []; + +for (address of Object.keys(ganacheAccounts.private_keys)){ + accounts.push({ + privateKey: ganacheAccounts.private_keys[address], + balance: ganacheAccounts.addresses[address].account.balance + }) +} + module.exports = { - skipFiles: ['Migrations.sol'] + skipFiles: ['Migrations.sol'], + providerOptions: { + accounts: accounts, + _chainId: 1895, + network_id: 1597649375983 + } }; \ No newline at end of file diff --git a/contracts/Migrations.sol b/contracts/Migrations.sol deleted file mode 100644 index f95d6c40d..000000000 --- a/contracts/Migrations.sol +++ /dev/null @@ -1,19 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity >=0.4.21 <0.7.0; - -contract Migrations { - address public owner; - uint public last_completed_migration; - - constructor() public { - owner = msg.sender; - } - - modifier restricted() { - if (msg.sender == owner) _; - } - - function setCompleted(uint completed) public restricted { - last_completed_migration = completed; - } -} diff --git a/migrations/1_initial_migration.js b/migrations/1_initial_migration.js deleted file mode 100644 index 4d01edd3b..000000000 --- a/migrations/1_initial_migration.js +++ /dev/null @@ -1,7 +0,0 @@ -/* global artifacts */ - -const Migrations = artifacts.require("Migrations"); - -module.exports = function (deployer) { - deployer.deploy(Migrations); -}; diff --git a/package-lock.json b/package-lock.json index 790191141..eff48e08a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -705,6 +705,27 @@ "@ethersproject/strings": "^5.0.4" } }, + "@gulp-sourcemaps/map-sources": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@gulp-sourcemaps/map-sources/-/map-sources-1.0.0.tgz", + "integrity": "sha1-iQrnxdjId/bThIYCFazp1+yUW9o=", + "dev": true, + "requires": { + "normalize-path": "^2.0.1", + "through2": "^2.0.3" + }, + "dependencies": { + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "requires": { + "remove-trailing-separator": "^1.0.1" + } + } + } + }, "@nodelib/fs.scandir": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz", @@ -843,12 +864,91 @@ "defer-to-connect": "^1.0.1" } }, + "@truffle/config": { + "version": "1.2.33", + "resolved": "https://registry.npmjs.org/@truffle/config/-/config-1.2.33.tgz", + "integrity": "sha512-RUYcD/qUrks2sTz8PF+FqAqyEE9+J0M/JpLC2BG49kWxOIhJJRK28f2Noe7tosoLRDPx+nA7xzCrMaZjTiA+og==", + "dev": true, + "requires": { + "@truffle/error": "^0.0.11", + "@truffle/events": "^0.0.8", + "@truffle/provider": "^0.2.25", + "configstore": "^4.0.0", + "find-up": "^2.1.0", + "lodash.assignin": "^4.2.0", + "lodash.merge": "^4.6.2", + "module": "^1.2.5", + "original-require": "1.0.1", + "source-map-support": "^0.5.19" + }, + "dependencies": { + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + } + } + }, "@truffle/error": { "version": "0.0.11", "resolved": "https://registry.npmjs.org/@truffle/error/-/error-0.0.11.tgz", "integrity": "sha512-ju6TucjlJkfYMmdraYY/IBJaFb+Sa+huhYtOoyOJ+G29KcgytUVnDzKGwC7Kgk6IsxQMm62Mc1E0GZzFbGGipw==", "dev": true }, + "@truffle/events": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/@truffle/events/-/events-0.0.8.tgz", + "integrity": "sha512-Bm1Z4mdG87VD9tpLXh0ORQd00aFFWUk+MFqYLTn5Q1RyQmxZlo1c+6UVwpGrVAXwLbC+23BdPH7qwSBP8C+Khg==", + "dev": true, + "requires": { + "emittery": "^0.4.1", + "ora": "^3.4.0" + } + }, "@truffle/hdwallet-provider": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@truffle/hdwallet-provider/-/hdwallet-provider-1.2.0.tgz", @@ -2300,6 +2400,21 @@ "sprintf-js": "~1.0.2" } }, + "arr-diff": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", + "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", + "dev": true, + "requires": { + "arr-flatten": "^1.0.1" + } + }, + "arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "dev": true + }, "array-flatten": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", @@ -2323,6 +2438,12 @@ "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", "dev": true }, + "array-unique": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", + "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", + "dev": true + }, "array.prototype.flat": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.3.tgz", @@ -2442,6 +2563,12 @@ "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", "dev": true }, + "atob": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", + "dev": true + }, "await-semaphore": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/await-semaphore/-/await-semaphore-0.1.3.tgz", @@ -3067,6 +3194,12 @@ "integrity": "sha1-a82TsJ+y7RAl0woRVdWZeVSlNRI=", "dev": true }, + "cli-spinners": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.5.0.tgz", + "integrity": "sha512-PC+AmIuK04E6aeSs/pUccSujsTzBhu4HzC2dL+CfJB/Jcc2qTRbEwZQDfIUpt2Xl8BodYBEq8w4fc0kU2I9DjQ==", + "dev": true + }, "cli-table": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/cli-table/-/cli-table-0.3.1.tgz", @@ -3263,6 +3396,12 @@ "mimic-response": "^1.0.0" } }, + "clone-stats": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz", + "integrity": "sha1-uI+UqCzzi4eR1YBG6kAprYjKmdE=", + "dev": true + }, "code-point-at": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", @@ -3361,6 +3500,20 @@ } } }, + "configstore": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/configstore/-/configstore-4.0.0.tgz", + "integrity": "sha512-CmquAXFBocrzaSM8mtGPMM/HiWmyIpr4CcJl/rgY2uCObZ/S7cKU0silxslqJejl+t/T9HS8E0PUNQD81JGUEQ==", + "dev": true, + "requires": { + "dot-prop": "^4.1.0", + "graceful-fs": "^4.1.2", + "make-dir": "^1.0.0", + "unique-string": "^1.0.0", + "write-file-atomic": "^2.0.0", + "xdg-basedir": "^3.0.0" + } + }, "confusing-browser-globals": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/confusing-browser-globals/-/confusing-browser-globals-1.0.10.tgz", @@ -3407,6 +3560,23 @@ "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", "dev": true }, + "convert-source-map": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", + "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.1" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + } + } + }, "cookie": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", @@ -3564,6 +3734,32 @@ "randomfill": "^1.0.3" } }, + "crypto-random-string": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-1.0.0.tgz", + "integrity": "sha1-ojD2T1aDEOFJgAmUB5DsmVRbyn4=", + "dev": true + }, + "css": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/css/-/css-2.2.4.tgz", + "integrity": "sha512-oUnjmWpy0niI3x/mPL8dVEI1l7MnG3+HHyRPHf+YFSbK+svOhXpmSOcDURUh2aOCgl2grzrOPt1nHLuCVFULLw==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "source-map": "^0.6.1", + "source-map-resolve": "^0.5.2", + "urix": "^0.1.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, "d": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", @@ -3598,6 +3794,40 @@ "ms": "2.1.2" } }, + "debug-fabulous": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/debug-fabulous/-/debug-fabulous-0.0.4.tgz", + "integrity": "sha1-+gccXYdIRoVCSAdCHKSxawsaB2M=", + "dev": true, + "requires": { + "debug": "2.X", + "lazy-debug-legacy": "0.0.X", + "object-assign": "4.1.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "object-assign": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.0.tgz", + "integrity": "sha1-ejs9DpgGPUP0wD8uiubNUahog6A=", + "dev": true + } + } + }, "decamelize": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", @@ -3640,6 +3870,23 @@ "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", "dev": true }, + "defaults": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz", + "integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=", + "dev": true, + "requires": { + "clone": "^1.0.2" + }, + "dependencies": { + "clone": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=", + "dev": true + } + } + }, "defer-to-connect": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz", @@ -3697,6 +3944,12 @@ "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=", "dev": true }, + "detect-newline": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-2.1.0.tgz", + "integrity": "sha1-9B8cEL5LAOh7XxPaaAdZ8sW/0+I=", + "dev": true + }, "detect-port": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/detect-port/-/detect-port-1.3.0.tgz", @@ -3773,6 +4026,15 @@ "integrity": "sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w==", "dev": true }, + "dot-prop": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.1.tgz", + "integrity": "sha512-l0p4+mIuJIua0mhxGoh4a+iNL9bmeK5DvnSVQa6T0OhrVmaEa1XScX5Etc673FePCJOArq/4Pa2cLGODUWTPOQ==", + "dev": true, + "requires": { + "is-obj": "^1.0.0" + } + }, "dotenv": { "version": "8.2.0", "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.2.0.tgz", @@ -3796,6 +4058,50 @@ "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=", "dev": true }, + "duplexify": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", + "integrity": "sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==", + "dev": true, + "requires": { + "end-of-stream": "^1.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.0.0", + "stream-shift": "^1.0.0" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, "ecc-jsbn": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", @@ -3833,6 +4139,12 @@ } } }, + "emittery": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.4.1.tgz", + "integrity": "sha512-r4eRSeStEGf6M5SKdrQhhLK5bOwOBxQhIE3YSTnZE3GpKiLfnnhE+tPtrJE79+eDJgm39BM6LSoI8SCx4HbwlQ==", + "dev": true + }, "emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", @@ -5512,6 +5824,63 @@ "strip-final-newline": "^2.0.0" } }, + "expand-brackets": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", + "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", + "dev": true, + "requires": { + "is-posix-bracket": "^0.1.0" + } + }, + "expand-range": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", + "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", + "dev": true, + "requires": { + "fill-range": "^2.1.0" + }, + "dependencies": { + "fill-range": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.4.tgz", + "integrity": "sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q==", + "dev": true, + "requires": { + "is-number": "^2.1.0", + "isobject": "^2.0.0", + "randomatic": "^3.0.0", + "repeat-element": "^1.1.2", + "repeat-string": "^1.5.2" + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, + "is-number": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", + "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, "express": { "version": "4.17.1", "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz", @@ -5596,6 +5965,15 @@ "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", "dev": true }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, "external-editor": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", @@ -5606,13 +5984,30 @@ "tmp": "^0.0.33" } }, - "extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", - "dev": true - }, - "fake-merkle-patricia-tree": { + "extglob": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", + "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", + "dev": true, + "requires": { + "is-extglob": "^1.0.0" + }, + "dependencies": { + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "dev": true + } + } + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", + "dev": true + }, + "fake-merkle-patricia-tree": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/fake-merkle-patricia-tree/-/fake-merkle-patricia-tree-1.0.1.tgz", "integrity": "sha1-S4w6z7Ugr635hgsfFM2M40As3dM=", @@ -5722,6 +6117,12 @@ "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", "dev": true }, + "filename-regex": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", + "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=", + "dev": true + }, "fill-range": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", @@ -5782,6 +6183,12 @@ "semver-regex": "^2.0.0" } }, + "first-chunk-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/first-chunk-stream/-/first-chunk-stream-1.0.0.tgz", + "integrity": "sha1-Wb+1DNkF9g18OUzT2ayqtOatk04=", + "dev": true + }, "flat": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.1.tgz", @@ -5833,6 +6240,21 @@ "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==", "dev": true }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "dev": true + }, + "for-own": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", + "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", + "dev": true, + "requires": { + "for-in": "^1.0.1" + } + }, "forever-agent": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", @@ -6781,6 +7203,42 @@ "path-is-absolute": "^1.0.0" } }, + "glob-base": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", + "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", + "dev": true, + "requires": { + "glob-parent": "^2.0.0", + "is-glob": "^2.0.0" + }, + "dependencies": { + "glob-parent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", + "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", + "dev": true, + "requires": { + "is-glob": "^2.0.0" + } + }, + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "dev": true + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "requires": { + "is-extglob": "^1.0.0" + } + } + } + }, "glob-parent": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", @@ -6790,6 +7248,150 @@ "is-glob": "^4.0.1" } }, + "glob-stream": { + "version": "5.3.5", + "resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-5.3.5.tgz", + "integrity": "sha1-pVZlqajM3EGRWofHAeMtTgFvrSI=", + "dev": true, + "requires": { + "extend": "^3.0.0", + "glob": "^5.0.3", + "glob-parent": "^3.0.0", + "micromatch": "^2.3.7", + "ordered-read-streams": "^0.3.0", + "through2": "^0.6.0", + "to-absolute-glob": "^0.1.1", + "unique-stream": "^2.0.2" + }, + "dependencies": { + "braces": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", + "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", + "dev": true, + "requires": { + "expand-range": "^1.8.1", + "preserve": "^0.2.0", + "repeat-element": "^1.1.2" + } + }, + "glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "dev": true, + "requires": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "requires": { + "is-extglob": "^2.1.0" + } + }, + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + }, + "micromatch": { + "version": "2.3.11", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", + "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", + "dev": true, + "requires": { + "arr-diff": "^2.0.0", + "array-unique": "^0.2.1", + "braces": "^1.8.2", + "expand-brackets": "^0.1.4", + "extglob": "^0.3.1", + "filename-regex": "^2.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.1", + "kind-of": "^3.0.2", + "normalize-path": "^2.0.1", + "object.omit": "^2.0.0", + "parse-glob": "^3.0.4", + "regex-cache": "^0.4.2" + }, + "dependencies": { + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "dev": true + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "requires": { + "is-extglob": "^1.0.0" + } + } + } + }, + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "requires": { + "remove-trailing-separator": "^1.0.1" + } + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + }, + "through2": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", + "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", + "dev": true, + "requires": { + "readable-stream": ">=1.0.33-1 <1.1.0-0", + "xtend": ">=4.0.0 <4.1.0-0" + } + } + } + }, "global": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/global/-/global-4.3.2.tgz", @@ -6906,6 +7508,48 @@ "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", "dev": true }, + "gulp-sourcemaps": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/gulp-sourcemaps/-/gulp-sourcemaps-1.12.1.tgz", + "integrity": "sha1-tDfR89mAzyboEYSCNxjOFa5ll7Y=", + "dev": true, + "requires": { + "@gulp-sourcemaps/map-sources": "1.X", + "acorn": "4.X", + "convert-source-map": "1.X", + "css": "2.X", + "debug-fabulous": "0.0.X", + "detect-newline": "2.X", + "graceful-fs": "4.X", + "source-map": "~0.6.0", + "strip-bom": "2.X", + "through2": "2.X", + "vinyl": "1.X" + }, + "dependencies": { + "acorn": { + "version": "4.0.13", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz", + "integrity": "sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c=", + "dev": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, + "requires": { + "is-utf8": "^0.2.0" + } + } + } + }, "handlebars": { "version": "4.7.6", "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.6.tgz", @@ -6951,6 +7595,15 @@ "function-bind": "^1.1.1" } }, + "has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, "has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", @@ -7356,6 +8009,12 @@ "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", "dev": true }, + "invert-kv": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", + "dev": true + }, "ipaddr.js": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", @@ -7414,6 +8073,27 @@ "integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=", "dev": true }, + "is-dotfile": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", + "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=", + "dev": true + }, + "is-equal-shallow": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", + "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", + "dev": true, + "requires": { + "is-primitive": "^2.0.0" + } + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true + }, "is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -7491,6 +8171,18 @@ "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", "dev": true }, + "is-posix-bracket": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", + "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=", + "dev": true + }, + "is-primitive": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", + "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=", + "dev": true + }, "is-regex": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.1.tgz", @@ -7543,6 +8235,18 @@ "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", "dev": true }, + "is-utf8": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", + "dev": true + }, + "is-valid-glob": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/is-valid-glob/-/is-valid-glob-0.3.0.tgz", + "integrity": "sha1-1LVcafUYhvm2XHDWwmItN+KfSP4=", + "dev": true + }, "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", @@ -7554,6 +8258,15 @@ "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", "dev": true }, + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "requires": { + "isarray": "1.0.0" + } + }, "isstream": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", @@ -7798,6 +8511,62 @@ "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", "dev": true }, + "lazy-debug-legacy": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/lazy-debug-legacy/-/lazy-debug-legacy-0.0.1.tgz", + "integrity": "sha1-U3cWwHduTPeePtG2IfdljCkRsbE=", + "dev": true + }, + "lazystream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.0.tgz", + "integrity": "sha1-9plf4PggOS9hOWvolGJAe7dxaOQ=", + "dev": true, + "requires": { + "readable-stream": "^2.0.5" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "lcid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "dev": true, + "requires": { + "invert-kv": "^1.0.0" + } + }, "level-codec": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/level-codec/-/level-codec-7.0.1.tgz", @@ -8120,6 +8889,30 @@ "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", "dev": true }, + "lodash._reinterpolate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz", + "integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=", + "dev": true + }, + "lodash.assign": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-4.2.0.tgz", + "integrity": "sha1-DZnzzNem0mHRm9rrkkUAXShYCOc=", + "dev": true + }, + "lodash.assignin": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.assignin/-/lodash.assignin-4.2.0.tgz", + "integrity": "sha1-uo31+4QesKPoBEIysOJjqNxqKKI=", + "dev": true + }, + "lodash.assigninwith": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.assigninwith/-/lodash.assigninwith-4.2.0.tgz", + "integrity": "sha1-rwLJhDKshtk9ppW0voAUAZcXNq8=", + "dev": true + }, "lodash.flatmap": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.flatmap/-/lodash.flatmap-4.5.0.tgz", @@ -8132,12 +8925,59 @@ "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=", "dev": true }, + "lodash.keys": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-4.2.0.tgz", + "integrity": "sha1-oIYCrBLk+4P5H8H7ejYKTZujUgU=", + "dev": true + }, + "lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, + "lodash.rest": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/lodash.rest/-/lodash.rest-4.0.5.tgz", + "integrity": "sha1-lU73UEkmIDjJbR/Jiyj9r58Hcqo=", + "dev": true + }, + "lodash.template": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-4.2.4.tgz", + "integrity": "sha1-0FPBno50442WW/T7SV2A8Qnn96Q=", + "dev": true, + "requires": { + "lodash._reinterpolate": "~3.0.0", + "lodash.assigninwith": "^4.0.0", + "lodash.keys": "^4.0.0", + "lodash.rest": "^4.0.0", + "lodash.templatesettings": "^4.0.0", + "lodash.tostring": "^4.0.0" + } + }, + "lodash.templatesettings": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-4.2.0.tgz", + "integrity": "sha512-stgLz+i3Aa9mZgnjr/O+v9ruKZsPsndy7qPZOchbqk2cnTU1ZaldKK+v7m54WoKIyxiuMZTKT2H81F8BeAc3ZQ==", + "dev": true, + "requires": { + "lodash._reinterpolate": "^3.0.0" + } + }, "lodash.toarray": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/lodash.toarray/-/lodash.toarray-4.4.0.tgz", "integrity": "sha1-JMS/zWsvuji/0FlNsRedjptlZWE=", "dev": true }, + "lodash.tostring": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/lodash.tostring/-/lodash.tostring-4.1.4.tgz", + "integrity": "sha1-Vgwn0fjq3eA8LM4Zj+9cAx2CmPs=", + "dev": true + }, "log-symbols": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.0.0.tgz", @@ -8265,12 +9105,35 @@ "integrity": "sha1-81ypHEk/e3PaDgdJUwTxezH4fuU=", "dev": true }, + "make-dir": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", + "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", + "dev": true, + "requires": { + "pify": "^3.0.0" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } + } + }, "make-error": { "version": "1.3.6", "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", "dev": true }, + "map-stream": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.0.6.tgz", + "integrity": "sha1-0u9OuBGihkTHqJiZhcacL91JaCc=", + "dev": true + }, "markdown-table": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-1.1.3.tgz", @@ -8305,6 +9168,12 @@ } } }, + "math-random": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/math-random/-/math-random-1.0.4.tgz", + "integrity": "sha512-rUxjysqif/BZQH2yhd5Aaq7vXMSx9NdEsQcyA07uEzIvxgI7zIr33gGsh+RU0/XjmQpCW7RsVof1vlkvQVCK5A==", + "dev": true + }, "md5": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/md5/-/md5-2.3.0.tgz", @@ -8788,6 +9657,244 @@ "integrity": "sha512-DD0vOdofJdoaRNtnWcrXe6RQbpHkPPmtqGq14uRX0F8ZKJ5nv89CVTYl/BZdppDxBDaV0hl75htg3abpEWlPZA==", "dev": true }, + "module": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/module/-/module-1.2.5.tgz", + "integrity": "sha1-tQPrBs3BNHP1aBhCaXTN5+xZvxU=", + "dev": true, + "requires": { + "chalk": "1.1.3", + "concat-stream": "1.5.1", + "lodash.template": "4.2.4", + "map-stream": "0.0.6", + "tildify": "1.2.0", + "vinyl-fs": "2.4.3", + "yargs": "4.6.0" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "camelcase": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", + "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "cliui": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", + "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "dev": true, + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wrap-ansi": "^2.0.0" + } + }, + "concat-stream": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.5.1.tgz", + "integrity": "sha1-87gKz54fSOOHXAaItBtsMWAu6hw=", + "dev": true, + "requires": { + "inherits": "~2.0.1", + "readable-stream": "~2.0.0", + "typedarray": "~0.0.5" + } + }, + "find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "dev": true, + "requires": { + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "load-json-file": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" + } + }, + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "dev": true, + "requires": { + "error-ex": "^1.2.0" + } + }, + "path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "dev": true, + "requires": { + "pinkie-promise": "^2.0.0" + } + }, + "path-type": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "process-nextick-args": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=", + "dev": true + }, + "read-pkg": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "dev": true, + "requires": { + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" + } + }, + "read-pkg-up": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", + "dev": true, + "requires": { + "find-up": "^1.0.0", + "read-pkg": "^1.0.0" + } + }, + "readable-stream": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", + "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "~1.0.0", + "process-nextick-args": "~1.0.6", + "string_decoder": "~0.10.x", + "util-deprecate": "~1.0.1" + } + }, + "require-main-filename": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", + "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", + "dev": true + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, + "requires": { + "is-utf8": "^0.2.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + }, + "wrap-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "dev": true, + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" + } + }, + "y18n": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", + "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", + "dev": true + }, + "yargs": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-4.6.0.tgz", + "integrity": "sha1-y0BQwBWb+2u2ScD0r1UFJqhGGdw=", + "dev": true, + "requires": { + "camelcase": "^2.0.1", + "cliui": "^3.2.0", + "decamelize": "^1.1.1", + "lodash.assign": "^4.0.3", + "os-locale": "^1.4.0", + "pkg-conf": "^1.1.2", + "read-pkg-up": "^1.0.1", + "require-main-filename": "^1.0.1", + "string-width": "^1.0.1", + "window-size": "^0.2.0", + "y18n": "^3.2.1", + "yargs-parser": "^2.4.0" + } + }, + "yargs-parser": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-2.4.1.tgz", + "integrity": "sha1-hVaN488VD/SfpRgl8DqMiA3cxcQ=", + "dev": true, + "requires": { + "camelcase": "^3.0.0", + "lodash.assign": "^4.0.6" + }, + "dependencies": { + "camelcase": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", + "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", + "dev": true + } + } + } + } + }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -9088,6 +10195,16 @@ "es-abstract": "^1.17.0-next.1" } }, + "object.omit": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", + "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", + "dev": true, + "requires": { + "for-own": "^0.1.4", + "is-extendable": "^0.1.1" + } + }, "object.values": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.1.tgz", @@ -9160,12 +10277,160 @@ "word-wrap": "~1.2.3" } }, + "ora": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/ora/-/ora-3.4.0.tgz", + "integrity": "sha512-eNwHudNbO1folBP3JsZ19v9azXWtQZjICdr3Q0TDPIaeBQ3mXLrh54wM+er0+hSp+dWKf+Z8KM58CYzEyIYxYg==", + "dev": true, + "requires": { + "chalk": "^2.4.2", + "cli-cursor": "^2.1.0", + "cli-spinners": "^2.0.0", + "log-symbols": "^2.2.0", + "strip-ansi": "^5.2.0", + "wcwidth": "^1.0.1" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "cli-cursor": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", + "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", + "dev": true, + "requires": { + "restore-cursor": "^2.0.0" + } + }, + "log-symbols": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", + "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==", + "dev": true, + "requires": { + "chalk": "^2.0.1" + } + }, + "mimic-fn": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", + "dev": true + }, + "onetime": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", + "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", + "dev": true, + "requires": { + "mimic-fn": "^1.0.0" + } + }, + "restore-cursor": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", + "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", + "dev": true, + "requires": { + "onetime": "^2.0.0", + "signal-exit": "^3.0.2" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "ordered-read-streams": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-0.3.0.tgz", + "integrity": "sha1-cTfmmzKYuzQiR6G77jiByA4v14s=", + "dev": true, + "requires": { + "is-stream": "^1.0.1", + "readable-stream": "^2.0.1" + }, + "dependencies": { + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, "original-require": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/original-require/-/original-require-1.0.1.tgz", "integrity": "sha1-DxMEcVhM0zURxew4yNWSE/msXiA=", "dev": true }, + "os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", + "dev": true + }, + "os-locale": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", + "dev": true, + "requires": { + "lcid": "^1.0.0" + } + }, "os-tmpdir": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", @@ -9253,6 +10518,35 @@ "integrity": "sha1-juqz5U+laSD+Fro493+iGqzC104=", "dev": true }, + "parse-glob": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", + "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", + "dev": true, + "requires": { + "glob-base": "^0.3.0", + "is-dotfile": "^1.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.0" + }, + "dependencies": { + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "dev": true + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "requires": { + "is-extglob": "^1.0.0" + } + } + } + }, "parse-headers": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/parse-headers/-/parse-headers-2.0.3.tgz", @@ -9277,6 +10571,12 @@ "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", "dev": true }, + "path-dirname": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", + "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", + "dev": true + }, "path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -9356,6 +10656,85 @@ "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", "dev": true }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", + "dev": true + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "dev": true, + "requires": { + "pinkie": "^2.0.0" + } + }, + "pkg-conf": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-1.1.3.tgz", + "integrity": "sha1-N45W1v0T6Iv7b0ol33qD+qvduls=", + "dev": true, + "requires": { + "find-up": "^1.0.0", + "load-json-file": "^1.1.0", + "object-assign": "^4.0.1", + "symbol": "^0.2.1" + }, + "dependencies": { + "find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "dev": true, + "requires": { + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "load-json-file": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" + } + }, + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "dev": true, + "requires": { + "error-ex": "^1.2.0" + } + }, + "path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "dev": true, + "requires": { + "pinkie-promise": "^2.0.0" + } + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, + "requires": { + "is-utf8": "^0.2.0" + } + } + } + }, "pkg-dir": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", @@ -9392,6 +10771,12 @@ "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", "dev": true }, + "preserve": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", + "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=", + "dev": true + }, "prettier": { "version": "1.19.1", "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.19.1.tgz", @@ -9530,6 +10915,25 @@ "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=" }, + "randomatic": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-3.1.1.tgz", + "integrity": "sha512-TuDE5KxZ0J461RVjrJZCJc+J+zCkTb1MbH9AQUq68sMhOMcy9jLcb3BrZKgp9q9Ncltdg4QVqWrH02W2EFFVYw==", + "dev": true, + "requires": { + "is-number": "^4.0.0", + "kind-of": "^6.0.0", + "math-random": "^1.0.1" + }, + "dependencies": { + "is-number": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", + "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", + "dev": true + } + } + }, "randombytes": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", @@ -9711,12 +11115,45 @@ "integrity": "sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew==", "dev": true }, + "regex-cache": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", + "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", + "dev": true, + "requires": { + "is-equal-shallow": "^0.1.3" + } + }, "regexpp": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", "dev": true }, + "remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", + "dev": true + }, + "repeat-element": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", + "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==", + "dev": true + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "dev": true + }, + "replace-ext": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz", + "integrity": "sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ=", + "dev": true + }, "req-cwd": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/req-cwd/-/req-cwd-2.0.0.tgz", @@ -9843,6 +11280,12 @@ "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "dev": true }, + "resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", + "dev": true + }, "responselike": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", @@ -10673,6 +12116,19 @@ "amdefine": ">=0.0.4" } }, + "source-map-resolve": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", + "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", + "dev": true, + "requires": { + "atob": "^2.1.2", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, "source-map-support": { "version": "0.5.19", "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", @@ -10691,6 +12147,12 @@ } } }, + "source-map-url": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", + "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", + "dev": true + }, "spdx-correct": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", @@ -10758,6 +12220,12 @@ "integrity": "sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks=", "dev": true }, + "stream-shift": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.1.tgz", + "integrity": "sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==", + "dev": true + }, "strict-uri-encode": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", @@ -10834,6 +12302,27 @@ "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", "dev": true }, + "strip-bom-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-bom-stream/-/strip-bom-stream-1.0.0.tgz", + "integrity": "sha1-5xRDmFd9Uaa+0PoZlPoF9D/ZiO4=", + "dev": true, + "requires": { + "first-chunk-stream": "^1.0.0", + "strip-bom": "^2.0.0" + }, + "dependencies": { + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, + "requires": { + "is-utf8": "^0.2.0" + } + } + } + }, "strip-eof": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", @@ -10974,6 +12463,12 @@ } } }, + "symbol": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/symbol/-/symbol-0.2.3.tgz", + "integrity": "sha1-O5hzuKkB5Hxu/iFSajrDcu8ou8c=", + "dev": true + }, "sync-request": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/sync-request/-/sync-request-6.1.0.tgz", @@ -11122,6 +12617,67 @@ "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" }, + "through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "dev": true, + "requires": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "through2-filter": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/through2-filter/-/through2-filter-2.0.0.tgz", + "integrity": "sha1-YLxVoNrLdghdsfna6Zq0P4PWIuw=", + "dev": true, + "requires": { + "through2": "~2.0.0", + "xtend": "~4.0.0" + } + }, + "tildify": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/tildify/-/tildify-1.2.0.tgz", + "integrity": "sha1-3OwD9V3Km3qj5bBPIYF+tW5jWIo=", + "dev": true, + "requires": { + "os-homedir": "^1.0.0" + } + }, "timed-out": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", @@ -11136,6 +12692,15 @@ "os-tmpdir": "~1.0.2" } }, + "to-absolute-glob": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/to-absolute-glob/-/to-absolute-glob-0.1.1.tgz", + "integrity": "sha1-HN+kcqnvUMI57maZm2YsoOs5k38=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1" + } + }, "to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", @@ -11433,6 +12998,37 @@ "integrity": "sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg==", "dev": true }, + "unique-stream": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/unique-stream/-/unique-stream-2.3.1.tgz", + "integrity": "sha512-2nY4TnBE70yoxHkDli7DMazpWiP7xMdCYqU2nBRO0UB+ZpEkGsSija7MvmvnZFUeC+mrgiUfcHSr3LmRFIg4+A==", + "dev": true, + "requires": { + "json-stable-stringify-without-jsonify": "^1.0.1", + "through2-filter": "^3.0.0" + }, + "dependencies": { + "through2-filter": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/through2-filter/-/through2-filter-3.0.0.tgz", + "integrity": "sha512-jaRjI2WxN3W1V8/FMZ9HKIBXixtiqs3SQSX4/YGIiP3gL6djW48VoZq9tDqeCWs3MT8YY5wb/zli8VW8snY1CA==", + "dev": true, + "requires": { + "through2": "~2.0.0", + "xtend": "~4.0.0" + } + } + } + }, + "unique-string": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-1.0.0.tgz", + "integrity": "sha1-nhBXzKhRq7kzmPizOuGHuZyuwRo=", + "dev": true, + "requires": { + "crypto-random-string": "^1.0.0" + } + }, "universalify": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", @@ -11453,6 +13049,12 @@ "punycode": "^2.1.0" } }, + "urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", + "dev": true + }, "url": { "version": "0.10.3", "resolved": "https://registry.npmjs.org/url/-/url-0.10.3.tgz", @@ -11534,6 +13136,12 @@ "integrity": "sha512-gTpR5XQNKFwOd4clxfnhaqvfqMpqEwr4tOtCyz4MtYZX2JYhfr1JvBFKdS+7K/9rfpZR3VLX+YWBbKoxCgS43Q==", "dev": true }, + "vali-date": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/vali-date/-/vali-date-1.0.0.tgz", + "integrity": "sha1-G5BKWWCfsyjvB4E4Qgk09rhnCaY=", + "dev": true + }, "validate-npm-package-license": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", @@ -11567,6 +13175,109 @@ "extsprintf": "^1.2.0" } }, + "vinyl": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-1.2.0.tgz", + "integrity": "sha1-XIgDbPVl5d8FVYv8kR+GVt8hiIQ=", + "dev": true, + "requires": { + "clone": "^1.0.0", + "clone-stats": "^0.0.1", + "replace-ext": "0.0.1" + }, + "dependencies": { + "clone": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=", + "dev": true + } + } + }, + "vinyl-fs": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-2.4.3.tgz", + "integrity": "sha1-PZflYuv91LZpId6nBia4S96dLQc=", + "dev": true, + "requires": { + "duplexify": "^3.2.0", + "glob-stream": "^5.3.2", + "graceful-fs": "^4.0.0", + "gulp-sourcemaps": "^1.5.2", + "is-valid-glob": "^0.3.0", + "lazystream": "^1.0.0", + "lodash.isequal": "^4.0.0", + "merge-stream": "^1.0.0", + "mkdirp": "^0.5.0", + "object-assign": "^4.0.0", + "readable-stream": "^2.0.4", + "strip-bom": "^2.0.0", + "strip-bom-stream": "^1.0.0", + "through2": "^2.0.0", + "through2-filter": "^2.0.0", + "vali-date": "^1.0.0", + "vinyl": "^1.0.0" + }, + "dependencies": { + "merge-stream": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-1.0.1.tgz", + "integrity": "sha1-QEEgLVCKNCugAXQAjfDCUbjBNeE=", + "dev": true, + "requires": { + "readable-stream": "^2.0.1" + } + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, + "requires": { + "is-utf8": "^0.2.0" + } + } + } + }, + "wcwidth": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", + "integrity": "sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g=", + "dev": true, + "requires": { + "defaults": "^1.0.3" + } + }, "web3": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/web3/-/web3-1.3.0.tgz", @@ -12004,6 +13715,12 @@ "string-width": "^1.0.2 || 2" } }, + "window-size": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.2.0.tgz", + "integrity": "sha1-tDFbtCFKPXBY6+7okuE/ok2YsHU=", + "dev": true + }, "word-wrap": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", @@ -12106,11 +13823,28 @@ "mkdirp": "^0.5.1" } }, + "write-file-atomic": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.3.tgz", + "integrity": "sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.11", + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.2" + } + }, "ws": { "version": "7.2.3", "resolved": "https://registry.npmjs.org/ws/-/ws-7.2.3.tgz", "integrity": "sha512-HTDl9G9hbkNDk98naoR/cHDws7+EyYMOdL1BmjsZXRUjf7d+MficC4B7HLUPlSiho0vg+CWKrGIt/VJBd1xunQ==" }, + "xdg-basedir": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-3.0.0.tgz", + "integrity": "sha1-SWsswQnsqNus/i3HK2A8F8WHCtQ=", + "dev": true + }, "xhr": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/xhr/-/xhr-2.5.0.tgz", diff --git a/package.json b/package.json index ccf9260f9..07f385a86 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "test": "npx truffle test", "ctest": "npm run compile && npm run test", "provision:lib:artefacts": "bash ./scripts/provision_lib_artefacts.sh", - "test:coverage": "npx truffle run coverage && istanbul check-coverage --statements 94 --branches 83 --functions 96 --lines 94", + "test:coverage": "node scripts/coverage.js && istanbul check-coverage --statements 94 --branches 83 --functions 96 --lines 94", "lint:js": "eslint .", "lint:contracts": "npx solhint contracts/**/*.sol && npx solhint contracts/**/**/*.sol", "test:deployment": "./scripts/deploy.sh --no-compile development `seq 1 6`", @@ -73,6 +73,7 @@ "devDependencies": { "-": "0.0.1", "@codechecks/client": "^0.1.10", + "@truffle/config": "^1.2.33", "@truffle/hdwallet-provider": "^1.2.0", "bn-chai": "^1.0.1", "bn.js": "^5.1.3", diff --git a/scripts/coverage.js b/scripts/coverage.js new file mode 100644 index 000000000..43afb2e4f --- /dev/null +++ b/scripts/coverage.js @@ -0,0 +1,200 @@ +#!/usr/bin/env node + +const API = require('solidity-coverage/api'); +const utils = require('solidity-coverage/utils'); +const truffleUtils = require('solidity-coverage/plugins/resources/truffle.utils'); +const PluginUI = require('solidity-coverage/plugins/resources/truffle.ui'); +const pkg = require('solidity-coverage/package.json'); +const TruffleConfig = require('@truffle/config'); +const death = require('death'); +const path = require('path'); +const shell = require('shelljs'); + +async function coverage(){ + let ui; + let api; + let error; + let truffle; + let config; + let tempArtifactsDir; + let tempContractsDir; + const defaultConfigName = "truffle-config.js"; + + try { + death(utils.finish.bind(null, config, api)); // Catch interrupt signals + // ======= + // Configs + // ======= + const configs = [ + "truffle-config-lib.js", + "truffle-config-infrastructure-0.5.js", + "truffle-config-infrastructure.js", + "truffle-config-modules.js", + "truffle-config-wallet.js", + //"truffle-config-contracts-legacy-1.6.js", // (Takes forever?) + "truffle-config-contracts-test.js" + ] + + function initializeForConfigFile(configFile){ + const configJS = require(path.join(process.cwd(), configFile)); + const truffleConfig = (new TruffleConfig()).with(configJS) + + config = truffleUtils.normalizeConfig(truffleConfig); + } + + initializeForConfigFile(defaultConfigName); + api = new API(utils.loadSolcoverJS(config)); + truffle = truffleUtils.loadLibrary(config); + + for (configFile of configs){ + + initializeForConfigFile(configFile); + + // ===================== + // Instrument Contracts + // ===================== + const skipFiles = api.skipFiles || []; + + let { + targets, + skipped + } = utils.assembleFiles(config, skipFiles); + + targets = api.instrument(targets); + utils.reportSkipped(config, skipped); + + // ================================= + // Filesys and compile configuration + // ================================= + ({ + tempArtifactsDir, + tempContractsDir + } = utils.getTempLocations(config)); + + // Only make the artifacts directory once. + if (!shell.test('-e', tempArtifactsDir)){ + shell.mkdir(tempArtifactsDir); + } + + // Delete temp contracts dirs if they're left over after a crash. + if (shell.test('-e', tempContractsDir)){ + shell.rm('-Rf', tempContractsDir); + } + + shell.mkdir(tempContractsDir); + + utils.save(targets, config.contracts_directory, tempContractsDir); + utils.save(skipped, config.contracts_directory, tempContractsDir); + + config.contracts_directory = tempContractsDir; + config.build_directory = tempArtifactsDir; + + config.contracts_build_directory = path.join( + tempArtifactsDir, + path.basename(config.contracts_build_directory) + ); + + config.all = true; + config.compilers.solc.settings.optimizer.enabled = false; + config.compilers.solc.docker = false; + + // ======== + // Compile + // ======== + await truffle.contracts.compile(config); + + // Clean up after partial compilation + shell.rm('-Rf', tempContractsDir); + } + + // Final config before server launch & test + initializeForConfigFile(defaultConfigName); + + ({ + tempArtifactsDir, + tempContractsDir + } = utils.getTempLocations(config)); + + config.build_directory = tempArtifactsDir; + config.contracts_build_directory = path.join( + tempArtifactsDir, + path.basename(config.contracts_build_directory) + ); + + // Copy Uniswap pre-compiles into temp build folder + const exchangePath = path.join(process.cwd(), 'lib/uniswap/UniswapExchange.json') + const factoryPath = path.join(process.cwd(), 'lib/uniswap/UniswapFactory.json') + shell.cp(exchangePath, config.contracts_build_directory); + shell.cp(factoryPath, config.contracts_build_directory); + + config.compileNone = true; // Do *not* let Truffle compile anything else. + config.network = 'development' // Use regular test network (8545) + + truffleUtils.setNetwork(config, api); + + // ======== + // Ganache + // ======== + const client = api.client || truffle.ganache; + const address = await api.ganache(client); + + const accountsRequest = await utils.getAccountsGanache(api.server.provider); + const nodeInfoRequest = await utils.getNodeInfoGanache(api.server.provider); + const ganacheVersion = nodeInfoRequest.result.split('/')[1]; + + truffleUtils.setNetworkFrom(config, accountsRequest.result); + + ui = new PluginUI(config.logger.log); + + // Version Info + ui.report('versions', [ + truffle.version, + ganacheVersion, + pkg.version + ]); + + // Exit if --version + if (config.version) return await utils.finish(config, api); + + ui.report('network', [ + config.network, + config.networks[config.network].network_id, + config.networks[config.network].port + ]); + + // ============== + // Test + // ============== + config.test_files = await truffleUtils.getTestFilePaths(config); + // Run tests + try { + failures = await truffle.test.run(config) + } catch (e) { + error = e.stack; + } + + // ======== + // Istanbul + // ======== + await api.report(); + + } catch(e){ + error = e; + } + + // ==== + // Exit + // ==== + await utils.finish(config, api); + + if (error !== undefined) throw error; + if (failures > 0) throw new Error(ui.generate('tests-fail', [failures])); +} + +// Run coverage +coverage() + .then(() => process.exit(0)) + .catch(err => { + console.log(err); + process.exit(err) + }); diff --git a/test/baseWallet.js b/test/baseWallet.js index e591267d0..f8dc2cb85 100644 --- a/test/baseWallet.js +++ b/test/baseWallet.js @@ -4,8 +4,11 @@ const truffleAssert = require("truffle-assertions"); const Proxy = artifacts.require("Proxy"); const BaseWallet = artifacts.require("BaseWallet"); -const OldWalletV16 = require("../build-legacy/v1.6.0/BaseWallet"); -const OldWalletV13 = require("../build-legacy/v1.3.0/BaseWallet"); + +// const OldWalletV16 = require("../build-legacy/v1.6.0/BaseWallet"); +// const OldWalletV13 = require("../build-legacy/v1.3.0/BaseWallet"); +let OldWalletV13; +let OldWalletV16; const VersionManager = artifacts.require("VersionManager"); const Registry = artifacts.require("ModuleRegistry"); diff --git a/test/tokenExchanger.js b/test/tokenExchanger.js index 8a204b3a3..7f1eddff0 100644 --- a/test/tokenExchanger.js +++ b/test/tokenExchanger.js @@ -32,7 +32,9 @@ const ModuleRegistry = artifacts.require("ModuleRegistry"); const DexRegistry = artifacts.require("DexRegistry"); const Proxy = artifacts.require("Proxy"); const BaseWallet = artifacts.require("BaseWallet"); -const OldWallet = require("../build-legacy/v1.3.0/BaseWallet"); + +// const OldWallet = require("../build-legacy/v1.3.0/BaseWallet"); +let OldWallet; const GuardianStorage = artifacts.require("GuardianStorage"); const LockStorage = artifacts.require("LockStorage"); diff --git a/test/transferManager.js b/test/transferManager.js index dc372315d..642be8b54 100644 --- a/test/transferManager.js +++ b/test/transferManager.js @@ -21,8 +21,10 @@ const TokenPriceRegistry = artifacts.require("TokenPriceRegistry"); const RelayerManager = artifacts.require("RelayerManager"); const TransferManager = artifacts.require("TransferManager"); -const LegacyTransferManager = require("../build-legacy/v1.6.0/TransferManager"); -const LegacyTokenPriceProvider = require("../build-legacy/v1.6.0/TokenPriceProvider"); +// const LegacyTransferManager = require("../build-legacy/v1.6.0/TransferManager"); +// const LegacyTokenPriceProvider = require("../build-legacy/v1.6.0/TokenPriceProvider"); +let LegacyTransferManager; +let LegacyTokenPriceProvider; const ERC20 = artifacts.require("TestERC20"); const WETH = artifacts.require("WETH9"); From 700ddf5c247637ffd45756584b373e888356d5c9 Mon Sep 17 00:00:00 2001 From: cgewecke Date: Wed, 18 Nov 2020 22:48:42 -0800 Subject: [PATCH 096/113] Make sure coverage uses same ganache version as regular tests --- .solcover.js | 1 + 1 file changed, 1 insertion(+) diff --git a/.solcover.js b/.solcover.js index 262ed745b..7f14fc8a4 100644 --- a/.solcover.js +++ b/.solcover.js @@ -17,6 +17,7 @@ for (address of Object.keys(ganacheAccounts.private_keys)){ } module.exports = { + client: require('ganache-cli'), skipFiles: ['Migrations.sol'], providerOptions: { accounts: accounts, From 7c6c883ffffcb5ed01fb8974ed30d95395264a6b Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Thu, 19 Nov 2020 16:48:20 +0200 Subject: [PATCH 097/113] Update .solcover options for ganache --- .solcover.js | 25 ++++--------------------- 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/.solcover.js b/.solcover.js index 7f14fc8a4..152981e25 100644 --- a/.solcover.js +++ b/.solcover.js @@ -1,27 +1,10 @@ -// ganache-cli \ -// --chainId 1895 \ (core-option: _chainId) -// --networkId 1597649375983 \ (core-option: network_id) -// --gasLimit=20700000 \ (solidity-coverage sets this) -// -e 10000 \ (default_balance_ether) -// --acctKeys=\"./ganache-accounts.json\" (core-option: accounts) -// --deterministic", (maybe hd_path?) - -const ganacheAccounts = require('./ganache-accounts.json'); -let accounts = []; - -for (address of Object.keys(ganacheAccounts.private_keys)){ - accounts.push({ - privateKey: ganacheAccounts.private_keys[address], - balance: ganacheAccounts.addresses[address].account.balance - }) -} - module.exports = { client: require('ganache-cli'), - skipFiles: ['Migrations.sol'], + skipFiles: [], providerOptions: { - accounts: accounts, _chainId: 1895, - network_id: 1597649375983 + network_id: 1597649375983, + account_keys_path: "./ganache-accounts.json", + default_balance_ether: 10000 } }; \ No newline at end of file From 4096d7b3e80ed807473e49b67b698af0d43acd0a Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Thu, 19 Nov 2020 16:48:56 +0200 Subject: [PATCH 098/113] Safeguard against private key not being found in ganache-accounts file --- utils/utilities.js | 1 + 1 file changed, 1 insertion(+) diff --git a/utils/utilities.js b/utils/utilities.js index 34d526bb4..5c6e88b85 100644 --- a/utils/utilities.js +++ b/utils/utilities.js @@ -65,6 +65,7 @@ module.exports = { const accountsJson = JSON.parse(fs.readFileSync("./ganache-accounts.json", "utf8")); const pkey = accountsJson.private_keys[signer.toLowerCase()]; + if (!pkey) throw new Error(`${signer} account private key not found`); const sig = ethUtil.ecsign(msgHashBuff, Buffer.from(pkey, "hex")); const signature = ethUtil.toRpcSig(sig.v, sig.r, sig.s); const split = ethers.utils.splitSignature(signature); From 7a943caffddeb63941c80fa2efce86170ffb2a77 Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Thu, 19 Nov 2020 16:51:13 +0200 Subject: [PATCH 099/113] Add compile-none option to truffle test --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 07f385a86..949249a80 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "ganache": "npx ganache-cli --chainId 1895 --networkId 1597649375983 --gasLimit=20700000 -e 10000 --acctKeys=\"./ganache-accounts.json\" --deterministic", "kovan-fork": "npx ganache-cli -i 42 -l 20700000 -f https://kovan.infura.io/v3/$(cat .env | sed -En 's/INFURA_KEY=''\"''([^''\"'']+)''\"''/\\1/p')@16988040", "kovan-fork-latest": "npx ganache-cli -i 42 -l 20700000 -f https://kovan.infura.io/v3/$(cat .env | sed -En 's/INFURA_KEY=''\"''([^''\"'']+)''\"''/\\1/p')", - "test": "npx truffle test", + "test": "npx truffle test --compile-none", "ctest": "npm run compile && npm run test", "provision:lib:artefacts": "bash ./scripts/provision_lib_artefacts.sh", "test:coverage": "node scripts/coverage.js && istanbul check-coverage --statements 94 --branches 83 --functions 96 --lines 94", From 0aae542e9a38824896b760f707012cb00c6d00ca Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Fri, 20 Nov 2020 08:35:35 +0200 Subject: [PATCH 100/113] Fix a test with simpleUpgrader overloaded method --- test/simpleUpgrader.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/test/simpleUpgrader.js b/test/simpleUpgrader.js index 8c0560539..4c4fe9e01 100644 --- a/test/simpleUpgrader.js +++ b/test/simpleUpgrader.js @@ -64,11 +64,7 @@ contract("SimpleUpgrader", (accounts) => { const name = "test_1.1"; const { module: initialModule } = await deployTestModule(); await registry.registerModule(initialModule.address, formatBytes32String(name)); - // Here we adjust how we call isRegisteredModule which has 2 overlaods, one accepting a single address - // and a second accepting an array of addresses. Behaviour as to which overload is selected to run - // differs between CI and Coverage environments, adjusted for this here - // todo: confirm the above still stands? - const isRegistered = await registry.isRegisteredModule([initialModule.address]); + const isRegistered = await registry.contract.methods["isRegisteredModule(address[])"]([initialModule.address]).call(); assert.equal(isRegistered, true, "module1 should be registered"); const info = await registry.moduleInfo(initialModule.address); assert.equal(parseBytes32String(info), name, "module1 should be registered with the correct name"); From 49eb6b417f2b7e61be7e45f12fa914dc190d727d Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Fri, 20 Nov 2020 16:01:57 +0200 Subject: [PATCH 101/113] Exclude non Argent contracts from coverage --- .solcover.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.solcover.js b/.solcover.js index 152981e25..6c8d6ac0a 100644 --- a/.solcover.js +++ b/.solcover.js @@ -1,7 +1,12 @@ module.exports = { client: require('ganache-cli'), - skipFiles: [], + skipFiles: [ + "contracts-test", + "lib", + "maker" + ], providerOptions: { + port: 8555, _chainId: 1895, network_id: 1597649375983, account_keys_path: "./ganache-accounts.json", From 8032b628c3e36ae34f8bdc64d9a40d30eda6302e Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Sat, 21 Nov 2020 11:42:43 +0200 Subject: [PATCH 102/113] Use truffle/contract to instantiate legacy contracts in tests --- package-lock.json | 994 ++++++++++++++++++++++++++++++- package.json | 1 + test/baseWallet.js | 21 +- test/makerV2Manager_loan.js | 35 +- test/multisig.js | 2 +- test/relayer.js | 7 +- test/tokenExchanger.js | 15 +- test/transferManager.js | 218 +++---- test/upgraderToVersionManager.js | 16 +- utils/relay-manager.js | 8 +- 10 files changed, 1137 insertions(+), 180 deletions(-) diff --git a/package-lock.json b/package-lock.json index eff48e08a..dc6deae22 100644 --- a/package-lock.json +++ b/package-lock.json @@ -864,6 +864,84 @@ "defer-to-connect": "^1.0.1" } }, + "@truffle/blockchain-utils": { + "version": "0.0.25", + "resolved": "https://registry.npmjs.org/@truffle/blockchain-utils/-/blockchain-utils-0.0.25.tgz", + "integrity": "sha512-XA5m0BfAWtysy5ChHyiAf1fXbJxJXphKk+eZ9Rb9Twi6fn3Jg4gnHNwYXJacYFEydqT5vr2s4Ou812JHlautpw==", + "dev": true, + "requires": { + "source-map-support": "^0.5.19" + } + }, + "@truffle/codec": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@truffle/codec/-/codec-0.8.1.tgz", + "integrity": "sha512-X6BcpS97zpmLWRoAg9zJJIPoEiAJ3MRRJd5zf+qTmLbYXVhek9frreDMhs4WoaQSe3/DOYjVxtPmwmY4+alVvw==", + "dev": true, + "requires": { + "big.js": "^5.2.2", + "bn.js": "^4.11.8", + "borc": "^2.1.2", + "debug": "^4.1.0", + "lodash.clonedeep": "^4.5.0", + "lodash.escaperegexp": "^4.1.2", + "lodash.partition": "^4.6.0", + "lodash.sum": "^4.0.2", + "semver": "^6.3.0", + "source-map-support": "^0.5.19", + "utf8": "^3.0.0", + "web3-utils": "1.2.9" + }, + "dependencies": { + "bn.js": { + "version": "4.11.9", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", + "dev": true + }, + "eth-lib": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.7.tgz", + "integrity": "sha1-L5Pxex4jrsN1nNSj/iDBKGo/wco=", + "dev": true, + "requires": { + "bn.js": "^4.11.6", + "elliptic": "^6.4.0", + "xhr-request-promise": "^0.1.2" + } + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + }, + "web3-utils": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.2.9.tgz", + "integrity": "sha512-9hcpuis3n/LxFzEVjwnVgvJzTirS2S9/MiNAa7l4WOEoywY+BSNwnRX4MuHnjkh9NY25B6QOjuNG6FNnSjTw1w==", + "dev": true, + "requires": { + "bn.js": "4.11.8", + "eth-lib": "0.2.7", + "ethereum-bloom-filters": "^1.0.6", + "ethjs-unit": "0.1.6", + "number-to-bn": "1.7.0", + "randombytes": "^2.1.0", + "underscore": "1.9.1", + "utf8": "3.0.0" + }, + "dependencies": { + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "dev": true + } + } + } + } + }, "@truffle/config": { "version": "1.2.33", "resolved": "https://registry.npmjs.org/@truffle/config/-/config-1.2.33.tgz", @@ -891,45 +969,565 @@ "locate-path": "^2.0.0" } }, - "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + } + } + }, + "@truffle/contract": { + "version": "4.2.31", + "resolved": "https://registry.npmjs.org/@truffle/contract/-/contract-4.2.31.tgz", + "integrity": "sha512-wifJ343skGQpFJQlmRQyPRquguR0uDSIVaRPHXVsGnX+6p1BOGP2zhkSUjLo8WUqyfmw/1bZ/Z9GJZ7XM8PVOw==", + "dev": true, + "requires": { + "@truffle/blockchain-utils": "^0.0.25", + "@truffle/contract-schema": "^3.3.2", + "@truffle/debug-utils": "^5.0.2", + "@truffle/error": "^0.0.11", + "@truffle/interface-adapter": "^0.4.18", + "bignumber.js": "^7.2.1", + "ethereum-ens": "^0.8.0", + "ethers": "^4.0.0-beta.1", + "source-map-support": "^0.5.19", + "web3": "1.2.9", + "web3-core-helpers": "1.2.9", + "web3-core-promievent": "1.2.9", + "web3-eth-abi": "1.2.9", + "web3-utils": "1.2.9" + }, + "dependencies": { + "@ethersproject/abi": { + "version": "5.0.0-beta.153", + "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.0.0-beta.153.tgz", + "integrity": "sha512-aXweZ1Z7vMNzJdLpR1CZUAIgnwjrZeUSvN9syCwlBaEBUFJmFY+HHnfuTI5vIhVs/mRkfJVrbEyl51JZQqyjAg==", + "dev": true, + "requires": { + "@ethersproject/address": ">=5.0.0-beta.128", + "@ethersproject/bignumber": ">=5.0.0-beta.130", + "@ethersproject/bytes": ">=5.0.0-beta.129", + "@ethersproject/constants": ">=5.0.0-beta.128", + "@ethersproject/hash": ">=5.0.0-beta.128", + "@ethersproject/keccak256": ">=5.0.0-beta.127", + "@ethersproject/logger": ">=5.0.0-beta.129", + "@ethersproject/properties": ">=5.0.0-beta.131", + "@ethersproject/strings": ">=5.0.0-beta.130" + } + }, + "@types/node": { + "version": "10.17.46", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.46.tgz", + "integrity": "sha512-Tice8a+sJtlP9C1EUo0DYyjq52T37b3LexVu3p871+kfIBIN+OQ7PKPei1oF3MgF39olEpUfxaLtD+QFc1k69Q==", + "dev": true + }, + "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 + }, + "bn.js": { + "version": "4.11.9", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", + "dev": true + }, + "eth-lib": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.7.tgz", + "integrity": "sha1-L5Pxex4jrsN1nNSj/iDBKGo/wco=", + "dev": true, + "requires": { + "bn.js": "^4.11.6", + "elliptic": "^6.4.0", + "xhr-request-promise": "^0.1.2" + } + }, + "ethers": { + "version": "4.0.48", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-4.0.48.tgz", + "integrity": "sha512-sZD5K8H28dOrcidzx9f8KYh8083n5BexIO3+SbE4jK83L85FxtpXZBCQdXb8gkg+7sBqomcLhhkU7UHL+F7I2g==", + "dev": true, + "requires": { + "aes-js": "3.0.0", + "bn.js": "^4.4.0", + "elliptic": "6.5.3", + "hash.js": "1.1.3", + "js-sha3": "0.5.7", + "scrypt-js": "2.0.4", + "setimmediate": "1.0.4", + "uuid": "2.0.1", + "xmlhttprequest": "1.8.0" + } + }, + "eventemitter3": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.2.tgz", + "integrity": "sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q==", + "dev": true + }, + "hash.js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", + "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.0" + } + }, + "oboe": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/oboe/-/oboe-2.1.4.tgz", + "integrity": "sha1-IMiM2wwVNxuwQRklfU/dNLCqSfY=", + "dev": true, + "requires": { + "http-https": "^1.0.0" + } + }, + "scrypt-js": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-2.0.4.tgz", + "integrity": "sha512-4KsaGcPnuhtCZQCxFxN3GVYIhKFPTdLd8PLC552XwbMndtD0cjRFAhDuuydXQ0h08ZfPgzqe6EKHozpuH74iDw==", + "dev": true + }, + "setimmediate": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.4.tgz", + "integrity": "sha1-IOgd5iLUoCWIzgyNqJc8vPHTE48=", + "dev": true + }, + "uuid": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.1.tgz", + "integrity": "sha1-wqMN7bPlNdcsz4LjQ5QaULqFM6w=", + "dev": true + }, + "web3": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3/-/web3-1.2.9.tgz", + "integrity": "sha512-Mo5aBRm0JrcNpN/g4VOrDzudymfOnHRC3s2VarhYxRA8aWgF5rnhQ0ziySaugpic1gksbXPe105pUWyRqw8HUA==", + "dev": true, + "requires": { + "web3-bzz": "1.2.9", + "web3-core": "1.2.9", + "web3-eth": "1.2.9", + "web3-eth-personal": "1.2.9", + "web3-net": "1.2.9", + "web3-shh": "1.2.9", + "web3-utils": "1.2.9" + } + }, + "web3-bzz": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.2.9.tgz", + "integrity": "sha512-ogVQr9jHodu9HobARtvUSmWG22cv2EUQzlPeejGWZ7j5h20HX40EDuWyomGY5VclIj5DdLY76Tmq88RTf/6nxA==", + "dev": true, + "requires": { + "@types/node": "^10.12.18", + "got": "9.6.0", + "swarm-js": "^0.1.40", + "underscore": "1.9.1" + } + }, + "web3-core": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.2.9.tgz", + "integrity": "sha512-fSYv21IP658Ty2wAuU9iqmW7V+75DOYMVZsDH/c14jcF/1VXnedOcxzxSj3vArsCvXZNe6XC5/wAuGZyQwR9RA==", + "dev": true, + "requires": { + "@types/bn.js": "^4.11.4", + "@types/node": "^12.6.1", + "bignumber.js": "^9.0.0", + "web3-core-helpers": "1.2.9", + "web3-core-method": "1.2.9", + "web3-core-requestmanager": "1.2.9", + "web3-utils": "1.2.9" + }, + "dependencies": { + "@types/node": { + "version": "12.19.6", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.19.6.tgz", + "integrity": "sha512-U2VopDdmBoYBmtm8Rz340mvvSz34VgX/K9+XCuckvcLGMkt3rbMX8soqFOikIPlPBc5lmw8By9NUK7bEFSBFlQ==", + "dev": true + }, + "bignumber.js": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.1.tgz", + "integrity": "sha512-IdZR9mh6ahOBv/hYGiXyVuyCetmGJhtYkqLBpTStdhEGjegpPlUawydyaF3pbIOFynJTpllEs+NP+CS9jKFLjA==", + "dev": true + } + } + }, + "web3-core-helpers": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.2.9.tgz", + "integrity": "sha512-t0WAG3orLCE3lqi77ZoSRNFok3VQWZXTniZigDQjyOJYMAX7BU3F3js8HKbjVnAxlX3tiKoDxI0KBk9F3AxYuw==", + "dev": true, + "requires": { + "underscore": "1.9.1", + "web3-eth-iban": "1.2.9", + "web3-utils": "1.2.9" + } + }, + "web3-core-method": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.2.9.tgz", + "integrity": "sha512-bjsIoqP3gs7A/gP8+QeLUCyOKJ8bopteCSNbCX36Pxk6TYfYWNuC6hP+2GzUuqdP3xaZNe+XEElQFUNpR3oyAg==", + "dev": true, + "requires": { + "@ethersproject/transactions": "^5.0.0-beta.135", + "underscore": "1.9.1", + "web3-core-helpers": "1.2.9", + "web3-core-promievent": "1.2.9", + "web3-core-subscriptions": "1.2.9", + "web3-utils": "1.2.9" + } + }, + "web3-core-promievent": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.2.9.tgz", + "integrity": "sha512-0eAUA2zjgXTleSrnc1wdoKQPPIHU6KHf4fAscu4W9kKrR+mqP1KsjYrxY9wUyjNnXxfQ+5M29ipvbiaK8OqdOw==", + "dev": true, + "requires": { + "eventemitter3": "3.1.2" + } + }, + "web3-core-requestmanager": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.2.9.tgz", + "integrity": "sha512-1PwKV2m46ALUnIN5VPPgjOj8yMLJhhqZYvYJE34hTN5SErOkwhzx5zScvo5MN7v7KyQGFnpVCZKKGCiEnDmtFA==", + "dev": true, + "requires": { + "underscore": "1.9.1", + "web3-core-helpers": "1.2.9", + "web3-providers-http": "1.2.9", + "web3-providers-ipc": "1.2.9", + "web3-providers-ws": "1.2.9" + } + }, + "web3-core-subscriptions": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.2.9.tgz", + "integrity": "sha512-Y48TvXPSPxEM33OmXjGVDMzTd0j8X0t2+sDw66haeBS8eYnrEzasWuBZZXDq0zNUsqyxItgBGDn+cszkgEnFqg==", + "dev": true, + "requires": { + "eventemitter3": "3.1.2", + "underscore": "1.9.1", + "web3-core-helpers": "1.2.9" + } + }, + "web3-eth": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.2.9.tgz", + "integrity": "sha512-sIKO4iE9FEBa/CYUd6GdPd7GXt/wISqxUd8PlIld6+hvMJj02lgO7Z7p5T9mZIJcIZJGvZX81ogx8oJ9yif+Ag==", + "dev": true, + "requires": { + "underscore": "1.9.1", + "web3-core": "1.2.9", + "web3-core-helpers": "1.2.9", + "web3-core-method": "1.2.9", + "web3-core-subscriptions": "1.2.9", + "web3-eth-abi": "1.2.9", + "web3-eth-accounts": "1.2.9", + "web3-eth-contract": "1.2.9", + "web3-eth-ens": "1.2.9", + "web3-eth-iban": "1.2.9", + "web3-eth-personal": "1.2.9", + "web3-net": "1.2.9", + "web3-utils": "1.2.9" + } + }, + "web3-eth-abi": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.2.9.tgz", + "integrity": "sha512-3YwUYbh/DMfDbhMWEebAdjSd5bj3ZQieOjLzWFHU23CaLEqT34sUix1lba+hgUH/EN6A7bKAuKOhR3p0OvTn7Q==", + "dev": true, + "requires": { + "@ethersproject/abi": "5.0.0-beta.153", + "underscore": "1.9.1", + "web3-utils": "1.2.9" + } + }, + "web3-eth-accounts": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.2.9.tgz", + "integrity": "sha512-jkbDCZoA1qv53mFcRHCinoCsgg8WH+M0YUO1awxmqWXRmCRws1wW0TsuSQ14UThih5Dxolgl+e+aGWxG58LMwg==", + "dev": true, + "requires": { + "crypto-browserify": "3.12.0", + "eth-lib": "^0.2.8", + "ethereumjs-common": "^1.3.2", + "ethereumjs-tx": "^2.1.1", + "scrypt-js": "^3.0.1", + "underscore": "1.9.1", + "uuid": "3.3.2", + "web3-core": "1.2.9", + "web3-core-helpers": "1.2.9", + "web3-core-method": "1.2.9", + "web3-utils": "1.2.9" + }, + "dependencies": { + "eth-lib": { + "version": "0.2.8", + "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.8.tgz", + "integrity": "sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw==", + "dev": true, + "requires": { + "bn.js": "^4.11.6", + "elliptic": "^6.4.0", + "xhr-request-promise": "^0.1.2" + } + }, + "scrypt-js": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz", + "integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==", + "dev": true + }, + "uuid": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", + "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", + "dev": true + } + } + }, + "web3-eth-contract": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.2.9.tgz", + "integrity": "sha512-PYMvJf7EG/HyssUZa+pXrc8IB06K/YFfWYyW4R7ed3sab+9wWUys1TlWxBCBuiBXOokSAyM6H6P6/cKEx8FT8Q==", + "dev": true, + "requires": { + "@types/bn.js": "^4.11.4", + "underscore": "1.9.1", + "web3-core": "1.2.9", + "web3-core-helpers": "1.2.9", + "web3-core-method": "1.2.9", + "web3-core-promievent": "1.2.9", + "web3-core-subscriptions": "1.2.9", + "web3-eth-abi": "1.2.9", + "web3-utils": "1.2.9" + } + }, + "web3-eth-ens": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-eth-ens/-/web3-eth-ens-1.2.9.tgz", + "integrity": "sha512-kG4+ZRgZ8I1WYyOBGI8QVRHfUSbbJjvJAGA1AF/NOW7JXQ+x7gBGeJw6taDWJhSshMoEKWcsgvsiuoG4870YxQ==", + "dev": true, + "requires": { + "content-hash": "^2.5.2", + "eth-ens-namehash": "2.0.8", + "underscore": "1.9.1", + "web3-core": "1.2.9", + "web3-core-helpers": "1.2.9", + "web3-core-promievent": "1.2.9", + "web3-eth-abi": "1.2.9", + "web3-eth-contract": "1.2.9", + "web3-utils": "1.2.9" + } + }, + "web3-eth-iban": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.2.9.tgz", + "integrity": "sha512-RtdVvJE0pyg9dHLy0GzDiqgnLnssSzfz/JYguhC1wsj9+Gnq1M6Diy3NixACWUAp6ty/zafyOaZnNQ+JuH9TjQ==", + "dev": true, + "requires": { + "bn.js": "4.11.8", + "web3-utils": "1.2.9" + }, + "dependencies": { + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "dev": true + } + } + }, + "web3-eth-personal": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.2.9.tgz", + "integrity": "sha512-cFiNrktxZ1C/rIdJFzQTvFn3/0zcsR3a+Jf8Y3KxeQDHszQtosjLWptP7bsUmDwEh4hzh0Cy3KpOxlYBWB8bJQ==", + "dev": true, + "requires": { + "@types/node": "^12.6.1", + "web3-core": "1.2.9", + "web3-core-helpers": "1.2.9", + "web3-core-method": "1.2.9", + "web3-net": "1.2.9", + "web3-utils": "1.2.9" + }, + "dependencies": { + "@types/node": { + "version": "12.19.6", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.19.6.tgz", + "integrity": "sha512-U2VopDdmBoYBmtm8Rz340mvvSz34VgX/K9+XCuckvcLGMkt3rbMX8soqFOikIPlPBc5lmw8By9NUK7bEFSBFlQ==", + "dev": true + } + } + }, + "web3-net": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.2.9.tgz", + "integrity": "sha512-d2mTn8jPlg+SI2hTj2b32Qan6DmtU9ap/IUlJTeQbZQSkTLf0u9suW8Vjwyr4poJYXTurdSshE7OZsPNn30/ZA==", + "dev": true, + "requires": { + "web3-core": "1.2.9", + "web3-core-method": "1.2.9", + "web3-utils": "1.2.9" + } + }, + "web3-providers-http": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.2.9.tgz", + "integrity": "sha512-F956tCIj60Ttr0UvEHWFIhx+be3He8msoPzyA44/kfzzYoMAsCFRn5cf0zQG6al0znE75g6HlWVSN6s3yAh51A==", + "dev": true, + "requires": { + "web3-core-helpers": "1.2.9", + "xhr2-cookies": "1.1.0" + } + }, + "web3-providers-ipc": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.2.9.tgz", + "integrity": "sha512-NQ8QnBleoHA2qTJlqoWu7EJAD/FR5uimf7Ielzk4Z2z+m+6UAuJdJMSuQNj+Umhz9L/Ys6vpS1vHx9NizFl+aQ==", + "dev": true, + "requires": { + "oboe": "2.1.4", + "underscore": "1.9.1", + "web3-core-helpers": "1.2.9" + } + }, + "web3-providers-ws": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.2.9.tgz", + "integrity": "sha512-6+UpvINeI//dglZoAKStUXqxDOXJy6Iitv2z3dbgInG4zb8tkYl/VBDL80UjUg3ZvzWG0g7EKY2nRPEpON2TFA==", + "dev": true, + "requires": { + "eventemitter3": "^4.0.0", + "underscore": "1.9.1", + "web3-core-helpers": "1.2.9", + "websocket": "^1.0.31" + }, + "dependencies": { + "eventemitter3": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", + "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==", + "dev": true + } + } + }, + "web3-shh": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-shh/-/web3-shh-1.2.9.tgz", + "integrity": "sha512-PWa8b/EaxaMinFaxy6cV0i0EOi2M7a/ST+9k9nhyhCjVa2vzXuNoBNo2IUOmeZ0WP2UQB8ByJ2+p4htlJaDOjA==", "dev": true, "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" + "web3-core": "1.2.9", + "web3-core-method": "1.2.9", + "web3-core-subscriptions": "1.2.9", + "web3-net": "1.2.9" } }, - "p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "web3-utils": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.2.9.tgz", + "integrity": "sha512-9hcpuis3n/LxFzEVjwnVgvJzTirS2S9/MiNAa7l4WOEoywY+BSNwnRX4MuHnjkh9NY25B6QOjuNG6FNnSjTw1w==", "dev": true, "requires": { - "p-try": "^1.0.0" + "bn.js": "4.11.8", + "eth-lib": "0.2.7", + "ethereum-bloom-filters": "^1.0.6", + "ethjs-unit": "0.1.6", + "number-to-bn": "1.7.0", + "randombytes": "^2.1.0", + "underscore": "1.9.1", + "utf8": "3.0.0" + }, + "dependencies": { + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "dev": true + } } - }, - "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + } + } + }, + "@truffle/contract-schema": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/@truffle/contract-schema/-/contract-schema-3.3.2.tgz", + "integrity": "sha512-PFNUHlcMFh6CDLDXTYCpm1G5rM5EJlneA9ml5y1TbkLgjLMICI2XLilimFZ/DC0THQekHpoQC+W/QMD/OTiTiw==", + "dev": true, + "requires": { + "ajv": "^6.10.0", + "crypto-js": "^3.1.9-1", + "debug": "^4.1.0" + } + }, + "@truffle/debug-utils": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/@truffle/debug-utils/-/debug-utils-5.0.2.tgz", + "integrity": "sha512-VTnbmTcjUKR0uctqUiPDlIt+R/7ix78hntSZku/qZ/EO/b1ts8W2fA0M2uPU+G8cicvvUpidg1z+qk/u844rDQ==", + "dev": true, + "requires": { + "@truffle/codec": "^0.8.1", + "@trufflesuite/chromafi": "^2.2.1", + "chalk": "^2.4.2", + "debug": "^4.1.0", + "highlight.js": "^9.15.8", + "highlightjs-solidity": "^1.0.19" + }, + "dependencies": { + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dev": true, "requires": { - "p-limit": "^1.1.0" + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" } - }, - "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", - "dev": true - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true } } }, @@ -1869,6 +2467,51 @@ } } }, + "@trufflesuite/chromafi": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@trufflesuite/chromafi/-/chromafi-2.2.1.tgz", + "integrity": "sha512-kODhM/LsjPrSRGQdaHe113v4xob/aheRmdwN0i6seVNavmHGBvC4ob3COlD1GjaklXsl9QWw4fengowIx1+07Q==", + "dev": true, + "requires": { + "ansi-mark": "^1.0.0", + "ansi-regex": "^3.0.0", + "array-uniq": "^1.0.3", + "camelcase": "^4.1.0", + "chalk": "^2.3.2", + "cheerio": "^1.0.0-rc.2", + "detect-indent": "^5.0.0", + "he": "^1.1.1", + "highlight.js": "^9.12.0", + "lodash.merge": "^4.6.2", + "min-indent": "^1.0.0", + "strip-ansi": "^4.0.0", + "strip-indent": "^2.0.0", + "super-split": "^1.1.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "camelcase": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", + "dev": true + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + }, "@trufflesuite/eth-json-rpc-filters": { "version": "4.1.2-1", "resolved": "https://registry.npmjs.org/@trufflesuite/eth-json-rpc-filters/-/eth-json-rpc-filters-4.1.2-1.tgz", @@ -2336,6 +2979,36 @@ "type-fest": "^0.11.0" } }, + "ansi-mark": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/ansi-mark/-/ansi-mark-1.0.4.tgz", + "integrity": "sha1-HNS6jVfxXxCdaq9uycqXhsik7mw=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0", + "array-uniq": "^1.0.3", + "chalk": "^2.3.2", + "strip-ansi": "^4.0.0", + "super-split": "^1.1.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + }, "ansi-regex": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", @@ -2438,6 +3111,12 @@ "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", "dev": true }, + "array-uniq": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", + "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", + "dev": true + }, "array-unique": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", @@ -2681,6 +3360,12 @@ "resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz", "integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==" }, + "big.js": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", + "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", + "dev": true + }, "bignumber.js": { "version": "9.0.1", "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.1.tgz", @@ -2770,6 +3455,45 @@ } } }, + "boolbase": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", + "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=", + "dev": true + }, + "borc": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/borc/-/borc-2.1.2.tgz", + "integrity": "sha512-Sy9eoUi4OiKzq7VovMn246iTo17kzuyHJKomCfpWMlI6RpfN1gk95w7d7gH264nApVLg0HZfcpz62/g4VH1Y4w==", + "dev": true, + "requires": { + "bignumber.js": "^9.0.0", + "buffer": "^5.5.0", + "commander": "^2.15.0", + "ieee754": "^1.1.13", + "iso-url": "~0.4.7", + "json-text-sequence": "~0.1.0", + "readable-stream": "^3.6.0" + }, + "dependencies": { + "buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "requires": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + } + } + }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -3079,6 +3803,20 @@ "functional-red-black-tree": "^1.0.1" } }, + "cheerio": { + "version": "1.0.0-rc.3", + "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.3.tgz", + "integrity": "sha512-0td5ijfUPuubwLUu0OBoe98gZj8C/AA+RW3v67GPlGOrvxWjZmBXiBCRU+I8VEiNyJzjth40POfHiz2RB3gImA==", + "dev": true, + "requires": { + "css-select": "~1.2.0", + "dom-serializer": "~0.1.1", + "entities": "~1.1.1", + "htmlparser2": "^3.9.1", + "lodash": "^4.15.0", + "parse5": "^3.0.1" + } + }, "chokidar": { "version": "3.4.2", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.2.tgz", @@ -3734,6 +4472,12 @@ "randomfill": "^1.0.3" } }, + "crypto-js": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-3.3.0.tgz", + "integrity": "sha512-DIT51nX0dCfKltpRiXV+/TVZq+Qq2NgF4644+K7Ttnla7zEzqc+kjJyiB96BHNyUTBxyjzRcZYpUdZa+QAqi6Q==", + "dev": true + }, "crypto-random-string": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-1.0.0.tgz", @@ -3760,6 +4504,24 @@ } } }, + "css-select": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz", + "integrity": "sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg=", + "dev": true, + "requires": { + "boolbase": "~1.0.0", + "css-what": "2.1", + "domutils": "1.5.1", + "nth-check": "~1.0.1" + } + }, + "css-what": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-2.1.3.tgz", + "integrity": "sha512-a+EPoD+uZiNfh+5fxw2nO9QwFa6nJe2Or35fGY6Ipw1R3R4AGz1d1TEZrCegvw2YTmZ0jXirGYlzxxpYSHwpEg==", + "dev": true + }, "d": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", @@ -3922,6 +4684,12 @@ "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", "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 + }, "depd": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", @@ -3944,6 +4712,12 @@ "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=", "dev": true }, + "detect-indent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-5.0.0.tgz", + "integrity": "sha1-OHHMCmoALow+Wzz38zYmRnXwa50=", + "dev": true + }, "detect-newline": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-2.1.0.tgz", @@ -4020,12 +4794,47 @@ "esutils": "^2.0.2" } }, + "dom-serializer": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.1.tgz", + "integrity": "sha512-l0IU0pPzLWSHBcieZbpOKgkIn3ts3vAh7ZuFyXNwJxJXk/c4Gwj9xaTJwIDVQCXawWD0qb3IzMGH5rglQaO0XA==", + "dev": true, + "requires": { + "domelementtype": "^1.3.0", + "entities": "^1.1.1" + } + }, "dom-walk": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/dom-walk/-/dom-walk-0.1.2.tgz", "integrity": "sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w==", "dev": true }, + "domelementtype": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz", + "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==", + "dev": true + }, + "domhandler": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.4.2.tgz", + "integrity": "sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA==", + "dev": true, + "requires": { + "domelementtype": "1" + } + }, + "domutils": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", + "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", + "dev": true, + "requires": { + "dom-serializer": "0", + "domelementtype": "1" + } + }, "dot-prop": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.1.tgz", @@ -4194,6 +5003,12 @@ "ansi-colors": "^4.1.1" } }, + "entities": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz", + "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==", + "dev": true + }, "errno": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz", @@ -5396,6 +6211,20 @@ "setimmediate": "^1.0.5" } }, + "ethereum-ens": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/ethereum-ens/-/ethereum-ens-0.8.0.tgz", + "integrity": "sha512-a8cBTF4AWw1Q1Y37V1LSCS9pRY4Mh3f8vCg5cbXCCEJ3eno1hbI/+Ccv9SZLISYpqQhaglP3Bxb/34lS4Qf7Bg==", + "dev": true, + "requires": { + "bluebird": "^3.4.7", + "eth-ens-namehash": "^2.0.0", + "js-sha3": "^0.5.7", + "pako": "^1.0.4", + "underscore": "^1.8.3", + "web3": "^1.0.0-beta.34" + } + }, "ethereum-protocol": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/ethereum-protocol/-/ethereum-protocol-1.0.1.tgz", @@ -7656,6 +8485,18 @@ "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", "dev": true }, + "highlight.js": { + "version": "9.18.5", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-9.18.5.tgz", + "integrity": "sha512-a5bFyofd/BHCX52/8i8uJkjr9DYwXIPnM/plwI6W7ezItLGqzt7X2G2nXuYSfsIJdkwwj/g9DG1LkcGJI/dDoA==", + "dev": true + }, + "highlightjs-solidity": { + "version": "1.0.19", + "resolved": "https://registry.npmjs.org/highlightjs-solidity/-/highlightjs-solidity-1.0.19.tgz", + "integrity": "sha512-ZIzMlxZxkcNnzWC1LeOeUjQjywzXnGyDxexOPKzz8hWFqdE2uRvz1BxD0joOkr41z4SU2ABXVGDx6EWlbzTBLQ==", + "dev": true + }, "hmac-drbg": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", @@ -7672,6 +8513,20 @@ "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==", "dev": true }, + "htmlparser2": { + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.10.1.tgz", + "integrity": "sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ==", + "dev": true, + "requires": { + "domelementtype": "^1.3.1", + "domhandler": "^2.3.0", + "domutils": "^1.5.1", + "entities": "^1.1.1", + "inherits": "^2.0.1", + "readable-stream": "^3.1.1" + } + }, "http-basic": { "version": "8.1.3", "resolved": "https://registry.npmjs.org/http-basic/-/http-basic-8.1.3.tgz", @@ -8258,6 +9113,12 @@ "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", "dev": true }, + "iso-url": { + "version": "0.4.7", + "resolved": "https://registry.npmjs.org/iso-url/-/iso-url-0.4.7.tgz", + "integrity": "sha512-27fFRDnPAMnHGLq36bWTpKET+eiXct3ENlCcdcMdk+mjXrb2kw3mhBUg1B7ewAC0kVzlOPhADzQgz1SE6Tglog==", + "dev": true + }, "isobject": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", @@ -8444,6 +9305,15 @@ "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", "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" + } + }, "json5": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", @@ -8913,6 +9783,18 @@ "integrity": "sha1-rwLJhDKshtk9ppW0voAUAZcXNq8=", "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.escaperegexp": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lodash.escaperegexp/-/lodash.escaperegexp-4.1.2.tgz", + "integrity": "sha1-ZHYsSGGAglGKw99Mz11YhtriA0c=", + "dev": true + }, "lodash.flatmap": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.flatmap/-/lodash.flatmap-4.5.0.tgz", @@ -8937,12 +9819,24 @@ "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "dev": true }, + "lodash.partition": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.partition/-/lodash.partition-4.6.0.tgz", + "integrity": "sha1-o45GtzRp4EILDaEhLmbUFL42S6Q=", + "dev": true + }, "lodash.rest": { "version": "4.0.5", "resolved": "https://registry.npmjs.org/lodash.rest/-/lodash.rest-4.0.5.tgz", "integrity": "sha1-lU73UEkmIDjJbR/Jiyj9r58Hcqo=", "dev": true }, + "lodash.sum": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/lodash.sum/-/lodash.sum-4.0.2.tgz", + "integrity": "sha1-rZDjl5ZdgD1PH/eqWy0Bl/O0Y3s=", + "dev": true + }, "lodash.template": { "version": "4.2.4", "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-4.2.4.tgz", @@ -9413,6 +10307,12 @@ "dom-walk": "^0.1.0" } }, + "min-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", + "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", + "dev": true + }, "minimalistic-assert": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", @@ -10116,6 +11016,15 @@ "path-key": "^3.0.0" } }, + "nth-check": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.2.tgz", + "integrity": "sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg==", + "dev": true, + "requires": { + "boolbase": "~1.0.0" + } + }, "number-is-nan": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", @@ -10490,6 +11399,12 @@ "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "dev": true }, + "pako": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", + "dev": true + }, "parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -10565,6 +11480,15 @@ "lines-and-columns": "^1.1.6" } }, + "parse5": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-3.0.3.tgz", + "integrity": "sha512-rgO9Zg5LLLkfJF9E6CCmXlSE4UVceloys8JrFqCcHloC3usd/kJCyPDwH2SOlzix2j3xaP9sUX3e8+kvkuleAA==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, "parseurl": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", @@ -12344,12 +13268,24 @@ "is-hex-prefixed": "1.0.0" } }, + "strip-indent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-2.0.0.tgz", + "integrity": "sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g=", + "dev": true + }, "strip-json-comments": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", "dev": true }, + "super-split": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/super-split/-/super-split-1.1.0.tgz", + "integrity": "sha512-I4bA5mgcb6Fw5UJ+EkpzqXfiuvVGS/7MuND+oBxNFmxu3ugLNrdIatzBLfhFRMVMLxgSsRy+TjIktgkF9RFSNQ==", + "dev": true + }, "supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", diff --git a/package.json b/package.json index 949249a80..504bccf7b 100644 --- a/package.json +++ b/package.json @@ -74,6 +74,7 @@ "-": "0.0.1", "@codechecks/client": "^0.1.10", "@truffle/config": "^1.2.33", + "@truffle/contract": "^4.2.31", "@truffle/hdwallet-provider": "^1.2.0", "bn-chai": "^1.0.1", "bn.js": "^5.1.3", diff --git a/test/baseWallet.js b/test/baseWallet.js index f8dc2cb85..a1c5fdfb6 100644 --- a/test/baseWallet.js +++ b/test/baseWallet.js @@ -1,15 +1,17 @@ /* global artifacts */ const ethers = require("ethers"); const truffleAssert = require("truffle-assertions"); +const TruffleContract = require("@truffle/contract"); + +const OldWalletV13Contract = require("../build-legacy/v1.3.0/BaseWallet"); +const OldWalletV16Contract = require("../build-legacy/v1.6.0/BaseWallet"); + +const OldWalletV13 = TruffleContract(OldWalletV13Contract); +const OldWalletV16 = TruffleContract(OldWalletV16Contract); const Proxy = artifacts.require("Proxy"); const BaseWallet = artifacts.require("BaseWallet"); -// const OldWalletV16 = require("../build-legacy/v1.6.0/BaseWallet"); -// const OldWalletV13 = require("../build-legacy/v1.3.0/BaseWallet"); -let OldWalletV13; -let OldWalletV16; - const VersionManager = artifacts.require("VersionManager"); const Registry = artifacts.require("ModuleRegistry"); const SimpleUpgrader = artifacts.require("SimpleUpgrader"); @@ -49,6 +51,11 @@ contract("BaseWallet", (accounts) => { } before(async () => { + OldWalletV13.defaults({ from: accounts[0] }); + OldWalletV13.setProvider(web3.currentProvider); + OldWalletV16.defaults({ from: accounts[0] }); + OldWalletV16.setProvider(web3.currentProvider); + registry = await Registry.new(); guardianStorage = await GuardianStorage.new(); lockStorage = await LockStorage.new(); @@ -208,7 +215,7 @@ contract("BaseWallet", (accounts) => { }); }); - describe.skip("Old BaseWallet V1.3", () => { + describe("Old BaseWallet V1.3", () => { it("should work with new modules", async () => { const oldWallet = await OldWalletV13.new(); await oldWallet.init(owner, [module1.address]); @@ -219,7 +226,7 @@ contract("BaseWallet", (accounts) => { }); }); - describe.skip("Old BaseWallet V1.6", () => { + describe("Old BaseWallet V1.6", () => { it("should work with new modules", async () => { const oldWallet = await OldWalletV16.new(); await oldWallet.init(owner, [module1.address]); diff --git a/test/makerV2Manager_loan.js b/test/makerV2Manager_loan.js index 64e6ad709..17d6a7126 100644 --- a/test/makerV2Manager_loan.js +++ b/test/makerV2Manager_loan.js @@ -19,7 +19,6 @@ const RelayManager = require("../utils/relay-manager"); const GemJoin = artifacts.require("GemJoin"); const Registry = artifacts.require("ModuleRegistry"); - const MakerV2Manager = artifacts.require("MakerV2Manager"); const UpgradedMakerV2Manager = artifacts.require("TestUpgradedMakerV2Manager"); const MakerRegistry = artifacts.require("MakerRegistry"); @@ -165,15 +164,14 @@ contract("MakerV2Loan", (accounts) => { const beforeDAI = await dai.balanceOf(walletAddress); const beforeDAISupply = await dai.totalSupply(); - const method = "openLoan"; const params = [walletAddress, collateral.address, collateralAmount.toString(), dai.address, daiAmount.toString()]; let txReceipt; if (relayed) { - txReceipt = await manager.relay(makerV2, method, params, wallet, [owner]); - const eventTransactionExecuted = await utils.getEvent(txReceipt, relayerManager, "TransactionExecuted"); - assert.isTrue(eventTransactionExecuted.args.success, "Relayed tx should succeed"); + txReceipt = await manager.relay(makerV2, "openLoan", params, wallet, [owner]); + const { success } = utils.parseRelayReceipt(txReceipt); + assert.isTrue(success, "Relayed tx should succeed"); } else { - const tx = await makerV2[method](...params, { gasLimit: 2000000, from: owner }); + const tx = await makerV2.openLoan(...params, { gasLimit: 2000000, from: owner }); txReceipt = tx.receipt; } const eventLoanOpened = await utils.getEvent(txReceipt, makerV2, "LoanOpened"); @@ -652,7 +650,7 @@ contract("MakerV2Loan", (accounts) => { }); }); - describe.skip("Upgrade of MakerV2Manager", () => { + describe("Upgrade of MakerV2Manager", () => { let upgradedMakerV2; let daiAmount; let collateralAmount; @@ -672,8 +670,7 @@ contract("MakerV2Loan", (accounts) => { makerRegistry.address, uniswapFactory.address, makerV2.address, - versionManager.address, - { gasLimit: 10700000 }, + versionManager.address ); // Adding BAT to the registry of supported collateral tokens @@ -689,7 +686,7 @@ contract("MakerV2Loan", (accounts) => { if (withBatVault) { // Open a BAT vault with the old MakerV2 feature const batTestAmounts = await getTestAmounts(bat.address); - await bat.mint(walletAddress, batTestAmounts.collateralAmount.add(web3.utils.toWei("0.01"))); + await bat.mint(walletAddress, batTestAmounts.collateralAmount.add(new BN(web3.utils.toWei("0.01")))); loanId2 = await testOpenLoan({ collateralAmount: batTestAmounts.collateralAmount, daiAmount: batTestAmounts.daiAmount, @@ -704,20 +701,20 @@ contract("MakerV2Loan", (accounts) => { transferManager.address, relayerManager.address, ], [upgradedMakerV2.address]); - const method = "upgradeWallet"; + const lastVersion = await versionManager.lastVersion(); - const params = [walletAddress, lastVersion]; + const params = [walletAddress, lastVersion.toNumber()]; if (relayed) { - const txR = await manager.relay(versionManager, method, params, wallet, [owner]); - const txTransactionExecuted = await utils.getEvent(txR, cdpManager, "NewCdp"); - assert.isTrue(txTransactionExecuted.args.success, "Relayed tx should succeed"); + const txR = await manager.relay(versionManager, "upgradeWallet", params, wallet, [owner]); + const { success } = utils.parseRelayReceipt(txR); + assert.isTrue(success, "Relayed tx should succeed"); } else { - await versionManager[method](...params, { gasLimit: 2000000, from: owner }); + await versionManager.upgradeWallet(...params, { gasLimit: 2000000, from: owner }); } // Make sure that the vaults can be manipulated from the upgraded feature await testChangeCollateral({ loanId: loanId1, - collateralAmount: web3.utils.toWei("0.010"), + collateralAmount: new BN(web3.utils.toWei("0.010")), add: true, relayed, makerV2Manager: upgradedMakerV2, @@ -727,7 +724,7 @@ contract("MakerV2Loan", (accounts) => { if (withBatVault) { await testChangeCollateral({ loanId: loanId2, - collateralAmount: web3.utils.toWei("0.010"), + collateralAmount: new BN(web3.utils.toWei("0.010")), add: true, relayed, collateral: bat, @@ -777,7 +774,7 @@ contract("MakerV2Loan", (accounts) => { const lastVersion = await versionManager.lastVersion(); await versionManager.upgradeWallet(walletAddress, lastVersion, { gasLimit: 2000000, from: owner }); // Use the bad module to attempt a bad giveVault call - const callData = makerV2.contract.methods.giveVault([walletAddress, utils.numberToBytes32(666)]).encodeABI(); + const callData = makerV2.contract.methods.giveVault(walletAddress, utils.numberToBytes32(666)).encodeABI(); await truffleAssert.reverts(badFeature.callContract(makerV2.address, 0, callData, { from: owner }), "MV2: unauthorized loanId"); }); }); diff --git a/test/multisig.js b/test/multisig.js index 62665ac0a..a89f96223 100644 --- a/test/multisig.js +++ b/test/multisig.js @@ -237,7 +237,7 @@ contract("MultiSigWallet", (accounts) => { it("should fail with the wrong nonce", async () => { const nonceOffset = 1; - await executeSendFailure([owner1, owner2], nonceOffset, true, false, "MSW: Badly ordered signatures"); + await executeSendFailure([owner1, owner2], nonceOffset, true, false, "MSW: Not enough valid signatures"); }); it("should fail with the wrong signature", async () => { diff --git a/test/relayer.js b/test/relayer.js index 7c4e1c1b8..a5a8dd12b 100644 --- a/test/relayer.js +++ b/test/relayer.js @@ -171,7 +171,7 @@ contract("RelayerManager", (accounts) => { ); }); - it.skip("should fail when the gas of the transaction is less then the gasLimit ", async () => { + it("should fail when the gas of the transaction is less then the gasLimit", async () => { const params = [wallet.address, 2]; const nonce = await utils.getNonceForRelay(); const gasLimit = 2000000; @@ -189,11 +189,8 @@ contract("RelayerManager", (accounts) => { ETH_TOKEN, ethers.constants.AddressZero, gasLimit * 0.9]; - const txReceipt = await manager.relay(...relayParams); - const { success, error } = utils.parseRelayReceipt(txReceipt); - assert.isFalse(success); - assert.equal(error, "RM: not enough gas provided"); + await truffleAssert.reverts(manager.relay(...relayParams), "RM: not enough gas provided"); }); it("should fail when a wrong number of signatures is provided", async () => { diff --git a/test/tokenExchanger.js b/test/tokenExchanger.js index 7f1eddff0..528752644 100644 --- a/test/tokenExchanger.js +++ b/test/tokenExchanger.js @@ -11,6 +11,12 @@ const bnChai = require("bn-chai"); const { expect } = chai; chai.use(bnChai(BN)); +const TruffleContract = require("@truffle/contract"); + +const BaseWalletContract = require("../build-legacy/v1.3.0/BaseWallet.json"); + +const OldWallet = TruffleContract(BaseWalletContract); + // Paraswap const AugustusSwapper = artifacts.require("AugustusSwapper"); const Whitelisted = artifacts.require("Whitelisted"); @@ -32,10 +38,6 @@ const ModuleRegistry = artifacts.require("ModuleRegistry"); const DexRegistry = artifacts.require("DexRegistry"); const Proxy = artifacts.require("Proxy"); const BaseWallet = artifacts.require("BaseWallet"); - -// const OldWallet = require("../build-legacy/v1.3.0/BaseWallet"); -let OldWallet; - const GuardianStorage = artifacts.require("GuardianStorage"); const LockStorage = artifacts.require("LockStorage"); const TokenExchanger = artifacts.require("TokenExchanger"); @@ -83,6 +85,9 @@ contract("TokenExchanger", (accounts) => { let versionManager; before(async () => { + OldWallet.defaults({ from: accounts[0] }); + OldWallet.setProvider(web3.currentProvider); + const registry = await ModuleRegistry.new(); dexRegistry = await DexRegistry.new(); guardianStorage = await GuardianStorage.new(); @@ -409,7 +414,7 @@ contract("TokenExchanger", (accounts) => { await dexRegistry.setAuthorised([kyberAdapter.address, uniswapV2Adapter.address], [true, true]); }); - it.skip(`lets old wallets call ${method} successfully`, async () => { + it(`lets old wallets call ${method} successfully`, async () => { // create wallet const oldWalletImplementation = await OldWallet.new(); const proxy = await Proxy.new(oldWalletImplementation.address); diff --git a/test/transferManager.js b/test/transferManager.js index 642be8b54..12c63ed97 100644 --- a/test/transferManager.js +++ b/test/transferManager.js @@ -9,6 +9,14 @@ const bnChai = require("bn-chai"); const { expect } = chai; chai.use(bnChai(BN)); +const TruffleContract = require("@truffle/contract"); + +const LegacyTransferManagerContract = require("../build-legacy/v1.6.0/TransferManager"); +const LegacyTokenPriceProviderContract = require("../build-legacy/v1.6.0/TokenPriceProvider"); + +const LegacyTransferManager = TruffleContract(LegacyTransferManagerContract); +const LegacyTokenPriceProvider = TruffleContract(LegacyTokenPriceProviderContract); + const Proxy = artifacts.require("Proxy"); const BaseWallet = artifacts.require("BaseWallet"); const Registry = artifacts.require("ModuleRegistry"); @@ -21,17 +29,12 @@ const TokenPriceRegistry = artifacts.require("TokenPriceRegistry"); const RelayerManager = artifacts.require("RelayerManager"); const TransferManager = artifacts.require("TransferManager"); -// const LegacyTransferManager = require("../build-legacy/v1.6.0/TransferManager"); -// const LegacyTokenPriceProvider = require("../build-legacy/v1.6.0/TokenPriceProvider"); -let LegacyTransferManager; -let LegacyTokenPriceProvider; - const ERC20 = artifacts.require("TestERC20"); const WETH = artifacts.require("WETH9"); const TestContract = artifacts.require("TestContract"); const utils = require("../utils/utilities.js"); -const { ETH_TOKEN, increaseTime } = require("../utils/utilities.js"); +const { ETH_TOKEN } = require("../utils/utilities.js"); const ETH_LIMIT = 1000000; const SECURITY_PERIOD = 2; @@ -42,7 +45,7 @@ const ACTION_TRANSFER = 0; const RelayManager = require("../utils/relay-manager"); -contract.skip("TransferManager", (accounts) => { +contract("TransferManager", (accounts) => { const manager = new RelayManager(); const infrastructure = accounts[0]; @@ -68,6 +71,11 @@ contract.skip("TransferManager", (accounts) => { let versionManager; before(async () => { + LegacyTransferManager.defaults({ from: accounts[0] }); + LegacyTransferManager.setProvider(web3.currentProvider); + LegacyTokenPriceProvider.defaults({ from: accounts[0] }); + LegacyTokenPriceProvider.setProvider(web3.currentProvider); + weth = await WETH.new(); registry = await Registry.new(); @@ -181,7 +189,7 @@ contract.skip("TransferManager", (accounts) => { await transferManager.addToWhitelist(wallet.address, recipient, { from: owner }); let isTrusted = await transferManager.isWhitelisted(wallet.address, recipient); assert.isFalse(isTrusted, "should not be trusted during the security period"); - await increaseTime(3); + await utils.increaseTime(3); isTrusted = await transferManager.isWhitelisted(wallet.address, recipient); assert.isTrue(isTrusted, "should be trusted after the security period"); await transferManager.removeFromWhitelist(wallet.address, recipient, { from: owner }); @@ -191,7 +199,7 @@ contract.skip("TransferManager", (accounts) => { it("should not be able to whitelist a token twice", async () => { await transferManager.addToWhitelist(wallet.address, recipient, { from: owner }); - await increaseTime(3); + await utils.increaseTime(3); await truffleAssert.reverts( transferManager.addToWhitelist(wallet.address, recipient, { from: owner }), "TT: target already whitelisted", ); @@ -201,7 +209,7 @@ contract.skip("TransferManager", (accounts) => { await transferManager.addToWhitelist(wallet.address, recipient, { from: owner }); await transferManager.removeFromWhitelist(wallet.address, recipient, { from: owner }); - await increaseTime(3); + await utils.increaseTime(3); const isTrusted = await transferManager.isWhitelisted(wallet.address, recipient); assert.isFalse(isTrusted); }); @@ -283,7 +291,7 @@ contract.skip("TransferManager", (accounts) => { // change the limit await previousTransferManager.changeLimit(existingWallet.address, 4000000, { from: owner }); - await increaseTime(SECURITY_PERIOD + 1); + await utils.increaseTime(SECURITY_PERIOD + 1); let limit = await previousTransferManager.getCurrentLimit(existingWallet.address); expect(limit).to.eq.BN(4000000); // transfer some funds @@ -292,7 +300,7 @@ contract.skip("TransferManager", (accounts) => { await previousTransferManager.addModule(existingWallet.address, versionManager.address, { from: owner }); const tx = await versionManager.upgradeWallet(existingWallet.address, await versionManager.lastVersion(), { from: owner }); const txReceipt = tx.receipt; - assert.isTrue(utils.hasEvent(txReceipt, "DailyLimitMigrated")); + await utils.hasEvent(txReceipt, transferManager, "DailyLimitMigrated"); // check result limit = await transferManager.getCurrentLimit(existingWallet.address); expect(limit).to.eq.BN(4000000); @@ -310,7 +318,7 @@ contract.skip("TransferManager", (accounts) => { await transferManager.changeLimit(wallet.address, 4000000, { from: owner }); let limit = await transferManager.getCurrentLimit(wallet.address); expect(limit).to.eq.BN(ETH_LIMIT); - await increaseTime(SECURITY_PERIOD + 1); + await utils.increaseTime(SECURITY_PERIOD + 1); limit = await transferManager.getCurrentLimit(wallet.address); expect(limit).to.eq.BN(4000000); }); @@ -325,14 +333,14 @@ contract.skip("TransferManager", (accounts) => { it("should change the limit via relayed transaction", async () => { await manager.relay(transferManager, "changeLimit", [wallet.address, 4000000], wallet, [owner]); - await increaseTime(SECURITY_PERIOD + 1); + await utils.increaseTime(SECURITY_PERIOD + 1); const limit = await transferManager.getCurrentLimit(wallet.address); assert.equal(limit.toNumber(), 4000000, "limit should be changed"); }); it("should correctly set the pending limit", async () => { const tx = await transferManager.changeLimit(wallet.address, 4000000, { from: owner }); - const timestamp = await manager.getTimestamp(tx.receipt.block); + const timestamp = await utils.getTimestamp(tx.receipt.block); const { _pendingLimit, _changeAfter } = await transferManager.getPendingLimit(wallet.address); assert.equal(_pendingLimit.toNumber(), 4000000); assert.closeTo(_changeAfter.toNumber(), timestamp + SECURITY_PERIOD, 1); // timestamp is sometimes off by 1 @@ -341,10 +349,10 @@ contract.skip("TransferManager", (accounts) => { it("should be able to disable the limit", async () => { const tx = await transferManager.disableLimit(wallet.address, { from: owner }); const txReceipt = tx.receipt; - assert.isTrue(utils.hasEvent(txReceipt, "DailyLimitDisabled")); + await utils.hasEvent(txReceipt, transferManager, "DailyLimitDisabled"); let limitDisabled = await transferManager.isLimitDisabled(wallet.address); assert.isFalse(limitDisabled); - await increaseTime(SECURITY_PERIOD + 1); + await utils.increaseTime(SECURITY_PERIOD + 1); limitDisabled = await transferManager.isLimitDisabled(wallet.address); assert.isTrue(limitDisabled); }); @@ -361,13 +369,13 @@ contract.skip("TransferManager", (accounts) => { await wallet.send(new BN(ETH_LIMIT)); // Transfer 100 wei const tx = await transferManager.transferToken(wallet.address, ETH_TOKEN, recipient, 100, ZERO_BYTES32, { from: owner }); - const timestamp = await manager.getTimestamp(tx.receipt.block); + const timestamp = await utils.getTimestamp(tx.receipt.block); // Then transfer 200 wei more await transferManager.transferToken(wallet.address, ETH_TOKEN, recipient, 200, ZERO_BYTES32, { from: owner }); const dailySpent = await limitStorage.getDailySpent(wallet.address); - assert.equal(dailySpent[0].toNumber(), 300); - assert.closeTo(dailySpent[1].toNumber(), timestamp + (3600 * 24), 1); // timestamp is sometimes off by 1 + assert.equal(dailySpent[0], 300); + assert.closeTo(new BN(dailySpent[1]).toNumber(), timestamp + (3600 * 24), 1); // timestamp is sometimes off by 1 }); it("should return 0 if the entire daily limit amount has been spent", async () => { @@ -393,7 +401,7 @@ contract.skip("TransferManager", (accounts) => { txReceipt = tx.receipt; } await utils.hasEvent(txReceipt, transferManager, "Transfer"); - const fundsAfter = (token === ETH_TOKEN ? await to.getBalance() : await token.balanceOf(to.address)); + const fundsAfter = (token === ETH_TOKEN ? await utils.getBalance(to) : await token.balanceOf(to)); const unspentAfter = await transferManager.getDailyUnspent(wallet.address); assert.equal(fundsAfter.sub(fundsBefore).toNumber(), amount, "should have transfered amount"); const ethValue = (token === ETH_TOKEN ? amount : (await getEtherValue(amount, token.address)).toNumber()); @@ -407,8 +415,8 @@ contract.skip("TransferManager", (accounts) => { token, to, amount, delay, relayed = false, }) { const tokenAddress = token === ETH_TOKEN ? ETH_TOKEN : token.address; - const fundsBefore = (token === ETH_TOKEN ? await utils.getBalance(to.address) : await token.balanceOf(to.address)); - const params = [wallet.address, tokenAddress, to.address, amount, ZERO_BYTES32]; + const fundsBefore = (token === ETH_TOKEN ? await utils.getBalance(to) : await token.balanceOf(to)); + const params = [wallet.address, tokenAddress, to, amount, ZERO_BYTES32]; let txReceipt; let tx; if (relayed) { @@ -418,19 +426,19 @@ contract.skip("TransferManager", (accounts) => { txReceipt = tx.receipt; } await utils.hasEvent(txReceipt, transferManager, "PendingTransferCreated"); - let fundsAfter = (token === ETH_TOKEN ? await utils.getBalance(to.address) : await token.balanceOf(to.address)); + let fundsAfter = (token === ETH_TOKEN ? await utils.getBalance(to) : await token.balanceOf(to)); assert.equal(fundsAfter.sub(fundsBefore).toNumber(), 0, "should not have transfered amount"); if (delay === 0) { const id = ethers.utils.solidityKeccak256(["uint8", "address", "address", "uint256", "bytes", "uint256"], [ACTION_TRANSFER, tokenAddress, recipient, amount, ZERO_BYTES32, txReceipt.blockNumber]); return id; } - await increaseTime(delay); + await utils.increaseTime(delay); tx = await transferManager.executePendingTransfer(wallet.address, tokenAddress, recipient, amount, ZERO_BYTES32, txReceipt.blockNumber); txReceipt = tx.receipt; await utils.hasEvent(txReceipt, transferManager, "PendingTransferExecuted"); - fundsAfter = (token === ETH_TOKEN ? await utils.getBalance(to.address) : await token.balanceOf(to.address)); + fundsAfter = (token === ETH_TOKEN ? await utils.getBalance(to) : await token.balanceOf(to)); return assert.equal(fundsAfter.sub(fundsBefore).toNumber(), amount, "should have transfered amount"); } @@ -456,14 +464,10 @@ contract.skip("TransferManager", (accounts) => { }); it("should only let the owner send ETH", async () => { - try { - await doDirectTransfer({ - token: ETH_TOKEN, signer: nonowner, to: recipient, amount: 10000, - }); - assert.fail("transfer should have failed"); - } catch (error) { - assert.equal(error, "BM: must be owner or feature"); - } + const params = [wallet.address, ETH_TOKEN, recipient, 10000, ZERO_BYTES32]; + await truffleAssert.reverts( + transferManager.transferToken(...params, { from: nonowner }), + "BF: must be owner or feature"); }); it("should calculate the daily unspent when the owner send ETH", async () => { @@ -510,50 +514,50 @@ contract.skip("TransferManager", (accounts) => { }); it("should not execute a pending ETH transfer before the confirmation window", async () => { - try { - await doPendingTransfer({ - token: ETH_TOKEN, to: recipient, amount: ETH_LIMIT * 2, delay: 1, relayed: false, - }); - } catch (error) { - assert.equal(error, "outside of the execution window"); - } + const params = [wallet.address, ETH_TOKEN, recipient, ETH_LIMIT * 2, ZERO_BYTES32]; + const tx = await transferManager.transferToken(...params, { from: owner }); + + await utils.increaseTime(1); + await truffleAssert.reverts( + transferManager.executePendingTransfer(wallet.address, ETH_TOKEN, recipient, ETH_LIMIT * 2, ZERO_BYTES32, tx.receipt.blockNumber), + "TT: transfer outside of the execution window"); }); it("should not execute a pending ETH transfer before the confirmation window (relayed)", async () => { - try { - await doPendingTransfer({ - token: ETH_TOKEN, to: recipient, amount: ETH_LIMIT * 2, delay: 1, relayed: true, - }); - } catch (error) { - assert.equal(error, "outside of the execution window"); - } + const params = [wallet.address, ETH_TOKEN, recipient, ETH_LIMIT * 2, ZERO_BYTES32]; + const txReceipt = await manager.relay(transferManager, "transferToken", params, wallet, [owner]); + + await utils.increaseTime(1); + await truffleAssert.reverts( + transferManager.executePendingTransfer(wallet.address, ETH_TOKEN, recipient, ETH_LIMIT * 2, ZERO_BYTES32, txReceipt.blockNumber), + "TT: transfer outside of the execution window"); }); it("should not execute a pending ETH transfer after the confirmation window", async () => { - try { - await doPendingTransfer({ - token: ETH_TOKEN, to: recipient, amount: ETH_LIMIT * 2, delay: 10, relayed: false, - }); - } catch (error) { - assert.equal(error, "outside of the execution window"); - } + const params = [wallet.address, ETH_TOKEN, recipient, ETH_LIMIT * 2, ZERO_BYTES32]; + const tx = await transferManager.transferToken(...params, { from: owner }); + + await utils.increaseTime(10); + await truffleAssert.reverts( + transferManager.executePendingTransfer(wallet.address, ETH_TOKEN, recipient, ETH_LIMIT * 2, ZERO_BYTES32, tx.receipt.blockNumber), + "TT: transfer outside of the execution window"); }); it("should not execute a pending ETH transfer after the confirmation window (relayed)", async () => { - try { - await doPendingTransfer({ - token: ETH_TOKEN, to: recipient, amount: ETH_LIMIT * 2, delay: 10, relayed: true, - }); - } catch (error) { - assert.equal(error, "outside of the execution window"); - } + const params = [wallet.address, ETH_TOKEN, recipient, ETH_LIMIT * 2, ZERO_BYTES32]; + const txReceipt = await manager.relay(transferManager, "transferToken", params, wallet, [owner]); + + await utils.increaseTime(10); + await truffleAssert.reverts( + transferManager.executePendingTransfer(wallet.address, ETH_TOKEN, recipient, ETH_LIMIT * 2, ZERO_BYTES32, txReceipt.blockNumber), + "TT: transfer outside of the execution window"); }); it("should cancel a pending ETH transfer", async () => { const id = await doPendingTransfer({ token: ETH_TOKEN, to: recipient, amount: ETH_LIMIT * 2, delay: 0, }); - await increaseTime(1); + await utils.increaseTime(1); const tx = await transferManager.cancelPendingTransfer(wallet.address, id, { from: owner }); const txReceipt = tx.receipt; await utils.hasEvent(txReceipt, transferManager, "PendingTransferCanceled"); @@ -565,7 +569,7 @@ contract.skip("TransferManager", (accounts) => { const id = await doPendingTransfer({ token: erc20, to: recipient, amount: ETH_LIMIT * 2, delay: 0, }); - await increaseTime(1); + await utils.increaseTime(1); const tx = await transferManager.cancelPendingTransfer(wallet.address, id, { from: owner }); const txReceipt = tx.receipt; await utils.hasEvent(txReceipt, transferManager, "PendingTransferCanceled"); @@ -575,13 +579,13 @@ contract.skip("TransferManager", (accounts) => { it("should send immediately ETH to a whitelisted address", async () => { await transferManager.addToWhitelist(wallet.address, recipient, { from: owner }); - await increaseTime(3); + await utils.increaseTime(3); await doDirectTransfer({ token: ETH_TOKEN, to: recipient, amount: ETH_LIMIT * 2 }); }); it("should send immediately ERC20 to a whitelisted address", async () => { await transferManager.addToWhitelist(wallet.address, recipient, { from: owner }); - await increaseTime(3); + await utils.increaseTime(3); await doDirectTransfer({ token: erc20, to: recipient, amount: ETH_LIMIT * 2 }); }); }); @@ -627,26 +631,23 @@ contract.skip("TransferManager", (accounts) => { }); it("should not approve an ERC20 transfer when the signer is not the owner ", async () => { - try { - await doDirectApprove({ signer: nonowner, amount: 10 }); - assert.fail("approve should have failed"); - } catch (error) { - assert.equal(error, "BF: must be owner or feature"); - } + const params = [wallet.address, erc20.address, spender, 10]; + truffleAssert.reverts( + transferManager.approveToken(...params, { from: nonowner }), + "BF: must be owner or feature"); }); it("should approve an ERC20 immediately when the spender is whitelisted ", async () => { await transferManager.addToWhitelist(wallet.address, spender, { from: owner }); - await increaseTime(3); + await utils.increaseTime(3); await doDirectApprove({ amount: ETH_LIMIT + 10000 }); }); it("should fail to approve an ERC20 when the amount is above the daily limit ", async () => { - try { - await doDirectApprove({ amount: ETH_LIMIT + 10000 }); - } catch (error) { - assert.equal(error, "above daily limit"); - } + const params = [wallet.address, erc20.address, spender, ETH_LIMIT + 10000]; + truffleAssert.reverts( + transferManager.approveToken(...params, { from: owner }), + "above daily limit"); }); }); @@ -659,7 +660,7 @@ contract.skip("TransferManager", (accounts) => { }); async function doCallContract({ value, state, relayed = false }) { - const dataToTransfer = contract.contract.methods.setState([state]).encodeABI(); + const dataToTransfer = contract.contract.methods.setState(state).encodeABI(); const unspentBefore = await transferManager.getDailyUnspent(wallet.address); const params = [wallet.address, contract.address, value, dataToTransfer]; let txReceipt; @@ -679,27 +680,27 @@ contract.skip("TransferManager", (accounts) => { } it("should not be able to call the wallet itselt", async () => { - const dataToTransfer = contract.contract.methods.setState([4]).encodeABI(); + const dataToTransfer = contract.contract.methods.setState(4).encodeABI(); const params = [wallet.address, wallet.address, 10, dataToTransfer]; await truffleAssert.reverts(transferManager.callContract(...params, { from: owner }), "BT: Forbidden contract"); }); it("should not be able to call a feature of the wallet", async () => { - const dataToTransfer = contract.contract.methods.setState([4]).encodeABI(); + const dataToTransfer = contract.contract.methods.setState(4).encodeABI(); const params = [wallet.address, transferManager.address, 10, dataToTransfer]; await truffleAssert.reverts(transferManager.callContract(...params, { from: owner }), "BT: Forbidden contract"); }); it("should not be able to call a supported ERC20 token contract", async () => { - const dataToTransfer = contract.contract.methods.setState([4]).encodeABI(); + const dataToTransfer = contract.contract.methods.setState(4).encodeABI(); const params = [wallet.address, erc20.address, 10, dataToTransfer]; await truffleAssert.reverts(transferManager.callContract(...params, { from: owner }), "TM: Forbidden contract"); }); it("should be able to call a supported token contract which is whitelisted", async () => { await transferManager.addToWhitelist(wallet.address, erc20.address, { from: owner }); - await increaseTime(3); - const dataToTransfer = erc20.contract.methods.transfer([infrastructure, 4]).encodeABI(); + await utils.increaseTime(3); + const dataToTransfer = erc20.contract.methods.transfer(infrastructure, 4).encodeABI(); const params = [wallet.address, erc20.address, 0, dataToTransfer]; await transferManager.callContract(...params, { from: owner }); }); @@ -714,7 +715,7 @@ contract.skip("TransferManager", (accounts) => { it("should call a contract and transfer ETH value above the daily limit when the contract is whitelisted", async () => { await transferManager.addToWhitelist(wallet.address, contract.address, { from: owner }); - await increaseTime(3); + await utils.increaseTime(3); await doCallContract({ value: ETH_LIMIT + 10000, state: 6 }); }); @@ -736,7 +737,7 @@ contract.skip("TransferManager", (accounts) => { }) { const fun = consumer === contract.address ? "setStateAndPayToken" : "setStateAndPayTokenWithConsumer"; const token = wrapEth ? weth : erc20; - const dataToTransfer = contract.contract.methods[fun]([state, token.address, amount]).encodeABI(); + const dataToTransfer = contract.contract.methods[fun](state, token.address, amount).encodeABI(); const unspentBefore = await transferManager.getDailyUnspent(wallet.address); const params = [wallet.address] .concat(wrapEth ? [] : [erc20.address]) @@ -774,7 +775,7 @@ contract.skip("TransferManager", (accounts) => { it("should restore existing approved amount after call", async () => { await transferManager.approveToken(wallet.address, erc20.address, contract.address, 10, { from: owner }); - const dataToTransfer = contract.contract.methods.setStateAndPayToken([3, erc20.address, 5]).encodeABI(); + const dataToTransfer = contract.contract.methods.setStateAndPayToken(3, erc20.address, 5).encodeABI(); await transferManager.approveTokenAndCallContract( wallet.address, erc20.address, @@ -795,7 +796,7 @@ contract.skip("TransferManager", (accounts) => { it("should be able to spend less than approved in call", async () => { await transferManager.approveToken(wallet.address, erc20.address, contract.address, 10, { from: owner }); - const dataToTransfer = contract.contract.methods.setStateAndPayToken([3, erc20.address, 4]).encodeABI(); + const dataToTransfer = contract.contract.methods.setStateAndPayToken(3, erc20.address, 4).encodeABI(); await transferManager.approveTokenAndCallContract( wallet.address, erc20.address, @@ -815,7 +816,7 @@ contract.skip("TransferManager", (accounts) => { it("should not be able to spend more than approved in call", async () => { await transferManager.approveToken(wallet.address, erc20.address, contract.address, 10, { from: owner }); - const dataToTransfer = contract.contract.methods.setStateAndPayToken([3, erc20.address, 6]).encodeABI(); + const dataToTransfer = contract.contract.methods.setStateAndPayToken(3, erc20.address, 6).encodeABI(); await truffleAssert.reverts(transferManager.approveTokenAndCallContract( wallet.address, erc20.address, @@ -829,7 +830,7 @@ contract.skip("TransferManager", (accounts) => { it("should approve the token and call the contract when the token is above the limit and the contract is whitelisted ", async () => { await transferManager.addToWhitelist(wallet.address, contract.address, { from: owner }); - await increaseTime(3); + await utils.increaseTime(3); await doApproveTokenAndCallContract({ amount: ETH_LIMIT + 10000, state: 6 }); }); @@ -841,7 +842,7 @@ contract.skip("TransferManager", (accounts) => { it("should approve token and call contract when contract != spender, amount > limit and contract is whitelisted", async () => { const consumer = await contract.tokenConsumer(); await transferManager.addToWhitelist(wallet.address, contract.address, { from: owner }); - await increaseTime(3); + await utils.increaseTime(3); await doApproveTokenAndCallContract({ amount: ETH_LIMIT + 10000, state: 6, consumer }); }); @@ -849,8 +850,8 @@ contract.skip("TransferManager", (accounts) => { const amount = ETH_LIMIT + 10000; const consumer = await contract.tokenConsumer(); await transferManager.addToWhitelist(wallet.address, consumer, { from: owner }); - await increaseTime(3); - const dataToTransfer = contract.contract.methods.setStateAndPayTokenWithConsumer([6, erc20.address, amount]).encodeABI(); + await utils.increaseTime(3); + const dataToTransfer = contract.contract.methods.setStateAndPayTokenWithConsumer(6, erc20.address, amount).encodeABI(); await truffleAssert.reverts( transferManager.approveTokenAndCallContract( wallet.address, erc20.address, consumer, amount, contract.address, dataToTransfer, { from: owner } @@ -860,17 +861,18 @@ contract.skip("TransferManager", (accounts) => { }); it("should fail to approve the token and call the contract when the token is above the daily limit ", async () => { - try { - await doApproveTokenAndCallContract({ amount: ETH_LIMIT + 10000, state: 6 }); - } catch (error) { - assert.equal(error, "above daily limit"); - } + const dataToTransfer = contract.contract.methods.setStateAndPayToken(6, erc20.address, ETH_LIMIT + 10000).encodeABI(); + const params = [wallet.address, erc20.address, contract.address, ETH_LIMIT + 10000, contract.address, dataToTransfer]; + + await truffleAssert.reverts( + transferManager.approveTokenAndCallContract(...params, { from: owner }), + "TM: Approve above daily limit"); }); it("should fail to approve token if the amount to be approved is greater than the current balance", async () => { const startingBalance = await erc20.balanceOf(wallet.address); await erc20.burn(wallet.address, startingBalance); - const dataToTransfer = contract.contract.methods.setStateAndPayToken([3, erc20.address, 1]).encodeABI(); + const dataToTransfer = contract.contract.methods.setStateAndPayToken(3, erc20.address, 1).encodeABI(); await truffleAssert.reverts(transferManager.approveTokenAndCallContract( wallet.address, erc20.address, @@ -895,34 +897,36 @@ contract.skip("TransferManager", (accounts) => { }); }); - describe("Static calls", () => { + describe.skip("Static calls", () => { it("should delegate isValidSignature static calls to the TransferManager", async () => { - const ERC1271_ISVALIDSIGNATURE_BYTES32 = ethers.utils.keccak256(ethers.utils.toUtf8Bytes("isValidSignature(bytes32,bytes)")).slice(0, 10); + const ERC1271_ISVALIDSIGNATURE_BYTES32 = utils.sha3("isValidSignature(bytes32,bytes)").slice(0, 10); const isValidSignatureDelegate = await wallet.enabled(ERC1271_ISVALIDSIGNATURE_BYTES32); assert.equal(isValidSignatureDelegate, versionManager.address); const walletAsTransferManager = await TransferManager.at(wallet.address); const signHash = ethers.utils.keccak256("0x1234"); - const sig = await utils.personalSign(signHash, owner); - const valid = await walletAsTransferManager.isValidSignature(signHash, sig); + const signedData = utils.signMessageHash(owner, signHash); + const valid = await walletAsTransferManager.isValidSignature(signedData.messageHash, signedData.signature); assert.equal(valid, ERC1271_ISVALIDSIGNATURE_BYTES32); }); + it("should revert isValidSignature static call for invalid signature", async () => { const walletAsTransferManager = await TransferManager.at(wallet.address); const signHash = ethers.utils.keccak256("0x1234"); - const sig = `${await utils.personalSign(signHash, owner)}a1`; + const signedData = utils.signMessageHash(owner, signHash); await truffleAssert.reverts( - walletAsTransferManager.isValidSignature(signHash, sig), "TM: invalid signature length", + walletAsTransferManager.isValidSignature(signedData.messageHash, `${signedData.signature}a1`), "TM: invalid signature length", ); }); + it("should revert isValidSignature static call for invalid signer", async () => { const walletAsTransferManager = await TransferManager.at(wallet.address); const signHash = ethers.utils.keccak256("0x1234"); - const sig = await utils.personalSign(signHash, nonowner); + const signedData = utils.signMessageHash(owner, signHash); await truffleAssert.reverts( - walletAsTransferManager.isValidSignature(signHash, sig), "TM: Invalid signer", + walletAsTransferManager.isValidSignature(signedData.messageHash, signedData.signature), "TM: Invalid signer", ); }); }); diff --git a/test/upgraderToVersionManager.js b/test/upgraderToVersionManager.js index 81ade83e5..20b40f483 100644 --- a/test/upgraderToVersionManager.js +++ b/test/upgraderToVersionManager.js @@ -1,6 +1,11 @@ /* global artifacts */ const ethers = require("ethers"); const truffleAssert = require("truffle-assertions"); +const TruffleContract = require("@truffle/contract"); + +const LegacyTransferManagerContract = require("../build-legacy/v1.6.0/TransferManager.json"); + +const LegacyTransferManager = TruffleContract(LegacyTransferManagerContract); const Proxy = artifacts.require("Proxy"); const BaseWallet = artifacts.require("BaseWallet"); @@ -12,7 +17,6 @@ const GuardianStorage = artifacts.require("GuardianStorage"); const LimitStorage = artifacts.require("LimitStorage"); const RelayerManager = artifacts.require("RelayerManager"); const TransferManager = artifacts.require("TransferManager"); -const LegacyTransferManager = artifacts.require("legacy/v1.6.0/TransferManager"); const UpgraderToVersionManager = artifacts.require("UpgraderToVersionManager"); const SECURITY_PERIOD = 3600; @@ -20,8 +24,9 @@ const SECURITY_WINDOW = 3600; const ETH_LIMIT = 1000000; const RelayManager = require("../utils/relay-manager"); +const utils = require("../utils/utilities.js"); -contract.skip("UpgraderToVersionManager", (accounts) => { +contract("UpgraderToVersionManager", (accounts) => { const manager = new RelayManager(); const owner = accounts[1]; @@ -40,6 +45,9 @@ contract.skip("UpgraderToVersionManager", (accounts) => { let upgrader; before(async () => { + LegacyTransferManager.defaults({ from: accounts[0] }); + LegacyTransferManager.setProvider(web3.currentProvider); + walletImplementation = await BaseWallet.new(); const registry = await Registry.new(); lockStorage = await LockStorage.new(); @@ -121,7 +129,7 @@ contract.skip("UpgraderToVersionManager", (accounts) => { it("should add/remove an account to/from the whitelist", async () => { await transferManager.addToWhitelist(wallet.address, recipient, { from: owner }); - await manager.increaseTime(SECURITY_PERIOD + 1); + await utils.increaseTime(SECURITY_PERIOD + 1); let isTrusted = await transferManager.isWhitelisted(wallet.address, recipient); assert.equal(isTrusted, true, "should be trusted after the security period"); await transferManager.removeFromWhitelist(wallet.address, recipient, { from: owner }); @@ -131,7 +139,7 @@ contract.skip("UpgraderToVersionManager", (accounts) => { it("should change the limit via relayed transaction", async () => { await manager.relay(transferManager, "changeLimit", [wallet.address, 4000000], wallet, [owner]); - await manager.increaseTime(SECURITY_PERIOD + 1); + await utils.increaseTime(SECURITY_PERIOD + 1); const limit = await transferManager.getCurrentLimit(wallet.address); assert.equal(limit.toNumber(), 4000000, "limit should be changed"); }); diff --git a/utils/relay-manager.js b/utils/relay-manager.js index e5fdf7758..df5d35f50 100644 --- a/utils/relay-manager.js +++ b/utils/relay-manager.js @@ -15,7 +15,8 @@ class RelayManager { _gasPrice = 0, _refundToken = ETH_TOKEN, _refundAddress = ethers.constants.AddressZero, - _gasLimitRelay = (_gasLimit * 1.1)) { + _gasLimitRelay) { + if (!_gasLimitRelay) { _gasLimitRelay = (_gasLimit * 1.1); } // eslint-disable-line no-param-reassign const relayerAccount = _relayerAccount || await utils.getAccount(9); const nonce = _nonce || await utils.getNonceForRelay(); const methodData = _module.contract.methods[_method](..._params).encodeABI(); @@ -33,6 +34,7 @@ class RelayManager { _refundToken, _refundAddress, ); + if (_estimate === true) { const gasUsed = await this.relayerManager.estimate.execute( _wallet.address, @@ -44,7 +46,7 @@ class RelayManager { _gasLimit, _refundToken, _refundAddress, - { gasLimit: _gasLimitRelay, gasPrice: _gasPrice }, + { gas: _gasLimitRelay, gasPrice: _gasPrice }, ); return gasUsed; } @@ -59,7 +61,7 @@ class RelayManager { _gasLimit, _refundToken, _refundAddress, - { gasLimit: _gasLimitRelay, gasPrice: _gasPrice, from: relayerAccount }, + { gas: _gasLimitRelay, gasPrice: _gasPrice, from: relayerAccount }, ); return tx.receipt; From 85f3aa62e9601625585e1dcf94c12eb72beea329 Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Sat, 21 Nov 2020 11:13:01 +0200 Subject: [PATCH 103/113] Use contract error messages inline --- test/approvedTransfer.js | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/test/approvedTransfer.js b/test/approvedTransfer.js index fd4d67201..32765cf2b 100644 --- a/test/approvedTransfer.js +++ b/test/approvedTransfer.js @@ -23,9 +23,6 @@ const utils = require("../utils/utilities.js"); const ZERO_BYTES32 = ethers.constants.HashZero; -const WRONG_SIGNATURE_NUMBER_REVERT_MSG = "RM: Wrong number of signatures"; -const INVALID_SIGNATURES_REVERT_MSG = "RM: Invalid signatures"; - contract("ApprovedTransfer", (accounts) => { const manager = new RelayManager(); @@ -175,7 +172,7 @@ contract("ApprovedTransfer", (accounts) => { await transferToken(ETH_TOKEN, [owner, guardian1]); }); it("should fail to transfer ETH when signer is not a guardian", async () => { - await expectFailingTransferToken(ETH_TOKEN, [owner, guardian2], INVALID_SIGNATURES_REVERT_MSG); + await expectFailingTransferToken(ETH_TOKEN, [owner, guardian2], "RM: Invalid signatures"); }); it("should transfer ERC20 with 1 confirmation for 1 guardian", async () => { await transferToken(erc20.address, [owner, guardian1]); @@ -194,13 +191,13 @@ contract("ApprovedTransfer", (accounts) => { await addGuardians([guardian1, guardian2, guardian3]); }); it("should not transfer ETH with 1 confirmation for 3 guardians", async () => { - await expectFailingTransferToken(ETH_TOKEN, [owner, guardian1], WRONG_SIGNATURE_NUMBER_REVERT_MSG); + await expectFailingTransferToken(ETH_TOKEN, [owner, guardian1], "RM: Wrong number of signatures"); }); it("should transfer ETH with 2 confirmations for 3 guardians", async () => { await transferToken(ETH_TOKEN, [owner, ...sortWalletByAddress([guardian1, guardian2])]); }); it("should fail to transfer ERC20 with 1 confirmation for 3 guardians", async () => { - await expectFailingTransferToken(erc20.address, [owner, guardian1], WRONG_SIGNATURE_NUMBER_REVERT_MSG); + await expectFailingTransferToken(erc20.address, [owner, guardian1], "RM: Wrong number of signatures"); }); it("should transfer ERC20 with 2 confirmations for 3 guardians", async () => { await transferToken(erc20.address, [owner, ...sortWalletByAddress([guardian1, guardian2])]); @@ -233,13 +230,13 @@ contract("ApprovedTransfer", (accounts) => { await addGuardians(await createSmartContractGuardians([guardian1, guardian2, guardian3])); }); it("should not transfer ETH with 1 confirmation for 3 guardians", async () => { - await expectFailingTransferToken(ETH_TOKEN, [owner, guardian1], WRONG_SIGNATURE_NUMBER_REVERT_MSG); + await expectFailingTransferToken(ETH_TOKEN, [owner, guardian1], "RM: Wrong number of signatures"); }); it("should transfer ETH with 2 confirmations for 3 guardians", async () => { await transferToken(ETH_TOKEN, [owner, ...sortWalletByAddress([guardian1, guardian2])]); }); it("should not transfer ERC20 with 1 confirmations for 3 guardians", async () => { - await expectFailingTransferToken(erc20.address, [owner, guardian1], WRONG_SIGNATURE_NUMBER_REVERT_MSG); + await expectFailingTransferToken(erc20.address, [owner, guardian1], "RM: Wrong number of signatures"); }); it("should transfer ERC20 with 2 confirmations for 3 guardians", async () => { await transferToken(erc20.address, [owner, ...sortWalletByAddress([guardian1, guardian2])]); From 0a91ffe3971b91aa8905b65c9ecfd22362bebbd2 Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Sat, 21 Nov 2020 13:23:53 +0200 Subject: [PATCH 104/113] Fix tests --- test/transferManager.js | 18 ++++++++---------- utils/multisigexecutor.js | 2 +- utils/utilities.js | 6 +++--- 3 files changed, 12 insertions(+), 14 deletions(-) diff --git a/test/transferManager.js b/test/transferManager.js index 12c63ed97..4c4e96268 100644 --- a/test/transferManager.js +++ b/test/transferManager.js @@ -517,7 +517,6 @@ contract("TransferManager", (accounts) => { const params = [wallet.address, ETH_TOKEN, recipient, ETH_LIMIT * 2, ZERO_BYTES32]; const tx = await transferManager.transferToken(...params, { from: owner }); - await utils.increaseTime(1); await truffleAssert.reverts( transferManager.executePendingTransfer(wallet.address, ETH_TOKEN, recipient, ETH_LIMIT * 2, ZERO_BYTES32, tx.receipt.blockNumber), "TT: transfer outside of the execution window"); @@ -527,7 +526,6 @@ contract("TransferManager", (accounts) => { const params = [wallet.address, ETH_TOKEN, recipient, ETH_LIMIT * 2, ZERO_BYTES32]; const txReceipt = await manager.relay(transferManager, "transferToken", params, wallet, [owner]); - await utils.increaseTime(1); await truffleAssert.reverts( transferManager.executePendingTransfer(wallet.address, ETH_TOKEN, recipient, ETH_LIMIT * 2, ZERO_BYTES32, txReceipt.blockNumber), "TT: transfer outside of the execution window"); @@ -897,36 +895,36 @@ contract("TransferManager", (accounts) => { }); }); - describe.skip("Static calls", () => { - it("should delegate isValidSignature static calls to the TransferManager", async () => { + describe("Static calls", () => { + it.skip("should delegate isValidSignature static calls to the TransferManager", async () => { const ERC1271_ISVALIDSIGNATURE_BYTES32 = utils.sha3("isValidSignature(bytes32,bytes)").slice(0, 10); const isValidSignatureDelegate = await wallet.enabled(ERC1271_ISVALIDSIGNATURE_BYTES32); assert.equal(isValidSignatureDelegate, versionManager.address); const walletAsTransferManager = await TransferManager.at(wallet.address); const signHash = ethers.utils.keccak256("0x1234"); - const signedData = utils.signMessageHash(owner, signHash); - const valid = await walletAsTransferManager.isValidSignature(signedData.messageHash, signedData.signature); + const signature = `0x${utils.signMessageHash(owner, signHash)}`; + const valid = await walletAsTransferManager.isValidSignature(signHash, signature); assert.equal(valid, ERC1271_ISVALIDSIGNATURE_BYTES32); }); it("should revert isValidSignature static call for invalid signature", async () => { const walletAsTransferManager = await TransferManager.at(wallet.address); const signHash = ethers.utils.keccak256("0x1234"); - const signedData = utils.signMessageHash(owner, signHash); + const signature = utils.signMessageHash(owner, signHash); await truffleAssert.reverts( - walletAsTransferManager.isValidSignature(signedData.messageHash, `${signedData.signature}a1`), "TM: invalid signature length", + walletAsTransferManager.isValidSignature(signHash, `0x${signature}a1`), "TM: invalid signature length", ); }); it("should revert isValidSignature static call for invalid signer", async () => { const walletAsTransferManager = await TransferManager.at(wallet.address); const signHash = ethers.utils.keccak256("0x1234"); - const signedData = utils.signMessageHash(owner, signHash); + const signature = `0x${utils.signMessageHash(owner, signHash)}`; await truffleAssert.reverts( - walletAsTransferManager.isValidSignature(signedData.messageHash, signedData.signature), "TM: Invalid signer", + walletAsTransferManager.isValidSignature(signHash, signature), "TM: Invalid signer", ); }); }); diff --git a/utils/multisigexecutor.js b/utils/multisigexecutor.js index d7dd981ad..82b617800 100644 --- a/utils/multisigexecutor.js +++ b/utils/multisigexecutor.js @@ -22,7 +22,7 @@ class MultisigExecutor { if (this._autoSign === true) { // Get the off chain signature - let signature = await utils.signMessageHash(this._ownerAccount, signHash); + let signature = utils.signMessageHash(this._ownerAccount, signHash); // to make sure signature ends with 27/28 const split = ethers.utils.splitSignature(signature); diff --git a/utils/utilities.js b/utils/utilities.js index 5c6e88b85..2e1986e00 100644 --- a/utils/utilities.js +++ b/utils/utilities.js @@ -63,15 +63,17 @@ module.exports = { const msgHashBuff = ethUtil.hashPersonalMessage(dataBuff); const accountsJson = JSON.parse(fs.readFileSync("./ganache-accounts.json", "utf8")); - const pkey = accountsJson.private_keys[signer.toLowerCase()]; if (!pkey) throw new Error(`${signer} account private key not found`); + const sig = ethUtil.ecsign(msgHashBuff, Buffer.from(pkey, "hex")); const signature = ethUtil.toRpcSig(sig.v, sig.r, sig.s); const split = ethers.utils.splitSignature(signature); return ethers.utils.joinSignature(split).slice(2); }, + personalSign: async (signHash, signer) => ethers.utils.joinSignature(signer.signingKey.signDigest(signHash)), + sortWalletByAddress(wallets) { return wallets.sort((s1, s2) => { const bn1 = ethers.BigNumber.from(s1); @@ -174,8 +176,6 @@ module.exports = { ); }, - personalSign: async (signHash, signer) => ethers.utils.joinSignature(signer.signingKey.signDigest(signHash)), - async getBalance(account) { const balance = await web3.eth.getBalance(account); return new BN(balance); From 45e9729525f5398705a10269c64ef5739fb8f579 Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Sat, 21 Nov 2020 17:31:56 +0200 Subject: [PATCH 105/113] Exclude coverage for non Argent contracts --- .solcover.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.solcover.js b/.solcover.js index 6c8d6ac0a..b3c530c0f 100644 --- a/.solcover.js +++ b/.solcover.js @@ -1,9 +1,9 @@ module.exports = { client: require('ganache-cli'), skipFiles: [ - "contracts-test", - "lib", - "maker" + "../contracts-test", + "../contracts-legacy", + "../lib" ], providerOptions: { port: 8555, From 4d0198bd8f347fd3a9d9417347b9639f78c5caab Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Sat, 21 Nov 2020 19:22:28 +0200 Subject: [PATCH 106/113] Fix a miltisig test --- test/multisig.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/multisig.js b/test/multisig.js index a89f96223..62665ac0a 100644 --- a/test/multisig.js +++ b/test/multisig.js @@ -237,7 +237,7 @@ contract("MultiSigWallet", (accounts) => { it("should fail with the wrong nonce", async () => { const nonceOffset = 1; - await executeSendFailure([owner1, owner2], nonceOffset, true, false, "MSW: Not enough valid signatures"); + await executeSendFailure([owner1, owner2], nonceOffset, true, false, "MSW: Badly ordered signatures"); }); it("should fail with the wrong signature", async () => { From cf7e41fa6e9e9f2bd4ff6be464173030884f4098 Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Sun, 22 Nov 2020 10:31:07 +0200 Subject: [PATCH 107/113] Drop coverage thresholds until we figure out what is causing the result discrepancies https://github.com/sc-forks/solidity-coverage/issues/559#issuecomment-731621483 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 504bccf7b..1c9318458 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "test": "npx truffle test --compile-none", "ctest": "npm run compile && npm run test", "provision:lib:artefacts": "bash ./scripts/provision_lib_artefacts.sh", - "test:coverage": "node scripts/coverage.js && istanbul check-coverage --statements 94 --branches 83 --functions 96 --lines 94", + "test:coverage": "node scripts/coverage.js && istanbul check-coverage --statements 82 --branches 78 --functions 82 --lines 82", "lint:js": "eslint .", "lint:contracts": "npx solhint contracts/**/*.sol && npx solhint contracts/**/**/*.sol", "test:deployment": "./scripts/deploy.sh --no-compile development `seq 1 6`", From dee7bfcca6dad06a29a80a6a64dd829aeb117dce Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Tue, 24 Nov 2020 18:00:21 +0200 Subject: [PATCH 108/113] Add etherscan verification script --- package-lock.json | 129 ++++++++++++++++++++++++++++++++++------------ package.json | 6 ++- scripts/verify.js | 55 ++++++++++++++++++++ 3 files changed, 155 insertions(+), 35 deletions(-) create mode 100644 scripts/verify.js diff --git a/package-lock.json b/package-lock.json index dc6deae22..190ebedba 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3088,6 +3088,11 @@ "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", "dev": true }, + "array-filter": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-filter/-/array-filter-1.0.0.tgz", + "integrity": "sha1-uveeYubvTCpMC4MSMtr/7CUfnYM=" + }, "array-flatten": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", @@ -3248,6 +3253,14 @@ "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", "dev": true }, + "available-typed-arrays": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.2.tgz", + "integrity": "sha512-XWX3OX8Onv97LMk/ftVyBibpGwY5a8SmuxZPzeOxqmuEqUCOM9ZE+uIaD1VNJ5QnvU2UQusvmKbuM1FR8QWGfQ==", + "requires": { + "array-filter": "^1.0.0" + } + }, "await-semaphore": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/await-semaphore/-/await-semaphore-0.1.3.tgz", @@ -3289,32 +3302,6 @@ "dev": true, "requires": { "follow-redirects": "1.5.10" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "follow-redirects": { - "version": "1.5.10", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz", - "integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==", - "dev": true, - "requires": { - "debug": "=3.1.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } } }, "backoff": { @@ -3817,6 +3804,11 @@ "parse5": "^3.0.1" } }, + "child_process": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/child_process/-/child_process-1.0.2.tgz", + "integrity": "sha1-sffn/HPSXn/R1FWtyU4UODAYK1o=" + }, "chokidar": { "version": "3.4.2", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.2.tgz", @@ -7069,6 +7061,32 @@ "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==", "dev": true }, + "follow-redirects": { + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz", + "integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==", + "dev": true, + "requires": { + "debug": "=3.1.0" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, "for-in": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", @@ -7084,6 +7102,11 @@ "for-in": "^1.0.1" } }, + "foreach": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", + "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=" + }, "forever-agent": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", @@ -8879,8 +8902,7 @@ "is-arguments": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.0.4.tgz", - "integrity": "sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA==", - "dev": true + "integrity": "sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA==" }, "is-arrayish": { "version": "0.2.1", @@ -8976,6 +8998,11 @@ "integrity": "sha512-lw7DUp0aWXYg+CBCN+JKkcE0Q2RayZnSvnZBlwgxHBQhqt5pZNVy4Ri7H9GmmXkdu7LUthszM+Tor1u/2iBcpQ==", "dev": true }, + "is-generator-function": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.7.tgz", + "integrity": "sha512-YZc5EwyO4f2kWCax7oegfuSr9mFz1ZvieNYBEjmukLxgXfBUbxAWGVF7GZf0zidYtoBl3WvC07YK0wT76a+Rtw==" + }, "is-glob": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", @@ -9084,6 +9111,17 @@ "has-symbols": "^1.0.1" } }, + "is-typed-array": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.3.tgz", + "integrity": "sha512-BSYUBOK/HJibQ30wWkWold5txYwMUXQct9YHAQJr8fSwvZoiglcqB0pd7vEN23+Tsi9IUEjztdOSzl4qLVYGTQ==", + "requires": { + "available-typed-arrays": "^1.0.0", + "es-abstract": "^1.17.4", + "foreach": "^2.0.5", + "has-symbols": "^1.0.1" + } + }, "is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", @@ -12289,8 +12327,7 @@ "safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" }, "safe-event-emitter": { "version": "1.0.1", @@ -13796,9 +13833,9 @@ } }, "truffle-plugin-verify": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/truffle-plugin-verify/-/truffle-plugin-verify-0.5.0.tgz", - "integrity": "sha512-VDT0FlFZisceRMrmlkKKiN/EmvFI6n6piAq9PQTrqWX6DdC64cE1RpmeLewIqL5L+5CVeLcApJMd58BpLUqNJg==", + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/truffle-plugin-verify/-/truffle-plugin-verify-0.5.2.tgz", + "integrity": "sha512-2D1GdfdfltvXRf/VYgFep+uouBtdFWi/O2xA1/khqEg9pREmtNXEYzDjozpOInJ1jzoyn30oFUyb1rouD0dlqw==", "dev": true, "requires": { "axios": "0.19.2", @@ -14049,6 +14086,19 @@ "integrity": "sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ==", "dev": true }, + "util": { + "version": "0.12.3", + "resolved": "https://registry.npmjs.org/util/-/util-0.12.3.tgz", + "integrity": "sha512-I8XkoQwE+fPQEhy9v012V+TSdH2kp9ts29i20TaaDUXsg7x/onePbhFJUExBfv/2ay1ZOp/Vsm3nDlmnFGSAog==", + "requires": { + "inherits": "^2.0.3", + "is-arguments": "^1.0.4", + "is-generator-function": "^1.0.7", + "is-typed-array": "^1.1.3", + "safe-buffer": "^5.1.2", + "which-typed-array": "^1.1.2" + } + }, "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -14642,6 +14692,19 @@ "integrity": "sha1-Zws6+8VS4LVd9rd4DKdGFfI60cs=", "dev": true }, + "which-typed-array": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.2.tgz", + "integrity": "sha512-KT6okrd1tE6JdZAy3o2VhMoYPh3+J6EMZLyrxBQsZflI1QCZIxMrIYLkosd8Twf+YfknVIHmYQPgJt238p8dnQ==", + "requires": { + "available-typed-arrays": "^1.0.2", + "es-abstract": "^1.17.5", + "foreach": "^2.0.5", + "function-bind": "^1.1.1", + "has-symbols": "^1.0.1", + "is-typed-array": "^1.1.3" + } + }, "wide-align": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", diff --git a/package.json b/package.json index 1c9318458..c32417e53 100644 --- a/package.json +++ b/package.json @@ -63,12 +63,14 @@ "@uniswap/v2-core": "^1.0.1", "ajv": "^6.10.0", "aws-sdk": "^2.787.0", + "child_process": "^1.0.2", "ethers": "^5.0.19", "fs": "0.0.1-security", "inquirer": "^7.0.0", "node-fetch": "^2.6.1", "openzeppelin-solidity": "2.3", - "semver": "^7.1.3" + "semver": "^7.1.3", + "util": "^0.12.3" }, "devDependencies": { "-": "0.0.1", @@ -95,7 +97,7 @@ "truffle": "^5.1.48", "truffle-assertions": "^0.9.2", "truffle-flatten": "^1.0.8", - "truffle-plugin-verify": "^0.5.0", + "truffle-plugin-verify": "^0.5.2", "web3": "^1.3.0", "web3-eth-abi": "^1.3.0" } diff --git a/scripts/verify.js b/scripts/verify.js new file mode 100644 index 000000000..9f73184ab --- /dev/null +++ b/scripts/verify.js @@ -0,0 +1,55 @@ +// /////////////////////////////////////////////////////////////////// +// Script to verify in EtherScan all contracts from the configuration file's +// "contracts" and "modules" sections. +// Can be executed (from the project root as we're loading .env file from root via `dotenv`) as: +// bash ./scripts/execute_script.sh --no-compile scripts/verify.js test +// +// where: +// - network = [test, staging, prod] +// //////////////////////////////////////////////////////////////////// +require("dotenv").config(); + +const util = require("util"); +const exec = util.promisify(require("child_process").exec); + +const ConfiguratorLoader = require("../utils/configurator-loader.js"); +const Configurator = require("../utils/configurator.js"); + +async function execVerify(contractName, contractAddress, network) { + const res = await exec(`npx truffle run verify ${contractName}@${contractAddress} --network ${network}`).catch((e) => e); + console.log(res.stdout); +} + +async function main() { + const idx = process.argv.indexOf("--network"); + const network = process.argv[idx + 1]; + const remotelyManagedNetworks = (process.env.S3_BUCKET_SUFFIXES || "").split(":"); + + // Ensure a supported network is requested + if (!remotelyManagedNetworks.includes(network)) { + console.error("Error: Invalid network selected"); + return; + } + + const bucket = `${process.env.S3_BUCKET_PREFIX}-${network}`; + const key = process.env.S3_CONFIG_KEY; + const configLoader = new ConfiguratorLoader.S3(bucket, key); + + const configurator = new Configurator(configLoader); + + // This will allow the config to be printed regardless of whether it's valid or not + await configurator.load(false); + const configuration = configurator.copyConfig(); + + for (const [contractName, contractAddress] of Object.entries(configuration.contracts)) { + await execVerify(contractName, contractAddress, network); + } + + for (const [moduleName, moduleAddress] of Object.entries(configuration.modules)) { + await execVerify(moduleName, moduleAddress, network); + } +} + +main().catch((err) => { + throw err; +}); From 85d662d4b75a7cb3c795e735841929f01a2f6840 Mon Sep 17 00:00:00 2001 From: Olivier van den Biggelaar Date: Thu, 26 Nov 2020 16:39:35 +0000 Subject: [PATCH 109/113] Fixing isValidSignature test --- test/transferManager.js | 9 +++++---- utils/utilities.js | 8 ++++++++ 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/test/transferManager.js b/test/transferManager.js index 4c4e96268..f7f27759b 100644 --- a/test/transferManager.js +++ b/test/transferManager.js @@ -896,15 +896,16 @@ contract("TransferManager", (accounts) => { }); describe("Static calls", () => { - it.skip("should delegate isValidSignature static calls to the TransferManager", async () => { + it("should delegate isValidSignature static calls to the TransferManager", async () => { const ERC1271_ISVALIDSIGNATURE_BYTES32 = utils.sha3("isValidSignature(bytes32,bytes)").slice(0, 10); const isValidSignatureDelegate = await wallet.enabled(ERC1271_ISVALIDSIGNATURE_BYTES32); assert.equal(isValidSignatureDelegate, versionManager.address); const walletAsTransferManager = await TransferManager.at(wallet.address); - const signHash = ethers.utils.keccak256("0x1234"); - const signature = `0x${utils.signMessageHash(owner, signHash)}`; - const valid = await walletAsTransferManager.isValidSignature(signHash, signature); + const msg = "0x1234"; + const signature = await utils.signMessage(owner, msg); + const messageHash = web3.eth.accounts.hashMessage(msg); + const valid = await walletAsTransferManager.isValidSignature(messageHash, signature); assert.equal(valid, ERC1271_ISVALIDSIGNATURE_BYTES32); }); diff --git a/utils/utilities.js b/utils/utilities.js index 2e1986e00..460a569c7 100644 --- a/utils/utilities.js +++ b/utils/utilities.js @@ -72,6 +72,14 @@ module.exports = { return ethers.utils.joinSignature(split).slice(2); }, + async signMessage(signer, message) { + const sig = await web3.eth.sign(message, signer); + let v = parseInt(sig.substring(130, 132), 16); + if (v < 27) v += 27; + const normalizedSig = `${sig.substring(0, 130)}${v.toString(16)}`; + return normalizedSig; + }, + personalSign: async (signHash, signer) => ethers.utils.joinSignature(signer.signingKey.signDigest(signHash)), sortWalletByAddress(wallets) { From f2455fa67f821a58b20f57a3bd103e104b5fb843 Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Fri, 27 Nov 2020 15:31:44 +0200 Subject: [PATCH 110/113] Fix end to end deployments --- deployment/1_setup_test_environment.js | 22 ++++---- deployment/2_deploy_contracts.js | 26 +++++----- deployment/3_setup_contracts.js | 25 ++++----- deployment/4_finalise_test_environment.js | 30 +++++------ deployment/5_deploy_modules.js | 26 +++++----- deployment/6_register_modules.js | 56 ++++++++++---------- scripts/deploy_custom_upgrader.js | 16 +++--- scripts/deploy_defi.js | 31 ++++------- scripts/deploy_wallet_detector.js | 8 +-- scripts/module_upgrade_template.js | 23 +++------ scripts/set_tradable_tokens.js | 18 ++----- scripts/update_compound_registry.js | 10 ++-- scripts/update_dex_registry.js | 12 ++--- scripts/update_module_registry.js | 13 ++--- scripts/update_multisig_threshold.js | 10 +--- scripts/update_wallet_detector.js | 13 ++--- scripts/update_wallet_in_factory.js | 11 ++-- test/multisig.js | 16 ++++-- test/transferManager.js | 17 +++--- truffle-config.base.js | 28 +++++----- utils/abi-uploader.js | 10 ++-- utils/config/development.json | 2 +- utils/deploy-manager.js | 63 ++++++++++++----------- utils/multisigexecutor.js | 20 +++---- utils/utilities.js | 3 +- utils/versions/development/latest.json | 1 + utils/versions/ganache/latest.json | 1 - 27 files changed, 225 insertions(+), 286 deletions(-) create mode 100644 utils/versions/development/latest.json delete mode 100644 utils/versions/ganache/latest.json diff --git a/deployment/1_setup_test_environment.js b/deployment/1_setup_test_environment.js index b6a7d6aea..ad6695a6d 100644 --- a/deployment/1_setup_test_environment.js +++ b/deployment/1_setup_test_environment.js @@ -1,5 +1,7 @@ /* global artifacts */ +global.web3 = web3; + const ENSRegistry = artifacts.require("ENSRegistry"); const ENSRegistryWithFallback = artifacts.require("ENSRegistryWithFallback"); const UniswapFactory = artifacts.require("../lib/uniswap/UniswapFactory"); @@ -14,7 +16,7 @@ const PartnerDeployer = artifacts.require("PartnerDeployer"); const KyberAdapter = artifacts.require("Kyber"); const utils = require("../utils/utilities.js"); -const DeployManager = require("../utils/deploy-manager.js"); +const deployManager = require("../utils/deploy-manager.js"); const BYTES32_NULL = "0x0000000000000000000000000000000000000000000000000000000000000000"; @@ -56,14 +58,8 @@ async function deployParaswap(deploymentAccount) { return { paraswap: paraswap.address, kyberAdapter: kyberAdapter.address }; } -module.exports = async (callback) => { - // TODO: Maybe get the signer account a better way? - const accounts = await web3.eth.getAccounts(); - const deploymentAccount = accounts[0]; - - const manager = new DeployManager(deploymentAccount); - await manager.setup(); - const { configurator } = manager; +async function main() { + const { configurator, deploymentAccount } = await deployManager.getProps(); const { config } = configurator; if (config.ENS.deployOwnRegistry) { @@ -98,5 +94,11 @@ module.exports = async (callback) => { // save configuration await configurator.save(); - callback(); + + console.log("## completed deployment script 1 ##"); +} + +// For truffle exec +module.exports = function (callback) { + main().then(() => callback()).catch((err) => callback(err)); }; diff --git a/deployment/2_deploy_contracts.js b/deployment/2_deploy_contracts.js index ae4ab6d47..edd669537 100644 --- a/deployment/2_deploy_contracts.js +++ b/deployment/2_deploy_contracts.js @@ -1,4 +1,6 @@ /* global artifacts */ +global.web3 = web3; + const GuardianStorage = artifacts.require("GuardianStorage"); const TransferStorage = artifacts.require("TransferStorage"); const LockStorage = artifacts.require("LockStorage"); @@ -20,21 +22,11 @@ const MakerRegistry = artifacts.require("MakerRegistry"); const ScdMcdMigration = artifacts.require("ScdMcdMigration"); const utils = require("../utils/utilities.js"); - -const DeployManager = require("../utils/deploy-manager.js"); +const deployManager = require("../utils/deploy-manager.js"); const MultisigExecutor = require("../utils/multisigexecutor.js"); -module.exports = async (callback) => { - // TODO: Maybe get the signer account a better way? - const accounts = await web3.eth.getAccounts(); - const deploymentAccount = accounts[0]; - - const manager = new DeployManager(deploymentAccount); - await manager.setup(); - - const { configurator } = manager; - const { abiUploader } = manager; - +async function main() { + const { deploymentAccount, configurator, abiUploader } = await deployManager.getProps(); const newConfig = configurator.config; const prevConfig = configurator.copyConfig(); @@ -164,5 +156,11 @@ module.exports = async (callback) => { abiUploader.upload(DexRegistryWrapper, "contracts"), abiUploader.upload(BaseWalletWrapper, "contracts"), ]); - callback(); + + console.log("## completed deployment script 2 ##"); +} + +// For truffle exec +module.exports = function (callback) { + main().then(() => callback()).catch((err) => callback(err)); }; diff --git a/deployment/3_setup_contracts.js b/deployment/3_setup_contracts.js index 1483f2138..2803ffe9b 100644 --- a/deployment/3_setup_contracts.js +++ b/deployment/3_setup_contracts.js @@ -1,4 +1,6 @@ /* global artifacts */ +global.web3 = web3; + const ModuleRegistry = artifacts.require("ModuleRegistry"); const ENSManager = artifacts.require("ArgentENSManager"); const ENSResolver = artifacts.require("ArgentENSResolver"); @@ -7,17 +9,10 @@ const TokenPriceRegistry = artifacts.require("TokenPriceRegistry"); const CompoundRegistry = artifacts.require("CompoundRegistry"); const DexRegistry = artifacts.require("DexRegistry"); -const DeployManager = require("../utils/deploy-manager.js"); - -module.exports = async (callback) => { - // TODO: Maybe get the signer account a better way? - const accounts = await web3.eth.getAccounts(); - const deploymentAccount = accounts[0]; - - const manager = new DeployManager(deploymentAccount); - await manager.setup(); +const deployManager = require("../utils/deploy-manager.js"); - const { configurator } = manager; +async function main() { + const { configurator } = await deployManager.getProps(); const { config } = configurator; const ENSResolverWrapper = await ENSResolver.at(config.contracts.ENSResolver); @@ -70,8 +65,14 @@ module.exports = async (callback) => { for (let idx = 0; idx < wrappers.length; idx += 1) { const wrapper = wrappers[idx]; - console.log(`Set the MultiSig as the owner of ${wrapper._contract.contractName}`); + console.log(`Set the MultiSig as the owner of ${wrapper.constructor.contractName}`); await wrapper.changeOwner(config.contracts.MultiSigWallet); } - callback(); + + console.log("## completed deployment script 3 ##"); +} + +// For truffle exec +module.exports = function (callback) { + main().then(() => callback()).catch((err) => callback(err)); }; diff --git a/deployment/4_finalise_test_environment.js b/deployment/4_finalise_test_environment.js index c51915667..09add4232 100644 --- a/deployment/4_finalise_test_environment.js +++ b/deployment/4_finalise_test_environment.js @@ -1,43 +1,41 @@ /* global artifacts */ +global.web3 = web3; + const ENS = artifacts.require("ENSRegistryWithFallback"); const ENSReverseRegistrar = artifacts.require("ReverseRegistrar"); const utils = require("../utils/utilities.js"); -const DeployManager = require("../utils/deploy-manager.js"); +const deployManager = require("../utils/deploy-manager.js"); const BYTES32_NULL = "0x0000000000000000000000000000000000000000000000000000000000000000"; -async function deployENSReverseRegistrar(config, owner, overrides) { +async function deployENSReverseRegistrar(config, owner) { const ENSRegistryWrapper = await ENS.at(config.ENS.ensRegistry); const ENSReverseRegistrarWrapper = await ENSReverseRegistrar.new(config.ENS.ensRegistry, config.contracts.ENSResolver); console.log("Create the reverse namespace"); - await ENSRegistryWrapper.setSubnodeOwner(BYTES32_NULL, utils.sha3("reverse"), owner, overrides); + await ENSRegistryWrapper.setSubnodeOwner(BYTES32_NULL, utils.sha3("reverse"), owner); console.log("Create the addr.reverse namespace and make the ENS reverse registrar the owner"); await ENSRegistryWrapper.setSubnodeOwner( utils.namehash("reverse"), utils.sha3("addr"), - ENSReverseRegistrarWrapper.address, - overrides, - ); + ENSReverseRegistrarWrapper.address); } -module.exports = async (callback) => { - // TODO: Maybe get the signer account a better way? - const accounts = await web3.eth.getAccounts(); - const deploymentAccount = accounts[0]; - - const manager = new DeployManager(deploymentAccount); - await manager.setup(); - - const { configurator } = manager; +async function main() { + const { deploymentAccount, configurator } = await deployManager.getProps(); const { config } = configurator; if (config.ENS.deployOwnRegistry) { await deployENSReverseRegistrar(config, deploymentAccount); } - callback(); + console.log("## completed deployment script 4 ##"); +} + +// For truffle exec +module.exports = function (callback) { + main().then(() => callback()).catch((err) => callback(err)); }; diff --git a/deployment/5_deploy_modules.js b/deployment/5_deploy_modules.js index 0e1162f35..777d976ad 100644 --- a/deployment/5_deploy_modules.js +++ b/deployment/5_deploy_modules.js @@ -1,4 +1,7 @@ /* global artifacts */ + +global.web3 = web3; + const childProcess = require("child_process"); const ApprovedTransfer = artifacts.require("ApprovedTransfer"); @@ -13,24 +16,14 @@ const TransferManager = artifacts.require("TransferManager"); const RelayerManager = artifacts.require("RelayerManager"); const VersionManager = artifacts.require("VersionManager"); -const DeployManager = require("../utils/deploy-manager.js"); +const deployManager = require("../utils/deploy-manager.js"); // /////////////////////////////////////////////////////// // Version 2.1 // /////////////////////////////////////////////////////// -module.exports = async (callback) => { - // TODO: Maybe get the signer account a better way? - const accounts = await web3.eth.getAccounts(); - const deploymentAccount = accounts[0]; - - const manager = new DeployManager(deploymentAccount); - const { network } = manager; - await manager.setup(); - - const { configurator } = manager; - const { abiUploader } = manager; - +async function main() { + const { network, configurator, abiUploader } = await deployManager.getProps(); const { config } = configurator; console.log(config); @@ -173,5 +166,10 @@ module.exports = async (callback) => { abiUploader.upload(VersionManagerWrapper, "modules"), ]); - callback(); + console.log("## completed deployment script 5 ##"); +} + +// For truffle exec +module.exports = function (callback) { + main().then(() => callback()).catch((err) => callback(err)); }; diff --git a/deployment/6_register_modules.js b/deployment/6_register_modules.js index b426a7907..2bd9802b8 100644 --- a/deployment/6_register_modules.js +++ b/deployment/6_register_modules.js @@ -1,5 +1,7 @@ /* global artifacts */ +global.web3 = web3; + const ModuleRegistry = artifacts.require("ModuleRegistry"); const MultiSig = artifacts.require("MultiSigWallet"); @@ -16,36 +18,27 @@ const RelayerManager = artifacts.require("RelayerManager"); const VersionManager = artifacts.require("VersionManager"); const utils = require("../utils/utilities.js"); - -const DeployManager = require("../utils/deploy-manager.js"); +const deployManager = require("../utils/deploy-manager.js"); const MultisigExecutor = require("../utils/multisigexecutor.js"); -module.exports = async (callback) => { - // TODO: Maybe get the signer account a better way? - const accounts = await web3.eth.getAccounts(); - const deploymentAccount = accounts[0]; - - const manager = new DeployManager(deploymentAccount); - await manager.setup(); - - const { configurator } = manager; - const { versionUploader } = manager; +async function main() { + const { deploymentAccount, configurator, versionUploader } = await deployManager.getProps(); const { config } = configurator; - const GuardianManagerWrapper = await GuardianManager.new(config.modules.GuardianManager); - const LockManagerWrapper = await LockManager.new(config.modules.LockManager); - const RecoveryManagerWrapper = await RecoveryManager.new(config.modules.RecoveryManager); - const ApprovedTransferWrapper = await ApprovedTransfer.new(config.modules.ApprovedTransfer); - const TransferManagerWrapper = await TransferManager.new(config.modules.TransferManager); - const TokenExchangerWrapper = await TokenExchanger.new(config.modules.TokenExchanger); - const NftTransferWrapper = await NftTransfer.new(config.modules.NftTransfer); - const CompoundManagerWrapper = await CompoundManager.new(config.modules.CompoundManager); - const MakerV2ManagerWrapper = await MakerV2Manager.new(config.modules.MakerV2Manager); - const RelayerManagerWrapper = await RelayerManager.new(config.modules.RelayerManager); - const VersionManagerWrapper = await VersionManager.new(config.modules.VersionManager); - - const ModuleRegistryWrapper = await ModuleRegistry.new(config.contracts.ModuleRegistry); - const MultiSigWrapper = await MultiSig.new(config.contracts.MultiSigWallet); + const GuardianManagerWrapper = await GuardianManager.at(config.modules.GuardianManager); + const LockManagerWrapper = await LockManager.at(config.modules.LockManager); + const RecoveryManagerWrapper = await RecoveryManager.at(config.modules.RecoveryManager); + const ApprovedTransferWrapper = await ApprovedTransfer.at(config.modules.ApprovedTransfer); + const TransferManagerWrapper = await TransferManager.at(config.modules.TransferManager); + const TokenExchangerWrapper = await TokenExchanger.at(config.modules.TokenExchanger); + const NftTransferWrapper = await NftTransfer.at(config.modules.NftTransfer); + const CompoundManagerWrapper = await CompoundManager.at(config.modules.CompoundManager); + const MakerV2ManagerWrapper = await MakerV2Manager.at(config.modules.MakerV2Manager); + const RelayerManagerWrapper = await RelayerManager.at(config.modules.RelayerManager); + const VersionManagerWrapper = await VersionManager.at(config.modules.VersionManager); + + const ModuleRegistryWrapper = await ModuleRegistry.at(config.contracts.ModuleRegistry); + const MultiSigWrapper = await MultiSig.at(config.contracts.MultiSigWallet); const wrappers = [VersionManagerWrapper]; @@ -86,7 +79,7 @@ module.exports = async (callback) => { for (let idx = 0; idx < wrappers.length; idx += 1) { const wrapper = wrappers[idx]; await multisigExecutor.executeCall(ModuleRegistryWrapper, "registerModule", - [wrapper.address, utils.asciiToBytes32(wrapper._contract.contractName)]); + [wrapper.address, utils.asciiToBytes32(wrapper.constructor.contractName)]); } console.log("Set the MultiSig as the owner of VersionManagerWrapper"); @@ -96,7 +89,7 @@ module.exports = async (callback) => { // Upload Version // ////////////////////////////////// - const modules = wrappers.map((wrapper) => ({ address: wrapper.address, name: wrapper._contract.contractName })); + const modules = wrappers.map((wrapper) => ({ address: wrapper.address, name: wrapper.constructor.contractName })); const version = { modules, fingerprint: utils.versionFingerprint(modules), @@ -105,5 +98,10 @@ module.exports = async (callback) => { }; await versionUploader.upload(version); - callback(); + console.log("## completed deployment script 6 ##"); +} + +// For truffle exec +module.exports = function (callback) { + main().then(() => callback()).catch((err) => callback(err)); }; diff --git a/scripts/deploy_custom_upgrader.js b/scripts/deploy_custom_upgrader.js index c10147e87..8684472f1 100644 --- a/scripts/deploy_custom_upgrader.js +++ b/scripts/deploy_custom_upgrader.js @@ -6,10 +6,15 @@ const MultiSig = artifacts.require("MultiSigWallet"); const Upgrader = artifacts.require("SimpleUpgrader"); const utils = require("../utils/utilities.js"); -const DeployManager = require("../utils/deploy-manager.js"); +const deployManager = require("../utils/deploy-manager.js"); const MultisigExecutor = require("../utils/multisigexecutor.js"); async function main() { + const { configurator } = await deployManager.getProps(); + const { config } = configurator; + const accounts = await web3.eth.getAccounts(); + const deploymentAccount = accounts[0]; + const modulesToRemove = []; const modulesToAdd = [ "0x624EbBd0f4169E2e11861618045491b6A4e29E77", @@ -19,15 +24,6 @@ async function main() { ]; const upgraderName = "0x4ef2f261_0xee7263da"; - // TODO: Maybe get the signer account a better way? - const accounts = await web3.eth.getAccounts(); - const deploymentAccount = accounts[0]; - const manager = new DeployManager(deploymentAccount); - await manager.setup(); - - const { configurator } = manager; - const { config } = configurator; - const ModuleRegistryWrapper = await ModuleRegistry.at(config.contracts.ModuleRegistry); const MultiSigWrapper = await MultiSig.at(config.contracts.MultiSigWallet); const multisigExecutor = new MultisigExecutor(MultiSigWrapper, deploymentAccount, config.multisig.autosign); diff --git a/scripts/deploy_defi.js b/scripts/deploy_defi.js index e4eaae254..e53e751d5 100644 --- a/scripts/deploy_defi.js +++ b/scripts/deploy_defi.js @@ -2,9 +2,7 @@ /* global artifacts */ const BN = require("bn.js"); -const { formatBytes32String } = require("ethers").utils; - -const DeployManager = require("../utils/deploy-manager.js"); +const { utils } = require("ethers"); const UniswapFactory = require("../lib/uniswap/UniswapFactory"); const UniswapExchange = require("../lib/uniswap/UniswapExchange"); @@ -23,30 +21,21 @@ const USD_PER_MKR = WAD.muln(700); // 1 MKR = 700 USD const ETH_PER_MKR = WAD.mul(USD_PER_MKR).div(USD_PER_ETH); // 1 MKR = 2.8 ETH -async function getTimestamp(deployer) { - const block = await deployer.provider.getBlock("latest"); - return block.timestamp; -} - function sleep(ms) { console.log("sleeping..."); return new Promise((resolve) => setTimeout(resolve, ms)); } async function main() { - // TODO: Maybe get the signer account a better way? const accounts = await web3.eth.getAccounts(); const deploymentAccount = accounts[0]; - const deployManager = new DeployManager(deploymentAccount); - await deployManager.setup(); - const { deployer } = deployManager; /* ************* Deploy Maker *************** */ const vox = await Vox.new(USD_PER_DAI); - const sai = await DSToken.new(formatBytes32String("DAI")); - const gov = await DSToken.new(formatBytes32String("MKR")); - const sin = await DSToken.new(formatBytes32String("SIN")); - const skr = await DSToken.new(formatBytes32String("PETH")); + const sai = await DSToken.new(utils.formatBytes32String("DAI")); + const gov = await DSToken.new(utils.formatBytes32String("MKR")); + const sin = await DSToken.new(utils.formatBytes32String("SIN")); + const skr = await DSToken.new(utils.formatBytes32String("PETH")); const gem = await WETH.new(); const pip = await DSValue.new(); const pep = await DSValue.new(); @@ -69,13 +58,13 @@ async function main() { // setup USD/MKR oracle with a convertion rate of 400 USD/MKR await pep.poke(`0x${USD_PER_MKR.toString(16, 64)}`); // set the total DAI debt ceiling to 50,000 DAI - await tub.mold(formatBytes32String("cap"), web3.utils.toWei("50000")); + await tub.mold(utils.formatBytes32String("cap"), web3.utils.toWei("50000")); // set the liquidity ratio to 150% - await tub.mold(formatBytes32String("mat"), RAY.muln(3).divn(2)); + await tub.mold(utils.formatBytes32String("mat"), RAY.muln(3).divn(2)); // set the governance fee to 7.5% APR - await tub.mold(formatBytes32String("fee"), "1000000002293273137447730714", { gasLimit: 150000 }); + await tub.mold(utils.formatBytes32String("fee"), "1000000002293273137447730714", { gasLimit: 150000 }); // set the liquidation penalty to 13% - await tub.mold(formatBytes32String("axe"), "1130000000000000000000000000", { gasLimit: 150000 }); + await tub.mold(utils.formatBytes32String("axe"), "1130000000000000000000000000", { gasLimit: 150000 }); /* ************* Deploy Uniswap ****************** */ @@ -98,7 +87,7 @@ async function main() { } const mkrExchange = await UniswapExchange.at(exchange); await gov.approve(mkrExchange.address, mkrLiquidity); - const timestamp = await getTimestamp(deployer); + const timestamp = await utils.getTimestamp(); await mkrExchange.addLiquidity(1, mkrLiquidity, timestamp + 300, { value: ethLiquidity, gasLimit: 250000 }); console.log("******* contracts *******"); diff --git a/scripts/deploy_wallet_detector.js b/scripts/deploy_wallet_detector.js index 61a6b62af..69cb46637 100644 --- a/scripts/deploy_wallet_detector.js +++ b/scripts/deploy_wallet_detector.js @@ -11,7 +11,7 @@ /* global artifacts */ const ArgentWalletDetector = artifacts.require("ArgentWalletDetector"); -const DeployManager = require("../utils/deploy-manager.js"); +const { configurator, abiUploader } = require("deploy-manager.js"); const PROXYWALLET_CODEHASH = [ "0x0b44c9be520023d9f6091278e7e5a8853257eb9fb3d78e6951315df59679e3b2", // factory prod Mar-30-2020 @@ -27,12 +27,6 @@ const BASEWALLET_IMPL = [ ]; // mainnet only async function main() { - // TODO: Maybe get the signer account a better way? - const accounts = await web3.eth.getAccounts(); - const deploymentAccount = accounts[0]; - const deployManager = new DeployManager(deploymentAccount); - await deployManager.setup(); - const { configurator, abiUploader } = deployManager; const { config } = configurator; // Deploy ArgentWalletDetector contract diff --git a/scripts/module_upgrade_template.js b/scripts/module_upgrade_template.js index e83191c93..fc7f31ee7 100644 --- a/scripts/module_upgrade_template.js +++ b/scripts/module_upgrade_template.js @@ -1,4 +1,5 @@ /* global artifacts */ +global.web3 = web3; const semver = require("semver"); const childProcess = require("child_process"); @@ -7,7 +8,8 @@ const MultiSig = artifacts.require("MultiSigWallet"); const ModuleRegistry = artifacts.require("ModuleRegistry"); const VersionManager = artifacts.require("VersionManager"); const Upgrader = artifacts.require("UpgraderToVersionManager"); -const DeployManager = require("../utils/deploy-manager.js"); + +const deployManager = require("../utils/deploy-manager.js"); const MultisigExecutor = require("../utils/multisigexecutor.js"); const utils = require("../utils/utilities.js"); @@ -33,16 +35,7 @@ const main = async (network) => { // ////////////////////////////////// // Setup // ////////////////////////////////// - - // TODO: Maybe get the signer account a better way? - const accounts = await web3.eth.getAccounts(); - const deploymentAccount = accounts[0]; - const manager = new DeployManager(deploymentAccount); - await manager.setup(); - - const { configurator } = manager; - const { deployer } = manager; - const { versionUploader } = manager; + const { deploymentAccount, configurator, versionUploader } = await deployManager.getProps(); const { config } = configurator; const ModuleRegistryWrapper = await ModuleRegistry.at(config.contracts.ModuleRegistry); @@ -90,7 +83,7 @@ const main = async (network) => { for (let idx = 0; idx < newModuleWrappers.length; idx += 1) { const wrapper = newModuleWrappers[idx]; await multisigExecutor.executeCall(ModuleRegistryWrapper, "registerModule", - [wrapper.contractAddress, utils.asciiToBytes32(wrapper._contract.contractName)]); + [wrapper.contractAddress, utils.asciiToBytes32(wrapper.constructor.contractName)]); } // ////////////////////////////////// @@ -107,7 +100,7 @@ const main = async (network) => { toRemove = version.modules.filter((module) => moduleNamesToRemove.includes(module.name)); toAdd = newModuleWrappers.map((wrapper) => ({ address: wrapper.contractAddress, - name: wrapper._contract.contractName, + name: wrapper.constructor.contractName, })); const toKeep = version.modules.filter((module) => !moduleNamesToRemove.includes(module.name)); const modulesInNewVersion = toKeep.concat(toAdd); @@ -125,9 +118,7 @@ const main = async (network) => { const upgraderName = `${version.fingerprint}_${fingerprint}`; - const UpgraderWrapper = await deployer.deploy( - Upgrader, - {}, + const UpgraderWrapper = await Upgrader.new( config.contracts.ModuleRegistry, config.modules.GuardianStorage, // using the "old LockStorage" here which was part of the GuardianStorage in 1.6 toRemove.map((module) => module.address), diff --git a/scripts/set_tradable_tokens.js b/scripts/set_tradable_tokens.js index 916c8ed17..6e4761390 100644 --- a/scripts/set_tradable_tokens.js +++ b/scripts/set_tradable_tokens.js @@ -12,13 +12,12 @@ /* global artifacts */ const fs = require("fs"); -const ethers = require("ethers"); const MultiSig = artifacts.require("MultiSigWallet"); const TokenPriceRegistry = artifacts.require("TokenPriceRegistry"); -const DeployManager = require("../utils/deploy-manager.js"); const MultisigExecutor = require("../utils/multisigexecutor.js"); +const deployManager = require("../utils/deploy-manager.js"); async function main() { // Read Command Line Arguments @@ -28,16 +27,10 @@ async function main() { idx = process.argv.indexOf("--dry"); const dry = (idx !== -1); - // Setup deployer - // TODO: Maybe get the signer account a better way? + const { configurator } = await deployManager.getProps(); + const { config } = configurator; const accounts = await web3.eth.getAccounts(); const deploymentAccount = accounts[0]; - const manager = new DeployManager(deploymentAccount); - await manager.setup(); - const { configurator } = manager; - const { deployer } = manager; - const { config } = configurator; - const { gasPrice, gasLimit } = deployer.defaultOverrides; const TokenPriceRegistryWrapper = await TokenPriceRegistry.at(config.modules.TokenPriceRegistry); @@ -58,16 +51,13 @@ async function main() { console.log(item[0], item[1]); } - console.log("gasPrice", ethers.utils.formatUnits(gasPrice, "gwei")); - console.log("gasLimit", gasLimit); - if (dry) return; const tokens = filteredData.map((item) => item[0]); const tradable = filteredData.map((item) => item[1]); const MultiSigWrapper = await MultiSig.at(config.contracts.MultiSigWallet); - const multisigExecutor = new MultisigExecutor(MultiSigWrapper, deploymentAccount, config.multisig.autosign, { gasPrice, gasLimit }); + const multisigExecutor = new MultisigExecutor(MultiSigWrapper, deploymentAccount, config.multisig.autosign); await multisigExecutor.executeCall(TokenPriceRegistryWrapper, "setTradableForTokenList", [tokens, tradable]); } diff --git a/scripts/update_compound_registry.js b/scripts/update_compound_registry.js index ddf3cd941..e47da9282 100644 --- a/scripts/update_compound_registry.js +++ b/scripts/update_compound_registry.js @@ -15,7 +15,7 @@ const CompoundRegistry = artifacts.require("CompoundRegistry"); const MultiSig = artifacts.require("MultiSigWallet"); -const DeployManager = require("../utils/deploy-manager.js"); +const deployManager = require("../utils/deploy-manager.js"); const MultisigExecutor = require("../utils/multisigexecutor.js"); async function main() { @@ -41,14 +41,10 @@ async function main() { idx = process.argv.indexOf("--ctoken"); const ctoken = process.argv[idx + 1]; - // Setup deployer - // TODO: Maybe get the signer account a better way? + const { configurator } = await deployManager.getProps(); + const { config } = configurator; const accounts = await web3.eth.getAccounts(); const deploymentAccount = accounts[0]; - const manager = new DeployManager(deploymentAccount); - await manager.setup(); - const { configurator } = manager; - const { config } = configurator; const CompoundRegistryWrapper = await CompoundRegistry.at(config.contracts.CompoundRegistry); const MultiSigWrapper = await MultiSig.at(config.contracts.MultiSigWallet); diff --git a/scripts/update_dex_registry.js b/scripts/update_dex_registry.js index 7c3bf6994..edb7ad8ea 100644 --- a/scripts/update_dex_registry.js +++ b/scripts/update_dex_registry.js @@ -10,10 +10,12 @@ // //////////////////////////////////////////////////////////////////// /* global artifacts */ +global.web3 = web3; + const MultiSig = artifacts.require("MultiSigWallet"); const DexRegistry = artifacts.require("DexRegistry"); -const DeployManager = require("../utils/deploy-manager.js"); +const deployManager = require("deploy-manager.js"); const MultisigExecutor = require("../utils/multisigexecutor.js"); async function main() { @@ -34,13 +36,7 @@ async function main() { dexStatus.push(pair[1] === "true"); } - // Setup deployer - // TODO: Maybe get the signer account a better way? - const accounts = await web3.eth.getAccounts(); - const deploymentAccount = accounts[0]; - const manager = new DeployManager(deploymentAccount); - await manager.setup(); - const { configurator } = manager; + const { deploymentAccount, configurator } = await deployManager.getProps(); const { config } = configurator; const DexRegistryWrapper = await DexRegistry.at(config.contracts.DexRegistry); diff --git a/scripts/update_module_registry.js b/scripts/update_module_registry.js index 57b0d3d59..1b75bf1b3 100644 --- a/scripts/update_module_registry.js +++ b/scripts/update_module_registry.js @@ -12,11 +12,14 @@ // //////////////////////////////////////////////////////////////////// /* global artifacts */ + +global.web3 = web3; + const ModuleRegistry = artifacts.require("ModuleRegistry"); const MultiSig = artifacts.require("MultiSigWallet"); const utils = require("../utils/utilities.js"); -const DeployManager = require("../utils/deploy-manager.js"); +const deployManager = require("../utils/deploy-manager.js"); const MultisigExecutor = require("../utils/multisigexecutor.js"); async function main() { @@ -42,13 +45,7 @@ async function main() { idx = process.argv.indexOf("--name"); const targetName = process.argv[idx + 1]; - // Setup deployer - // TODO: Maybe get the signer account a better way? - const accounts = await web3.eth.getAccounts(); - const deploymentAccount = accounts[0]; - const manager = new DeployManager(deploymentAccount); - await manager.setup(); - const { configurator } = manager; + const { deploymentAccount, configurator } = await deployManager.getProps(); const { config } = configurator; const ModuleRegistryWrapper = await ModuleRegistry.at(config.contracts.ModuleRegistry); diff --git a/scripts/update_multisig_threshold.js b/scripts/update_multisig_threshold.js index 8903ff91f..cdfd45731 100644 --- a/scripts/update_multisig_threshold.js +++ b/scripts/update_multisig_threshold.js @@ -11,7 +11,7 @@ /* global artifacts */ const MultiSig = artifacts.require("MultiSigWallet"); -const DeployManager = require("../utils/deploy-manager.js"); +const deployManager = require("../utils/deploy-manager.js"); const MultisigExecutor = require("../utils/multisigexecutor.js"); async function main() { @@ -19,13 +19,7 @@ async function main() { const idx = process.argv.indexOf("--threshold"); const threshold = process.argv[idx + 1]; - // Setup deployer - // TODO: Maybe get the signer account a better way? - const accounts = await web3.eth.getAccounts(); - const deploymentAccount = accounts[0]; - const manager = new DeployManager(deploymentAccount); - await manager.setup(); - const { configurator } = manager; + const { deploymentAccount, configurator } = await deployManager.getProps(); const { config } = configurator; const MultiSigWrapper = await MultiSig.at(config.contracts.MultiSigWallet); diff --git a/scripts/update_wallet_detector.js b/scripts/update_wallet_detector.js index ffc6f29b9..34cabca3a 100644 --- a/scripts/update_wallet_detector.js +++ b/scripts/update_wallet_detector.js @@ -19,10 +19,13 @@ // //////////////////////////////////////////////////////////////////// /* global artifacts */ + +global.web3 = web3; + const ArgentWalletDetector = artifacts.require("ArgentWalletDetector"); const MultiSig = artifacts.require("MultiSigWallet"); -const DeployManager = require("../utils/deploy-manager.js"); +const deployManager = require("../utils/deploy-manager.js"); const MultisigExecutor = require("../utils/multisigexecutor.js"); async function main() { @@ -49,13 +52,7 @@ async function main() { } } - // Setup deployer - // TODO: Maybe get the signer account a better way? - const accounts = await web3.eth.getAccounts(); - const deploymentAccount = accounts[0]; - const manager = new DeployManager(deploymentAccount); - await manager.setup(); - const { configurator } = manager; + const { deploymentAccount, configurator } = await deployManager.getProps(); const { config } = configurator; const ArgentWalletDetectorWrapper = await ArgentWalletDetector.at(config.contracts.ArgentWalletDetector); diff --git a/scripts/update_wallet_in_factory.js b/scripts/update_wallet_in_factory.js index 4ad54cf5a..231628787 100644 --- a/scripts/update_wallet_in_factory.js +++ b/scripts/update_wallet_in_factory.js @@ -9,20 +9,17 @@ // //////////////////////////////////////////////////////////////////// /* global artifacts */ +global.web3 = web3; + const BaseWallet = artifacts.require("BaseWallet"); const WalletFactory = artifacts.require("WalletFactory"); const MultiSigWallet = artifacts.require("MultiSigWallet"); const MultisigExecutor = require("../utils/multisigexecutor.js"); -const DeployManager = require("../utils/deploy-manager.js"); +const deployManager = require("../utils/deploy-manager.js"); async function main() { - // TODO: Maybe get the signer account a better way? - const accounts = await web3.eth.getAccounts(); - const deploymentAccount = accounts[0]; - const deployManager = new DeployManager(deploymentAccount); - await deployManager.setup(); - const { configurator } = deployManager; + const { deploymentAccount, configurator } = await deployManager.getProps(); const { config } = configurator; console.log("Config:", config); diff --git a/test/multisig.js b/test/multisig.js index 62665ac0a..e66413320 100644 --- a/test/multisig.js +++ b/test/multisig.js @@ -44,14 +44,20 @@ contract("MultiSigWallet", (accounts) => { if (sortSigners) { sortedSigners = utilities.sortWalletByAddress(signers); } - const sigs = `0x${sortedSigners.map((signer) => { - let joinedSignature = utilities.signMessageHash(signer, messageHash); + + let sigs = "0x"; + for (let index = 0; index < sortedSigners.length; index += 1) { + const signer = sortedSigners[index]; + let sig = await utilities.signMessage(messageHash, signer); if (returnBadSignatures) { - joinedSignature += "a1"; + sig += "a1"; } - return joinedSignature; - }).join("")}`; + + sig = sig.slice(2); + sigs += sig; + } + return sigs; } diff --git a/test/transferManager.js b/test/transferManager.js index f7f27759b..45cc3ce63 100644 --- a/test/transferManager.js +++ b/test/transferManager.js @@ -903,29 +903,32 @@ contract("TransferManager", (accounts) => { const walletAsTransferManager = await TransferManager.at(wallet.address); const msg = "0x1234"; - const signature = await utils.signMessage(owner, msg); const messageHash = web3.eth.accounts.hashMessage(msg); + const signature = await utils.signMessage(msg, owner); + const valid = await walletAsTransferManager.isValidSignature(messageHash, signature); assert.equal(valid, ERC1271_ISVALIDSIGNATURE_BYTES32); }); it("should revert isValidSignature static call for invalid signature", async () => { const walletAsTransferManager = await TransferManager.at(wallet.address); - const signHash = ethers.utils.keccak256("0x1234"); - const signature = utils.signMessageHash(owner, signHash); + const msg = "0x1234"; + const messageHash = web3.eth.accounts.hashMessage(msg); + const signature = await utils.signMessage(messageHash, owner); await truffleAssert.reverts( - walletAsTransferManager.isValidSignature(signHash, `0x${signature}a1`), "TM: invalid signature length", + walletAsTransferManager.isValidSignature(messageHash, `${signature}a1`), "TM: invalid signature length", ); }); it("should revert isValidSignature static call for invalid signer", async () => { const walletAsTransferManager = await TransferManager.at(wallet.address); - const signHash = ethers.utils.keccak256("0x1234"); - const signature = `0x${utils.signMessageHash(owner, signHash)}`; + const msg = "0x1234"; + const messageHash = web3.eth.accounts.hashMessage(msg); + const signature = await utils.signMessage(messageHash, owner); await truffleAssert.reverts( - walletAsTransferManager.isValidSignature(signHash, signature), "TM: Invalid signer", + walletAsTransferManager.isValidSignature(messageHash, signature), "TM: Invalid signer", ); }); }); diff --git a/truffle-config.base.js b/truffle-config.base.js index fe73fdb93..c426d184d 100644 --- a/truffle-config.base.js +++ b/truffle-config.base.js @@ -20,18 +20,16 @@ require("dotenv").config(); const HDWalletProvider = require("@truffle/hdwallet-provider"); -const DeployManager = require("./utils/deploy-manager.js"); +// const deployManager = require("./utils/deploy-manager.js"); const _gasPrice = process.env.DEPLOYER_GAS_PRICE || 20000000000; const _gasLimit = 6000000; -async function getKeys() { - const accounts = await web3.eth.getAccounts(); - const deploymentAccount = accounts[0]; - const manager = new DeployManager(deploymentAccount); - await manager.setup(); - const { pkey, infuraKey } = manager; - return (pkey, infuraKey); +function getKeys() { + // NOTE: While https://github.com/trufflesuite/truffle/issues/1054 is implemented we are using a temporary fix + // const { pkey, infuraKey } = await deployManager.getProps(); + // return (pkey, infuraKey); + return { pkey: process.env.PKEY, infuraKey: process.env.INFURA_KEY }; } // const fs = require('fs'); @@ -62,18 +60,18 @@ module.exports = { }, test: { - provider: async () => { - const { pkey, infuraKey } = await getKeys(); + provider: () => { + const { pkey, infuraKey } = getKeys(); return new HDWalletProvider(pkey, `https://ropsten.infura.io/v3/${infuraKey}`); }, network_id: 3, // ropsten gas: _gasLimit, - gasPrice: _gasPrice, + gasPrice: _gasPrice }, staging: { - provider: async () => { - const { pkey, infuraKey } = await getKeys(); + provider: () => { + const { pkey, infuraKey } = getKeys(); return new HDWalletProvider(pkey, `https://mainnet.infura.io/v3/${infuraKey}`); }, network_id: 1, // mainnet @@ -82,8 +80,8 @@ module.exports = { }, prod: { - provider: async () => { - const { pkey, infuraKey } = await getKeys(); + provider: () => { + const { pkey, infuraKey } = getKeys(); return new HDWalletProvider(pkey, `https://mainnet.infura.io/v3/${infuraKey}`); }, network_id: 1, // mainnet diff --git a/utils/abi-uploader.js b/utils/abi-uploader.js index e1aa968f3..6628058ff 100644 --- a/utils/abi-uploader.js +++ b/utils/abi-uploader.js @@ -12,31 +12,31 @@ class ABIUploaderS3 { } async upload(contractWrapper, folder) { - const { contractName } = contractWrapper._contract; + const { contractName } = contractWrapper.contract; const filename = contractWrapper.address; console.log(`Uploading ${contractName} ABI to AWS...`); await s3.putObject({ - Body: JSON.stringify(contractWrapper._contract.abi), + Body: JSON.stringify(contractWrapper.abi), Bucket: this._bucket, Key: `${S3_BUCKET_FOLDER_ABI}/${folder}/${contractName}/${filename}.json`, }).promise(); await s3.putObject({ - Body: JSON.stringify(contractWrapper._contract.abi), + Body: JSON.stringify(contractWrapper.abi), Bucket: this._bucket, Key: `${S3_BUCKET_FOLDER_ABI}/ALL/${filename}.json`, }).promise(); await s3.putObject({ - Body: JSON.stringify(contractWrapper._contract), + Body: JSON.stringify(contractWrapper.contract), Bucket: this._bucket, Key: `${S3_BUCKET_FOLDER_BUILD}/${folder}/${contractName}/${filename}.json`, }).promise(); await s3.putObject({ - Body: JSON.stringify(contractWrapper._contract), + Body: JSON.stringify(contractWrapper.contract), Bucket: this._bucket, Key: `${S3_BUCKET_FOLDER_BUILD}/ALL/${filename}.json`, }).promise(); diff --git a/utils/config/development.json b/utils/config/development.json index a1fa5511a..37319383e 100644 --- a/utils/config/development.json +++ b/utils/config/development.json @@ -1 +1 @@ -{"ENS":{"deployOwnRegistry":true,"ensRegistry":"0xA639CA57eD09E526d78A9A1A04071B4499fB446b","domain":"argent.xyz"},"backend":{"accounts":["0xD9995BAE12FEe327256FFec1e3184d492bD94C31"]},"multisig":{"owners":["0xD9995BAE12FEe327256FFec1e3184d492bD94C31"],"threshold":1,"autosign":true},"settings":{"deployer":{"type":"ganache"},"lockPeriod":480,"recoveryPeriod":480,"securityPeriod":240,"securityWindow":240,"feeRatio":15,"defaultLimit":"1000000000000000000"},"CryptoKitties":{"contract":"0x0000000000000000000000000000000000000000"},"defi":{"weth":"0x0000000000000000000000000000000000000000","maker":{"deployOwn":true,"tub":"0x0000000000000000000000000000000000000000","pot":"0x0000000000000000000000000000000000000000","jug":"0x0000000000000000000000000000000000000000","migration":"0x7C33A4317eC522B0839a37A148485d90D35D45Ac"},"uniswap":{"deployOwn":true,"factory":"0x21D72e062B32593b391973abfB525A0f26Fb5b04"},"compound":{"comptroller":"0x0000000000000000000000000000000000000000","markets":{"0x0000000000000000000000000000000000000000":"0x0000000000000000000000000000000000000000"}},"paraswap":{"deployOwn":true,"contract":"0x165d6f36fCde1e4e446602A75ab29C8CD8154d27","authorisedExchanges":{"Kyber":"0x308907419A1349aaF89a286A6caa8B7Bc5302487"}}},"contracts":{"MultiSigWallet":"0x3a1FfAd1E766c5450e4217680a2Ca25fa4a7AFA7","WalletFactory":"0x7955448285966eC14A7763CA255455b4f40F3484","ENSResolver":"0x3CcE0184e07dF9e93e22b566c5056e435aFdB588","ENSManager":"0x84820AA92539a5C5a12a30e0087c8e6963aFf577","TokenPriceProvider":"0xE09C322B745434Fbb2D18c107c13795D4bDF3657","ModuleRegistry":"0xdA013269e9a0904e44bfaEF07e72c7e8cC429e11","BaseWallet":"0xddA6f8E60b703d540c074D27BdA37b2e530353Ff","CompoundRegistry":"0x009e63C8761cd04616176005FB66Dc8a39ce416D","MakerRegistry":"0x355d26E5f04255F60E910F1aA1251DE5D10996E8","DexRegistry":"0x22878F21d9A8A55C3da2CEc8083DDcb2E1774e6e"},"modules":{"GuardianStorage":"0x8B9Bbb58AC0fb032b78E3d99d424ae1eDC4C0283","TransferStorage":"0x7890b27eA3a4F9bE2393eE931DDeFeEDfc2FEd9D","GuardianManager":"0x9e62082be2aC03f46Efac92e41d9db43b31a74ff","LockManager":"0xC0f60ca8C4e87Ef593BDbd0030A557007ce42858","RecoveryManager":"0xee17f7697466C6d56619f58e475fa2F2aEA11F37","ApprovedTransfer":"0x6a9f87BCE6332BFdf6f1C875eFc8e32aDF246887","TokenExchanger":"0x5bD2B564f90657B4200C7479138D4CC0aE3B301D","NftTransfer":"0x7deC6031A8911c12dA6060dc58453Fc2Eddf9Ac3","MakerManager":"0x2718cAce241213B18F67C6d66B245EE77DB0Ce2a","TransferManager":"0xa7ce7c4C6573e63B148C30E9CFE07F921393B655","CompoundManager":"0xd7c9d0A3E8059C2eB3eba9a470eEC28924a91b4B","MakerV2Manager":"0x72A19c30C9ffA6420d19371A9D0fAc5F9D3E6175","LimitStorage":"0x08AFa29A777d610BA3C35cA7D0B7da84B6DC9635","TokenPriceStorage":"0x5dA4F81c17776495e3d7999ad9217748D257f074","RelayerModule":"0x171eb25c80da6adF0436668126285ca51e37eB30","RelayerManager":"0x4e35AfF2a6974D5EED616e9D4f7d512c2f8eF7f4","VersionManager":"0x9C5AA8E811e6842842dff6d91b1076A81687ed0d","LockStorage":"0x25C9F9365722A4ba1Df59E999aA4E3Ce864d278B","TokenPriceRegistry":"0x92AAf4A6E00fcC0d7307da38D5043d5c4c9a6d09"},"gitCommit":"0e8f2e54823013456b191f0801aef2c1aa681812"} \ No newline at end of file +{"ENS":{"deployOwnRegistry":true,"ensRegistry":"0x6504d233f1f9289EbeFdF498AF7A01d61E1DD682","domain":"argent.xyz"},"backend":{"accounts":["0x90F8bf6A479f320ead074411a4B0e7944Ea8c9C1"]},"multisig":{"owners":["0x90F8bf6A479f320ead074411a4B0e7944Ea8c9C1"],"threshold":1,"autosign":true},"settings":{"deployer":{"type":"ganache"},"lockPeriod":480,"recoveryPeriod":480,"securityPeriod":240,"securityWindow":240,"feeRatio":15,"defaultLimit":"1000000000000000000"},"CryptoKitties":{"contract":"0x0000000000000000000000000000000000000000"},"defi":{"weth":"0x0000000000000000000000000000000000000000","maker":{"deployOwn":true,"tub":"0x0000000000000000000000000000000000000000","pot":"0x0000000000000000000000000000000000000000","jug":"0x0000000000000000000000000000000000000000","migration":"0xBa4FD8dB6b1A91633162376bF90f93e0BbDAf7EE"},"uniswap":{"deployOwn":true,"factory":"0x4A6bEfbB8D8F5A0C059123D582eC9c903347d06B"},"compound":{"comptroller":"0x0000000000000000000000000000000000000000","markets":{"0x0000000000000000000000000000000000000000":"0x0000000000000000000000000000000000000000"}},"paraswap":{"deployOwn":true,"contract":"0x60aCbF280d703AFE5725d7a33Cb8DcBE4fCbbb20","authorisedExchanges":{"Kyber":"0xBD17B75a1dF9039E85abB5A5024D3367E633D1bF"}}},"contracts":{"MultiSigWallet":"0xdd32a8E9B39713b5Be04Cafb9C13761Ad92504A6","WalletFactory":"0xd6897D816e5f2Ba75396236cb2Df6F52AfB59D4B","ENSResolver":"0x10Dd9B803DEE6f81451c55d9c6109E74FD54E9A1","ENSManager":"0x69aE123fce574568CEDcbACE4F48Ed23Cad240ab","TokenPriceProvider":"0xE09C322B745434Fbb2D18c107c13795D4bDF3657","ModuleRegistry":"0x6Ba4CaA9460d80816279EfF9bDB4B909626ed4C6","BaseWallet":"0x9b488Aebc5bDF38856CeFa737Be464F4e1671f6B","CompoundRegistry":"0x040C01780bbad4646b2AacA5617E775FaA8902eb","MakerRegistry":"0x355d26E5f04255F60E910F1aA1251DE5D10996E8","DexRegistry":"0x02c4501CBe5f007e36c8F0C38383F83F616E266e"},"modules":{"GuardianStorage":"0x2E54926786Ae2DD01FB58ACcD8af43f42997a642","TransferStorage":"0x1C034456a49fB9c13504f7F5ae366f8Bd2fdd900","GuardianManager":"0x46BedcBE43B01A0a4C872622e8202Af3ea9A39b4","LockManager":"0x30eE6F28B0Bd9484cB1E79E201ec77a39b664E54","RecoveryManager":"0x188e2619f3494FDEdeb644E48aE8323bbacbE191","ApprovedTransfer":"0xaF0e63Bea771604aCAd47Bb2f68ef0157d76E00b","TokenExchanger":"0xB24BD0D1926Eb02d3938E23d5c5C76aC3762128D","NftTransfer":"0x3f84ab27a5C8af6b07dF8EA0Dfc3cEE52852842D","MakerManager":"0x2718cAce241213B18F67C6d66B245EE77DB0Ce2a","TransferManager":"0xBb697ee840d10A6c2973Ce43119a7c677d80e9a4","CompoundManager":"0x837531C7c4f73fe61Db0Bcf9eB64e28C2Ba91bee","MakerV2Manager":"0x5238149C2CEde48FD5d38f566CE1c50e8357e986","LimitStorage":"0x8504bB3c35AA805486A8F24DD8E4132cCe69a493","TokenPriceStorage":"0x5dA4F81c17776495e3d7999ad9217748D257f074","RelayerModule":"0x171eb25c80da6adF0436668126285ca51e37eB30","RelayerManager":"0xf65411c98b8D325Da6c3f2cB54B2a6939230d710","VersionManager":"0x7682aA0D9E557EfAa0D4a0bf663104a109ecFFF7","LockStorage":"0x5BdC526Cf85d426a55961E7605803f2da6Fa0346","TokenPriceRegistry":"0x2306d1d3b65F9519D2D2757221096e3acAeF73Ae"},"gitCommit":"85d662d4b75a7cb3c795e735841929f01a2f6840"} \ No newline at end of file diff --git a/utils/deploy-manager.js b/utils/deploy-manager.js index dda5bdcf6..f26a2b0f5 100644 --- a/utils/deploy-manager.js +++ b/utils/deploy-manager.js @@ -7,70 +7,73 @@ const PrivateKeyLoader = require("./private-key-loader.js"); const ABIUploader = require("./abi-uploader.js"); const VersionUploader = require("./version-uploader.js"); -class DeployManager { - constructor(deploymentAccount) { +module.exports = { + async getProps() { const idx = process.argv.indexOf("--network"); const network = idx > -1 ? process.argv[idx + 1] : "development"; console.log(`## ${network} network ##`); - this.network = network; - this.deploymentAccount = deploymentAccount; - this.env = process.env.CONFIG_ENVIRONMENT; - this.remotelyManagedNetworks = (process.env.S3_BUCKET_SUFFIXES || "").split(":"); + const env = process.env.CONFIG_ENVIRONMENT; + const remotelyManagedNetworks = (process.env.S3_BUCKET_SUFFIXES || "").split(":"); + + const accounts = await web3.eth.getAccounts(); + const deploymentAccount = accounts[0]; // config let configLoader; - if (this.remotelyManagedNetworks.includes(this.network)) { - const bucket = `${process.env.S3_BUCKET_PREFIX}-${this.network}`; + if (remotelyManagedNetworks.includes(network)) { + const bucket = `${process.env.S3_BUCKET_PREFIX}-${network}`; const key = process.env.S3_CONFIG_KEY; configLoader = new ConfiguratorLoader.S3(bucket, key); } else { - const fileName = this.env ? `${this.network}.${this.env}.json` : `${this.network}.json`; + const fileName = env ? `${network}.${env}.json` : `${network}.json`; const filePath = path.join(__dirname, "./config", fileName); configLoader = new ConfiguratorLoader.Local(filePath); } - this.configurator = new Configurator(configLoader); - } - - async setup() { - await this.configurator.load(); - const { config } = this.configurator; + const configurator = new Configurator(configLoader); + await configurator.load(); + const { config } = configurator; + let infuraKey; if (config.settings.deployer.type === "infura") { const { key, envvar } = config.settings.deployer.options; - this.infuraKey = key || process.env[envvar]; + infuraKey = key || process.env[envvar]; } + + let pkey; // getting private key if any is available if (config.settings.privateKey && config.settings.privateKey.type === "plain") { const { value, envvar } = config.settings.privateKey.options; - this.pkey = value || process.env[envvar]; + pkey = value || process.env[envvar]; } else if (config.settings.privateKey && config.settings.privateKey.type === "s3") { const { options } = config.settings.privateKey; const pkeyLoader = new PrivateKeyLoader(options.bucket, options.key); - this.pkey = await pkeyLoader.fetch(); + pkey = await pkeyLoader.fetch(); } - // setting backend accounts and multi-sig owner for environments not managed on S3 - if (!this.remotelyManagedNetworks.includes(this.network)) { - this.configurator.updateBackendAccounts([this.deploymentAccount]); - this.configurator.updateMultisigOwner([this.deploymentAccount]); + // setting backend account and multi-sig owner for environments not managed on S3 + if (!remotelyManagedNetworks.includes(network)) { + configurator.updateBackendAccounts([deploymentAccount]); + configurator.updateMultisigOwner([deploymentAccount]); } + let abiUploader; // abi upload if (config.settings.abiUpload) { - this.abiUploader = new ABIUploader.S3(config.settings.abiUpload.bucket); + abiUploader = new ABIUploader.S3(config.settings.abiUpload.bucket); } else { - this.abiUploader = new ABIUploader.None(); + abiUploader = new ABIUploader.None(); } + let versionUploader; // version upload if (config.settings.versionUpload) { - this.versionUploader = new VersionUploader.S3(config.settings.versionUpload.bucket, config.settings.versionUpload.url); + versionUploader = new VersionUploader.S3(config.settings.versionUpload.bucket, config.settings.versionUpload.url); } else { - const dirPath = path.join(__dirname, "./versions/", this.network); - this.versionUploader = new VersionUploader.Local(dirPath, this.env); + const dirPath = path.join(__dirname, "./versions/", network); + versionUploader = new VersionUploader.Local(dirPath, env); } - } -} -module.exports = DeployManager; + return { network, deploymentAccount, infuraKey, pkey, configurator, abiUploader, versionUploader }; + } +}; diff --git a/utils/multisigexecutor.js b/utils/multisigexecutor.js index 82b617800..5e0f49cb2 100644 --- a/utils/multisigexecutor.js +++ b/utils/multisigexecutor.js @@ -3,16 +3,16 @@ const inquirer = require("inquirer"); const utils = require("./utilities.js"); class MultisigExecutor { - constructor(multisigWrapper, ownerAccount, autoSign = true, overrides = {}) { + constructor(multisigWrapper, ownerAccount, autoSign = true) { this._multisigWrapper = multisigWrapper; + this._multisigWrapper.constructor.defaults({ gasLimit: 1000000 }); this._ownerAccount = ownerAccount; this._autoSign = autoSign; - this._overrides = { gasLimit: 1000000, ...overrides }; } async executeCall(contractWrapper, method, params) { // Encode the method call with its parameters - const data = contractWrapper.contract.methods[method](params).encodeABI(); + const data = contractWrapper.contract.methods[method](...params).encodeABI(); // Get the nonce const nonce = (await this._multisigWrapper.nonce()).toNumber(); @@ -22,14 +22,10 @@ class MultisigExecutor { if (this._autoSign === true) { // Get the off chain signature - let signature = utils.signMessageHash(this._ownerAccount, signHash); - - // to make sure signature ends with 27/28 - const split = ethers.utils.splitSignature(signature); - signature = ethers.utils.joinSignature(split); + const signature = await utils.signMessage(signHash, this._ownerAccount); // Call "execute" on the Multisig wallet with data and signatures - const executeTransaction = await this._multisigWrapper.execute(contractWrapper.address, 0, data, signature, this._overrides); + const executeTransaction = await this._multisigWrapper.execute(contractWrapper.address, 0, data, signature); return executeTransaction.receipt; } @@ -37,7 +33,7 @@ class MultisigExecutor { const threshold = (await this._multisigWrapper.threshold()).toNumber(); console.log("******* MultisigExecutor *******"); - console.log(`Signing data for transaction to ${contractWrapper._contract.contractName} located at ${contractWrapper.address}:`); + console.log(`Signing data for transaction to ${contractWrapper.constructor.contractName} located at ${contractWrapper.address}:`); console.log(`multisig: ${this._multisigWrapper.address}`); console.log(`to: ${contractWrapper.address}`); console.log("value: 0"); @@ -65,7 +61,7 @@ class MultisigExecutor { const signatures = `0x${sortedSignatures.map((s) => s.sig.slice(2)).join("")}`; // Call "execute" on the Multisig wallet with data and signatures - const executeTransaction = await this._multisigWrapper.execute(contractWrapper.address, 0, data, signatures, this._overrides); + const executeTransaction = await this._multisigWrapper.execute(contractWrapper.address, 0, data, signatures); return executeTransaction.receipt; } @@ -81,7 +77,7 @@ class MultisigExecutor { ethers.utils.hexZeroPad(ethers.utils.hexlify(nonce), 32), ].map((hex) => hex.slice(2)).join("")}`; - return input; + return ethers.utils.keccak256(input); } } diff --git a/utils/utilities.js b/utils/utilities.js index 460a569c7..231d46981 100644 --- a/utils/utilities.js +++ b/utils/utilities.js @@ -72,7 +72,7 @@ module.exports = { return ethers.utils.joinSignature(split).slice(2); }, - async signMessage(signer, message) { + async signMessage(message, signer) { const sig = await web3.eth.sign(message, signer); let v = parseInt(sig.substring(130, 132), 16); if (v < 27) v += 27; @@ -261,6 +261,7 @@ module.exports = { async getAccount(index) { const accounts = await web3.eth.getAccounts(); + console.log("accounts", accounts); return accounts[index]; } }; diff --git a/utils/versions/development/latest.json b/utils/versions/development/latest.json new file mode 100644 index 000000000..92e72e757 --- /dev/null +++ b/utils/versions/development/latest.json @@ -0,0 +1 @@ +{"modules":[{"address":"0x7682aA0D9E557EfAa0D4a0bf663104a109ecFFF7","name":"VersionManager"}],"fingerprint":"0x3173687e","version":"1.0.0","createdAt":1606483417} \ No newline at end of file diff --git a/utils/versions/ganache/latest.json b/utils/versions/ganache/latest.json deleted file mode 100644 index efa8eaec4..000000000 --- a/utils/versions/ganache/latest.json +++ /dev/null @@ -1 +0,0 @@ -{"modules":[{"address":"0x12f117EA2266DB9c697A677a41e27383Dc631575","name":"VersionManager"}],"fingerprint":"0xbf3b947b","version":"1.0.0","createdAt":1603262427} \ No newline at end of file From 80dc7bc2b4160acbf31308bfe5539398bc471f97 Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Fri, 27 Nov 2020 17:34:05 +0200 Subject: [PATCH 111/113] Add a small script for testing deployments framework --- contracts-test/TestOwnedContract.sol | 19 ++++++++++++++ deployment/0_limited_test.js | 39 ++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 contracts-test/TestOwnedContract.sol create mode 100644 deployment/0_limited_test.js diff --git a/contracts-test/TestOwnedContract.sol b/contracts-test/TestOwnedContract.sol new file mode 100644 index 000000000..fcb582fc6 --- /dev/null +++ b/contracts-test/TestOwnedContract.sol @@ -0,0 +1,19 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity ^0.6.12; +import "../contracts/infrastructure/base/Owned.sol"; + +/** + * @title TestOwnedContract + * @notice Represents an arbitrary contract implementing Owned. + */ +contract TestOwnedContract is Owned { + + uint256 public state; + + event StateSet(uint256 indexed _state, uint256 indexed _value); + + function setStateRestricted(uint256 _state) public onlyOwner payable { + state = _state; + emit StateSet(_state, msg.value); + } +} \ No newline at end of file diff --git a/deployment/0_limited_test.js b/deployment/0_limited_test.js new file mode 100644 index 000000000..c741b7f11 --- /dev/null +++ b/deployment/0_limited_test.js @@ -0,0 +1,39 @@ +/* global artifacts */ +global.web3 = web3; +const chai = require("chai"); +const BN = require("bn.js"); +const bnChai = require("bn-chai"); + +const { expect } = chai; +chai.use(bnChai(BN)); + +const TestOwnedContract = artifacts.require("TestOwnedContract"); +const MultiSig = artifacts.require("MultiSigWallet"); + +const deployManager = require("../utils/deploy-manager.js"); +const MultisigExecutor = require("../utils/multisigexecutor.js"); + +async function main() { + const { deploymentAccount, configurator } = await deployManager.getProps(); + console.log("deploymentAccount", deploymentAccount); + const { config } = configurator; + + const testContractWrapper = await TestOwnedContract.new(); + console.log("TestOwnedContract created at", testContractWrapper.address); + + await testContractWrapper.changeOwner(config.contracts.MultiSigWallet); + console.log("Set the MultiSig as the owner of TestOwnedContract"); + + const MultiSigWrapper = await MultiSig.at(config.contracts.MultiSigWallet); + const multisigExecutor = new MultisigExecutor(MultiSigWrapper, deploymentAccount, config.multisig.autosign); + await multisigExecutor.executeCall(testContractWrapper, "setStateRestricted", [99]); + const stateValue = await testContractWrapper.state(); + expect(stateValue).to.eq.BN(99); + + console.log("## completed deployment script 7 ##"); +} + +// For truffle exec +module.exports = function (callback) { + main().then(() => callback()).catch((err) => callback(err)); +}; From 0522fb5c5a094d805af4b10b23b1218a37deec6c Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Sat, 28 Nov 2020 17:38:39 +0200 Subject: [PATCH 112/113] Refactor signOffchain util method to use the new signMessage and remove obsoleted signMessageHash util method --- package-lock.json | 14 -------------- package.json | 1 - utils/utilities.js | 29 ++++++++++------------------- 3 files changed, 10 insertions(+), 34 deletions(-) diff --git a/package-lock.json b/package-lock.json index 190ebedba..ebe5cb686 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6392,20 +6392,6 @@ } } }, - "ethereumjs-util": { - "version": "7.0.7", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.0.7.tgz", - "integrity": "sha512-vU5rtZBlZsgkTw3o6PDKyB8li2EgLavnAbsKcfsH2YhHH1Le+PP8vEiMnAnvgc1B6uMoaM5GDCrVztBw0Q5K9g==", - "dev": true, - "requires": { - "@types/bn.js": "^4.11.3", - "bn.js": "^5.1.2", - "create-hash": "^1.1.2", - "ethereum-cryptography": "^0.1.3", - "ethjs-util": "0.1.6", - "rlp": "^2.2.4" - } - }, "ethereumjs-vm": { "version": "2.6.0", "resolved": "https://registry.npmjs.org/ethereumjs-vm/-/ethereumjs-vm-2.6.0.tgz", diff --git a/package.json b/package.json index c32417e53..2fc225547 100644 --- a/package.json +++ b/package.json @@ -86,7 +86,6 @@ "eslint-config-airbnb-base": "^14.2.1", "eslint-plugin-import": "^2.20.1", "eth-gas-reporter": "^0.2.19", - "ethereumjs-util": "^7.0.7", "ganache-cli": "^6.12.1", "husky": "^4.3.0", "istanbul": "^0.4.5", diff --git a/utils/utilities.js b/utils/utilities.js index 231d46981..37b6cf7ed 100644 --- a/utils/utilities.js +++ b/utils/utilities.js @@ -1,8 +1,6 @@ const readline = require("readline"); const ethers = require("ethers"); -const ethUtil = require("ethereumjs-util"); const BN = require("bn.js"); -const fs = require("fs"); const chai = require("chai"); const { expect } = chai; @@ -39,7 +37,7 @@ module.exports = { }), async signOffchain(signers, from, to, value, data, chainId, nonce, gasPrice, gasLimit, refundToken, refundAddress) { - const messageHash = `0x${[ + const message = `0x${[ "0x19", "0x00", from, @@ -54,22 +52,16 @@ module.exports = { refundAddress, ].map((hex) => hex.slice(2)).join("")}`; - const sigs = `0x${signers.map((signer) => this.signMessageHash(signer, messageHash)).join("")}`; - return sigs; - }, - - signMessageHash(signer, messageHash) { - const dataBuff = ethUtil.toBuffer(ethers.utils.keccak256(messageHash)); - const msgHashBuff = ethUtil.hashPersonalMessage(dataBuff); - - const accountsJson = JSON.parse(fs.readFileSync("./ganache-accounts.json", "utf8")); - const pkey = accountsJson.private_keys[signer.toLowerCase()]; - if (!pkey) throw new Error(`${signer} account private key not found`); + const messageHash = ethers.utils.keccak256(message); + const signatures = await Promise.all( + signers.map(async (signer) => { + const sig = await this.signMessage(messageHash, signer); + return sig.slice(2); + }) + ); + const joinedSignatures = `0x${signatures.join("")}`; - const sig = ethUtil.ecsign(msgHashBuff, Buffer.from(pkey, "hex")); - const signature = ethUtil.toRpcSig(sig.v, sig.r, sig.s); - const split = ethers.utils.splitSignature(signature); - return ethers.utils.joinSignature(split).slice(2); + return joinedSignatures; }, async signMessage(message, signer) { @@ -261,7 +253,6 @@ module.exports = { async getAccount(index) { const accounts = await web3.eth.getAccounts(); - console.log("accounts", accounts); return accounts[index]; } }; From 9fd72d7745b9aa636f1ecc1ecb3dbf52e75af96a Mon Sep 17 00:00:00 2001 From: elenadimitrova Date: Sat, 28 Nov 2020 19:14:31 +0200 Subject: [PATCH 113/113] Package updates --- package-lock.json | 489 +++++++++++++++++++++++++++++++++++----------- package.json | 14 +- 2 files changed, 377 insertions(+), 126 deletions(-) diff --git a/package-lock.json b/package-lock.json index ebe5cb686..ccd1802cb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -385,9 +385,9 @@ } }, "@ethersproject/basex": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/@ethersproject/basex/-/basex-5.0.4.tgz", - "integrity": "sha512-ixIr/kKiAoSzOnSc777AGIOAhKai5Ivqr4HO/Gz+YG+xkfv6kqD6AW4ga9vM20Wwb0QBhh3LoRWTu4V1K+x9Ew==", + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/@ethersproject/basex/-/basex-5.0.6.tgz", + "integrity": "sha512-Y/8dowRxBF3bsKkqEp7XN4kcFFQ0o5xxP1YyopfqkXejaOEGiD7ToQdQ0pIZpAJ5GreW56oFOTDDSO6ZcUCNYg==", "requires": { "@ethersproject/bytes": "^5.0.4", "@ethersproject/properties": "^5.0.3" @@ -427,9 +427,9 @@ } }, "@ethersproject/contracts": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@ethersproject/contracts/-/contracts-5.0.5.tgz", - "integrity": "sha512-tFI255lFbmbqMkgnuyhDWHl3yWqttPlReplYuVvDCT/SuvBjLR4ad2uipBlh1fh5X1ipK9ettAoV4S0HKim4Kw==", + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/@ethersproject/contracts/-/contracts-5.0.8.tgz", + "integrity": "sha512-PecBL4vnsrpuks2lzzkRsOts8csJy338HNDKDIivbFmx92BVzh3ohOOv3XsoYPSXIHQvobF959W+aSk3RCZL/g==", "requires": { "@ethersproject/abi": "^5.0.5", "@ethersproject/abstract-provider": "^5.0.4", @@ -458,9 +458,9 @@ } }, "@ethersproject/hdnode": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@ethersproject/hdnode/-/hdnode-5.0.5.tgz", - "integrity": "sha512-Ho4HZaK+KijE5adayvjAGusWMnT0mgwGa5hGMBofBOgX9nqiKf6Wxx68SXBGI1/L3rmKo6mlAjxUd8gefs0teQ==", + "version": "5.0.7", + "resolved": "https://registry.npmjs.org/@ethersproject/hdnode/-/hdnode-5.0.7.tgz", + "integrity": "sha512-89tphqlji4y/LNE1cSaMQ3hrBtJ4lO1qWGi2hn54LiHym85DTw+zAKbA8QgmdSdJDLGR/kc9VHaIPQ+vZQ2LkQ==", "requires": { "@ethersproject/abstract-signer": "^5.0.4", "@ethersproject/basex": "^5.0.3", @@ -477,9 +477,9 @@ } }, "@ethersproject/json-wallets": { - "version": "5.0.7", - "resolved": "https://registry.npmjs.org/@ethersproject/json-wallets/-/json-wallets-5.0.7.tgz", - "integrity": "sha512-dgOn9JtGgjT28mDXs4LYY2rT4CzS6bG/rxoYuPq3TLHIf6nmvBcr33Fee6RrM/y8UAx4gyIkf6wb2cXsOctvQQ==", + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/@ethersproject/json-wallets/-/json-wallets-5.0.9.tgz", + "integrity": "sha512-EWuFvJd8nu90dkmJwmJddxOYCvFvMkKBsZi8rxTme2XEZsHKOFnybVkoL23u7ZtApuEfTKmVcR2PTwgZwqDsKw==", "requires": { "@ethersproject/abstract-signer": "^5.0.4", "@ethersproject/address": "^5.0.4", @@ -519,9 +519,9 @@ } }, "@ethersproject/pbkdf2": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/@ethersproject/pbkdf2/-/pbkdf2-5.0.4.tgz", - "integrity": "sha512-9jVBjHXQKfr9+3bkCg01a8Cd1H9e+7Kw3ZMIvAxD0lZtuzrXsJxm1hVwY9KA+PRUvgS/9tTP4viXQYwLAax7zg==", + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/@ethersproject/pbkdf2/-/pbkdf2-5.0.6.tgz", + "integrity": "sha512-CUYciSxR/AaCoKMJk3WUW+BDhR41G3C+O9lOeZ4bR1wDhLKL2Z8p0ciF5XDEiVbmI4CToW6boVKybeVMdngRrg==", "requires": { "@ethersproject/bytes": "^5.0.4", "@ethersproject/sha2": "^5.0.3" @@ -536,9 +536,9 @@ } }, "@ethersproject/providers": { - "version": "5.0.14", - "resolved": "https://registry.npmjs.org/@ethersproject/providers/-/providers-5.0.14.tgz", - "integrity": "sha512-K9QRRkkHWyprm3g4L8U9aPx5uyivznL4RYemkN2shCQumyGqFJ5SO+OtQrgebVm0JpGwFAUGugnhRUh49sjErw==", + "version": "5.0.17", + "resolved": "https://registry.npmjs.org/@ethersproject/providers/-/providers-5.0.17.tgz", + "integrity": "sha512-bJnvs5X7ttU5x2ekGJYG7R3Z+spZawLFfR0IDsbaMDLiCwZOyrgk+VTBU7amSFLT0WUhWFv8WwSUB+AryCQG1Q==", "requires": { "@ethersproject/abstract-provider": "^5.0.4", "@ethersproject/abstract-signer": "^5.0.4", @@ -562,9 +562,9 @@ } }, "@ethersproject/random": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/@ethersproject/random/-/random-5.0.4.tgz", - "integrity": "sha512-AIZJhqs6Ba4/+U3lOjt3QZbP6b/kuuGLJUYFUonAgWmkTHwqsCwYnFvnHKQSUuHbXHvErp7WFXFlztx+yMn3kQ==", + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/@ethersproject/random/-/random-5.0.6.tgz", + "integrity": "sha512-8nsVNaZvZ9OD5NXfzE4mmz8IH/1DYJbAR95xpRxZkIuNmfn6QlMp49ccJYZWGhs6m0Zj2+FXjx3pzXfYlo9/dA==", "requires": { "@ethersproject/bytes": "^5.0.4", "@ethersproject/logger": "^5.0.5" @@ -580,9 +580,9 @@ } }, "@ethersproject/sha2": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/@ethersproject/sha2/-/sha2-5.0.4.tgz", - "integrity": "sha512-0yFhf1mspxAfWdXXoPtK94adUeu1R7/FzAa+DfEiZTc76sz/vHXf0LSIazoR3znYKFny6haBxME+usbvvEcF3A==", + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/@ethersproject/sha2/-/sha2-5.0.6.tgz", + "integrity": "sha512-30gypDLkfkP5gE3llqi0jEuRV8m4/nvzeqmqMxiihZ7veFQHqDaGpyFeHzFim+qGeH9fq0lgYjavLvwW69+Fkw==", "requires": { "@ethersproject/bytes": "^5.0.4", "@ethersproject/logger": "^5.0.5", @@ -612,9 +612,9 @@ } }, "@ethersproject/solidity": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@ethersproject/solidity/-/solidity-5.0.5.tgz", - "integrity": "sha512-DMFQ0ouXmNVoKWbGEUFGi8Urli4SJip9jXafQyFHWPRr5oJUqDVkNfwcyC37k+mhBG93k7qrYXCH2xJnGEOxHg==", + "version": "5.0.7", + "resolved": "https://registry.npmjs.org/@ethersproject/solidity/-/solidity-5.0.7.tgz", + "integrity": "sha512-dUevKUZ06p/VMLP/+cz4QUV+lA17NixucDJfm0ioWF0B3R0Lf+6wqwPchcqiAXlxkNFGIax7WNLgGMh4CkQ8iw==", "requires": { "@ethersproject/bignumber": "^5.0.7", "@ethersproject/bytes": "^5.0.4", @@ -650,9 +650,9 @@ } }, "@ethersproject/units": { - "version": "5.0.6", - "resolved": "https://registry.npmjs.org/@ethersproject/units/-/units-5.0.6.tgz", - "integrity": "sha512-tsJuy4mipppdmooukRfhXt8fGx9nxvfvG6Xdy0RDm7LzHsjghjwQ69m2bCpId6SDSR1Uq1cQ9irPiUBSyWolUA==", + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/@ethersproject/units/-/units-5.0.8.tgz", + "integrity": "sha512-3O4MaNHFs05vC5v2ZGqVFVWtO1WyqFejO78M7Qh16njo282aoMlENtVI6cn2B36zOLFXRvYt2pYx6xCG53qKzg==", "requires": { "@ethersproject/bignumber": "^5.0.7", "@ethersproject/constants": "^5.0.4", @@ -660,9 +660,9 @@ } }, "@ethersproject/wallet": { - "version": "5.0.7", - "resolved": "https://registry.npmjs.org/@ethersproject/wallet/-/wallet-5.0.7.tgz", - "integrity": "sha512-n2GX1+2Tc0qV8dguUcLkjNugINKvZY7u/5fEsn0skW9rz5+jHTR5IKMV6jSfXA+WjQT8UCNMvkI3CNcdhaPbTQ==", + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/@ethersproject/wallet/-/wallet-5.0.9.tgz", + "integrity": "sha512-GfpQF56PO/945SJq7Wdg5F5U6wkxaDgkAzcgGbCW6Joz8oW8MzKItkvYCzMh+j/8gJMzFncsuqX4zg2gq3J6nQ==", "requires": { "@ethersproject/abstract-provider": "^5.0.4", "@ethersproject/abstract-signer": "^5.0.4", @@ -694,9 +694,9 @@ } }, "@ethersproject/wordlists": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@ethersproject/wordlists/-/wordlists-5.0.5.tgz", - "integrity": "sha512-XA3ycFltVrCTQt04w5nHu3Xq5Z6HjqWsXaAYQHFdqtugyUsIumaO9S5MOwFFuUYTNkZUoT3jCRa/OBS+K4tLfA==", + "version": "5.0.7", + "resolved": "https://registry.npmjs.org/@ethersproject/wordlists/-/wordlists-5.0.7.tgz", + "integrity": "sha512-ZjQtYxm41FmHfYgpkdQG++EDcBPQWv9O6FfP6NndYRVaXaQZh6eq3sy7HQP8zCZ8dznKgy6ZyKECS8qdvnGHwA==", "requires": { "@ethersproject/bytes": "^5.0.4", "@ethersproject/hash": "^5.0.4", @@ -874,9 +874,9 @@ } }, "@truffle/codec": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/@truffle/codec/-/codec-0.8.1.tgz", - "integrity": "sha512-X6BcpS97zpmLWRoAg9zJJIPoEiAJ3MRRJd5zf+qTmLbYXVhek9frreDMhs4WoaQSe3/DOYjVxtPmwmY4+alVvw==", + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/@truffle/codec/-/codec-0.9.0.tgz", + "integrity": "sha512-lAkycqrvALZn677H9/CWxmpWVBejYCWbytNeFuHHM69gqNtwzZjDjbIyEUHQNiH5ZWed4XkIdJj7AxvlaCc5jw==", "dev": true, "requires": { "big.js": "^5.2.2", @@ -1012,14 +1012,14 @@ } }, "@truffle/contract": { - "version": "4.2.31", - "resolved": "https://registry.npmjs.org/@truffle/contract/-/contract-4.2.31.tgz", - "integrity": "sha512-wifJ343skGQpFJQlmRQyPRquguR0uDSIVaRPHXVsGnX+6p1BOGP2zhkSUjLo8WUqyfmw/1bZ/Z9GJZ7XM8PVOw==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@truffle/contract/-/contract-4.3.0.tgz", + "integrity": "sha512-3x9dhBuDElRixR8bxknPfuGH7bBaOlYGF2FsUsuK3CoXo7hblXSQg8VZ/ns55oTSxDzRkwmI0EnRtwzGObaoGA==", "dev": true, "requires": { "@truffle/blockchain-utils": "^0.0.25", "@truffle/contract-schema": "^3.3.2", - "@truffle/debug-utils": "^5.0.2", + "@truffle/debug-utils": "^5.0.3", "@truffle/error": "^0.0.11", "@truffle/interface-adapter": "^0.4.18", "bignumber.js": "^7.2.1", @@ -1051,9 +1051,9 @@ } }, "@types/node": { - "version": "10.17.46", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.46.tgz", - "integrity": "sha512-Tice8a+sJtlP9C1EUo0DYyjq52T37b3LexVu3p871+kfIBIN+OQ7PKPei1oF3MgF39olEpUfxaLtD+QFc1k69Q==", + "version": "10.17.47", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.47.tgz", + "integrity": "sha512-YZ1mMAdUPouBZCdeugjV8y1tqqr28OyL8DYbH5ePCfe9zcXtvbh1wDBy7uzlHkXo3Qi07kpzXfvycvrkby/jXw==", "dev": true }, "bignumber.js": { @@ -1182,9 +1182,9 @@ }, "dependencies": { "@types/node": { - "version": "12.19.6", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.19.6.tgz", - "integrity": "sha512-U2VopDdmBoYBmtm8Rz340mvvSz34VgX/K9+XCuckvcLGMkt3rbMX8soqFOikIPlPBc5lmw8By9NUK7bEFSBFlQ==", + "version": "12.19.7", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.19.7.tgz", + "integrity": "sha512-zvjOU1g4CpPilbTDUATnZCUb/6lARMRAqzT7ILwl1P3YvU2leEcZ2+fw9+Jrw/paXB1CgQyXTrN4hWDtqT9O2A==", "dev": true }, "bignumber.js": { @@ -1396,9 +1396,9 @@ }, "dependencies": { "@types/node": { - "version": "12.19.6", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.19.6.tgz", - "integrity": "sha512-U2VopDdmBoYBmtm8Rz340mvvSz34VgX/K9+XCuckvcLGMkt3rbMX8soqFOikIPlPBc5lmw8By9NUK7bEFSBFlQ==", + "version": "12.19.7", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.19.7.tgz", + "integrity": "sha512-zvjOU1g4CpPilbTDUATnZCUb/6lARMRAqzT7ILwl1P3YvU2leEcZ2+fw9+Jrw/paXB1CgQyXTrN4hWDtqT9O2A==", "dev": true } } @@ -1505,16 +1505,16 @@ } }, "@truffle/debug-utils": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@truffle/debug-utils/-/debug-utils-5.0.2.tgz", - "integrity": "sha512-VTnbmTcjUKR0uctqUiPDlIt+R/7ix78hntSZku/qZ/EO/b1ts8W2fA0M2uPU+G8cicvvUpidg1z+qk/u844rDQ==", + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/@truffle/debug-utils/-/debug-utils-5.0.3.tgz", + "integrity": "sha512-pVbYg13gsCWTUQzEycr2fy0knIeegkj/yxJi2xf3BwEIAw4poYPl4ItxDMX9MTgNTwSe7ta+BykECj6djMuQNw==", "dev": true, "requires": { - "@truffle/codec": "^0.8.1", + "@truffle/codec": "^0.9.0", "@trufflesuite/chromafi": "^2.2.1", "chalk": "^2.4.2", "debug": "^4.1.0", - "highlight.js": "^9.15.8", + "highlight.js": "^10.4.0", "highlightjs-solidity": "^1.0.19" }, "dependencies": { @@ -2501,6 +2501,12 @@ "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", "dev": true }, + "highlight.js": { + "version": "9.18.5", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-9.18.5.tgz", + "integrity": "sha512-a5bFyofd/BHCX52/8i8uJkjr9DYwXIPnM/plwI6W7ezItLGqzt7X2G2nXuYSfsIJdkwwj/g9DG1LkcGJI/dDoA==", + "dev": true + }, "strip-ansi": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", @@ -3139,15 +3145,50 @@ } }, "array.prototype.map": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array.prototype.map/-/array.prototype.map-1.0.2.tgz", - "integrity": "sha512-Az3OYxgsa1g7xDYp86l0nnN4bcmuEITGe1rbdEBVkrqkzMgDcbdQ2R7r41pNzti+4NMces3H8gMmuioZUilLgw==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/array.prototype.map/-/array.prototype.map-1.0.3.tgz", + "integrity": "sha512-nNcb30v0wfDyIe26Yif3PcV1JXQp4zEeEfupG7L4SRjnD6HLbO5b2a7eVSba53bOx4YCHYMBHt+Fp4vYstneRA==", "dev": true, "requires": { + "call-bind": "^1.0.0", "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1", + "es-abstract": "^1.18.0-next.1", "es-array-method-boxes-properly": "^1.0.0", - "is-string": "^1.0.4" + "is-string": "^1.0.5" + }, + "dependencies": { + "es-abstract": { + "version": "1.18.0-next.1", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz", + "integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==", + "dev": true, + "requires": { + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1", + "is-callable": "^1.2.2", + "is-negative-zero": "^2.0.0", + "is-regex": "^1.1.1", + "object-inspect": "^1.8.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.1", + "string.prototype.trimend": "^1.0.1", + "string.prototype.trimstart": "^1.0.1" + } + }, + "object.assign": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", + "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "has-symbols": "^1.0.1", + "object-keys": "^1.1.1" + } + } } }, "asap": { @@ -3268,9 +3309,9 @@ "dev": true }, "aws-sdk": { - "version": "2.787.0", - "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.787.0.tgz", - "integrity": "sha512-3WlUdWqUB8Vhdvj/7TENr/7SEmQzxmnHxOJ8l2WjZbcMRSuI0/9Ym4p1TC3hf21VDVDhkdGlw60QqpZQ1qb+Mg==", + "version": "2.799.0", + "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.799.0.tgz", + "integrity": "sha512-NYAoiNU+bJXhlJsC0rFqrmD5t5ho7/VxldmziP6HLPYHfOCI9Uvk6UVjfPmhLWPm0mHnIxhsHqmsNGyjhHNYmw==", "requires": { "buffer": "4.9.2", "events": "1.1.1", @@ -5187,9 +5228,9 @@ } }, "eslint": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.13.0.tgz", - "integrity": "sha512-uCORMuOO8tUzJmsdRtrvcGq5qposf7Rw0LwkTJkoDbOycVQtQjmnhZSuLQnozLE4TmAzlMVV45eCHmQ1OpDKUQ==", + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.14.0.tgz", + "integrity": "sha512-5YubdnPXrlrYAFCKybPuHIAH++PINe1pmKNc5wQRB9HSbqIK1ywAnntE3Wwua4giKu0bjligf1gLF6qxMGOYRA==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", @@ -6529,40 +6570,238 @@ } }, "ethers": { - "version": "5.0.19", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.0.19.tgz", - "integrity": "sha512-0AZnUgZh98q888WAd1oI3aLeI+iyDtrupjANVtPPS7O63lVopkR/No8A1NqSkgl/rU+b2iuu2mUZor6GD4RG2w==", - "requires": { - "@ethersproject/abi": "5.0.7", - "@ethersproject/abstract-provider": "5.0.5", - "@ethersproject/abstract-signer": "5.0.7", - "@ethersproject/address": "5.0.5", - "@ethersproject/base64": "5.0.4", - "@ethersproject/basex": "5.0.4", - "@ethersproject/bignumber": "5.0.8", - "@ethersproject/bytes": "5.0.5", - "@ethersproject/constants": "5.0.5", - "@ethersproject/contracts": "5.0.5", - "@ethersproject/hash": "5.0.6", - "@ethersproject/hdnode": "5.0.5", - "@ethersproject/json-wallets": "5.0.7", - "@ethersproject/keccak256": "5.0.4", - "@ethersproject/logger": "5.0.6", - "@ethersproject/networks": "5.0.4", - "@ethersproject/pbkdf2": "5.0.4", - "@ethersproject/properties": "5.0.4", - "@ethersproject/providers": "5.0.14", - "@ethersproject/random": "5.0.4", - "@ethersproject/rlp": "5.0.4", - "@ethersproject/sha2": "5.0.4", - "@ethersproject/signing-key": "5.0.5", - "@ethersproject/solidity": "5.0.5", - "@ethersproject/strings": "5.0.5", - "@ethersproject/transactions": "5.0.6", - "@ethersproject/units": "5.0.6", - "@ethersproject/wallet": "5.0.7", - "@ethersproject/web": "5.0.9", - "@ethersproject/wordlists": "5.0.5" + "version": "5.0.23", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.0.23.tgz", + "integrity": "sha512-f3pTcgYpMhtmMTMG9KO6pWHYjrCiGz7yVnvMsTQgAYfAVAeUxKy2H1cxQJyqyghRjtAvgVYJlnXQo8mMCD63BA==", + "requires": { + "@ethersproject/abi": "5.0.9", + "@ethersproject/abstract-provider": "5.0.7", + "@ethersproject/abstract-signer": "5.0.9", + "@ethersproject/address": "5.0.8", + "@ethersproject/base64": "5.0.6", + "@ethersproject/basex": "5.0.6", + "@ethersproject/bignumber": "5.0.12", + "@ethersproject/bytes": "5.0.8", + "@ethersproject/constants": "5.0.7", + "@ethersproject/contracts": "5.0.8", + "@ethersproject/hash": "5.0.8", + "@ethersproject/hdnode": "5.0.7", + "@ethersproject/json-wallets": "5.0.9", + "@ethersproject/keccak256": "5.0.6", + "@ethersproject/logger": "5.0.8", + "@ethersproject/networks": "5.0.6", + "@ethersproject/pbkdf2": "5.0.6", + "@ethersproject/properties": "5.0.6", + "@ethersproject/providers": "5.0.17", + "@ethersproject/random": "5.0.6", + "@ethersproject/rlp": "5.0.6", + "@ethersproject/sha2": "5.0.6", + "@ethersproject/signing-key": "5.0.7", + "@ethersproject/solidity": "5.0.7", + "@ethersproject/strings": "5.0.7", + "@ethersproject/transactions": "5.0.8", + "@ethersproject/units": "5.0.8", + "@ethersproject/wallet": "5.0.9", + "@ethersproject/web": "5.0.11", + "@ethersproject/wordlists": "5.0.7" + }, + "dependencies": { + "@ethersproject/abi": { + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.0.9.tgz", + "integrity": "sha512-ily2OufA2DTrxkiHQw5GqbkMSnNKuwZBqKsajtT0ERhZy1r9w2CpW1bmtRMIGzaqQxCdn/GEoFogexk72cBBZQ==", + "requires": { + "@ethersproject/address": "^5.0.4", + "@ethersproject/bignumber": "^5.0.7", + "@ethersproject/bytes": "^5.0.4", + "@ethersproject/constants": "^5.0.4", + "@ethersproject/hash": "^5.0.4", + "@ethersproject/keccak256": "^5.0.3", + "@ethersproject/logger": "^5.0.5", + "@ethersproject/properties": "^5.0.3", + "@ethersproject/strings": "^5.0.4" + } + }, + "@ethersproject/abstract-provider": { + "version": "5.0.7", + "resolved": "https://registry.npmjs.org/@ethersproject/abstract-provider/-/abstract-provider-5.0.7.tgz", + "integrity": "sha512-NF16JGn6M0zZP5ZS8KtDL2Rh7yHxZbUjBIHLNHMm/0X0BephhjUWy8jqs/Zks6kDJRzNthgmPVy41Ec0RYWPYA==", + "requires": { + "@ethersproject/bignumber": "^5.0.7", + "@ethersproject/bytes": "^5.0.4", + "@ethersproject/logger": "^5.0.5", + "@ethersproject/networks": "^5.0.3", + "@ethersproject/properties": "^5.0.3", + "@ethersproject/transactions": "^5.0.5", + "@ethersproject/web": "^5.0.6" + } + }, + "@ethersproject/abstract-signer": { + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/@ethersproject/abstract-signer/-/abstract-signer-5.0.9.tgz", + "integrity": "sha512-CM5UNmXQaA03MyYARFDDRjHWBxujO41tVle7glf5kHcQsDDULgqSVpkliLJMtPzZjOKFeCVZBHybTZDEZg5zzg==", + "requires": { + "@ethersproject/abstract-provider": "^5.0.4", + "@ethersproject/bignumber": "^5.0.7", + "@ethersproject/bytes": "^5.0.4", + "@ethersproject/logger": "^5.0.5", + "@ethersproject/properties": "^5.0.3" + } + }, + "@ethersproject/address": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/@ethersproject/address/-/address-5.0.8.tgz", + "integrity": "sha512-V87DHiZMZR6hmFYmoGaHex0D53UEbZpW75uj8AqPbjYUmi65RB4N2LPRcJXuWuN2R0Y2CxkvW6ArijWychr5FA==", + "requires": { + "@ethersproject/bignumber": "^5.0.10", + "@ethersproject/bytes": "^5.0.4", + "@ethersproject/keccak256": "^5.0.3", + "@ethersproject/logger": "^5.0.5", + "@ethersproject/rlp": "^5.0.3" + } + }, + "@ethersproject/base64": { + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/@ethersproject/base64/-/base64-5.0.6.tgz", + "integrity": "sha512-HwrGn8YMiUf7bcdVvB4NJ+eWT0BtEFpDtrYxVXEbR7p/XBSJjwiR7DEggIiRvxbualMKg+EZijQWJ3az2li0uw==", + "requires": { + "@ethersproject/bytes": "^5.0.4" + } + }, + "@ethersproject/bignumber": { + "version": "5.0.12", + "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.0.12.tgz", + "integrity": "sha512-mbFZjwthx6vFlHG9owXP/C5QkNvsA+xHpDCkPPPdG2n1dS9AmZAL5DI0InNLid60rQWL3MXpEl19tFmtL7Q9jw==", + "requires": { + "@ethersproject/bytes": "^5.0.8", + "@ethersproject/logger": "^5.0.5", + "bn.js": "^4.4.0" + } + }, + "@ethersproject/bytes": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.0.8.tgz", + "integrity": "sha512-O+sJNVGzzuy51g+EMK8BegomqNIg+C2RO6vOt0XP6ac4o4saiq69FnjlsrNslaiMFVO7qcEHBsWJ9hx1tj1lMw==", + "requires": { + "@ethersproject/logger": "^5.0.5" + } + }, + "@ethersproject/constants": { + "version": "5.0.7", + "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.0.7.tgz", + "integrity": "sha512-cbQK1UpE4hamB52Eg6DLhJoXeQ1plSzekh5Ujir1xdREdwdsZPPXKczkrWqBBR0KyywJZHN/o/hj0w8j7scSGg==", + "requires": { + "@ethersproject/bignumber": "^5.0.7" + } + }, + "@ethersproject/hash": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/@ethersproject/hash/-/hash-5.0.8.tgz", + "integrity": "sha512-Qay01tcFyFreYjSMt82rOQGMfQDmLm1sj3iNNO1BhrVf840xgBZuJ7gBATERzAjTuTCHUHw9BuGwxErJUS95yg==", + "requires": { + "@ethersproject/abstract-signer": "^5.0.6", + "@ethersproject/address": "^5.0.5", + "@ethersproject/bignumber": "^5.0.8", + "@ethersproject/bytes": "^5.0.4", + "@ethersproject/keccak256": "^5.0.3", + "@ethersproject/logger": "^5.0.5", + "@ethersproject/properties": "^5.0.4", + "@ethersproject/strings": "^5.0.4" + } + }, + "@ethersproject/keccak256": { + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.0.6.tgz", + "integrity": "sha512-eJ4Id/i2rwrf5JXEA7a12bG1phuxjj47mPZgDUbttuNBodhSuZF2nEO5QdpaRjmlphQ8Kt9PNqY/z7lhtJptZg==", + "requires": { + "@ethersproject/bytes": "^5.0.4", + "js-sha3": "0.5.7" + } + }, + "@ethersproject/logger": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.0.8.tgz", + "integrity": "sha512-SkJCTaVTnaZ3/ieLF5pVftxGEFX56pTH+f2Slrpv7cU0TNpUZNib84QQdukd++sWUp/S7j5t5NW+WegbXd4U/A==" + }, + "@ethersproject/networks": { + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/@ethersproject/networks/-/networks-5.0.6.tgz", + "integrity": "sha512-2Cg1N5109zzFOBfkyuPj+FfF7ioqAsRffmybJ2lrsiB5skphIAE72XNSCs4fqktlf+rwSh/5o/UXRjXxvSktZw==", + "requires": { + "@ethersproject/logger": "^5.0.5" + } + }, + "@ethersproject/properties": { + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.0.6.tgz", + "integrity": "sha512-a9DUMizYhJ0TbtuDkO9iYlb2CDlpSKqGPDr+amvlZhRspQ6jbl5Eq8jfu4SCcGlcfaTbguJmqGnyOGn1EFt6xA==", + "requires": { + "@ethersproject/logger": "^5.0.5" + } + }, + "@ethersproject/rlp": { + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.0.6.tgz", + "integrity": "sha512-M223MTaydfmQSsvqAl0FJZDYFlSqt6cgbhnssLDwqCKYegAHE16vrFyo+eiOapYlt32XAIJm0BXlqSunULzZuQ==", + "requires": { + "@ethersproject/bytes": "^5.0.4", + "@ethersproject/logger": "^5.0.5" + } + }, + "@ethersproject/signing-key": { + "version": "5.0.7", + "resolved": "https://registry.npmjs.org/@ethersproject/signing-key/-/signing-key-5.0.7.tgz", + "integrity": "sha512-JYndnhFPKH0daPcIjyhi+GMcw3srIHkQ40hGRe6DA0CdGrpMfgyfSYDQ2D8HL2lgR+Xm4SHfEB0qba6+sCyrvg==", + "requires": { + "@ethersproject/bytes": "^5.0.4", + "@ethersproject/logger": "^5.0.5", + "@ethersproject/properties": "^5.0.3", + "elliptic": "6.5.3" + } + }, + "@ethersproject/strings": { + "version": "5.0.7", + "resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.0.7.tgz", + "integrity": "sha512-a+6T80LvmXGMOOWQTZHtGGQEg1z4v8rm8oX70KNs55YtPXI/5J3LBbVf5pyqCKSlmiBw5IaepPvs5XGalRUSZQ==", + "requires": { + "@ethersproject/bytes": "^5.0.4", + "@ethersproject/constants": "^5.0.4", + "@ethersproject/logger": "^5.0.5" + } + }, + "@ethersproject/transactions": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/@ethersproject/transactions/-/transactions-5.0.8.tgz", + "integrity": "sha512-i7NtOXVzUe+YSU6QufzlRrI2WzHaTmULAKHJv4duIZMLqzehCBXGA9lTpFgFdqGYcQJ7vOtNFC2BB2mSjmuXqg==", + "requires": { + "@ethersproject/address": "^5.0.4", + "@ethersproject/bignumber": "^5.0.7", + "@ethersproject/bytes": "^5.0.4", + "@ethersproject/constants": "^5.0.4", + "@ethersproject/keccak256": "^5.0.3", + "@ethersproject/logger": "^5.0.5", + "@ethersproject/properties": "^5.0.3", + "@ethersproject/rlp": "^5.0.3", + "@ethersproject/signing-key": "^5.0.4" + } + }, + "@ethersproject/web": { + "version": "5.0.11", + "resolved": "https://registry.npmjs.org/@ethersproject/web/-/web-5.0.11.tgz", + "integrity": "sha512-x03ihbPoN1S8Gsh9WSwxkYxUIumLi02ZEKJku1C43sxBfe+mdprWyvujzYlpuoRNfWRgNhdRDKMP8JbG6MwNGA==", + "requires": { + "@ethersproject/base64": "^5.0.3", + "@ethersproject/bytes": "^5.0.4", + "@ethersproject/logger": "^5.0.5", + "@ethersproject/properties": "^5.0.3", + "@ethersproject/strings": "^5.0.4" + } + }, + "bn.js": { + "version": "4.11.9", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" + } } }, "ethjs-unit": { @@ -8495,9 +8734,9 @@ "dev": true }, "highlight.js": { - "version": "9.18.5", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-9.18.5.tgz", - "integrity": "sha512-a5bFyofd/BHCX52/8i8uJkjr9DYwXIPnM/plwI6W7ezItLGqzt7X2G2nXuYSfsIJdkwwj/g9DG1LkcGJI/dDoA==", + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.4.0.tgz", + "integrity": "sha512-EfrUGcQ63oLJbj0J0RI9ebX6TAITbsDBLbsjr881L/X5fMO9+oadKzEF21C7R3ULKG6Gv3uoab2HiqVJa/4+oA==", "dev": true }, "highlightjs-solidity": { @@ -9605,9 +9844,9 @@ "dev": true }, "lint-staged": { - "version": "10.5.1", - "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-10.5.1.tgz", - "integrity": "sha512-fTkTGFtwFIJJzn/PbUO3RXyEBHIhbfYBE7+rJyLcOXabViaO/h6OslgeK6zpeUtzkDrzkgyAYDTLAwx6JzDTHw==", + "version": "10.5.2", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-10.5.2.tgz", + "integrity": "sha512-e8AYR1TDlzwB8VVd38Xu2lXDZf6BcshVqKVuBQThDJRaJLobqKnpbm4dkwJ2puypQNbLr9KF/9mfA649mAGvjA==", "dev": true, "requires": { "chalk": "^4.1.0", @@ -9679,9 +9918,9 @@ } }, "listr2": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/listr2/-/listr2-3.2.2.tgz", - "integrity": "sha512-AajqcZEUikF2ioph6PfH3dIuxJclhr3i3kHgTOP0xeXdWQohrvJAAmqVcV43/GI987HFY/vzT73jYXoa4esDHg==", + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/listr2/-/listr2-3.2.3.tgz", + "integrity": "sha512-vUb80S2dSUi8YxXahO8/I/s29GqnOL8ozgHVLjfWQXa03BNEeS1TpBLjh2ruaqq5ufx46BRGvfymdBSuoXET5w==", "dev": true, "requires": { "chalk": "^4.1.0", @@ -10487,12 +10726,12 @@ } }, "p-limit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.0.2.tgz", - "integrity": "sha512-iwqZSOoWIW+Ew4kAGUlN16J4M7OB3ysMLSZtnhmqx7njIHFPlxWBX8xo3lVTyFVq6mI/lL9qt2IsN1sHwaxJkg==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, "requires": { - "p-try": "^2.0.0" + "yocto-queue": "^0.1.0" } }, "p-locate": { @@ -12619,12 +12858,12 @@ } }, "solhint": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/solhint/-/solhint-3.3.1.tgz", - "integrity": "sha512-JXAOLM2UQrLOtx4fKXzleq6CR0N7AlRfki+dFyvab93x4DoHeHQ4Ic2LMScT8V0AddXgbKtR8xdIIZKLh07dNg==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/solhint/-/solhint-3.3.2.tgz", + "integrity": "sha512-8tHCkIAk1axLLG6Qu2WIH3GgNABonj9eAWejJbov3o3ujkZQRNHeHU1cC4/Dmjsh3Om7UzFFeADUHu2i7ZJeiw==", "dev": true, "requires": { - "@solidity-parser/parser": "^0.8.1", + "@solidity-parser/parser": "^0.8.2", "ajv": "^6.6.1", "antlr4": "4.7.1", "ast-parents": "0.0.1", @@ -12641,6 +12880,12 @@ "semver": "^6.3.0" }, "dependencies": { + "@solidity-parser/parser": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.8.2.tgz", + "integrity": "sha512-8LySx3qrNXPgB5JiULfG10O3V7QTxI/TLzSw5hFQhXWSkVxZBAv4rZQ0sYgLEbc8g3L2lmnujj1hKul38Eu5NQ==", + "dev": true + }, "ansi-escapes": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", @@ -15154,6 +15399,12 @@ "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", "dev": true + }, + "yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true } } } diff --git a/package.json b/package.json index 2fc225547..947abef77 100644 --- a/package.json +++ b/package.json @@ -62,9 +62,9 @@ "@uniswap/lib": "^1.1.2", "@uniswap/v2-core": "^1.0.1", "ajv": "^6.10.0", - "aws-sdk": "^2.787.0", + "aws-sdk": "^2.799.0", "child_process": "^1.0.2", - "ethers": "^5.0.19", + "ethers": "^5.0.23", "fs": "0.0.1-security", "inquirer": "^7.0.0", "node-fetch": "^2.6.1", @@ -76,24 +76,24 @@ "-": "0.0.1", "@codechecks/client": "^0.1.10", "@truffle/config": "^1.2.33", - "@truffle/contract": "^4.2.31", + "@truffle/contract": "^4.3.0", "@truffle/hdwallet-provider": "^1.2.0", "bn-chai": "^1.0.1", "bn.js": "^5.1.3", "chai": "^4.2.0", "dotenv": "^8.2.0", - "eslint": "^7.13.0", + "eslint": "^7.14.0", "eslint-config-airbnb-base": "^14.2.1", "eslint-plugin-import": "^2.20.1", "eth-gas-reporter": "^0.2.19", "ganache-cli": "^6.12.1", "husky": "^4.3.0", "istanbul": "^0.4.5", - "lint-staged": "^10.5.1", + "lint-staged": "^10.5.2", "mocha-junit-reporter": "^2.0.0", - "solhint": "^3.3.1", + "solhint": "^3.3.2", "solidity-coverage": "^0.7.12", - "truffle": "^5.1.48", + "truffle": "5.1.48", "truffle-assertions": "^0.9.2", "truffle-flatten": "^1.0.8", "truffle-plugin-verify": "^0.5.2",