From 07a895184e0fa764b3cdb76cde1c69a4ee4a8e53 Mon Sep 17 00:00:00 2001 From: Patrick Gallagher Date: Mon, 6 Jan 2020 17:57:58 -0500 Subject: [PATCH 01/13] getInterestSent() working --- README.md | 39 +- notes/scratchData.json | 693 +++++++++++++++++++++++++++++++++++ package.json | 6 +- src/RTokenAnalytics.js | 140 +++++-- subgraph/build/subgraph.yaml | 2 +- subgraph/src/mapping.ts | 2 +- subgraph/subgraph.yaml | 2 +- test/RTokenAnalytics.test.js | 59 +-- test/deployContracts.js | 48 +-- 9 files changed, 890 insertions(+), 101 deletions(-) create mode 100644 notes/scratchData.json diff --git a/README.md b/README.md index 453a68e..5b96c38 100644 --- a/README.md +++ b/README.md @@ -2,13 +2,13 @@ This library provides easy tools for getting data about specific users of rToken. Out of the box you get: -| Feature | Status|Notes | -| --- | --- | --- | -| Subgraph for rSAI on mainnet | :hammer_and_wrench: | Redeemable single-collateral DAI [deployed subgraph](https://thegraph.com/explorer/subgraph/pi0neerpat/rdai-graph). Recommend do not use for production until completed. | -| Subscribe to rToken data in your DAPP | :hammer_and_wrench: | See `src/RTokenAnalytics.js`| -| Local subgraph development and testing | :white_check_mark: | See [Deploying to a local environment](#Deploying-to-a-local-environment)| -| Bring-your-own rToken| :hammer_and_wrench:| See [instructions](#bring-your-own-rtoken) | -| Your suggested feature here | ? | | +| Feature | Status | Notes | +| ----------------------------------------- | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| Subgraph for rSAI on mainnet | :hammer_and_wrench: | Redeemable single-collateral DAI [deployed subgraph](https://thegraph.com/explorer/subgraph/pi0neerpat/rdai-graph). Recommend do not use for production until completed. | +| Subscribe to rToken data in your DAPP | :hammer_and_wrench: | See `src/RTokenAnalytics.js` | +| Local subgraph development and testing | :white_check_mark: | See [Deploying to a local environment](#Deploying-to-a-local-environment) | +| Bring-your-own rToken | :hammer_and_wrench: | See [instructions](#bring-your-own-rtoken) | +| Your suggested feature. What do you need? | ? | | ## Usage @@ -30,7 +30,7 @@ const rtokenAnalytics = new RTokenAnalytics( ); ``` -| Args | Options | Notes | +| Arguments | Options | Notes | | :-----------------: | --------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | | `interestRate` | | Current rToken interest rate. See [Get Interest Rate](#get-interest-rate) for details | | `interestTolerance` | | Todo | @@ -135,8 +135,6 @@ TODO ## Bring-your-own rToken - - ## Deploying to a local environment > :warning: You probably don't need to do this! If your rToken is deployed to `Mainnet` or `Ropsten`, then you should use the hosted servers provided by The Graph. @@ -241,35 +239,40 @@ You should get a response like this ... ``` +:tada: Congrats! if you were successful with the initial setup, you can move to the next section to enable automatic redeployments of the subgraph upon changes. + ### Testing and restarting -Here are the current steps for re-deploying a subgraph once you've made some changes. +Here are the current steps to fully automate :zap: subgraph re-deployment and testing upon changes to the subraph. -Stop your docker instance, and restart it. +In the repo `graph-node/docker`, stop your docker instance, and restart it. ```bash -sudo rm -rf data # optional, use if you see "Error creating the subgraph: subgraph already exists" -docker-compose up +sudo rm -rf data && docker-compose up + ``` + Open a new terminal, at the root directory of this repository. ```bash yarn start_ganache +# leave running ``` -In a new terminal, deploy the contracts and start the automatic re-deployment of a new subgraph, whenever subgraph.yaml is changed. +In a new terminal, deploy the contracts. This will also re-deploy the new subgraph, whenever subgraph.yaml is changed. + ```bash yarn start_subgraph -# Leave running +# leave running ``` In a new terminal, start the test suite + ```bash nodemon -x yarn test_local +# leave running ``` -TODO - ## Contributing Contributions, suggestions, and issues are welcome. At the moment, there are no strict guidelines to follow. diff --git a/notes/scratchData.json b/notes/scratchData.json new file mode 100644 index 0000000..f450d88 --- /dev/null +++ b/notes/scratchData.json @@ -0,0 +1,693 @@ +[ + { + "source": "0x0006e4548aed4502ec8c844567840ce6ef1013f5", +"id": "0x0006e4548aed4502ec8c844567840ce6ef1013f5-0x5d7d257d97d8a81f51187a77c6dd226fb8424d90", + "target": "0x5d7d257d97d8a81f51187a77c6dd226fb8424d90" + }, + { + "source": "0x0006e4548aed4502ec8c844567840ce6ef1013f5", +"id": "0x0006e4548aed4502ec8c844567840ce6ef1013f5-0x5d8c77d2123acd0490bf779eac2be02d5b0d322c", + "target": "0x5d8c77d2123acd0490bf779eac2be02d5b0d322c" + }, + { + "source": "0x00de4b13153673bcae2616b67bf822500d325fc3", +"id": "0x00de4b13153673bcae2616b67bf822500d325fc3-0x5d7d257d97d8a81f51187a77c6dd226fb8424d90", + "target": "0x5d7d257d97d8a81f51187a77c6dd226fb8424d90" + }, + { + "source": "0x00de4b13153673bcae2616b67bf822500d325fc3", +"id": "0x00de4b13153673bcae2616b67bf822500d325fc3-0xa19fcdad77c1f0fd184689aca88babcf68010347", + "target": "0xa19fcdad77c1f0fd184689aca88babcf68010347" + }, + { + "source": "0x0a09cd09b0107bb98a83f211704f036eca94b92e", +"id": "0x0a09cd09b0107bb98a83f211704f036eca94b92e-0x5d7d257d97d8a81f51187a77c6dd226fb8424d90", + "target": "0x5d7d257d97d8a81f51187a77c6dd226fb8424d90" + }, + { + "source": "0x0a09cd09b0107bb98a83f211704f036eca94b92e", +"id": "0x0a09cd09b0107bb98a83f211704f036eca94b92e-0x5f48465bb9a29a3904a8d320146e78640df0e96e", + "target": "0x5f48465bb9a29a3904a8d320146e78640df0e96e" + }, + { + "source": "0x0baf7b79f9174c0840aa93a93a2c2a81044a09a2", +"id": "0x0baf7b79f9174c0840aa93a93a2c2a81044a09a2-0x5d7d257d97d8a81f51187a77c6dd226fb8424d90", + "target": "0x5d7d257d97d8a81f51187a77c6dd226fb8424d90" + }, + { + "source": "0x0baf7b79f9174c0840aa93a93a2c2a81044a09a2", +"id": "0x0baf7b79f9174c0840aa93a93a2c2a81044a09a2-0xf73dc742b6ca210a153ea556ca79b6a7ebbeaaeb", + "target": "0xf73dc742b6ca210a153ea556ca79b6a7ebbeaaeb" + }, + { + "source": "0x153f12d0752464ba610c00f71acddee5033e99c8", +"id": "0x153f12d0752464ba610c00f71acddee5033e99c8-0x5d7d257d97d8a81f51187a77c6dd226fb8424d90", + "target": "0x5d7d257d97d8a81f51187a77c6dd226fb8424d90" + }, + { + "source": "0x19627796b318e27c333530ad67c464cfc37596ec", +"id": "0x19627796b318e27c333530ad67c464cfc37596ec-0x19627796b318e27c333530ad67c464cfc37596ec", + "target": "0x19627796b318e27c333530ad67c464cfc37596ec" + }, + { + "source": "0x1d52309477b48ebe8ed680ac066d506f7970065e", +"id": "0x1d52309477b48ebe8ed680ac066d506f7970065e-0x5d7d257d97d8a81f51187a77c6dd226fb8424d90", + "target": "0x5d7d257d97d8a81f51187a77c6dd226fb8424d90" + }, + { + "source": "0x1d52309477b48ebe8ed680ac066d506f7970065e", +"id": "0x1d52309477b48ebe8ed680ac066d506f7970065e-0xc79b8b594f8a7906f3b8c5792186431da9908e4d", + "target": "0xc79b8b594f8a7906f3b8c5792186431da9908e4d" + }, + { + "source": "0x2839e0cdc1b5d23dca1ce129bd5e4a050ea4d8e0", +"id": "0x2839e0cdc1b5d23dca1ce129bd5e4a050ea4d8e0-0x2839e0cdc1b5d23dca1ce129bd5e4a050ea4d8e0", + "target": "0x2839e0cdc1b5d23dca1ce129bd5e4a050ea4d8e0" + }, + { + "source": "0x2839e0cdc1b5d23dca1ce129bd5e4a050ea4d8e0", +"id": "0x2839e0cdc1b5d23dca1ce129bd5e4a050ea4d8e0-0x5d7d257d97d8a81f51187a77c6dd226fb8424d90", + "target": "0x5d7d257d97d8a81f51187a77c6dd226fb8424d90" + }, + { + "source": "0x2960ab73ece557ed1ecf7ae4c8659020de244528", +"id": "0x2960ab73ece557ed1ecf7ae4c8659020de244528-0x220e1f19efd97f9fd0ea91f8966ced18887553fe", + "target": "0x220e1f19efd97f9fd0ea91f8966ced18887553fe" + }, + { + "source": "0x2960ab73ece557ed1ecf7ae4c8659020de244528", +"id": "0x2960ab73ece557ed1ecf7ae4c8659020de244528-0x5d7d257d97d8a81f51187a77c6dd226fb8424d90", + "target": "0x5d7d257d97d8a81f51187a77c6dd226fb8424d90" + }, + { + "source": "0x30eea1e603b556eef164b4554bb6e7471b3e70f7", +"id": "0x30eea1e603b556eef164b4554bb6e7471b3e70f7-0x4b84864c085c27f50bdea25671e045d6039bcc00", + "target": "0x4b84864c085c27f50bdea25671e045d6039bcc00" + }, + { + "source": "0x30eea1e603b556eef164b4554bb6e7471b3e70f7", +"id": "0x30eea1e603b556eef164b4554bb6e7471b3e70f7-0x5d7d257d97d8a81f51187a77c6dd226fb8424d90", + "target": "0x5d7d257d97d8a81f51187a77c6dd226fb8424d90" + }, + { + "source": "0x30eea1e603b556eef164b4554bb6e7471b3e70f7", +"id": "0x30eea1e603b556eef164b4554bb6e7471b3e70f7-0xa19fcdad77c1f0fd184689aca88babcf68010347", + "target": "0xa19fcdad77c1f0fd184689aca88babcf68010347" + }, + { + "source": "0x30eea1e603b556eef164b4554bb6e7471b3e70f7", +"id": "0x30eea1e603b556eef164b4554bb6e7471b3e70f7-0xc9df5ca072d1db23a048aaf745f2cdf23ad8e568", + "target": "0xc9df5ca072d1db23a048aaf745f2cdf23ad8e568" + }, + { + "source": "0x30eea1e603b556eef164b4554bb6e7471b3e70f7", +"id": "0x30eea1e603b556eef164b4554bb6e7471b3e70f7-0xfeccbc981b3f13fc5c4a96429772d2e424adcd9f", + "target": "0xfeccbc981b3f13fc5c4a96429772d2e424adcd9f" + }, + { + "source": "0x30f938fed5de6e06a9a7cd2ac3517131c317b1e7", +"id": "0x30f938fed5de6e06a9a7cd2ac3517131c317b1e7-0x5d7d257d97d8a81f51187a77c6dd226fb8424d90", + "target": "0x5d7d257d97d8a81f51187a77c6dd226fb8424d90" + }, + { + "source": "0x30f938fed5de6e06a9a7cd2ac3517131c317b1e7", +"id": "0x30f938fed5de6e06a9a7cd2ac3517131c317b1e7-0x8f951903c9360345b4e1b536c7f5ae8f88a64e79", + "target": "0x8f951903c9360345b4e1b536c7f5ae8f88a64e79" + }, + { + "source": "0x34bb0e6e868aff5a7661445362b3a62551a2fbac", +"id": "0x34bb0e6e868aff5a7661445362b3a62551a2fbac-0x34bb0e6e868aff5a7661445362b3a62551a2fbac", + "target": "0x34bb0e6e868aff5a7661445362b3a62551a2fbac" + }, + { + "source": "0x34bb0e6e868aff5a7661445362b3a62551a2fbac", +"id": "0x34bb0e6e868aff5a7661445362b3a62551a2fbac-0x5d7d257d97d8a81f51187a77c6dd226fb8424d90", + "target": "0x5d7d257d97d8a81f51187a77c6dd226fb8424d90" + }, + { + "source": "0x3b62a412a606f0357198d4f362b511416a948d5d", +"id": "0x3b62a412a606f0357198d4f362b511416a948d5d-0x5d7d257d97d8a81f51187a77c6dd226fb8424d90", + "target": "0x5d7d257d97d8a81f51187a77c6dd226fb8424d90" + }, + { + "source": "0x3b62a412a606f0357198d4f362b511416a948d5d", +"id": "0x3b62a412a606f0357198d4f362b511416a948d5d-0x9eb24c1ea221216158b7908179c13192fee89b4a", + "target": "0x9eb24c1ea221216158b7908179c13192fee89b4a" + }, + { + "source": "0x3b95087fad4cbb7854e56fb532ddece3d25a8c25", +"id": "0x3b95087fad4cbb7854e56fb532ddece3d25a8c25-0x04ff24049e2036194a9755084cadf147bb36b784", + "target": "0x04ff24049e2036194a9755084cadf147bb36b784" + }, + { + "source": "0x3b95087fad4cbb7854e56fb532ddece3d25a8c25", +"id": "0x3b95087fad4cbb7854e56fb532ddece3d25a8c25-0x9f27566f13c4b3d8cdea5ddf21b6134e19de9b86", + "target": "0x9f27566f13c4b3d8cdea5ddf21b6134e19de9b86" + }, + { + "source": "0x40d05342433715c3527d87eca9b7c093206ea3ec", +"id": "0x40d05342433715c3527d87eca9b7c093206ea3ec-0x40d05342433715c3527d87eca9b7c093206ea3ec", + "target": "0x40d05342433715c3527d87eca9b7c093206ea3ec" + }, + { + "source": "0x45365f09681ddae4e5478ed51ce17261368a75fa", +"id": "0x45365f09681ddae4e5478ed51ce17261368a75fa-0x45365f09681ddae4e5478ed51ce17261368a75fa", + "target": "0x45365f09681ddae4e5478ed51ce17261368a75fa" + }, + { + "source": "0x45365f09681ddae4e5478ed51ce17261368a75fa", +"id": "0x45365f09681ddae4e5478ed51ce17261368a75fa-0x5d7d257d97d8a81f51187a77c6dd226fb8424d90", + "target": "0x5d7d257d97d8a81f51187a77c6dd226fb8424d90" + }, + { + "source": "0x45365f09681ddae4e5478ed51ce17261368a75fa", +"id": "0x45365f09681ddae4e5478ed51ce17261368a75fa-0x607ebb69d568dbe1d2283668120036a892e88e89", + "target": "0x607ebb69d568dbe1d2283668120036a892e88e89" + }, + { + "source": "0x45365f09681ddae4e5478ed51ce17261368a75fa", +"id": "0x45365f09681ddae4e5478ed51ce17261368a75fa-0x9492510bbcb93b6992d8b7bb67888558e12dcac4", + "target": "0x9492510bbcb93b6992d8b7bb67888558e12dcac4" + }, + { + "source": "0x45365f09681ddae4e5478ed51ce17261368a75fa", +"id": "0x45365f09681ddae4e5478ed51ce17261368a75fa-0xa19fcdad77c1f0fd184689aca88babcf68010347", + "target": "0xa19fcdad77c1f0fd184689aca88babcf68010347" + }, + { + "source": "0x476547d8472407cb05acc4b3b8a5431871d0d072", +"id": "0x476547d8472407cb05acc4b3b8a5431871d0d072-0x476547d8472407cb05acc4b3b8a5431871d0d072", + "target": "0x476547d8472407cb05acc4b3b8a5431871d0d072" + }, + { + "source": "0x476547d8472407cb05acc4b3b8a5431871d0d072", +"id": "0x476547d8472407cb05acc4b3b8a5431871d0d072-0x5d7d257d97d8a81f51187a77c6dd226fb8424d90", + "target": "0x5d7d257d97d8a81f51187a77c6dd226fb8424d90" + }, + { + "source": "0x48e8479b4906d45fbe702a18ac2454f800238b37", +"id": "0x48e8479b4906d45fbe702a18ac2454f800238b37-0x0ffa1c7234ad4038b00614d8f8f84d30d08d36ef", + "target": "0x0ffa1c7234ad4038b00614d8f8f84d30d08d36ef" + }, + { + "source": "0x48e8479b4906d45fbe702a18ac2454f800238b37", +"id": "0x48e8479b4906d45fbe702a18ac2454f800238b37-0x5d7d257d97d8a81f51187a77c6dd226fb8424d90", + "target": "0x5d7d257d97d8a81f51187a77c6dd226fb8424d90" + }, + { + "source": "0x49db40c783444cbedebdb09bd39b508e70b42c37", +"id": "0x49db40c783444cbedebdb09bd39b508e70b42c37-0x5d7d257d97d8a81f51187a77c6dd226fb8424d90", + "target": "0x5d7d257d97d8a81f51187a77c6dd226fb8424d90" + }, + { + "source": "0x49db40c783444cbedebdb09bd39b508e70b42c37", +"id": "0x49db40c783444cbedebdb09bd39b508e70b42c37-0x5d8c77d2123acd0490bf779eac2be02d5b0d322c", + "target": "0x5d8c77d2123acd0490bf779eac2be02d5b0d322c" + }, + { + "source": "0x4f50d47d20380172746527bbeaa274940c38efac", +"id": "0x4f50d47d20380172746527bbeaa274940c38efac-0x5d7d257d97d8a81f51187a77c6dd226fb8424d90", + "target": "0x5d7d257d97d8a81f51187a77c6dd226fb8424d90" + }, + { + "source": "0x4f50d47d20380172746527bbeaa274940c38efac", +"id": "0x4f50d47d20380172746527bbeaa274940c38efac-0x5d8c77d2123acd0490bf779eac2be02d5b0d322c", + "target": "0x5d8c77d2123acd0490bf779eac2be02d5b0d322c" + }, + { + "source": "0x4f50d47d20380172746527bbeaa274940c38efac", +"id": "0x4f50d47d20380172746527bbeaa274940c38efac-0xa5d8c45538ccbb2d73d3e11cb0de20b29bf0eee3", + "target": "0xa5d8c45538ccbb2d73d3e11cb0de20b29bf0eee3" + }, + { + "source": "0x4fd687f5d13962d4ff3ef25126d75449b0850928", +"id": "0x4fd687f5d13962d4ff3ef25126d75449b0850928-0x5d7d257d97d8a81f51187a77c6dd226fb8424d90", + "target": "0x5d7d257d97d8a81f51187a77c6dd226fb8424d90" + }, + { + "source": "0x4fd687f5d13962d4ff3ef25126d75449b0850928", +"id": "0x4fd687f5d13962d4ff3ef25126d75449b0850928-0xd2d9514b79a1292df6bb58953c153dd8a46f900e", + "target": "0xd2d9514b79a1292df6bb58953c153dd8a46f900e" + }, + { + "source": "0x535fa785dcf9c152c16c7026c372d08a8be7b8e8", +"id": "0x535fa785dcf9c152c16c7026c372d08a8be7b8e8-0x04ff24049e2036194a9755084cadf147bb36b784", + "target": "0x04ff24049e2036194a9755084cadf147bb36b784" + }, + { + "source": "0x535fa785dcf9c152c16c7026c372d08a8be7b8e8", +"id": "0x535fa785dcf9c152c16c7026c372d08a8be7b8e8-0x535fa785dcf9c152c16c7026c372d08a8be7b8e8", + "target": "0x535fa785dcf9c152c16c7026c372d08a8be7b8e8" + }, + { + "source": "0x570ce6badac1c25b2d007e808a4d1b92eccddda9", +"id": "0x570ce6badac1c25b2d007e808a4d1b92eccddda9-0x5d7d257d97d8a81f51187a77c6dd226fb8424d90", + "target": "0x5d7d257d97d8a81f51187a77c6dd226fb8424d90" + }, + { + "source": "0x570ce6badac1c25b2d007e808a4d1b92eccddda9", +"id": "0x570ce6badac1c25b2d007e808a4d1b92eccddda9-0xa19fcdad77c1f0fd184689aca88babcf68010347", + "target": "0xa19fcdad77c1f0fd184689aca88babcf68010347" + }, + { + "source": "0x5b6a84c6a8b231cc046ee46cf4575f28fe9a4973", +"id": "0x5b6a84c6a8b231cc046ee46cf4575f28fe9a4973-0x5d7d257d97d8a81f51187a77c6dd226fb8424d90", + "target": "0x5d7d257d97d8a81f51187a77c6dd226fb8424d90" + }, + { + "source": "0x5d7d257d97d8a81f51187a77c6dd226fb8424d90", +"id": "0x5d7d257d97d8a81f51187a77c6dd226fb8424d90-0x5d7d257d97d8a81f51187a77c6dd226fb8424d90", + "target": "0x5d7d257d97d8a81f51187a77c6dd226fb8424d90" + }, + { + "source": "0x5ebe5635e03f6f2ef7ff2e3dc433ca5fdef2f9cf", +"id": "0x5ebe5635e03f6f2ef7ff2e3dc433ca5fdef2f9cf-0x5d7d257d97d8a81f51187a77c6dd226fb8424d90", + "target": "0x5d7d257d97d8a81f51187a77c6dd226fb8424d90" + }, + { + "source": "0x5ebe5635e03f6f2ef7ff2e3dc433ca5fdef2f9cf", +"id": "0x5ebe5635e03f6f2ef7ff2e3dc433ca5fdef2f9cf-0x5ebe5635e03f6f2ef7ff2e3dc433ca5fdef2f9cf", + "target": "0x5ebe5635e03f6f2ef7ff2e3dc433ca5fdef2f9cf" + }, + { + "source": "0x5ebe5635e03f6f2ef7ff2e3dc433ca5fdef2f9cf", +"id": "0x5ebe5635e03f6f2ef7ff2e3dc433ca5fdef2f9cf-0xb240998ace46d51fd88df65d6972cb144135e8b7", + "target": "0xb240998ace46d51fd88df65d6972cb144135e8b7" + }, + { + "source": "0x607ebb69d568dbe1d2283668120036a892e88e89", +"id": "0x607ebb69d568dbe1d2283668120036a892e88e89-0x4a7d077e676c4bf3182ce6dcc09afd3217d88bcd", + "target": "0x4a7d077e676c4bf3182ce6dcc09afd3217d88bcd" + }, + { + "source": "0x607ebb69d568dbe1d2283668120036a892e88e89", +"id": "0x607ebb69d568dbe1d2283668120036a892e88e89-0x5d7d257d97d8a81f51187a77c6dd226fb8424d90", + "target": "0x5d7d257d97d8a81f51187a77c6dd226fb8424d90" + }, + { + "source": "0x607ebb69d568dbe1d2283668120036a892e88e89", +"id": "0x607ebb69d568dbe1d2283668120036a892e88e89-0x607ebb69d568dbe1d2283668120036a892e88e89", + "target": "0x607ebb69d568dbe1d2283668120036a892e88e89" + }, + { + "source": "0x607ebb69d568dbe1d2283668120036a892e88e89", +"id": "0x607ebb69d568dbe1d2283668120036a892e88e89-0x8a68df0029c9e8b64ad08f9a19a2f8513a4ca70b", + "target": "0x8a68df0029c9e8b64ad08f9a19a2f8513a4ca70b" + }, + { + "source": "0x607ebb69d568dbe1d2283668120036a892e88e89", +"id": "0x607ebb69d568dbe1d2283668120036a892e88e89-0x9492510bbcb93b6992d8b7bb67888558e12dcac4", + "target": "0x9492510bbcb93b6992d8b7bb67888558e12dcac4" + }, + { + "source": "0x607ebb69d568dbe1d2283668120036a892e88e89", +"id": "0x607ebb69d568dbe1d2283668120036a892e88e89-0xa19fcdad77c1f0fd184689aca88babcf68010347", + "target": "0xa19fcdad77c1f0fd184689aca88babcf68010347" + }, + { + "source": "0x607ebb69d568dbe1d2283668120036a892e88e89", +"id": "0x607ebb69d568dbe1d2283668120036a892e88e89-0xafaefc6dd3c9fef66f92ba838b132644451f0715", + "target": "0xafaefc6dd3c9fef66f92ba838b132644451f0715" + }, + { + "source": "0x614a61a3b7f2fd8750acaad63b2a0cfe8b8524f1", +"id": "0x614a61a3b7f2fd8750acaad63b2a0cfe8b8524f1-0x5d7d257d97d8a81f51187a77c6dd226fb8424d90", + "target": "0x5d7d257d97d8a81f51187a77c6dd226fb8424d90" + }, + { + "source": "0x614a61a3b7f2fd8750acaad63b2a0cfe8b8524f1", +"id": "0x614a61a3b7f2fd8750acaad63b2a0cfe8b8524f1-0x5d8c77d2123acd0490bf779eac2be02d5b0d322c", + "target": "0x5d8c77d2123acd0490bf779eac2be02d5b0d322c" + }, + { + "source": "0x6217d5392f6b7b6b3a9b2512a2b0ec4cbb14c448", +"id": "0x6217d5392f6b7b6b3a9b2512a2b0ec4cbb14c448-0x6217d5392f6b7b6b3a9b2512a2b0ec4cbb14c448", + "target": "0x6217d5392f6b7b6b3a9b2512a2b0ec4cbb14c448" + }, + { + "source": "0x6217d5392f6b7b6b3a9b2512a2b0ec4cbb14c448", +"id": "0x6217d5392f6b7b6b3a9b2512a2b0ec4cbb14c448-0xc8fc01b9406208ae17a55119bf7c21f06c31df80", + "target": "0xc8fc01b9406208ae17a55119bf7c21f06c31df80" + }, + { + "source": "0x63b265d170f35d6bb724a6c00b4dcc822ea97867", +"id": "0x63b265d170f35d6bb724a6c00b4dcc822ea97867-0x5d7d257d97d8a81f51187a77c6dd226fb8424d90", + "target": "0x5d7d257d97d8a81f51187a77c6dd226fb8424d90" + }, + { + "source": "0x63b265d170f35d6bb724a6c00b4dcc822ea97867", +"id": "0x63b265d170f35d6bb724a6c00b4dcc822ea97867-0xa19fcdad77c1f0fd184689aca88babcf68010347", + "target": "0xa19fcdad77c1f0fd184689aca88babcf68010347" + }, + { + "source": "0x6f782dbf141c50e0b79b044b471fb8d76bcb7aed", +"id": "0x6f782dbf141c50e0b79b044b471fb8d76bcb7aed-0x5d7d257d97d8a81f51187a77c6dd226fb8424d90", + "target": "0x5d7d257d97d8a81f51187a77c6dd226fb8424d90" + }, + { + "source": "0x701d0ecb3ba780de7b2b36789aec4493a426010a", +"id": "0x701d0ecb3ba780de7b2b36789aec4493a426010a-0x5d7d257d97d8a81f51187a77c6dd226fb8424d90", + "target": "0x5d7d257d97d8a81f51187a77c6dd226fb8424d90" + }, + { + "source": "0x701d0ecb3ba780de7b2b36789aec4493a426010a", +"id": "0x701d0ecb3ba780de7b2b36789aec4493a426010a-0x8f951903c9360345b4e1b536c7f5ae8f88a64e79", + "target": "0x8f951903c9360345b4e1b536c7f5ae8f88a64e79" + }, + { + "source": "0x7156156e73835176d37922b071c80d6cc722a943", +"id": "0x7156156e73835176d37922b071c80d6cc722a943-0x5d7d257d97d8a81f51187a77c6dd226fb8424d90", + "target": "0x5d7d257d97d8a81f51187a77c6dd226fb8424d90" + }, + { + "source": "0x7156156e73835176d37922b071c80d6cc722a943", +"id": "0x7156156e73835176d37922b071c80d6cc722a943-0x5d8c77d2123acd0490bf779eac2be02d5b0d322c", + "target": "0x5d8c77d2123acd0490bf779eac2be02d5b0d322c" + }, + { + "source": "0x724aece161d7ad981b34f3db7974d08b36e639c5", +"id": "0x724aece161d7ad981b34f3db7974d08b36e639c5-0x5d7d257d97d8a81f51187a77c6dd226fb8424d90", + "target": "0x5d7d257d97d8a81f51187a77c6dd226fb8424d90" + }, + { + "source": "0x724aece161d7ad981b34f3db7974d08b36e639c5", +"id": "0x724aece161d7ad981b34f3db7974d08b36e639c5-0xa19fcdad77c1f0fd184689aca88babcf68010347", + "target": "0xa19fcdad77c1f0fd184689aca88babcf68010347" + }, + { + "source": "0x78b3a256061ce71fa266c2442ed08c04a784a7dd", +"id": "0x78b3a256061ce71fa266c2442ed08c04a784a7dd-0x5d7d257d97d8a81f51187a77c6dd226fb8424d90", + "target": "0x5d7d257d97d8a81f51187a77c6dd226fb8424d90" + }, + { + "source": "0x78b3a256061ce71fa266c2442ed08c04a784a7dd", +"id": "0x78b3a256061ce71fa266c2442ed08c04a784a7dd-0x78b3a256061ce71fa266c2442ed08c04a784a7dd", + "target": "0x78b3a256061ce71fa266c2442ed08c04a784a7dd" + }, + { + "source": "0x78b3a256061ce71fa266c2442ed08c04a784a7dd", +"id": "0x78b3a256061ce71fa266c2442ed08c04a784a7dd-0xe88897722774631e5cb4e68b8e6d7187c16a3cfe", + "target": "0xe88897722774631e5cb4e68b8e6d7187c16a3cfe" + }, + { + "source": "0x839395e20bbb182fa440d08f850e6c7a8f6f0780", +"id": "0x839395e20bbb182fa440d08f850e6c7a8f6f0780-0x5d7d257d97d8a81f51187a77c6dd226fb8424d90", + "target": "0x5d7d257d97d8a81f51187a77c6dd226fb8424d90" + }, + { + "source": "0x839395e20bbb182fa440d08f850e6c7a8f6f0780", +"id": "0x839395e20bbb182fa440d08f850e6c7a8f6f0780-0x8f951903c9360345b4e1b536c7f5ae8f88a64e79", + "target": "0x8f951903c9360345b4e1b536c7f5ae8f88a64e79" + }, + { + "source": "0x865c2f85c9fea1c6ac7f53de07554d68cb92ed88", +"id": "0x865c2f85c9fea1c6ac7f53de07554d68cb92ed88-0x5d7d257d97d8a81f51187a77c6dd226fb8424d90", + "target": "0x5d7d257d97d8a81f51187a77c6dd226fb8424d90" + }, + { + "source": "0x865c2f85c9fea1c6ac7f53de07554d68cb92ed88", +"id": "0x865c2f85c9fea1c6ac7f53de07554d68cb92ed88-0x865c2f85c9fea1c6ac7f53de07554d68cb92ed88", + "target": "0x865c2f85c9fea1c6ac7f53de07554d68cb92ed88" + }, + { + "source": "0x869ec00fa1dc112917c781942cc01c68521c415e", +"id": "0x869ec00fa1dc112917c781942cc01c68521c415e-0x5d7d257d97d8a81f51187a77c6dd226fb8424d90", + "target": "0x5d7d257d97d8a81f51187a77c6dd226fb8424d90" + }, + { + "source": "0x869ec00fa1dc112917c781942cc01c68521c415e", +"id": "0x869ec00fa1dc112917c781942cc01c68521c415e-0x869ec00fa1dc112917c781942cc01c68521c415e", + "target": "0x869ec00fa1dc112917c781942cc01c68521c415e" + }, + { + "source": "0x8f951903c9360345b4e1b536c7f5ae8f88a64e79", +"id": "0x8f951903c9360345b4e1b536c7f5ae8f88a64e79-0x5d7d257d97d8a81f51187a77c6dd226fb8424d90", + "target": "0x5d7d257d97d8a81f51187a77c6dd226fb8424d90" + }, + { + "source": "0x8f951903c9360345b4e1b536c7f5ae8f88a64e79", +"id": "0x8f951903c9360345b4e1b536c7f5ae8f88a64e79-0x8f951903c9360345b4e1b536c7f5ae8f88a64e79", + "target": "0x8f951903c9360345b4e1b536c7f5ae8f88a64e79" + }, + { + "source": "0x902686ea170c5b808ebf69b253e67e622da09784", +"id": "0x902686ea170c5b808ebf69b253e67e622da09784-0x902686ea170c5b808ebf69b253e67e622da09784", + "target": "0x902686ea170c5b808ebf69b253e67e622da09784" + }, + { + "source": "0x902686ea170c5b808ebf69b253e67e622da09784", +"id": "0x902686ea170c5b808ebf69b253e67e622da09784-0xb8f9e12bf8a8ea24fea2ee3253ff66f289a799a4", + "target": "0xb8f9e12bf8a8ea24fea2ee3253ff66f289a799a4" + }, + { + "source": "0x9492510bbcb93b6992d8b7bb67888558e12dcac4", +"id": "0x9492510bbcb93b6992d8b7bb67888558e12dcac4-0x9492510bbcb93b6992d8b7bb67888558e12dcac4", + "target": "0x9492510bbcb93b6992d8b7bb67888558e12dcac4" + }, + { + "source": "0x9eb24c1ea221216158b7908179c13192fee89b4a", +"id": "0x9eb24c1ea221216158b7908179c13192fee89b4a-0x5d7d257d97d8a81f51187a77c6dd226fb8424d90", + "target": "0x5d7d257d97d8a81f51187a77c6dd226fb8424d90" + }, + { + "source": "0x9eb24c1ea221216158b7908179c13192fee89b4a", +"id": "0x9eb24c1ea221216158b7908179c13192fee89b4a-0x9eb24c1ea221216158b7908179c13192fee89b4a", + "target": "0x9eb24c1ea221216158b7908179c13192fee89b4a" + }, + { + "source": "0x9f27566f13c4b3d8cdea5ddf21b6134e19de9b86", +"id": "0x9f27566f13c4b3d8cdea5ddf21b6134e19de9b86-0x04ff24049e2036194a9755084cadf147bb36b784", + "target": "0x04ff24049e2036194a9755084cadf147bb36b784" + }, + { + "source": "0x9f27566f13c4b3d8cdea5ddf21b6134e19de9b86", +"id": "0x9f27566f13c4b3d8cdea5ddf21b6134e19de9b86-0x9f27566f13c4b3d8cdea5ddf21b6134e19de9b86", + "target": "0x9f27566f13c4b3d8cdea5ddf21b6134e19de9b86" + }, + { + "source": "0xa153b8891e77f1ae037026514c927530d877fab8", +"id": "0xa153b8891e77f1ae037026514c927530d877fab8-0x236daa98f115caa9991a3894ae387cdc13eaad1b", + "target": "0x236daa98f115caa9991a3894ae387cdc13eaad1b" + }, + { + "source": "0xa153b8891e77f1ae037026514c927530d877fab8", +"id": "0xa153b8891e77f1ae037026514c927530d877fab8-0x5d7d257d97d8a81f51187a77c6dd226fb8424d90", + "target": "0x5d7d257d97d8a81f51187a77c6dd226fb8424d90" + }, + { + "source": "0xa153b8891e77f1ae037026514c927530d877fab8", +"id": "0xa153b8891e77f1ae037026514c927530d877fab8-0x5d8c77d2123acd0490bf779eac2be02d5b0d322c", + "target": "0x5d8c77d2123acd0490bf779eac2be02d5b0d322c" + }, + { + "source": "0xa153b8891e77f1ae037026514c927530d877fab8", +"id": "0xa153b8891e77f1ae037026514c927530d877fab8-0x82ee68fb03ac681fb5a57c8477d712d78d6afd72", + "target": "0x82ee68fb03ac681fb5a57c8477d712d78d6afd72" + }, + { + "source": "0xac64035fa29e4b892e80683428a2bbbfdd08e855", +"id": "0xac64035fa29e4b892e80683428a2bbbfdd08e855-0x5d7d257d97d8a81f51187a77c6dd226fb8424d90", + "target": "0x5d7d257d97d8a81f51187a77c6dd226fb8424d90" + }, + { + "source": "0xb224673443c3ec6cec3ce7f5e86c5b3224623d15", +"id": "0xb224673443c3ec6cec3ce7f5e86c5b3224623d15-0x5d7d257d97d8a81f51187a77c6dd226fb8424d90", + "target": "0x5d7d257d97d8a81f51187a77c6dd226fb8424d90" + }, + { + "source": "0xb224673443c3ec6cec3ce7f5e86c5b3224623d15", +"id": "0xb224673443c3ec6cec3ce7f5e86c5b3224623d15-0xb224673443c3ec6cec3ce7f5e86c5b3224623d15", + "target": "0xb224673443c3ec6cec3ce7f5e86c5b3224623d15" + }, + { + "source": "0xb6e32c75a2083a38f6cce6e65756c0bf86d84200", +"id": "0xb6e32c75a2083a38f6cce6e65756c0bf86d84200-0x4a7d077e676c4bf3182ce6dcc09afd3217d88bcd", + "target": "0x4a7d077e676c4bf3182ce6dcc09afd3217d88bcd" + }, + { + "source": "0xb6e32c75a2083a38f6cce6e65756c0bf86d84200", +"id": "0xb6e32c75a2083a38f6cce6e65756c0bf86d84200-0x5d7d257d97d8a81f51187a77c6dd226fb8424d90", + "target": "0x5d7d257d97d8a81f51187a77c6dd226fb8424d90" + }, + { + "source": "0xb6e32c75a2083a38f6cce6e65756c0bf86d84200", +"id": "0xb6e32c75a2083a38f6cce6e65756c0bf86d84200-0x607ebb69d568dbe1d2283668120036a892e88e89", + "target": "0x607ebb69d568dbe1d2283668120036a892e88e89" + }, + { + "source": "0xb6e32c75a2083a38f6cce6e65756c0bf86d84200", +"id": "0xb6e32c75a2083a38f6cce6e65756c0bf86d84200-0xa19fcdad77c1f0fd184689aca88babcf68010347", + "target": "0xa19fcdad77c1f0fd184689aca88babcf68010347" + }, + { + "source": "0xb950e0e108546743af96eb493d4ff2abc63816db", +"id": "0xb950e0e108546743af96eb493d4ff2abc63816db-0x5d7d257d97d8a81f51187a77c6dd226fb8424d90", + "target": "0x5d7d257d97d8a81f51187a77c6dd226fb8424d90" + }, + { + "source": "0xb950e0e108546743af96eb493d4ff2abc63816db", +"id": "0xb950e0e108546743af96eb493d4ff2abc63816db-0x8f951903c9360345b4e1b536c7f5ae8f88a64e79", + "target": "0x8f951903c9360345b4e1b536c7f5ae8f88a64e79" + }, + { + "source": "0xbd204917917c9f6dc6481acef7c101815bb7bbb9", +"id": "0xbd204917917c9f6dc6481acef7c101815bb7bbb9-0x04ff24049e2036194a9755084cadf147bb36b784", + "target": "0x04ff24049e2036194a9755084cadf147bb36b784" + }, + { + "source": "0xbd204917917c9f6dc6481acef7c101815bb7bbb9", +"id": "0xbd204917917c9f6dc6481acef7c101815bb7bbb9-0x535fa785dcf9c152c16c7026c372d08a8be7b8e8", + "target": "0x535fa785dcf9c152c16c7026c372d08a8be7b8e8" + }, + { + "source": "0xc281d4fe88701bf30326b3bcb2c3eb73669d3b91", +"id": "0xc281d4fe88701bf30326b3bcb2c3eb73669d3b91-0x5d7d257d97d8a81f51187a77c6dd226fb8424d90", + "target": "0x5d7d257d97d8a81f51187a77c6dd226fb8424d90" + }, + { + "source": "0xc281d4fe88701bf30326b3bcb2c3eb73669d3b91", +"id": "0xc281d4fe88701bf30326b3bcb2c3eb73669d3b91-0xc281d4fe88701bf30326b3bcb2c3eb73669d3b91", + "target": "0xc281d4fe88701bf30326b3bcb2c3eb73669d3b91" + }, + { + "source": "0xc79b8b594f8a7906f3b8c5792186431da9908e4d", +"id": "0xc79b8b594f8a7906f3b8c5792186431da9908e4d-0xc79b8b594f8a7906f3b8c5792186431da9908e4d", + "target": "0xc79b8b594f8a7906f3b8c5792186431da9908e4d" + }, + { + "source": "0xc8fc01b9406208ae17a55119bf7c21f06c31df80", +"id": "0xc8fc01b9406208ae17a55119bf7c21f06c31df80-0xc8fc01b9406208ae17a55119bf7c21f06c31df80", + "target": "0xc8fc01b9406208ae17a55119bf7c21f06c31df80" + }, + { + "source": "0xcf88fa6ee6d111b04be9b06ef6fad6bd6691b88c", +"id": "0xcf88fa6ee6d111b04be9b06ef6fad6bd6691b88c-0x5d7d257d97d8a81f51187a77c6dd226fb8424d90", + "target": "0x5d7d257d97d8a81f51187a77c6dd226fb8424d90" + }, + { + "source": "0xd21b98b4c8c0e0df766ccc605a86d2122fc57fb2", +"id": "0xd21b98b4c8c0e0df766ccc605a86d2122fc57fb2-0x04ff24049e2036194a9755084cadf147bb36b784", + "target": "0x04ff24049e2036194a9755084cadf147bb36b784" + }, + { + "source": "0xd21b98b4c8c0e0df766ccc605a86d2122fc57fb2", +"id": "0xd21b98b4c8c0e0df766ccc605a86d2122fc57fb2-0x535fa785dcf9c152c16c7026c372d08a8be7b8e8", + "target": "0x535fa785dcf9c152c16c7026c372d08a8be7b8e8" + }, + { + "source": "0xd21b98b4c8c0e0df766ccc605a86d2122fc57fb2", +"id": "0xd21b98b4c8c0e0df766ccc605a86d2122fc57fb2-0xd21b98b4c8c0e0df766ccc605a86d2122fc57fb2", + "target": "0xd21b98b4c8c0e0df766ccc605a86d2122fc57fb2" + }, + { + "source": "0xd26a3f686d43f2a62ba9eae2ff77e9f516d945b9", +"id": "0xd26a3f686d43f2a62ba9eae2ff77e9f516d945b9-0x5d7d257d97d8a81f51187a77c6dd226fb8424d90", + "target": "0x5d7d257d97d8a81f51187a77c6dd226fb8424d90" + }, + { + "source": "0xd26a3f686d43f2a62ba9eae2ff77e9f516d945b9", +"id": "0xd26a3f686d43f2a62ba9eae2ff77e9f516d945b9-0x5d8c77d2123acd0490bf779eac2be02d5b0d322c", + "target": "0x5d8c77d2123acd0490bf779eac2be02d5b0d322c" + }, + { + "source": "0xd54d956e86a6238055d5f9c80771af9daa4e3787", +"id": "0xd54d956e86a6238055d5f9c80771af9daa4e3787-0x5d7d257d97d8a81f51187a77c6dd226fb8424d90", + "target": "0x5d7d257d97d8a81f51187a77c6dd226fb8424d90" + }, + { + "source": "0xd66e40b0c30595bec72153b502ac1e0c4785991b", +"id": "0xd66e40b0c30595bec72153b502ac1e0c4785991b-0x5d7d257d97d8a81f51187a77c6dd226fb8424d90", + "target": "0x5d7d257d97d8a81f51187a77c6dd226fb8424d90" + }, + { + "source": "0xd66e40b0c30595bec72153b502ac1e0c4785991b", +"id": "0xd66e40b0c30595bec72153b502ac1e0c4785991b-0xc8fc01b9406208ae17a55119bf7c21f06c31df80", + "target": "0xc8fc01b9406208ae17a55119bf7c21f06c31df80" + }, + { + "source": "0xd66e40b0c30595bec72153b502ac1e0c4785991b", +"id": "0xd66e40b0c30595bec72153b502ac1e0c4785991b-0xd66e40b0c30595bec72153b502ac1e0c4785991b", + "target": "0xd66e40b0c30595bec72153b502ac1e0c4785991b" + }, + { + "source": "0xdc31113dd4011101abc126c7e339717cd0af91eb", +"id": "0xdc31113dd4011101abc126c7e339717cd0af91eb-0x5d7d257d97d8a81f51187a77c6dd226fb8424d90", + "target": "0x5d7d257d97d8a81f51187a77c6dd226fb8424d90" + }, + { + "source": "0xdeaac63f50bea88faef8f8c4700e352f71f731fc", +"id": "0xdeaac63f50bea88faef8f8c4700e352f71f731fc-0x5d7d257d97d8a81f51187a77c6dd226fb8424d90", + "target": "0x5d7d257d97d8a81f51187a77c6dd226fb8424d90" + }, + { + "source": "0xdeaac63f50bea88faef8f8c4700e352f71f731fc", +"id": "0xdeaac63f50bea88faef8f8c4700e352f71f731fc-0xdeaac63f50bea88faef8f8c4700e352f71f731fc", + "target": "0xdeaac63f50bea88faef8f8c4700e352f71f731fc" + }, + { + "source": "0xe0144fa05a0d32b5b1de10ccee7211616b3e3ef0", +"id": "0xe0144fa05a0d32b5b1de10ccee7211616b3e3ef0-0x5d7d257d97d8a81f51187a77c6dd226fb8424d90", + "target": "0x5d7d257d97d8a81f51187a77c6dd226fb8424d90" + }, + { + "source": "0xe0144fa05a0d32b5b1de10ccee7211616b3e3ef0", +"id": "0xe0144fa05a0d32b5b1de10ccee7211616b3e3ef0-0x8f951903c9360345b4e1b536c7f5ae8f88a64e79", + "target": "0x8f951903c9360345b4e1b536c7f5ae8f88a64e79" + }, + { + "source": "0xea8b224edd3e342deb514c4176c2e72bcce6fff9", +"id": "0xea8b224edd3e342deb514c4176c2e72bcce6fff9-0x5d7d257d97d8a81f51187a77c6dd226fb8424d90", + "target": "0x5d7d257d97d8a81f51187a77c6dd226fb8424d90" + }, + { + "source": "0xea8b224edd3e342deb514c4176c2e72bcce6fff9", +"id": "0xea8b224edd3e342deb514c4176c2e72bcce6fff9-0x8f951903c9360345b4e1b536c7f5ae8f88a64e79", + "target": "0x8f951903c9360345b4e1b536c7f5ae8f88a64e79" + }, + { + "source": "0xec5f9994ebe1bdeaa009cb0a3e984c5c55bf3fdd", +"id": "0xec5f9994ebe1bdeaa009cb0a3e984c5c55bf3fdd-0x5d7d257d97d8a81f51187a77c6dd226fb8424d90", + "target": "0x5d7d257d97d8a81f51187a77c6dd226fb8424d90" + }, + { + "source": "0xf3c97135aa789fd6437d5bb67d32307bd7edac16", +"id": "0xf3c97135aa789fd6437d5bb67d32307bd7edac16-0xf3c97135aa789fd6437d5bb67d32307bd7edac16", + "target": "0xf3c97135aa789fd6437d5bb67d32307bd7edac16" + }, + { + "source": "0xf981a18e8ea76d6629f094731cd9fca73abecda7", +"id": "0xf981a18e8ea76d6629f094731cd9fca73abecda7-0x5d7d257d97d8a81f51187a77c6dd226fb8424d90", + "target": "0x5d7d257d97d8a81f51187a77c6dd226fb8424d90" + }, + { + "source": "0xf981a18e8ea76d6629f094731cd9fca73abecda7", +"id": "0xf981a18e8ea76d6629f094731cd9fca73abecda7-0xf981a18e8ea76d6629f094731cd9fca73abecda7", + "target": "0xf981a18e8ea76d6629f094731cd9fca73abecda7" + }, + { + "source": "0xfab3b4be0a78c586cdb999258ddd7dc799d433d2", +"id": "0xfab3b4be0a78c586cdb999258ddd7dc799d433d2-0x5d7d257d97d8a81f51187a77c6dd226fb8424d90", + "target": "0x5d7d257d97d8a81f51187a77c6dd226fb8424d90" + }, + { + "source": "0xfab3b4be0a78c586cdb999258ddd7dc799d433d2", +"id": "0xfab3b4be0a78c586cdb999258ddd7dc799d433d2-0x9eb24c1ea221216158b7908179c13192fee89b4a", + "target": "0x9eb24c1ea221216158b7908179c13192fee89b4a" + }, + { + "source": "0xffaef2b51f3e82fbd678b90017dab0109d4801f7", +"id": "0xffaef2b51f3e82fbd678b90017dab0109d4801f7-0x04ff24049e2036194a9755084cadf147bb36b784", + "target": "0x04ff24049e2036194a9755084cadf147bb36b784" + }, + { + "source": "0xffaef2b51f3e82fbd678b90017dab0109d4801f7", +"id": "0xffaef2b51f3e82fbd678b90017dab0109d4801f7-0x535fa785dcf9c152c16c7026c372d08a8be7b8e8", + "target": "0x535fa785dcf9c152c16c7026c372d08a8be7b8e8" + }, + { + "source": "0xffaef2b51f3e82fbd678b90017dab0109d4801f7", +"id": "0xffaef2b51f3e82fbd678b90017dab0109d4801f7-0xffaef2b51f3e82fbd678b90017dab0109d4801f7", + "target": "0xffaef2b51f3e82fbd678b90017dab0109d4801f7" + } + } +] diff --git a/package.json b/package.json index 127aa3b..4b289bd 100644 --- a/package.json +++ b/package.json @@ -16,13 +16,13 @@ "deploy_subgraph": "cd subgraph && yarn create-local && yarn deploy-local --watch", "start_subgraph": "yarn deploy_contracts && yarn deploy_subgraph", "test_local": "LOCAL=true SUBGRAPH_URL=$npm_package_subgraph_local_url mocha --timeout 7000 test/RTokenAnalytics.test.js", - "test": "SUBGRAPH_ID=$npm_package_subgraph_mainnet_id SUBGRAPH_URL=$npm_package_subgraph_mainnet_url mocha --timeout 7000" + "test": "SUBGRAPH_ID=$npm_package_subgraph_mainnet_id SUBGRAPH_URL=$npm_package_subgraph_mainnet_url mocha --timeout 7000 test/RTokenAnalytics.test.js" }, "subgraph": { "mainnet": { "url": "https://api.thegraph.com/subgraphs/id/", - "id": "QmTvQvpuFAeBYpuMUGs2yRrqZj92YFiDymWD8eZ7AduA5r", - "contractAddress": "0xea8b224eDD3e342DEb514C4176c2E72Bcce6fFF9" + "id": "QmfUZ16H2GBxQ4eULAELDJjjVZcZ36TcDkwhoZ9cjF2WNc", + "contractAddress": "0x261b45D85cCFeAbb11F022eBa346ee8D1cd488c0" }, "local": { "url": "http://localhost:8000/subgraphs/name/rtoken-project/rtoken-analytics", diff --git a/src/RTokenAnalytics.js b/src/RTokenAnalytics.js index dde5504..50ca99e 100644 --- a/src/RTokenAnalytics.js +++ b/src/RTokenAnalytics.js @@ -6,6 +6,8 @@ const { createHttpLink } = require('apollo-link-http'); require('babel-polyfill'); const ethers = require('ethers'); +const BigNumber = require('bignumber.js'); + const { parseUnits, bigNumberify, formatUnits } = ethers.utils; const DEFAULT_SUBGRAPH_URL = process.env.SUBGRAPH_URL; @@ -22,8 +24,7 @@ class RTokenAnalytics { this.interestTolerance = interestTolerance; this.network = network; - let uri = DEFAULT_SUBGRAPH_URL; - if (subgraphURL) uri = subgraphURL; + let uri = subgraphURL ? subgraphURL : DEFAULT_SUBGRAPH_URL; this.link = new createHttpLink({ uri: `${uri}${subgraphID}`, fetch: fetch @@ -65,37 +66,68 @@ class RTokenAnalytics { } // Returns list of addresses that an address has sent interest to - async getAllRecipients(address, timePeriod) { + async getAllOutgoing(address, timePeriod) { const operation = { query: gql` - query getUser($id: Bytes) { - user(id: $id) { - id - sentAddressList + query getAccount($id: Bytes) { + account(id: $id) { + balance + loansOwned { + amount + recipient { + id + } + hat { + id + } + transfers { + value + transaction { + id + timestamp + blockNumber + } + } + } } } `, variables: { id: address } }; let res = await makePromise(execute(this.link, operation)); - return res.data.user.sentAddressList; + return res.data.account.loansOwned; } // Returns list of addresses that have sent any interest to this address, and the amounts - async getAllSenders(address, timePeriod) { + async getAllIncoming(address, timePeriod) { const operation = { query: gql` - query getUser($id: Bytes) { - user(id: $id) { - id - receivedAddressList + query getAccount($id: Bytes) { + account(id: $id) { + loansReceived { + amount + recipient { + id + } + hat { + id + } + transfers { + value + transaction { + id + timestamp + blockNumber + } + } + } } } `, variables: { id: address } }; let res = await makePromise(execute(this.link, operation)); - return res.data.user.receivedAddressList; + return res.data.account.loansReceived; } // SENDING / RECEIVING @@ -109,20 +141,86 @@ class RTokenAnalytics { // Returns total amount of interest received by an address from a single address async getInterestSent(addressFrom, addressTo, timePeriod) { - const loanID = `${addressFrom}-${addressTo}`; const operation = { query: gql` - query($id: Bytes) { - loan(id: $id) { - id - sInternalAmount + query getAccount($from: Bytes) { + account(id: $from) { + balance + loansOwned { + amount + recipient { + id + } + hat { + id + } + transfers { + value + transaction { + id + timestamp + blockNumber + } + } + } } } `, - variables: { id: loanID } + variables: { from: addressFrom, to: addressTo } }; let res = await makePromise(execute(this.link, operation)); - return res.data.loan.sInternalAmount; + + let interestSent = 0; + + res.data.account.loansOwned.forEach(loan => { + if (loan.recipient.id === addressTo) { + let value = new BigNumber(0); + loan.transfers.forEach((transfer, index) => { + const rate = 0.04; + + // Skip the first transfer + if (index === 0) { + value = value.plus(transfer.value); + return; + } + // If this is the final transfer, add interest until current time + if (index === loan.transfers.length - 1) { + value = value.plus(transfer.value); + + const start = transfer.transaction.timestamp; + const date = new Date(); + const now = Math.round(date.getTime() / 1000); + + interestSent += this._calculateInterestOverTime( + value, + start, + now, + rate + ); + // console.log('Final ransfer. Current value: ', value.toNumber()); + } + + // Add the accumulated interest between the transfers + interestSent += this._calculateInterestOverTime( + value, + loan.transfers[index - 1].transaction.timestamp, + transfer.transaction.timestamp, + rate + ); + + // Add the current transfer value to the running value + value = value.plus(transfer.value); + }); + } + return; + }); + return interestSent; + } + + _calculateInterestOverTime(value, start, end, startingAPY) { + const duration = end - start; + const period = duration / 31557600; // Adjust for APY + return value * period * startingAPY; } // GLOBAL diff --git a/subgraph/build/subgraph.yaml b/subgraph/build/subgraph.yaml index 7067dcf..4aba78b 100644 --- a/subgraph/build/subgraph.yaml +++ b/subgraph/build/subgraph.yaml @@ -8,7 +8,7 @@ dataSources: name: RToken network: mainnet source: - address: "0xc97EeFc57dD8E74A30AC2cC52E8785B40a14a30c" + address: "0x548624d677f08BF43C05b3351c2C25b488BD4CEA" abi: RToken mapping: kind: ethereum/events diff --git a/subgraph/src/mapping.ts b/subgraph/src/mapping.ts index 69945f2..587507d 100644 --- a/subgraph/src/mapping.ts +++ b/subgraph/src/mapping.ts @@ -27,7 +27,7 @@ export function handleInterestPaid(event: InterestPaid): void { // Check all accounts sending interest to this address // Calculate the amounts which each address has sent? - entity.save(); + entity.save() } export function handleHatChanged(event: HatChanged): void { diff --git a/subgraph/subgraph.yaml b/subgraph/subgraph.yaml index 72eabe6..b32cb96 100644 --- a/subgraph/subgraph.yaml +++ b/subgraph/subgraph.yaml @@ -9,7 +9,7 @@ dataSources: network: mainnet source: # address: '0xea8b224eDD3e342DEb514C4176c2E72Bcce6fFF9' - address: '0xc97EeFc57dD8E74A30AC2cC52E8785B40a14a30c' + address: '0x548624d677f08BF43C05b3351c2C25b488BD4CEA' abi: RToken mapping: kind: ethereum/events diff --git a/test/RTokenAnalytics.test.js b/test/RTokenAnalytics.test.js index eb1ed62..d68043f 100644 --- a/test/RTokenAnalytics.test.js +++ b/test/RTokenAnalytics.test.js @@ -14,21 +14,18 @@ const debug = { const COMPOUND_URL = 'https://api.compound.finance/api/v2/ctoken?addresses[]='; const daiCompoundAddress = '0xf5dce57282a584d2746faf1593d3121fcac444dc'; -const userA = '0x0006e4548aed4502ec8c844567840ce6ef1013f5'; -const userB = '0x5d7d257d97d8a81f51187a77c6dd226fb8424d90'; -const userC = '0xa153b8891e77f1ae037026514c927530d877fab8'; +// NOTE: change these if you are using a custom rToken (e.g. not rDAI) +// A should be sending interest to B +const userA = '0x9492510bbcb93b6992d8b7bb67888558e12dcac4'; +const userB = '0x358f6260f1f90cd11a10e251ce16ea526f131b02'; const interestTolerance = 0; const network = 'mainnet'; const subgraphURL = process.env.SUBGRAPH_URL; const subgraphID = process.env.SUBGRAPH_ID; -const isLocal = process.env.LOCAL +const isLocal = process.env.LOCAL; -console.log(subgraphURL); -console.log(subgraphID); -console.log(isLocal); - -test('Test RTokenAnalytics', async accounts => { +test('RTokenAnalytics', async accounts => { let rtokenAnalytics; before(async () => { @@ -37,35 +34,43 @@ test('Test RTokenAnalytics', async accounts => { compoundRate = await getCompoundRate(); } + console.log('Subgraph URL: ', subgraphURL); + console.log('Subgraph ID: ', subgraphID); + console.log( + 'Local test: ', + typeof isLocal === 'undefined' ? false : true + ); + rtokenAnalytics = new RTokenAnalytics( compoundRate, interestTolerance, network, - subgraphID + subgraphID, + subgraphURL ); }); - it('getAllRecipients()', async () => { - let recipients = await rtokenAnalytics.getAllRecipients(userA); - assert.isAbove(recipients.length, 0, 'no recipients were returned'); - }); - - it('getAllSenders()', async () => { - let senders = await rtokenAnalytics.getAllSenders(userB); - assert.isAbove(senders.length, 0, 'no senders were returned'); - }); - - it('getTotalInterestPaid()', async () => { - let totalInterestPaid = await rtokenAnalytics.getTotalInterestPaid(userC); - let interest = new BigNumber(totalInterestPaid); - assert.isOk(interest.isGreaterThan(0), 'no interest has been paid'); - }); + // it('getAllOutgoing()', async () => { + // let outgoing = await rtokenAnalytics.getAllOutgoing(userA); + // assert.isAbove(outgoing.length, 0, 'no outgoing were returned'); + // }); + // + // it('getAllIncoming()', async () => { + // let incoming = await rtokenAnalytics.getAllIncoming(userB); + // assert.isAbove(incoming.length, 0, 'no incoming were returned'); + // }); it('getInterestSent()', async () => { - let totalInterestPaid = await rtokenAnalytics.getInterestSent(userA, userB); - let interest = new BigNumber(totalInterestPaid); + let interestSent = await rtokenAnalytics.getInterestSent(userA, userB); + let interest = new BigNumber(interestSent); assert.isOk(interest.isGreaterThan(0), 'no interest has been paid'); }); + + // it('getTotalInterestPaid()', async () => { + // let totalInterestPaid = await rtokenAnalytics.getTotalInterestPaid(userC); + // let interest = new BigNumber(totalInterestPaid); + // assert.isOk(interest.isGreaterThan(0), 'no interest has been paid'); + // }); }); const getCompoundRate = async () => { diff --git a/test/deployContracts.js b/test/deployContracts.js index 1d5d29a..d111717 100644 --- a/test/deployContracts.js +++ b/test/deployContracts.js @@ -291,16 +291,6 @@ contract('RToken', accounts => { receivedSavings: '100.00000', interestPayable: '0.00000' }); - - await expectRevert( - rToken.transfer(customer2, toWad(100.1), { from: customer1 }), - 'Not enough balance to transfer' - ); - await expectRevert( - rToken.transferFrom(customer1, customer2, toWad(1), { from: admin }), - 'Not enough allowance for transfer' - ); - await doBingeBorrowing(); await expectAccount(customer1, { tokenBalance: '100.00000', @@ -381,25 +371,25 @@ contract('RToken', accounts => { totalSavingsAmount: '90.00103' }); - await web3tx( - rToken.redeemAndTransfer, - 'rToken.redeem 2 of customer1 to customer3', - { - inLogs: [ - { - name: 'Transfer', - args: { - from: customer1, - to: ZERO_ADDRESS, - value: toWad(2) - } - } - ] - } - )(customer3, toWad(2), { - from: customer1 - }); - assert.equal(wad4human(await token.balanceOf.call(customer3)), '2.00000'); + // await web3tx( + // rToken.redeemAndTransfer, + // 'rToken.redeem 2 of customer1 to customer3', + // { + // inLogs: [ + // { + // name: 'Transfer', + // args: { + // from: customer1, + // to: ZERO_ADDRESS, + // value: toWad(2) + // } + // } + // ] + // } + // )(customer3, toWad(2), { + // from: customer1 + // }); + // assert.equal(wad4human(await token.balanceOf.call(customer3)), '2.00000'); }); // it('#3 rToken normal operations with hat', async () => { From e213889ff1c11c4ff0a4250bf955031a28c43660 Mon Sep 17 00:00:00 2001 From: Patrick Gallagher Date: Mon, 6 Jan 2020 18:51:21 -0500 Subject: [PATCH 02/13] Make all constructor arguments optional + add defaults --- src/RTokenAnalytics.js | 24 +++++++++--------------- test/RTokenAnalytics.test.js | 32 ++++++++++++++++---------------- 2 files changed, 25 insertions(+), 31 deletions(-) diff --git a/src/RTokenAnalytics.js b/src/RTokenAnalytics.js index 50ca99e..4e684b5 100644 --- a/src/RTokenAnalytics.js +++ b/src/RTokenAnalytics.js @@ -10,25 +10,20 @@ const BigNumber = require('bignumber.js'); const { parseUnits, bigNumberify, formatUnits } = ethers.utils; -const DEFAULT_SUBGRAPH_URL = process.env.SUBGRAPH_URL; +const DEFAULT_SUBGRAPH_URL = 'https://api.thegraph.com/subgraphs/id/'; +const DEFAULT_SUBGRAPH_ID = 'QmfUZ16H2GBxQ4eULAELDJjjVZcZ36TcDkwhoZ9cjF2WNc'; class RTokenAnalytics { - constructor( - interestRate, - interestTolerance, - network, - subgraphID, - subgraphURL - ) { - this.interestRate = interestRate; - this.interestTolerance = interestTolerance; - this.network = network; - - let uri = subgraphURL ? subgraphURL : DEFAULT_SUBGRAPH_URL; + constructor(options = {}) { + this.interestRate = options.interestRate || 0; // Currently unused + this.interestTolerance = options.interestTolerance || 0; // Currently unused + const uri = options.subgraphURL || DEFAULT_SUBGRAPH_URL; + const id = options.subgraphID || DEFAULT_SUBGRAPH_ID; this.link = new createHttpLink({ - uri: `${uri}${subgraphID}`, + uri: `${uri}${id}`, fetch: fetch }); + console.log(uri); } // USER STATS @@ -212,7 +207,6 @@ class RTokenAnalytics { value = value.plus(transfer.value); }); } - return; }); return interestSent; } diff --git a/test/RTokenAnalytics.test.js b/test/RTokenAnalytics.test.js index d68043f..94937c8 100644 --- a/test/RTokenAnalytics.test.js +++ b/test/RTokenAnalytics.test.js @@ -17,7 +17,7 @@ const daiCompoundAddress = '0xf5dce57282a584d2746faf1593d3121fcac444dc'; // NOTE: change these if you are using a custom rToken (e.g. not rDAI) // A should be sending interest to B const userA = '0x9492510bbcb93b6992d8b7bb67888558e12dcac4'; -const userB = '0x358f6260f1f90cd11a10e251ce16ea526f131b02'; +const userB = '0x8605e554111d8ea3295e69addaf8b2abf60d68a3'; const interestTolerance = 0; const network = 'mainnet'; @@ -40,29 +40,29 @@ test('RTokenAnalytics', async accounts => { 'Local test: ', typeof isLocal === 'undefined' ? false : true ); - - rtokenAnalytics = new RTokenAnalytics( - compoundRate, - interestTolerance, - network, + const options = { + interestRate: compoundRate, // Currently unused + interestTolerance, // Currently unused subgraphID, subgraphURL - ); + }; + rtokenAnalytics = new RTokenAnalytics(options); }); - // it('getAllOutgoing()', async () => { - // let outgoing = await rtokenAnalytics.getAllOutgoing(userA); - // assert.isAbove(outgoing.length, 0, 'no outgoing were returned'); - // }); - // - // it('getAllIncoming()', async () => { - // let incoming = await rtokenAnalytics.getAllIncoming(userB); - // assert.isAbove(incoming.length, 0, 'no incoming were returned'); - // }); + it('getAllOutgoing()', async () => { + let outgoing = await rtokenAnalytics.getAllOutgoing(userA); + assert.isAbove(outgoing.length, 0, 'no outgoing were returned'); + }); + + it('getAllIncoming()', async () => { + let incoming = await rtokenAnalytics.getAllIncoming(userB); + assert.isAbove(incoming.length, 0, 'no incoming were returned'); + }); it('getInterestSent()', async () => { let interestSent = await rtokenAnalytics.getInterestSent(userA, userB); let interest = new BigNumber(interestSent); + console.log(interest.toNumber()); assert.isOk(interest.isGreaterThan(0), 'no interest has been paid'); }); From 05905abc69971f15d22c4a6818026fe136151d4a Mon Sep 17 00:00:00 2001 From: Patrick Gallagher Date: Mon, 6 Jan 2020 23:43:59 -0500 Subject: [PATCH 03/13] v0.0.5 beta --- .gitignore | 1 + src/RTokenAnalytics.js | 138 ++++++++++++++++++++++------------- test/RTokenAnalytics.test.js | 43 ++++++----- 3 files changed, 115 insertions(+), 67 deletions(-) diff --git a/.gitignore b/.gitignore index cc9c85d..bf7a0a7 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ yarn-error.log package-lock.json *.swp .env +.env.* diff --git a/src/RTokenAnalytics.js b/src/RTokenAnalytics.js index 4e684b5..57edff5 100644 --- a/src/RTokenAnalytics.js +++ b/src/RTokenAnalytics.js @@ -1,5 +1,6 @@ const { execute, makePromise } = require('apollo-link'); const gql = require('graphql-tag'); +const axios = require('axios'); const fetch = require('node-fetch'); const { createHttpLink } = require('apollo-link-http'); @@ -11,19 +12,20 @@ const BigNumber = require('bignumber.js'); const { parseUnits, bigNumberify, formatUnits } = ethers.utils; const DEFAULT_SUBGRAPH_URL = 'https://api.thegraph.com/subgraphs/id/'; -const DEFAULT_SUBGRAPH_ID = 'QmfUZ16H2GBxQ4eULAELDJjjVZcZ36TcDkwhoZ9cjF2WNc'; +const DEFAULT_SUBGRAPH_ID_RDAI = + 'QmfUZ16H2GBxQ4eULAELDJjjVZcZ36TcDkwhoZ9cjF2WNc'; class RTokenAnalytics { constructor(options = {}) { + this.web3Provider = options.web3Provider; // Curently unused this.interestRate = options.interestRate || 0; // Currently unused this.interestTolerance = options.interestTolerance || 0; // Currently unused const uri = options.subgraphURL || DEFAULT_SUBGRAPH_URL; - const id = options.subgraphID || DEFAULT_SUBGRAPH_ID; - this.link = new createHttpLink({ - uri: `${uri}${id}`, + const rdai_id = options.rdaiSubgraphId || DEFAULT_SUBGRAPH_ID_RDAI; + this.rTokenLink = new createHttpLink({ + uri: `${uri}${rdai_id}`, fetch: fetch }); - console.log(uri); } // USER STATS @@ -50,7 +52,7 @@ class RTokenAnalytics { `, variables: { id: address } }; - let res = await makePromise(execute(this.link, operation)); + let res = await makePromise(execute(this.rTokenLink, operation)); return res.data.user.totalInterestPaid; } @@ -89,7 +91,7 @@ class RTokenAnalytics { `, variables: { id: address } }; - let res = await makePromise(execute(this.link, operation)); + let res = await makePromise(execute(this.rTokenLink, operation)); return res.data.account.loansOwned; } @@ -121,7 +123,7 @@ class RTokenAnalytics { `, variables: { id: address } }; - let res = await makePromise(execute(this.link, operation)); + let res = await makePromise(execute(this.rTokenLink, operation)); return res.data.account.loansReceived; } @@ -138,10 +140,10 @@ class RTokenAnalytics { async getInterestSent(addressFrom, addressTo, timePeriod) { const operation = { query: gql` - query getAccount($from: Bytes) { + query getAccount($from: Bytes, $to: Bytes) { account(id: $from) { balance - loansOwned { + loansOwned(where: { recipient: $to }) { amount recipient { id @@ -163,51 +165,52 @@ class RTokenAnalytics { `, variables: { from: addressFrom, to: addressTo } }; - let res = await makePromise(execute(this.link, operation)); - + let res = await makePromise(execute(this.rTokenLink, operation)); let interestSent = 0; + let value = new BigNumber(0); - res.data.account.loansOwned.forEach(loan => { - if (loan.recipient.id === addressTo) { - let value = new BigNumber(0); - loan.transfers.forEach((transfer, index) => { - const rate = 0.04; + const loan = res.data.account.loansOwned[0]; + for (let index = 0; index < loan.transfers.length; index++) { + const transfer = loan.transfers[index]; + let rate = null; - // Skip the first transfer - if (index === 0) { - value = value.plus(transfer.value); - return; - } - // If this is the final transfer, add interest until current time - if (index === loan.transfers.length - 1) { - value = value.plus(transfer.value); - - const start = transfer.transaction.timestamp; - const date = new Date(); - const now = Math.round(date.getTime() / 1000); - - interestSent += this._calculateInterestOverTime( - value, - start, - now, - rate - ); - // console.log('Final ransfer. Current value: ', value.toNumber()); - } + // If this is the first transfer, skip it + if (index === 0) { + value = value.plus(transfer.value); + } + // If this is the last transfer, add the accumulated interest until the current time + else if (index === loan.transfers.length - 1) { + value = value.plus(transfer.value); + + const start = transfer.transaction.timestamp; + const date = new Date(); + const now = Math.round(date.getTime() / 1000); + + rate = await this._getCompoundRate(start); + interestSent += this._calculateInterestOverTime( + value, + start, + now, + rate + ); + // console.log('Final ransfer. Current value: ', value.toNumber()); + } else { + // Normal case: Add the accumulated interest since last transfer + rate = await this._getCompoundRate( + loan.transfers[index - 1].transaction.timestamp + ); - // Add the accumulated interest between the transfers - interestSent += this._calculateInterestOverTime( - value, - loan.transfers[index - 1].transaction.timestamp, - transfer.transaction.timestamp, - rate - ); - - // Add the current transfer value to the running value - value = value.plus(transfer.value); - }); + interestSent += this._calculateInterestOverTime( + value, + loan.transfers[index - 1].transaction.timestamp, + transfer.transaction.timestamp, + rate + ); + + // Add the current transfer value to the running value + value = value.plus(transfer.value); } - }); + } return interestSent; } @@ -217,6 +220,41 @@ class RTokenAnalytics { return value * period * startingAPY; } + async _getCompoundRate(blockTimestamp) { + // Note: This is incorrect. Calculating rate is much more complex than just getting it from storage. + // I was trying to avoid using compoiund historic data API, since its so slow... + + // const res = await this.web3Provider.getStorageAt( + // '0xec163986cC9a6593D6AdDcBFf5509430D348030F', + // 1, + // 9220708 + // ); + // const unformatted_rate = new BigNumber(2102400 * parseInt(res, 16)); + // const rate = unformatted_rate.times(BigNumber(10).pow(-18)); + // console.log( + // `Compound rate (WRONG): ${Math.round(rate.toNumber() * 100000) / 1000}%` + // ); + + // Used to inspect storage on a contract + // for (let index = 0; index < 23; index++) { + // const rate = await this.web3Provider.getStorageAt( + // '0x5d3a536E4D6DbD6114cc1Ead35777bAB948E3643', + // index, + // 9220800 + // ); + // // console.log(`[${index}] ${rate}`); + // console.log(`[${index}] ${parseInt(rate, 16)}`); + // } + + // Correct, new way to get the rate + const COMPOUND_URL = + 'https://api.compound.finance/api/v2/market_history/graph?asset=0x5d3a536E4D6DbD6114cc1Ead35777bAB948E3643'; + const params = `&min_block_timestamp=${blockTimestamp}&max_block_timestamp=${blockTimestamp + + 1}&num_buckets=1`; + const res = await axios.get(`${COMPOUND_URL}${params}`); + return res.data.supply_rates[0].rate; + } + // GLOBAL getGlobalInterestGenerated(timePeriod) { // TODO: diff --git a/test/RTokenAnalytics.test.js b/test/RTokenAnalytics.test.js index 94937c8..80a3a73 100644 --- a/test/RTokenAnalytics.test.js +++ b/test/RTokenAnalytics.test.js @@ -1,3 +1,4 @@ +const ethers = require('ethers'); const axios = require('axios'); const RTokenAnalytics = require('../src/RTokenAnalytics'); const Registry = require('eth-registry'); @@ -6,13 +7,14 @@ var assert = require('chai').assert; const BigNumber = require('bignumber.js'); +// NOTE: Compound API is super slow. Use hard coded value instead. const debug = { hardCodeInterestRate: '0.048356383475363732' // hardCodeInterestRate: false }; const COMPOUND_URL = 'https://api.compound.finance/api/v2/ctoken?addresses[]='; -const daiCompoundAddress = '0xf5dce57282a584d2746faf1593d3121fcac444dc'; +const daiCompoundAddress = '0x5d3a536E4D6DbD6114cc1Ead35777bAB948E3643'; // NOTE: change these if you are using a custom rToken (e.g. not rDAI) // A should be sending interest to B @@ -22,7 +24,7 @@ const userB = '0x8605e554111d8ea3295e69addaf8b2abf60d68a3'; const interestTolerance = 0; const network = 'mainnet'; const subgraphURL = process.env.SUBGRAPH_URL; -const subgraphID = process.env.SUBGRAPH_ID; +const rdaiSubgraphId = process.env.SUBGRAPH_ID; const isLocal = process.env.LOCAL; test('RTokenAnalytics', async accounts => { @@ -34,35 +36,42 @@ test('RTokenAnalytics', async accounts => { compoundRate = await getCompoundRate(); } - console.log('Subgraph URL: ', subgraphURL); - console.log('Subgraph ID: ', subgraphID); + console.log('Subgraph URL : ', subgraphURL); + console.log('Subgraph ID rDAI : ', rdaiSubgraphId); console.log( - 'Local test: ', + 'Local test : ', typeof isLocal === 'undefined' ? false : true ); + + const web3Provider = new ethers.providers.InfuraProvider( + 'homestead', + process.env.INFURA_ENDPOINT_KEY + ); + const options = { interestRate: compoundRate, // Currently unused interestTolerance, // Currently unused - subgraphID, - subgraphURL + rdaiSubgraphId, + subgraphURL, + web3Provider }; rtokenAnalytics = new RTokenAnalytics(options); }); - it('getAllOutgoing()', async () => { - let outgoing = await rtokenAnalytics.getAllOutgoing(userA); - assert.isAbove(outgoing.length, 0, 'no outgoing were returned'); - }); - - it('getAllIncoming()', async () => { - let incoming = await rtokenAnalytics.getAllIncoming(userB); - assert.isAbove(incoming.length, 0, 'no incoming were returned'); - }); + // it('getAllOutgoing()', async () => { + // let outgoing = await rtokenAnalytics.getAllOutgoing(userA); + // assert.isAbove(outgoing.length, 0, 'no outgoing were returned'); + // }); + // + // it('getAllIncoming()', async () => { + // let incoming = await rtokenAnalytics.getAllIncoming(userB); + // assert.isAbove(incoming.length, 0, 'no incoming were returned'); + // }); it('getInterestSent()', async () => { let interestSent = await rtokenAnalytics.getInterestSent(userA, userB); let interest = new BigNumber(interestSent); - console.log(interest.toNumber()); + console.log('interest sent : ', interest.toNumber()); assert.isOk(interest.isGreaterThan(0), 'no interest has been paid'); }); From eacd087514d8ff26433718a597354914e30b82ad Mon Sep 17 00:00:00 2001 From: Patrick Gallagher Date: Mon, 6 Jan 2020 23:47:12 -0500 Subject: [PATCH 04/13] add back test --- test/RTokenAnalytics.test.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/test/RTokenAnalytics.test.js b/test/RTokenAnalytics.test.js index 80a3a73..0f9505c 100644 --- a/test/RTokenAnalytics.test.js +++ b/test/RTokenAnalytics.test.js @@ -58,15 +58,15 @@ test('RTokenAnalytics', async accounts => { rtokenAnalytics = new RTokenAnalytics(options); }); - // it('getAllOutgoing()', async () => { - // let outgoing = await rtokenAnalytics.getAllOutgoing(userA); - // assert.isAbove(outgoing.length, 0, 'no outgoing were returned'); - // }); - // - // it('getAllIncoming()', async () => { - // let incoming = await rtokenAnalytics.getAllIncoming(userB); - // assert.isAbove(incoming.length, 0, 'no incoming were returned'); - // }); + it('getAllOutgoing()', async () => { + let outgoing = await rtokenAnalytics.getAllOutgoing(userA); + assert.isAbove(outgoing.length, 0, 'no outgoing were returned'); + }); + + it('getAllIncoming()', async () => { + let incoming = await rtokenAnalytics.getAllIncoming(userB); + assert.isAbove(incoming.length, 0, 'no incoming were returned'); + }); it('getInterestSent()', async () => { let interestSent = await rtokenAnalytics.getInterestSent(userA, userB); From 1d92604682bc4f82111014f2b69c436dd2a70f51 Mon Sep 17 00:00:00 2001 From: Patrick Gallagher Date: Tue, 7 Jan 2020 01:05:25 -0500 Subject: [PATCH 05/13] Update readme --- README.md | 203 +++++++++++++++++++---------------------- src/RTokenAnalytics.js | 4 +- 2 files changed, 98 insertions(+), 109 deletions(-) diff --git a/README.md b/README.md index 5b96c38..b3b207d 100644 --- a/README.md +++ b/README.md @@ -2,152 +2,103 @@ This library provides easy tools for getting data about specific users of rToken. Out of the box you get: -| Feature | Status | Notes | -| ----------------------------------------- | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| Subgraph for rSAI on mainnet | :hammer_and_wrench: | Redeemable single-collateral DAI [deployed subgraph](https://thegraph.com/explorer/subgraph/pi0neerpat/rdai-graph). Recommend do not use for production until completed. | -| Subscribe to rToken data in your DAPP | :hammer_and_wrench: | See `src/RTokenAnalytics.js` | -| Local subgraph development and testing | :white_check_mark: | See [Deploying to a local environment](#Deploying-to-a-local-environment) | -| Bring-your-own rToken | :hammer_and_wrench: | See [instructions](#bring-your-own-rtoken) | -| Your suggested feature. What do you need? | ? | | +| Feature | Status | Notes | +| ---------------------------- | ------------------ | ------------------------------------------------------------------------------- | +| Get rDAI data in your dapp | :white_check_mark: | [docs](#rtoken-analytics-sdk) | +| Subgraph for rDAI on mainnet | :white_check_mark: | Deployed [subgraph](https://thegraph.com/explorer/subgraph/pi0neerpat/mcd-rdai) | +| Bring-your-own rToken | :white_check_mark: | [docs](#bring-your-own-rtoken) | +| What else do you need? | ? | | -## Usage - -Current available commands - -(Note these will be updated as a subscription service, rather than a single REST call) - -#### Initialize - -```js -import RTokenAnalytics from 'rtoken-analytics'; - -const rtokenAnalytics = new RTokenAnalytics( - interestRate, - interestTolerance, - network, - subgraphID, - subgraphURL -); -``` - -| Arguments | Options | Notes | -| :-----------------: | --------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `interestRate` | | Current rToken interest rate. See [Get Interest Rate](#get-interest-rate) for details | -| `interestTolerance` | | Todo | -| `network` | | "mainnet" is supported only | -| `subgraphID` | | Get the most recent ID on the subgraph page: [mainnet](https://thegraph.com/explorer/subgraph/pi0neerpat/rdai-graph) | -| `[subgraphURL]` | optional, default: https://api.thegraph.com/subgraphs/id/ | | - -## In Development +# rToken Analytics SDK -#### User Stats +## Install -Based on your own principal - -```js -getTotalInterestGenerated(address, timePeriod); -// Returns all interest accrued within time period no matter where it was sent - -getTotalInterestRetained(address, timePeriod); -// Returns all accrued interest retained by the wallet - -getTotalInterestSent(address, timePeriod); -// Returns all interest sent to wallets other than the user’s - -getAllRecipients(address, timePeriod); -// Returns list of addresses that an address has sent interest to +```bash +yarn add rtoken-analytics ``` -#### Sending / Receiving - -Based on external wallets only +## Usage ```js -getTotalInterestReceivedExternal(address, timePeriod); -// Returns total amount of interest received by an address from all sources -// Excludes interest generated from user’s own wallet - -getInterestSentByAddress(addressFrom, addressTo, timePeriod); -// Returns total amount of interest received by an address from a single address - -getAllPayers(address, timePeriod); -// Returns list of addresses that have sent any interest to this, and the amounts -``` +import RTokenAnalytics from 'rtoken-analytics'; -#### Global +const MyComponent = () => { + const from = "0x9492510bbcb93b6992d8b7bb67888558e12dcac4" + const to = "0x8605e554111d8ea3295e69addaf8b2abf60d68a3" -```js -getGlobalInterestGenerated(timePeriod); - -getGlobalInterestSent(timePeriod); + const rTokenAnalytics = new RTokenAnalytics(); + const interestSent = await rTokenAnalytics.getInterestSent(from, to); +} ``` -#### Token Balance Tracking +If you are using your own rToken subgraph, you will need to provide this info in the arguments. ```js -getTokenBalanceHistoryByAddress(address, timePeriod); -// Returns array of objects for each instance that a address’ rToken balance changes. Object returns: -return { - // Amount of balance change - // Transaction Hash +const options = { + subgraphURL: 'some other url', + rdaiSubgraphId: 'some other id' }; +const rTokenAnalytics = new RTokenAnalytics(options); ``` -#### Get Interest Rate +| Arguments | Default value | +| :--------------: | ------------------------------------------------ | +| `subgraphURL` | `https://api.thegraph.com/subgraphs/id/` | +| `rdaiSubgraphId` | `QmfUZ16H2GBxQ4eULAELDJjjVZcZ36TcDkwhoZ9cjF2WNc` | -This is the suggested method for obtaining the Compound interest rate +## API -```js -import axios from 'axios'; +### `getAllOutgoing(address)` -const COMPOUND_URL = 'https://api.compound.finance/api/v2/ctoken?addresses[]='; -const daiCompoundAddress = '0xf5dce57282a584d2746faf1593d3121fcac444dc'; +Get all loans where interest is being sent to another address -const getCompoundRate = async () => { - const res = await axios.get(`${COMPOUND_URL}${daiCompoundAddress}`); - const compoundRate = res.data.cToken[0].supply_rate.value; - const compoundRateFormatted = Math.round(compoundRate * 10000) / 100; +Returns array of active loans. Example: - return { - compoundRate, - compoundRateFormatted - }; -}; +```js +[ + { + amount: '0.50000000058207661', + hat: { id: '11' }, + recipient: { id: '0x358f6260f1f90cd11a10e251ce16ea526f131b02' } + }, + { + amount: '24.49999999941792339' + // ... + } +]; +``` -// Usage +### `getAllIncoming(address)` -const { compoundRate, compoundRateFormatted } = await getCompoundRate(); +Get all loans where interest is being received from another address -console.log(`Compound Rate: ${compoundRateFormatted}%`); -// > Compound Rate: 4.56% +Returns array of active loans (same schema as above) -// We recommend saving the rate for quick reference, as the API can be slow. -if (typeof window !== 'undefined') { - localStorage.setItem('compoundRate', compoundRate); -} -``` +### `getInterestSent(fromAddress, toAddress)` -## Subgraph +Get the total amount of interest sent -## Usage +Returns: value in DAI -TODO +> What other features do you want? Let us know by making an issue. ## Bring-your-own rToken +If you deploy your own token, and you wish to use this SDK, you will need to deploy you own subgraph. As long as you didn't modify the [rToken contracts](https://github.com/rtoken-project/rtoken-contracts) too much, you can just deploy the subgraph in the [`/subgraph`]('subgraph/') folder. Be sure to modify `subgraph.yaml` with the correct `address` and `startBlock`. + ## Deploying to a local environment -> :warning: You probably don't need to do this! If your rToken is deployed to `Mainnet` or `Ropsten`, then you should use the hosted servers provided by The Graph. +> :warning: You probably don't need to do this! If your rToken is deployed to `Mainnet` or `Ropsten`, and you are using the standard rToken contracts, then you should use the hosted servers provided by The Graph. The rToken team uses a local subgraph deployment to enable rapid development and testing of the tools provided here. In this section we will do the following: 1. Deploy the `rtoken-analytics` subgraph to a local docker container on your machine. -2. Deploy the contracts to a local Ganache instance. -3. Check that your setup is operating correctly. +2. Deploy the rToken contracts to a local Ganache instance. +3. Check that your setup is correct by running some tests ### Setup a local subgraph -> If you've already performed the setup process, you should skip down to the [Testing and restarting](#Testing-and-restarting) section. +> If you've previously performed the setup process, you should skip down to the [Testing and restarting](#Testing-and-restarting) section. If you get stuck during setup, see additional instructions from The Graph docs [here](https://thegraph.com/docs/quick-start#local-development). @@ -273,6 +224,44 @@ nodemon -x yarn test_local # leave running ``` -## Contributing +# Misc. tools + +## Get the Compound Interest Rate + +This is one method for obtaining the Compound interest rate in your dapp. + +```js +import axios from 'axios'; + +const COMPOUND_URL = 'https://api.compound.finance/api/v2/ctoken?addresses[]='; +const daiCompoundAddress = '0x5d3a536E4D6DbD6114cc1Ead35777bAB948E3643'; + +const getCompoundRate = async () => { + const res = await axios.get(`${COMPOUND_URL}${daiCompoundAddress}`); + const compoundRate = res.data.cToken[0].supply_rate.value; + const compoundRateFormatted = Math.round(compoundRate * 10000) / 100; + + return { + compoundRate, + compoundRateFormatted + }; +}; +``` + +Then use it like this + +```js +const { compoundRate, compoundRateFormatted } = await getCompoundRate(); + +console.log(`Compound Rate: ${compoundRateFormatted}%`); +// > Compound Rate: 4.56% + +// Recommend you save the rate for quick reference, as the API can be slow. +if (typeof window !== 'undefined') { + localStorage.setItem('compoundRate', compoundRate); +} +``` + +# Contributing Contributions, suggestions, and issues are welcome. At the moment, there are no strict guidelines to follow. diff --git a/src/RTokenAnalytics.js b/src/RTokenAnalytics.js index 57edff5..4dc4133 100644 --- a/src/RTokenAnalytics.js +++ b/src/RTokenAnalytics.js @@ -20,10 +20,10 @@ class RTokenAnalytics { this.web3Provider = options.web3Provider; // Curently unused this.interestRate = options.interestRate || 0; // Currently unused this.interestTolerance = options.interestTolerance || 0; // Currently unused - const uri = options.subgraphURL || DEFAULT_SUBGRAPH_URL; + const url = options.subgraphURL || DEFAULT_SUBGRAPH_URL; const rdai_id = options.rdaiSubgraphId || DEFAULT_SUBGRAPH_ID_RDAI; this.rTokenLink = new createHttpLink({ - uri: `${uri}${rdai_id}`, + uri: `${url}${rdai_id}`, fetch: fetch }); } From cd8449eb07148ceda5c33f91b955178839163526 Mon Sep 17 00:00:00 2001 From: Patrick Gallagher Date: Tue, 7 Jan 2020 01:06:09 -0500 Subject: [PATCH 06/13] v0.0.6 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4b289bd..f650109 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rtoken-analytics", - "version": "0.0.5", + "version": "0.0.6", "description": "Data and analytics utility for rToken", "main": "index.js", "repository": "git@github.com:rtoken-project/rtoken-analytics.git", From 1240e24191504bdcf69969f0fbf08afe8a4ecc67 Mon Sep 17 00:00:00 2001 From: Patrick Gallagher Date: Tue, 7 Jan 2020 01:27:40 -0500 Subject: [PATCH 07/13] update entry, and clean up dependencies --- README.md | 6 ++---- package.json | 18 ++++++++++-------- src/RTokenAnalytics.js | 4 ++-- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index b3b207d..28d7c99 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,14 @@ # rToken Analytics -This library provides easy tools for getting data about specific users of rToken. Out of the box you get: +This library provides easy tools for getting data about specific users of rToken. | Feature | Status | Notes | | ---------------------------- | ------------------ | ------------------------------------------------------------------------------- | -| Get rDAI data in your dapp | :white_check_mark: | [docs](#rtoken-analytics-sdk) | +| Get rDAI data in your dapp | :white_check_mark: | | | Subgraph for rDAI on mainnet | :white_check_mark: | Deployed [subgraph](https://thegraph.com/explorer/subgraph/pi0neerpat/mcd-rdai) | | Bring-your-own rToken | :white_check_mark: | [docs](#bring-your-own-rtoken) | | What else do you need? | ? | | -# rToken Analytics SDK - ## Install ```bash diff --git a/package.json b/package.json index f650109..a960db0 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "rtoken-analytics", "version": "0.0.6", "description": "Data and analytics utility for rToken", - "main": "index.js", + "main": "src/index.js", "repository": "git@github.com:rtoken-project/rtoken-analytics.git", "author": "Patrick Gallagher ", "license": "MIT", @@ -30,20 +30,22 @@ "contractAddress": "" } }, - "dependencies": { - "@decentral.ee/web3-test-helpers": "^0.2.1", - "@truffle/hdwallet-provider": "^1.0.26", + "peerDependencies": { "apollo-link": "^1.2.13", "apollo-link-http": "^1.5.16", + "graphql-tag": "^2.10.1", "axios": "^0.19.0", - "bignumber": "^1.1.0", + "node-fetch": "^2.6.0", + "bignumber": "^1.1.0" + }, + "devDependencies": { + "ethers": "^4.0.40", + "@decentral.ee/web3-test-helpers": "^0.2.1", + "@truffle/hdwallet-provider": "^1.0.26", "chai": "^4.2.0", "eth-registry": "^1.2.0", - "ethers": "^4.0.40", "graphql": "^14.5.8", - "graphql-tag": "^2.10.1", "mocha": "^6.2.2", - "node-fetch": "^2.6.0", "openzeppelin-solidity": "^2.4.0", "openzeppelin-test-helpers": "^0.5.1", "truffle": "^5.1.1" diff --git a/src/RTokenAnalytics.js b/src/RTokenAnalytics.js index 4dc4133..deb69ea 100644 --- a/src/RTokenAnalytics.js +++ b/src/RTokenAnalytics.js @@ -5,11 +5,11 @@ const axios = require('axios'); const fetch = require('node-fetch'); const { createHttpLink } = require('apollo-link-http'); require('babel-polyfill'); -const ethers = require('ethers'); +// const ethers = require('ethers'); const BigNumber = require('bignumber.js'); -const { parseUnits, bigNumberify, formatUnits } = ethers.utils; +// const { parseUnits, bigNumberify, formatUnits } = ethers.utils; const DEFAULT_SUBGRAPH_URL = 'https://api.thegraph.com/subgraphs/id/'; const DEFAULT_SUBGRAPH_ID_RDAI = From e5e52d9dc19c5e4651b60612ac075d7fd5bb94d5 Mon Sep 17 00:00:00 2001 From: Patrick Gallagher Date: Tue, 7 Jan 2020 01:32:06 -0500 Subject: [PATCH 08/13] v0.0.7 --- package.json | 4 +- yarn.lock | 484 ++------------------------------------------------- 2 files changed, 14 insertions(+), 474 deletions(-) diff --git a/package.json b/package.json index a960db0..7522e5f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rtoken-analytics", - "version": "0.0.6", + "version": "0.0.7", "description": "Data and analytics utility for rToken", "main": "src/index.js", "repository": "git@github.com:rtoken-project/rtoken-analytics.git", @@ -30,7 +30,7 @@ "contractAddress": "" } }, - "peerDependencies": { + "dependencies": { "apollo-link": "^1.2.13", "apollo-link-http": "^1.5.16", "graphql-tag": "^2.10.1", diff --git a/yarn.lock b/yarn.lock index 2d4e2b1..fe9e20c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -295,13 +295,6 @@ ajv@^6.10.0, ajv@^6.5.5: json-schema-traverse "^0.4.1" uri-js "^4.2.2" -ansi-align@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ansi-align/-/ansi-align-2.0.0.tgz#c36aeccba563b89ceb556f3690f0b1d9e3547f7f" - integrity sha1-w2rsy6VjuJzrVW82kPCx2eNUf38= - dependencies: - string-width "^2.0.0" - ansi-colors@3.2.3: version "3.2.3" resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-3.2.3.tgz#57d35b8686e851e2cc04c403f1c00203976a1813" @@ -352,14 +345,6 @@ anymatch@^1.3.0: micromatch "^2.1.5" normalize-path "^2.0.0" -anymatch@~3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.1.tgz#c55ecf02185e2469259399310c173ce31233b142" - integrity sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg== - dependencies: - normalize-path "^3.0.0" - picomatch "^2.0.4" - apollo-link-http-common@^0.2.15: version "0.2.15" resolved "https://registry.yarnpkg.com/apollo-link-http-common/-/apollo-link-http-common-0.2.15.tgz#304e67705122bf69a9abaded4351b10bc5efd6d9" @@ -389,14 +374,14 @@ apollo-link@^1.2.13: zen-observable-ts "^0.8.20" apollo-utilities@^1.3.0: - version "1.3.2" - resolved "https://registry.yarnpkg.com/apollo-utilities/-/apollo-utilities-1.3.2.tgz#8cbdcf8b012f664cd6cb5767f6130f5aed9115c9" - integrity sha512-JWNHj8XChz7S4OZghV6yc9FNnzEXj285QYp/nLNh943iObycI5GTDO3NGR9Dth12LRrSFMeDOConPfPln+WGfg== + version "1.3.3" + resolved "https://registry.yarnpkg.com/apollo-utilities/-/apollo-utilities-1.3.3.tgz#f1854715a7be80cd810bc3ac95df085815c0787c" + integrity sha512-F14aX2R/fKNYMvhuP2t9GD9fggID7zp5I96MF5QeKYWDWTrkRdHRp4+SVfXUVN+cXOaB/IebfvRtzPf25CM0zw== dependencies: "@wry/equality" "^0.1.2" fast-json-stable-stringify "^2.0.0" ts-invariant "^0.4.0" - tslib "^1.9.3" + tslib "^1.10.0" app-module-path@^2.2.0: version "2.2.0" @@ -1383,11 +1368,6 @@ binary-extensions@^1.0.0: resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.13.1.tgz#598afe54755b2868a5330d2aff9d4ebb53209b65" integrity sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw== -binary-extensions@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.0.0.tgz#23c0df14f6a88077f5f986c0d167ec03c3d5537c" - integrity sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow== - bindings@^1.2.1, bindings@^1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df" @@ -1452,19 +1432,6 @@ body-parser@1.19.0, body-parser@^1.16.0: raw-body "2.4.0" type-is "~1.6.17" -boxen@^1.2.1: - version "1.3.0" - resolved "https://registry.yarnpkg.com/boxen/-/boxen-1.3.0.tgz#55c6c39a8ba58d9c61ad22cd877532deb665a20b" - integrity sha512-TNPjfTr432qx7yOjQyaXm3dSR0MH9vXp7eT1BFSl/C51g+EFnOR9hTg1IreahGBmDNCehscshe45f+C1TBZbLw== - dependencies: - ansi-align "^2.0.0" - camelcase "^4.0.0" - chalk "^2.0.1" - cli-boxes "^1.0.0" - string-width "^2.0.0" - term-size "^1.2.0" - widest-line "^2.0.0" - brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" @@ -1498,13 +1465,6 @@ braces@^2.3.1: split-string "^3.0.2" to-regex "^3.0.1" -braces@~3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" - integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== - dependencies: - fill-range "^7.0.1" - brorand@^1.0.1: version "1.1.0" resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" @@ -1683,11 +1643,6 @@ cacheable-request@^6.0.0: normalize-url "^4.1.0" responselike "^1.0.2" -camelcase@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" - integrity sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0= - camelcase@^5.0.0: version "5.3.1" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" @@ -1698,11 +1653,6 @@ caniuse-lite@^1.0.30000844: resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001011.tgz#0d6c4549c78c4a800bb043a83ca0cbe0aee6c6e1" integrity sha512-h+Eqyn/YA6o6ZTqpS86PyRmNWOs1r54EBDcd2NTwwfsXQ8re1B38SnB+p2RKF8OUsyEIjeDU8XGec1RGO/wYCg== -capture-stack-trace@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/capture-stack-trace/-/capture-stack-trace-1.0.1.tgz#a6c0bbe1f38f3aa0b92238ecb6ff42c344d4135d" - integrity sha512-mYQLZnx5Qt1JgB1WEiMCf2647plpGeQ2NMR/5L0HNZzGQo4fuSPnK+wjfPnKZV0aiJDgzmWqqkV/g7JD+DW0qw== - caseless@~0.12.0: version "0.12.0" resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" @@ -1778,31 +1728,11 @@ chokidar@^1.6.1: optionalDependencies: fsevents "^1.0.0" -chokidar@^3.2.2: - version "3.3.0" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.3.0.tgz#12c0714668c55800f659e262d4962a97faf554a6" - integrity sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A== - dependencies: - anymatch "~3.1.1" - braces "~3.0.2" - 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" - optionalDependencies: - fsevents "~2.1.1" - chownr@^1.1.1: version "1.1.3" resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.3.tgz#42d837d5239688d55f303003a508230fa6727142" integrity sha512-i70fVHhmV3DtTl6nqvZOnIjbY0Pe4kAUjwHj8z0zAdgBtYrJyYwLKCCuRBQ5ppkyL0AkN7HKRnETdmdp1zqNXw== -ci-info@^1.5.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.6.0.tgz#2ca20dbb9ceb32d4524a683303313f0304b1e497" - integrity sha512-vsGdkwSCDpWmP80ncATX7iea5DWQemg1UgCW5J8tqjU3lYw4FBYuj89J0CTVomA7BEfvSZd84GmHko+MxFQU2A== - cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" @@ -1821,11 +1751,6 @@ class-utils@^0.3.5: isobject "^3.0.0" static-extend "^0.1.1" -cli-boxes@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/cli-boxes/-/cli-boxes-1.0.0.tgz#4fa917c3e59c94a004cd61f8ee509da651687143" - integrity sha1-T6kXw+WclKAEzWH47lCdplFocUM= - cliui@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/cliui/-/cliui-5.0.0.tgz#deefcfdb2e800784aa34f46fa08e06851c7bbbc5" @@ -1924,18 +1849,6 @@ concat-stream@^1.5.1: readable-stream "^2.2.2" typedarray "^0.0.6" -configstore@^3.0.0: - version "3.1.2" - resolved "https://registry.yarnpkg.com/configstore/-/configstore-3.1.2.tgz#c6f25defaeef26df12dd33414b001fe81a543f8f" - integrity sha512-vtv5HtGjcYUgFrXc6Kx747B83MRRVS5R1VTEQoXvuP+kMI+if6uywV0nDGoiydJRy4yk7h9od5Og0kxx4zUXmw== - dependencies: - 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" - console-control-strings@^1.0.0, console-control-strings@~1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" @@ -2006,13 +1919,6 @@ create-ecdh@^4.0.0: bn.js "^4.1.0" elliptic "^6.0.0" -create-error-class@^3.0.0: - version "3.0.2" - resolved "https://registry.yarnpkg.com/create-error-class/-/create-error-class-3.0.2.tgz#06be7abef947a3f14a30fd610671d401bca8b7b6" - integrity sha1-Br56vvlHo/FKMP1hBnHUAbyot7Y= - dependencies: - capture-stack-trace "^1.0.0" - create-hash@^1.1.0, create-hash@^1.1.1, create-hash@^1.1.2, create-hash@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" @@ -2044,15 +1950,6 @@ cross-fetch@^2.1.0, cross-fetch@^2.1.1: node-fetch "2.1.2" whatwg-fetch "2.0.4" -cross-spawn@^5.0.1: - version "5.1.0" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" - integrity sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk= - dependencies: - lru-cache "^4.0.1" - shebang-command "^1.2.0" - which "^1.2.9" - crypto-browserify@3.12.0: version "3.12.0" resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.0.tgz#396cf9f3137f03e4b8e532c58f698254e00f80ec" @@ -2075,11 +1972,6 @@ crypto-js@^3.1.9-1: resolved "https://registry.yarnpkg.com/crypto-js/-/crypto-js-3.1.9-1.tgz#fda19e761fc077e01ffbfdc6e9fdfc59e8806cd8" integrity sha1-/aGedh/Ad+Af+/3G6f38WeiAbNg= -crypto-random-string@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-1.0.0.tgz#a230f64f568310e1498009940790ec99545bca7e" - integrity sha1-ojD2T1aDEOFJgAmUB5DsmVRbyn4= - d@1, d@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/d/-/d-1.0.1.tgz#8698095372d58dbee346ffd0c7093f99f8f9eb5a" @@ -2315,13 +2207,6 @@ dom-walk@^0.1.0: resolved "https://registry.yarnpkg.com/dom-walk/-/dom-walk-0.1.1.tgz#672226dc74c8f799ad35307df936aba11acd6018" integrity sha1-ZyIm3HTI95mtNTB9+TaroRrNYBg= -dot-prop@^4.1.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-4.2.0.tgz#1f19e0c2e1aa0e32797c49799f2837ac6af69c57" - integrity sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ== - dependencies: - is-obj "^1.0.0" - drbg.js@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/drbg.js/-/drbg.js-1.0.1.tgz#3e36b6c42b37043823cdbc332d58f31e2445480b" @@ -2869,19 +2754,6 @@ evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: md5.js "^1.3.4" safe-buffer "^5.1.1" -execa@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777" - integrity sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c= - dependencies: - 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" - expand-brackets@^0.1.4: version "0.1.5" resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" @@ -3080,13 +2952,6 @@ fill-range@^4.0.0: repeat-string "^1.6.1" to-regex-range "^2.1.0" -fill-range@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" - integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== - dependencies: - to-regex-range "^5.0.1" - finalhandler@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.2.tgz#b7e7d000ffd11938d0fdb053506f6ebabe9f587d" @@ -3210,11 +3075,6 @@ fsevents@^1.0.0: nan "^2.12.1" node-pre-gyp "^0.12.0" -fsevents@~2.1.1: - version "2.1.2" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.2.tgz#4c0a1fb34bc68e543b4b82a9ec392bfbda840805" - integrity sha512-R4wDiBwZ0KzpgOWetKDug1FZcYhqYnUYKtfZYt4mD5SBz76q0KR4Q9o7GIPamsVPGmW3EYPPJ0dOOjvx32ldZA== - function-bind@^1.0.2, function-bind@^1.1.1, function-bind@~1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" @@ -3303,13 +3163,6 @@ glob-parent@^2.0.0: dependencies: is-glob "^2.0.0" -glob-parent@~5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.0.tgz#5f4c1d1e748d30cd73ad2944b3577a81b081e8c2" - integrity sha512-qjtRgnIVmOfnKUE3NJAQEdk+lKrxfw8t5ke7SXtfMTHcjsBfOfWXCQfdb30zfDoZQ2IRSIiidmjtbHZPZ++Ihw== - dependencies: - is-glob "^4.0.1" - glob@7.1.2: version "7.1.2" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" @@ -3346,13 +3199,6 @@ glob@^7.1.2, glob@^7.1.3, glob@~7.1.4: once "^1.3.0" path-is-absolute "^1.0.0" -global-dirs@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/global-dirs/-/global-dirs-0.1.1.tgz#b319c0dd4607f353f3be9cca4c72fc148c49f445" - integrity sha1-sxnA3UYH81PzvpzKTHL8FIxJ9EU= - dependencies: - ini "^1.3.4" - global@~4.3.0: version "4.3.2" resolved "https://registry.yarnpkg.com/global/-/global-4.3.2.tgz#e76989268a6c74c38908b1305b10fc0e394e9d0f" @@ -3388,23 +3234,6 @@ got@9.6.0: to-readable-stream "^1.0.0" url-parse-lax "^3.0.0" -got@^6.7.1: - version "6.7.1" - resolved "https://registry.yarnpkg.com/got/-/got-6.7.1.tgz#240cd05785a9a18e561dc1b44b41c763ef1e8db0" - integrity sha1-JAzQV4WpoY5WHcG0S0HHY+8ejbA= - dependencies: - create-error-class "^3.0.0" - duplexer3 "^0.1.4" - get-stream "^3.0.0" - is-redirect "^1.0.0" - is-retry-allowed "^1.0.0" - is-stream "^1.0.0" - lowercase-keys "^1.0.0" - safe-buffer "^5.0.1" - timed-out "^4.0.0" - unzip-response "^2.0.1" - url-parse-lax "^1.0.0" - got@^7.1.0: version "7.1.0" resolved "https://registry.yarnpkg.com/got/-/got-7.1.0.tgz#05450fd84094e6bbea56f451a43a9c289166385a" @@ -3664,11 +3493,6 @@ ieee754@^1.1.4: resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.13.tgz#ec168558e95aa181fd87d37f55c32bbcb6708b84" integrity sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg== -ignore-by-default@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/ignore-by-default/-/ignore-by-default-1.0.1.tgz#48ca6d72f6c6a3af00a9ad4ae6876be3889e2b09" - integrity sha1-SMptcvbGo68Aqa1K5odr44ieKwk= - ignore-walk@^3.0.1: version "3.0.3" resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.3.tgz#017e2447184bfeade7c238e4aefdd1e8f95b1e37" @@ -3681,16 +3505,6 @@ immediate@^3.2.3: resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.2.3.tgz#d140fa8f614659bd6541233097ddaac25cdd991c" integrity sha1-0UD6j2FGWb1lQSMwl92qwlzdmRw= -import-lazy@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/import-lazy/-/import-lazy-2.1.0.tgz#05698e3d45c88e8d7e9d92cb0584e77f096f3e43" - integrity sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM= - -imurmurhash@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" - integrity sha1-khi5srkoojixPcT7a21XbyMUU+o= - inflight@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" @@ -3709,7 +3523,7 @@ inherits@2.0.3: resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= -ini@^1.3.4, ini@~1.3.0: +ini@~1.3.0: version "1.3.5" resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== @@ -3754,13 +3568,6 @@ is-binary-path@^1.0.0: dependencies: binary-extensions "^1.0.0" -is-binary-path@~2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" - integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== - dependencies: - binary-extensions "^2.0.0" - is-buffer@^1.1.5: version "1.1.6" resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" @@ -3776,13 +3583,6 @@ is-callable@^1.1.3, is-callable@^1.1.4: resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.4.tgz#1e1adf219e1eeb684d691f9d6a05ff0d30a24d75" integrity sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA== -is-ci@^1.0.10: - version "1.2.1" - resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-1.2.1.tgz#e3779c8ee17fccf428488f6e281187f2e632841c" - integrity sha512-s6tfsaQaQi3JNciBH6shVqEDvhGut0SUXr31ag8Pd8BBbVVlcGfWhpPmEOoM6RJ5TFhbypvf5yyRw/VXW1IiWg== - dependencies: - ci-info "^1.5.0" - is-data-descriptor@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" @@ -3849,11 +3649,6 @@ is-extglob@^1.0.0: resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" integrity sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA= -is-extglob@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" - integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= - is-finite@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa" @@ -3890,36 +3685,16 @@ is-glob@^2.0.0, is-glob@^2.0.1: dependencies: is-extglob "^1.0.0" -is-glob@^4.0.1, is-glob@~4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" - integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== - dependencies: - is-extglob "^2.1.1" - is-hex-prefixed@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz#7d8d37e6ad77e5d127148913c573e082d777f554" integrity sha1-fY035q135dEnFIkTxXPggtd39VQ= -is-installed-globally@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/is-installed-globally/-/is-installed-globally-0.1.0.tgz#0dfd98f5a9111716dd535dda6492f67bf3d25a80" - integrity sha1-Df2Y9akRFxbdU13aZJL2e/PSWoA= - dependencies: - global-dirs "^0.1.0" - is-path-inside "^1.0.0" - is-natural-number@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/is-natural-number/-/is-natural-number-4.0.1.tgz#ab9d76e1db4ced51e35de0c72ebecf09f734cde8" integrity sha1-q5124dtM7VHjXeDHLr7PCfc0zeg= -is-npm@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-npm/-/is-npm-1.0.0.tgz#f2fb63a65e4905b406c86072765a1a4dc793b9f4" - integrity sha1-8vtjpl5JBbQGyGBydloaTceTufQ= - is-number@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" @@ -3939,28 +3714,11 @@ is-number@^4.0.0: resolved "https://registry.yarnpkg.com/is-number/-/is-number-4.0.0.tgz#0026e37f5454d73e356dfe6564699867c6a7f0ff" integrity sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ== -is-number@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" - integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== - -is-obj@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f" - integrity sha1-PkcprB9f3gJc19g6iW2rn09n2w8= - is-object@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/is-object/-/is-object-1.0.1.tgz#8952688c5ec2ffd6b03ecc85e769e02903083470" integrity sha1-iVJojF7C/9awPsyF52ngKQMINHA= -is-path-inside@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-1.0.1.tgz#8ef5b7de50437a3fdca6b4e865ef7aa55cb48036" - integrity sha1-jvW33lBDej/cprToZe96pVy0gDY= - dependencies: - path-is-inside "^1.0.1" - is-plain-obj@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" @@ -3983,11 +3741,6 @@ is-primitive@^2.0.0: resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" integrity sha1-IHurkWOEmcB7Kt8kCkGochADRXU= -is-redirect@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-redirect/-/is-redirect-1.0.0.tgz#1d03dded53bd8db0f30c26e4f95d36fc7c87dc24" - integrity sha1-HQPd7VO9jbDzDCbk+V02/HyH3CQ= - is-regex@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.4.tgz#5517489b547091b0930e095654ced25ee97e9491" @@ -4262,13 +4015,6 @@ kind-of@^6.0.0, kind-of@^6.0.2: resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.2.tgz#01146b36a6218e64e58f3a8d66de5d7fc6f6d051" integrity sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA== -latest-version@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/latest-version/-/latest-version-3.1.0.tgz#a205383fea322b33b5ae3b18abee0dc2f356ee15" - integrity sha1-ogU4P+oyKzO1rjsYq+4NwvNW7hU= - dependencies: - package-json "^4.0.0" - level-codec@~7.0.0: version "7.0.1" resolved "https://registry.yarnpkg.com/level-codec/-/level-codec-7.0.1.tgz#341f22f907ce0f16763f24bddd681e395a0fb8a7" @@ -4371,14 +4117,6 @@ lowercase-keys@^2.0.0: resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-2.0.0.tgz#2603e78b7b4b0006cbca2fbcc8a3202558ac9479" integrity sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA== -lru-cache@^4.0.1: - version "4.1.5" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd" - integrity sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g== - dependencies: - pseudomap "^1.0.2" - yallist "^2.1.2" - ltgt@~2.2.0: version "2.2.1" resolved "https://registry.yarnpkg.com/ltgt/-/ltgt-2.2.1.tgz#f35ca91c493f7b73da0e07495304f17b31f87ee5" @@ -4756,22 +4494,6 @@ node-pre-gyp@^0.12.0: semver "^5.3.0" tar "^4" -nodemon@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/nodemon/-/nodemon-2.0.1.tgz#cec436f8153ad5d3e6c27c304849a06cabea71cc" - integrity sha512-UC6FVhNLXjbbV4UzaXA3wUdbEkUZzLGgMGzmxvWAex5nzib/jhcSHVFlQODdbuUHq8SnnZ4/EABBAbC3RplvPg== - dependencies: - chokidar "^3.2.2" - debug "^3.2.6" - ignore-by-default "^1.0.1" - minimatch "^3.0.4" - pstree.remy "^1.1.7" - semver "^5.7.1" - supports-color "^5.5.0" - touch "^3.1.0" - undefsafe "^2.0.2" - update-notifier "^2.5.0" - nopt@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d" @@ -4780,13 +4502,6 @@ nopt@^4.0.1: abbrev "1" osenv "^0.1.4" -nopt@~1.0.10: - version "1.0.10" - resolved "https://registry.yarnpkg.com/nopt/-/nopt-1.0.10.tgz#6ddd21bd2a31417b92727dd585f8a6f37608ebee" - integrity sha1-bd0hvSoxQXuScn3Vhfim83YI6+4= - dependencies: - abbrev "1" - normalize-path@^2.0.0, normalize-path@^2.0.1: version "2.1.1" resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" @@ -4794,11 +4509,6 @@ normalize-path@^2.0.0, normalize-path@^2.0.1: dependencies: remove-trailing-separator "^1.0.1" -normalize-path@^3.0.0, normalize-path@~3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" - integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== - normalize-url@^4.1.0: version "4.5.0" resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-4.5.0.tgz#453354087e6ca96957bd8f5baf753f5982142129" @@ -4817,13 +4527,6 @@ npm-packlist@^1.1.6: ignore-walk "^3.0.1" npm-bundled "^1.0.1" -npm-run-path@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" - integrity sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8= - dependencies: - path-key "^2.0.0" - npmlog@^4.0.2: version "4.1.2" resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" @@ -5051,16 +4754,6 @@ p-try@^2.0.0: resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== -package-json@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/package-json/-/package-json-4.0.1.tgz#8869a0401253661c4c4ca3da6c2121ed555f5eed" - integrity sha1-iGmgQBJTZhxMTKPabCEh7VVfXu0= - dependencies: - got "^6.7.1" - registry-auth-token "^3.0.1" - registry-url "^3.0.3" - semver "^5.1.0" - pako@^1.0.4: version "1.0.10" resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.10.tgz#4328badb5086a426aa90f541977d4955da5c9732" @@ -5113,16 +4806,6 @@ path-is-absolute@^1.0.0, path-is-absolute@^1.0.1: resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= -path-is-inside@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" - integrity sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM= - -path-key@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" - integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= - path-parse@^1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" @@ -5159,11 +4842,6 @@ performance-now@^2.1.0: resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= -picomatch@^2.0.4: - version "2.1.1" - resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.1.1.tgz#ecdfbea7704adb5fe6fb47f9866c4c0e15e905c5" - integrity sha512-OYMyqkKzK7blWO/+XZYP6w8hH0LDvkBvdvKukti+7kqYFCiEAk+gI3DWnryapc0Dau05ugGTy0foQ6mqn4AHYA== - pify@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" @@ -5247,21 +4925,11 @@ prr@~1.0.1: resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" integrity sha1-0/wRS6BplaRexok/SEzrHXj19HY= -pseudomap@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" - integrity sha1-8FKijacOYYkX7wqKw0wa5aaChrM= - psl@^1.1.24: version "1.4.0" resolved "https://registry.yarnpkg.com/psl/-/psl-1.4.0.tgz#5dd26156cdb69fa1fdb8ab1991667d3f80ced7c2" integrity sha512-HZzqCGPecFLyoRj5HLfuDSKYTJkAfB5thKBIkRHtGjWwY7p1dAyveIbXIq4tO0KYfDF2tHqPUgY9SDnGm00uFw== -pstree.remy@^1.1.7: - version "1.1.7" - resolved "https://registry.yarnpkg.com/pstree.remy/-/pstree.remy-1.1.7.tgz#c76963a28047ed61542dc361aa26ee55a7fa15f3" - integrity sha512-xsMgrUwRpuGskEzBFkH8NmTimbZ5PcPup0LA8JJkHIm2IMUbQcpo3yeLNWVrufEYjh8YwtSVh0xz6UeWc5Oh5A== - public-encrypt@^4.0.0: version "4.0.3" resolved "https://registry.yarnpkg.com/public-encrypt/-/public-encrypt-4.0.3.tgz#4fcc9d77a07e48ba7527e7cbe0de33d0701331e0" @@ -5360,7 +5028,7 @@ raw-body@2.4.0: iconv-lite "0.4.24" unpipe "1.0.0" -rc@^1.0.1, rc@^1.1.6, rc@^1.2.7: +rc@^1.2.7: version "1.2.8" resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== @@ -5412,13 +5080,6 @@ readdirp@^2.0.0: micromatch "^3.1.10" readable-stream "^2.0.2" -readdirp@~3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.2.0.tgz#c30c33352b12c96dfb4b895421a49fd5a9593839" - integrity sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ== - dependencies: - picomatch "^2.0.4" - regenerate@^1.2.1: version "1.4.0" resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.0.tgz#4a856ec4b56e4077c557589cae85e7a4c8869a11" @@ -5472,21 +5133,6 @@ regexpu-core@^2.0.0: regjsgen "^0.2.0" regjsparser "^0.1.4" -registry-auth-token@^3.0.1: - version "3.4.0" - resolved "https://registry.yarnpkg.com/registry-auth-token/-/registry-auth-token-3.4.0.tgz#d7446815433f5d5ed6431cd5dca21048f66b397e" - integrity sha512-4LM6Fw8eBQdwMYcES4yTnn2TqIasbXuwDx3um+QRs7S55aMKCBKBxvPXl2RiUjHwuJLTyYfxSpmfSAjQpcuP+A== - dependencies: - rc "^1.1.6" - safe-buffer "^5.0.1" - -registry-url@^3.0.3: - version "3.1.0" - resolved "https://registry.yarnpkg.com/registry-url/-/registry-url-3.1.0.tgz#3d4ef870f73dde1d77f0cf9a381432444e174942" - integrity sha1-PU74cPc93h138M+aOBQyRE4XSUI= - dependencies: - rc "^1.0.1" - regjsgen@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.2.0.tgz#6c016adeac554f75823fe37ac05b92d5a4edb1f7" @@ -5720,19 +5366,12 @@ semaphore@>=1.0.1, semaphore@^1.0.3: resolved "https://registry.yarnpkg.com/semaphore/-/semaphore-1.1.0.tgz#aaad8b86b20fe8e9b32b16dc2ee682a8cd26a8aa" integrity sha512-O4OZEaNtkMd/K0i6js9SL+gqy0ZCBMgUvlSqHKi4IBdjhe7wB8pwztUk1BbZ1fmrvpwFrPbHzqd2w5pTcJH6LA== -semver-diff@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/semver-diff/-/semver-diff-2.1.0.tgz#4bbb8437c8d37e4b0cf1a68fd726ec6d645d6d36" - integrity sha1-S7uEN8jTfksM8aaP1ybsbWRdbTY= - dependencies: - semver "^5.0.3" - semver@6.2.0: version "6.2.0" resolved "https://registry.yarnpkg.com/semver/-/semver-6.2.0.tgz#4d813d9590aaf8a9192693d6c85b9344de5901db" integrity sha512-jdFC1VdUGT/2Scgbimf7FSx9iJLXoqfglSF+gJeuNWVpiE37OIbc1jywR/GJyFdz3mnkz2/id0L0J/cr0izR5A== -semver@^5.0.3, semver@^5.1.0, semver@^5.3.0, semver@^5.6.0, semver@^5.7.0, semver@^5.7.1: +semver@^5.3.0, semver@^5.6.0, semver@^5.7.0: version "5.7.1" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== @@ -5837,19 +5476,7 @@ sha3@^1.2.2: dependencies: nan "2.13.2" -shebang-command@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" - integrity sha1-RKrGW2lbAzmJaMOfNj/uXer98eo= - dependencies: - shebang-regex "^1.0.0" - -shebang-regex@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" - integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= - -signal-exit@^3.0.0, signal-exit@^3.0.2: +signal-exit@^3.0.0: version "3.0.2" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" integrity sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0= @@ -5985,7 +5612,7 @@ string-width@^1.0.1: is-fullwidth-code-point "^1.0.0" strip-ansi "^3.0.0" -"string-width@^1.0.2 || 2", string-width@^2.0.0, string-width@^2.1.1: +"string-width@^1.0.2 || 2": version "2.1.1" resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== @@ -6067,11 +5694,6 @@ strip-dirs@^2.0.0: dependencies: is-natural-number "^4.0.1" -strip-eof@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" - integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8= - strip-hex-prefix@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz#0c5f155fef1151373377de9dbb588da05500e36f" @@ -6103,7 +5725,7 @@ supports-color@^2.0.0: resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" integrity sha1-U10EXOa2Nj+kARcIRimZXp3zJMc= -supports-color@^5.3.0, supports-color@^5.5.0: +supports-color@^5.3.0: version "5.5.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== @@ -6173,13 +5795,6 @@ tar@^4, tar@^4.0.2: safe-buffer "^5.1.2" yallist "^3.0.3" -term-size@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/term-size/-/term-size-1.2.0.tgz#458b83887f288fc56d6fffbfad262e26638efa69" - integrity sha1-RYuDiH8oj8Vtb/+/rSYuJmOO+mk= - dependencies: - execa "^0.7.0" - through2@^2.0.3: version "2.0.5" resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd" @@ -6233,13 +5848,6 @@ to-regex-range@^2.1.0: is-number "^3.0.0" repeat-string "^1.6.1" -to-regex-range@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" - integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== - dependencies: - is-number "^7.0.0" - to-regex@^3.0.1, to-regex@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce" @@ -6255,13 +5863,6 @@ toidentifier@1.0.0: resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553" integrity sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw== -touch@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/touch/-/touch-3.1.0.tgz#fe365f5f75ec9ed4e56825e0bb76d24ab74af83b" - integrity sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA== - dependencies: - nopt "~1.0.10" - tough-cookie@~2.4.3: version "2.4.3" resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.4.3.tgz#53f36da3f47783b0925afa06ff9f3b165280f781" @@ -6317,7 +5918,7 @@ ts-invariant@^0.4.0: dependencies: tslib "^1.9.3" -tslib@^1.9.3: +tslib@^1.10.0, tslib@^1.9.3: version "1.10.0" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a" integrity sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ== @@ -6382,13 +5983,6 @@ unbzip2-stream@^1.0.9: buffer "^5.2.1" through "^2.3.8" -undefsafe@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/undefsafe/-/undefsafe-2.0.2.tgz#225f6b9e0337663e0d8e7cfd686fc2836ccace76" - integrity sha1-Il9rngM3Zj4Njnz9aG/Cg2zKznY= - dependencies: - debug "^2.2.0" - underscore@1.9.1, underscore@^1.8.3: version "1.9.1" resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.9.1.tgz#06dce34a0e68a7babc29b365b8e74b8925203961" @@ -6404,13 +5998,6 @@ union-value@^1.0.0: is-extendable "^0.1.1" set-value "^2.0.1" -unique-string@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/unique-string/-/unique-string-1.0.0.tgz#9e1057cca851abb93398f8b33ae187b99caec11a" - integrity sha1-nhBXzKhRq7kzmPizOuGHuZyuwRo= - dependencies: - crypto-random-string "^1.0.0" - universalify@^0.1.0: version "0.1.2" resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" @@ -6434,27 +6021,6 @@ unset-value@^1.0.0: has-value "^0.3.1" isobject "^3.0.0" -unzip-response@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/unzip-response/-/unzip-response-2.0.1.tgz#d2f0f737d16b0615e72a6935ed04214572d56f97" - integrity sha1-0vD3N9FrBhXnKmk17QQhRXLVb5c= - -update-notifier@^2.5.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/update-notifier/-/update-notifier-2.5.0.tgz#d0744593e13f161e406acb1d9408b72cad08aff6" - integrity sha512-gwMdhgJHGuj/+wHJJs9e6PcCszpxR1b236igrOkUofGhqJuG+amlIKwApH1IW1WWl7ovZxsX49lMBWLxSdm5Dw== - dependencies: - boxen "^1.2.1" - chalk "^2.0.1" - configstore "^3.0.0" - import-lazy "^2.1.0" - is-ci "^1.0.10" - is-installed-globally "^0.1.0" - is-npm "^1.0.0" - latest-version "^3.0.0" - semver-diff "^2.0.0" - xdg-basedir "^3.0.0" - uri-js@^4.2.2: version "4.2.2" resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0" @@ -7304,7 +6870,7 @@ which-module@^2.0.0: resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= -which@1.3.1, which@^1.2.9: +which@1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== @@ -7318,13 +6884,6 @@ wide-align@1.1.3, wide-align@^1.1.0: dependencies: string-width "^1.0.2 || 2" -widest-line@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/widest-line/-/widest-line-2.0.1.tgz#7438764730ec7ef4381ce4df82fb98a53142a3fc" - integrity sha512-Ba5m9/Fa4Xt9eb2ELXt77JxVDV8w7qQrH0zS/TWSJdLyAwQjWoOzpzj5lwVftDz6n/EOu3tNACS84v509qwnJA== - dependencies: - string-width "^2.1.1" - wrap-ansi@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-5.1.0.tgz#1fd1f67235d5b6d0fee781056001bfb694c03b09" @@ -7339,15 +6898,6 @@ wrappy@1: resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= -write-file-atomic@^2.0.0: - version "2.4.3" - resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.4.3.tgz#1fd2e9ae1df3e75b8d8c367443c692d4ca81f481" - integrity sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ== - dependencies: - graceful-fs "^4.1.11" - imurmurhash "^0.1.4" - signal-exit "^3.0.2" - ws@^3.0.0: version "3.3.3" resolved "https://registry.yarnpkg.com/ws/-/ws-3.3.3.tgz#f1cf84fe2d5e901ebce94efaece785f187a228f2" @@ -7364,11 +6914,6 @@ ws@^5.1.1: dependencies: async-limiter "~1.0.0" -xdg-basedir@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/xdg-basedir/-/xdg-basedir-3.0.0.tgz#496b2cc109eca8dbacfe2dc72b603c17c5870ad4" - integrity sha1-SWsswQnsqNus/i3HK2A8F8WHCtQ= - xhr-request-promise@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/xhr-request-promise/-/xhr-request-promise-0.1.2.tgz#343c44d1ee7726b8648069682d0f840c83b4261d" @@ -7433,11 +6978,6 @@ yaeti@^0.0.6: resolved "https://registry.yarnpkg.com/yaeti/-/yaeti-0.0.6.tgz#f26f484d72684cf42bedfb76970aa1608fbf9577" integrity sha1-8m9ITXJoTPQr7ft2lwqhYI+/lXc= -yallist@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" - integrity sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI= - yallist@^3.0.0, yallist@^3.0.3: version "3.1.1" resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" From 7d76aba2d4efc6bbbfe6d3ba49064ac9b563cca1 Mon Sep 17 00:00:00 2001 From: Patrick Gallagher Date: Tue, 7 Jan 2020 01:55:58 -0500 Subject: [PATCH 09/13] fix toLowerCase() bug --- src/RTokenAnalytics.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/RTokenAnalytics.js b/src/RTokenAnalytics.js index deb69ea..caed6e1 100644 --- a/src/RTokenAnalytics.js +++ b/src/RTokenAnalytics.js @@ -4,7 +4,6 @@ const axios = require('axios'); const fetch = require('node-fetch'); const { createHttpLink } = require('apollo-link-http'); -require('babel-polyfill'); // const ethers = require('ethers'); const BigNumber = require('bignumber.js'); @@ -163,12 +162,15 @@ class RTokenAnalytics { } } `, - variables: { from: addressFrom, to: addressTo } + variables: { + from: addressFrom.toLowerCase(), + to: addressTo.toLowerCase() + } }; let res = await makePromise(execute(this.rTokenLink, operation)); let interestSent = 0; let value = new BigNumber(0); - + if (res.data.account.loansOwned.length < 1) return 0; const loan = res.data.account.loansOwned[0]; for (let index = 0; index < loan.transfers.length; index++) { const transfer = loan.transfers[index]; From 5c557f5b5c50c96777f8b54e956a058b245cc428 Mon Sep 17 00:00:00 2001 From: Patrick Gallagher Date: Tue, 7 Jan 2020 01:59:55 -0500 Subject: [PATCH 10/13] minor edit --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 28d7c99..ac2ef2a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # rToken Analytics -This library provides easy tools for getting data about specific users of rToken. +This library provides tools for getting rDAI and rToken data into your dapp. | Feature | Status | Notes | | ---------------------------- | ------------------ | ------------------------------------------------------------------------------- | From c4511494037aabf5c0af0262b71631f1778f6348 Mon Sep 17 00:00:00 2001 From: Patrick Gallagher Date: Tue, 7 Jan 2020 16:01:41 -0500 Subject: [PATCH 11/13] Allow calculating for only one transfer --- src/RTokenAnalytics.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/RTokenAnalytics.js b/src/RTokenAnalytics.js index caed6e1..0f92b79 100644 --- a/src/RTokenAnalytics.js +++ b/src/RTokenAnalytics.js @@ -179,6 +179,18 @@ class RTokenAnalytics { // If this is the first transfer, skip it if (index === 0) { value = value.plus(transfer.value); + if (loan.transfers.length === 1) { + const start = transfer.transaction.timestamp; + const date = new Date(); + const now = Math.round(date.getTime() / 1000); + rate = await this._getCompoundRate(start); + interestSent += this._calculateInterestOverTime( + value, + start, + now, + rate + ); + } } // If this is the last transfer, add the accumulated interest until the current time else if (index === loan.transfers.length - 1) { From 4f0554fb9c8e98402170b12b8353172cd863c662 Mon Sep 17 00:00:00 2001 From: Patrick Gallagher Date: Tue, 7 Jan 2020 16:02:00 -0500 Subject: [PATCH 12/13] v0.0.8 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7522e5f..c569261 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rtoken-analytics", - "version": "0.0.7", + "version": "0.0.8", "description": "Data and analytics utility for rToken", "main": "src/index.js", "repository": "git@github.com:rtoken-project/rtoken-analytics.git", From 99e7a4f468ebfd3eaef528ebeb4bed110095190a Mon Sep 17 00:00:00 2001 From: Patrick Gallagher Date: Tue, 7 Jan 2020 16:12:17 -0500 Subject: [PATCH 13/13] v0.0.9 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c569261..42e7b93 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rtoken-analytics", - "version": "0.0.8", + "version": "0.0.9", "description": "Data and analytics utility for rToken", "main": "src/index.js", "repository": "git@github.com:rtoken-project/rtoken-analytics.git",