diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..e593ce247 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,8 @@ +version: 2 +updates: +- package-ecosystem: npm + directory: "/" + schedule: + interval: daily + time: '03:00' + timezone: Europe/Berlin diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..a26af5e7f --- /dev/null +++ b/.travis.yml @@ -0,0 +1,27 @@ +dist: xenial +sudo: required +language: node_js +node_js: + - '12' + +services: + - docker + +cache: npm + +matrix: + fast_finish: true + +before_install: + - npm install -g npm + - npm install -g ganache-cli@~6.5.1 + +before_script: + - ganache-cli --port 18545 > ganache-cli.log & + +script: + - npm run lint + - npm run build + +notifications: + email: false \ No newline at end of file diff --git a/README.md b/README.md index 58a6564d2..8239ee1b6 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ [![banner](https://raw.githubusercontent.com/oceanprotocol/art/master/github/repo-banner%402x.png)](https://oceanprotocol.com) +|[![Build Status](https://travis-ci.com/oceanprotocol/lib-js.svg?token=soMi2nNfCZq19zS1Rx4i&branch=develop)](https://travis-ci.com/oceanprotocol/lib-js)

Ocean-js

diff --git a/README_marketplace_flow.md b/README_marketplace_flow.md new file mode 100644 index 000000000..725da0bf6 --- /dev/null +++ b/README_marketplace_flow.md @@ -0,0 +1,154 @@ + # ocean-lib + + +`ocean-lib-js` is a Javascript/Typescript library to privately & securely publish, exchange, and consume data. With it, you can: +* **Publish** data services: static data, streaming data, or compute-to-data. Every data service gets its own [ERC20](https://github.com/ethereum/EIPs/blob/7f4f0377730f5fc266824084188cc17cf246932e/EIPS/eip-20.md) token. +* **Mint** data tokens for a given data service +* **Transfer** data tokens to another owner +* **Consume** data tokens, to access the service + +`ocean-lib-js` is part of the [Ocean Protocol](www.oceanprotocol.com) toolset. + +# Installation +``` +// ES6 +import { Ocean, Logger } from '@oceanprotocol/lib' + +// ES2015 +const { Ocean, Logger } = require('@oceanprotocol/lib') + +``` + +# Quickstart + +This section describes a marketplace flow with multiple services + +Here's the steps. +1. Alice publishes a dataset (= publishes a datatoken contract) +1. Alice mints 100 tokens +1. Alice transfers 1 token to Bob +1. Bob consumes dataset + +Let's go through each of these in detail. + + +## 1. Alice hosts the dataset + +A locally providerService ,metadatastore and marketplace are required: + +Run the providerService and metadatastore: +``` +docker run @oceanprotocol/provider-py:latest +docker run @oceanprotocol/aquarius:latest +docker run @oceanprotocol/marketplace:latest +``` + + +## 2. Alice publishes a dataset (= publishes a datatoken contract) + +For now, you're Alice:) Let's proceed. + + +```javascript +const { Ocean, Logger } = require('@oceanprotocol/lib') + +const marketPlaceAddress='0x9876' +//Alice's config +const config={ + network: 'rinkeby', + privateKey:'8da4ef21b864d2cc526dbdb2a120bd2874c36c9d0a1fb7f8c63d7f7a8b41de8f', + metadataStoreURI: 'localhost:5000', + providerUri: 'localhost:8030' +} +const ocean = Ocean(alice_config) +const account = await ocean.accounts.list()[0] + + +const myToken = ocean.datatoken.create(config.metadataStoreURI,account) +//Alice allows MarketPlace to transfer 20 DT +myToken.approve(marketPlaceAddress,20) + +const dt_address=myToken.getAddress() + +//create asset 1 +const metaData={ + "did":"did:op:1234", + "owner":"0xaaaaa", + "dtAddress":dt_address, + "name":"Asset1", + "services="[ + { "id":0, "serviceEndpoint":"providerUri", "type":"download", "dtCost":10, "timeout":0, + "files":[{"url":"http://example.net"},{"url":"http://example.com" }] + }, + { "id":1, "type":"compute", "serviceEndpoint":"providerUri", "dtCost":1,"timeout":3600}, + { "id":2, "type":"compute", "serviceEndpoint":"providerUri", "dtCost":2, "timeout":7200 }, + ] +} +//create will encrypt the URLs using publisher and update the ddo before pushing to aquarius +//create will require that metaData.dtAddress is a valid DT Contract address +const asset = ocean.assets.create(metaData,account) +const did = asset.did +``` + + + +## 3. Alice mints 100 tokens + +```javascript +myToken.mint(100) +``` + +## 4. Exchange of value : How Bob gets DT +```javascript +const bob_config={ + network: 'rinkeby', + privateKey:'1234ef21b864d2cc526dbdb2a120bd2874c36c9d0a1fb7f8c63d7f7a8b41de8f' + marketPlaceUri: 'localhost:3000' +} +const bob_ocean = Ocean(bob_config) +const bob_account = await bob_ocean.accounts.list()[0] + +const asset = ocean.assets.resolve(did) +const serviceIndex = assets.findServiceByType('compute') +const num_dt_needed = assets.getDtCost(serviceIndex) +//Bob need to buy num_dt_needed . DTAddress = asset.dtAddress + +const {price, currency } = ocean.marketplace.getPrice(num_dt_needed,asset.dtAddress) +bob_account.approve(price, currency, marketPlaceAddress) +ocean.marketplace.buy(num_dt_needed,asset.dtAddress) +``` + +## 5. Bob consumes dataset + +Now, you are Bob :) + + +```javascript + +const bob_config={ + network: 'rinkeby', + privateKey:'1234ef21b864d2cc526dbdb2a120bd2874c36c9d0a1fb7f8c63d7f7a8b41de8f' +} +const bob_ocean = Ocean(bob_config) + + +const account = await bob_ocean.accounts.list()[0] +const asset = ocean.assets.getFromDID(did) +const serviceIndex = assets.findServiceByType('compute') + +export const rawAlgoMeta = { + rawcode: `console.log('Hello world'!)`, + format: 'docker-image', + version: '0.1', + container: { + entrypoint: 'node $ALGO', + image: 'node', + tag: '10' + } +} + +const computeJob=asset.StartCompute(serviceIndex, rawAlgoMeta, account) + +``` + + diff --git a/README_simpleflow.md b/README_simpleflow.md new file mode 100644 index 000000000..51f44b4ab --- /dev/null +++ b/README_simpleflow.md @@ -0,0 +1,102 @@ + +# ocean-lib + +`ocean-lib-js` is a Javascript/Typescript library to privately & securely publish, exchange, and consume data. With it, you can: +* **Publish** data services: static data, streaming data, or compute-to-data. Every data service gets its own [ERC20](https://github.com/ethereum/EIPs/blob/7f4f0377730f5fc266824084188cc17cf246932e/EIPS/eip-20.md) token. +* **Mint** data tokens for a given data service +* **Transfer** data tokens to another owner +* **Consume** data tokens, to access the service + +`ocean-lib-js` is part of the [Ocean Protocol](www.oceanprotocol.com) toolset. + +# Installation +``` +// ES6 +import { Ocean, Logger } from '@oceanprotocol/lib' + +// ES2015 +const { Ocean, Logger } = require('@oceanprotocol/lib') + +``` + +# Quickstart + +This section describes a flow with the simplest transfer of value, for static data. + +Here's the steps. +1. Alice publishes a dataset (= publishes a datatoken contract) +1. Alice mints 100 tokens +1. Alice transfers 1 token to Bob +1. Bob consumes dataset + +Let's go through each of these in detail. + + +## 1. Alice publishes a dataset (= publishes a datatoken contract) + +For now, you're Alice:) Let's proceed. + + +```javascript +const { Ocean, Logger } = require('@oceanprotocol/lib') +const config={ + network: 'rinkeby', + privateKey:'8da4ef21b864d2cc526dbdb2a120bd2874c36c9d0a1fb7f8c63d7f7a8b41de8f', +} +const ocean = Ocean(alice_config) +const account = await ocean.accounts.list()[0] +const myToken = ocean.datatoken.create('localhost:8030',account) +const dt_address=myToken.getAddress() +console.log(dt_address) +``` + +## 2. Alice hosts the dataset + +A locally providerService is required, which will serve just one file for this demo. +Let's create the file to be shared: +``` +touch /var/mydata/myFolder1/file +```` + +Run the providerService: +(given that ERC20 contract address from the above is 0x1234) + +``` +ENV DT="{'0x1234':'/var/mydata/myFolder1'}" +docker run @oceanprotocol/provider-py -e CONFIG=DT +``` + + +## 3. Alice mints 100 tokens + +```javascript +myToken.mint(100) +``` + +## 4. Alice transfers 1 token to Bob + +```javascript +myToken.transfer(1,BobAddress) +``` + +## 5. Bob consumes dataset + +Now, you are Bob :) + + +```javascript + +const bob_config={ + network: 'rinkeby', + privateKey:'1234ef21b864d2cc526dbdb2a120bd2874c36c9d0a1fb7f8c63d7f7a8b41de8f' +} +const bob_ocean = Ocean(bob_config) + + +const account = await bob_ocean.accounts.list()[0] +const asset=bob_ocean.assets.getFromDTAddress(dt_address)[0] +const file=asset.download(account) + +``` + + diff --git a/package-lock.json b/package-lock.json index 64c763bcc..538b31a0f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,19 +14,19 @@ } }, "@babel/core": { - "version": "7.9.6", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.9.6.tgz", - "integrity": "sha512-nD3deLvbsApbHAHttzIssYqgb883yU/d9roe4RZymBCDaZryMJDbptVpEpeQuRh4BJ+SYI8le9YGxKvFEvl1Wg==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.8.3", - "@babel/generator": "^7.9.6", - "@babel/helper-module-transforms": "^7.9.0", - "@babel/helpers": "^7.9.6", - "@babel/parser": "^7.9.6", - "@babel/template": "^7.8.6", - "@babel/traverse": "^7.9.6", - "@babel/types": "^7.9.6", + "version": "7.10.2", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.10.2.tgz", + "integrity": "sha512-KQmV9yguEjQsXqyOUGKjS4+3K8/DlOCE2pZcq4augdQmtTy5iv5EHtmMSJ7V4c1BIPjuwtZYqYLCq9Ga+hGBRQ==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.10.1", + "@babel/generator": "^7.10.2", + "@babel/helper-module-transforms": "^7.10.1", + "@babel/helpers": "^7.10.1", + "@babel/parser": "^7.10.2", + "@babel/template": "^7.10.1", + "@babel/traverse": "^7.10.1", + "@babel/types": "^7.10.2", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.1", @@ -37,6 +37,67 @@ "source-map": "^0.5.0" }, "dependencies": { + "@babel/code-frame": { + "version": "7.10.1", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.1.tgz", + "integrity": "sha512-IGhtTmpjGbYzcEDOw7DcQtbQSXcG9ftmAXtWTu9V936vDye4xjjekktFAtgZsWpzTj/X01jocB46mTywm/4SZw==", + "dev": true, + "requires": { + "@babel/highlight": "^7.10.1" + } + }, + "@babel/helper-validator-identifier": { + "version": "7.10.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.1.tgz", + "integrity": "sha512-5vW/JXLALhczRCWP0PnFDMCJAchlBvM7f4uk/jXritBnIa6E1KmqmtrS3yn1LAnxFBypQ3eneLuXjsnfQsgILw==", + "dev": true + }, + "@babel/highlight": { + "version": "7.10.1", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.1.tgz", + "integrity": "sha512-8rMof+gVP8mxYZApLF/JgNDAkdKa+aJt3ZYxF8z6+j/hpeXL7iMsKCPHa2jNMHu/qqBwzQF4OHNoYi8dMA/rYg==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.10.1", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + } + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, "debug": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", @@ -46,6 +107,12 @@ "ms": "^2.1.1" } }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, "json5": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.3.tgz", @@ -72,16 +139,25 @@ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } } } }, "@babel/generator": { - "version": "7.9.6", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.9.6.tgz", - "integrity": "sha512-+htwWKJbH2bL72HRluF8zumBxzuX0ZZUFl3JLNyoUjM/Ho8wnVpPXM6aUz8cfKDqQ/h7zHqKt4xzJteUosckqQ==", + "version": "7.10.2", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.10.2.tgz", + "integrity": "sha512-AxfBNHNu99DTMvlUPlt1h2+Hn7knPpH5ayJ8OqDWSeLld+Fi2AYBTC/IejWDM9Edcii4UzZRCsbUt0WlSDsDsA==", "dev": true, "requires": { - "@babel/types": "^7.9.6", + "@babel/types": "^7.10.2", "jsesc": "^2.5.1", "lodash": "^4.17.13", "source-map": "^0.5.0" @@ -102,96 +178,96 @@ } }, "@babel/helper-function-name": { - "version": "7.9.5", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.9.5.tgz", - "integrity": "sha512-JVcQZeXM59Cd1qanDUxv9fgJpt3NeKUaqBqUEvfmQ+BCOKq2xUgaWZW2hr0dkbyJgezYuplEoh5knmrnS68efw==", + "version": "7.10.1", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.1.tgz", + "integrity": "sha512-fcpumwhs3YyZ/ttd5Rz0xn0TpIwVkN7X0V38B9TWNfVF42KEkhkAAuPCQ3oXmtTRtiPJrmZ0TrfS0GKF0eMaRQ==", "dev": true, "requires": { - "@babel/helper-get-function-arity": "^7.8.3", - "@babel/template": "^7.8.3", - "@babel/types": "^7.9.5" + "@babel/helper-get-function-arity": "^7.10.1", + "@babel/template": "^7.10.1", + "@babel/types": "^7.10.1" } }, "@babel/helper-get-function-arity": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.8.3.tgz", - "integrity": "sha512-FVDR+Gd9iLjUMY1fzE2SR0IuaJToR4RkCDARVfsBBPSP53GEqSFjD8gNyxg246VUyc/ALRxFaAK8rVG7UT7xRA==", + "version": "7.10.1", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.1.tgz", + "integrity": "sha512-F5qdXkYGOQUb0hpRaPoetF9AnsXknKjWMZ+wmsIRsp5ge5sFh4c3h1eH2pRTTuy9KKAA2+TTYomGXAtEL2fQEw==", "dev": true, "requires": { - "@babel/types": "^7.8.3" + "@babel/types": "^7.10.1" } }, "@babel/helper-member-expression-to-functions": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.8.3.tgz", - "integrity": "sha512-fO4Egq88utkQFjbPrSHGmGLFqmrshs11d46WI+WZDESt7Wu7wN2G2Iu+NMMZJFDOVRHAMIkB5SNh30NtwCA7RA==", + "version": "7.10.1", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.10.1.tgz", + "integrity": "sha512-u7XLXeM2n50gb6PWJ9hoO5oO7JFPaZtrh35t8RqKLT1jFKj9IWeD1zrcrYp1q1qiZTdEarfDWfTIP8nGsu0h5g==", "dev": true, "requires": { - "@babel/types": "^7.8.3" + "@babel/types": "^7.10.1" } }, "@babel/helper-module-imports": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.8.3.tgz", - "integrity": "sha512-R0Bx3jippsbAEtzkpZ/6FIiuzOURPcMjHp+Z6xPe6DtApDJx+w7UYyOLanZqO8+wKR9G10s/FmHXvxaMd9s6Kg==", + "version": "7.10.1", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.10.1.tgz", + "integrity": "sha512-SFxgwYmZ3HZPyZwJRiVNLRHWuW2OgE5k2nrVs6D9Iv4PPnXVffuEHy83Sfx/l4SqF+5kyJXjAyUmrG7tNm+qVg==", "dev": true, "requires": { - "@babel/types": "^7.8.3" + "@babel/types": "^7.10.1" } }, "@babel/helper-module-transforms": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.9.0.tgz", - "integrity": "sha512-0FvKyu0gpPfIQ8EkxlrAydOWROdHpBmiCiRwLkUiBGhCUPRRbVD2/tm3sFr/c/GWFrQ/ffutGUAnx7V0FzT2wA==", + "version": "7.10.1", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.10.1.tgz", + "integrity": "sha512-RLHRCAzyJe7Q7sF4oy2cB+kRnU4wDZY/H2xJFGof+M+SJEGhZsb+GFj5j1AD8NiSaVBJ+Pf0/WObiXu/zxWpFg==", "dev": true, "requires": { - "@babel/helper-module-imports": "^7.8.3", - "@babel/helper-replace-supers": "^7.8.6", - "@babel/helper-simple-access": "^7.8.3", - "@babel/helper-split-export-declaration": "^7.8.3", - "@babel/template": "^7.8.6", - "@babel/types": "^7.9.0", + "@babel/helper-module-imports": "^7.10.1", + "@babel/helper-replace-supers": "^7.10.1", + "@babel/helper-simple-access": "^7.10.1", + "@babel/helper-split-export-declaration": "^7.10.1", + "@babel/template": "^7.10.1", + "@babel/types": "^7.10.1", "lodash": "^4.17.13" } }, "@babel/helper-optimise-call-expression": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.8.3.tgz", - "integrity": "sha512-Kag20n86cbO2AvHca6EJsvqAd82gc6VMGule4HwebwMlwkpXuVqrNRj6CkCV2sKxgi9MyAUnZVnZ6lJ1/vKhHQ==", + "version": "7.10.1", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.10.1.tgz", + "integrity": "sha512-a0DjNS1prnBsoKx83dP2falChcs7p3i8VMzdrSbfLhuQra/2ENC4sbri34dz/rWmDADsmF1q5GbfaXydh0Jbjg==", "dev": true, "requires": { - "@babel/types": "^7.8.3" + "@babel/types": "^7.10.1" } }, "@babel/helper-replace-supers": { - "version": "7.9.6", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.9.6.tgz", - "integrity": "sha512-qX+chbxkbArLyCImk3bWV+jB5gTNU/rsze+JlcF6Nf8tVTigPJSI1o1oBow/9Resa1yehUO9lIipsmu9oG4RzA==", + "version": "7.10.1", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.10.1.tgz", + "integrity": "sha512-SOwJzEfpuQwInzzQJGjGaiG578UYmyi2Xw668klPWV5n07B73S0a9btjLk/52Mlcxa+5AdIYqws1KyXRfMoB7A==", "dev": true, "requires": { - "@babel/helper-member-expression-to-functions": "^7.8.3", - "@babel/helper-optimise-call-expression": "^7.8.3", - "@babel/traverse": "^7.9.6", - "@babel/types": "^7.9.6" + "@babel/helper-member-expression-to-functions": "^7.10.1", + "@babel/helper-optimise-call-expression": "^7.10.1", + "@babel/traverse": "^7.10.1", + "@babel/types": "^7.10.1" } }, "@babel/helper-simple-access": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.8.3.tgz", - "integrity": "sha512-VNGUDjx5cCWg4vvCTR8qQ7YJYZ+HBjxOgXEl7ounz+4Sn7+LMD3CFrCTEU6/qXKbA2nKg21CwhhBzO0RpRbdCw==", + "version": "7.10.1", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.10.1.tgz", + "integrity": "sha512-VSWpWzRzn9VtgMJBIWTZ+GP107kZdQ4YplJlCmIrjoLVSi/0upixezHCDG8kpPVTBJpKfxTH01wDhh+jS2zKbw==", "dev": true, "requires": { - "@babel/template": "^7.8.3", - "@babel/types": "^7.8.3" + "@babel/template": "^7.10.1", + "@babel/types": "^7.10.1" } }, "@babel/helper-split-export-declaration": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.8.3.tgz", - "integrity": "sha512-3x3yOeyBhW851hroze7ElzdkeRXQYQbFIb7gLK1WQYsw2GWDay5gAJNw1sWJ0VFP6z5J1whqeXH/WCdCjZv6dA==", + "version": "7.10.1", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.10.1.tgz", + "integrity": "sha512-UQ1LVBPrYdbchNhLwj6fetj46BcFwfS4NllJo/1aJsT+1dLTEnXJL0qHqtY7gPzF8S2fXBJamf1biAXV3X077g==", "dev": true, "requires": { - "@babel/types": "^7.8.3" + "@babel/types": "^7.10.1" } }, "@babel/helper-validator-identifier": { @@ -201,14 +277,14 @@ "dev": true }, "@babel/helpers": { - "version": "7.9.6", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.9.6.tgz", - "integrity": "sha512-tI4bUbldloLcHWoRUMAj4g1bF313M/o6fBKhIsb3QnGVPwRm9JsNf/gqMkQ7zjqReABiffPV6RWj7hEglID5Iw==", + "version": "7.10.1", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.10.1.tgz", + "integrity": "sha512-muQNHF+IdU6wGgkaJyhhEmI54MOZBKsFfsXFhboz1ybwJ1Kl7IHlbm2a++4jwrmY5UYsgitt5lfqo1wMFcHmyw==", "dev": true, "requires": { - "@babel/template": "^7.8.3", - "@babel/traverse": "^7.9.6", - "@babel/types": "^7.9.6" + "@babel/template": "^7.10.1", + "@babel/traverse": "^7.10.1", + "@babel/types": "^7.10.1" } }, "@babel/highlight": { @@ -275,9 +351,9 @@ } }, "@babel/parser": { - "version": "7.9.6", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.9.6.tgz", - "integrity": "sha512-AoeIEJn8vt+d/6+PXDRPaksYhnlbMIiejioBZvvMQsOjW/JYK6k/0dKnvvP3EhK5GfMBWDPtrxRtegWdAcdq9Q==", + "version": "7.10.2", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.10.2.tgz", + "integrity": "sha512-PApSXlNMJyB4JiGVhCOlzKIif+TKFTvu0aQAhnTvfP/z3vVSN6ZypH5bfUNwFXXjRQtUEBNFd2PtmCmG2Py3qQ==", "dev": true }, "@babel/runtime-corejs3": { @@ -299,33 +375,172 @@ } }, "@babel/template": { - "version": "7.8.6", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.8.6.tgz", - "integrity": "sha512-zbMsPMy/v0PWFZEhQJ66bqjhH+z0JgMoBWuikXybgG3Gkd/3t5oQ1Rw2WQhnSrsOmsKXnZOx15tkC4qON/+JPg==", + "version": "7.10.1", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.1.tgz", + "integrity": "sha512-OQDg6SqvFSsc9A0ej6SKINWrpJiNonRIniYondK2ViKhB06i3c0s+76XUft71iqBEe9S1OKsHwPAjfHnuvnCig==", "dev": true, "requires": { - "@babel/code-frame": "^7.8.3", - "@babel/parser": "^7.8.6", - "@babel/types": "^7.8.6" + "@babel/code-frame": "^7.10.1", + "@babel/parser": "^7.10.1", + "@babel/types": "^7.10.1" + }, + "dependencies": { + "@babel/code-frame": { + "version": "7.10.1", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.1.tgz", + "integrity": "sha512-IGhtTmpjGbYzcEDOw7DcQtbQSXcG9ftmAXtWTu9V936vDye4xjjekktFAtgZsWpzTj/X01jocB46mTywm/4SZw==", + "dev": true, + "requires": { + "@babel/highlight": "^7.10.1" + } + }, + "@babel/helper-validator-identifier": { + "version": "7.10.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.1.tgz", + "integrity": "sha512-5vW/JXLALhczRCWP0PnFDMCJAchlBvM7f4uk/jXritBnIa6E1KmqmtrS3yn1LAnxFBypQ3eneLuXjsnfQsgILw==", + "dev": true + }, + "@babel/highlight": { + "version": "7.10.1", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.1.tgz", + "integrity": "sha512-8rMof+gVP8mxYZApLF/JgNDAkdKa+aJt3ZYxF8z6+j/hpeXL7iMsKCPHa2jNMHu/qqBwzQF4OHNoYi8dMA/rYg==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.10.1", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + } + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } } }, "@babel/traverse": { - "version": "7.9.6", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.9.6.tgz", - "integrity": "sha512-b3rAHSjbxy6VEAvlxM8OV/0X4XrG72zoxme6q1MOoe2vd0bEc+TwayhuC1+Dfgqh1QEG+pj7atQqvUprHIccsg==", + "version": "7.10.1", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.10.1.tgz", + "integrity": "sha512-C/cTuXeKt85K+p08jN6vMDz8vSV0vZcI0wmQ36o6mjbuo++kPMdpOYw23W2XH04dbRt9/nMEfA4W3eR21CD+TQ==", "dev": true, "requires": { - "@babel/code-frame": "^7.8.3", - "@babel/generator": "^7.9.6", - "@babel/helper-function-name": "^7.9.5", - "@babel/helper-split-export-declaration": "^7.8.3", - "@babel/parser": "^7.9.6", - "@babel/types": "^7.9.6", + "@babel/code-frame": "^7.10.1", + "@babel/generator": "^7.10.1", + "@babel/helper-function-name": "^7.10.1", + "@babel/helper-split-export-declaration": "^7.10.1", + "@babel/parser": "^7.10.1", + "@babel/types": "^7.10.1", "debug": "^4.1.0", "globals": "^11.1.0", "lodash": "^4.17.13" }, "dependencies": { + "@babel/code-frame": { + "version": "7.10.1", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.1.tgz", + "integrity": "sha512-IGhtTmpjGbYzcEDOw7DcQtbQSXcG9ftmAXtWTu9V936vDye4xjjekktFAtgZsWpzTj/X01jocB46mTywm/4SZw==", + "dev": true, + "requires": { + "@babel/highlight": "^7.10.1" + } + }, + "@babel/helper-validator-identifier": { + "version": "7.10.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.1.tgz", + "integrity": "sha512-5vW/JXLALhczRCWP0PnFDMCJAchlBvM7f4uk/jXritBnIa6E1KmqmtrS3yn1LAnxFBypQ3eneLuXjsnfQsgILw==", + "dev": true + }, + "@babel/highlight": { + "version": "7.10.1", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.1.tgz", + "integrity": "sha512-8rMof+gVP8mxYZApLF/JgNDAkdKa+aJt3ZYxF8z6+j/hpeXL7iMsKCPHa2jNMHu/qqBwzQF4OHNoYi8dMA/rYg==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.10.1", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + } + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, "debug": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", @@ -341,25 +556,46 @@ "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", "dev": true }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } } } }, "@babel/types": { - "version": "7.9.6", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.9.6.tgz", - "integrity": "sha512-qxXzvBO//jO9ZnoasKF1uJzHd2+M6Q2ZPIVfnFps8JJvXy0ZBbwbNOmE6SGIY5XOY6d1Bo5lb9d9RJ8nv3WSeA==", + "version": "7.10.2", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.10.2.tgz", + "integrity": "sha512-AD3AwWBSz0AWF0AkCN9VPiWrvldXq+/e3cHa4J89vo4ymjz1XwrBFFVZmkJTsQIPNk+ZVomPSXUJqq8yyjZsng==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.9.5", + "@babel/helper-validator-identifier": "^7.10.1", "lodash": "^4.17.13", "to-fast-properties": "^2.0.0" }, "dependencies": { + "@babel/helper-validator-identifier": { + "version": "7.10.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.1.tgz", + "integrity": "sha512-5vW/JXLALhczRCWP0PnFDMCJAchlBvM7f4uk/jXritBnIa6E1KmqmtrS3yn1LAnxFBypQ3eneLuXjsnfQsgILw==", + "dev": true + }, "to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", @@ -583,69 +819,64 @@ "fastq": "^1.6.0" } }, + "@oceanprotocol/contracts": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@oceanprotocol/contracts/-/contracts-0.2.0.tgz", + "integrity": "sha512-7nKNlD2z4FyjQbzBaFJ4JO5jiu3BQG4gESy8ARsq2sXrkSfhDa4RQPuRU9IxubvPZebUkumzmgRt+7afNn+Oew==", + "dev": true + }, "@octokit/auth-token": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.4.1.tgz", - "integrity": "sha512-NB81O5h39KfHYGtgfWr2booRxp2bWOJoqbWwbyUg2hw6h35ArWYlAST5B3XwAkbdcx13yt84hFXyFP5X0QToWA==", + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.4.2.tgz", + "integrity": "sha512-jE/lE/IKIz2v1+/P0u4fJqv0kYwXOTujKemJMFr6FeopsxlIK3+wKDCJGnysg81XID5TgZQbIfuJ5J0lnTiuyQ==", "dev": true, "requires": { - "@octokit/types": "^4.0.1" + "@octokit/types": "^5.0.0" } }, "@octokit/core": { - "version": "2.5.3", - "resolved": "https://registry.npmjs.org/@octokit/core/-/core-2.5.3.tgz", - "integrity": "sha512-23AHK9xBW0v79Ck8h5U+5iA4MW7aosqv+Yr6uZXolVGNzzHwryNH5wM386/6+etiKUTwLFZTqyMU9oQpIBZcFA==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@octokit/core/-/core-3.0.0.tgz", + "integrity": "sha512-FGUUqZbIwl5UPvuUTWq8ly2B12gJGWjYh1DviBzZLXp5LzHUgyzL+NDGsXeE4vszXoGsD/JfpZS+kjkLiD2T9w==", "dev": true, "requires": { "@octokit/auth-token": "^2.4.0", "@octokit/graphql": "^4.3.1", "@octokit/request": "^5.4.0", - "@octokit/types": "^4.0.1", + "@octokit/types": "^5.0.0", "before-after-hook": "^2.1.0", "universal-user-agent": "^5.0.0" } }, "@octokit/endpoint": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-6.0.1.tgz", - "integrity": "sha512-pOPHaSz57SFT/m3R5P8MUu4wLPszokn5pXcB/pzavLTQf2jbU+6iayTvzaY6/BiotuRS0qyEUkx3QglT4U958A==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-6.0.3.tgz", + "integrity": "sha512-Y900+r0gIz+cWp6ytnkibbD95ucEzDSKzlEnaWS52hbCDNcCJYO5mRmWW7HRAnDc7am+N/5Lnd8MppSaTYx1Yg==", "dev": true, "requires": { - "@octokit/types": "^2.11.1", + "@octokit/types": "^5.0.0", "is-plain-object": "^3.0.0", "universal-user-agent": "^5.0.0" - }, - "dependencies": { - "@octokit/types": { - "version": "2.16.2", - "resolved": "https://registry.npmjs.org/@octokit/types/-/types-2.16.2.tgz", - "integrity": "sha512-O75k56TYvJ8WpAakWwYRN8Bgu60KrmX0z1KqFp1kNiFNkgW+JW+9EBKZ+S33PU6SLvbihqd+3drvPxKK68Ee8Q==", - "dev": true, - "requires": { - "@types/node": ">= 8" - } - } } }, "@octokit/graphql": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-4.5.0.tgz", - "integrity": "sha512-StJWfn0M1QfhL3NKBz31e1TdDNZrHLLS57J2hin92SIfzlOVBuUaRkp31AGkGOAFOAVtyEX6ZiZcsjcJDjeb5g==", + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-4.5.1.tgz", + "integrity": "sha512-qgMsROG9K2KxDs12CO3bySJaYoUu2aic90qpFrv7A8sEBzZ7UFGvdgPKiLw5gOPYEYbS0Xf8Tvf84tJutHPulQ==", "dev": true, "requires": { "@octokit/request": "^5.3.0", - "@octokit/types": "^4.0.1", + "@octokit/types": "^5.0.0", "universal-user-agent": "^5.0.0" } }, "@octokit/plugin-paginate-rest": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.2.1.tgz", - "integrity": "sha512-/tHpIF2XpN40AyhIq295YRjb4g7Q5eKob0qM3thYJ0Z+CgmNsWKM/fWse/SUR8+LdprP1O4ZzSKQE+71TCwK+w==", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.2.3.tgz", + "integrity": "sha512-eKTs91wXnJH8Yicwa30jz6DF50kAh7vkcqCQ9D7/tvBAP5KKkg6I2nNof8Mp/65G0Arjsb4QcOJcIEQY+rK1Rg==", "dev": true, "requires": { - "@octokit/types": "^4.0.1" + "@octokit/types": "^5.0.0" } }, "@octokit/plugin-request-log": { @@ -655,35 +886,24 @@ "dev": true }, "@octokit/plugin-rest-endpoint-methods": { - "version": "3.11.0", - "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-3.11.0.tgz", - "integrity": "sha512-D31cBYhlOt6Om2xNkCNZUjyWdaDKUfa4HwpLwL8Dnu8aDuVuuOPLUhFMUDE0GvfqlNQFrNtU7n5HaZm+KmRdsw==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-4.0.0.tgz", + "integrity": "sha512-emS6gysz4E9BNi9IrCl7Pm4kR+Az3MmVB0/DoDCmF4U48NbYG3weKyDlgkrz6Jbl4Mu4nDx8YWZwC4HjoTdcCA==", "dev": true, "requires": { - "@octokit/types": "^2.16.0", + "@octokit/types": "^5.0.0", "deprecation": "^2.3.1" - }, - "dependencies": { - "@octokit/types": { - "version": "2.16.2", - "resolved": "https://registry.npmjs.org/@octokit/types/-/types-2.16.2.tgz", - "integrity": "sha512-O75k56TYvJ8WpAakWwYRN8Bgu60KrmX0z1KqFp1kNiFNkgW+JW+9EBKZ+S33PU6SLvbihqd+3drvPxKK68Ee8Q==", - "dev": true, - "requires": { - "@types/node": ">= 8" - } - } } }, "@octokit/request": { - "version": "5.4.4", - "resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.4.4.tgz", - "integrity": "sha512-vqv1lz41c6VTxUvF9nM+a6U+vvP3vGk7drDpr0DVQg4zyqlOiKVrY17DLD6de5okj+YLHKcoqaUZTBtlNZ1BtQ==", + "version": "5.4.5", + "resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.4.5.tgz", + "integrity": "sha512-atAs5GAGbZedvJXXdjtKljin+e2SltEs48B3naJjqWupYl2IUBbB/CJisyjbNHcKpHzb3E+OYEZ46G8eakXgQg==", "dev": true, "requires": { "@octokit/endpoint": "^6.0.1", "@octokit/request-error": "^2.0.0", - "@octokit/types": "^4.0.1", + "@octokit/types": "^5.0.0", "deprecation": "^2.0.0", "is-plain-object": "^3.0.0", "node-fetch": "^2.3.0", @@ -692,50 +912,53 @@ } }, "@octokit/request-error": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-2.0.1.tgz", - "integrity": "sha512-5lqBDJ9/TOehK82VvomQ6zFiZjPeSom8fLkFVLuYL3sKiIb5RB8iN/lenLkY7oBmyQcGP7FBMGiIZTO8jufaRQ==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-2.0.2.tgz", + "integrity": "sha512-2BrmnvVSV1MXQvEkrb9zwzP0wXFNbPJij922kYBTLIlIafukrGOb+ABBT2+c6wZiuyWDH1K1zmjGQ0toN/wMWw==", "dev": true, "requires": { - "@octokit/types": "^4.0.1", + "@octokit/types": "^5.0.1", "deprecation": "^2.0.0", "once": "^1.4.0" } }, "@octokit/rest": { - "version": "17.9.0", - "resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-17.9.0.tgz", - "integrity": "sha512-Ff2jwS2OizWVaiCozOJevQ97V+mKjlQAt//lU6a/lhWDfHsZLXm/k1RsyTKVbyuiriDi7pg899wCU59nYfKnmQ==", + "version": "18.0.0", + "resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-18.0.0.tgz", + "integrity": "sha512-4G/a42lry9NFGuuECnua1R1eoKkdBYJap97jYbWDNYBOUboWcM75GJ1VIcfvwDV/pW0lMPs7CEmhHoVrSV5shg==", "dev": true, "requires": { - "@octokit/core": "^2.4.3", + "@octokit/core": "^3.0.0", "@octokit/plugin-paginate-rest": "^2.2.0", "@octokit/plugin-request-log": "^1.0.0", - "@octokit/plugin-rest-endpoint-methods": "3.11.0" + "@octokit/plugin-rest-endpoint-methods": "4.0.0" } }, "@octokit/types": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@octokit/types/-/types-4.0.2.tgz", - "integrity": "sha512-+4X6qfhT/fk/5FD66395NrFLxCzD6FsGlpPwfwvnukdyfYbhiZB/FJltiT1XM5Q63rGGBSf9FPaNV3WpNHm54A==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-5.0.1.tgz", + "integrity": "sha512-GorvORVwp244fGKEt3cgt/P+M0MGy4xEDbckw+K5ojEezxyMDgCaYPKVct+/eWQfZXOT7uq0xRpmrl/+hliabA==", "dev": true, "requires": { "@types/node": ">= 8" } }, "@release-it/bumper": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@release-it/bumper/-/bumper-1.1.1.tgz", - "integrity": "sha512-7UFl07Ktb1a1s3iXXYJTi9g80P1qLsGHpHxgYdpdJ2Lw8W6gSVQItLF2SPNifjoQoSWl1NOQU8eyQWAsycYKmQ==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@release-it/bumper/-/bumper-1.4.0.tgz", + "integrity": "sha512-Gmo+pPU/1Cy6JzLvVhNcksV85Mit6HSnBMQqybswutzGX7174RIdDAs6qtMBibQPZodmMAkRrlFwm2wLTVovqQ==", "dev": true, "requires": { + "@iarna/toml": "^2.2.5", "detect-indent": "^6.0.0", - "js-yaml": "^3.13.1", + "fast-glob": "^3.2.3", + "ini": "^1.3.5", + "js-yaml": "^3.14.0", "lodash.castarray": "^4.4.0", "lodash.get": "^4.4.2", "lodash.set": "^4.3.2", "mock-fs": "^4.12.0", - "release-it": "^13.5.7" + "release-it": "^13.6.3" } }, "@sindresorhus/is": { @@ -1325,9 +1548,9 @@ "dev": true }, "@types/node": { - "version": "14.0.5", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.0.5.tgz", - "integrity": "sha512-90hiq6/VqtQgX8Sp0EzeIsv3r+ellbGj4URKj5j30tLlZvRUpnAe9YbYnjl3pJM93GyXU0tghHhvXHq+5rnCKA==" + "version": "14.0.13", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.0.13.tgz", + "integrity": "sha512-rouEWBImiRaSJsVA+ITTFM6ZxibuAlTuNOCyxVbwreu6k6+ujs7DfnU9o+PShFhET78pMBl3eH+AGSI5eOTkPA==" }, "@types/node-fetch": { "version": "2.5.7", @@ -1456,27 +1679,6 @@ } } }, - "@web3-js/scrypt-shim": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/@web3-js/scrypt-shim/-/scrypt-shim-0.1.0.tgz", - "integrity": "sha512-ZtZeWCc/s0nMcdx/+rZwY1EcuRdemOK9ag21ty9UsHkFxsNb/AaoucUz0iPuyGe0Ku+PFuRmWZG7Z7462p9xPw==", - "requires": { - "scryptsy": "^2.1.0", - "semver": "^6.3.0" - } - }, - "@web3-js/websocket": { - "version": "1.0.30", - "resolved": "https://registry.npmjs.org/@web3-js/websocket/-/websocket-1.0.30.tgz", - "integrity": "sha512-fDwrD47MiDrzcJdSeTLF75aCcxVVt8B1N74rA+vh2XCAvFy4tEWJjtnUtj2QG7/zlQ6g9cQ88bZFBxwd9/FmtA==", - "requires": { - "debug": "^2.2.0", - "es5-ext": "^0.10.50", - "nan": "^2.14.0", - "typedarray-to-buffer": "^3.1.5", - "yaeti": "^0.0.6" - } - }, "@webassemblyjs/ast": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.9.0.tgz", @@ -1783,9 +1985,9 @@ } }, "ansi-colors": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz", - "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", "dev": true }, "ansi-escapes": { @@ -1938,6 +2140,18 @@ "es-abstract": "^1.17.0-next.1" } }, + "array.prototype.map": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array.prototype.map/-/array.prototype.map-1.0.2.tgz", + "integrity": "sha512-Az3OYxgsa1g7xDYp86l0nnN4bcmuEITGe1rbdEBVkrqkzMgDcbdQ2R7r41pNzti+4NMces3H8gMmuioZUilLgw==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0-next.1", + "es-array-method-boxes-properly": "^1.0.0", + "is-string": "^1.0.4" + } + }, "asn1": { "version": "0.2.4", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", @@ -2062,9 +2276,9 @@ "integrity": "sha1-D+9a1G8b16hQLGVyfwNn1e5D1pY=" }, "auto-changelog": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/auto-changelog/-/auto-changelog-2.0.0.tgz", - "integrity": "sha512-A61Oc4A/5L5OlMs+AEQNgy8/sOn5Eu0I2Sw4+qbwk40y6kh+2wmptoY4b30FHlduPh3ghybB94eIVFKkAZtjzg==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/auto-changelog/-/auto-changelog-2.1.0.tgz", + "integrity": "sha512-4Bwv4eyy5PUpYkeWX0XfoItbV2tKHNIzO473U+RMkj2hWXm1EtAeyZyFh2atccPqrhn/PBmhk3g9GLDxkltxXQ==", "dev": true, "requires": { "commander": "^5.0.0", @@ -3403,9 +3617,9 @@ "dev": true }, "chalk": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.0.0.tgz", - "integrity": "sha512-N9oWFcegS0sFr9oh1oz2d7Npos6vNoWW9HvtCg5N1KRFpUhaAhvTv5Y58g880fZaEYSNm3qDz8SU1UrGvp+n7A==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", "dev": true, "requires": { "ansi-styles": "^4.1.0", @@ -3440,19 +3654,19 @@ } }, "chokidar": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.3.0.tgz", - "integrity": "sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.3.1.tgz", + "integrity": "sha512-4QYCEWOcK3OJrxwvyyAOxFuhpvOVCYkr33LPfFNBjAD/w3sEzWsp2BUOkI4l9bHvWioAd0rc6NlHUOEaWkTeqg==", "dev": true, "requires": { "anymatch": "~3.1.1", "braces": "~3.0.2", - "fsevents": "~2.1.1", + "fsevents": "~2.1.2", "glob-parent": "~5.1.0", "is-binary-path": "~2.1.0", "is-glob": "~4.0.1", "normalize-path": "~3.0.0", - "readdirp": "~3.2.0" + "readdirp": "~3.3.0" }, "dependencies": { "normalize-path": { @@ -3496,11 +3710,11 @@ }, "dependencies": { "multicodec": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-1.0.1.tgz", - "integrity": "sha512-yrrU/K8zHyAH2B0slNVeq3AiwluflHpgQ3TAzwNJcuO2AoPyXgBT2EDkdbP1D8B/yFOY+S2hDYmFlI1vhVFkQw==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-1.0.2.tgz", + "integrity": "sha512-IcTBw34qiRGHsEDKlWp2yLQDVZKzRZWjAfUeCYZSqHWszyCAM1o5R9YLLLV1SQVPAa9AVnXKfAA6sjyYZC/2LQ==", "requires": { - "buffer": "^5.5.0", + "buffer": "^5.6.0", "varint": "^5.0.0" } } @@ -4482,9 +4696,9 @@ } }, "diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", "dev": true }, "diffie-hellman": { @@ -4754,6 +4968,35 @@ "string.prototype.trimright": "^2.1.1" } }, + "es-array-method-boxes-properly": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz", + "integrity": "sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA==", + "dev": true + }, + "es-get-iterator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/es-get-iterator/-/es-get-iterator-1.1.0.tgz", + "integrity": "sha512-UfrmHuWQlNMTs35e1ypnvikg6jCz3SK8v8ImvmDsh36fCVUR1MqoFDiyn0/k52C8NqO3YsO8Oe0azeesNuqSsQ==", + "dev": true, + "requires": { + "es-abstract": "^1.17.4", + "has-symbols": "^1.0.1", + "is-arguments": "^1.0.4", + "is-map": "^2.0.1", + "is-set": "^2.0.1", + "is-string": "^1.0.5", + "isarray": "^2.0.5" + }, + "dependencies": { + "isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true + } + } + }, "es-to-primitive": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", @@ -5147,9 +5390,9 @@ } }, "eslint-plugin-prettier": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.1.3.tgz", - "integrity": "sha512-+HG5jmu/dN3ZV3T6eCD7a4BlAySdN7mLIbJYo0z1cFQuI+r2DiTJEFeF68ots93PsnrMxbzIZ2S/ieX+mkrBeQ==", + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.1.4.tgz", + "integrity": "sha512-jZDa8z76klRqo+TdGDTFJSavwbnWK2ZpqGKNZ+VvweMW516pDUMmQ2koXvxEE4JhzNvTv+radye/bWGBmA6jmg==", "dev": true, "requires": { "prettier-linter-helpers": "^1.0.0" @@ -5927,9 +6170,9 @@ } }, "execa": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-4.0.1.tgz", - "integrity": "sha512-SCjM/zlBdOK8Q5TIjOn6iEHZaPHFsMoTxXQ2nvUvtPnuohz3H2dIozSg+etNR98dGoYUp2ENSKLL/XaMmbxVgw==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/execa/-/execa-4.0.2.tgz", + "integrity": "sha512-QI2zLa6CjGWdiQsmSkZoGtDx2N+cQIGb3yNolGTdjSQzydzLgYYf8LRuagp7S7fPimjcrzUDSUFd/MgzELMi4Q==", "dev": true, "requires": { "cross-spawn": "^7.0.0", @@ -6274,9 +6517,9 @@ "dev": true }, "fast-glob": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.2.tgz", - "integrity": "sha512-UDV82o4uQyljznxwMxyVRJgZZt3O5wENYojjzbaGEGZgeOxkLFf+V4cnUD+krzb2F72E18RhamkMZ7AdeggF7A==", + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.4.tgz", + "integrity": "sha512-kr/Oo6PX51265qeuCYsyGypiO5uJFgBS0jksyG7FUeCyQzNwYnzrNIMR1NXfkZXsMYXYLRAHgISHBz8gQcxKHQ==", "dev": true, "requires": { "@nodelib/fs.stat": "^2.0.2", @@ -7104,9 +7347,9 @@ "dev": true }, "globby": { - "version": "11.0.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.0.tgz", - "integrity": "sha512-iuehFnR3xu5wBBtm4xi0dMe92Ob87ufyu/dHwpDYfbcpYpIbrO5OnS8M1vWvrBhSGEJ3/Ecj7gnX76P8YxpPEg==", + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.1.tgz", + "integrity": "sha512-iH9RmgwCmUJHi2z5o2l3eTtGBtXek1OYlHrbcxOYugyHLmAsZrPj43OtHThd62Buh/Vv6VyCBD2bdyWcGNQqoQ==", "dev": true, "requires": { "array-union": "^2.1.0", @@ -7890,6 +8133,12 @@ "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==", "dev": true }, + "is-map": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.1.tgz", + "integrity": "sha512-T/S49scO8plUiAOA2DBTBG3JHpn1yiw0kRp6dgiZ0v2/6twi5eiB0rHtHFH9ZIrvlWc6+4O+m4zg5+Z833aXgw==", + "dev": true + }, "is-natural-number": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/is-natural-number/-/is-natural-number-4.0.1.tgz", @@ -7974,6 +8223,12 @@ "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz", "integrity": "sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg==" }, + "is-set": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.1.tgz", + "integrity": "sha512-eJEzOtVyenDs1TMzSQ3kU3K+E0GUS9sno+F0OBT97xsgcJsF9nXMBtkT9/kut5JEpM7oL7X/0qxR17K3mcwIAA==", + "dev": true + }, "is-ssh": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/is-ssh/-/is-ssh-1.3.1.tgz", @@ -8228,6 +8483,22 @@ "is-object": "^1.0.1" } }, + "iterate-iterator": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/iterate-iterator/-/iterate-iterator-1.0.1.tgz", + "integrity": "sha512-3Q6tudGN05kbkDQDI4CqjaBf4qf85w6W6GnuZDtUVYwKgtC1q8yxYX7CZed7N+tLzQqS6roujWvszf13T+n9aw==", + "dev": true + }, + "iterate-value": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/iterate-value/-/iterate-value-1.0.2.tgz", + "integrity": "sha512-A6fMAio4D2ot2r/TYzr4yUWrmwNdsN5xL7+HUiyACE4DXm+q8HtPcnFTp+NnW3k4N05tZ7FVYFFb2CR13NxyHQ==", + "dev": true, + "requires": { + "es-get-iterator": "^1.0.2", + "iterate-iterator": "^1.0.1" + } + }, "js-sha3": { "version": "0.8.0", "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", @@ -8978,9 +9249,9 @@ "dev": true }, "merge2": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.3.0.tgz", - "integrity": "sha512-2j4DAdlBOkiSZIsaXk4mTE3sRS02yBHAtfy127xRV3bQUFqXkjHCHLW6Scv7DwNRbIWNHH8zpnz9zMaKXIdvYw==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", "dev": true }, "merkle-patricia-tree": { @@ -9228,32 +9499,33 @@ } }, "mocha": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-7.2.0.tgz", - "integrity": "sha512-O9CIypScywTVpNaRrCAgoUnJgozpIofjKUYmJhiCIJMiuYnLI6otcb1/kpW9/n/tJODHGZ7i8aLQoDVsMtOKQQ==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-8.0.1.tgz", + "integrity": "sha512-vefaXfdYI8+Yo8nPZQQi0QO2o+5q9UIMX1jZ1XMmK3+4+CQjc7+B0hPdUeglXiTlr8IHMVRo63IhO9Mzt6fxOg==", "dev": true, "requires": { - "ansi-colors": "3.2.3", + "ansi-colors": "4.1.1", "browser-stdout": "1.3.1", - "chokidar": "3.3.0", + "chokidar": "3.3.1", "debug": "3.2.6", - "diff": "3.5.0", + "diff": "4.0.2", "escape-string-regexp": "1.0.5", - "find-up": "3.0.0", - "glob": "7.1.3", + "find-up": "4.1.0", + "glob": "7.1.6", "growl": "1.10.5", "he": "1.2.0", "js-yaml": "3.13.1", "log-symbols": "3.0.0", "minimatch": "3.0.4", - "mkdirp": "0.5.5", - "ms": "2.1.1", - "node-environment-flags": "1.0.6", + "ms": "2.1.2", "object.assign": "4.1.0", - "strip-json-comments": "2.0.1", - "supports-color": "6.0.0", - "which": "1.3.1", + "promise.allsettled": "1.0.2", + "serialize-javascript": "3.0.0", + "strip-json-comments": "3.0.1", + "supports-color": "7.1.0", + "which": "2.0.2", "wide-align": "1.1.3", + "workerpool": "6.0.0", "yargs": "13.3.2", "yargs-parser": "13.1.2", "yargs-unparser": "1.6.0" @@ -9268,35 +9540,6 @@ "ms": "^2.1.1" } }, - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "requires": { - "locate-path": "^3.0.0" - } - }, - "glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, "js-yaml": { "version": "3.13.1", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", @@ -9307,53 +9550,31 @@ "esprima": "^4.0.0" } }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", - "dev": true, - "requires": { - "minimist": "^1.2.5" - } - }, "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, - "p-locate": { + "serialize-javascript": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "requires": { - "p-limit": "^2.0.0" - } + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-3.0.0.tgz", + "integrity": "sha512-skZcHYw2vEX4bw90nAr2iTTsz6x2SrHEnfxgKYmZlvJYBEZrvbKtobJWlQ20zczKb3bsHHXXTYt48zBA7ni9cw==", + "dev": true }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "strip-json-comments": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.0.1.tgz", + "integrity": "sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw==", "dev": true }, - "supports-color": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz", - "integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==", + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, "requires": { - "has-flag": "^3.0.0" + "isexe": "^2.0.0" } }, "yargs-parser": { @@ -9570,24 +9791,6 @@ } } }, - "node-environment-flags": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.6.tgz", - "integrity": "sha512-5Evy2epuL+6TM0lCQGpFIj6KwiEsGh1SrHUhTbNX+sLbBtjidPZFAnVK9y5yU1+h//RitLbRHTIMyxQPtxMdHw==", - "dev": true, - "requires": { - "object.getownpropertydescriptors": "^2.0.3", - "semver": "^5.7.0" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - } - } - }, "node-fetch": { "version": "2.6.0", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz", @@ -9753,9 +9956,9 @@ } }, "nyc": { - "version": "15.0.1", - "resolved": "https://registry.npmjs.org/nyc/-/nyc-15.0.1.tgz", - "integrity": "sha512-n0MBXYBYRqa67IVt62qW1r/d9UH/Qtr7SF1w/nQLJ9KxvWF6b2xCHImRAixHN9tnMMYHC2P14uo6KddNGwMgGg==", + "version": "15.1.0", + "resolved": "https://registry.npmjs.org/nyc/-/nyc-15.1.0.tgz", + "integrity": "sha512-jMW04n9SxKdKi1ZMGhvUTHBN0EICCRkHemEoE5jm6mTYcqcdas0ATzgUgejlQUHMvpnOZqGB5Xxsv9KxJW1j8A==", "dev": true, "requires": { "@istanbuljs/load-nyc-config": "^1.0.0", @@ -9766,6 +9969,7 @@ "find-cache-dir": "^3.2.0", "find-up": "^4.1.0", "foreground-child": "^2.0.0", + "get-package-type": "^0.1.0", "glob": "^7.1.6", "istanbul-lib-coverage": "^3.0.0", "istanbul-lib-hook": "^3.0.0", @@ -10002,16 +10206,6 @@ "has": "^1.0.3" } }, - "object.getownpropertydescriptors": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz", - "integrity": "sha512-Z53Oah9A3TdLoblT7VKJaTDdXdT+lQO+cNpKVnya5JDe9uLvzu1YyY1yFDFrcxrlRgWrEFH0jJtD/IbuwjcEVg==", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1" - } - }, "object.pick": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", @@ -10616,9 +10810,9 @@ "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=" }, "prettier": { - "version": "1.19.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.19.1.tgz", - "integrity": "sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.0.5.tgz", + "integrity": "sha512-7PtVymN48hGcO4fGjybyBSIWDsLU4H4XlvOHfq91pz9kkGlonzwTfYkaIEwiRg/dAJF9YlbsduBAgtYLi+8cFg==", "dev": true }, "prettier-linter-helpers": { @@ -10678,6 +10872,19 @@ "set-immediate-shim": "^1.0.1" } }, + "promise.allsettled": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/promise.allsettled/-/promise.allsettled-1.0.2.tgz", + "integrity": "sha512-UpcYW5S1RaNKT6pd+s9jp9K9rlQge1UXKskec0j6Mmuq7UJCvlS2J2/s/yuPN8ehftf9HXMxWlKiPbGGUzpoRg==", + "dev": true, + "requires": { + "array.prototype.map": "^1.0.1", + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0-next.1", + "function-bind": "^1.1.1", + "iterate-value": "^1.0.0" + } + }, "prop-types": { "version": "15.7.2", "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.7.2.tgz", @@ -10802,9 +11009,9 @@ "dev": true }, "quick-lru": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.0.tgz", - "integrity": "sha512-WjAKQ9ORzvqjLijJXiXWqc3Gcs1ivoxCj6KJmEjoWBE6OtHwuaDLSAUqGHALUiid7A1KqGqsSHZs8prxF5xxAQ==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", + "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==", "dev": true }, "randombytes": { @@ -10958,12 +11165,12 @@ } }, "readdirp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.2.0.tgz", - "integrity": "sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.3.0.tgz", + "integrity": "sha512-zz0pAkSPOXXm1viEwygWIPSPkcBYjW1xU5j/JBh5t9bGCJwa6f9+BJa6VaB2g+b55yVrmXzqkyLf4xaWYM0IkQ==", "dev": true, "requires": { - "picomatch": "^2.0.4" + "picomatch": "^2.0.7" } }, "rechoir": { @@ -11069,25 +11276,25 @@ } }, "release-it": { - "version": "13.6.1", - "resolved": "https://registry.npmjs.org/release-it/-/release-it-13.6.1.tgz", - "integrity": "sha512-y7RfD4+O+I3WwWkULH5Y4kqcBr1bzQ8dNYnG8/7LVycWBajkFSDbKdCper9VGZulpFcXiSFfhenXrnGrDlHMnA==", + "version": "13.6.3", + "resolved": "https://registry.npmjs.org/release-it/-/release-it-13.6.3.tgz", + "integrity": "sha512-Y/MruGGuOqI6cqrSXoOI40BuTz5i5BVq7k/3754S86dNbnAWIPWCkuHBNTK3u0aYk6qjfsJUdE1x8yrNFju34A==", "dev": true, "requires": { "@iarna/toml": "2.2.5", - "@octokit/rest": "17.9.0", + "@octokit/rest": "18.0.0", "async-retry": "1.3.1", - "chalk": "4.0.0", + "chalk": "4.1.0", "cosmiconfig": "6.0.0", "debug": "4.1.1", "deprecated-obj": "1.0.1", "detect-repo-changelog": "1.0.1", - "execa": "4.0.1", + "execa": "4.0.2", "find-up": "4.1.0", "form-data": "3.0.0", "git-url-parse": "11.1.2", - "globby": "11.0.0", - "got": "11.1.4", + "globby": "11.0.1", + "got": "11.3.0", "import-cwd": "3.0.0", "inquirer": "7.1.0", "is-ci": "2.0.0", @@ -11101,7 +11308,7 @@ "supports-color": "7.1.0", "update-notifier": "4.1.0", "url-join": "4.0.1", - "uuid": "8.0.0", + "uuid": "8.1.0", "window-size": "1.1.1", "yaml": "1.10.0", "yargs-parser": "18.1.3" @@ -11182,9 +11389,9 @@ } }, "got": { - "version": "11.1.4", - "resolved": "https://registry.npmjs.org/got/-/got-11.1.4.tgz", - "integrity": "sha512-z94KIXHhFSpJONuY6C6w1wC+igE7P1d0b5h3H2CvrOXn0/tum/OgFblIGUAxI5PBXukGLvKb9MJXVHW8vsYaBA==", + "version": "11.3.0", + "resolved": "https://registry.npmjs.org/got/-/got-11.3.0.tgz", + "integrity": "sha512-yi/kiZY2tNMtt5IfbfX8UL3hAZWb2gZruxYZ72AY28pU5p0TZjZdl0uRsuaFbnC0JopdUi3I+Mh1F3dPQ9Dh0Q==", "dev": true, "requires": { "@sindresorhus/is": "^2.1.1", @@ -11254,12 +11461,6 @@ "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz", "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==", "dev": true - }, - "uuid": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.0.0.tgz", - "integrity": "sha512-jOXGuXZAWdsTH7eZLtyXMqUb9EcWMGZNbL9YcGBJl4MH4nrxHmZJhEHvyLFrkxo+28uLb/NYRcStH48fnD0Vzw==", - "dev": true } } }, @@ -11660,7 +11861,8 @@ "scryptsy": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/scryptsy/-/scryptsy-2.1.0.tgz", - "integrity": "sha512-1CdSqHQowJBnMAFyPEBRfqag/YP9OF394FV+4YREIJX4ljD7OxvQRDayyoyyCk+senRjSkP6VnUNQmVQqB6g7w==" + "integrity": "sha512-1CdSqHQowJBnMAFyPEBRfqag/YP9OF394FV+4YREIJX4ljD7OxvQRDayyoyyCk+senRjSkP6VnUNQmVQqB6g7w==", + "dev": true }, "secp256k1": { "version": "3.8.0", @@ -11695,7 +11897,8 @@ "semver": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true }, "semver-diff": { "version": "3.1.1", @@ -13189,9 +13392,9 @@ "dev": true }, "ts-node": { - "version": "8.10.1", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.10.1.tgz", - "integrity": "sha512-bdNz1L4ekHiJul6SHtZWs1ujEKERJnHs4HxN7rjTyyVOFf3HaJ6sLqe6aPG62XTzAB/63pKRh5jTSWL0D7bsvw==", + "version": "8.10.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.10.2.tgz", + "integrity": "sha512-ISJJGgkIpDdBhWVu3jufsWpK3Rzo7bdiIXJjQc0ynKxVOVcg2oIrf2H2cejminGrptVc6q6/uynAHNCuWGbpVA==", "dev": true, "requires": { "arg": "^4.1.0", @@ -13333,9 +13536,9 @@ } }, "typescript": { - "version": "3.9.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.3.tgz", - "integrity": "sha512-D/wqnB2xzNFIcoBG9FG8cXRDjiqSTbG2wd8DMZeQyJlP1vfTkIxH4GKveWaEBYySKIg+USu+E+EDIR47SqnaMQ==", + "version": "3.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.5.tgz", + "integrity": "sha512-hSAifV3k+i6lEoCJ2k6R2Z/rp/H3+8sdmcn5NrS3/3kE7+RyZXm9aqvxWqjEXHAd8b0pShatpcdMTvEdvAJltQ==", "dev": true }, "uglify-js": { @@ -14217,23 +14420,23 @@ } }, "web3": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/web3/-/web3-1.2.8.tgz", - "integrity": "sha512-rXUn16VKxn2aIe9v0KX+bSm2JXdq/Vnj3lZ0Rub2Q5YUSycHdCBaDtJRukl/jB5ygAdyr5/cUwvJzhNDJSYsGw==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3/-/web3-1.2.9.tgz", + "integrity": "sha512-Mo5aBRm0JrcNpN/g4VOrDzudymfOnHRC3s2VarhYxRA8aWgF5rnhQ0ziySaugpic1gksbXPe105pUWyRqw8HUA==", "requires": { - "web3-bzz": "1.2.8", - "web3-core": "1.2.8", - "web3-eth": "1.2.8", - "web3-eth-personal": "1.2.8", - "web3-net": "1.2.8", - "web3-shh": "1.2.8", - "web3-utils": "1.2.8" + "web3-bzz": "1.2.9", + "web3-core": "1.2.9", + "web3-eth": "1.2.9", + "web3-eth-personal": "1.2.9", + "web3-net": "1.2.9", + "web3-shh": "1.2.9", + "web3-utils": "1.2.9" } }, "web3-bzz": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.2.8.tgz", - "integrity": "sha512-jbi24/s2tT7FYuN+ktRvTa5em0GxhqcIYQ8FnD3Zb/ZoEPi+/7rH0Hh+WDol0pSZL+wdz/iM+Z2C9NE42z6EmQ==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.2.9.tgz", + "integrity": "sha512-ogVQr9jHodu9HobARtvUSmWG22cv2EUQzlPeejGWZ7j5h20HX40EDuWyomGY5VclIj5DdLY76Tmq88RTf/6nxA==", "requires": { "@types/node": "^10.12.18", "got": "9.6.0", @@ -14242,149 +14445,132 @@ }, "dependencies": { "@types/node": { - "version": "10.17.24", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.24.tgz", - "integrity": "sha512-5SCfvCxV74kzR3uWgTYiGxrd69TbT1I6+cMx1A5kEly/IVveJBimtAMlXiEyVFn5DvUFewQWxOOiJhlxeQwxgA==" + "version": "10.17.26", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.26.tgz", + "integrity": "sha512-myMwkO2Cr82kirHY8uknNRHEVtn0wV3DTQfkrjx17jmkstDRZ24gNUdl8AHXVyVclTYI/bNjgTPTAWvWLqXqkw==" } } }, "web3-core": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.2.8.tgz", - "integrity": "sha512-hvlYWyE1UcLoGa6qF1GoxGgi1quFsZOdwIUIVsAp+sp0plXp/Nqva2lAjJ+FFyWtVKbC7Zq+qwTJ4iP1aN0vTg==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.2.9.tgz", + "integrity": "sha512-fSYv21IP658Ty2wAuU9iqmW7V+75DOYMVZsDH/c14jcF/1VXnedOcxzxSj3vArsCvXZNe6XC5/wAuGZyQwR9RA==", "requires": { "@types/bn.js": "^4.11.4", "@types/node": "^12.6.1", "bignumber.js": "^9.0.0", - "web3-core-helpers": "1.2.8", - "web3-core-method": "1.2.8", - "web3-core-requestmanager": "1.2.8", - "web3-utils": "1.2.8" + "web3-core-helpers": "1.2.9", + "web3-core-method": "1.2.9", + "web3-core-requestmanager": "1.2.9", + "web3-utils": "1.2.9" }, "dependencies": { "@types/node": { - "version": "12.12.42", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.42.tgz", - "integrity": "sha512-R/9QdYFLL9dE9l5cWWzWIZByVGFd7lk7JVOJ7KD+E1SJ4gni7XJRLz9QTjyYQiHIqEAgku9VgxdLjMlhhUaAFg==" + "version": "12.12.47", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.47.tgz", + "integrity": "sha512-yzBInQFhdY8kaZmqoL2+3U5dSTMrKaYcb561VU+lDzAYvqt+2lojvBEy+hmpSNuXnPTx7m9+04CzWYOUqWME2A==" } } }, "web3-core-helpers": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.2.8.tgz", - "integrity": "sha512-Wrl7ZPKn3Xyg0Hl5+shDnJcLP+EtTfThmQ1eCJLcg/BZqvLUR1SkOslNlhEojcYeBwhhymAKs8dfQbtYi+HMnw==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.2.9.tgz", + "integrity": "sha512-t0WAG3orLCE3lqi77ZoSRNFok3VQWZXTniZigDQjyOJYMAX7BU3F3js8HKbjVnAxlX3tiKoDxI0KBk9F3AxYuw==", "requires": { "underscore": "1.9.1", - "web3-eth-iban": "1.2.8", - "web3-utils": "1.2.8" + "web3-eth-iban": "1.2.9", + "web3-utils": "1.2.9" } }, "web3-core-method": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.2.8.tgz", - "integrity": "sha512-69qbvOgx0Frw46dXvEKzYgtaPXpUaQAlQmczgb0ZUBHsEU2K7jTtFgBy6kVBgAwsXDvoZ99AX4SjpY2dTMwPkw==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.2.9.tgz", + "integrity": "sha512-bjsIoqP3gs7A/gP8+QeLUCyOKJ8bopteCSNbCX36Pxk6TYfYWNuC6hP+2GzUuqdP3xaZNe+XEElQFUNpR3oyAg==", "requires": { + "@ethersproject/transactions": "^5.0.0-beta.135", "underscore": "1.9.1", - "web3-core-helpers": "1.2.8", - "web3-core-promievent": "1.2.8", - "web3-core-subscriptions": "1.2.8", - "web3-utils": "1.2.8" + "web3-core-helpers": "1.2.9", + "web3-core-promievent": "1.2.9", + "web3-core-subscriptions": "1.2.9", + "web3-utils": "1.2.9" } }, "web3-core-promievent": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.2.8.tgz", - "integrity": "sha512-3EdRieaHpBVVhfGjoREQfdoCM3xC0WwWjXXzT6oTldotfYC38kwk/GW8c8txYiLP/KxhslAN1cJSlXNOJjKSog==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.2.9.tgz", + "integrity": "sha512-0eAUA2zjgXTleSrnc1wdoKQPPIHU6KHf4fAscu4W9kKrR+mqP1KsjYrxY9wUyjNnXxfQ+5M29ipvbiaK8OqdOw==", "requires": { "eventemitter3": "3.1.2" } }, "web3-core-requestmanager": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.2.8.tgz", - "integrity": "sha512-bwc2ABG6yzgTy28fv4t59g+tf6+UmTRMoF8HqTeiNDffoMKP2akyKFZeu1oD2gE7j/7GA75TAUjwJ7pH9ek1MA==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.2.9.tgz", + "integrity": "sha512-1PwKV2m46ALUnIN5VPPgjOj8yMLJhhqZYvYJE34hTN5SErOkwhzx5zScvo5MN7v7KyQGFnpVCZKKGCiEnDmtFA==", "requires": { "underscore": "1.9.1", - "web3-core-helpers": "1.2.8", - "web3-providers-http": "1.2.8", - "web3-providers-ipc": "1.2.8", - "web3-providers-ws": "1.2.8" + "web3-core-helpers": "1.2.9", + "web3-providers-http": "1.2.9", + "web3-providers-ipc": "1.2.9", + "web3-providers-ws": "1.2.9" } }, "web3-core-subscriptions": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.2.8.tgz", - "integrity": "sha512-wmsRJ4ipwoF1mlOR+Oo8JdKigpkoVNQtqiRUuyQrTVhJx7GBuSaAIenpBYlkucC+RgByoGybR7Q3tTNJ6z/2tQ==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.2.9.tgz", + "integrity": "sha512-Y48TvXPSPxEM33OmXjGVDMzTd0j8X0t2+sDw66haeBS8eYnrEzasWuBZZXDq0zNUsqyxItgBGDn+cszkgEnFqg==", "requires": { "eventemitter3": "3.1.2", "underscore": "1.9.1", - "web3-core-helpers": "1.2.8" + "web3-core-helpers": "1.2.9" } }, "web3-eth": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.2.8.tgz", - "integrity": "sha512-CEnVIIR1zZQ9vQh/kPFAUbvbbHYkC84y15jdhRUDDGR6bs4FxO2NNWR2YDtNe038lrz747tZahsC9kEiGkJFZQ==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.2.9.tgz", + "integrity": "sha512-sIKO4iE9FEBa/CYUd6GdPd7GXt/wISqxUd8PlIld6+hvMJj02lgO7Z7p5T9mZIJcIZJGvZX81ogx8oJ9yif+Ag==", "requires": { "underscore": "1.9.1", - "web3-core": "1.2.8", - "web3-core-helpers": "1.2.8", - "web3-core-method": "1.2.8", - "web3-core-subscriptions": "1.2.8", - "web3-eth-abi": "1.2.8", - "web3-eth-accounts": "1.2.8", - "web3-eth-contract": "1.2.8", - "web3-eth-ens": "1.2.8", - "web3-eth-iban": "1.2.8", - "web3-eth-personal": "1.2.8", - "web3-net": "1.2.8", - "web3-utils": "1.2.8" - }, - "dependencies": { - "web3-eth-contract": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.2.8.tgz", - "integrity": "sha512-EWRLVhZksbzGAyHd7RaOsakjCJBA2BREWiJmBDlrxDBqw8HltXFzKdkRug/mwVNa5ZYMabKSRF/MMh0Sx06CFw==", - "requires": { - "@types/bn.js": "^4.11.4", - "underscore": "1.9.1", - "web3-core": "1.2.8", - "web3-core-helpers": "1.2.8", - "web3-core-method": "1.2.8", - "web3-core-promievent": "1.2.8", - "web3-core-subscriptions": "1.2.8", - "web3-eth-abi": "1.2.8", - "web3-utils": "1.2.8" - } - } + "web3-core": "1.2.9", + "web3-core-helpers": "1.2.9", + "web3-core-method": "1.2.9", + "web3-core-subscriptions": "1.2.9", + "web3-eth-abi": "1.2.9", + "web3-eth-accounts": "1.2.9", + "web3-eth-contract": "1.2.9", + "web3-eth-ens": "1.2.9", + "web3-eth-iban": "1.2.9", + "web3-eth-personal": "1.2.9", + "web3-net": "1.2.9", + "web3-utils": "1.2.9" } }, "web3-eth-abi": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.2.8.tgz", - "integrity": "sha512-OKp/maLdKHPpQxZhEd0HgnCJFQajsGe42WOG6SVftlgzyR8Jjv4KNm46TKvb3hv5OJTKZWU7nZIxkEG+fyI58w==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.2.9.tgz", + "integrity": "sha512-3YwUYbh/DMfDbhMWEebAdjSd5bj3ZQieOjLzWFHU23CaLEqT34sUix1lba+hgUH/EN6A7bKAuKOhR3p0OvTn7Q==", "requires": { "@ethersproject/abi": "5.0.0-beta.153", "underscore": "1.9.1", - "web3-utils": "1.2.8" + "web3-utils": "1.2.9" } }, "web3-eth-accounts": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.2.8.tgz", - "integrity": "sha512-QODqSD4SZN/1oWfvlvsuum6Ud9+2FUTW4VTPJh245YTewCpa0M5+Fzug3UTeUZNv88STwC//dV72zReITNh4ZQ==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.2.9.tgz", + "integrity": "sha512-jkbDCZoA1qv53mFcRHCinoCsgg8WH+M0YUO1awxmqWXRmCRws1wW0TsuSQ14UThih5Dxolgl+e+aGWxG58LMwg==", "requires": { - "@web3-js/scrypt-shim": "^0.1.0", "crypto-browserify": "3.12.0", "eth-lib": "^0.2.8", "ethereumjs-common": "^1.3.2", "ethereumjs-tx": "^2.1.1", + "scrypt-js": "^3.0.1", "underscore": "1.9.1", "uuid": "3.3.2", - "web3-core": "1.2.8", - "web3-core-helpers": "1.2.8", - "web3-core-method": "1.2.8", - "web3-utils": "1.2.8" + "web3-core": "1.2.9", + "web3-core-helpers": "1.2.9", + "web3-core-method": "1.2.9", + "web3-utils": "1.2.9" }, "dependencies": { "eth-lib": { @@ -14397,6 +14583,11 @@ "xhr-request-promise": "^0.1.2" } }, + "scrypt-js": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz", + "integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==" + }, "uuid": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", @@ -14593,46 +14784,28 @@ } }, "web3-eth-ens": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/web3-eth-ens/-/web3-eth-ens-1.2.8.tgz", - "integrity": "sha512-zsFXY26BMGkihPkEO5qj9AEqyxPH4mclbzYs1dyrw7sHFmrUvhZc+jLGT9WyQGoujq37RN2l/tlOpCaFVVR8ng==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-eth-ens/-/web3-eth-ens-1.2.9.tgz", + "integrity": "sha512-kG4+ZRgZ8I1WYyOBGI8QVRHfUSbbJjvJAGA1AF/NOW7JXQ+x7gBGeJw6taDWJhSshMoEKWcsgvsiuoG4870YxQ==", "requires": { "content-hash": "^2.5.2", "eth-ens-namehash": "2.0.8", "underscore": "1.9.1", - "web3-core": "1.2.8", - "web3-core-helpers": "1.2.8", - "web3-core-promievent": "1.2.8", - "web3-eth-abi": "1.2.8", - "web3-eth-contract": "1.2.8", - "web3-utils": "1.2.8" - }, - "dependencies": { - "web3-eth-contract": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.2.8.tgz", - "integrity": "sha512-EWRLVhZksbzGAyHd7RaOsakjCJBA2BREWiJmBDlrxDBqw8HltXFzKdkRug/mwVNa5ZYMabKSRF/MMh0Sx06CFw==", - "requires": { - "@types/bn.js": "^4.11.4", - "underscore": "1.9.1", - "web3-core": "1.2.8", - "web3-core-helpers": "1.2.8", - "web3-core-method": "1.2.8", - "web3-core-promievent": "1.2.8", - "web3-core-subscriptions": "1.2.8", - "web3-eth-abi": "1.2.8", - "web3-utils": "1.2.8" - } - } + "web3-core": "1.2.9", + "web3-core-helpers": "1.2.9", + "web3-core-promievent": "1.2.9", + "web3-eth-abi": "1.2.9", + "web3-eth-contract": "1.2.9", + "web3-utils": "1.2.9" } }, "web3-eth-iban": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.2.8.tgz", - "integrity": "sha512-xgPUOuDOQJYloUS334/wot6jvp6K8JBz8UvQ1tAxU9LO2v2DW+IDTJ5gQ6TdutTmzdDi97KdwhwnQwhQh5Z1PA==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.2.9.tgz", + "integrity": "sha512-RtdVvJE0pyg9dHLy0GzDiqgnLnssSzfz/JYguhC1wsj9+Gnq1M6Diy3NixACWUAp6ty/zafyOaZnNQ+JuH9TjQ==", "requires": { "bn.js": "4.11.8", - "web3-utils": "1.2.8" + "web3-utils": "1.2.9" }, "dependencies": { "bn.js": { @@ -14643,33 +14816,33 @@ } }, "web3-eth-personal": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.2.8.tgz", - "integrity": "sha512-sWhxF1cpF9pB1wMISrOSy/i8IB1NWtvoXT9dfkWtvByGf3JfC2DlnllLaA1f9ohyvxnR+QTgPKgOQDknmqDstw==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.2.9.tgz", + "integrity": "sha512-cFiNrktxZ1C/rIdJFzQTvFn3/0zcsR3a+Jf8Y3KxeQDHszQtosjLWptP7bsUmDwEh4hzh0Cy3KpOxlYBWB8bJQ==", "requires": { "@types/node": "^12.6.1", - "web3-core": "1.2.8", - "web3-core-helpers": "1.2.8", - "web3-core-method": "1.2.8", - "web3-net": "1.2.8", - "web3-utils": "1.2.8" + "web3-core": "1.2.9", + "web3-core-helpers": "1.2.9", + "web3-core-method": "1.2.9", + "web3-net": "1.2.9", + "web3-utils": "1.2.9" }, "dependencies": { "@types/node": { - "version": "12.12.42", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.42.tgz", - "integrity": "sha512-R/9QdYFLL9dE9l5cWWzWIZByVGFd7lk7JVOJ7KD+E1SJ4gni7XJRLz9QTjyYQiHIqEAgku9VgxdLjMlhhUaAFg==" + "version": "12.12.47", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.47.tgz", + "integrity": "sha512-yzBInQFhdY8kaZmqoL2+3U5dSTMrKaYcb561VU+lDzAYvqt+2lojvBEy+hmpSNuXnPTx7m9+04CzWYOUqWME2A==" } } }, "web3-net": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.2.8.tgz", - "integrity": "sha512-Nsq6qgncvvThOjC+sQ+NfDH8L7jclQCFzLFYa9wsd5J6HJ6f5gJl/mv6rsZQX9iDEYDPKkDfyqHktynOBgKWMQ==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.2.9.tgz", + "integrity": "sha512-d2mTn8jPlg+SI2hTj2b32Qan6DmtU9ap/IUlJTeQbZQSkTLf0u9suW8Vjwyr4poJYXTurdSshE7OZsPNn30/ZA==", "requires": { - "web3-core": "1.2.8", - "web3-core-method": "1.2.8", - "web3-utils": "1.2.8" + "web3-core": "1.2.9", + "web3-core-method": "1.2.9", + "web3-utils": "1.2.9" } }, "web3-provider-engine": { @@ -14778,57 +14951,69 @@ } }, "web3-providers-http": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.2.8.tgz", - "integrity": "sha512-Esj4SpgabmBDOR4QD3qYapzwFYWHigcdgdjvt/VWT5/7TD10o52hr+Nsvp3/XV5AFrcCMdY+lzKFLVH24u0sww==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.2.9.tgz", + "integrity": "sha512-F956tCIj60Ttr0UvEHWFIhx+be3He8msoPzyA44/kfzzYoMAsCFRn5cf0zQG6al0znE75g6HlWVSN6s3yAh51A==", "requires": { - "web3-core-helpers": "1.2.8", + "web3-core-helpers": "1.2.9", "xhr2-cookies": "1.1.0" } }, "web3-providers-ipc": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.2.8.tgz", - "integrity": "sha512-ts3/UXCTRADPASdJ27vBVmcfM+lfG9QVBxGedY6+oNIo5EPxBUtsz94R32sfvFd6ofPsz6gOhK/M/ZKiJoi1sg==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.2.9.tgz", + "integrity": "sha512-NQ8QnBleoHA2qTJlqoWu7EJAD/FR5uimf7Ielzk4Z2z+m+6UAuJdJMSuQNj+Umhz9L/Ys6vpS1vHx9NizFl+aQ==", "requires": { "oboe": "2.1.4", "underscore": "1.9.1", - "web3-core-helpers": "1.2.8" + "web3-core-helpers": "1.2.9" } }, "web3-providers-ws": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.2.8.tgz", - "integrity": "sha512-Gcm0n82wd/XVeGFGTx+v56UqyrV9EyB2r1QFaBx4mS+VHbW2MCOdiRbNDfoZQslflnCWl8oHsivJ8Tya9kqlTQ==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.2.9.tgz", + "integrity": "sha512-6+UpvINeI//dglZoAKStUXqxDOXJy6Iitv2z3dbgInG4zb8tkYl/VBDL80UjUg3ZvzWG0g7EKY2nRPEpON2TFA==", "requires": { - "@web3-js/websocket": "^1.0.29", "eventemitter3": "^4.0.0", "underscore": "1.9.1", - "web3-core-helpers": "1.2.8" + "web3-core-helpers": "1.2.9", + "websocket": "^1.0.31" }, "dependencies": { "eventemitter3": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.4.tgz", "integrity": "sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ==" + }, + "websocket": { + "version": "1.0.31", + "resolved": "https://registry.npmjs.org/websocket/-/websocket-1.0.31.tgz", + "integrity": "sha512-VAouplvGKPiKFDTeCCO65vYHsyay8DqoBSlzIO3fayrfOgU94lQN5a1uWVnFrMLceTJw/+fQXR5PGbUVRaHshQ==", + "requires": { + "debug": "^2.2.0", + "es5-ext": "^0.10.50", + "nan": "^2.14.0", + "typedarray-to-buffer": "^3.1.5", + "yaeti": "^0.0.6" + } } } }, "web3-shh": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/web3-shh/-/web3-shh-1.2.8.tgz", - "integrity": "sha512-e29qKSfuZWDmxCG/uB48Nth6DCFFr2h2U+uI/fHEuhEjAEkBHopPNLc3ixrCTc6pqMocfJRPHJq/yET9PYN3oQ==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-shh/-/web3-shh-1.2.9.tgz", + "integrity": "sha512-PWa8b/EaxaMinFaxy6cV0i0EOi2M7a/ST+9k9nhyhCjVa2vzXuNoBNo2IUOmeZ0WP2UQB8ByJ2+p4htlJaDOjA==", "requires": { - "web3-core": "1.2.8", - "web3-core-method": "1.2.8", - "web3-core-subscriptions": "1.2.8", - "web3-net": "1.2.8" + "web3-core": "1.2.9", + "web3-core-method": "1.2.9", + "web3-core-subscriptions": "1.2.9", + "web3-net": "1.2.9" } }, "web3-utils": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.2.8.tgz", - "integrity": "sha512-9SIVGFLajwlmo5joC4DGxuy2OeDkRCXVWT8JWcDQ+BayNVHyAWGvn0oGkQ0ys14Un0KK6bjjKoD0xYs4k+FaVw==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.2.9.tgz", + "integrity": "sha512-9hcpuis3n/LxFzEVjwnVgvJzTirS2S9/MiNAa7l4WOEoywY+BSNwnRX4MuHnjkh9NY25B6QOjuNG6FNnSjTw1w==", "requires": { "bn.js": "4.11.8", "eth-lib": "0.2.7", @@ -15421,9 +15606,9 @@ } }, "windows-release": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/windows-release/-/windows-release-3.3.0.tgz", - "integrity": "sha512-2HetyTg1Y+R+rUgrKeUEhAG/ZuOmTrI1NBb3ZyAGQMYmOJjBBPe4MTodghRkmLJZHwkuPi02anbeGP+Zf401LQ==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/windows-release/-/windows-release-3.3.1.tgz", + "integrity": "sha512-Pngk/RDCaI/DkuHPlGTdIkDiTAnAkyMjoQMZqRsxydNl1qGXNIoZrB7RK8g53F2tEgQBMqQJHQdYZuQEEAu54A==", "dev": true, "requires": { "execa": "^1.0.0" @@ -15467,6 +15652,12 @@ "errno": "~0.1.7" } }, + "workerpool": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.0.0.tgz", + "integrity": "sha512-fU2OcNA/GVAJLLyKUoHkAgIhKb0JoCpSjLC/G2vYKxUjVmQwGbRVeoPJ1a8U4pnVofz4AQV5Y/NEw8oKqxEBtA==", + "dev": true + }, "wrap-ansi": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", diff --git a/package.json b/package.json index 52166316e..bb76acfc3 100644 --- a/package.json +++ b/package.json @@ -6,10 +6,9 @@ "typings": "./dist/node/lib.d.ts", "unpkg": "./dist/browser/lib.cjs2.min.js", "scripts": { - "build": "npm run clean && npm run build:tsc && npm run build:dist", + "build": "npm run clean && npm run build:metadata && npm run build:tsc", "build:tsc": "tsc --sourceMap", "build:metadata": "./scripts/get-metadata.js > src/metadata.json", - "build:dist": "cross-env NODE_ENV=production webpack", "clean": "rm -rf ./dist/ ./doc/ ./.nyc_output", "lint": "eslint --ignore-path .gitignore --ext .ts,.tsx .", "format": "prettier --parser typescript --ignore-path .gitignore --write '**/*.{js,jsx,ts,tsx}'", @@ -41,40 +40,41 @@ "node-fetch": "^2.6.0", "save-file": "^2.3.1", "uuid": "^8.0.0", - "web3": "^1.2.6", + "web3": "^1.2.9", "web3-eth-contract": "^1.2.9", "whatwg-url": "^8.0.0" }, "devDependencies": { - "@release-it/bumper": "^1.1.0", + "@release-it/bumper": "^1.4.0", + "@oceanprotocol/contracts": "^0.2.0", "@truffle/hdwallet-provider": "^1.0.33", "@types/chai": "^4.2.11", "@types/chai-spies": "^1.0.1", "@types/mocha": "^7.0.2", - "@types/node": "^14.0.0", + "@types/node": "^14.0.13", "@types/node-fetch": "^2.5.5", "@types/sinon": "^9.0.0", "@typescript-eslint/eslint-plugin": "^2.23.0", "@typescript-eslint/parser": "^2.23.0", - "auto-changelog": "^2.0.0", + "auto-changelog": "^2.1.0", "chai": "^4.2.0", "chai-spies": "^1.0.0", "cross-env": "^7.0.2", "eslint": "^6.8.0", "eslint-config-oceanprotocol": "^1.5.0", "eslint-config-prettier": "^6.10.0", - "eslint-plugin-prettier": "^3.1.2", + "eslint-plugin-prettier": "^3.1.4", "lcov-result-merger": "^3.1.0", - "mocha": "^7.1.0", + "mocha": "^8.0.1", "mock-local-storage": "^1.1.11", - "nyc": "^15.0.0", + "nyc": "^15.1.0", "ora": "^4.0.2", - "prettier": "^1.19.1", + "prettier": "^2.0.5", "sinon": "^9.0.1", "source-map-support": "^0.5.16", - "ts-node": "^8.6.2", + "ts-node": "^8.10.2", "typedoc": "^0.17.1", - "typescript": "^3.8.3", + "typescript": "^3.9.5", "uglifyjs-webpack-plugin": "^2.2.0", "webpack": "^4.42.0", "webpack-cli": "^3.3.11", diff --git a/scripts/get-metadata.js b/scripts/get-metadata.js index a9844e866..dd0989cde 100755 --- a/scripts/get-metadata.js +++ b/scripts/get-metadata.js @@ -2,7 +2,6 @@ 'use strict' const packageInfo = require('../package.json') - const execSync = require('child_process').execSync process.stdout.write( diff --git a/src/aquarius/Aquarius.ts b/src/aquarius/Aquarius.ts index a96b3211b..8f1fe74ea 100644 --- a/src/aquarius/Aquarius.ts +++ b/src/aquarius/Aquarius.ts @@ -1,7 +1,7 @@ import { URL } from 'whatwg-url' import { DDO } from '../ddo/DDO' import DID from '../ocean/DID' -import { EditableMetaData } from '../ddo/MetaData' +import { EditableMetadata } from '../ddo/interfaces/EditableMetadata' import { Logger } from '../utils' import { WebServiceConnector } from '../ocean/utils/WebServiceConnector' @@ -64,7 +64,7 @@ export class Aquarius { this.logger.error('Success accessing consume endpoint: ', consumptionUrl) return consumptionUrl }) - .catch(error => { + .catch((error) => { this.logger.error( 'Error fetching the data asset consumption url: ', error @@ -94,10 +94,10 @@ export class Aquarius { ) return this.transformResult() }) - .then(results => { + .then((results) => { return this.transformResult(results) }) - .catch(error => { + .catch((error) => { this.logger.error('Error fetching querying metadata: ', error) return this.transformResult() }) @@ -133,10 +133,10 @@ export class Aquarius { ) return this.transformResult() }) - .then(results => { + .then((results) => { return this.transformResult(results) }) - .catch(error => { + .catch((error) => { this.logger.error('Error fetching querying metadata by text: ', error) return this.transformResult() }) @@ -168,7 +168,7 @@ export class Aquarius { .then((response: DDO) => { return new DDO(response) as DDO }) - .catch(error => { + .catch((error) => { this.logger.error('Error fetching querying metadata: ', error) return null as DDO }) @@ -204,7 +204,7 @@ export class Aquarius { .then((response: DDO) => { return new DDO(response) as DDO }) - .catch(error => { + .catch((error) => { this.logger.error('Error fetching querying metadata: ', error) return null as DDO }) @@ -253,7 +253,7 @@ export class Aquarius { return null }) - .catch(error => { + .catch((error) => { this.logger.error('Error transfering ownership metadata: ', error) return null }) @@ -307,7 +307,7 @@ export class Aquarius { return null }) - .catch(error => { + .catch((error) => { this.logger.error('Error updating compute privacy: ', error) return null }) @@ -318,14 +318,14 @@ export class Aquarius { /** * Edit Metadata for a DDO. * @param {did} string DID. - * @param {newMetadata} EditableMetaData Metadata fields & new values. + * @param {newMetadata} EditableMetadata Metadata fields & new values. * @param {String} updated Updated field of the DDO * @param {String} signature Signature using updated field to verify that the consumer has rights * @return {Promise} Result. */ public async editMetadata( did: DID | string, - newMetadata: EditableMetaData, + newMetadata: EditableMetadata, updated: string, signature: string ): Promise { @@ -353,7 +353,7 @@ export class Aquarius { return null }) - .catch(error => { + .catch((error) => { this.logger.error('Error transfering ownership metadata: ', error) return null }) @@ -391,7 +391,7 @@ export class Aquarius { return null }) - .catch(error => { + .catch((error) => { this.logger.error('Error transfering ownership metadata: ', error) return null }) @@ -416,7 +416,7 @@ export class Aquarius { } ): QueryResult { return { - results: (results || []).map(ddo => new DDO(ddo as DDO)), + results: (results || []).map((ddo) => new DDO(ddo as DDO)), page, totalPages, totalResults diff --git a/src/brizo/Brizo.ts b/src/brizo/Brizo.ts index fbd7433f7..6dc55aa09 100644 --- a/src/brizo/Brizo.ts +++ b/src/brizo/Brizo.ts @@ -1,15 +1,14 @@ -import { File, MetaDataAlgorithm } from '../ddo/MetaData' import Account from '../ocean/Account' -import { noZeroX, noDidPrefixed } from '../utils' +import { noZeroX } from '../utils' import { Instantiable, InstantiableConfig } from '../Instantiable.abstract' -import { DDO } from '../ddo/DDO' -import { ServiceType } from '../ddo/Service' const apiPath = '/api/v1/brizo/services' /** - * Provides a interface with Brizo. - * Brizo is the technical component executed by the Publishers allowing to them to provide extended data services. + * Provides an interface for provider service. + * Provider service is the technical component executed + * by the Publishers allowing to them to provide extended + * data services. */ export class Brizo extends Instantiable { private get url() { diff --git a/src/datatokens/Datatokens.ts b/src/datatokens/Datatokens.ts index 3024db665..30e6f4ae8 100644 --- a/src/datatokens/Datatokens.ts +++ b/src/datatokens/Datatokens.ts @@ -1,11 +1,10 @@ import Account from '../ocean/Account' -const defaultFactoryABI = require('../datatokens/FactoryABI.json') -const defaultDatatokensABI = require('../datatokens/DatatokensABI.json') +import * as defaultFactoryABI from '@oceanprotocol/contracts/artifacts/development/Factory.json' +import * as defaultDatatokensABI from '@oceanprotocol/contracts/artifacts/development/DataTokenTemplate.json' /** * Provides a interface to DataTokens - */ export class DataTokens { public factoryAddress: string @@ -40,34 +39,13 @@ export class DataTokens { * @param {Account} account * @return {Promise} datatoken address */ - public async create( - metaDataStoreURI: string, - account: Account - ): Promise { + public async create(metaDataStoreURI: string, account: Account): Promise { // Create factory contract object + const tokenAddress = null const factory = new this.web3.eth.Contract(this.factoryABI, this.factoryAddress, { from: account }) - const estGas = await factory.methods - .createToken(metaDataStoreURI) - .estimateGas(function(err, estGas){ - return estGas - }) - // Invoke createToken function of the contract - const trxReceipt = await factory.methods - .createToken(metaDataStoreURI) - .send({ - from: account, - gas: estGas+1, - gasPrice: '3000000000' - }) - - let tokenAddress = null - try { - tokenAddress = trxReceipt.events.TokenCreated.returnValues[0] - } catch (e) { - console.error(e) - } + // TODO: return tokenAddress } @@ -114,19 +92,8 @@ export class DataTokens { dataTokenAddress, { from: account } ) - - const estGas = await datatoken.methods.mint(address, amount) - .estimateGas(function(err, estGas){ - return estGas - }) - - const trxReceipt = await datatoken.methods.mint(address, amount) - .send({ - from:account, - gas: estGas*2, - gasPrice: '3000000000' - }) - + const trxReceipt = null + // TODO: return trxReceipt } @@ -253,4 +220,4 @@ export class DataTokens { const trxReceipt = await datatoken.methods.cap().call() return trxReceipt } -} \ No newline at end of file +} diff --git a/src/datatokens/DatatokensABI.json b/src/datatokens/DatatokensABI.json deleted file mode 100644 index e090a0e75..000000000 --- a/src/datatokens/DatatokensABI.json +++ /dev/null @@ -1,450 +0,0 @@ -[ - { - "constant": false, - "inputs": [ - { - "name": "spender", - "type": "address" - }, - { - "name": "value", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "from", - "type": "address" - }, - { - "name": "to", - "type": "address" - }, - { - "name": "value", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "spender", - "type": "address" - }, - { - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "spender", - "type": "address" - }, - { - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "to", - "type": "address" - }, - { - "name": "value", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "owner", - "type": "address" - }, - { - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "name": "name", - "type": "string" - }, - { - "name": "symbol", - "type": "string" - }, - { - "name": "minter", - "type": "address" - }, - { - "name": "cap", - "type": "uint256" - }, - { - "name": "blob", - "type": "string" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "from", - "type": "address" - }, - { - "indexed": true, - "name": "to", - "type": "address" - }, - { - "indexed": false, - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "constant": false, - "inputs": [ - { - "name": "name", - "type": "string" - }, - { - "name": "symbol", - "type": "string" - }, - { - "name": "minter", - "type": "address" - }, - { - "name": "cap", - "type": "uint256" - }, - { - "name": "blob", - "type": "string" - } - ], - "name": "initialize", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "account", - "type": "address" - }, - { - "name": "value", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [], - "payable": true, - "stateMutability": "payable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "pause", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "unpause", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "minter", - "type": "address" - } - ], - "name": "setMinter", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "blob", - "outputs": [ - { - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "cap", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "account", - "type": "address" - } - ], - "name": "isMinter", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isInitialized", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isPaused", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ] \ No newline at end of file diff --git a/src/datatokens/FactoryABI.json b/src/datatokens/FactoryABI.json deleted file mode 100644 index b4eab0e7d..000000000 --- a/src/datatokens/FactoryABI.json +++ /dev/null @@ -1,150 +0,0 @@ -[ - { - "constant": true, - "inputs": [ - { - "name": "str1", - "type": "string" - }, - { - "name": "str2", - "type": "string" - } - ], - "name": "concatenateStrings", - "outputs": [ - { - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "pure", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "value", - "type": "uint256" - } - ], - "name": "uintToString", - "outputs": [ - { - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "name": "_template", - "type": "address" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "newTokenAddress", - "type": "address" - }, - { - "indexed": false, - "name": "templateAddress", - "type": "address" - }, - { - "indexed": false, - "name": "tokenName", - "type": "string" - } - ], - "name": "TokenCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "tokenAddress", - "type": "address" - }, - { - "indexed": true, - "name": "tokenName", - "type": "string" - }, - { - "indexed": true, - "name": "tokenSymbol", - "type": "string" - }, - { - "indexed": false, - "name": "tokenCap", - "type": "uint256" - }, - { - "indexed": false, - "name": "RegisteredBy", - "type": "address" - }, - { - "indexed": false, - "name": "RegisteredAt", - "type": "uint256" - }, - { - "indexed": false, - "name": "blob", - "type": "string" - } - ], - "name": "TokenRegistered", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "instance", - "type": "address" - } - ], - "name": "InstanceDeployed", - "type": "event" - }, - { - "constant": false, - "inputs": [ - { - "name": "blob", - "type": "string" - } - ], - "name": "createToken", - "outputs": [ - { - "name": "token", - "type": "address" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - } - ] \ No newline at end of file diff --git a/src/ddo/DDO.ts b/src/ddo/DDO.ts index 2427e1dd1..5840db7cd 100644 --- a/src/ddo/DDO.ts +++ b/src/ddo/DDO.ts @@ -1,8 +1,8 @@ import { Ocean } from '../ocean/Ocean' -import { Authentication } from './Authentication' -import { Proof } from './Proof' -import { PublicKey } from './PublicKey' -import { Service, ServiceType } from './Service' +import { Authentication } from './interfaces/Authentication' +import { Proof } from './interfaces/Proof' +import { PublicKey } from './interfaces/PublicKey' +import { Service, ServiceType } from './interfaces/Service' /** * DID Descriptor Object. @@ -72,7 +72,7 @@ export class DDO { throw new Error('index is not set') } - const service = this.service.find(s => s.index === index) + const service = this.service.find((s) => s.index === index) return service as Service } @@ -87,7 +87,7 @@ export class DDO { throw new Error('serviceType not set') } - return this.service.find(s => s.type === serviceType) as Service + return this.service.find((s) => s.type === serviceType) as Service } /** @@ -100,7 +100,7 @@ export class DDO { const { files, name, author, license } = attributes.main const values = [ - ...(files || []).map(({ checksum }) => checksum).filter(_ => !!_), + ...(files || []).map(({ checksum }) => checksum).filter((_) => !!_), name, author, license, diff --git a/src/ddo/MetaData.ts b/src/ddo/MetaData.ts deleted file mode 100644 index f2690d899..000000000 --- a/src/ddo/MetaData.ts +++ /dev/null @@ -1,303 +0,0 @@ -export interface File { - /** - * File name. - * @type {string} - */ - name?: string - - /** - * File URL. - * @type {string} - */ - url: string - - /** - * File index. - * @type {number} - */ - index?: number - - /** - * File format, if applicable. - * @type {string} - * @example "text/csv" - */ - contentType: string - - /** - * File checksum. - * @type {[type]} - */ - checksum?: string - - /** - * Checksum hash algorithm. - * @type {[type]} - */ - checksumType?: string - - /** - * File content length. - * @type {[type]} - */ - contentLength?: string - - /** - * Resource ID (depending on the source). - * @type {[type]} - */ - resourceId?: string - - /** - * File encoding. - * @type {string} - * @example "UTF-8" - */ - encoding?: string - - /** - * File compression (e.g. no, gzip, bzip2, etc). - * @type {string} - * @example "zip" - */ - compression?: string -} - -export interface MetaDataAlgorithm { - url?: string - rawcode?: string - language?: string - format?: string - version?: string - container: { - entrypoint: string - image: string - tag: string - } -} - -/** - * Main attributes of assets metadata. - * @see https://github.com/oceanprotocol/OEPs/tree/master/8 - */ -export interface MetaDataMain { - /** - * Descriptive name of the Asset. - * @type {string} - * @example "UK Weather information 2011" - */ - name: string - - /** - * Type of the Asset. Helps to filter by the type of asset ("dataset" or "algorithm"). - * @type {string} - * @example "dataset" - */ - type: 'dataset' | 'algorithm' - - /** - * The date on which the asset was created by the originator in - * ISO 8601 format, Coordinated Universal Time. - * @type {string} - * @example "2019-01-31T08:38:32Z" - */ - dateCreated: string - - /** - * The date on which the asset DDO was registered into the metadata store. - * This value is created automatically by Aquarius upon registering, - * so this value can't be set. - * @type {string} - * @example "2019-01-31T08:38:32Z" - */ - datePublished?: string - - /** - * Name of the entity generating this data (e.g. Tfl, Disney Corp, etc.). - * @type {string} - * @example "Met Office" - */ - author: string - - /** - * Short name referencing the license of the asset (e.g. Public Domain, CC-0, CC-BY, No License Specified, etc. ). - * If it's not specified, the following value will be added: "No License Specified". - * @type {string} - * @example "CC-BY" - */ - license: string - - /** - * Price of the asset in vodka (attoOCEAN). It must be an integer encoded as a string. - * @type {string} - * @example "1000000000000000000" - */ - price: string - - /** - * Array of File objects including the encrypted file urls and some additional information. - * @type {File[]} - */ - files: File[] - - /** - * Metadata used only for assets with type `algorithm`. - * @type {MetaDataAlgorithm} - */ - algorithm?: MetaDataAlgorithm -} - -/** - * Curation attributes of Assets Metadata. - * @see https://github.com/oceanprotocol/OEPs/tree/master/8 - */ -export interface Curation { - /** - * Decimal value between 0 and 1. 0 is the default value. - * @type {number} - * @example 0.93 - */ - rating: number - - /** - * Number of votes. 0 is the default value. - * @type {number} - * @example 123 - */ - numVotes: number - - /** - * Schema applied to calculate the rating. - * @type {string} - * @example "Binary Voting" - */ - schema?: string - - /** - * Flag unsuitable content. - * @type {boolean} - * @example true - */ - isListed?: boolean -} - -/** - * Additional Information of Assets Metadata. - * @see https://github.com/oceanprotocol/OEPs/tree/master/8#additional-information - */ -export interface AdditionalInformation { - /** - * Details of what the resource is. For a dataset, this attribute - * explains what the data represents and what it can be used for. - * @type {string} - * @example "Weather information of UK including temperature and humidity" - */ - description?: string - - /** - * The party holding the legal copyright. Empty by default. - * @type {string} - * @example "Met Office" - */ - copyrightHolder?: string - - /** - * Example of the concept of this asset. This example is part - * of the metadata, not an external link. - * @type {string} - * @example "423432fsd,51.509865,-0.118092,2011-01-01T10:55:11+00:00,7.2,68" - */ - workExample?: string - - /** - * Mapping of links for data samples, or links to find out more information. - * Links may be to either a URL or another Asset. We expect marketplaces to - * converge on agreements of typical formats for linked data: The Ocean Protocol - * itself does not mandate any specific formats as these requirements are likely - * to be domain-specific. - * @type {any[]} - * @example - * [ - * { - * anotherSample: "http://data.ceda.ac.uk/badc/ukcp09/data/gridded-land-obs/gridded-land-obs-daily/", - * }, - * { - * fieldsDescription: "http://data.ceda.ac.uk/badc/ukcp09/", - * }, - * ] - */ - links?: { [name: string]: string }[] - - /** - * The language of the content. Please use one of the language - * codes from the {@link https://tools.ietf.org/html/bcp47 IETF BCP 47 standard}. - * @type {String} - * @example "en" - */ - inLanguage?: string - - /** - * Categories used to describe this content. Empty by default. - * @type {string[]} - * @example ["Economy", "Data Science"] - */ - categories?: string[] - - /** - * Keywords or tags used to describe this content. Empty by default. - * @type {string[]} - * @example ["weather", "uk", "2011", "temperature", "humidity"] - */ - tags?: string[] - - /** - * An indication of update latency - i.e. How often are updates expected (seldom, - * annually, quarterly, etc.), or is the resource static that is never expected - * to get updated. - * @type {string} - * @example "yearly" - */ - updateFrequency?: string - - /** - * A link to machine-readable structured markup (such as ttl/json-ld/rdf) - * describing the dataset. - * @type {StructuredMarkup[]} - */ - structuredMarkup?: { - uri: string - mediaType: string - }[] -} - -export interface MetaData { - main: MetaDataMain - encryptedFiles?: string - additionalInformation?: AdditionalInformation - curation?: Curation -} -/** Warning. serviceIndex is the index of a services in Services array, and not service.index attribute. -Let's assume that you have the following services array: -[ - {"index":1,"type":"access","main":{"price":3}}, - {"index":0,"type":"compute","main":{"price":1}} -] -then calling update with { serviceIndex:1,price:2} will update the 'compute' service, and not the access one -**/ -export interface ServicePrices { - serviceIndex: number - price: string -} - -export interface EditableMetaDataLinks { - name: string - url: string - type: string -} - -export interface EditableMetaData { - description?: string - title?: string - links?: EditableMetaDataLinks[] - servicePrices?: ServicePrices[] -} diff --git a/src/ddo/interfaces/AdditionalInformation.ts b/src/ddo/interfaces/AdditionalInformation.ts new file mode 100644 index 000000000..98be0988b --- /dev/null +++ b/src/ddo/interfaces/AdditionalInformation.ts @@ -0,0 +1,88 @@ +/** + * Additional Information of Assets Metadata. + * @see https://github.com/oceanprotocol/OEPs/tree/master/8#additional-information + */ +export interface AdditionalInformation { + /** + * Details of what the resource is. For a dataset, this attribute + * explains what the data represents and what it can be used for. + * @type {string} + * @example "Weather information of UK including temperature and humidity" + */ + description?: string + + /** + * The party holding the legal copyright. Empty by default. + * @type {string} + * @example "Met Office" + */ + copyrightHolder?: string + + /** + * Example of the concept of this asset. This example is part + * of the metadata, not an external link. + * @type {string} + * @example "423432fsd,51.509865,-0.118092,2011-01-01T10:55:11+00:00,7.2,68" + */ + workExample?: string + + /** + * Mapping of links for data samples, or links to find out more information. + * Links may be to either a URL or another Asset. We expect marketplaces to + * converge on agreements of typical formats for linked data: The Ocean Protocol + * itself does not mandate any specific formats as these requirements are likely + * to be domain-specific. + * @type {any[]} + * @example + * [ + * { + * anotherSample: "http://data.ceda.ac.uk/badc/ukcp09/data/gridded-land-obs/gridded-land-obs-daily/", + * }, + * { + * fieldsDescription: "http://data.ceda.ac.uk/badc/ukcp09/", + * }, + * ] + */ + links?: { [name: string]: string }[] + + /** + * The language of the content. Please use one of the language + * codes from the {@link https://tools.ietf.org/html/bcp47 IETF BCP 47 standard}. + * @type {String} + * @example "en" + */ + inLanguage?: string + + /** + * Categories used to describe this content. Empty by default. + * @type {string[]} + * @example ["Economy", "Data Science"] + */ + categories?: string[] + + /** + * Keywords or tags used to describe this content. Empty by default. + * @type {string[]} + * @example ["weather", "uk", "2011", "temperature", "humidity"] + */ + tags?: string[] + + /** + * An indication of update latency - i.e. How often are updates expected (seldom, + * annually, quarterly, etc.), or is the resource static that is never expected + * to get updated. + * @type {string} + * @example "yearly" + */ + updateFrequency?: string + + /** + * A link to machine-readable structured markup (such as ttl/json-ld/rdf) + * describing the dataset. + * @type {StructuredMarkup[]} + */ + structuredMarkup?: { + uri: string + mediaType: string + }[] +} diff --git a/src/ddo/Authentication.ts b/src/ddo/interfaces/Authentication.ts similarity index 100% rename from src/ddo/Authentication.ts rename to src/ddo/interfaces/Authentication.ts diff --git a/src/ddo/interfaces/Curation.ts b/src/ddo/interfaces/Curation.ts new file mode 100644 index 000000000..31e36bffd --- /dev/null +++ b/src/ddo/interfaces/Curation.ts @@ -0,0 +1,33 @@ +/** + * Curation attributes of Assets Metadata. + * @see https://github.com/oceanprotocol/OEPs/tree/master/8 + */ +export interface Curation { + /** + * Decimal value between 0 and 1. 0 is the default value. + * @type {number} + * @example 0.93 + */ + rating: number + + /** + * Number of votes. 0 is the default value. + * @type {number} + * @example 123 + */ + numVotes: number + + /** + * Schema applied to calculate the rating. + * @type {string} + * @example "Binary Voting" + */ + schema?: string + + /** + * Flag unsuitable content. + * @type {boolean} + * @example true + */ + isListed?: boolean +} diff --git a/src/ddo/interfaces/EditableMetadata.ts b/src/ddo/interfaces/EditableMetadata.ts new file mode 100644 index 000000000..edfebda17 --- /dev/null +++ b/src/ddo/interfaces/EditableMetadata.ts @@ -0,0 +1,9 @@ +import { EditableMetadataLinks } from './EditableMetadataLinks' +import { ServicePrices } from './ServicePrices' + +export interface EditableMetadata { + description?: string + title?: string + links?: EditableMetadataLinks[] + servicePrices?: ServicePrices[] +} diff --git a/src/ddo/interfaces/EditableMetadataLinks.ts b/src/ddo/interfaces/EditableMetadataLinks.ts new file mode 100644 index 000000000..d0365185f --- /dev/null +++ b/src/ddo/interfaces/EditableMetadataLinks.ts @@ -0,0 +1,5 @@ +export interface EditableMetadataLinks { + name: string + url: string + type: string +} diff --git a/src/ddo/interfaces/File.ts b/src/ddo/interfaces/File.ts new file mode 100644 index 000000000..90ed24e22 --- /dev/null +++ b/src/ddo/interfaces/File.ts @@ -0,0 +1,64 @@ +export interface File { + /** + * File name. + * @type {string} + */ + name?: string + + /** + * File URL. + * @type {string} + */ + url: string + + /** + * File index. + * @type {number} + */ + index?: number + + /** + * File format, if applicable. + * @type {string} + * @example "text/csv" + */ + contentType: string + + /** + * File checksum. + * @type {[type]} + */ + checksum?: string + + /** + * Checksum hash algorithm. + * @type {[type]} + */ + checksumType?: string + + /** + * File content length. + * @type {[type]} + */ + contentLength?: string + + /** + * Resource ID (depending on the source). + * @type {[type]} + */ + resourceId?: string + + /** + * File encoding. + * @type {string} + * @example "UTF-8" + */ + encoding?: string + + /** + * File compression (e.g. no, gzip, bzip2, etc). + * @type {string} + * @example "zip" + */ + compression?: string +} diff --git a/src/ddo/interfaces/Metadata.ts b/src/ddo/interfaces/Metadata.ts new file mode 100644 index 000000000..bb6c814ae --- /dev/null +++ b/src/ddo/interfaces/Metadata.ts @@ -0,0 +1,10 @@ +import { MetadataMain } from './MetadataMain' +import { AdditionalInformation } from './AdditionalInformation' +import { Curation } from './Curation' + +export interface Metadata { + main: MetadataMain + encryptedFiles?: string + additionalInformation?: AdditionalInformation + curation?: Curation +} diff --git a/src/ddo/interfaces/MetadataAlgorithm.ts b/src/ddo/interfaces/MetadataAlgorithm.ts new file mode 100644 index 000000000..c5b5a9ef0 --- /dev/null +++ b/src/ddo/interfaces/MetadataAlgorithm.ts @@ -0,0 +1,12 @@ +export interface MetadataAlgorithm { + url?: string + rawcode?: string + language?: string + format?: string + version?: string + container: { + entrypoint: string + image: string + tag: string + } +} diff --git a/src/ddo/interfaces/MetadataMain.ts b/src/ddo/interfaces/MetadataMain.ts new file mode 100644 index 000000000..c567dacc0 --- /dev/null +++ b/src/ddo/interfaces/MetadataMain.ts @@ -0,0 +1,73 @@ +import { MetadataAlgorithm } from './MetadataAlgorithm' +import { File } from './File' + +/** + * Main attributes of assets metadata. + * @see https://github.com/oceanprotocol/OEPs/tree/master/8 + */ +export interface MetadataMain { + /** + * Descriptive name of the Asset. + * @type {string} + * @example "UK Weather information 2011" + */ + name: string + + /** + * Type of the Asset. Helps to filter by the type of asset ("dataset" or "algorithm"). + * @type {string} + * @example "dataset" + */ + type: 'dataset' | 'algorithm' + + /** + * The date on which the asset was created by the originator in + * ISO 8601 format, Coordinated Universal Time. + * @type {string} + * @example "2019-01-31T08:38:32Z" + */ + dateCreated: string + + /** + * The date on which the asset DDO was registered into the metadata store. + * This value is created automatically by Aquarius upon registering, + * so this value can't be set. + * @type {string} + * @example "2019-01-31T08:38:32Z" + */ + datePublished?: string + + /** + * Name of the entity generating this data (e.g. Tfl, Disney Corp, etc.). + * @type {string} + * @example "Met Office" + */ + author: string + + /** + * Short name referencing the license of the asset (e.g. Public Domain, CC-0, CC-BY, No License Specified, etc. ). + * If it's not specified, the following value will be added: "No License Specified". + * @type {string} + * @example "CC-BY" + */ + license: string + + /** + * Price of the asset in vodka (attoOCEAN). It must be an integer encoded as a string. + * @type {string} + * @example "1000000000000000000" + */ + price: string + + /** + * Array of File objects including the encrypted file urls and some additional information. + * @type {File[]} + */ + files: File[] + + /** + * Metadata used only for assets with type `algorithm`. + * @type {MetaDataAlgorithm} + */ + algorithm?: MetadataAlgorithm +} diff --git a/src/ddo/Proof.ts b/src/ddo/interfaces/Proof.ts similarity index 100% rename from src/ddo/Proof.ts rename to src/ddo/interfaces/Proof.ts diff --git a/src/ddo/PublicKey.ts b/src/ddo/interfaces/PublicKey.ts similarity index 100% rename from src/ddo/PublicKey.ts rename to src/ddo/interfaces/PublicKey.ts diff --git a/src/ddo/Service.ts b/src/ddo/interfaces/Service.ts similarity index 97% rename from src/ddo/Service.ts rename to src/ddo/interfaces/Service.ts index 7f2479daf..0f94f0bff 100644 --- a/src/ddo/Service.ts +++ b/src/ddo/interfaces/Service.ts @@ -1,4 +1,4 @@ -import { MetaData } from './MetaData' +import { Metadata } from './Metadata' export type ServiceType = 'authorization' | 'metadata' | 'access' | 'compute' @@ -69,7 +69,7 @@ export interface ServiceComputeProvider { export interface ServiceMetadata extends ServiceCommon { type: 'metadata' - attributes: MetaData + attributes: Metadata } export interface ServiceAccess extends ServiceCommon { diff --git a/src/ddo/interfaces/ServicePrices.ts b/src/ddo/interfaces/ServicePrices.ts new file mode 100644 index 000000000..afef8b225 --- /dev/null +++ b/src/ddo/interfaces/ServicePrices.ts @@ -0,0 +1,4 @@ +export interface ServicePrices { + serviceIndex: number + price: string +} diff --git a/src/lib.ts b/src/lib.ts index 418080e31..11bd17dd0 100644 --- a/src/lib.ts +++ b/src/lib.ts @@ -11,7 +11,7 @@ import * as utils from './utils' // Exports export * from './ddo/DDO' -export * from './ddo/MetaData' +export * from './ddo/interfaces/Metadata' export { CreateProgressStep, OrderProgressStep } from './ocean/Assets' diff --git a/src/ocean/Accounts.ts b/src/ocean/Accounts.ts index 8ff6a7311..041a69bad 100644 --- a/src/ocean/Accounts.ts +++ b/src/ocean/Accounts.ts @@ -25,7 +25,7 @@ export class Accounts extends Instantiable { const ethAccounts: string[] = await this.web3.eth.getAccounts() const accountPromises = ethAccounts.map( - address => new Account(address, this.instanceConfig) + (address) => new Account(address, this.instanceConfig) ) return Promise.all(accountPromises) } diff --git a/src/ocean/Assets.ts b/src/ocean/Assets.ts index 1f2d083a1..076a94dfd 100644 --- a/src/ocean/Assets.ts +++ b/src/ocean/Assets.ts @@ -1,8 +1,8 @@ import { TransactionReceipt } from 'web3-core' import { SearchQuery } from '../aquarius/Aquarius' import { DDO } from '../ddo/DDO' -import { MetaData, EditableMetaData } from '../ddo/MetaData' -import { Service, ServiceAccess, ServiceComputePrivacy } from '../ddo/Service' +import { Metadata } from '../ddo/interfaces/Metadata' +import { Service } from '../ddo/interfaces/Service' import Account from './Account' import DID from './DID' import { SubscribablePromise, didZeroX } from '../utils' @@ -52,8 +52,7 @@ export class Assets extends Instantiable { const publisherURI = this.ocean.brizo.getURI() const jsonBlob = { t: 0, url: publisherURI } const { datatokens } = this.ocean - return datatokens.create( JSON.stringify(jsonBlob), publisher) - + return datatokens.create(JSON.stringify(jsonBlob), publisher) } /** @@ -64,13 +63,13 @@ export class Assets extends Instantiable { * @return {Promise} */ public create( - metadata: MetaData, + metadata: Metadata, publisher: Account, services: Service[] = [], dtAddress?: string ): SubscribablePromise { this.logger.log('Creating asset') - return new SubscribablePromise(async observer => { + return new SubscribablePromise(async (observer) => { if (services.length === 0) { this.logger.log('You have no services. Are you sure about this?') } @@ -80,7 +79,7 @@ export class Assets extends Instantiable { const metadataStoreURI = this.ocean.aquarius.getURI() const jsonBlob = { t: 1, url: metadataStoreURI } const { datatokens } = this.ocean - dtAddress = await datatokens.create(JSON.stringify(jsonBlob), publisher ) + dtAddress = await datatokens.create(JSON.stringify(jsonBlob), publisher) this.logger.log('DataToken creted') observer.next(CreateProgressStep.DataTokenCreated) } @@ -149,7 +148,7 @@ export class Assets extends Instantiable { ) .reverse() // Adding index - .map(_ => ({ + .map((_) => ({ ..._, index: indexCount++ })) as Service[] diff --git a/src/utils/ConfigHelper.ts b/src/utils/ConfigHelper.ts index c2129a8ac..69b5afcc2 100644 --- a/src/utils/ConfigHelper.ts +++ b/src/utils/ConfigHelper.ts @@ -25,7 +25,7 @@ export class ConfigHelper { confighelp.factoryAddress = null confighelp.url = null confighelp.network = network - const knownconfig = configs.find(c => c.network === network) + const knownconfig = configs.find((c) => c.network === network) if (knownconfig) { confighelp.factoryAddress = knownconfig.factoryAddress confighelp.url = knownconfig.url diff --git a/src/utils/SubscribableObserver.ts b/src/utils/SubscribableObserver.ts index efeb41167..9e9160541 100644 --- a/src/utils/SubscribableObserver.ts +++ b/src/utils/SubscribableObserver.ts @@ -39,7 +39,7 @@ export class SubscribableObserver { private emit(type: 'onNext' | 'onComplete' | 'onError', value: any) { Array.from(this.subscriptions) - .map(subscription => subscription[type]) + .map((subscription) => subscription[type]) .filter((callback: any) => callback && typeof callback === 'function') .forEach((callback: any) => callback(value)) } diff --git a/src/utils/SubscribablePromise.ts b/src/utils/SubscribablePromise.ts index 1ff71fb13..ee4b0acb0 100644 --- a/src/utils/SubscribablePromise.ts +++ b/src/utils/SubscribablePromise.ts @@ -42,12 +42,12 @@ export class SubscribablePromise { const execution = executor(this.observer) Promise.resolve(execution as any) - .then(result => { + .then((result) => { if (typeof (execution as any).then === 'function') { this.observer.complete(result) } }) - .catch(result => { + .catch((result) => { if (typeof (execution as any).then === 'function') { this.observer.error(result) } diff --git a/test/integration/tsconfig.json b/test/integration/tsconfig.json new file mode 100644 index 000000000..59e935224 --- /dev/null +++ b/test/integration/tsconfig.json @@ -0,0 +1,9 @@ +{ + "compilerOptions": { + "resolveJsonModule": true, + "lib": ["es6", "es7", "dom"], + "noUnusedLocals": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true + } + } \ No newline at end of file diff --git a/test/unit/Datatokens.test.ts b/test/unit/Datatokens.test.ts deleted file mode 100644 index e362cfa9e..000000000 --- a/test/unit/Datatokens.test.ts +++ /dev/null @@ -1,66 +0,0 @@ -import { assert } from 'chai' -import { TestContractHandler } from './TestContractHandler' -import { DataTokens } from '../../src/datatokens/Datatokens' - -const Web3 = require('web3') -const web3 = new Web3("http://127.0.0.1:8545") - -const factoryABI = require('../../src/datatokens/FactoryABI.json') -const datatokensABI = require('../../src/datatokens/DatatokensABI.json') - -describe('DataTokens', () => { - - let minter - let spender - let balance - let contracts - let datatoken - let tokenAddress - - let tokenAmount = 100 - let blob = 'https://example.com/dataset-1' - - describe('#test', () => { - it('should deploy contracts', async () => { - contracts = new TestContractHandler(factoryABI,datatokensABI) - await contracts.getAccounts() - minter = contracts.accounts[0] - spender = contracts.accounts[1] - await contracts.deployContracts(minter) - }) - - it('should create Datatoken object', async () => { - datatoken = new DataTokens(contracts.factoryAddress, factoryABI, datatokensABI, web3) - assert(datatoken !== null) - }) - - it('should create Datatoken contract', async () => { - tokenAddress = await datatoken.create(blob, minter) - assert(tokenAddress !== null) - }) - - it('should mint Datatokens', async () => { - await datatoken.mint(tokenAddress, minter, tokenAmount) - balance = await datatoken.balance(tokenAddress, minter) - assert(balance.toString() === tokenAmount.toString()) - }) - - it('should transfer Datatokens to spender', async () => { - await datatoken.transfer(tokenAddress, spender, tokenAmount, minter) - balance = await datatoken.balance(tokenAddress, spender) - assert(balance.toString() === tokenAmount.toString()) - - }) - - it('should approve Datatokens to spend', async () => { - await datatoken.approve(tokenAddress, minter, tokenAmount, spender) - }) - - it('should transferFrom Datatokens back to the minter', async () => { - await datatoken.transferFrom(tokenAddress, spender, tokenAmount, minter) - minter = await datatoken.balance(tokenAddress, spender) - assert(balance.toString() === tokenAmount.toString()) - }) - - }) -}) \ No newline at end of file diff --git a/test/unit/TestContractHandler.ts b/test/unit/TestContractHandler.ts deleted file mode 100644 index d73d36b03..000000000 --- a/test/unit/TestContractHandler.ts +++ /dev/null @@ -1,77 +0,0 @@ -import { Contract } from 'web3-eth-contract' - -const Web3 = require('web3') -const web3 = new Web3("http://127.0.0.1:8545") - -export class TestContractHandler { - public factory: Contract - public template: Contract - public accounts: string[] - public factoryAddress: string - public templateAddress: string - - constructor( - factoryABI: object, - datatokensABI: object - ){ - this.factory = new web3.eth.Contract(factoryABI) - this.template = new web3.eth.Contract(datatokensABI) - } - - public async getAccounts() { - this.accounts = await web3.eth.getAccounts() - } - - public async deployContracts(minter: string) { - let estGas - - let blob = 'https://example.com/dataset-1' - let cap = 1400000000 - - // Deploy Template - let templateBytecode = "0x60806040526000600360006101000a81548160ff0219169083151502179055506000600360016101000a81548160ff0219169083151502179055503480156200004757600080fd5b5060405162002b0838038062002b08833981018060405260a08110156200006d57600080fd5b8101908080516401000000008111156200008657600080fd5b828101905060208101848111156200009d57600080fd5b8151856001820283011164010000000082111715620000bb57600080fd5b50509291906020018051640100000000811115620000d857600080fd5b82810190506020810184811115620000ef57600080fd5b81518560018202830111640100000000821117156200010d57600080fd5b5050929190602001805190602001909291908051906020019092919080516401000000008111156200013e57600080fd5b828101905060208101848111156200015557600080fd5b81518560018202830111640100000000821117156200017357600080fd5b5050929190505050620001998585858585620001a5640100000000026401000000009004565b505050505050620004b2565b60008073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614156200022e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603081526020018062002a856030913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614620002d7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f81526020018062002ad9602f913960400191505060405180910390fd5b6000831162000332576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602481526020018062002ab56024913960400191505060405180910390fd5b60006008819055508260078190555085600490805190602001906200035992919062000403565b5081600690805190602001906200037292919062000403565b5084600590805190602001906200038b92919062000403565b5083600960006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600360016101000a81548160ff021916908315150217905550600360019054906101000a900460ff16905095945050505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200044657805160ff191683800117855562000477565b8280016001018555821562000477579182015b828111156200047657825182559160200191906001019062000459565b5b5090506200048691906200048a565b5090565b620004af91905b80821115620004ab57600081600090555060010162000491565b5090565b90565b6125c380620004c26000396000f3fe608060405260043610610147576000357c01000000000000000000000000000000000000000000000000000000009004806340c10f19116100c8578063a9059cbb1161008c578063a9059cbb14610821578063aa271e1a14610894578063b187bd26146108fd578063dd62ed3e1461092c578063fca3b5aa146109b1578063fde0e7a814610a0257610147565b806340c10f191461065457806370a08231146106a25780638456cb591461070757806395d89b411461071e578063a457c2d7146107ae57610147565b8063313ce5671161010f578063313ce56714610545578063355274ea14610570578063392e53cd1461059b57806339509351146105ca5780633f4ba83a1461063d57610147565b806306fdde031461014c578063095ea7b3146101dc5780630a6f3d9b1461024f57806318160ddd1461048757806323b872dd146104b2575b600080fd5b34801561015857600080fd5b50610161610a92565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101a1578082015181840152602081019050610186565b50505050905090810190601f1680156101ce5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101e857600080fd5b50610235600480360360408110156101ff57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b34565b604051808215151515815260200191505060405180910390f35b34801561025b57600080fd5b5061046d600480360360a081101561027257600080fd5b810190808035906020019064010000000081111561028f57600080fd5b8201836020820111156102a157600080fd5b803590602001918460018302840111640100000000831117156102c357600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192908035906020019064010000000081111561032657600080fd5b82018360208201111561033857600080fd5b8035906020019184600183028401116401000000008311171561035a57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001906401000000008111156103e757600080fd5b8201836020820111156103f957600080fd5b8035906020019184600183028401116401000000008311171561041b57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050610bae565b604051808215151515815260200191505060405180910390f35b34801561049357600080fd5b5061049c610c2e565b6040518082815260200191505060405180910390f35b3480156104be57600080fd5b5061052b600480360360608110156104d557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610c38565b604051808215151515815260200191505060405180910390f35b34801561055157600080fd5b5061055a610cb4565b6040518082815260200191505060405180910390f35b34801561057c57600080fd5b50610585610cbe565b6040518082815260200191505060405180910390f35b3480156105a757600080fd5b506105b0610cc8565b604051808215151515815260200191505060405180910390f35b3480156105d657600080fd5b50610623600480360360408110156105ed57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610cdf565b604051808215151515815260200191505060405180910390f35b34801561064957600080fd5b50610652610d59565b005b6106a06004803603604081101561066a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610e81565b005b3480156106ae57600080fd5b506106f1600480360360208110156106c557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061102c565b6040518082815260200191505060405180910390f35b34801561071357600080fd5b5061071c611074565b005b34801561072a57600080fd5b5061073361119d565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610773578082015181840152602081019050610758565b50505050905090810190601f1680156107a05780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156107ba57600080fd5b50610807600480360360408110156107d157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061123f565b604051808215151515815260200191505060405180910390f35b34801561082d57600080fd5b5061087a6004803603604081101561084457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506112b9565b604051808215151515815260200191505060405180910390f35b3480156108a057600080fd5b506108e3600480360360208110156108b757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611333565b604051808215151515815260200191505060405180910390f35b34801561090957600080fd5b5061091261138d565b604051808215151515815260200191505060405180910390f35b34801561093857600080fd5b5061099b6004803603604081101561094f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506113a4565b6040518082815260200191505060405180910390f35b3480156109bd57600080fd5b50610a00600480360360208110156109d457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061142b565b005b348015610a0e57600080fd5b50610a1761157b565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610a57578082015181840152602081019050610a3c565b50505050905090810190601f168015610a845780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b606060048054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610b2a5780601f10610aff57610100808354040283529160200191610b2a565b820191906000526020600020905b815481529060010190602001808311610b0d57829003601f168201915b5050505050905090565b6000600360009054906101000a900460ff1615610b9c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180612385602c913960400191505060405180910390fd5b610ba6838361161d565b905092915050565b6000600360019054906101000a900460ff1615610c16576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260358152602001806123d36035913960400191505060405180910390fd5b610c23868686868661163b565b905095945050505050565b6000600254905090565b6000600360009054906101000a900460ff1615610ca0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180612385602c913960400191505060405180910390fd5b610cab84848461188d565b90509392505050565b6000600854905090565b6000600754905090565b6000600360019054906101000a900460ff16905090565b6000600360009054906101000a900460ff1615610d47576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180612385602c913960400191505060405180910390fd5b610d518383611966565b905092915050565b600360009054906101000a900460ff16610dbe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603081526020018061251f6030913960400191505060405180910390fd5b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610e64576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806124086021913960400191505060405180910390fd5b6000600360006101000a81548160ff021916908315150217905550565b600360009054906101000a900460ff1615610ee7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180612385602c913960400191505060405180910390fd5b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610f8d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806124086021913960400191505060405180910390fd5b600754610faa82610f9c610c2e565b611a1990919063ffffffff16565b111561101e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f44617461546f6b656e54656d706c6174653a206361702065786365656465640081525060200191505060405180910390fd5b6110288282611aa1565b5050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600360009054906101000a900460ff16156110da576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180612385602c913960400191505060405180910390fd5b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611180576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806124086021913960400191505060405180910390fd5b6001600360006101000a81548160ff021916908315150217905550565b606060058054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156112355780601f1061120a57610100808354040283529160200191611235565b820191906000526020600020905b81548152906001019060200180831161121857829003601f168201915b5050505050905090565b6000600360009054906101000a900460ff16156112a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180612385602c913960400191505060405180910390fd5b6112b18383611c5c565b905092915050565b6000600360009054906101000a900460ff1615611321576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180612385602c913960400191505060405180910390fd5b61132b8383611d29565b905092915050565b60008173ffffffffffffffffffffffffffffffffffffffff16600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16149050919050565b6000600360009054906101000a900460ff16905090565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600360009054906101000a900460ff1615611491576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180612385602c913960400191505060405180910390fd5b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611537576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806124086021913960400191505060405180910390fd5b80600960006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b606060068054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156116135780601f106115e857610100808354040283529160200191611613565b820191906000526020600020905b8154815290600101906020018083116115f657829003601f168201915b5050505050905090565b600061163161162a611d47565b8484611d4f565b6001905092915050565b60008073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614156116c2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603081526020018061244f6030913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611769576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f8152602001806124cb602f913960400191505060405180910390fd5b600083116117c2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602481526020018061247f6024913960400191505060405180910390fd5b60006008819055508260078190555085600490805190602001906117e79291906122bc565b5081600690805190602001906117fe9291906122bc565b5084600590805190602001906118159291906122bc565b5083600960006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600360016101000a81548160ff021916908315150217905550600360019054906101000a900460ff16905095945050505050565b600061189a848484611f46565b61195b846118a6611d47565b611956856040518060600160405280602881526020016124a360289139600160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061190c611d47565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546121fc9092919063ffffffff16565b611d4f565b600190509392505050565b6000611a0f611973611d47565b84611a0a8560016000611984611d47565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a1990919063ffffffff16565b611d4f565b6001905092915050565b600080828401905083811015611a97576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611b44576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f45524332303a206d696e7420746f20746865207a65726f20616464726573730081525060200191505060405180910390fd5b611b5981600254611a1990919063ffffffff16565b600281905550611bb0816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a1990919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b6000611d1f611c69611d47565b84611d1a856040518060600160405280602581526020016125736025913960016000611c93611d47565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546121fc9092919063ffffffff16565b611d4f565b6001905092915050565b6000611d3d611d36611d47565b8484611f46565b6001905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611dd5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602481526020018061254f6024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611e5b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806123b16022913960400191505060405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611fcc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806124fa6025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612052576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806123626023913960400191505060405180910390fd5b6120bd81604051806060016040528060268152602001612429602691396000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546121fc9092919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612150816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a1990919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b60008383111582906122a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561226e578082015181840152602081019050612253565b50505050905090810190601f16801561229b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106122fd57805160ff191683800117855561232b565b8280016001018555821561232b579182015b8281111561232a57825182559160200191906001019061230f565b5b509050612338919061233c565b5090565b61235e91905b8082111561235a576000816000905550600101612342565b5090565b9056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332305061757361626c653a207468697320746f6b656e20636f6e74726163742069732070617573656445524332303a20617070726f766520746f20746865207a65726f206164647265737344617461546f6b656e54656d706c6174653a20746f6b656e20696e7374616e636520616c726561647920696e697469616c697a656444617461546f6b656e54656d706c6174653a20696e76616c6964206d696e74657245524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636544617461546f6b656e54656d706c6174653a20496e76616c6964206d696e7465722c20207a65726f206164647265737344617461546f6b656e54656d706c6174653a20496e76616c6964206361702076616c756545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636544617461546f6b656e54656d706c6174653a20496e76616c6964206d696e7465722c207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332305061757361626c653a207468697320746f6b656e20636f6e7472616374206973206e6f742070617573656445524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa165627a7a72305820cb935813b86dca206b416693f24e646300f651bfdb0df08b80e68f17d10455a2002944617461546f6b656e54656d706c6174653a20496e76616c6964206d696e7465722c20207a65726f206164647265737344617461546f6b656e54656d706c6174653a20496e76616c6964206361702076616c756544617461546f6b656e54656d706c6174653a20496e76616c6964206d696e7465722c207a65726f2061646472657373" - // get est gascost - estGas = await this.template.deploy({ - data:templateBytecode, - arguments:['Template Contract', 'TEMPLATE', minter, cap, blob] - }) - .estimateGas(function(err, estGas){ - return estGas - }) - // deploy the contract and get it's address - this.templateAddress = await this.template.deploy({ - data:templateBytecode, - arguments:['Template Contract', 'TEMPLATE', minter, cap, blob] - }) - .send({ - from: minter, - gas: estGas+1, - gasPrice: '12345678' - }) - .then(function(contract){ - return contract.options.address - }) - // Deploy Factory - let factoryBytecode = "0x60806040526001805534801561001457600080fd5b50604051602080610ff08339810180604052602081101561003457600080fd5b8101908080519060200190929190505050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156100cb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180610fc4602c913960400191505060405180910390fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050610ea98061011b6000396000f3fe608060405234801561001057600080fd5b506004361061005e576000357c01000000000000000000000000000000000000000000000000000000009004806345576f94146100635780637a36b3ee1461015e578063e939567914610329575b600080fd5b61011c6004803603602081101561007957600080fd5b810190808035906020019064010000000081111561009657600080fd5b8201836020820111156100a857600080fd5b803590602001918460018302840111640100000000831117156100ca57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192905050506103d0565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102ae6004803603604081101561017457600080fd5b810190808035906020019064010000000081111561019157600080fd5b8201836020820111156101a357600080fd5b803590602001918460018302840111640100000000831117156101c557600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192908035906020019064010000000081111561022857600080fd5b82018360208201111561023a57600080fd5b8035906020019184600183028401116401000000008311171561025c57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050610b29565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156102ee5780820151818401526020810190506102d3565b50505050905090810190601f16801561031b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103556004803603602081101561033f57600080fd5b8101908080359060200190929190505050610bf1565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561039557808201518184015260208101905061037a565b50505050905090810190601f1680156103c25780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b60006103fc6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610d40565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610484576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526038815260200180610e466038913960400191505060405180910390fd5b60606104cf6040518060400160405280600281526020017f44540000000000000000000000000000000000000000000000000000000000008152506104ca600154610bf1565b610b29565b9050606081905060008390508073ffffffffffffffffffffffffffffffffffffffff16630a6f3d9b8484337fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8a6040518663ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018080602001806020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200185815260200180602001848103845289818151815260200191508051906020019080838360005b838110156105c75780820151818401526020810190506105ac565b50505050905090810190601f1680156105f45780820380516001836020036101000a031916815260200191505b50848103835288818151815260200191508051906020019080838360005b8381101561062d578082015181840152602081019050610612565b50505050905090810190601f16801561065a5780820380516001836020036101000a031916815260200191505b50848103825285818151815260200191508051906020019080838360005b83811015610693578082015181840152602081019050610678565b50505050905090810190601f1680156106c05780820380516001836020036101000a031916815260200191505b5098505050505050505050602060405180830381600087803b1580156106e557600080fd5b505af11580156106f9573d6000803e3d6000fd5b505050506040513d602081101561070f57600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff1663392e53cd6040518163ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040160206040518083038186803b15801561078357600080fd5b505afa158015610797573d6000803e3d6000fd5b505050506040513d60208110156107ad57600080fd5b8101908080519060200190929190505050610813576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180610e1a602c913960400191505060405180910390fd5b7fb51c8cbe199ffe8b0d1d39b62d473569750653cb18b165f77ae423b3900180ad846000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1685604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b838110156108fc5780820151818401526020810190506108e1565b50505050905090810190601f1680156109295780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a1816040518082805190602001908083835b6020831061096c5780518252602082019150602081019050602083039250610949565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040518091039020836040518082805190602001908083835b602083106109cd57805182526020820191506020810190506020830392506109aa565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390208573ffffffffffffffffffffffffffffffffffffffff167f5242aec5021ca3b80047b99ba11a4f6ee963561e3ca5c01854964affbf18c0897fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff33438b604051808581526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610ad4578082015181840152602081019050610ab9565b50505050905090810190601f168015610b015780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a460018060008282540192505081905550505050919050565b606082826040516020018083805190602001908083835b60208310610b635780518252602082019150602081019050602083039250610b40565b6001836020036101000a03801982511681845116808217855250505050505090500182805190602001908083835b60208310610bb45780518252602082019150602081019050602083039250610b91565b6001836020036101000a03801982511681845116808217855250505050505090500192505050604051602081830303815290604052905092915050565b60606000821415610c39576040518060400160405280600181526020017f30000000000000000000000000000000000000000000000000000000000000008152509050610d3b565b600082905060005b60008214610c63578080600101915050600a8281610c5b57fe5b049150610c41565b6060816040519080825280601f01601f191660200182016040528015610c985781602001600182028038833980820191505090505b50905060006001830390508593505b60008414610d3357600a8481610cb957fe5b066030017f01000000000000000000000000000000000000000000000000000000000000000282828060019003935081518110610cf257fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a8481610d2b57fe5b049350610ca7565b819450505050505b919050565b600080826c010000000000000000000000000290506040517f3d602d80600a3d3981f3363d3d373d3d3d363d7300000000000000000000000081528160148201527f5af43d82803e903d91602b57fd5bf3000000000000000000000000000000000060288201526037816000f09250507f117c72e6c25f0a072e36e148df71468ce2f3dbe7defec5b2c257a6e3eb65278c82604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a15091905056fe466163746f72793a20556e61626c6520746f20696e697469616c697a6520746f6b656e20696e7374616e6365466163746f72793a204661696c656420746f20706572666f726d206d696e696d616c206465706c6f79206f662061206e657720746f6b656ea165627a7a723058208661a4f1759a51204c39e8e7507448b81499f1f9e035fda3f65d9daaadaa2c1c0029466163746f72793a20496e76616c696420546f6b656e466163746f727920696e697469616c697a6174696f6e" - estGas = await this.factory.deploy({ - data:factoryBytecode, - arguments:[this.templateAddress] - }) - .estimateGas(function(err, estGas){ - return estGas - }) - // deploy the contract and get it's address - this.factoryAddress = await this.factory.deploy({ - data:factoryBytecode, - arguments:[this.templateAddress] - }) - .send({ - from: minter, - gas: estGas+1, - gasPrice: '12345678' - }) - .then(function(contract){ - return contract.options.address - }) - } -} \ No newline at end of file diff --git a/test/unit/mocha.opts b/test/unit/mocha.opts deleted file mode 100644 index 7a1a04c85..000000000 --- a/test/unit/mocha.opts +++ /dev/null @@ -1,8 +0,0 @@ ---require ts-node/register ---require source-map-support/register ---require mock-local-storage ---full-trace ---bail ---exit ---timeout 20000 -test/unit/config.ts test/unit/**/*.test.ts \ No newline at end of file diff --git a/test/unit/tsconfig.json b/test/unit/tsconfig.json new file mode 100644 index 000000000..4bb727a08 --- /dev/null +++ b/test/unit/tsconfig.json @@ -0,0 +1,9 @@ +{ + "compilerOptions": { + "resolveJsonModule": true, + "lib": ["es6", "es7"], + "noUnusedLocals": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true + } + } \ No newline at end of file