From b154b0afd0ab3987ba529afb58acdef9466d6b24 Mon Sep 17 00:00:00 2001 From: vibhurajeev Date: Mon, 17 Jan 2022 11:20:43 +0530 Subject: [PATCH 1/8] new: burn indexing --- child/src/mappings/child-erc20.ts | 19 ++++++++++++++++++- child/subgraph.template.yaml | 5 +++-- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/child/src/mappings/child-erc20.ts b/child/src/mappings/child-erc20.ts index 1bb6514..dcfc5ae 100644 --- a/child/src/mappings/child-erc20.ts +++ b/child/src/mappings/child-erc20.ts @@ -1,4 +1,4 @@ -import { LogTransfer, Withdraw } from '../../generated/ChildERC20/ChildERC20' +import { LogTransfer, Withdraw, Transfer } from '../../generated/ChildERC20/ChildERC20' import { TransactionEntity } from '../../generated/schema' import { toDecimal } from '../helpers/numbers' @@ -37,3 +37,20 @@ export function handleWithdraw(event: Withdraw): void { transactionEntity.save() } + +export function handleBurnTransfer(event: Transfer): void { + + if (event.params.to.toHex() == ZERO_ADDRESS) { + let transactionEntity = new TransactionEntity(event.transaction.hash.toHex() + '-withdraw') + + transactionEntity.from = event.params.from + transactionEntity.to = event.params.to + transactionEntity.value = toDecimal(event.params.value, 18) + transactionEntity.block = event.block.number + transactionEntity.timestamp = event.block.timestamp + transactionEntity.transaction = event.transaction.hash + transactionEntity.token = event.address + transactionEntity.type = 'withdraw' + transactionEntity.save() + } +} diff --git a/child/subgraph.template.yaml b/child/subgraph.template.yaml index 60789df..3a7fb79 100644 --- a/child/subgraph.template.yaml +++ b/child/subgraph.template.yaml @@ -6,7 +6,6 @@ dataSources: name: ChildERC20 network: {{network}} source: - address: "{{contracts.maticToken.address}}" abi: ChildERC20 startBlock: {{ contracts.maticToken.startBlock }} mapping: @@ -22,5 +21,7 @@ dataSources: eventHandlers: - event: LogTransfer(indexed address,indexed address,indexed address,uint256,uint256,uint256,uint256,uint256) handler: handleLogTransfer + - event: Transfer(indexed address,indexed address,uint256) + handler: handleBurnTransfer - event: Withdraw(indexed address,indexed address,uint256,uint256,uint256) - handler: handleWithdraw + handler: handleWithdraw \ No newline at end of file From 1b61a14b80206f62b2d9ce301177ebb2ed82b7a0 Mon Sep 17 00:00:00 2001 From: vibhurajeev Date: Mon, 17 Jan 2022 11:26:42 +0530 Subject: [PATCH 2/8] New: isPos field --- child/schema.graphql | 1 + child/src/mappings/child-erc20.ts | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/child/schema.graphql b/child/schema.graphql index 24f6270..a6a2bc2 100644 --- a/child/schema.graphql +++ b/child/schema.graphql @@ -9,6 +9,7 @@ type TransactionEntity @entity { block: BigInt! timestamp: BigInt! transaction: Bytes! + isPos: Boolean } type User @entity { diff --git a/child/src/mappings/child-erc20.ts b/child/src/mappings/child-erc20.ts index dcfc5ae..72bf05a 100644 --- a/child/src/mappings/child-erc20.ts +++ b/child/src/mappings/child-erc20.ts @@ -34,7 +34,7 @@ export function handleWithdraw(event: Withdraw): void { transactionEntity.transaction = event.transaction.hash transactionEntity.token = event.address transactionEntity.type = 'withdraw' - + transactionEntity.isPos = false transactionEntity.save() } @@ -51,6 +51,7 @@ export function handleBurnTransfer(event: Transfer): void { transactionEntity.transaction = event.transaction.hash transactionEntity.token = event.address transactionEntity.type = 'withdraw' + transactionEntity.isPos = true transactionEntity.save() } } From 812be397584162563351a5f7b7e92cf5fbfc1338 Mon Sep 17 00:00:00 2001 From: vibhurajeev Date: Tue, 22 Feb 2022 10:24:00 +0530 Subject: [PATCH 3/8] new: burn indexing --- child/abis/ChildErc1155.json | 1 + child/abis/ChildErc721.json | 1 + child/package-lock.json | 1263 ++++++++++++--------------- child/package.json | 9 +- child/schema.graphql | 11 +- child/src/mappings/child-erc1155.ts | 73 ++ child/src/mappings/child-erc20.ts | 77 +- child/src/mappings/child-erc721.ts | 60 ++ child/src/mappings/erc20.ts | 4 +- child/subgraph.template.yaml | 48 +- 10 files changed, 813 insertions(+), 734 deletions(-) create mode 100644 child/abis/ChildErc1155.json create mode 100644 child/abis/ChildErc721.json create mode 100644 child/src/mappings/child-erc1155.ts create mode 100644 child/src/mappings/child-erc721.ts diff --git a/child/abis/ChildErc1155.json b/child/abis/ChildErc1155.json new file mode 100644 index 0000000..15c0d10 --- /dev/null +++ b/child/abis/ChildErc1155.json @@ -0,0 +1 @@ +{"abi":[{"inputs":[{"internalType":"string","name":"uri_","type":"string"},{"internalType":"address","name":"childChainManager","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"userAddress","type":"address"},{"indexed":false,"internalType":"address payable","name":"relayerAddress","type":"address"},{"indexed":false,"internalType":"bytes","name":"functionSignature","type":"bytes"}],"name":"MetaTransactionExecuted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEPOSITOR_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ERC712_VERSION","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"userAddress","type":"address"},{"internalType":"bytes","name":"functionSignature","type":"bytes"},{"internalType":"bytes32","name":"sigR","type":"bytes32"},{"internalType":"bytes32","name":"sigS","type":"bytes32"},{"internalType":"uint8","name":"sigV","type":"uint8"}],"name":"executeMetaTransaction","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"getChainId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getDomainSeperator","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getNonce","outputs":[{"internalType":"uint256","name":"nonce","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"bytes","name":"depositData","type":"bytes"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawSingle","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"withdrawBatch","outputs":[],"stateMutability":"nonpayable","type":"function"}]} \ No newline at end of file diff --git a/child/abis/ChildErc721.json b/child/abis/ChildErc721.json new file mode 100644 index 0000000..2a65aa3 --- /dev/null +++ b/child/abis/ChildErc721.json @@ -0,0 +1 @@ +{"abi":[{"inputs":[{"internalType":"string","name":"name_","type":"string"},{"internalType":"string","name":"symbol_","type":"string"},{"internalType":"address","name":"childChainManager","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"userAddress","type":"address"},{"indexed":false,"internalType":"address payable","name":"relayerAddress","type":"address"},{"indexed":false,"internalType":"bytes","name":"functionSignature","type":"bytes"}],"name":"MetaTransactionExecuted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"metaData","type":"bytes"}],"name":"TransferWithMetadata","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"WithdrawnBatch","type":"event"},{"inputs":[],"name":"BATCH_LIMIT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEPOSITOR_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ERC712_VERSION","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"userAddress","type":"address"},{"internalType":"bytes","name":"functionSignature","type":"bytes"},{"internalType":"bytes32","name":"sigR","type":"bytes32"},{"internalType":"bytes32","name":"sigS","type":"bytes32"},{"internalType":"uint8","name":"sigV","type":"uint8"}],"name":"executeMetaTransaction","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getChainId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getDomainSeperator","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getNonce","outputs":[{"internalType":"uint256","name":"nonce","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"bytes","name":"depositData","type":"bytes"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"withdrawBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"withdrawWithMetadata","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"encodeTokenMetadata","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"}]} \ No newline at end of file diff --git a/child/package-lock.json b/child/package-lock.json index 1fc736f..73f6c3c 100644 --- a/child/package-lock.json +++ b/child/package-lock.json @@ -218,40 +218,78 @@ } }, "@graphprotocol/graph-cli": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/@graphprotocol/graph-cli/-/graph-cli-0.18.0.tgz", - "integrity": "sha512-UsLB2LAwnVfUgkd4D0Rbfqq6ImLlDq9TEL/tBMYmZkB7pgnJZ/gJT5ouC33Gh0yhdXOYqWRk/KUcxSpgsKviPw==", + "version": "0.26.0", + "resolved": "https://registry.npmjs.org/@graphprotocol/graph-cli/-/graph-cli-0.26.0.tgz", + "integrity": "sha512-sQKKfkGy6jsfpZD6KA9KdvHRpeStd1ZH334CMVxhyJtPY006a/Wc2rr7TBqgAtwpggs7UiT0UA3s5vG0jFQB5g==", "dev": true, "requires": { - "assemblyscript": "git+https://github.com/AssemblyScript/assemblyscript.git#36040d5b5312f19a025782b5e36663823494c2f3", + "assemblyscript": "0.19.10", + "binary-install-raw": "0.0.13", "chalk": "^3.0.0", "chokidar": "^3.0.2", "debug": "^4.1.1", "docker-compose": "^0.23.2", "dockerode": "^2.5.8", - "fs-extra": "^8.1.0", + "fs-extra": "^9.0.0", "glob": "^7.1.2", - "gluegun": "^4.1.2", - "graphql": "^14.0.2", + "gluegun": "git+https://github.com/edgeandnode/gluegun.git#v4.3.1-pin-colors-dep", + "graphql": "^15.5.0", "immutable": "^3.8.2", "ipfs-http-client": "^34.0.0", "jayson": "^3.0.2", "js-yaml": "^3.13.1", - "keytar": "^5.0.0", "node-fetch": "^2.3.0", "pkginfo": "^0.4.1", "prettier": "^1.13.5", "request": "^2.88.0", - "tmp": "^0.1.0", + "semver": "7.3.5", + "tmp-promise": "^3.0.2", + "which": "2.0.2", "yaml": "^1.5.1" + }, + "dependencies": { + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + } } }, "@graphprotocol/graph-ts": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/@graphprotocol/graph-ts/-/graph-ts-0.18.0.tgz", - "integrity": "sha512-cnaOlDQWvbH4wiKiqGilyWLlt0ZOW86Ia/UrxIWYTuHwMpkUaeVz2T7xwAjBBkhyEhcSUqEJJr0vfHqAnXbOdQ==", + "version": "0.24.1", + "resolved": "https://registry.npmjs.org/@graphprotocol/graph-ts/-/graph-ts-0.24.1.tgz", + "integrity": "sha512-2vU4m5ZPQIqMlMce/z5vmOtGHRlRmcRhMfemS3NIwxCSxSBGVnX2zb7QBTzzdQKGwsAZdbz6V0okkOtvohELfQ==", "requires": { - "assemblyscript": "git+https://github.com/AssemblyScript/assemblyscript.git#36040d5b5312f19a025782b5e36663823494c2f3" + "assemblyscript": "0.19.10" + }, + "dependencies": { + "assemblyscript": { + "version": "0.19.10", + "resolved": "https://registry.npmjs.org/assemblyscript/-/assemblyscript-0.19.10.tgz", + "integrity": "sha512-HavcUBXB3mBTRGJcpvaQjmnmaqKHBGREjSPNsIvnAk2f9dj78y4BkMaSSdvBQYWcDDzsHQjyUC8stICFkD1Odg==", + "requires": { + "binaryen": "101.0.0-nightly.20210723", + "long": "^4.0.0" + } + }, + "binaryen": { + "version": "101.0.0-nightly.20210723", + "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-101.0.0-nightly.20210723.tgz", + "integrity": "sha512-eioJNqhHlkguVSbblHOtLqlhtC882SOEPKmNFZaDuz1hzQjolxZ+eu3/kaS10n3sGPONsIZsO7R9fR00UyhEUA==" + } } }, "@nodelib/fs.scandir": { @@ -280,11 +318,6 @@ "fastq": "^1.6.0" } }, - "@protobufjs/utf8": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", - "integrity": "sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA=" - }, "@types/color-name": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz", @@ -292,18 +325,18 @@ "dev": true }, "@types/connect": { - "version": "3.4.33", - "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.33.tgz", - "integrity": "sha512-2+FrkXY4zllzTNfJth7jOqEHC+enpLeGslEhpnTAkg21GkRrWV4SsAtqchtT4YS9/nODBU2/ZfsBY2X4J/dX7A==", + "version": "3.4.35", + "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.35.tgz", + "integrity": "sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==", "dev": true, "requires": { "@types/node": "*" } }, "@types/express-serve-static-core": { - "version": "4.17.13", - "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.13.tgz", - "integrity": "sha512-RgDi5a4nuzam073lRGKTUIaL3eF2+H7LJvJ8eUnCI0wA6SNjXc44DCmWNiTLs/AZ7QlsFWZiw/gTG3nSQGL0fA==", + "version": "4.17.28", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.28.tgz", + "integrity": "sha512-P1BJAEAW3E2DJUlkgq4tOL3RyMunoWXqbSCygWo5ZIWTjUgN1YnaXWW4VWl/oc8vs/XoYibEGBKP0uZyF4AHig==", "dev": true, "requires": { "@types/node": "*", @@ -318,15 +351,15 @@ "dev": true }, "@types/lodash": { - "version": "4.14.161", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.161.tgz", - "integrity": "sha512-EP6O3Jkr7bXvZZSZYlsgt5DIjiGr0dXP1/jVEwVLTFgg0d+3lWVQkRavYVQszV7dYUwvg0B8R0MBDpcmXg7XIA==", + "version": "4.14.178", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.178.tgz", + "integrity": "sha512-0d5Wd09ItQWH1qFbEyQ7oTQ3GZrMfth5JkbN3EvTKLXcHLRDSXeLnlvlOn0wvxVIwK5o2M8JzP/OWz7T3NRsbw==", "dev": true }, "@types/node": { - "version": "12.12.62", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.62.tgz", - "integrity": "sha512-qAfo81CsD7yQIM9mVyh6B/U47li5g7cfpVQEDMfQeF8pSZVwzbhwU3crc0qG4DmpsebpJPR49AKOExQyJ05Cpg==", + "version": "12.20.46", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.46.tgz", + "integrity": "sha512-cPjLXj8d6anFPzFvOPxS3fvly3Shm5nTfl6g8X5smexixbuGUf7hfr21J5tX9JW+UPStp/5P5R8qrKL5IyVJ+A==", "dev": true }, "@types/normalize-package-data": { @@ -342,17 +375,26 @@ "dev": true }, "@types/qs": { - "version": "6.9.5", - "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.5.tgz", - "integrity": "sha512-/JHkVHtx/REVG0VVToGRGH2+23hsYLHdyG+GrvoUGlGAd0ErauXDyvHtRI/7H7mzLm+tBCKA7pfcpkQ1lf58iQ==", + "version": "6.9.7", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz", + "integrity": "sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw==", "dev": true }, "@types/range-parser": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.3.tgz", - "integrity": "sha512-ewFXqrQHlFsgc09MK5jP5iR7vumV/BYayNC6PgJO2LPe8vrnNFyjQjSppfEngITi0qvfKtzFvgKymGheFM9UOA==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.4.tgz", + "integrity": "sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw==", "dev": true }, + "@types/ws": { + "version": "7.4.7", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-7.4.7.tgz", + "integrity": "sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, "@typescript-eslint/eslint-plugin": { "version": "4.10.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.10.0.tgz", @@ -502,9 +544,9 @@ } }, "anymatch": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", - "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", "dev": true, "requires": { "normalize-path": "^3.0.0", @@ -512,12 +554,12 @@ } }, "apisauce": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/apisauce/-/apisauce-1.1.2.tgz", - "integrity": "sha512-AqOrOVk71JPSqugA6PdrkE2S0w1GC/f3xPZPMHJ1O+Z73pwT2uoGnr8JbfmB/gvO2cnygYzlBOnkD/mN6W1FMQ==", + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/apisauce/-/apisauce-1.1.5.tgz", + "integrity": "sha512-gKC8qb/bDJsPsnEXLZnXJ7gVx7dh87CEVNeIwv1dvaffnXoh5GHwac5pWR1P2broLiVj/fqFMQvLDDt/RhjiqA==", "dev": true, "requires": { - "axios": "^0.19.0", + "axios": "^0.21.2", "ramda": "^0.25.0" } }, @@ -527,24 +569,6 @@ "integrity": "sha1-ZBqlXft9am8KgUHEucCqULbCTdU=", "dev": true }, - "aproba": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", - "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", - "dev": true, - "optional": true - }, - "are-we-there-yet": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz", - "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==", - "dev": true, - "optional": true, - "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" - } - }, "argparse": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", @@ -567,9 +591,9 @@ "dev": true }, "asn1": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", - "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", + "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", "dev": true, "requires": { "safer-buffer": "~2.1.0" @@ -588,15 +612,13 @@ } }, "assemblyscript": { - "version": "git+https://github.com/AssemblyScript/assemblyscript.git#36040d5b5312f19a025782b5e36663823494c2f3", - "from": "git+https://github.com/AssemblyScript/assemblyscript.git#36040d5b5312f19a025782b5e36663823494c2f3", + "version": "0.19.10", + "resolved": "https://registry.npmjs.org/assemblyscript/-/assemblyscript-0.19.10.tgz", + "integrity": "sha512-HavcUBXB3mBTRGJcpvaQjmnmaqKHBGREjSPNsIvnAk2f9dj78y4BkMaSSdvBQYWcDDzsHQjyUC8stICFkD1Odg==", + "dev": true, "requires": { - "@protobufjs/utf8": "^1.1.0", - "binaryen": "77.0.0-nightly.20190407", - "glob": "^7.1.3", - "long": "^4.0.0", - "opencollective-postinstall": "^2.0.0", - "source-map-support": "^0.5.11" + "binaryen": "101.0.0-nightly.20210723", + "long": "^4.0.0" } }, "assert-plus": { @@ -626,6 +648,12 @@ "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", "dev": true }, + "at-least-node": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", + "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", + "dev": true + }, "aws-sign2": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", @@ -633,18 +661,18 @@ "dev": true }, "aws4": { - "version": "1.10.1", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.10.1.tgz", - "integrity": "sha512-zg7Hz2k5lI8kb7U32998pRRFin7zJlkfezGJjUc2heaD4Pw2wObakCDVzkKztTm/Ln7eiVvYsjqak0Ed4LkMDA==", + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", + "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==", "dev": true }, "axios": { - "version": "0.19.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.19.2.tgz", - "integrity": "sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA==", + "version": "0.21.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", + "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", "dev": true, "requires": { - "follow-redirects": "1.5.10" + "follow-redirects": "^1.14.0" } }, "babel-eslint": { @@ -672,21 +700,22 @@ "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true }, "base-x": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.8.tgz", - "integrity": "sha512-Rl/1AWP4J/zRrk54hhlxH4drNxPJXYUaKffODVI53/dAsV4t9fBxyxYKAVPU1XBHxYwOWP9h9H0hM2MVw4YfJA==", + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.9.tgz", + "integrity": "sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ==", "dev": true, "requires": { "safe-buffer": "^5.0.1" } }, "base64-js": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz", - "integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==", + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", "dev": true }, "bcrypt-pbkdf": { @@ -707,21 +736,33 @@ } }, "bignumber.js": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.1.tgz", - "integrity": "sha512-IdZR9mh6ahOBv/hYGiXyVuyCetmGJhtYkqLBpTStdhEGjegpPlUawydyaF3pbIOFynJTpllEs+NP+CS9jKFLjA==", + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.2.tgz", + "integrity": "sha512-GAcQvbpsM0pUb0zw1EI0KhQEZ+lRwR5fYaAp3vPOYuP7aDvGy6cVN6XHLauvF8SOga2y0dcLcjt3iQDTSEliyw==", "dev": true }, "binary-extensions": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.1.0.tgz", - "integrity": "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", "dev": true }, + "binary-install-raw": { + "version": "0.0.13", + "resolved": "https://registry.npmjs.org/binary-install-raw/-/binary-install-raw-0.0.13.tgz", + "integrity": "sha512-v7ms6N/H7iciuk6QInon3/n2mu7oRX+6knJ9xFPsJ3rQePgAqcR3CRTwUheFd8SLbiq4LL7Z4G/44L9zscdt9A==", + "dev": true, + "requires": { + "axios": "^0.21.1", + "rimraf": "^3.0.2", + "tar": "^6.1.0" + } + }, "binaryen": { - "version": "77.0.0-nightly.20190407", - "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-77.0.0-nightly.20190407.tgz", - "integrity": "sha512-1mxYNvQ0xywMe582K7V6Vo2zzhZZxMTeGHH8aE/+/AND8f64D8Q1GThVY3RVRwGY/4p+p95ccw9Xbw2ovFXRIg==" + "version": "101.0.0-nightly.20210723", + "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-101.0.0-nightly.20210723.tgz", + "integrity": "sha512-eioJNqhHlkguVSbblHOtLqlhtC882SOEPKmNFZaDuz1hzQjolxZ+eu3/kaS10n3sGPONsIZsO7R9fR00UyhEUA==", + "dev": true }, "bindings": { "version": "1.5.0", @@ -752,15 +793,15 @@ } }, "blakejs": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/blakejs/-/blakejs-1.1.0.tgz", - "integrity": "sha1-ad+S75U6qIylGjLfarHFShVfx6U=", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/blakejs/-/blakejs-1.1.1.tgz", + "integrity": "sha512-bLG6PHOCZJKNshTjGRBvET0vTciwQE6zFKOKKXPDJfwFBd4Ac0yBfPZqcGvGJap50l7ktvlpFqc2jGVaUgbJgg==", "dev": true }, "bn.js": { - "version": "4.11.9", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", "dev": true }, "borc": { @@ -795,6 +836,7 @@ "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -839,13 +881,13 @@ } }, "buffer": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.6.0.tgz", - "integrity": "sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw==", + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", "dev": true, "requires": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4" + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" } }, "buffer-alloc": { @@ -871,9 +913,10 @@ "dev": true }, "buffer-from": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", - "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==" + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true }, "buffer-xor": { "version": "1.0.3", @@ -887,6 +930,16 @@ "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=", "dev": true }, + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, "callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -916,25 +969,36 @@ } }, "chokidar": { - "version": "3.4.2", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.2.tgz", - "integrity": "sha512-IZHaDeBeI+sZJRX7lGcXsdzgvZqKv6sECqsbErJA4mHWfpRrD8B97kSFN4cQz6nGBGiuFia1MKR4d6c1o8Cv7A==", + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", "dev": true, "requires": { - "anymatch": "~3.1.1", + "anymatch": "~3.1.2", "braces": "~3.0.2", - "fsevents": "~2.1.2", - "glob-parent": "~5.1.0", + "fsevents": "~2.3.2", + "glob-parent": "~5.1.2", "is-binary-path": "~2.1.0", "is-glob": "~4.0.1", "normalize-path": "~3.0.0", - "readdirp": "~3.4.0" + "readdirp": "~3.6.0" + }, + "dependencies": { + "glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + } } }, "chownr": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", - "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", + "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", "dev": true }, "ci-info": { @@ -1003,9 +1067,9 @@ } }, "cli-spinners": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.4.0.tgz", - "integrity": "sha512-sJAofoarcm76ZGpuooaO0eDy8saEy+YoZBLjC4h8srt4jeBnkYeOgqxgsJQTpyt2LjI5PTfLJHSL+41Yu4fEJA==", + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.6.1.tgz", + "integrity": "sha512-x/5fWmGMnbKQAaNwN+UZlV79qBLM9JFnJuJ03gIi5whrob0xV0ofNVHy9DhwGdsMJQc2OKv0oGmLzvaqvAVv+g==", "dev": true }, "cli-table3": { @@ -1025,13 +1089,6 @@ "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=", "dev": true }, - "code-point-at": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", - "dev": true, - "optional": true - }, "color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -1048,9 +1105,9 @@ "dev": true }, "colors": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", - "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.3.3.tgz", + "integrity": "sha512-mmGt/1pZqYRjMxB1axhTo16/snVZ5krrKkcmMeVKxzECMMXoCgnvTPp10QgHfcbQZw8Dq2jMNG6je4JlWU0gWg==", "dev": true }, "combined-stream": { @@ -1071,7 +1128,8 @@ "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true }, "concat-stream": { "version": "1.6.2", @@ -1085,17 +1143,10 @@ "typedarray": "^0.0.6" } }, - "console-control-strings": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", - "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", - "dev": true, - "optional": true - }, "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", "dev": true }, "cosmiconfig": { @@ -1173,23 +1224,6 @@ "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", "dev": true }, - "decompress-response": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-4.2.1.tgz", - "integrity": "sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw==", - "dev": true, - "optional": true, - "requires": { - "mimic-response": "^2.0.0" - } - }, - "deep-extend": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", - "dev": true, - "optional": true - }, "deep-is": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", @@ -1205,36 +1239,28 @@ "clone": "^1.0.2" } }, + "delay": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/delay/-/delay-5.0.0.tgz", + "integrity": "sha512-ReEBKkIfe4ya47wlPYf/gu5ib6yUG0/Aez0JQZQz94kiWtRQvZIQbTiehsnwHvLSWJnQdhVeqYue7Id1dKr0qw==", + "dev": true + }, "delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", "dev": true }, - "delegates": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", - "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", - "dev": true, - "optional": true - }, "delimit-stream": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/delimit-stream/-/delimit-stream-0.1.0.tgz", "integrity": "sha1-m4MZR3wOX4rrPONXrjBfwl6hzSs=", "dev": true }, - "detect-libc": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", - "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=", - "dev": true, - "optional": true - }, "detect-node": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.0.4.tgz", - "integrity": "sha512-ZIzRpLJrOj7jjP2miAtgqIfmzbxa4ZOr5jJc601zklsfEx9oTzmmj2nVpIPRpNlRTIh8lc1kyViIY7BWSGNmKw==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.1.0.tgz", + "integrity": "sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g==", "dev": true }, "dir-glob": { @@ -1247,10 +1273,13 @@ } }, "docker-compose": { - "version": "0.23.5", - "resolved": "https://registry.npmjs.org/docker-compose/-/docker-compose-0.23.5.tgz", - "integrity": "sha512-y3swhij4q3pyX45kJH7OMHZjoHPfiaTe8RPAQQ9fbamKQHI+k+1HnZm0T9NbbMFusTn0het0eK4WjXGM+rcF2A==", - "dev": true + "version": "0.23.17", + "resolved": "https://registry.npmjs.org/docker-compose/-/docker-compose-0.23.17.tgz", + "integrity": "sha512-YJV18YoYIcxOdJKeFcCFihE6F4M2NExWM/d4S1ITcS9samHKnNUihz9kjggr0dNtsrbpFNc7/Yzd19DWs+m1xg==", + "dev": true, + "requires": { + "yaml": "^1.10.2" + } }, "docker-modem": { "version": "1.0.9", @@ -1265,9 +1294,9 @@ }, "dependencies": { "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", "dev": true, "requires": { "ms": "^2.1.1" @@ -1347,18 +1376,18 @@ "dev": true }, "elliptic": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz", - "integrity": "sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==", + "version": "6.5.4", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", + "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", "dev": true, "requires": { - "bn.js": "^4.4.0", - "brorand": "^1.0.1", + "bn.js": "^4.11.9", + "brorand": "^1.1.0", "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.0" + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" } }, "emoji-regex": { @@ -1739,13 +1768,6 @@ "strip-final-newline": "^2.0.0" } }, - "expand-template": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", - "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==", - "dev": true, - "optional": true - }, "explain-error": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/explain-error/-/explain-error-1.0.4.tgz", @@ -1879,30 +1901,10 @@ "dev": true }, "follow-redirects": { - "version": "1.5.10", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz", - "integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==", - "dev": true, - "requires": { - "debug": "=3.1.0" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } - } + "version": "1.14.9", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.9.tgz", + "integrity": "sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w==", + "dev": true }, "forever-agent": { "version": "0.6.1", @@ -1928,14 +1930,15 @@ "dev": true }, "fs-extra": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", - "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", "dev": true, "requires": { + "at-least-node": "^1.0.0", "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" } }, "fs-jetpack": { @@ -1946,17 +1949,38 @@ "requires": { "minimatch": "^3.0.2", "rimraf": "^2.6.3" + }, + "dependencies": { + "rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + } + } + }, + "fs-minipass": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", + "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", + "dev": true, + "requires": { + "minipass": "^3.0.0" } }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true }, "fsevents": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", - "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", "dev": true, "optional": true }, @@ -1972,62 +1996,15 @@ "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", "dev": true }, - "gauge": { - "version": "2.7.4", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", - "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", + "get-intrinsic": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", + "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", "dev": true, - "optional": true, "requires": { - "aproba": "^1.0.3", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.0", - "object-assign": "^4.1.0", - "signal-exit": "^3.0.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wide-align": "^1.1.0" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true, - "optional": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "dev": true, - "optional": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "dev": true, - "optional": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, - "optional": true, - "requires": { - "ansi-regex": "^2.0.0" - } - } + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" } }, "get-stream": { @@ -2060,17 +2037,11 @@ "assert-plus": "^1.0.0" } }, - "github-from-package": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", - "integrity": "sha1-l/tdlr/eiXMxPyDoKI75oWf6ZM4=", - "dev": true, - "optional": true - }, "glob": { "version": "7.1.6", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "dev": true, "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -2121,15 +2092,14 @@ } }, "gluegun": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/gluegun/-/gluegun-4.4.0.tgz", - "integrity": "sha512-O2jer+m1gauvdUOaEjobBX+gNDeYCwk3FAZqG+0B/3IlNHGB6pZ+w49ltuBXUxrKC8nYZjkVKMiMzdASJPbmNg==", + "version": "git+https://github.com/edgeandnode/gluegun.git#b34b9003d7bf556836da41b57ef36eb21570620a", + "from": "git+https://github.com/edgeandnode/gluegun.git#v4.3.1-pin-colors-dep", "dev": true, "requires": { "apisauce": "^1.0.1", "app-module-path": "^2.2.0", "cli-table3": "~0.5.0", - "colors": "^1.3.3", + "colors": "1.3.3", "cosmiconfig": "6.0.0", "cross-spawn": "^7.0.0", "ejs": "^2.6.1", @@ -2160,19 +2130,16 @@ } }, "graceful-fs": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", - "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==", + "version": "4.2.9", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.9.tgz", + "integrity": "sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ==", "dev": true }, "graphql": { - "version": "14.7.0", - "resolved": "https://registry.npmjs.org/graphql/-/graphql-14.7.0.tgz", - "integrity": "sha512-l0xWZpoPKpppFzMfvVyFmp9vLN7w/ZZJPefUicMCepfJeQ8sMcztloGYY9DfjVPo6tIUDzU5Hw3MUbIjj9AVVA==", - "dev": true, - "requires": { - "iterall": "^1.2.2" - } + "version": "15.8.0", + "resolved": "https://registry.npmjs.org/graphql/-/graphql-15.8.0.tgz", + "integrity": "sha512-5gghUc24tP9HRznNpV2+FIoq3xKkj5dTQqf4v0CpdPbFVwFkWoxOM+o+2OC9ZSvjEMTjfmG9QT+gcvggTwW1zw==", + "dev": true }, "har-schema": { "version": "2.0.0", @@ -2205,12 +2172,11 @@ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, - "has-unicode": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", - "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", - "dev": true, - "optional": true + "has-symbols": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", + "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", + "dev": true }, "hash-base": { "version": "3.1.0", @@ -2253,9 +2219,9 @@ } }, "hi-base32": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/hi-base32/-/hi-base32-0.5.0.tgz", - "integrity": "sha512-DDRmxSyoYuvjUb9EnXdoiMChBZ7ZcUVJsK5Frd3kqMhuBxvmZdnBeynAVfj7/ECbn++CekcoprvC/rprHPAtow==", + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/hi-base32/-/hi-base32-0.5.1.tgz", + "integrity": "sha512-EmBBpvdYh/4XxsnUybsPag6VikPYnN30td+vQk+GI3qpahVEG9+gTkG0aXVxTjBqQ5T6ijbWIu77O+C5WFWsnA==", "dev": true }, "hmac-drbg": { @@ -2293,9 +2259,9 @@ "dev": true }, "ieee754": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz", - "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", "dev": true }, "ignore": { @@ -2336,6 +2302,7 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, "requires": { "once": "^1.3.0", "wrappy": "1" @@ -2344,14 +2311,8 @@ "inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "ini": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", - "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", - "dev": true, - "optional": true + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true }, "ip": { "version": "1.1.5", @@ -2360,9 +2321,9 @@ "dev": true }, "ip-regex": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-4.2.0.tgz", - "integrity": "sha512-n5cDDeTWWRwK1EBoWwRti+8nP4NbytBBY0pldmnIkq6Z55KNFmWofh4rl9dPZpj+U/nVq7gweR3ylrvMt4YZ5A==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-4.3.0.tgz", + "integrity": "sha512-B9ZWJxHHOHUhUjCPrMpLD4xEq35bUTClHM1S6CBU5ixQnkZmwipwgc96vAd7AAGM9TGHvJR+Uss+/Ak6UphK+Q==", "dev": true }, "ipfs-block": { @@ -2474,9 +2435,9 @@ } }, "tar-stream": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.1.4.tgz", - "integrity": "sha512-o3pS2zlG4gxr67GmFYBLlq+dM8gyRGUOvsrHclSkvtVtQbjV0s/+ZE8OpICbaj8clrX3tjeHngYGP7rweaBnuw==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", + "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", "dev": true, "requires": { "bl": "^4.0.3", @@ -2487,9 +2448,9 @@ }, "dependencies": { "bl": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/bl/-/bl-4.0.3.tgz", - "integrity": "sha512-fs4G6/Hu4/EE+F75J8DuN/0IpQqNjAdC7aEQv7Qt8MHGUH7Ckv2MwTEEeN9QehD0pfIDkMI1bkHYkKy7xHyKIg==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", "dev": true, "requires": { "buffer": "^5.5.0", @@ -2664,9 +2625,9 @@ } }, "is-buffer": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz", - "integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", + "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==", "dev": true }, "is-circular": { @@ -2685,9 +2646,9 @@ } }, "is-electron": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-electron/-/is-electron-2.2.0.tgz", - "integrity": "sha512-SpMppC2XR3YdxSzczXReBjqs2zGscWQpBIKqwXYBFic0ERaxNVgwLCHwOLZeESfdJQjX0RDvrJ1lBXX2ij+G1Q==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/is-electron/-/is-electron-2.2.1.tgz", + "integrity": "sha512-r8EEQQsqT+Gn0aXFx7lTFygYQhILLCB+wn0WCDL5LZRINeLH/Rvw1j2oKodELLXYNImQ3CRlVsY8wW4cGOsyuw==", "dev": true }, "is-extglob": { @@ -2845,9 +2806,9 @@ "dev": true }, "is-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", - "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", "dev": true }, "is-typedarray": { @@ -2869,15 +2830,25 @@ "dev": true }, "iso-random-stream": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/iso-random-stream/-/iso-random-stream-1.1.1.tgz", - "integrity": "sha512-YEt/7xOwTdu4KXIgtdgGFkiLUsBaddbnkmHyaFdjJYIcD7V4gpQHPvYC5tyh3kA0PQ01y9lWm1ruVdf8Mqzovg==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/iso-random-stream/-/iso-random-stream-1.1.2.tgz", + "integrity": "sha512-7y0tsBBgQs544iTYjyrMp5xvgrbYR8b+plQq1Bryp+03p0LssrxC9C1M0oHv4QESDt7d95c74XvMk/yawKqX+A==", "dev": true, "requires": { - "buffer": "^5.4.3", + "buffer": "^6.0.3", "readable-stream": "^3.4.0" }, "dependencies": { + "buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "dev": true, + "requires": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, "readable-stream": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", @@ -2921,6 +2892,12 @@ "integrity": "sha512-27fFRDnPAMnHGLq36bWTpKET+eiXct3ENlCcdcMdk+mjXrb2kw3mhBUg1B7ewAC0kVzlOPhADzQgz1SE6Tglog==", "dev": true }, + "isomorphic-ws": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/isomorphic-ws/-/isomorphic-ws-4.0.1.tgz", + "integrity": "sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w==", + "dev": true + }, "isstream": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", @@ -2953,29 +2930,27 @@ } } }, - "iterall": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/iterall/-/iterall-1.3.0.tgz", - "integrity": "sha512-QZ9qOMdF+QLHxy1QIpUHUU1D5pS2CG2P69LF6L6CPjPYA/XMOmKV3PZpawHoAjHNyB0swdVTRxdYT4tbBbxqwg==", - "dev": true - }, "jayson": { - "version": "3.3.4", - "resolved": "https://registry.npmjs.org/jayson/-/jayson-3.3.4.tgz", - "integrity": "sha512-p2stl9m1C0vM8mdXM1m8shn0v5ECohD5gEDRzLD6CPv02pxRm1lv0jEz0HX6RvfJ/uO9z9Zzlzti7/uqq+Rh5g==", + "version": "3.6.6", + "resolved": "https://registry.npmjs.org/jayson/-/jayson-3.6.6.tgz", + "integrity": "sha512-f71uvrAWTtrwoww6MKcl9phQTC+56AopLyEenWvKVAIMz+q0oVGj6tenLZ7Z6UiPBkJtKLj4kt0tACllFQruGQ==", "dev": true, "requires": { "@types/connect": "^3.4.33", "@types/express-serve-static-core": "^4.17.9", "@types/lodash": "^4.14.159", "@types/node": "^12.12.54", + "@types/ws": "^7.4.4", "JSONStream": "^1.3.5", "commander": "^2.20.3", + "delay": "^5.0.0", "es6-promisify": "^5.0.0", "eyes": "^0.1.8", + "isomorphic-ws": "^4.0.1", "json-stringify-safe": "^5.0.1", "lodash": "^4.17.20", - "uuid": "^3.4.0" + "uuid": "^8.3.2", + "ws": "^7.4.5" }, "dependencies": { "JSONStream": { @@ -3031,9 +3006,9 @@ "dev": true }, "json-schema": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", + "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", "dev": true }, "json-schema-traverse": { @@ -3070,12 +3045,13 @@ "dev": true }, "jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", "dev": true, "requires": { - "graceful-fs": "^4.1.6" + "graceful-fs": "^4.1.6", + "universalify": "^2.0.0" } }, "jsonparse": { @@ -3085,14 +3061,14 @@ "dev": true }, "jsprim": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", - "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", + "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", "dev": true, "requires": { "assert-plus": "1.0.0", "extsprintf": "1.3.0", - "json-schema": "0.2.3", + "json-schema": "0.4.0", "verror": "1.10.0" } }, @@ -3103,28 +3079,17 @@ "dev": true }, "just-map-keys": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/just-map-keys/-/just-map-keys-1.1.0.tgz", - "integrity": "sha512-oNKi+4y7fr8lXnhKYpBbCkiwHRVkAnx0VDkCeTDtKKMzGr1Lz1Yym+RSieKUTKim68emC5Yxrb4YmiF9STDO+g==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/just-map-keys/-/just-map-keys-1.2.1.tgz", + "integrity": "sha512-Dmyz1Cy2SWM+PpqDPB1kdDglyexdzMthnAsvOIE9w4OPj8NDRuY1mh20x/JfG5w6fCGw9F0WmcofJhYZ4MiuyA==", "dev": true }, "keypair": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/keypair/-/keypair-1.0.1.tgz", - "integrity": "sha1-dgNxknCvtlZO04oiCHoG/Jqk6hs=", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/keypair/-/keypair-1.0.4.tgz", + "integrity": "sha512-zwhgOhhniaL7oxMgUMKKw5219PWWABMO+dgMnzJOQ2/5L3XJtTJGhW2PEXlxXj9zaccdReZJZ83+4NPhVfNVDg==", "dev": true }, - "keytar": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/keytar/-/keytar-5.6.0.tgz", - "integrity": "sha512-ueulhshHSGoryfRXaIvTj0BV1yB0KddBGhGoqCxSN9LR1Ks1GKuuCdVhF+2/YOs5fMl6MlTI9On1a4DHDXoTow==", - "dev": true, - "optional": true, - "requires": { - "nan": "2.14.1", - "prebuild-install": "5.3.3" - } - }, "kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", @@ -3158,9 +3123,9 @@ } }, "libp2p-crypto": { - "version": "0.16.3", - "resolved": "https://registry.npmjs.org/libp2p-crypto/-/libp2p-crypto-0.16.3.tgz", - "integrity": "sha512-ro7/5Tu+f8p2+qDS1JrROnO++nNaAaBFs+VVXVHLuTMnbnMASu1eUtSlWPk1uOwikAlBFTvfqe5J1bK6Bpq6Pg==", + "version": "0.16.4", + "resolved": "https://registry.npmjs.org/libp2p-crypto/-/libp2p-crypto-0.16.4.tgz", + "integrity": "sha512-II8HxKc9jbmQp34pprlluNxsBCWJDjHRPYJzuRy7ragztNip9Zb7uJ4lCje6gGzz4DNAcHkAUn+GqCIK1592iA==", "dev": true, "requires": { "asmcrypto.js": "^2.3.2", @@ -3173,7 +3138,7 @@ "keypair": "^1.0.1", "libp2p-crypto-secp256k1": "~0.3.0", "multihashing-async": "~0.5.1", - "node-forge": "~0.9.1", + "node-forge": "^0.10.0", "pem-jwk": "^2.0.0", "protons": "^1.0.1", "rsa-pem-to-jwk": "^1.1.3", @@ -3427,6 +3392,14 @@ "dev": true, "requires": { "yallist": "^3.0.2" + }, + "dependencies": { + "yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true + } } }, "mafmt": { @@ -3556,18 +3529,18 @@ } }, "mime-db": { - "version": "1.44.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz", - "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==", + "version": "1.51.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.51.0.tgz", + "integrity": "sha512-5y8A56jg7XVQx2mbv1lu49NR4dokRnhZYTtL+KGfaa27uq4pSTXkwQkFJl4pkRMyNFz/EtYDSkiiEHx3F7UN6g==", "dev": true }, "mime-types": { - "version": "2.1.27", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz", - "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==", + "version": "2.1.34", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.34.tgz", + "integrity": "sha512-6cP692WwGIs9XXdOO4++N+7qjqv0rqxxVvJ3VHPh/Sc9mVZcQP+ZGhkKiTvWMQRr2tbHkJP/Yn7Y0npb3ZBs4A==", "dev": true, "requires": { - "mime-db": "1.44.0" + "mime-db": "1.51.0" } }, "mimic-fn": { @@ -3576,13 +3549,6 @@ "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", "dev": true }, - "mimic-response": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-2.1.0.tgz", - "integrity": "sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA==", - "dev": true, - "optional": true - }, "minimalistic-assert": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", @@ -3599,6 +3565,7 @@ "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, "requires": { "brace-expansion": "^1.1.7" } @@ -3609,21 +3576,30 @@ "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", "dev": true }, - "mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "minipass": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.6.tgz", + "integrity": "sha512-rty5kpw9/z8SX9dmxblFA6edItUmwJgMeYDZRrwlIVN27i8gysGbznJwUggw2V/FVqFSDdWy040ZPS811DYAqQ==", "dev": true, "requires": { - "minimist": "^1.2.5" + "yallist": "^4.0.0" } }, - "mkdirp-classic": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", - "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", + "minizlib": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", + "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", "dev": true, - "optional": true + "requires": { + "minipass": "^3.0.0", + "yallist": "^4.0.0" + } + }, + "mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true }, "ms": { "version": "2.1.2", @@ -3772,18 +3748,11 @@ "dev": true }, "nan": { - "version": "2.14.1", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.1.tgz", - "integrity": "sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw==", + "version": "2.15.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.15.0.tgz", + "integrity": "sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ==", "dev": true }, - "napi-build-utils": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz", - "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==", - "dev": true, - "optional": true - }, "natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -3801,35 +3770,19 @@ "through2": "^3.0.0" } }, - "node-abi": { - "version": "2.19.1", - "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.19.1.tgz", - "integrity": "sha512-HbtmIuByq44yhAzK7b9j/FelKlHYISKQn0mtvcBrU5QBkhoCMp5bu8Hv5AI34DcKfOAcJBcOEMwLlwO62FFu9A==", + "node-fetch": { + "version": "2.6.7", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", + "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", "dev": true, - "optional": true, "requires": { - "semver": "^5.4.1" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true, - "optional": true - } + "whatwg-url": "^5.0.0" } }, - "node-fetch": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", - "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==", - "dev": true - }, "node-forge": { - "version": "0.9.2", - "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.9.2.tgz", - "integrity": "sha512-naKSScof4Wn+aoHU6HBsifh92Zeicm1GDQKd1vp3Y/kOi8ub0DozCa9KpvYNCXslFHYRmLNiqRopGdTGwNLpNw==", + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.10.0.tgz", + "integrity": "sha512-PPmu8eEeG9saEUvI97fm4OYxXVB6bFvyNTyiUOBichBpFG8A1Ljw3bY62+5oOjDEMHRnd0Y7HQ+x7uzxOzC6JA==", "dev": true }, "nodeify": { @@ -3842,13 +3795,6 @@ "promise": "~1.3.0" } }, - "noop-logger": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/noop-logger/-/noop-logger-0.1.1.tgz", - "integrity": "sha1-lKKxYzxPExdVMAfYlm/Q6EG2pMI=", - "dev": true, - "optional": true - }, "normalize-package-data": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", @@ -3884,26 +3830,6 @@ "path-key": "^3.0.0" } }, - "npmlog": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", - "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", - "dev": true, - "optional": true, - "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", - "dev": true, - "optional": true - }, "oauth-sign": { "version": "0.9.0", "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", @@ -3916,10 +3842,17 @@ "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", "dev": true }, + "object-inspect": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.0.tgz", + "integrity": "sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g==", + "dev": true + }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, "requires": { "wrappy": "1" } @@ -3933,11 +3866,6 @@ "mimic-fn": "^2.1.0" } }, - "opencollective-postinstall": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/opencollective-postinstall/-/opencollective-postinstall-2.0.3.tgz", - "integrity": "sha512-8AV/sCtuzUeTo8gQK5qDZzARrulB3egtLzFgteqB2tcT4Mw7B8Kt7JcDHmltjz6FOAHsvTevk70gZEbhM4ZS9Q==" - }, "optimist": { "version": "0.3.7", "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.3.7.tgz", @@ -3978,18 +3906,18 @@ }, "dependencies": { "ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true }, "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "requires": { - "ansi-regex": "^5.0.0" + "ansi-regex": "^5.0.1" } } } @@ -4054,7 +3982,8 @@ "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true }, "path-key": { "version": "3.1.1", @@ -4142,94 +4071,6 @@ "integrity": "sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==", "dev": true }, - "prebuild-install": { - "version": "5.3.3", - "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-5.3.3.tgz", - "integrity": "sha512-GV+nsUXuPW2p8Zy7SarF/2W/oiK8bFQgJcncoJ0d7kRpekEA0ftChjfEaF9/Y+QJEc/wFR7RAEa8lYByuUIe2g==", - "dev": true, - "optional": true, - "requires": { - "detect-libc": "^1.0.3", - "expand-template": "^2.0.3", - "github-from-package": "0.0.0", - "minimist": "^1.2.0", - "mkdirp": "^0.5.1", - "napi-build-utils": "^1.0.1", - "node-abi": "^2.7.0", - "noop-logger": "^0.1.1", - "npmlog": "^4.0.1", - "pump": "^3.0.0", - "rc": "^1.2.7", - "simple-get": "^3.0.3", - "tar-fs": "^2.0.0", - "tunnel-agent": "^0.6.0", - "which-pm-runs": "^1.0.0" - }, - "dependencies": { - "bl": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/bl/-/bl-4.0.3.tgz", - "integrity": "sha512-fs4G6/Hu4/EE+F75J8DuN/0IpQqNjAdC7aEQv7Qt8MHGUH7Ckv2MwTEEeN9QehD0pfIDkMI1bkHYkKy7xHyKIg==", - "dev": true, - "optional": true, - "requires": { - "buffer": "^5.5.0", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" - } - }, - "pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "dev": true, - "optional": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dev": true, - "optional": true, - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - }, - "tar-fs": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.0.tgz", - "integrity": "sha512-9uW5iDvrIMCVpvasdFHW0wJPez0K4JnMZtsuIeDI7HyMGJNxmDZDOCQROr7lXyS+iL/QMpj07qcjGYTSdRFXUg==", - "dev": true, - "optional": true, - "requires": { - "chownr": "^1.1.1", - "mkdirp-classic": "^0.5.2", - "pump": "^3.0.0", - "tar-stream": "^2.0.0" - } - }, - "tar-stream": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.1.4.tgz", - "integrity": "sha512-o3pS2zlG4gxr67GmFYBLlq+dM8gyRGUOvsrHclSkvtVtQbjV0s/+ZE8OpICbaj8clrX3tjeHngYGP7rweaBnuw==", - "dev": true, - "optional": true, - "requires": { - "bl": "^4.0.3", - "end-of-stream": "^1.4.1", - "fs-constants": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^3.1.1" - } - } - } - }, "prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", @@ -4276,9 +4117,9 @@ "dev": true }, "protocol-buffers-schema": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/protocol-buffers-schema/-/protocol-buffers-schema-3.4.0.tgz", - "integrity": "sha512-G/2kcamPF2S49W5yaMGdIpkG6+5wZF0fzBteLKgEHjbNzqjZQ85aAs1iJGto31EJaSTkNvHs5IXuHSaTLWBAiA==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/protocol-buffers-schema/-/protocol-buffers-schema-3.6.0.tgz", + "integrity": "sha512-TdDRD+/QNdrCGCE7v8340QyuXd4kIWIgapsE2+n/SaGiSSbomYl4TjHlvIoCWRpE7wFt02EpB35VVA2ImcBVqw==", "dev": true }, "protons": { @@ -4350,10 +4191,13 @@ "dev": true }, "qs": { - "version": "6.9.4", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.9.4.tgz", - "integrity": "sha512-A1kFqHekCTM7cz0udomYUoYNWjBebHm/5wzU/XqrBRBNWectVH0QIiN+NEcZ0Dte5hvzHwbr8+XQmguPhJ6WdQ==", - "dev": true + "version": "6.10.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.3.tgz", + "integrity": "sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ==", + "dev": true, + "requires": { + "side-channel": "^1.0.4" + } }, "ramda": { "version": "0.25.0", @@ -4378,19 +4222,6 @@ } } }, - "rc": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", - "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", - "dev": true, - "optional": true, - "requires": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - } - }, "read-pkg": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", @@ -4438,9 +4269,9 @@ } }, "readdirp": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.4.0.tgz", - "integrity": "sha512-0xe001vZBnJEK+uKcj8qOhyAKPzIT+gStxWr3LCB0DwcXR5NZJ3IaC+yGnHCYzB/S7ov3m3EEbZI2zeNvX+hGQ==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", "dev": true, "requires": { "picomatch": "^2.2.1" @@ -4487,9 +4318,15 @@ }, "dependencies": { "qs": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", - "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", + "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", + "dev": true + }, + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", "dev": true } } @@ -4533,9 +4370,9 @@ "dev": true }, "rimraf": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", - "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", "dev": true, "requires": { "glob": "^7.1.3" @@ -4627,13 +4464,6 @@ "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==", "dev": true }, - "set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", - "dev": true, - "optional": true - }, "sha.js": { "version": "2.4.11", "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", @@ -4659,10 +4489,21 @@ "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true }, + "side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dev": true, + "requires": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + } + }, "signal-exit": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", - "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==", + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", "dev": true }, "signed-varint": { @@ -4674,25 +4515,6 @@ "varint": "~5.0.0" } }, - "simple-concat": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", - "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", - "dev": true, - "optional": true - }, - "simple-get": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-3.1.0.tgz", - "integrity": "sha512-bCR6cP+aTdScaQCnQKbPKtJOKDp/hj9EDLJo3Nw4y1QksqaovlW/bnptB6/c1e+qmNIDHRK+oXFDdEqBT8WzUA==", - "dev": true, - "optional": true, - "requires": { - "decompress-response": "^4.2.0", - "once": "^1.3.1", - "simple-concat": "^1.0.0" - } - }, "slash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", @@ -4718,20 +4540,6 @@ } } }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" - }, - "source-map-support": { - "version": "0.5.19", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", - "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", - "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, "spdx-correct": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", @@ -4799,9 +4607,9 @@ "dev": true }, "sshpk": { - "version": "1.16.1", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", - "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", + "integrity": "sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==", "dev": true, "requires": { "asn1": "~0.2.3", @@ -4873,13 +4681,6 @@ "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", "dev": true }, - "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", - "dev": true, - "optional": true - }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -4935,6 +4736,20 @@ } } }, + "tar": { + "version": "6.1.11", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.11.tgz", + "integrity": "sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA==", + "dev": true, + "requires": { + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "minipass": "^3.0.0", + "minizlib": "^2.1.1", + "mkdirp": "^1.0.3", + "yallist": "^4.0.0" + } + }, "tar-fs": { "version": "1.16.3", "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-1.16.3.tgz", @@ -4945,6 +4760,23 @@ "mkdirp": "^0.5.1", "pump": "^1.0.0", "tar-stream": "^1.1.2" + }, + "dependencies": { + "chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", + "dev": true + }, + "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" + } + } } }, "tar-stream": { @@ -4985,12 +4817,21 @@ } }, "tmp": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.1.0.tgz", - "integrity": "sha512-J7Z2K08jbGcdA1kkQpJSqLF6T0tdQqpR2pnSUXsIchbPdTI9v3e85cLW0d6WDhwuAleOV71j2xWs8qMPfK7nKw==", + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz", + "integrity": "sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==", "dev": true, "requires": { - "rimraf": "^2.6.3" + "rimraf": "^3.0.0" + } + }, + "tmp-promise": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/tmp-promise/-/tmp-promise-3.0.3.tgz", + "integrity": "sha512-RwM7MoPojPxsOBYnyd2hy0bxtIlVrihNs9pj5SUvY8Zz1sQcQG2tG1hSr8PDxfgEB8RNKDhqbIlroIarSNDNsQ==", + "dev": true, + "requires": { + "tmp": "^0.2.0" } }, "to-buffer": { @@ -5024,6 +4865,12 @@ "punycode": "^2.1.1" } }, + "tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=", + "dev": true + }, "tslib": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", @@ -5076,9 +4923,9 @@ "dev": true }, "typescript": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.1.3.tgz", - "integrity": "sha512-B3ZIOf1IKeH2ixgHhj6la6xdwR9QrLC5d1VKeCSY4tvkqhF2eqd9O7txNlS0PO3GrBAFIdr3L1ndNwteUbZLYg==", + "version": "4.5.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.5.tgz", + "integrity": "sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==", "dev": true }, "unique-by": { @@ -5088,9 +4935,9 @@ "dev": true }, "universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", "dev": true }, "uri-js": { @@ -5103,13 +4950,13 @@ } }, "ursa-optional": { - "version": "0.10.1", - "resolved": "https://registry.npmjs.org/ursa-optional/-/ursa-optional-0.10.1.tgz", - "integrity": "sha512-/pgpBXVJut57dHNrdGF+1/qXi+5B7JrlmZDWPSyoivEcbwFWRZJBJGkWb6ivknMBA3bnFA7lqsb6iHiFfp79QQ==", + "version": "0.10.2", + "resolved": "https://registry.npmjs.org/ursa-optional/-/ursa-optional-0.10.2.tgz", + "integrity": "sha512-TKdwuLboBn7M34RcvVTuQyhvrA8gYKapuVdm0nBP0mnBc7oECOfUQZrY91cefL3/nm64ZyrejSRrhTVdX7NG/A==", "dev": true, "requires": { "bindings": "^1.5.0", - "nan": "^2.14.0" + "nan": "^2.14.2" } }, "util-deprecate": { @@ -5119,9 +4966,9 @@ "dev": true }, "uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", "dev": true }, "v8-compile-cache": { @@ -5155,6 +5002,14 @@ "assert-plus": "^1.0.0", "core-util-is": "1.0.2", "extsprintf": "^1.2.0" + }, + "dependencies": { + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true + } } }, "vscode-json-languageservice": { @@ -5203,6 +5058,22 @@ "defaults": "^1.0.3" } }, + "webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=", + "dev": true + }, + "whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=", + "dev": true, + "requires": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, "which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -5212,23 +5083,6 @@ "isexe": "^2.0.0" } }, - "which-pm-runs": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/which-pm-runs/-/which-pm-runs-1.0.0.tgz", - "integrity": "sha1-Zws6+8VS4LVd9rd4DKdGFfI60cs=", - "dev": true, - "optional": true - }, - "wide-align": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", - "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", - "dev": true, - "optional": true, - "requires": { - "string-width": "^1.0.2 || 2" - } - }, "word-wrap": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", @@ -5244,7 +5098,14 @@ "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "ws": { + "version": "7.5.7", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.7.tgz", + "integrity": "sha512-KMvVuFzpKBuiIXW3E4u3mySRO2/mCHSyZDJQM5NQ9Q9KHWHWh0NHgfbRMLLrceUK5qAL4ytALJbpRMjixFZh8A==", + "dev": true }, "xtend": { "version": "4.0.2", @@ -5253,15 +5114,15 @@ "dev": true }, "yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true }, "yaml": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.0.tgz", - "integrity": "sha512-yr2icI4glYaNG+KWONODapy2/jDdMSDnrONSjblABjD9B4Z5LgiircSt8m8sRZFNi08kG9Sm0uSHtEmP3zaEGg==", + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", + "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", "dev": true }, "yargs-parser": { diff --git a/child/package.json b/child/package.json index fd5a75e..514597c 100644 --- a/child/package.json +++ b/child/package.json @@ -9,7 +9,8 @@ "codegen": "graph codegen", "build": "graph build", "create": "graph create --node https://mumbai-graph.matic.today/ nglglhtr/token-subgraph", - "deploy": "graph deploy --node https://mumbai-graph.matic.today/ --ipfs https://ipfs.infura.io:5001/ nglglhtr/token-subgraph", + "deploy": "graph deploy --debug --access-token 37a06dbad49045bc9b07ee81d3cf2ad6 --node https://api.thegraph.com/deploy/ --ipfs https://api.thegraph.com/ipfs/ vibhurajeev/burn", + "deploy2": "graph deploy --debug --access-token 37a06dbad49045bc9b07ee81d3cf2ad6 --node https://api.thegraph.com/deploy/ --ipfs https://api.thegraph.com/ipfs/ vibhurajeev/burn2", "prepare:mainnet": "mustache config/mainnet.json subgraph.template.yaml > subgraph.yaml", "prepare:mumbai": "mustache config/mumbai.json subgraph.template.yaml > subgraph.yaml", "create-local": "graph create --node http://localhost:8020/ maticnetwork/mumbai-child-subgraphs", @@ -34,16 +35,16 @@ }, "homepage": "https://github.com/maticnetwork/subgraph#readme", "devDependencies": { - "@graphprotocol/graph-cli": "0.18.0", + "@graphprotocol/graph-cli": "^0.26.0", "@typescript-eslint/eslint-plugin": "^4.10.0", "@typescript-eslint/parser": "^4.10.0", "eslint": "^7.16.0", "eslint-plugin-json": "^2.1.2", "eslint-plugin-unicorn": "^24.0.0", "mustache": "4.0.1", - "typescript": "^4.1.3" + "typescript": "^4.5.5" }, "dependencies": { - "@graphprotocol/graph-ts": "0.18.0" + "@graphprotocol/graph-ts": "^0.24.1" } } diff --git a/child/schema.graphql b/child/schema.graphql index a6a2bc2..680c9fb 100644 --- a/child/schema.graphql +++ b/child/schema.graphql @@ -4,11 +4,15 @@ type TransactionEntity @entity { token: Bytes! from: Bytes! to: Bytes! - value: BigDecimal! + amount: BigInt + tokenId: BigInt + tokenIds: [BigInt!] + amounts: [BigInt!] type: String! # deposit, transfer or withdrawal block: BigInt! timestamp: BigInt! transaction: Bytes! + tokenType: String isPos: Boolean } @@ -17,3 +21,8 @@ type User @entity { address: Bytes! amount: BigInt! } + +type GlobalTransferCounter @entity { + id: ID! + current: BigInt! +} diff --git a/child/src/mappings/child-erc1155.ts b/child/src/mappings/child-erc1155.ts new file mode 100644 index 0000000..ba0ac24 --- /dev/null +++ b/child/src/mappings/child-erc1155.ts @@ -0,0 +1,73 @@ +import { BigInt } from '@graphprotocol/graph-ts' +import { TransferBatch, TransferSingle } from '../../generated/ChildERC1155/ChildERC1155' +import { TransactionEntity, GlobalTransferCounter } from '../../generated/schema' +//import { BigDecimal, BigInt } from '@graphprotocol/graph-ts' +import { toDecimal } from '../helpers/numbers' + +const ZERO_ADDRESS = '0x0000000000000000000000000000000000000000' + +function getGlobalTransferCounter(): GlobalTransferCounter { + // Only one entry will be kept in this entity + let id = 'global-transfer-counter' + let entity = GlobalTransferCounter.load(id) + if (entity === null) { + entity = new GlobalTransferCounter(id) + entity.current = BigInt.fromI32(0) + } + return entity as GlobalTransferCounter +} + +export function handleSingleTransfer(event: TransferSingle): void { + + // Try to get what's current global plasma counter's state + // when called for very first time, it'll be `0` + let counter = getGlobalTransferCounter() + let updated = counter.current.plus(BigInt.fromI32(1)) + + // Updating global counter's state + counter.current = updated + counter.save() + + const isWithdraw = event.params.to.toHex() === ZERO_ADDRESS || event.params.to === event.address ? true : false + + let transactionEntity = new TransactionEntity(event.transaction.hash.toHex() + '-' + event.logIndex.toString() + (isWithdraw ? '-withdraw' : '-transfer')) + transactionEntity.type = isWithdraw ? 'withdraw' : 'transfer' + transactionEntity.from = event.params.from + transactionEntity.to = event.params.to + transactionEntity.amount = event.params.value + transactionEntity.tokenId = event.params.id + transactionEntity.block = event.block.number + transactionEntity.timestamp = event.block.timestamp + transactionEntity.transaction = event.transaction.hash + transactionEntity.token = event.address + transactionEntity.tokenType = "ERC1155" + transactionEntity.isPos = true + transactionEntity.save() +} + +export function handleBatchTransfer(event: TransferBatch): void { + // Try to get what's current global plasma counter's state + // when called for very first time, it'll be `0` + let counter = getGlobalTransferCounter() + let updated = counter.current.plus(BigInt.fromI32(1)) + + // Updating global counter's state + counter.current = updated + counter.save() + + const isWithdraw = event.params.to.toHex() === ZERO_ADDRESS || event.params.to === event.address ? true : false + + let transactionEntity = new TransactionEntity(event.transaction.hash.toHex() + '-' + event.logIndex.toString() + (isWithdraw ? '-withdraw' : '-transfer')) + + transactionEntity.type = isWithdraw ? 'withdraw' : 'transfer' + transactionEntity.from = event.params.from + transactionEntity.to = event.params.to + transactionEntity.amounts = event.params.values + transactionEntity.tokenIds = event.params.ids + transactionEntity.timestamp = event.block.timestamp + transactionEntity.transaction = event.transaction.hash + transactionEntity.token = event.address + transactionEntity.tokenType = "ERC1155" + transactionEntity.isPos = true + transactionEntity.save() +} diff --git a/child/src/mappings/child-erc20.ts b/child/src/mappings/child-erc20.ts index 72bf05a..40650a9 100644 --- a/child/src/mappings/child-erc20.ts +++ b/child/src/mappings/child-erc20.ts @@ -1,57 +1,88 @@ +import { BigInt, Address } from '@graphprotocol/graph-ts' import { LogTransfer, Withdraw, Transfer } from '../../generated/ChildERC20/ChildERC20' -import { TransactionEntity } from '../../generated/schema' +import { TransactionEntity, GlobalTransferCounter } from '../../generated/schema' import { toDecimal } from '../helpers/numbers' const ZERO_ADDRESS = '0x0000000000000000000000000000000000000000' +function getGlobalTransferCounter(): GlobalTransferCounter { + // Only one entry will be kept in this entity + let id = 'global-transfer-counter' + let entity = GlobalTransferCounter.load(id) + if (entity === null) { + entity = new GlobalTransferCounter(id) + entity.current = BigInt.fromI32(0) + } + return entity as GlobalTransferCounter +} + // token, from, amount, to export function handleLogTransfer(event: LogTransfer): void { let transactionEntity = new TransactionEntity(event.transaction.hash.toHex() + '-' + event.logIndex.toString() + '-logTransfer') - transactionEntity.from = event.params.from transactionEntity.to = event.params.to - transactionEntity.value = toDecimal(event.params.amount, 18) + transactionEntity.amount = event.params.amount transactionEntity.block = event.block.number transactionEntity.timestamp = event.block.timestamp transactionEntity.transaction = event.transaction.hash transactionEntity.token = event.address transactionEntity.type = 'transfer' - if (transactionEntity.to.toHex() == ZERO_ADDRESS) { + if (transactionEntity.to.toHex() === ZERO_ADDRESS) { return } transactionEntity.save() } export function handleWithdraw(event: Withdraw): void { - let transactionEntity = new TransactionEntity(event.transaction.hash.toHex() + '-' + event.logIndex.toString() + '-withdraw') + // Try to get what's current global plasma counter's state + // when called for very first time, it'll be `0` + let counter = getGlobalTransferCounter() + let updated = counter.current.plus(BigInt.fromI32(1)) + + // Updating global counter's state + counter.current = updated + counter.save() + + // Transaction Entity part + let transactionEntity = new TransactionEntity(event.transaction.hash.toHex() + '-' + event.logIndex.toString() + '-withdraw') transactionEntity.from = event.params.from - transactionEntity.to = null - transactionEntity.value = toDecimal(event.params.amount, 18) + transactionEntity.to = Address.fromString(ZERO_ADDRESS) + transactionEntity.amount = event.params.amount transactionEntity.block = event.block.number transactionEntity.timestamp = event.block.timestamp transactionEntity.transaction = event.transaction.hash transactionEntity.token = event.address transactionEntity.type = 'withdraw' + transactionEntity.tokenType = "ERC20" transactionEntity.isPos = false transactionEntity.save() } -export function handleBurnTransfer(event: Transfer): void { - - if (event.params.to.toHex() == ZERO_ADDRESS) { - let transactionEntity = new TransactionEntity(event.transaction.hash.toHex() + '-withdraw') - - transactionEntity.from = event.params.from - transactionEntity.to = event.params.to - transactionEntity.value = toDecimal(event.params.value, 18) - transactionEntity.block = event.block.number - transactionEntity.timestamp = event.block.timestamp - transactionEntity.transaction = event.transaction.hash - transactionEntity.token = event.address - transactionEntity.type = 'withdraw' - transactionEntity.isPos = true - transactionEntity.save() - } +export function handleTransfer(event: Transfer): void { + + // Try to get what's current global transfer counter's state + // when called for very first time, it'll be `0` + let counter = getGlobalTransferCounter() + let updated = counter.current.plus(BigInt.fromI32(1)) + + // Updating global counter's state + counter.current = updated + counter.save() + + const isWithdraw = event.params.to.toHex() === ZERO_ADDRESS || event.params.to === event.address ? true : false + + let transactionEntity = new TransactionEntity(event.transaction.hash.toHex() + '-' + event.logIndex.toString() + (isWithdraw ? '-withdraw' : '-transfer')) + transactionEntity.type = isWithdraw ? 'withdraw' : 'transfer' + transactionEntity.from = event.params.from + transactionEntity.to = event.params.to + transactionEntity.amount = event.params.value + transactionEntity.block = event.block.number + transactionEntity.timestamp = event.block.timestamp + transactionEntity.transaction = event.transaction.hash + transactionEntity.token = event.address + transactionEntity.tokenType = "ERC20" + transactionEntity.isPos = true + transactionEntity.save() } diff --git a/child/src/mappings/child-erc721.ts b/child/src/mappings/child-erc721.ts new file mode 100644 index 0000000..66fe47a --- /dev/null +++ b/child/src/mappings/child-erc721.ts @@ -0,0 +1,60 @@ +import { BigInt } from '@graphprotocol/graph-ts' +import { Transfer } from '../../generated/ChildERC721/ChildERC721' +import { TransactionEntity, GlobalTransferCounter } from '../../generated/schema' +//import { BigDecimal, BigInt } from '@graphprotocol/graph-ts' +import { toDecimal } from '../helpers/numbers' + +const ZERO_ADDRESS = '0x0000000000000000000000000000000000000000' + +// export function handleWithdraw(event: Withdraw): void { +// let transactionEntity = new TransactionEntity(event.transaction.hash.toHex() + '-' + event.logIndex.toString() + '-withdraw') + +// transactionEntity.from = event.params.from +// transactionEntity.to = null +// transactionEntity.value = event.params.tokenId +// transactionEntity.block = event.block.number +// transactionEntity.timestamp = event.block.timestamp +// transactionEntity.transaction = event.transaction.hash +// transactionEntity.token = event.address +// transactionEntity.type = 'withdraw' +// transactionEntity.isPos = false +// transactionEntity.save() +// } + +function getGlobalTransferCounter(): GlobalTransferCounter { + // Only one entry will be kept in this entity + let id = 'global-transfer-counter' + let entity = GlobalTransferCounter.load(id) + if (entity === null) { + entity = new GlobalTransferCounter(id) + entity.current = BigInt.fromI32(0) + } + return entity as GlobalTransferCounter +} + +export function handleTransfer(event: Transfer): void { + + // Try to get what's current global plasma counter's state + // when called for very first time, it'll be `0` + let counter = getGlobalTransferCounter() + let updated = counter.current.plus(BigInt.fromI32(1)) + + // Updating global counter's state + counter.current = updated + counter.save() + + const isWithdraw = event.params.to.toHex() === ZERO_ADDRESS || event.params.to === event.address ? true : false + + let transactionEntity = new TransactionEntity(event.transaction.hash.toHex() + '-' + event.logIndex.toString() + (isWithdraw ? '-withdraw' : '-transfer')) + transactionEntity.type = isWithdraw ? 'withdraw' : 'transfer' + transactionEntity.from = event.params.from + transactionEntity.to = event.params.to + transactionEntity.tokenId = event.params.tokenId + transactionEntity.block = event.block.number + transactionEntity.timestamp = event.block.timestamp + transactionEntity.transaction = event.transaction.hash + transactionEntity.token = event.address + transactionEntity.tokenType = "ERC721" + transactionEntity.isPos = true + transactionEntity.save() +} diff --git a/child/src/mappings/erc20.ts b/child/src/mappings/erc20.ts index d9433bc..617d5d4 100644 --- a/child/src/mappings/erc20.ts +++ b/child/src/mappings/erc20.ts @@ -10,7 +10,7 @@ export function handleTransfer(event: Transfer): void { if (event.params.to != ZERO_ADDRESS) { let userToID = event.params.to.toHex() let userTo = User.load(userToID) - if (userTo == null) { + if (userTo === null) { userTo = new User(userToID) userTo.address = event.params.to userTo.amount = BigInt.fromI32(0) @@ -22,7 +22,7 @@ export function handleTransfer(event: Transfer): void { if (event.params.from != ZERO_ADDRESS) { let userFromID = event.params.from.toHex() let userFrom = User.load(userFromID) - if (userFrom == null) { + if (userFrom === null) { userFrom = new User(userFromID) userFrom.address = event.params.from userFrom.amount = BigInt.fromI32(0) diff --git a/child/subgraph.template.yaml b/child/subgraph.template.yaml index 3a7fb79..1f7af85 100644 --- a/child/subgraph.template.yaml +++ b/child/subgraph.template.yaml @@ -10,7 +10,7 @@ dataSources: startBlock: {{ contracts.maticToken.startBlock }} mapping: kind: ethereum/events - apiVersion: 0.0.4 + apiVersion: 0.0.6 language: wasm/assemblyscript file: ./src/mappings/child-erc20.ts entities: @@ -22,6 +22,48 @@ dataSources: - event: LogTransfer(indexed address,indexed address,indexed address,uint256,uint256,uint256,uint256,uint256) handler: handleLogTransfer - event: Transfer(indexed address,indexed address,uint256) - handler: handleBurnTransfer + handler: handleTransfer - event: Withdraw(indexed address,indexed address,uint256,uint256,uint256) - handler: handleWithdraw \ No newline at end of file + handler: handleWithdraw + + - kind: ethereum/contract + name: ChildERC721 + network: {{network}} + source: + abi: ChildERC721 + startBlock: {{ contracts.maticToken.startBlock }} + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ./src/mappings/child-erc721.ts + entities: + - TransactionEntity + abis: + - name: ChildERC721 + file: ./abis/ChildErc721.json + eventHandlers: + - event: Transfer(indexed address,indexed address,indexed uint256) + handler: handleTransfer + + - kind: ethereum/contract + name: ChildERC1155 + network: {{network}} + source: + abi: ChildERC1155 + startBlock: {{ contracts.maticToken.startBlock }} + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ./src/mappings/child-erc1155.ts + entities: + - TransactionEntity + abis: + - name: ChildERC1155 + file: ./abis/ChildErc1155.json + eventHandlers: + - event: TransferSingle(indexed address,indexed address,indexed address,uint256,uint256) + handler: handleSingleTransfer + - event: TransferBatch(indexed address,indexed address,indexed address,uint256[],uint256[]) + handler: handleBatchTransfer \ No newline at end of file From 96409985f78cc04ed6e2d868a2eed9aa1c82b37e Mon Sep 17 00:00:00 2001 From: vibhurajeev Date: Tue, 22 Feb 2022 10:28:59 +0530 Subject: [PATCH 4/8] fix: code cleanup --- child/src/mappings/child-erc1155.ts | 9 ++++----- child/src/mappings/child-erc20.ts | 9 ++++----- child/src/mappings/child-erc721.ts | 5 ++--- 3 files changed, 10 insertions(+), 13 deletions(-) diff --git a/child/src/mappings/child-erc1155.ts b/child/src/mappings/child-erc1155.ts index ba0ac24..37efc13 100644 --- a/child/src/mappings/child-erc1155.ts +++ b/child/src/mappings/child-erc1155.ts @@ -2,7 +2,6 @@ import { BigInt } from '@graphprotocol/graph-ts' import { TransferBatch, TransferSingle } from '../../generated/ChildERC1155/ChildERC1155' import { TransactionEntity, GlobalTransferCounter } from '../../generated/schema' //import { BigDecimal, BigInt } from '@graphprotocol/graph-ts' -import { toDecimal } from '../helpers/numbers' const ZERO_ADDRESS = '0x0000000000000000000000000000000000000000' @@ -19,7 +18,7 @@ function getGlobalTransferCounter(): GlobalTransferCounter { export function handleSingleTransfer(event: TransferSingle): void { - // Try to get what's current global plasma counter's state + // Try to get what's current global counter's state // when called for very first time, it'll be `0` let counter = getGlobalTransferCounter() let updated = counter.current.plus(BigInt.fromI32(1)) @@ -40,13 +39,13 @@ export function handleSingleTransfer(event: TransferSingle): void { transactionEntity.timestamp = event.block.timestamp transactionEntity.transaction = event.transaction.hash transactionEntity.token = event.address - transactionEntity.tokenType = "ERC1155" + transactionEntity.tokenType = 'ERC1155' transactionEntity.isPos = true transactionEntity.save() } export function handleBatchTransfer(event: TransferBatch): void { - // Try to get what's current global plasma counter's state + // Try to get what's current global counter's state // when called for very first time, it'll be `0` let counter = getGlobalTransferCounter() let updated = counter.current.plus(BigInt.fromI32(1)) @@ -67,7 +66,7 @@ export function handleBatchTransfer(event: TransferBatch): void { transactionEntity.timestamp = event.block.timestamp transactionEntity.transaction = event.transaction.hash transactionEntity.token = event.address - transactionEntity.tokenType = "ERC1155" + transactionEntity.tokenType = 'ERC1155' transactionEntity.isPos = true transactionEntity.save() } diff --git a/child/src/mappings/child-erc20.ts b/child/src/mappings/child-erc20.ts index 40650a9..ae998be 100644 --- a/child/src/mappings/child-erc20.ts +++ b/child/src/mappings/child-erc20.ts @@ -1,7 +1,6 @@ import { BigInt, Address } from '@graphprotocol/graph-ts' import { LogTransfer, Withdraw, Transfer } from '../../generated/ChildERC20/ChildERC20' import { TransactionEntity, GlobalTransferCounter } from '../../generated/schema' -import { toDecimal } from '../helpers/numbers' const ZERO_ADDRESS = '0x0000000000000000000000000000000000000000' @@ -36,7 +35,7 @@ export function handleLogTransfer(event: LogTransfer): void { export function handleWithdraw(event: Withdraw): void { - // Try to get what's current global plasma counter's state + // Try to get what's current globalcounter's state // when called for very first time, it'll be `0` let counter = getGlobalTransferCounter() let updated = counter.current.plus(BigInt.fromI32(1)) @@ -55,14 +54,14 @@ export function handleWithdraw(event: Withdraw): void { transactionEntity.transaction = event.transaction.hash transactionEntity.token = event.address transactionEntity.type = 'withdraw' - transactionEntity.tokenType = "ERC20" + transactionEntity.tokenType = 'ERC20' transactionEntity.isPos = false transactionEntity.save() } export function handleTransfer(event: Transfer): void { - // Try to get what's current global transfer counter's state + // Try to get what's current global counter's state // when called for very first time, it'll be `0` let counter = getGlobalTransferCounter() let updated = counter.current.plus(BigInt.fromI32(1)) @@ -82,7 +81,7 @@ export function handleTransfer(event: Transfer): void { transactionEntity.timestamp = event.block.timestamp transactionEntity.transaction = event.transaction.hash transactionEntity.token = event.address - transactionEntity.tokenType = "ERC20" + transactionEntity.tokenType = 'ERC20' transactionEntity.isPos = true transactionEntity.save() } diff --git a/child/src/mappings/child-erc721.ts b/child/src/mappings/child-erc721.ts index 66fe47a..8f413d3 100644 --- a/child/src/mappings/child-erc721.ts +++ b/child/src/mappings/child-erc721.ts @@ -2,7 +2,6 @@ import { BigInt } from '@graphprotocol/graph-ts' import { Transfer } from '../../generated/ChildERC721/ChildERC721' import { TransactionEntity, GlobalTransferCounter } from '../../generated/schema' //import { BigDecimal, BigInt } from '@graphprotocol/graph-ts' -import { toDecimal } from '../helpers/numbers' const ZERO_ADDRESS = '0x0000000000000000000000000000000000000000' @@ -34,7 +33,7 @@ function getGlobalTransferCounter(): GlobalTransferCounter { export function handleTransfer(event: Transfer): void { - // Try to get what's current global plasma counter's state + // Try to get what's current global counter's state // when called for very first time, it'll be `0` let counter = getGlobalTransferCounter() let updated = counter.current.plus(BigInt.fromI32(1)) @@ -54,7 +53,7 @@ export function handleTransfer(event: Transfer): void { transactionEntity.timestamp = event.block.timestamp transactionEntity.transaction = event.transaction.hash transactionEntity.token = event.address - transactionEntity.tokenType = "ERC721" + transactionEntity.tokenType = 'ERC721' transactionEntity.isPos = true transactionEntity.save() } From 7f4e99f626f142c95b3a216992e7a1e540c1d7cc Mon Sep 17 00:00:00 2001 From: vibhurajeev Date: Tue, 22 Feb 2022 10:36:08 +0530 Subject: [PATCH 5/8] fix: indent space --- child/src/mappings/child-erc1155.ts | 98 ++++++++++++++--------------- child/src/mappings/child-erc20.ts | 5 +- child/src/mappings/child-erc721.ts | 4 +- 3 files changed, 53 insertions(+), 54 deletions(-) diff --git a/child/src/mappings/child-erc1155.ts b/child/src/mappings/child-erc1155.ts index 37efc13..09919c7 100644 --- a/child/src/mappings/child-erc1155.ts +++ b/child/src/mappings/child-erc1155.ts @@ -6,67 +6,67 @@ import { TransactionEntity, GlobalTransferCounter } from '../../generated/schema const ZERO_ADDRESS = '0x0000000000000000000000000000000000000000' function getGlobalTransferCounter(): GlobalTransferCounter { - // Only one entry will be kept in this entity - let id = 'global-transfer-counter' - let entity = GlobalTransferCounter.load(id) - if (entity === null) { - entity = new GlobalTransferCounter(id) - entity.current = BigInt.fromI32(0) - } - return entity as GlobalTransferCounter + // Only one entry will be kept in this entity + let id = 'global-transfer-counter' + let entity = GlobalTransferCounter.load(id) + if (entity === null) { + entity = new GlobalTransferCounter(id) + entity.current = BigInt.fromI32(0) + } + return entity as GlobalTransferCounter } export function handleSingleTransfer(event: TransferSingle): void { - // Try to get what's current global counter's state - // when called for very first time, it'll be `0` - let counter = getGlobalTransferCounter() - let updated = counter.current.plus(BigInt.fromI32(1)) + // Try to get what's current global counter's state + // when called for very first time, it'll be `0` + let counter = getGlobalTransferCounter() + let updated = counter.current.plus(BigInt.fromI32(1)) - // Updating global counter's state - counter.current = updated - counter.save() + // Updating global counter's state + counter.current = updated + counter.save() - const isWithdraw = event.params.to.toHex() === ZERO_ADDRESS || event.params.to === event.address ? true : false + const isWithdraw = event.params.to.toHex() === ZERO_ADDRESS || event.params.to === event.address ? true : false - let transactionEntity = new TransactionEntity(event.transaction.hash.toHex() + '-' + event.logIndex.toString() + (isWithdraw ? '-withdraw' : '-transfer')) - transactionEntity.type = isWithdraw ? 'withdraw' : 'transfer' - transactionEntity.from = event.params.from - transactionEntity.to = event.params.to - transactionEntity.amount = event.params.value - transactionEntity.tokenId = event.params.id - transactionEntity.block = event.block.number - transactionEntity.timestamp = event.block.timestamp - transactionEntity.transaction = event.transaction.hash - transactionEntity.token = event.address - transactionEntity.tokenType = 'ERC1155' - transactionEntity.isPos = true - transactionEntity.save() + let transactionEntity = new TransactionEntity(event.transaction.hash.toHex() + '-' + event.logIndex.toString() + (isWithdraw ? '-withdraw' : '-transfer')) + transactionEntity.type = isWithdraw ? 'withdraw' : 'transfer' + transactionEntity.from = event.params.from + transactionEntity.to = event.params.to + transactionEntity.amount = event.params.value + transactionEntity.tokenId = event.params.id + transactionEntity.block = event.block.number + transactionEntity.timestamp = event.block.timestamp + transactionEntity.transaction = event.transaction.hash + transactionEntity.token = event.address + transactionEntity.tokenType = 'ERC1155' + transactionEntity.isPos = true + transactionEntity.save() } export function handleBatchTransfer(event: TransferBatch): void { - // Try to get what's current global counter's state - // when called for very first time, it'll be `0` - let counter = getGlobalTransferCounter() - let updated = counter.current.plus(BigInt.fromI32(1)) + // Try to get what's current global counter's state + // when called for very first time, it'll be `0` + let counter = getGlobalTransferCounter() + let updated = counter.current.plus(BigInt.fromI32(1)) - // Updating global counter's state - counter.current = updated - counter.save() + // Updating global counter's state + counter.current = updated + counter.save() - const isWithdraw = event.params.to.toHex() === ZERO_ADDRESS || event.params.to === event.address ? true : false + const isWithdraw = event.params.to.toHex() === ZERO_ADDRESS || event.params.to === event.address ? true : false - let transactionEntity = new TransactionEntity(event.transaction.hash.toHex() + '-' + event.logIndex.toString() + (isWithdraw ? '-withdraw' : '-transfer')) + let transactionEntity = new TransactionEntity(event.transaction.hash.toHex() + '-' + event.logIndex.toString() + (isWithdraw ? '-withdraw' : '-transfer')) - transactionEntity.type = isWithdraw ? 'withdraw' : 'transfer' - transactionEntity.from = event.params.from - transactionEntity.to = event.params.to - transactionEntity.amounts = event.params.values - transactionEntity.tokenIds = event.params.ids - transactionEntity.timestamp = event.block.timestamp - transactionEntity.transaction = event.transaction.hash - transactionEntity.token = event.address - transactionEntity.tokenType = 'ERC1155' - transactionEntity.isPos = true - transactionEntity.save() + transactionEntity.type = isWithdraw ? 'withdraw' : 'transfer' + transactionEntity.from = event.params.from + transactionEntity.to = event.params.to + transactionEntity.amounts = event.params.values + transactionEntity.tokenIds = event.params.ids + transactionEntity.timestamp = event.block.timestamp + transactionEntity.transaction = event.transaction.hash + transactionEntity.token = event.address + transactionEntity.tokenType = 'ERC1155' + transactionEntity.isPos = true + transactionEntity.save() } diff --git a/child/src/mappings/child-erc20.ts b/child/src/mappings/child-erc20.ts index ae998be..3ab0b83 100644 --- a/child/src/mappings/child-erc20.ts +++ b/child/src/mappings/child-erc20.ts @@ -35,7 +35,7 @@ export function handleLogTransfer(event: LogTransfer): void { export function handleWithdraw(event: Withdraw): void { - // Try to get what's current globalcounter's state + // Try to get what's current globalcounter's state // when called for very first time, it'll be `0` let counter = getGlobalTransferCounter() let updated = counter.current.plus(BigInt.fromI32(1)) @@ -60,7 +60,6 @@ export function handleWithdraw(event: Withdraw): void { } export function handleTransfer(event: Transfer): void { - // Try to get what's current global counter's state // when called for very first time, it'll be `0` let counter = getGlobalTransferCounter() @@ -71,7 +70,7 @@ export function handleTransfer(event: Transfer): void { counter.save() const isWithdraw = event.params.to.toHex() === ZERO_ADDRESS || event.params.to === event.address ? true : false - + let transactionEntity = new TransactionEntity(event.transaction.hash.toHex() + '-' + event.logIndex.toString() + (isWithdraw ? '-withdraw' : '-transfer')) transactionEntity.type = isWithdraw ? 'withdraw' : 'transfer' transactionEntity.from = event.params.from diff --git a/child/src/mappings/child-erc721.ts b/child/src/mappings/child-erc721.ts index 8f413d3..7c5aa28 100644 --- a/child/src/mappings/child-erc721.ts +++ b/child/src/mappings/child-erc721.ts @@ -44,8 +44,8 @@ export function handleTransfer(event: Transfer): void { const isWithdraw = event.params.to.toHex() === ZERO_ADDRESS || event.params.to === event.address ? true : false - let transactionEntity = new TransactionEntity(event.transaction.hash.toHex() + '-' + event.logIndex.toString() + (isWithdraw ? '-withdraw' : '-transfer')) - transactionEntity.type = isWithdraw ? 'withdraw' : 'transfer' + let transactionEntity = new TransactionEntity(event.transaction.hash.toHex() + '-' + event.logIndex.toString() + (isWithdraw ? '-withdraw' : '-transfer')) + transactionEntity.type = isWithdraw ? 'withdraw' : 'transfer' transactionEntity.from = event.params.from transactionEntity.to = event.params.to transactionEntity.tokenId = event.params.tokenId From 9c1d1d27dd207456c20a2b80fdc49a5e9e8a6c7a Mon Sep 17 00:00:00 2001 From: vibhurajeev Date: Mon, 28 Feb 2022 13:48:27 +0530 Subject: [PATCH 6/8] fix: ignoring datatype of variable --- child/src/mappings/child-erc1155.ts | 2 +- child/src/mappings/child-erc20.ts | 2 +- child/src/mappings/child-erc721.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/child/src/mappings/child-erc1155.ts b/child/src/mappings/child-erc1155.ts index 09919c7..ab2d679 100644 --- a/child/src/mappings/child-erc1155.ts +++ b/child/src/mappings/child-erc1155.ts @@ -27,7 +27,7 @@ export function handleSingleTransfer(event: TransferSingle): void { counter.current = updated counter.save() - const isWithdraw = event.params.to.toHex() === ZERO_ADDRESS || event.params.to === event.address ? true : false + const isWithdraw = event.params.to.toHex() == ZERO_ADDRESS || event.params.to == event.address ? true : false let transactionEntity = new TransactionEntity(event.transaction.hash.toHex() + '-' + event.logIndex.toString() + (isWithdraw ? '-withdraw' : '-transfer')) transactionEntity.type = isWithdraw ? 'withdraw' : 'transfer' diff --git a/child/src/mappings/child-erc20.ts b/child/src/mappings/child-erc20.ts index 3ab0b83..fca59ac 100644 --- a/child/src/mappings/child-erc20.ts +++ b/child/src/mappings/child-erc20.ts @@ -69,7 +69,7 @@ export function handleTransfer(event: Transfer): void { counter.current = updated counter.save() - const isWithdraw = event.params.to.toHex() === ZERO_ADDRESS || event.params.to === event.address ? true : false + const isWithdraw = event.params.to.toHex() == ZERO_ADDRESS || event.params.to == event.address ? true : false let transactionEntity = new TransactionEntity(event.transaction.hash.toHex() + '-' + event.logIndex.toString() + (isWithdraw ? '-withdraw' : '-transfer')) transactionEntity.type = isWithdraw ? 'withdraw' : 'transfer' diff --git a/child/src/mappings/child-erc721.ts b/child/src/mappings/child-erc721.ts index 7c5aa28..5048185 100644 --- a/child/src/mappings/child-erc721.ts +++ b/child/src/mappings/child-erc721.ts @@ -42,7 +42,7 @@ export function handleTransfer(event: Transfer): void { counter.current = updated counter.save() - const isWithdraw = event.params.to.toHex() === ZERO_ADDRESS || event.params.to === event.address ? true : false + const isWithdraw = event.params.to.toHex() == ZERO_ADDRESS || event.params.to == event.address ? true : false let transactionEntity = new TransactionEntity(event.transaction.hash.toHex() + '-' + event.logIndex.toString() + (isWithdraw ? '-withdraw' : '-transfer')) transactionEntity.type = isWithdraw ? 'withdraw' : 'transfer' From 6c189d8cbf2fcaf53d4f99b7da77c9bfd9c2e975 Mon Sep 17 00:00:00 2001 From: vibhurajeev Date: Wed, 23 Mar 2022 11:10:33 +0530 Subject: [PATCH 7/8] new: mint indexing --- child/src/mappings/child-erc1155.ts | 14 ++++++++------ child/src/mappings/child-erc20.ts | 7 ++++--- child/src/mappings/child-erc721.ts | 7 ++++--- child/subgraph.template.yaml | 6 +++--- 4 files changed, 19 insertions(+), 15 deletions(-) diff --git a/child/src/mappings/child-erc1155.ts b/child/src/mappings/child-erc1155.ts index ab2d679..222ea31 100644 --- a/child/src/mappings/child-erc1155.ts +++ b/child/src/mappings/child-erc1155.ts @@ -27,10 +27,11 @@ export function handleSingleTransfer(event: TransferSingle): void { counter.current = updated counter.save() - const isWithdraw = event.params.to.toHex() == ZERO_ADDRESS || event.params.to == event.address ? true : false + const isWithdraw = event.params.to.toHex() == ZERO_ADDRESS ? true : false + const isMint = event.params.from.toHex() == ZERO_ADDRESS ? true : false - let transactionEntity = new TransactionEntity(event.transaction.hash.toHex() + '-' + event.logIndex.toString() + (isWithdraw ? '-withdraw' : '-transfer')) - transactionEntity.type = isWithdraw ? 'withdraw' : 'transfer' + let transactionEntity = new TransactionEntity(event.transaction.hash.toHex() + '-' + event.logIndex.toString() + (isWithdraw ? '-withdraw' : isMint ? '-mint' : '-transfer')) + transactionEntity.type = isWithdraw ? 'withdraw' : isMint ? 'mint' : 'transfer' transactionEntity.from = event.params.from transactionEntity.to = event.params.to transactionEntity.amount = event.params.value @@ -54,11 +55,12 @@ export function handleBatchTransfer(event: TransferBatch): void { counter.current = updated counter.save() - const isWithdraw = event.params.to.toHex() === ZERO_ADDRESS || event.params.to === event.address ? true : false + const isWithdraw = event.params.to.toHex() == ZERO_ADDRESS ? true : false + const isMint = event.params.from.toHex() == ZERO_ADDRESS ? true : false - let transactionEntity = new TransactionEntity(event.transaction.hash.toHex() + '-' + event.logIndex.toString() + (isWithdraw ? '-withdraw' : '-transfer')) + let transactionEntity = new TransactionEntity(event.transaction.hash.toHex() + '-' + event.logIndex.toString() + (isWithdraw ? '-withdraw' : isMint ? '-mint' : '-transfer')) - transactionEntity.type = isWithdraw ? 'withdraw' : 'transfer' + transactionEntity.type = isWithdraw ? 'withdraw' : isMint ? 'mint' : 'transfer' transactionEntity.from = event.params.from transactionEntity.to = event.params.to transactionEntity.amounts = event.params.values diff --git a/child/src/mappings/child-erc20.ts b/child/src/mappings/child-erc20.ts index fca59ac..ada4f76 100644 --- a/child/src/mappings/child-erc20.ts +++ b/child/src/mappings/child-erc20.ts @@ -69,10 +69,11 @@ export function handleTransfer(event: Transfer): void { counter.current = updated counter.save() - const isWithdraw = event.params.to.toHex() == ZERO_ADDRESS || event.params.to == event.address ? true : false + const isWithdraw = event.params.to.toHex() == ZERO_ADDRESS ? true : false + const isMint = event.params.from.toHex() == ZERO_ADDRESS ? true : false - let transactionEntity = new TransactionEntity(event.transaction.hash.toHex() + '-' + event.logIndex.toString() + (isWithdraw ? '-withdraw' : '-transfer')) - transactionEntity.type = isWithdraw ? 'withdraw' : 'transfer' + let transactionEntity = new TransactionEntity(event.transaction.hash.toHex() + '-' + event.logIndex.toString() + (isWithdraw ? '-withdraw' : isMint ? '-mint' : '-transfer')) + transactionEntity.type = isWithdraw ? 'withdraw' : isMint ? 'mint' : 'transfer' transactionEntity.from = event.params.from transactionEntity.to = event.params.to transactionEntity.amount = event.params.value diff --git a/child/src/mappings/child-erc721.ts b/child/src/mappings/child-erc721.ts index 5048185..c74fbe3 100644 --- a/child/src/mappings/child-erc721.ts +++ b/child/src/mappings/child-erc721.ts @@ -42,10 +42,11 @@ export function handleTransfer(event: Transfer): void { counter.current = updated counter.save() - const isWithdraw = event.params.to.toHex() == ZERO_ADDRESS || event.params.to == event.address ? true : false + const isWithdraw = event.params.to.toHex() == ZERO_ADDRESS ? true : false + const isMint = event.params.from.toHex() == ZERO_ADDRESS ? true : false - let transactionEntity = new TransactionEntity(event.transaction.hash.toHex() + '-' + event.logIndex.toString() + (isWithdraw ? '-withdraw' : '-transfer')) - transactionEntity.type = isWithdraw ? 'withdraw' : 'transfer' + let transactionEntity = new TransactionEntity(event.transaction.hash.toHex() + '-' + event.logIndex.toString() + (isWithdraw ? '-withdraw' : isMint ? '-mint' : '-transfer')) + transactionEntity.type = isWithdraw ? 'withdraw' : isMint ? 'mint' : 'transfer' transactionEntity.from = event.params.from transactionEntity.to = event.params.to transactionEntity.tokenId = event.params.tokenId diff --git a/child/subgraph.template.yaml b/child/subgraph.template.yaml index 1f7af85..fb74105 100644 --- a/child/subgraph.template.yaml +++ b/child/subgraph.template.yaml @@ -7,7 +7,7 @@ dataSources: network: {{network}} source: abi: ChildERC20 - startBlock: {{ contracts.maticToken.startBlock }} + startBlock: 25506515 mapping: kind: ethereum/events apiVersion: 0.0.6 @@ -31,7 +31,7 @@ dataSources: network: {{network}} source: abi: ChildERC721 - startBlock: {{ contracts.maticToken.startBlock }} + startBlock: 25506515 mapping: kind: ethereum/events apiVersion: 0.0.6 @@ -51,7 +51,7 @@ dataSources: network: {{network}} source: abi: ChildERC1155 - startBlock: {{ contracts.maticToken.startBlock }} + startBlock: 25506515 mapping: kind: ethereum/events apiVersion: 0.0.6 From 93a633751b03b24e96788982ea01bb9a3bf16fd1 Mon Sep 17 00:00:00 2001 From: vibhurajeev Date: Wed, 23 Mar 2022 11:13:30 +0530 Subject: [PATCH 8/8] fix: burn event name --- child/src/mappings/child-erc1155.ts | 8 ++++---- child/src/mappings/child-erc20.ts | 8 ++++---- child/src/mappings/child-erc721.ts | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/child/src/mappings/child-erc1155.ts b/child/src/mappings/child-erc1155.ts index 222ea31..9e07221 100644 --- a/child/src/mappings/child-erc1155.ts +++ b/child/src/mappings/child-erc1155.ts @@ -30,8 +30,8 @@ export function handleSingleTransfer(event: TransferSingle): void { const isWithdraw = event.params.to.toHex() == ZERO_ADDRESS ? true : false const isMint = event.params.from.toHex() == ZERO_ADDRESS ? true : false - let transactionEntity = new TransactionEntity(event.transaction.hash.toHex() + '-' + event.logIndex.toString() + (isWithdraw ? '-withdraw' : isMint ? '-mint' : '-transfer')) - transactionEntity.type = isWithdraw ? 'withdraw' : isMint ? 'mint' : 'transfer' + let transactionEntity = new TransactionEntity(event.transaction.hash.toHex() + '-' + event.logIndex.toString() + (isWithdraw ? '-burn' : isMint ? '-mint' : '-transfer')) + transactionEntity.type = isWithdraw ? 'burn' : isMint ? 'mint' : 'transfer' transactionEntity.from = event.params.from transactionEntity.to = event.params.to transactionEntity.amount = event.params.value @@ -58,9 +58,9 @@ export function handleBatchTransfer(event: TransferBatch): void { const isWithdraw = event.params.to.toHex() == ZERO_ADDRESS ? true : false const isMint = event.params.from.toHex() == ZERO_ADDRESS ? true : false - let transactionEntity = new TransactionEntity(event.transaction.hash.toHex() + '-' + event.logIndex.toString() + (isWithdraw ? '-withdraw' : isMint ? '-mint' : '-transfer')) + let transactionEntity = new TransactionEntity(event.transaction.hash.toHex() + '-' + event.logIndex.toString() + (isWithdraw ? '-burn' : isMint ? '-mint' : '-transfer')) - transactionEntity.type = isWithdraw ? 'withdraw' : isMint ? 'mint' : 'transfer' + transactionEntity.type = isWithdraw ? 'burn' : isMint ? 'mint' : 'transfer' transactionEntity.from = event.params.from transactionEntity.to = event.params.to transactionEntity.amounts = event.params.values diff --git a/child/src/mappings/child-erc20.ts b/child/src/mappings/child-erc20.ts index ada4f76..8f920a4 100644 --- a/child/src/mappings/child-erc20.ts +++ b/child/src/mappings/child-erc20.ts @@ -45,7 +45,7 @@ export function handleWithdraw(event: Withdraw): void { counter.save() // Transaction Entity part - let transactionEntity = new TransactionEntity(event.transaction.hash.toHex() + '-' + event.logIndex.toString() + '-withdraw') + let transactionEntity = new TransactionEntity(event.transaction.hash.toHex() + '-' + event.logIndex.toString() + '-burn') transactionEntity.from = event.params.from transactionEntity.to = Address.fromString(ZERO_ADDRESS) transactionEntity.amount = event.params.amount @@ -53,7 +53,7 @@ export function handleWithdraw(event: Withdraw): void { transactionEntity.timestamp = event.block.timestamp transactionEntity.transaction = event.transaction.hash transactionEntity.token = event.address - transactionEntity.type = 'withdraw' + transactionEntity.type = 'burn' transactionEntity.tokenType = 'ERC20' transactionEntity.isPos = false transactionEntity.save() @@ -72,8 +72,8 @@ export function handleTransfer(event: Transfer): void { const isWithdraw = event.params.to.toHex() == ZERO_ADDRESS ? true : false const isMint = event.params.from.toHex() == ZERO_ADDRESS ? true : false - let transactionEntity = new TransactionEntity(event.transaction.hash.toHex() + '-' + event.logIndex.toString() + (isWithdraw ? '-withdraw' : isMint ? '-mint' : '-transfer')) - transactionEntity.type = isWithdraw ? 'withdraw' : isMint ? 'mint' : 'transfer' + let transactionEntity = new TransactionEntity(event.transaction.hash.toHex() + '-' + event.logIndex.toString() + (isWithdraw ? '-burn' : isMint ? '-mint' : '-transfer')) + transactionEntity.type = isWithdraw ? 'burn' : isMint ? 'mint' : 'transfer' transactionEntity.from = event.params.from transactionEntity.to = event.params.to transactionEntity.amount = event.params.value diff --git a/child/src/mappings/child-erc721.ts b/child/src/mappings/child-erc721.ts index c74fbe3..2f84ada 100644 --- a/child/src/mappings/child-erc721.ts +++ b/child/src/mappings/child-erc721.ts @@ -45,8 +45,8 @@ export function handleTransfer(event: Transfer): void { const isWithdraw = event.params.to.toHex() == ZERO_ADDRESS ? true : false const isMint = event.params.from.toHex() == ZERO_ADDRESS ? true : false - let transactionEntity = new TransactionEntity(event.transaction.hash.toHex() + '-' + event.logIndex.toString() + (isWithdraw ? '-withdraw' : isMint ? '-mint' : '-transfer')) - transactionEntity.type = isWithdraw ? 'withdraw' : isMint ? 'mint' : 'transfer' + let transactionEntity = new TransactionEntity(event.transaction.hash.toHex() + '-' + event.logIndex.toString() + (isWithdraw ? '-burn' : isMint ? '-mint' : '-transfer')) + transactionEntity.type = isWithdraw ? 'burn' : isMint ? 'mint' : 'transfer' transactionEntity.from = event.params.from transactionEntity.to = event.params.to transactionEntity.tokenId = event.params.tokenId