Merge remote-tracking branch 'origin/main' into main

# Conflicts:
#	README.md
This commit is contained in:
ssallam 2021-02-10 10:36:59 +01:00
commit 8bce5f3df2
26 changed files with 973 additions and 270 deletions

View File

@ -5,17 +5,14 @@
}, },
"extends": [ "extends": [
"oceanprotocol", "oceanprotocol",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended", "plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended", "prettier",
"prettier/react",
"prettier/standard",
"prettier/@typescript-eslint" "prettier/@typescript-eslint"
], ],
"plugins": ["@typescript-eslint", "prettier"], "plugins": ["@typescript-eslint"],
"rules": { "rules": {
"no-use-before-define": "off", "no-use-before-define": "off",
"eqeqeq": "off",
"@typescript-eslint/no-use-before-define": "error" "@typescript-eslint/no-use-before-define": "error"
}, }
"env": { "es6": true, "node": true }
} }

8
.github/dependabot.yml vendored Normal file
View File

@ -0,0 +1,8 @@
version: 2
updates:
- package-ecosystem: npm
directory: '/'
schedule:
interval: weekly
time: '03:00'
timezone: Europe/Berlin

36
.github/workflows/ci.yml vendored Normal file
View File

@ -0,0 +1,36 @@
name: 'CI'
on:
push:
branches:
- '**'
pull_request:
branches:
- '**'
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: '14'
- name: Cache node modules
uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-node-
- run: npm ci
- run: npm run lint
# TODO: activate once this issue is solved:
# https://github.com/graphprotocol/graph-ts/issues/113
# - run: npm run type-check
- run: npm run codegen
- run: npm run build

8
.gitignore vendored
View File

@ -1,3 +1,6 @@
src/@types
build
# Logs # Logs
logs logs
*.log *.log
@ -10,6 +13,9 @@ pids
*.pid *.pid
*.seed *.seed
*.pid.lock *.pid.lock
/docker/data
/src/types
# Directory for instrumented libs generated by jscoverage/JSCover # Directory for instrumented libs generated by jscoverage/JSCover
lib-cov lib-cov
@ -30,7 +36,7 @@ bower_components
.lock-wscript .lock-wscript
# Compiled binary addons (https://nodejs.org/api/addons.html) # Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release build
# Dependency directories # Dependency directories
node_modules/ node_modules/

View File

@ -1,12 +0,0 @@
language: node_js
node_js: node
script:
# will run `npm ci` automatically here
- npm run lint
# TODO: activate once this issue is solved:
# https://github.com/graphprotocol/graph-ts/issues/113
# - npm run type-check
notifications:
email: false

View File

@ -4,7 +4,7 @@
> 🦀 Ocean Protocol Subgraph > 🦀 Ocean Protocol Subgraph
[![Build Status](https://travis-ci.com/oceanprotocol/ocean-subgraph.svg?branch=main)](https://travis-ci.com/oceanprotocol/ocean-subgraph) [![Build Status](https://github.com/oceanprotocol/ocean-subgraph/workflows/CI/badge.svg)](https://github.com/oceanprotocol/ocean-subgraph/actions)
[![js oceanprotocol](https://img.shields.io/badge/js-oceanprotocol-7b1173.svg)](https://github.com/oceanprotocol/eslint-config-oceanprotocol) [![js oceanprotocol](https://img.shields.io/badge/js-oceanprotocol-7b1173.svg)](https://github.com/oceanprotocol/eslint-config-oceanprotocol)
- [🏄 Get Started](#-get-started) - [🏄 Get Started](#-get-started)
@ -75,46 +75,28 @@ This subgraph is deployed for all networks the Ocean Protocol contracts are depl
## 🦑 Development ## 🦑 Development
Prepare the docker setup:
```bash ```bash
npm i cd docker
```
- Install/run the Graph: `https://thegraph.com/docs/quick-start`
- You can skip running ganache-cli and connect directly to `mainnet` using Infura
```bash
git clone https://github.com/graphprotocol/graph-node/
cd graph-node/docker
./setup.sh ./setup.sh
# Update this line in the `docker-compose.yml` file with your Infura ProjectId ```
# ethereum: 'mainnet:https://mainnet.infura.io/v3/INFURA_PROJECT_ID' Edit docker-compose and add your infura key & network
Start :
```bash
docker-compose up docker-compose up
``` ```
To use with ifura key create a .env file (look at .env.example)
Note: making contract calls using Infura fails with `missing trie node` errors. The fix requires ```bash
editing `ethereum_adapter.rs` line 434 to use the latest block instead of a specific block number. docker-compose --env-file .env up
Replace: `web3.eth().call(req, Some(block_id)).then(|result| {` with `web3.eth().call(req, Some(BlockNumber::Latest.into())).then(|result| {`
To run the graph-node with this fix it must be run from source.
First, remove the `graph-node` container from the `docker-compose.yml` file
then run `docker-compose up` to get the postgresql and ipfs services running.
Now you can build and run the graph-node from source
```
cargo run -p graph-node --release > graphnode.log --
--postgres-url postgres://graph-node:let-me-in@localhost:5432/graph-node
--ethereum-rpc mainnet:https://mainnet.infura.io/v3/INFURA_PROJECT_ID
--ipfs 127.0.0.1:5001
``` ```
Switch to a new terminal:
To deploy the ocean-subgraph to graph-node, see the `Deployment` section below. To deploy the ocean-subgraph to graph-node, see the `Deployment` section below.
You can make changes to the event handlers and/or features and re-deploy, again see the `Deployment` section below. You can make changes to the event handlers and/or features and re-deploy, again see the `Deployment` section below.
## ✨ Code Style ## ✨ Code Style
For linting and auto-formatting you can use from the root of the project: For linting and auto-formatting you can use from the root of the project:
@ -162,23 +144,21 @@ npm run create:local
npm run deploy:local npm run deploy:local
``` ```
The above will deploy to mainnet. To create/deploy to Rinkeby or Ropsten test net, The above will deploy ocean-subgraph connecting to mainnet. To create/deploy subgraph connecting to Rinkeby or Ropsten test net,
use :local-rinkeby or :local-ropsten with either create or deploy command. use :local-rinkeby or :local-ropsten with either create or deploy command.
- You can edit the event handler code and then run `npm run deploy:local` - You can edit the event handler code and then run `npm run deploy:local`
- Running deploy will fail if the code has no changes - Running deploy will fail if the code has no changes
- Sometimes deploy will fail no matter what, in this case: - Sometimes deploy will fail no matter what, in this case:
- Stop the graph-node run (Ctrl+C)
- Stop the docker-compose run (`docker-compose down` or Ctrl+C) - Stop the docker-compose run (`docker-compose down` or Ctrl+C)
- Delete the `ipfs` and `postgres` folders in `graph-node/docker/data` (`rm -rf ./docker/data/*`) This should stop the graph-node, ipfs and postgres containers
- Run `docker-compose up` to restart ipfs and postgres db - Delete the `ipfs` and `postgres` folders in `/docker/data` (`rm -rf ./docker/data/*`)
- Run the graph-node as above (using the cargo command) - Run `docker-compose up` to restart graph-node, ipfs and postgres
- Run `npm run create:local` to create the ocean-subgraph - Run `npm run create:local` to create the ocean-subgraph
- Run `npm run deploy:local` to deploy the ocean-subgraph - Run `npm run deploy:local` to deploy the ocean-subgraph
Note: to deploy to one of the remote nodes run by Ocean, you can do port-forwarding then using the
Note: to deploy to one of the remote nodes run by Ocean, you can do port-forwarding then the above `local` create/deploy will work as is. above `local` create/deploy commands will work as is.
## 🏛 License ## 🏛 License

1
docker/.env.example Normal file
View File

@ -0,0 +1 @@
INFURA_PROJECT_ID="xxx"

80
docker/README.md Normal file
View File

@ -0,0 +1,80 @@
# Graph Node Docker Image
Preconfigured Docker image for running a Graph Node.
## Usage
```sh
docker run -it \
-e postgres_host=<HOST> \
-e postgres_port=<PORT> \
-e postgres_user=<USER> \
-e postgres_pass=<PASSWORD> \
-e postgres_db=<DBNAME> \
-e ipfs=<HOST>:<PORT> \
-e ethereum=<NETWORK_NAME>:<ETHEREUM_RPC_URL> \
graphprotocol/graph-node:latest
```
### Example usage
```sh
docker run -it \
-e postgres_host=host.docker.internal \
-e postgres_port=5432 \
-e postgres_user=graph-node \
-e postgres_pass=oh-hello \
-e postgres_db=graph-node \
-e ipfs=host.docker.internal:5001 \
-e ethereum=mainnet:http://localhost:8545/ \
graphprotocol/graph-node:latest
```
## Docker Compose
The Docker Compose setup requires an Ethereum network name and node
to connect to. By default, it will use `mainnet:http://host.docker.internal:8545`
in order to connect to an Ethereum node running on your host machine.
You can replace this with anything else in `docker-compose.yaml`.
> **Note for Linux users:** On Linux, `host.docker.internal` is not
> currently supported. Instead, you will have to replace it with the
> IP address of your Docker host (from the perspective of the Graph
> Node container).
> To do this, run:
>
> ```
> CONTAINER_ID=$(docker container ls | grep graph-node | cut -d' ' -f1)
> docker exec $CONTAINER_ID /bin/bash -c 'apt install -y iproute2 && ip route' | awk '/^default via /{print $3}'
> ```
>
> This will print the host's IP address. Then, put it into `docker-compose.yml`:
>
> ```
> sed -i -e 's/host.docker.internal/<IP ADDRESS>/g' docker-compose.yml
> ```
After you have set up an Ethereum node—e.g. Ganache or Parity—simply
clone this repository and run
```sh
docker-compose up
```
This will start IPFS, Postgres and Graph Node in Docker and create persistent
data directories for IPFS and Postgres in `./data/ipfs` and `./data/postgres`. You
can access these via:
- Graph Node:
- GraphiQL: `http://localhost:8000/`
- HTTP: `http://localhost:8000/subgraphs/name/<subgraph-name>`
- WebSockets: `ws://localhost:8001/subgraphs/name/<subgraph-name>`
- Admin: `http://localhost:8020/`
- IPFS:
- `127.0.0.1:5001` or `/ip4/127.0.0.1/tcp/5001`
- Postgres:
- `postgresql://graph-node:let-me-in@localhost:5432/graph-node`
Once this is up and running, you can use
[`graph-cli`](https://github.com/graphprotocol/graph-cli) to create and
deploy your subgraph to the running Graph Node.

11
docker/bin/create Executable file
View File

@ -0,0 +1,11 @@
#! /bin/bash
if [ $# != 1 ]; then
echo "usage: create <name>"
exit 1
fi
api="http://index-node.default/"
data=$(printf '{"jsonrpc": "2.0", "method": "subgraph_create", "params": {"name":"%s"}, "id":"1"}' "$1")
curl -s -H "content-type: application/json" --data "$data" "$api"

9
docker/bin/debug Executable file
View File

@ -0,0 +1,9 @@
#! /bin/bash
if [ -f "$1" ]
then
exec rust-gdb -c "$1" /usr/local/cargo/bin/graph-node
else
echo "usage: debug <core-file>"
exit 1
fi

12
docker/bin/deploy Executable file
View File

@ -0,0 +1,12 @@
#! /bin/bash
if [ $# != 3 ]; then
echo "usage: deploy <name> <ipfs_hash> <node>"
exit 1
fi
api="http://index-node.default/"
echo "Deploying $1 (deployment $2)"
data=$(printf '{"jsonrpc": "2.0", "method": "subgraph_deploy", "params": {"name":"%s", "ipfs_hash":"%s", "node_id":"%s"}, "id":"1"}' "$1" "$2" "$3")
curl -s -H "content-type: application/json" --data "$data" "$api"

12
docker/bin/reassign Executable file
View File

@ -0,0 +1,12 @@
#! /bin/bash
if [ $# -lt 3 ]; then
echo "usage: reassign <name> <ipfs_hash> <node>"
exit 1
fi
api="http://index-node.default/"
echo Assigning to "$3"
data=$(printf '{"jsonrpc": "2.0", "method": "subgraph_reassign", "params": {"name":"%s", "ipfs_hash":"%s", "node_id":"%s"}, "id":"1"}' "$1" "$2" "$3")
curl -s -H "content-type: application/json" --data "$data" "$api"

11
docker/bin/remove Executable file
View File

@ -0,0 +1,11 @@
#! /bin/bash
if [ $# != 1 ]; then
echo "usage: create <name>"
exit 1
fi
api="http://index-node.default/"
data=$(printf '{"jsonrpc": "2.0", "method": "subgraph_remove", "params": {"name":"%s"}, "id":"1"}' "$1")
curl -s -H "content-type: application/json" --data "$data" "$api"

38
docker/docker-compose.yml Normal file
View File

@ -0,0 +1,38 @@
version: '3'
services:
graph-node:
image: oceanprotocol/graph-node:latest
ports:
- '8000:8000'
- '8001:8001'
- '8020:8020'
- '8030:8030'
- '8040:8040'
depends_on:
- ipfs
- postgres
environment:
postgres_host: postgres
postgres_user: graph-node
postgres_pass: let-me-in
postgres_db: graph-node
ipfs: 'ipfs:5001'
ethereum: 'rinkeby:https://rinkeby.infura.io/v3/${INFURA_PROJECT_ID}'
RUST_LOG: info
ipfs:
image: ipfs/go-ipfs:v0.4.23
ports:
- '5001:5001'
volumes:
- ./data/ipfs:/data/ipfs
postgres:
image: postgres
ports:
- '5432:5432'
command: ['postgres', '-cshared_preload_libraries=pg_stat_statements']
environment:
POSTGRES_USER: graph-node
POSTGRES_PASSWORD: let-me-in
POSTGRES_DB: graph-node
volumes:
- ./data/postgres:/var/lib/postgresql/data

8
docker/hooks/post_checkout Executable file
View File

@ -0,0 +1,8 @@
#!/bin/bash
set -e
set -x
echo "Setting SOURCE_BRANCH to ${SOURCE_BRANCH}"
sed -i "s@^ENV SOURCE_BRANCH \"master\"@ENV SOURCE_BRANCH \"${SOURCE_BRANCH}\"@g" Dockerfile

42
docker/setup.sh Executable file
View File

@ -0,0 +1,42 @@
#!/usr/bin/env bash
set -e
if ! which docker 2>&1 > /dev/null; then
echo "Please install 'docker' first"
exit 1
fi
if ! which docker-compose 2>&1 > /dev/null; then
echo "Please install 'docker-compose' first"
exit 1
fi
if ! which jq 2>&1 > /dev/null; then
echo "Please install 'jq' first"
exit 1
fi
# Create the graph-node container
docker-compose up --no-start graph-node
# Start graph-node so we can inspect it
docker-compose start graph-node
# Identify the container ID
CONTAINER_ID=$(docker container ls | grep graph-node | cut -d' ' -f1)
# Inspect the container to identify the host IP address
HOST_IP=$(docker inspect "$CONTAINER_ID" | jq -r .[0].NetworkSettings.Networks[].Gateway)
echo "Host IP: $HOST_IP"
# Inject the host IP into docker-compose.yml
sed -i -e "s/host.docker.internal/$HOST_IP/g" docker-compose.yml
function stop_graph_node {
# Ensure graph-node is stopped
docker-compose stop graph-node
}
trap stop_graph_node EXIT

111
docker/start Executable file
View File

@ -0,0 +1,111 @@
#!/bin/bash
save_coredumps() {
graph_dir=/var/lib/graph
datestamp=$(date +"%Y-%m-%dT%H:%M:%S")
ls /core.* >& /dev/null && have_cores=yes || have_cores=no
if [ -d "$graph_dir" -a "$have_cores" = yes ]
then
core_dir=$graph_dir/cores
mkdir -p $core_dir
exec >> "$core_dir"/messages 2>&1
echo "${HOSTNAME##*-} Saving core dump on ${HOSTNAME} at ${datestamp}"
dst="$core_dir/$datestamp-${HOSTNAME}"
mkdir "$dst"
cp /usr/local/bin/graph-node "$dst"
cp /proc/loadavg "$dst"
[ -f /Dockerfile ] && cp /Dockerfile "$dst"
tar czf "$dst/etc.tgz" /etc/
dmesg -e > "$dst/dmesg"
# Capture environment variables, but filter out passwords
env | sort | sed -r -e 's/^(postgres_pass|ELASTICSEARCH_PASSWORD)=.*$/\1=REDACTED/' > "$dst/env"
for f in /core.*
do
echo "${HOSTNAME##*-} Found core dump $f"
mv "$f" "$dst"
done
echo "${HOSTNAME##*-} Saving done"
fi
}
wait_for_ipfs() {
# Take the IPFS URL in $1 apart and extract host and port. If no explicit
# host is given, use 443 for https, and 80 otherwise
if [[ "$1" =~ ^((https?)://)?([^:/]+)(:([0-9]+))? ]]
then
proto=${BASH_REMATCH[2]:-http}
host=${BASH_REMATCH[3]}
port=${BASH_REMATCH[5]}
if [ -z "$port" ]
then
[ "$proto" = "https" ] && port=443 || port=80
fi
wait_for "$host:$port" -t 120
else
echo "invalid IPFS URL: $1"
exit 1
fi
}
start_query_node() {
export DISABLE_BLOCK_INGESTOR=true
graph-node \
--postgres-url "$postgres_url" \
--ethereum-rpc $ethereum \
--ipfs "$ipfs"
}
start_index_node() {
# Only the index node with the name set in BLOCK_INGESTOR should ingest
# blocks
if [[ ${node_id} != "${BLOCK_INGESTOR}" ]]; then
export DISABLE_BLOCK_INGESTOR=true
fi
graph-node \
--node-id "${node_id//-/_}" \
--postgres-url "$postgres_url" \
--ethereum-rpc $ethereum \
--ipfs "$ipfs"
}
start_combined_node() {
graph-node \
--postgres-url "$postgres_url" \
--ethereum-rpc $ethereum \
--ipfs "$ipfs"
}
postgres_port=${postgres_port:-5432}
postgres_url="postgresql://$postgres_user:$postgres_pass@$postgres_host:$postgres_port/$postgres_db"
wait_for_ipfs "$ipfs"
wait_for "$postgres_host:$postgres_port" -t 120
sleep 5
trap save_coredumps EXIT
export PGAPPNAME="${node_id-$HOSTNAME}"
# Set custom poll interval
if [ -n "$ethereum_polling_interval" ]; then
export ETHEREUM_POLLING_INTERVAL=$ethereum_polling_interval
fi
case "${node_role-combined-node}" in
query-node)
start_query_node
;;
index-node)
start_index_node
;;
combined-node)
start_combined_node
;;
*)
echo "Unknown mode for start-node: $1"
echo "usage: start (combined-node|query-node|index-node)"
exit 1
esac

83
docker/wait_for Executable file
View File

@ -0,0 +1,83 @@
#!/bin/sh
# POSIX compatible clone of wait-for-it.sh
# This copy is from https://github.com/eficode/wait-for/commits/master
# at commit 8d9b4446
TIMEOUT=15
QUIET=0
echoerr() {
if [ "$QUIET" -ne 1 ]; then printf "%s\n" "$*" 1>&2; fi
}
usage() {
exitcode="$1"
cat << USAGE >&2
Usage:
$cmdname host:port [-t timeout] [-- command args]
-q | --quiet Do not output any status messages
-t TIMEOUT | --timeout=timeout Timeout in seconds, zero for no timeout
-- COMMAND ARGS Execute command with args after the test finishes
USAGE
exit "$exitcode"
}
wait_for() {
for i in `seq $TIMEOUT` ; do
nc -z "$HOST" "$PORT" > /dev/null 2>&1
result=$?
if [ $result -eq 0 ] ; then
if [ $# -gt 0 ] ; then
exec "$@"
fi
exit 0
fi
sleep 1
done
echo "Operation timed out" >&2
exit 1
}
while [ $# -gt 0 ]
do
case "$1" in
*:* )
HOST=$(printf "%s\n" "$1"| cut -d : -f 1)
PORT=$(printf "%s\n" "$1"| cut -d : -f 2)
shift 1
;;
-q | --quiet)
QUIET=1
shift 1
;;
-t)
TIMEOUT="$2"
if [ "$TIMEOUT" = "" ]; then break; fi
shift 2
;;
--timeout=*)
TIMEOUT="${1#*=}"
shift 1
;;
--)
shift
break
;;
--help)
usage 0
;;
*)
echoerr "Unknown argument: $1"
usage 1
;;
esac
done
if [ "$HOST" = "" -o "$PORT" = "" ]; then
echoerr "Error: you need to provide a host and port to test."
usage 2
fi
wait_for "$@"

566
package-lock.json generated
View File

@ -83,9 +83,9 @@
} }
}, },
"@eslint/eslintrc": { "@eslint/eslintrc": {
"version": "0.2.2", "version": "0.3.0",
"resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.2.2.tgz", "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.3.0.tgz",
"integrity": "sha512-EfB5OHNYp1F4px/LI/FEnGylop7nOqkQ1LRzCM0KccA2U8tvV8w01KBv37LbO7nW4H+YhKyo2LcJhRwjjV17QQ==", "integrity": "sha512-1JTKgrOKAHVivSvOYw+sJOunkBjUOvjqWk1DPja7ZFhIS2mX/4EgTT8M7eTK9jrKhL/FvXXEbQwIs3pg1xp3dg==",
"dev": true, "dev": true,
"requires": { "requires": {
"ajv": "^6.12.4", "ajv": "^6.12.4",
@ -95,7 +95,7 @@
"ignore": "^4.0.6", "ignore": "^4.0.6",
"import-fresh": "^3.2.1", "import-fresh": "^3.2.1",
"js-yaml": "^3.13.1", "js-yaml": "^3.13.1",
"lodash": "^4.17.19", "lodash": "^4.17.20",
"minimatch": "^3.0.4", "minimatch": "^3.0.4",
"strip-json-comments": "^3.1.1" "strip-json-comments": "^3.1.1"
}, },
@ -187,18 +187,18 @@
} }
}, },
"@octokit/auth-token": { "@octokit/auth-token": {
"version": "2.4.4", "version": "2.4.5",
"resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.4.4.tgz", "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.4.5.tgz",
"integrity": "sha512-LNfGu3Ro9uFAYh10MUZVaT7X2CnNm2C8IDQmabx+3DygYIQjs9FwzFAHN/0t6mu5HEPhxcb1XOuxdpY82vCg2Q==", "integrity": "sha512-BpGYsPgJt05M7/L/5FoE1PiAbdxXFZkX/3kDYcsvd1v6UhlnE5e96dTDr0ezX/EFwciQxf3cNV0loipsURU+WA==",
"dev": true, "dev": true,
"requires": { "requires": {
"@octokit/types": "^6.0.0" "@octokit/types": "^6.0.3"
} }
}, },
"@octokit/core": { "@octokit/core": {
"version": "3.2.4", "version": "3.2.5",
"resolved": "https://registry.npmjs.org/@octokit/core/-/core-3.2.4.tgz", "resolved": "https://registry.npmjs.org/@octokit/core/-/core-3.2.5.tgz",
"integrity": "sha512-d9dTsqdePBqOn7aGkyRFe7pQpCXdibSJ5SFnrTr0axevObZrpz3qkWm7t/NjYv5a66z6vhfteriaq4FRz3e0Qg==", "integrity": "sha512-+DCtPykGnvXKWWQI0E1XD+CCeWSBhB6kwItXqfFmNBlIlhczuDPbg+P6BtLnVBaRJDAjv+1mrUJuRsFSjktopg==",
"dev": true, "dev": true,
"requires": { "requires": {
"@octokit/auth-token": "^2.4.4", "@octokit/auth-token": "^2.4.4",
@ -210,78 +210,67 @@
} }
}, },
"@octokit/endpoint": { "@octokit/endpoint": {
"version": "6.0.10", "version": "6.0.11",
"resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-6.0.10.tgz", "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-6.0.11.tgz",
"integrity": "sha512-9+Xef8nT7OKZglfkOMm7IL6VwxXUQyR7DUSU0LH/F7VNqs8vyd7es5pTfz9E7DwUIx7R3pGscxu1EBhYljyu7Q==", "integrity": "sha512-fUIPpx+pZyoLW4GCs3yMnlj2LfoXTWDUVPTC4V3MUEKZm48W+XYpeWSZCv+vYF1ZABUm2CqnDVf1sFtIYrj7KQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"@octokit/types": "^6.0.0", "@octokit/types": "^6.0.3",
"is-plain-object": "^5.0.0", "is-plain-object": "^5.0.0",
"universal-user-agent": "^6.0.0" "universal-user-agent": "^6.0.0"
} }
}, },
"@octokit/graphql": { "@octokit/graphql": {
"version": "4.5.8", "version": "4.6.0",
"resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-4.5.8.tgz", "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-4.6.0.tgz",
"integrity": "sha512-WnCtNXWOrupfPJgXe+vSmprZJUr0VIu14G58PMlkWGj3cH+KLZEfKMmbUQ6C3Wwx6fdhzVW1CD5RTnBdUHxhhA==", "integrity": "sha512-CJ6n7izLFXLvPZaWzCQDjU/RP+vHiZmWdOunaCS87v+2jxMsW9FB5ktfIxybRBxZjxuJGRnxk7xJecWTVxFUYQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"@octokit/request": "^5.3.0", "@octokit/request": "^5.3.0",
"@octokit/types": "^6.0.0", "@octokit/types": "^6.0.3",
"universal-user-agent": "^6.0.0" "universal-user-agent": "^6.0.0"
} }
}, },
"@octokit/openapi-types": { "@octokit/openapi-types": {
"version": "2.0.0", "version": "4.0.1",
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-2.0.0.tgz", "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-4.0.1.tgz",
"integrity": "sha512-J4bfM7lf8oZvEAdpS71oTvC1ofKxfEZgU5vKVwzZKi4QPiL82udjpseJwxPid9Pu2FNmyRQOX4iEj6W1iOSnPw==", "integrity": "sha512-k2hRcfcLRyPJjtYfJLzg404n7HZ6sUpAWAR/uNI8tf96NgatWOpw1ocdF+WFfx/trO1ivBh7ckynO1rn+xAw/Q==",
"dev": true "dev": true
}, },
"@octokit/plugin-paginate-rest": { "@octokit/plugin-paginate-rest": {
"version": "2.6.2", "version": "2.9.1",
"resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.6.2.tgz", "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.9.1.tgz",
"integrity": "sha512-3Dy7/YZAwdOaRpGQoNHPeT0VU1fYLpIUdPyvR37IyFLgd6XSij4j9V/xN/+eSjF2KKvmfIulEh9LF1tRPjIiDA==", "integrity": "sha512-8wnuWGjwDIEobbBet2xAjZwgiMVTgIer5wBsnGXzV3lJ4yqphLU2FEMpkhSrDx7y+WkZDfZ+V+1cFMZ1mAaFag==",
"dev": true, "dev": true,
"requires": { "requires": {
"@octokit/types": "^6.0.1" "@octokit/types": "^6.8.0"
} }
}, },
"@octokit/plugin-request-log": { "@octokit/plugin-request-log": {
"version": "1.0.2", "version": "1.0.3",
"resolved": "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-1.0.2.tgz", "resolved": "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-1.0.3.tgz",
"integrity": "sha512-oTJSNAmBqyDR41uSMunLQKMX0jmEXbwD1fpz8FG27lScV3RhtGfBa1/BBLym+PxcC16IBlF7KH9vP1BUYxA+Eg==", "integrity": "sha512-4RFU4li238jMJAzLgAwkBAw+4Loile5haQMQr+uhFq27BmyJXcXSKvoQKqh0agsZEiUlW6iSv3FAgvmGkur7OQ==",
"dev": true "dev": true
}, },
"@octokit/plugin-rest-endpoint-methods": { "@octokit/plugin-rest-endpoint-methods": {
"version": "4.2.1", "version": "4.8.0",
"resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-4.2.1.tgz", "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-4.8.0.tgz",
"integrity": "sha512-QyFr4Bv807Pt1DXZOC5a7L5aFdrwz71UHTYoHVajYV5hsqffWm8FUl9+O7nxRu5PDMtB/IKrhFqTmdBTK5cx+A==", "integrity": "sha512-2zRpXDveJH8HsXkeeMtRW21do8wuSxVn1xXFdvhILyxlLWqGQrdJUA1/dk5DM7iAAYvwT/P3bDOLs90yL4S2AA==",
"dev": true, "dev": true,
"requires": { "requires": {
"@octokit/types": "^5.5.0", "@octokit/types": "^6.5.0",
"deprecation": "^2.3.1" "deprecation": "^2.3.1"
},
"dependencies": {
"@octokit/types": {
"version": "5.5.0",
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-5.5.0.tgz",
"integrity": "sha512-UZ1pErDue6bZNjYOotCNveTXArOMZQFG6hKJfOnGnulVCMcVVi7YIIuuR4WfBhjo7zgpmzn/BkPDnUXtNx+PcQ==",
"dev": true,
"requires": {
"@types/node": ">= 8"
}
}
} }
}, },
"@octokit/request": { "@octokit/request": {
"version": "5.4.12", "version": "5.4.14",
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.4.12.tgz", "resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.4.14.tgz",
"integrity": "sha512-MvWYdxengUWTGFpfpefBBpVmmEYfkwMoxonIB3sUGp5rhdgwjXL1ejo6JbgzG/QD9B/NYt/9cJX1pxXeSIUCkg==", "integrity": "sha512-VkmtacOIQp9daSnBmDI92xNIeLuSRDOIuplp/CJomkvzt7M18NXgG044Cx/LFKLgjKt9T2tZR6AtJayba9GTSA==",
"dev": true, "dev": true,
"requires": { "requires": {
"@octokit/endpoint": "^6.0.1", "@octokit/endpoint": "^6.0.1",
"@octokit/request-error": "^2.0.0", "@octokit/request-error": "^2.0.0",
"@octokit/types": "^6.0.3", "@octokit/types": "^6.7.1",
"deprecation": "^2.0.0", "deprecation": "^2.0.0",
"is-plain-object": "^5.0.0", "is-plain-object": "^5.0.0",
"node-fetch": "^2.6.1", "node-fetch": "^2.6.1",
@ -290,35 +279,35 @@
} }
}, },
"@octokit/request-error": { "@octokit/request-error": {
"version": "2.0.4", "version": "2.0.5",
"resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-2.0.4.tgz", "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-2.0.5.tgz",
"integrity": "sha512-LjkSiTbsxIErBiRh5wSZvpZqT4t0/c9+4dOe0PII+6jXR+oj/h66s7E4a/MghV7iT8W9ffoQ5Skoxzs96+gBPA==", "integrity": "sha512-T/2wcCFyM7SkXzNoyVNWjyVlUwBvW3igM3Btr/eKYiPmucXTtkxt2RBsf6gn3LTzaLSLTQtNmvg+dGsOxQrjZg==",
"dev": true, "dev": true,
"requires": { "requires": {
"@octokit/types": "^6.0.0", "@octokit/types": "^6.0.3",
"deprecation": "^2.0.0", "deprecation": "^2.0.0",
"once": "^1.4.0" "once": "^1.4.0"
} }
}, },
"@octokit/rest": { "@octokit/rest": {
"version": "18.0.9", "version": "18.0.14",
"resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-18.0.9.tgz", "resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-18.0.14.tgz",
"integrity": "sha512-CC5+cIx974Ygx9lQNfUn7/oXDQ9kqGiKUC6j1A9bAVZZ7aoTF8K6yxu0pQhQrLBwSl92J6Z3iVDhGhGFgISCZg==", "integrity": "sha512-62mKIaBb/XD2Z2KCBmAPydEk/d0IBMOnwk6DJVo36ICTnxlRPTdQwFE2LzlpBPDR52xOKPlGqb3Bnhh99atltA==",
"dev": true, "dev": true,
"requires": { "requires": {
"@octokit/core": "^3.0.0", "@octokit/core": "^3.2.3",
"@octokit/plugin-paginate-rest": "^2.2.0", "@octokit/plugin-paginate-rest": "^2.6.2",
"@octokit/plugin-request-log": "^1.0.0", "@octokit/plugin-request-log": "^1.0.2",
"@octokit/plugin-rest-endpoint-methods": "4.2.1" "@octokit/plugin-rest-endpoint-methods": "4.8.0"
} }
}, },
"@octokit/types": { "@octokit/types": {
"version": "6.1.1", "version": "6.8.2",
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.1.1.tgz", "resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.8.2.tgz",
"integrity": "sha512-btm3D6S7VkRrgyYF31etUtVY/eQ1KzrNRqhFt25KSe2mKlXuLXJilglRC6eDA2P6ou94BUnk/Kz5MPEolXgoiw==", "integrity": "sha512-RpG0NJd7OKSkWptiFhy1xCLkThs5YoDIKM21lEtDmUvSpbaIEfrxzckWLUGDFfF8RydSyngo44gDv8m2hHruUg==",
"dev": true, "dev": true,
"requires": { "requires": {
"@octokit/openapi-types": "^2.0.0", "@octokit/openapi-types": "^4.0.0",
"@types/node": ">= 8" "@types/node": ">= 8"
} }
}, },
@ -399,9 +388,9 @@
"dev": true "dev": true
}, },
"@types/json-schema": { "@types/json-schema": {
"version": "7.0.6", "version": "7.0.7",
"resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.6.tgz", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.7.tgz",
"integrity": "sha512-3c+yGKvVP5Y9TYBEibGNR+kLtijnj7mYrXRg+WpFb2X9xm04g/DXYkfg4hmzJQosc9snFNUPkbYIhu+KAm6jJw==", "integrity": "sha512-cxWFQVseBm6O9Gbw1IWb8r6OS4OhSt3hPZLkFApLjM8TEXROBuQGLAH2i2gZpcXdLBIrpXuTDhH7Vbm1iXmNGA==",
"dev": true "dev": true
}, },
"@types/json5": { "@types/json5": {
@ -459,85 +448,128 @@
} }
}, },
"@typescript-eslint/eslint-plugin": { "@typescript-eslint/eslint-plugin": {
"version": "4.9.1", "version": "4.15.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.9.1.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.15.0.tgz",
"integrity": "sha512-QRLDSvIPeI1pz5tVuurD+cStNR4sle4avtHhxA+2uyixWGFjKzJ+EaFVRW6dA/jOgjV5DTAjOxboQkRDE8cRlQ==", "integrity": "sha512-DJgdGZW+8CFUTz5C/dnn4ONcUm2h2T0itWD85Ob5/V27Ndie8hUoX5HKyGssvR8sUMkAIlUc/AMK67Lqa3kBIQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"@typescript-eslint/experimental-utils": "4.9.1", "@typescript-eslint/experimental-utils": "4.15.0",
"@typescript-eslint/scope-manager": "4.9.1", "@typescript-eslint/scope-manager": "4.15.0",
"debug": "^4.1.1", "debug": "^4.1.1",
"functional-red-black-tree": "^1.0.1", "functional-red-black-tree": "^1.0.1",
"lodash": "^4.17.15",
"regexpp": "^3.0.0", "regexpp": "^3.0.0",
"semver": "^7.3.2", "semver": "^7.3.2",
"tsutils": "^3.17.1" "tsutils": "^3.17.1"
} }
}, },
"@typescript-eslint/experimental-utils": { "@typescript-eslint/experimental-utils": {
"version": "4.9.1", "version": "4.15.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.9.1.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.15.0.tgz",
"integrity": "sha512-c3k/xJqk0exLFs+cWSJxIjqLYwdHCuLWhnpnikmPQD2+NGAx9KjLYlBDcSI81EArh9FDYSL6dslAUSwILeWOxg==", "integrity": "sha512-V4vaDWvxA2zgesg4KPgEGiomWEBpJXvY4ZX34Y3qxK8LUm5I87L+qGIOTd9tHZOARXNRt9pLbblSKiYBlGMawg==",
"dev": true, "dev": true,
"requires": { "requires": {
"@types/json-schema": "^7.0.3", "@types/json-schema": "^7.0.3",
"@typescript-eslint/scope-manager": "4.9.1", "@typescript-eslint/scope-manager": "4.15.0",
"@typescript-eslint/types": "4.9.1", "@typescript-eslint/types": "4.15.0",
"@typescript-eslint/typescript-estree": "4.9.1", "@typescript-eslint/typescript-estree": "4.15.0",
"eslint-scope": "^5.0.0", "eslint-scope": "^5.0.0",
"eslint-utils": "^2.0.0" "eslint-utils": "^2.0.0"
} }
}, },
"@typescript-eslint/parser": { "@typescript-eslint/parser": {
"version": "4.9.1", "version": "4.15.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.9.1.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.15.0.tgz",
"integrity": "sha512-Gv2VpqiomvQ2v4UL+dXlQcZ8zCX4eTkoIW+1aGVWT6yTO+6jbxsw7yQl2z2pPl/4B9qa5JXeIbhJpONKjXIy3g==", "integrity": "sha512-L6Dtbq8Bc7g2aZwnIBETpmUa9XDKCMzKVwAArnGp5Mn7PRNFjf3mUzq8UeBjL3K8t311hvevnyqXAMSmxO8Gpg==",
"dev": true, "dev": true,
"requires": { "requires": {
"@typescript-eslint/scope-manager": "4.9.1", "@typescript-eslint/scope-manager": "4.15.0",
"@typescript-eslint/types": "4.9.1", "@typescript-eslint/types": "4.15.0",
"@typescript-eslint/typescript-estree": "4.9.1", "@typescript-eslint/typescript-estree": "4.15.0",
"debug": "^4.1.1" "debug": "^4.1.1"
},
"dependencies": {
"@typescript-eslint/scope-manager": {
"version": "4.15.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.15.0.tgz",
"integrity": "sha512-CSNBZnCC2jEA/a+pR9Ljh8Y+5TY5qgbPz7ICEk9WCpSEgT6Pi7H2RIjxfrrbUXvotd6ta+i27sssKEH8Azm75g==",
"dev": true,
"requires": {
"@typescript-eslint/types": "4.15.0",
"@typescript-eslint/visitor-keys": "4.15.0"
}
},
"@typescript-eslint/types": {
"version": "4.15.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.15.0.tgz",
"integrity": "sha512-su4RHkJhS+iFwyqyXHcS8EGPlUVoC+XREfy5daivjLur9JP8GhvTmDipuRpcujtGC4M+GYhUOJCPDE3rC5NJrg==",
"dev": true
},
"@typescript-eslint/typescript-estree": {
"version": "4.15.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.15.0.tgz",
"integrity": "sha512-jG6xTmcNbi6xzZq0SdWh7wQ9cMb2pqXaUp6bUZOMsIlu5aOlxGxgE/t6L/gPybybQGvdguajXGkZKSndZJpksA==",
"dev": true,
"requires": {
"@typescript-eslint/types": "4.15.0",
"@typescript-eslint/visitor-keys": "4.15.0",
"debug": "^4.1.1",
"globby": "^11.0.1",
"is-glob": "^4.0.1",
"semver": "^7.3.2",
"tsutils": "^3.17.1"
}
},
"@typescript-eslint/visitor-keys": {
"version": "4.15.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.15.0.tgz",
"integrity": "sha512-RnDtJwOwFucWFAMjG3ghCG/ikImFJFEg20DI7mn4pHEx3vC48lIAoyjhffvfHmErRDboUPC7p9Z2il4CLb7qxA==",
"dev": true,
"requires": {
"@typescript-eslint/types": "4.15.0",
"eslint-visitor-keys": "^2.0.0"
}
}
} }
}, },
"@typescript-eslint/scope-manager": { "@typescript-eslint/scope-manager": {
"version": "4.9.1", "version": "4.15.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.9.1.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.15.0.tgz",
"integrity": "sha512-sa4L9yUfD/1sg9Kl8OxPxvpUcqxKXRjBeZxBuZSSV1v13hjfEJkn84n0An2hN8oLQ1PmEl2uA6FkI07idXeFgQ==", "integrity": "sha512-CSNBZnCC2jEA/a+pR9Ljh8Y+5TY5qgbPz7ICEk9WCpSEgT6Pi7H2RIjxfrrbUXvotd6ta+i27sssKEH8Azm75g==",
"dev": true, "dev": true,
"requires": { "requires": {
"@typescript-eslint/types": "4.9.1", "@typescript-eslint/types": "4.15.0",
"@typescript-eslint/visitor-keys": "4.9.1" "@typescript-eslint/visitor-keys": "4.15.0"
} }
}, },
"@typescript-eslint/types": { "@typescript-eslint/types": {
"version": "4.9.1", "version": "4.15.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.9.1.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.15.0.tgz",
"integrity": "sha512-fjkT+tXR13ks6Le7JiEdagnwEFc49IkOyys7ueWQ4O8k4quKPwPJudrwlVOJCUQhXo45PrfIvIarcrEjFTNwUA==", "integrity": "sha512-su4RHkJhS+iFwyqyXHcS8EGPlUVoC+XREfy5daivjLur9JP8GhvTmDipuRpcujtGC4M+GYhUOJCPDE3rC5NJrg==",
"dev": true "dev": true
}, },
"@typescript-eslint/typescript-estree": { "@typescript-eslint/typescript-estree": {
"version": "4.9.1", "version": "4.15.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.9.1.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.15.0.tgz",
"integrity": "sha512-bzP8vqwX6Vgmvs81bPtCkLtM/Skh36NE6unu6tsDeU/ZFoYthlTXbBmpIrvosgiDKlWTfb2ZpPELHH89aQjeQw==", "integrity": "sha512-jG6xTmcNbi6xzZq0SdWh7wQ9cMb2pqXaUp6bUZOMsIlu5aOlxGxgE/t6L/gPybybQGvdguajXGkZKSndZJpksA==",
"dev": true, "dev": true,
"requires": { "requires": {
"@typescript-eslint/types": "4.9.1", "@typescript-eslint/types": "4.15.0",
"@typescript-eslint/visitor-keys": "4.9.1", "@typescript-eslint/visitor-keys": "4.15.0",
"debug": "^4.1.1", "debug": "^4.1.1",
"globby": "^11.0.1", "globby": "^11.0.1",
"is-glob": "^4.0.1", "is-glob": "^4.0.1",
"lodash": "^4.17.15",
"semver": "^7.3.2", "semver": "^7.3.2",
"tsutils": "^3.17.1" "tsutils": "^3.17.1"
} }
}, },
"@typescript-eslint/visitor-keys": { "@typescript-eslint/visitor-keys": {
"version": "4.9.1", "version": "4.15.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.9.1.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.15.0.tgz",
"integrity": "sha512-9gspzc6UqLQHd7lXQS7oWs+hrYggspv/rk6zzEMhCbYwPE/sF7oxo7GAjkS35Tdlt7wguIG+ViWCPtVZHz/ybQ==", "integrity": "sha512-RnDtJwOwFucWFAMjG3ghCG/ikImFJFEg20DI7mn4pHEx3vC48lIAoyjhffvfHmErRDboUPC7p9Z2il4CLb7qxA==",
"dev": true, "dev": true,
"requires": { "requires": {
"@typescript-eslint/types": "4.9.1", "@typescript-eslint/types": "4.15.0",
"eslint-visitor-keys": "^2.0.0" "eslint-visitor-keys": "^2.0.0"
} }
}, },
@ -924,9 +956,9 @@
} }
}, },
"before-after-hook": { "before-after-hook": {
"version": "2.1.0", "version": "2.1.1",
"resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.1.0.tgz", "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.1.1.tgz",
"integrity": "sha512-IWIbu7pMqyw3EAJHzzHbWa85b6oud/yfKYg5rqB5hNE8CeMi3nX+2C2sj0HswfblST86hpVEOAb9x34NZd6P7A==", "integrity": "sha512-5ekuQOvO04MDj7kYZJaMab2S8SPjGJbotVNyv7QYFCOAwrGZs/YnoDNlh1U+m5hl7H2D/+n0taaAV/tfyd3KMA==",
"dev": true "dev": true
}, },
"bignumber.js": { "bignumber.js": {
@ -1547,6 +1579,12 @@
"integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=",
"dev": true "dev": true
}, },
"decode-uri-component": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz",
"integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=",
"dev": true
},
"decompress-response": { "decompress-response": {
"version": "4.2.1", "version": "4.2.1",
"resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-4.2.1.tgz", "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-4.2.1.tgz",
@ -1884,13 +1922,13 @@
"dev": true "dev": true
}, },
"eslint": { "eslint": {
"version": "7.15.0", "version": "7.19.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-7.15.0.tgz", "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.19.0.tgz",
"integrity": "sha512-Vr64xFDT8w30wFll643e7cGrIkPEU50yIiI36OdSIDoSGguIeaLzBo0vpGvzo9RECUqq7htURfwEtKqwytkqzA==", "integrity": "sha512-CGlMgJY56JZ9ZSYhJuhow61lMPPjUzWmChFya71Z/jilVos7mR/jPgaEfVGgMBY5DshbKdG8Ezb8FDCHcoMEMg==",
"dev": true, "dev": true,
"requires": { "requires": {
"@babel/code-frame": "^7.0.0", "@babel/code-frame": "^7.0.0",
"@eslint/eslintrc": "^0.2.2", "@eslint/eslintrc": "^0.3.0",
"ajv": "^6.10.0", "ajv": "^6.10.0",
"chalk": "^4.0.0", "chalk": "^4.0.0",
"cross-spawn": "^7.0.2", "cross-spawn": "^7.0.2",
@ -1914,7 +1952,7 @@
"js-yaml": "^3.13.1", "js-yaml": "^3.13.1",
"json-stable-stringify-without-jsonify": "^1.0.1", "json-stable-stringify-without-jsonify": "^1.0.1",
"levn": "^0.4.1", "levn": "^0.4.1",
"lodash": "^4.17.19", "lodash": "^4.17.20",
"minimatch": "^3.0.4", "minimatch": "^3.0.4",
"natural-compare": "^1.4.0", "natural-compare": "^1.4.0",
"optionator": "^0.9.1", "optionator": "^0.9.1",
@ -1923,7 +1961,7 @@
"semver": "^7.2.1", "semver": "^7.2.1",
"strip-ansi": "^6.0.0", "strip-ansi": "^6.0.0",
"strip-json-comments": "^3.1.0", "strip-json-comments": "^3.1.0",
"table": "^5.2.3", "table": "^6.0.4",
"text-table": "^0.2.0", "text-table": "^0.2.0",
"v8-compile-cache": "^2.0.3" "v8-compile-cache": "^2.0.3"
}, },
@ -1940,6 +1978,12 @@
"integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==",
"dev": true "dev": true
}, },
"astral-regex": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz",
"integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==",
"dev": true
},
"chalk": { "chalk": {
"version": "4.1.0", "version": "4.1.0",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
@ -1950,6 +1994,12 @@
"supports-color": "^7.1.0" "supports-color": "^7.1.0"
} }
}, },
"emoji-regex": {
"version": "8.0.0",
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
"dev": true
},
"enquirer": { "enquirer": {
"version": "2.3.6", "version": "2.3.6",
"resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz",
@ -1959,6 +2009,40 @@
"ansi-colors": "^4.1.1" "ansi-colors": "^4.1.1"
} }
}, },
"is-fullwidth-code-point": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
"integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
"dev": true
},
"json-schema-traverse": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",
"integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==",
"dev": true
},
"slice-ansi": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz",
"integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==",
"dev": true,
"requires": {
"ansi-styles": "^4.0.0",
"astral-regex": "^2.0.0",
"is-fullwidth-code-point": "^3.0.0"
}
},
"string-width": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz",
"integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==",
"dev": true,
"requires": {
"emoji-regex": "^8.0.0",
"is-fullwidth-code-point": "^3.0.0",
"strip-ansi": "^6.0.0"
}
},
"strip-ansi": { "strip-ansi": {
"version": "6.0.0", "version": "6.0.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
@ -1973,6 +2057,32 @@
"resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz",
"integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==",
"dev": true "dev": true
},
"table": {
"version": "6.0.7",
"resolved": "https://registry.npmjs.org/table/-/table-6.0.7.tgz",
"integrity": "sha512-rxZevLGTUzWna/qBLObOe16kB2RTnnbhciwgPbMMlazz1yZGVEgnZK762xyVdVznhqxrfCeBMmMkgOOaPwjH7g==",
"dev": true,
"requires": {
"ajv": "^7.0.2",
"lodash": "^4.17.20",
"slice-ansi": "^4.0.0",
"string-width": "^4.2.0"
},
"dependencies": {
"ajv": {
"version": "7.0.4",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-7.0.4.tgz",
"integrity": "sha512-xzzzaqgEQfmuhbhAoqjJ8T/1okb6gAzXn/eQRNpAN1AEUoHJTNF9xCDRTtf/s3SKldtZfa+RJeTs+BQq+eZ/sw==",
"dev": true,
"requires": {
"fast-deep-equal": "^3.1.1",
"json-schema-traverse": "^1.0.0",
"require-from-string": "^2.0.2",
"uri-js": "^4.2.2"
}
}
}
} }
} }
}, },
@ -2275,9 +2385,9 @@
} }
}, },
"eslint-config-prettier": { "eslint-config-prettier": {
"version": "7.0.0", "version": "7.2.0",
"resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-7.0.0.tgz", "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-7.2.0.tgz",
"integrity": "sha512-8Y8lGLVPPZdaNA7JXqnvETVC7IiVRgAP6afQu9gOQRn90YY3otMNh+x7Vr2vMePQntF+5erdSUBqSzCmU/AxaQ==", "integrity": "sha512-rV4Qu0C3nfJKPOAhFujFxB7RMP+URFyQqqOZW9DMRD7ZDTFyjaIlETU3xzHELt++4ugC0+Jm084HQYkkJe+Ivg==",
"dev": true "dev": true
}, },
"eslint-config-standard": { "eslint-config-standard": {
@ -2480,9 +2590,9 @@
} }
}, },
"eslint-plugin-prettier": { "eslint-plugin-prettier": {
"version": "3.2.0", "version": "3.3.1",
"resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.2.0.tgz", "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.3.1.tgz",
"integrity": "sha512-kOUSJnFjAUFKwVxuzy6sA5yyMx6+o9ino4gCdShzBNx4eyFRudWRYKCFolKjoM40PEiuU6Cn7wBLfq3WsGg7qg==", "integrity": "sha512-Rq3jkcFY8RYeQLgk2cCwuc0P7SEFwDravPhsJZOQ5N4YI4DSg50NyqJ/9gdZHzQlHf8MvafSesbNJCcP/FF6pQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"prettier-linter-helpers": "^1.0.0" "prettier-linter-helpers": "^1.0.0"
@ -2853,9 +2963,9 @@
"dev": true "dev": true
}, },
"flatted": { "flatted": {
"version": "3.1.0", "version": "3.1.1",
"resolved": "https://registry.npmjs.org/flatted/-/flatted-3.1.0.tgz", "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.1.1.tgz",
"integrity": "sha512-tW+UkmtNg/jv9CSofAKvgVcO7c2URjhTdW1ZTkcAritblu8tajiYy7YisnIflEwtKssCtOxpnBRoCB7iap0/TA==", "integrity": "sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA==",
"dev": true "dev": true
}, },
"follow-redirects": { "follow-redirects": {
@ -3064,9 +3174,9 @@
} }
}, },
"git-url-parse": { "git-url-parse": {
"version": "11.4.0", "version": "11.4.3",
"resolved": "https://registry.npmjs.org/git-url-parse/-/git-url-parse-11.4.0.tgz", "resolved": "https://registry.npmjs.org/git-url-parse/-/git-url-parse-11.4.3.tgz",
"integrity": "sha512-KlIa5jvMYLjXMQXkqpFzobsyD/V2K5DRHl5OAf+6oDFPlPLxrGDVQlIdI63c4/Kt6kai4kALENSALlzTGST3GQ==", "integrity": "sha512-LZTTk0nqJnKN48YRtOpR8H5SEfp1oM2tls90NuZmBxN95PnCvmuXGzqQ4QmVirBgKx2KPYfPGteX3/raWjKenQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"git-up": "^4.0.0" "git-up": "^4.0.0"
@ -3103,12 +3213,12 @@
} }
}, },
"global-dirs": { "global-dirs": {
"version": "2.0.1", "version": "2.1.0",
"resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-2.0.1.tgz", "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-2.1.0.tgz",
"integrity": "sha512-5HqUqdhkEovj2Of/ms3IeS/EekcO54ytHRLV4PEY2rhRwrHXLQjeVEES0Lhka0xwNDtGYn58wyC4s5+MHsOO6A==", "integrity": "sha512-MG6kdOUh/xBnyo9cJFeIKkLEc1AyFq42QTU4XiX51i2NEdxLxLWXIjEjmqKeSuKR7pAZjTqUVoT2b2huxVLgYQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"ini": "^1.3.5" "ini": "1.3.7"
} }
}, },
"globals": { "globals": {
@ -3182,9 +3292,9 @@
} }
}, },
"got": { "got": {
"version": "11.8.0", "version": "11.8.1",
"resolved": "https://registry.npmjs.org/got/-/got-11.8.0.tgz", "resolved": "https://registry.npmjs.org/got/-/got-11.8.1.tgz",
"integrity": "sha512-k9noyoIIY9EejuhaBNLyZ31D5328LeqnyPNXJQb2XlJZcKakLqN5m6O/ikhq/0lw56kUYS54fVm+D1x57YC9oQ==", "integrity": "sha512-9aYdZL+6nHmvJwHALLwKSUZ0hMwGaJGYv3hoPLPgnT8BoBXm1SjnZeky+91tfwJaDzun2s4RsBRy48IEYv2q2Q==",
"dev": true, "dev": true,
"requires": { "requires": {
"@sindresorhus/is": "^4.0.0", "@sindresorhus/is": "^4.0.0",
@ -5808,13 +5918,15 @@
} }
}, },
"parse-path": { "parse-path": {
"version": "4.0.2", "version": "4.0.3",
"resolved": "https://registry.npmjs.org/parse-path/-/parse-path-4.0.2.tgz", "resolved": "https://registry.npmjs.org/parse-path/-/parse-path-4.0.3.tgz",
"integrity": "sha512-HSqVz6iuXSiL8C1ku5Gl1Z5cwDd9Wo0q8CoffdAghP6bz8pJa1tcMC+m4N+z6VAS8QdksnIGq1TB6EgR4vPR6w==", "integrity": "sha512-9Cepbp2asKnWTJ9x2kpw6Fe8y9JDbqwahGCTvklzd/cEq5C5JC59x2Xb0Kx+x0QZ8bvNquGO8/BWP0cwBHzSAA==",
"dev": true, "dev": true,
"requires": { "requires": {
"is-ssh": "^1.3.0", "is-ssh": "^1.3.0",
"protocols": "^1.4.0" "protocols": "^1.4.0",
"qs": "^6.9.4",
"query-string": "^6.13.8"
} }
}, },
"parse-url": { "parse-url": {
@ -6196,6 +6308,17 @@
"integrity": "sha512-A1kFqHekCTM7cz0udomYUoYNWjBebHm/5wzU/XqrBRBNWectVH0QIiN+NEcZ0Dte5hvzHwbr8+XQmguPhJ6WdQ==", "integrity": "sha512-A1kFqHekCTM7cz0udomYUoYNWjBebHm/5wzU/XqrBRBNWectVH0QIiN+NEcZ0Dte5hvzHwbr8+XQmguPhJ6WdQ==",
"dev": true "dev": true
}, },
"query-string": {
"version": "6.13.8",
"resolved": "https://registry.npmjs.org/query-string/-/query-string-6.13.8.tgz",
"integrity": "sha512-jxJzQI2edQPE/NPUOusNjO/ZOGqr1o2OBa/3M00fU76FsLXDVbJDv/p7ng5OdQyorKrkRz1oqfwmbe5MAMePQg==",
"dev": true,
"requires": {
"decode-uri-component": "^0.2.0",
"split-on-first": "^1.0.0",
"strict-uri-encode": "^2.0.0"
}
},
"quick-lru": { "quick-lru": {
"version": "5.1.1", "version": "5.1.1",
"resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz",
@ -6364,37 +6487,37 @@
} }
}, },
"release-it": { "release-it": {
"version": "14.2.2", "version": "14.3.0",
"resolved": "https://registry.npmjs.org/release-it/-/release-it-14.2.2.tgz", "resolved": "https://registry.npmjs.org/release-it/-/release-it-14.3.0.tgz",
"integrity": "sha512-rnJOzDIXErrwCD9cRMtDgmOZlcLQiL0z0dVyN95G2T1FQVBQNr7AD5EiH3U+K6X7s+EVoK90lF96NXe5QuvG1A==", "integrity": "sha512-fD0d0QG2PpJJlg51KZFdZjbRXA4jrRoJN2kkXv9m1K9jUdXhNVykexd3Eh7bLM8cNAxVUYhgSByb7mTDlAmvoA==",
"dev": true, "dev": true,
"requires": { "requires": {
"@iarna/toml": "2.2.5", "@iarna/toml": "2.2.5",
"@octokit/rest": "18.0.9", "@octokit/rest": "18.0.14",
"async-retry": "1.3.1", "async-retry": "1.3.1",
"chalk": "4.1.0", "chalk": "4.1.0",
"cosmiconfig": "7.0.0", "cosmiconfig": "7.0.0",
"debug": "4.3.1", "debug": "4.3.1",
"deprecated-obj": "2.0.0", "deprecated-obj": "2.0.0",
"execa": "4.1.0", "execa": "5.0.0",
"find-up": "5.0.0", "find-up": "5.0.0",
"form-data": "3.0.0", "form-data": "3.0.0",
"git-url-parse": "11.4.0", "git-url-parse": "11.4.3",
"globby": "11.0.1", "globby": "11.0.2",
"got": "11.8.0", "got": "11.8.1",
"import-cwd": "3.0.0", "import-cwd": "3.0.0",
"inquirer": "7.3.3", "inquirer": "7.3.3",
"is-ci": "2.0.0", "is-ci": "2.0.0",
"lodash": "4.17.20", "lodash": "4.17.20",
"mime-types": "2.1.27", "mime-types": "2.1.28",
"ora": "5.1.0", "ora": "5.3.0",
"os-name": "4.0.0", "os-name": "4.0.0",
"parse-json": "5.1.0", "parse-json": "5.2.0",
"semver": "7.3.2", "semver": "7.3.4",
"shelljs": "0.8.4", "shelljs": "0.8.4",
"update-notifier": "5.0.1", "update-notifier": "5.0.1",
"url-join": "4.0.1", "url-join": "4.0.1",
"uuid": "8.3.1", "uuid": "8.3.2",
"yaml": "1.10.0", "yaml": "1.10.0",
"yargs-parser": "20.2.4" "yargs-parser": "20.2.4"
}, },
@ -6405,6 +6528,17 @@
"integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==",
"dev": true "dev": true
}, },
"bl": {
"version": "4.0.4",
"resolved": "https://registry.npmjs.org/bl/-/bl-4.0.4.tgz",
"integrity": "sha512-7tdr4EpSd7jJ6tuQ21vu2ke8w7pNEstzj1O8wwq6sNNzO3UDi5MA8Gny/gquCj7r2C6fHudg8tKRGyjRgmvNxQ==",
"dev": true,
"requires": {
"buffer": "^5.5.0",
"inherits": "^2.0.4",
"readable-stream": "^3.4.0"
}
},
"chalk": { "chalk": {
"version": "4.1.0", "version": "4.1.0",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
@ -6429,19 +6563,19 @@
} }
}, },
"execa": { "execa": {
"version": "4.1.0", "version": "5.0.0",
"resolved": "https://registry.npmjs.org/execa/-/execa-4.1.0.tgz", "resolved": "https://registry.npmjs.org/execa/-/execa-5.0.0.tgz",
"integrity": "sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==", "integrity": "sha512-ov6w/2LCiuyO4RLYGdpFGjkcs0wMTgGE8PrkTHikeUy5iJekXyPIKUjifk5CsE0pt7sMCrMZ3YNqoCj6idQOnQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"cross-spawn": "^7.0.0", "cross-spawn": "^7.0.3",
"get-stream": "^5.0.0", "get-stream": "^6.0.0",
"human-signals": "^1.1.1", "human-signals": "^2.1.0",
"is-stream": "^2.0.0", "is-stream": "^2.0.0",
"merge-stream": "^2.0.0", "merge-stream": "^2.0.0",
"npm-run-path": "^4.0.0", "npm-run-path": "^4.0.1",
"onetime": "^5.1.0", "onetime": "^5.1.2",
"signal-exit": "^3.0.2", "signal-exit": "^3.0.3",
"strip-final-newline": "^2.0.0" "strip-final-newline": "^2.0.0"
} }
}, },
@ -6466,6 +6600,38 @@
"mime-types": "^2.1.12" "mime-types": "^2.1.12"
} }
}, },
"get-stream": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.0.tgz",
"integrity": "sha512-A1B3Bh1UmL0bidM/YX2NsCOTnGJePL9rO/M+Mw3m9f2gUpfokS0hi5Eah0WSUEWZdZhIZtMjkIYS7mDfOqNHbg==",
"dev": true
},
"globby": {
"version": "11.0.2",
"resolved": "https://registry.npmjs.org/globby/-/globby-11.0.2.tgz",
"integrity": "sha512-2ZThXDvvV8fYFRVIxnrMQBipZQDr7MxKAmQK1vujaj9/7eF0efG7BPUKJ7jP7G5SLF37xKDXvO4S/KKLj/Z0og==",
"dev": true,
"requires": {
"array-union": "^2.1.0",
"dir-glob": "^3.0.1",
"fast-glob": "^3.1.1",
"ignore": "^5.1.4",
"merge2": "^1.3.0",
"slash": "^3.0.0"
}
},
"human-signals": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz",
"integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==",
"dev": true
},
"ignore": {
"version": "5.1.8",
"resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz",
"integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==",
"dev": true
},
"locate-path": { "locate-path": {
"version": "6.0.0", "version": "6.0.0",
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz",
@ -6484,18 +6650,33 @@
"chalk": "^4.0.0" "chalk": "^4.0.0"
} }
}, },
"ora": { "mime-db": {
"version": "5.1.0", "version": "1.45.0",
"resolved": "https://registry.npmjs.org/ora/-/ora-5.1.0.tgz", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.45.0.tgz",
"integrity": "sha512-9tXIMPvjZ7hPTbk8DFq1f7Kow/HU/pQYB60JbNq+QnGwcyhWVZaQ4hM9zQDEsPxw/muLpgiHSaumUZxCAmod/w==", "integrity": "sha512-CkqLUxUk15hofLoLyljJSrukZi8mAtgd+yE5uO4tqRZsdsAJKv0O+rFMhVDRJgozy+yG6md5KwuXhD4ocIoP+w==",
"dev": true
},
"mime-types": {
"version": "2.1.28",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.28.tgz",
"integrity": "sha512-0TO2yJ5YHYr7M2zzT7gDU1tbwHxEUWBCLt0lscSNpcdAfFyJOVEpRYNS7EXVcTLNj/25QO8gulHC5JtTzSE2UQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"mime-db": "1.45.0"
}
},
"ora": {
"version": "5.3.0",
"resolved": "https://registry.npmjs.org/ora/-/ora-5.3.0.tgz",
"integrity": "sha512-zAKMgGXUim0Jyd6CXK9lraBnD3H5yPGBPPOkC23a2BG6hsm4Zu6OQSjQuEtV0BHDf4aKHcUFvJiGRrFuW3MG8g==",
"dev": true,
"requires": {
"bl": "^4.0.3",
"chalk": "^4.1.0", "chalk": "^4.1.0",
"cli-cursor": "^3.1.0", "cli-cursor": "^3.1.0",
"cli-spinners": "^2.4.0", "cli-spinners": "^2.5.0",
"is-interactive": "^1.0.0", "is-interactive": "^1.0.0",
"log-symbols": "^4.0.0", "log-symbols": "^4.0.0",
"mute-stream": "0.0.8",
"strip-ansi": "^6.0.0", "strip-ansi": "^6.0.0",
"wcwidth": "^1.0.1" "wcwidth": "^1.0.1"
} }
@ -6518,17 +6699,34 @@
"p-limit": "^3.0.2" "p-limit": "^3.0.2"
} }
}, },
"parse-json": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz",
"integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==",
"dev": true,
"requires": {
"@babel/code-frame": "^7.0.0",
"error-ex": "^1.3.1",
"json-parse-even-better-errors": "^2.3.0",
"lines-and-columns": "^1.1.6"
}
},
"path-exists": { "path-exists": {
"version": "4.0.0", "version": "4.0.0",
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
"integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
"dev": true "dev": true
}, },
"semver": { "readable-stream": {
"version": "7.3.2", "version": "3.6.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz",
"integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==", "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==",
"dev": true "dev": true,
"requires": {
"inherits": "^2.0.3",
"string_decoder": "^1.1.1",
"util-deprecate": "^1.0.1"
}
}, },
"strip-ansi": { "strip-ansi": {
"version": "6.0.0", "version": "6.0.0",
@ -6540,9 +6738,9 @@
} }
}, },
"uuid": { "uuid": {
"version": "8.3.1", "version": "8.3.2",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.1.tgz", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
"integrity": "sha512-FOmRr+FmWEIG8uhZv6C2bTgEVXsHk08kE7mPlrBbEe+c3r9pjceVPgupIfNIhc4yx55H69OXANrUaSuu9eInKg==", "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==",
"dev": true "dev": true
}, },
"yargs-parser": { "yargs-parser": {
@ -6589,6 +6787,12 @@
} }
} }
}, },
"require-from-string": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz",
"integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==",
"dev": true
},
"resolve": { "resolve": {
"version": "1.19.0", "version": "1.19.0",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.19.0.tgz", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.19.0.tgz",
@ -6962,6 +7166,12 @@
"integrity": "sha1-bIOv82kvphJW4M0ZfgXp3hV2kaY=", "integrity": "sha1-bIOv82kvphJW4M0ZfgXp3hV2kaY=",
"dev": true "dev": true
}, },
"split-on-first": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/split-on-first/-/split-on-first-1.1.0.tgz",
"integrity": "sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw==",
"dev": true
},
"split2": { "split2": {
"version": "3.2.2", "version": "3.2.2",
"resolved": "https://registry.npmjs.org/split2/-/split2-3.2.2.tgz", "resolved": "https://registry.npmjs.org/split2/-/split2-3.2.2.tgz",
@ -7031,6 +7241,12 @@
"pull-stream": "^3.2.3" "pull-stream": "^3.2.3"
} }
}, },
"strict-uri-encode": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz",
"integrity": "sha1-ucczDHBChi9rFC3CdLvMWGbONUY=",
"dev": true
},
"string-width": { "string-width": {
"version": "2.1.1", "version": "2.1.1",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz",
@ -7275,9 +7491,9 @@
"dev": true "dev": true
}, },
"tsutils": { "tsutils": {
"version": "3.17.1", "version": "3.19.1",
"resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.17.1.tgz", "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.19.1.tgz",
"integrity": "sha512-kzeQ5B8H3w60nFY2g8cJIuH7JDpsALXySGtwGJ0p2LSjLgay3NdIpqq5SoOBe46bKDW2iq25irHCr8wjomUS2g==", "integrity": "sha512-GEdoBf5XI324lu7ycad7s6laADfnAqCw6wLGI+knxvw9vsIYBaJfYdmeCEG3FMMUiSm3OGgNb+m6utsWf5h9Vw==",
"dev": true, "dev": true,
"requires": { "requires": {
"tslib": "^1.8.1" "tslib": "^1.8.1"
@ -7329,9 +7545,9 @@
} }
}, },
"typescript": { "typescript": {
"version": "4.1.2", "version": "4.1.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.1.2.tgz", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.1.3.tgz",
"integrity": "sha512-thGloWsGH3SOxv1SoY7QojKi0tc+8FnOmiarEGMbd/lar7QOEd3hvlx3Fp5y6FlDUGl9L+pd4n2e+oToGMmhRQ==", "integrity": "sha512-B3ZIOf1IKeH2ixgHhj6la6xdwR9QrLC5d1VKeCSY4tvkqhF2eqd9O7txNlS0PO3GrBAFIdr3L1ndNwteUbZLYg==",
"dev": true "dev": true
}, },
"uglify-js": { "uglify-js": {

View File

@ -7,14 +7,14 @@
"create:local": "graph create oceanprotocol/ocean-subgraph --node http://127.0.0.1:8020", "create:local": "graph create oceanprotocol/ocean-subgraph --node http://127.0.0.1:8020",
"create:local-rinkeby": "graph create oceanprotocol/ocean-subgraph --node http://127.0.0.1:8020", "create:local-rinkeby": "graph create oceanprotocol/ocean-subgraph --node http://127.0.0.1:8020",
"create:local-ropsten": "graph create oceanprotocol/ocean-subgraph --node http://127.0.0.1:8020", "create:local-ropsten": "graph create oceanprotocol/ocean-subgraph --node http://127.0.0.1:8020",
"codegen": "graph codegen --output-dir src/types/", "codegen": "graph codegen --output-dir src/@types",
"build": "graph build", "build": "graph build",
"deploy": "graph deploy oceanprotocol/ocean-subgraph --ipfs https://api.thegraph.com/ipfs/ --node https://api.thegraph.com/deploy/", "deploy": "graph deploy oceanprotocol/ocean-subgraph --ipfs https://api.thegraph.com/ipfs/ --node https://api.thegraph.com/deploy/",
"deploy:beta": "graph deploy oceanprotocol/ocean-subgraph-beta --ipfs https://api.thegraph.com/ipfs/ --node https://api.thegraph.com/deploy/", "deploy:beta": "graph deploy oceanprotocol/ocean-subgraph-beta --ipfs https://api.thegraph.com/ipfs/ --node https://api.thegraph.com/deploy/",
"deploy:local": "graph deploy oceanprotocol/ocean-subgraph subgraph.yaml --debug --ipfs http://127.0.0.1:5001 --node http://127.0.0.1:8020", "deploy:local": "graph deploy oceanprotocol/ocean-subgraph subgraph.yaml --debug --ipfs http://127.0.0.1:5001 --node http://127.0.0.1:8020",
"deploy:local-rinkeby": "graph deploy oceanprotocol/ocean-subgraph subgraph.rinkeby.yaml --debug --ipfs http://127.0.0.1:5001 --node http://127.0.0.1:8020", "deploy:local-rinkeby": "graph deploy oceanprotocol/ocean-subgraph subgraph.rinkeby.yaml --debug --ipfs http://127.0.0.1:5001 --node http://127.0.0.1:8020",
"deploy:local-ropsten": "graph deploy oceanprotocol/ocean-subgraph subgraph.ropsten.yaml --debug --ipfs http://127.0.0.1:5001 --node http://127.0.0.1:8020", "deploy:local-ropsten": "graph deploy oceanprotocol/ocean-subgraph subgraph.ropsten.yaml --debug --ipfs http://127.0.0.1:5001 --node http://127.0.0.1:8020",
"test": "npm run lint && npm run type-check", "test": "npm run codegen && npm run lint && npm run type-check",
"lint": "eslint --ignore-path .gitignore --ext .js --ext .ts --ext .tsx .", "lint": "eslint --ignore-path .gitignore --ext .js --ext .ts --ext .tsx .",
"format": "prettier --ignore-path .gitignore './**/*.{css,yml,js,ts,tsx,json,yaml}' --write", "format": "prettier --ignore-path .gitignore './**/*.{css,yml,js,ts,tsx,json,yaml}' --write",
"type-check": "tsc --noEmit", "type-check": "tsc --noEmit",
@ -25,16 +25,16 @@
"@graphprotocol/graph-cli": "^0.19.0", "@graphprotocol/graph-cli": "^0.19.0",
"@graphprotocol/graph-ts": "^0.19.0", "@graphprotocol/graph-ts": "^0.19.0",
"@release-it/bumper": "^2.0.0", "@release-it/bumper": "^2.0.0",
"@typescript-eslint/eslint-plugin": "^4.9.1", "@typescript-eslint/eslint-plugin": "^4.15.0",
"@typescript-eslint/parser": "^4.9.1", "@typescript-eslint/parser": "^4.15.0",
"auto-changelog": "^2.2.1", "auto-changelog": "^2.2.1",
"eslint": "^7.15.0", "eslint": "^7.19.0",
"eslint-config-oceanprotocol": "^1.5.0", "eslint-config-oceanprotocol": "^1.5.0",
"eslint-config-prettier": "^7.0.0", "eslint-config-prettier": "^7.2.0",
"eslint-plugin-prettier": "^3.2.0", "eslint-plugin-prettier": "^3.3.1",
"prettier": "^2.2.1", "prettier": "^2.2.1",
"release-it": "^14.2.2", "release-it": "^14.3.0",
"typescript": "^4.1.2" "typescript": "^4.1.3"
}, },
"dependencies": {}, "dependencies": {},
"repository": { "repository": {

View File

@ -1,8 +1,9 @@
type PoolFactory @entity { type PoolFactory @entity {
id: ID! id: ID!
totalLockedValue: BigDecimal # total value from all pools expressed in OCEAN totalValueLocked: BigDecimal # total value from all pools expressed in OCEAN
totalLiquidity: BigDecimal! # All the pools liquidity value in Ocean
totalOceanLiquidity: BigDecimal! # Total of OCEAN liquidity from all pools
totalSwapVolume: BigDecimal! # All the swap volume in Ocean totalSwapVolume: BigDecimal! # All the swap volume in Ocean
totalSwapFee: BigDecimal! # All the swap fee in Ocean totalSwapFee: BigDecimal! # All the swap fee in Ocean
@ -29,7 +30,7 @@ type Pool @entity {
totalSwapVolume: BigDecimal! # Total swap volume in OCEAN totalSwapVolume: BigDecimal! # Total swap volume in OCEAN
totalSwapFee: BigDecimal! # Total swap fee in OCEAN totalSwapFee: BigDecimal! # Total swap fee in OCEAN
lockedValue: BigDecimal! # locked value expressed in OCEAN (captures both Ocean and Datatoken) valueLocked: BigDecimal! # value locked in pool expressed in OCEAN (captures both Ocean and Datatoken)
datatokenReserve: BigDecimal! # Total pool reserve of Datatoken datatokenReserve: BigDecimal! # Total pool reserve of Datatoken
oceanReserve: BigDecimal! # Total pool reserve of OCEAN oceanReserve: BigDecimal! # Total pool reserve of OCEAN
spotPrice: BigDecimal! spotPrice: BigDecimal!

View File

@ -19,9 +19,9 @@ import {
TokenBalance, TokenBalance,
TokenTransaction, TokenTransaction,
PoolTransactionTokenValues PoolTransactionTokenValues
} from './types/schema' } from './@types/schema'
import { Pool } from './types/templates/Pool/Pool' import { Pool } from './@types/templates/Pool/Pool'
export const ZERO_BD = BigDecimal.fromString('0.0') export const ZERO_BD = BigDecimal.fromString('0.0')
export const MINUS_1_BD = BigDecimal.fromString('-1.0') export const MINUS_1_BD = BigDecimal.fromString('-1.0')
@ -34,8 +34,6 @@ export const ENABLE_DEBUG = true
const network = dataSource.network() const network = dataSource.network()
export const OCEAN: string = getOceanAddress()
function getOceanAddress(): string { function getOceanAddress(): string {
if (network == 'ropsten') { if (network == 'ropsten') {
return '0x5e8dcb2afa23844bcc311b00ad1a0c30025aade9' return '0x5e8dcb2afa23844bcc311b00ad1a0c30025aade9'
@ -46,6 +44,8 @@ function getOceanAddress(): string {
return '0x967da4048cd07ab37855c090aaf366e4ce1b9f48' return '0x967da4048cd07ab37855c090aaf366e4ce1b9f48'
} }
export const OCEAN: string = getOceanAddress()
export function _debuglog( export function _debuglog(
message: string, message: string,
event: ethereum.Event, event: ethereum.Event,
@ -109,6 +109,12 @@ export function updatePoolTokenBalance(
null, null,
[source, poolToken.balance.toString(), balance.toString(), poolToken.poolId] [source, poolToken.balance.toString(), balance.toString(), poolToken.poolId]
) )
if (balance < ZERO_BD || poolToken.balance < ZERO_BD) {
log.warning(
'EEEEEEEEEEEEEEEEE poolToken.balance < Zero: pool={}, poolToken={}, oldBalance={}, newBalance={}',
[poolToken.poolId, poolToken.tokenAddress.toString(), poolToken.balance.toString(), balance.toString()])
}
poolToken.balance = balance poolToken.balance = balance
} }
@ -183,8 +189,16 @@ export function updatePoolTransactionToken(
ptxTokenValues.save() ptxTokenValues.save()
if (ptxTokenValues.tokenAddress == OCEAN) { if (ptxTokenValues.tokenAddress == OCEAN) {
const factory = PoolFactory.load('1')
factory.totalOceanLiquidity = factory.totalOceanLiquidity + ptxTokenValues.tokenReserve - pool.oceanReserve
if (factory.totalOceanLiquidity < ZERO_BD || pool.oceanReserve < ZERO_BD) {
log.warning(
'EEEEEEEEEEEEEEEEE totalOceanLiquidity or oceanReserve < Zero: pool={}, totOcnLiq={}, ocnRes={}',
[pool.id, factory.totalOceanLiquidity.toString(), pool.oceanReserve.toString()])
}
ptx.oceanReserve = ptxTokenValues.tokenReserve ptx.oceanReserve = ptxTokenValues.tokenReserve
pool.oceanReserve = ptxTokenValues.tokenReserve pool.oceanReserve = ptxTokenValues.tokenReserve
factory.save()
} else { } else {
ptx.datatokenReserve = ptxTokenValues.tokenReserve ptx.datatokenReserve = ptxTokenValues.tokenReserve
pool.datatokenReserve = ptxTokenValues.tokenReserve pool.datatokenReserve = ptxTokenValues.tokenReserve
@ -310,10 +324,18 @@ export function createPoolTransaction(
pool.consumePrice = poolTx.consumePrice pool.consumePrice = poolTx.consumePrice
pool.spotPrice = poolTx.spotPrice pool.spotPrice = poolTx.spotPrice
const lockedValue = pool.lockedValue const oldValueLocked = pool.valueLocked
pool.lockedValue = pool.oceanReserve + (pool.datatokenReserve * pool.spotPrice) const spotPrice = pool.spotPrice >= ZERO_BD ? pool.spotPrice : ZERO_BD
let factory = PoolFactory.load('1') pool.valueLocked = poolTx.oceanReserve + (poolTx.datatokenReserve * spotPrice)
factory.totalLockedValue = factory.totalLockedValue - lockedValue + pool.lockedValue const factory = PoolFactory.load('1')
if (oldValueLocked < ZERO_BD || pool.valueLocked < ZERO_BD) {
log.warning(
'EEEEEEEEEEEEEEEEE valueLocked < Zero: pool={}, oldVL={}, newVL={}, OCEAN={}, DT={}, spotPrice={}',
[pool.id, oldValueLocked.toString(), pool.valueLocked.toString(),
poolTx.oceanReserve.toString(), poolTx.datatokenReserve.toString(),
pool.spotPrice.toString()])
}
factory.totalValueLocked = factory.totalValueLocked - oldValueLocked + pool.valueLocked
pool.transactionCount = pool.transactionCount.plus(BigInt.fromI32(1)) pool.transactionCount = pool.transactionCount.plus(BigInt.fromI32(1))

View File

@ -1,7 +1,7 @@
import { BigInt, BigDecimal } from '@graphprotocol/graph-ts' import { BigInt, BigDecimal } from '@graphprotocol/graph-ts'
import { OrderStarted, Transfer } from '../types/templates/DataToken/DataToken' import { OrderStarted, Transfer } from '../@types/templates/DataToken/DataToken'
import { Datatoken, TokenBalance, TokenOrder } from '../types/schema' import { Datatoken, TokenBalance, TokenOrder } from '../@types/schema'
import { import {
tokenToDecimal, tokenToDecimal,
updateTokenBalance, updateTokenBalance,

View File

@ -1,7 +1,10 @@
import { BigInt, log } from '@graphprotocol/graph-ts' import { BigInt, log } from '@graphprotocol/graph-ts'
import { TokenRegistered } from '../types/DTFactory/DTFactory' import { TokenRegistered } from '../@types/DTFactory/DTFactory'
import { DatatokenFactory, Datatoken as DatatokenEntity } from '../types/schema' import {
import { DataToken as DatatokenDataSource } from '../types/templates' DatatokenFactory,
Datatoken as DatatokenEntity
} from '../@types/schema'
import { DataToken as DatatokenDataSource } from '../@types/templates'
import { createUserEntity, tokenToDecimal, ZERO_BD } from '../helpers' import { createUserEntity, tokenToDecimal, ZERO_BD } from '../helpers'

View File

@ -1,7 +1,7 @@
import { BigInt, BigDecimal, log } from '@graphprotocol/graph-ts' import { BigInt, BigDecimal, log } from '@graphprotocol/graph-ts'
import { BPoolRegistered } from '../types/Factory/Factory' import { BPoolRegistered } from '../@types/Factory/Factory'
import { PoolFactory, Pool } from '../types/schema' import { PoolFactory, Pool } from '../@types/schema'
import { Pool as PoolContract } from '../types/templates' import { Pool as PoolContract } from '../@types/templates'
import { ZERO_BD } from '../helpers' import { ZERO_BD } from '../helpers'
export function handleNewPool(event: BPoolRegistered): void { export function handleNewPool(event: BPoolRegistered): void {
@ -9,10 +9,10 @@ export function handleNewPool(event: BPoolRegistered): void {
if (factory == null) { if (factory == null) {
factory = new PoolFactory('1') factory = new PoolFactory('1')
factory.totalLiquidity = ZERO_BD factory.totalOceanLiquidity = ZERO_BD
factory.totalSwapVolume = ZERO_BD factory.totalSwapVolume = ZERO_BD
factory.totalSwapFee = ZERO_BD factory.totalSwapFee = ZERO_BD
factory.totalLockedValue = ZERO_BD factory.totalValueLocked = ZERO_BD
factory.poolCount = 0 factory.poolCount = 0
factory.finalizedPoolCount = 0 factory.finalizedPoolCount = 0
@ -37,7 +37,7 @@ export function handleNewPool(event: BPoolRegistered): void {
pool.totalShares = ZERO_BD pool.totalShares = ZERO_BD
pool.totalSwapVolume = ZERO_BD pool.totalSwapVolume = ZERO_BD
pool.totalSwapFee = ZERO_BD pool.totalSwapFee = ZERO_BD
pool.lockedValue = ZERO_BD pool.valueLocked = ZERO_BD
pool.datatokenReserve = ZERO_BD pool.datatokenReserve = ZERO_BD
pool.oceanReserve = ZERO_BD pool.oceanReserve = ZERO_BD

View File

@ -5,7 +5,7 @@ import {
LOG_EXIT, LOG_EXIT,
LOG_SWAP, LOG_SWAP,
Transfer Transfer
} from '../types/templates/Pool/Pool' } from '../@types/templates/Pool/Pool'
import { import {
PoolFactory, PoolFactory,
@ -14,7 +14,7 @@ import {
PoolShare, PoolShare,
Datatoken, Datatoken,
PoolTransaction PoolTransaction
} from '../types/schema' } from '../@types/schema'
import { import {
hexToDecimal, hexToDecimal,
tokenToDecimal, tokenToDecimal,
@ -425,6 +425,8 @@ export function handleTransfer(event: Transfer): void {
const pool = Pool.load(poolId) const pool = Pool.load(poolId)
const poolTx = PoolTransaction.load(event.transaction.hash.toHexString()) const poolTx = PoolTransaction.load(event.transaction.hash.toHexString())
const value = tokenToDecimal(event.params.value.toBigDecimal(), 18) const value = tokenToDecimal(event.params.value.toBigDecimal(), 18)
debuglog('poolShare Transfer event: (from, to, value)', event,
[event.params.from.toHex(), event.params.to.toHex(), value.toString()])
if (isMint) { if (isMint) {
if (poolShareTo == null) { if (poolShareTo == null) {
@ -438,8 +440,17 @@ export function handleTransfer(event: Transfer): void {
poolTx.sharesTransferAmount = value poolTx.sharesTransferAmount = value
poolTx.sharesBalance = poolShareTo.balance poolTx.sharesBalance = poolShareTo.balance
} }
debuglog('pool shares mint: (id, value, totalShares)', event, [poolId, value.toString(), pool.totalShares.toString()]) debuglog(
'pool shares mint: (id, value, totalShares, shareToBalance, toAddress)',
event,
[
poolId,
value.toString(),
pool.totalShares.toString(),
poolShareTo.balance.toString(),
poolShareTo.userAddress
]
)
} else if (isBurn) { } else if (isBurn) {
if (poolShareFrom == null) { if (poolShareFrom == null) {
createPoolShareEntity(poolShareFromId, poolId, event.params.from.toHex()) createPoolShareEntity(poolShareFromId, poolId, event.params.from.toHex())
@ -452,7 +463,17 @@ export function handleTransfer(event: Transfer): void {
poolTx.sharesTransferAmount = -value poolTx.sharesTransferAmount = -value
poolTx.sharesBalance = poolShareFrom.balance poolTx.sharesBalance = poolShareFrom.balance
} }
debuglog('pool shares burn: (id, value, totalShares)', event, [poolId, value.toString(), pool.totalShares.toString()]) debuglog(
'pool shares burn: (id, value, totalShares, shareFromBalance, fromAddress)',
event,
[
poolId,
value.toString(),
pool.totalShares.toString(),
poolShareFrom.balance.toString(),
poolShareFrom.userAddress
]
)
} else { } else {
if (poolShareTo == null) { if (poolShareTo == null) {
createPoolShareEntity(poolShareToId, poolId, event.params.to.toHex()) createPoolShareEntity(poolShareToId, poolId, event.params.to.toHex())
@ -467,6 +488,13 @@ export function handleTransfer(event: Transfer): void {
} }
poolShareFrom.balance -= value poolShareFrom.balance -= value
poolShareFrom.save() poolShareFrom.save()
debuglog(
'pool shares transfer: ' +
'(id, value, totalShares, shareToBalance, shareFromBalance, toAddress, fromAddress)', event,
[poolId, value.toString(), pool.totalShares.toString(),
poolShareTo.balance.toString(), poolShareFrom.balance.toString(),
poolShareTo.userAddress, poolShareFrom.userAddress
])
} }
if ( if (