diff --git a/.gitignore b/.gitignore index 04c01ba7..e62ff4c0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ node_modules/ -dist/ \ No newline at end of file +dist/ +out/ diff --git a/README.md b/README.md index 619cd1f4..da9e333f 100644 --- a/README.md +++ b/README.md @@ -20,25 +20,30 @@ This project uses [yarn workspaces](https://classic.yarnpkg.com/en/docs/workspaces/). -Install packages: +Install packages (Node.JS v15.11.0): ```bash yarn ``` -Run the GQL server: +Run the watcher: ```bash -cd packages/server +cd packages/watcher yarn run server ``` GQL console: http://localhost:3001/graphql -To run tests (GQL queries) against the server (currently mock data): +To run tests (GQL queries) against the mock server: + +``` +cd packages/watcher +yarn run server:mock +``` ```bash -cd packages/server +cd packages/watcher yarn test ``` @@ -46,21 +51,21 @@ yarn test ```text { - balanceOf(blockHash: "0x77b5479a5856dd8ec63df6aabf9ce0913071a6dda3a3d54f3c9c940574bcb8ab", token: "0xd87fea54f506972e3267239ec8e159548892074a", owner: "0xDC7d7A8920C8Eecc098da5B7522a5F31509b5Bfc") { + balanceOf(blockHash: "0x671e693ec3dccc948606db8d7e65ac3e16baea80a0dd6d56a126e07ccf85231f", token: "0x1ca7c995f8eF0A2989BbcE08D5B7Efe50A584aa1", owner: "0xDC7d7A8920C8Eecc098da5B7522a5F31509b5Bfc") { value proof { data } } - allowance(blockHash: "0x77b5479a5856dd8ec63df6aabf9ce0913071a6dda3a3d54f3c9c940574bcb8ab", token: "0xd87fea54f506972e3267239ec8e159548892074a", owner: "0xDC7d7A8920C8Eecc098da5B7522a5F31509b5Bfc", spender: "0xCA6D29232D1435D8198E3E5302495417dD073d61") { + allowance(blockHash: "0x671e693ec3dccc948606db8d7e65ac3e16baea80a0dd6d56a126e07ccf85231f", token: "0x1ca7c995f8eF0A2989BbcE08D5B7Efe50A584aa1", owner: "0xDC7d7A8920C8Eecc098da5B7522a5F31509b5Bfc", spender: "0xCA6D29232D1435D8198E3E5302495417dD073d61") { value proof { data } } - events(blockHash: "0x77b5479a5856dd8ec63df6aabf9ce0913071a6dda3a3d54f3c9c940574bcb8ab", token: "0xd87fea54f506972e3267239ec8e159548892074a") { + events(blockHash: "0x671e693ec3dccc948606db8d7e65ac3e16baea80a0dd6d56a126e07ccf85231f", token: "0x1ca7c995f8eF0A2989BbcE08D5B7Efe50A584aa1") { event { ... on TransferEvent { from diff --git a/packages/cache/index.ts b/packages/cache/index.ts new file mode 100644 index 00000000..9205650b --- /dev/null +++ b/packages/cache/index.ts @@ -0,0 +1 @@ +export * from './src/cache'; diff --git a/packages/cache/package.json b/packages/cache/package.json new file mode 100644 index 00000000..7ee1eff9 --- /dev/null +++ b/packages/cache/package.json @@ -0,0 +1,45 @@ +{ + "name": "@vulcanize/cache", + "version": "0.1.0", + "description": "Generic object cache", + "private": true, + "main": "index.ts", + "scripts": { + "test": "mocha -r ts-node/register src/**/*.spec.ts" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/vulcanize/erc20-watcher.git" + }, + "author": "", + "license": "UNLICENSED", + "bugs": { + "url": "https://github.com/vulcanize/erc20-watcher/issues" + }, + "homepage": "https://github.com/vulcanize/erc20-watcher#readme", + "dependencies": { + "@types/lodash": "^4.14.168", + "apollo-type-bigint": "^0.1.3", + "canonical-json": "^0.0.4", + "debug": "^4.3.1", + "ethers": "^5.2.0", + "express": "^4.17.1", + "express-graphql": "^0.12.0", + "fs-extra": "^10.0.0", + "graphql": "^15.5.0", + "graphql-import-node": "^0.0.4", + "graphql-request": "^3.4.0", + "graphql-tools": "^7.0.4", + "left-pad": "^1.3.0", + "level": "^7.0.0", + "lodash": "^4.17.21", + "toml": "^3.0.0", + "yargs": "^17.0.1" + }, + "devDependencies": { + "@types/express": "^4.17.11", + "@types/yargs": "^17.0.0", + "nodemon": "^2.0.7", + "ts-node": "^10.0.0" + } + } diff --git a/packages/cache/src/cache.ts b/packages/cache/src/cache.ts new file mode 100644 index 00000000..18136f19 --- /dev/null +++ b/packages/cache/src/cache.ts @@ -0,0 +1,81 @@ +import assert from 'assert'; +import canonicalStringify from 'canonical-json'; +import { ethers } from 'ethers'; +import level from 'level'; +import fs from 'fs-extra'; +import path from 'path'; +import debug from 'debug'; + +const log = debug('vulcanize:cache'); + +export const getCache = async (config) => { + let cache; + + // Cache is optional. + if (config) { + log("config", JSON.stringify(config, null, 2)); + + const { name, enabled, deleteOnStart } = config; + + assert(name); + + const cacheDirPath = path.join(process.cwd(), 'out', `${name}.db`); + await fs.ensureDir(cacheDirPath); + + // Delete cache on start. + if (deleteOnStart) { + await fs.emptyDir(cacheDirPath); + } + + // Enable/disable flag for the cache. + if (enabled) { + cache = new Cache(name, cacheDirPath); + } + } + + return cache; +}; + +export class Cache { + + _db: any; + _name: string; + + constructor(name, dirPath) { + assert(name); + assert(dirPath); + + this._name = name; + this._db = level(dirPath, { valueEncoding: 'json' });; + } + + key(obj) { + return this._cacheKey(obj); + } + + async get(obj) { + const key = this._cacheKey(obj); + + try { + const value = await this._db.get(key); + + log(`${this._name}: cache hit ${key}`); + + return [value, true]; + } catch (err) { + log(`${this._name}: cache miss ${key}`); + + if (err.notFound) { + return [undefined, false] + } + } + } + + async put(obj, value) { + await this._db.put(this._cacheKey(obj), value); + } + + _cacheKey(obj) { + return ethers.utils.keccak256(Buffer.from(canonicalStringify(obj))); + } +} diff --git a/packages/dashboard/.gitkeep b/packages/dashboard/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/packages/ipld-eth-client/index.ts b/packages/ipld-eth-client/index.ts new file mode 100644 index 00000000..f307f7ac --- /dev/null +++ b/packages/ipld-eth-client/index.ts @@ -0,0 +1,2 @@ +export * from './src/eth-client'; +export * from './src/utils'; diff --git a/packages/ipld-eth-client/package.json b/packages/ipld-eth-client/package.json new file mode 100644 index 00000000..b80688cd --- /dev/null +++ b/packages/ipld-eth-client/package.json @@ -0,0 +1,46 @@ +{ + "name": "@vulcanize/ipld-eth-client", + "version": "0.1.0", + "description": "IPLD ETH Client", + "private": true, + "main": "index.ts", + "scripts": { + "test": "mocha -r ts-node/register src/**/*.spec.ts" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/vulcanize/erc20-watcher.git" + }, + "author": "", + "license": "UNLICENSED", + "bugs": { + "url": "https://github.com/vulcanize/erc20-watcher/issues" + }, + "homepage": "https://github.com/vulcanize/erc20-watcher#readme", + "dependencies": { + "@types/lodash": "^4.14.168", + "@vulcanize/cache": "^0.1.0", + "apollo-type-bigint": "^0.1.3", + "canonical-json": "^0.0.4", + "debug": "^4.3.1", + "ethers": "^5.2.0", + "express": "^4.17.1", + "express-graphql": "^0.12.0", + "fs-extra": "^10.0.0", + "graphql": "^15.5.0", + "graphql-import-node": "^0.0.4", + "graphql-request": "^3.4.0", + "graphql-tools": "^7.0.4", + "left-pad": "^1.3.0", + "level": "^7.0.0", + "lodash": "^4.17.21", + "toml": "^3.0.0", + "yargs": "^17.0.1" + }, + "devDependencies": { + "@types/express": "^4.17.11", + "@types/yargs": "^17.0.0", + "nodemon": "^2.0.7", + "ts-node": "^10.0.0" + } + } diff --git a/packages/ipld-eth-client/src/eth-client.ts b/packages/ipld-eth-client/src/eth-client.ts new file mode 100644 index 00000000..6647b0d1 --- /dev/null +++ b/packages/ipld-eth-client/src/eth-client.ts @@ -0,0 +1,56 @@ +import assert from 'assert'; +import { GraphQLClient } from 'graphql-request'; + +import { Cache } from '@vulcanize/cache'; + +import ethQueries from './eth-queries'; + +export class EthClient { + + _config: any; + _client: any; + _cache: Cache; + + constructor(config) { + this._config = config; + + const { gqlEndpoint, cache } = config; + assert(gqlEndpoint, 'Missing gql endpoint'); + + this._client = new GraphQLClient(gqlEndpoint); + this._cache = cache; + } + + async getStorageAt(vars) { + return this._getCachedOrFetch('getStorageAt', vars); + } + + async getLogs(vars) { + return this._getCachedOrFetch('getLogs', vars); + } + + async _getCachedOrFetch(queryName, vars) { + const keyObj = { + queryName, + vars + }; + + // Check if request cached in db, if cache is enabled. + if (this._cache) { + const [value, found] = await this._cache.get(keyObj); + if (found) { + return value; + } + } + + // Not cached or cache disabled, need to perform an upstream GQL query. + const result = await this._client.request(ethQueries[queryName], vars); + + // Cache the result and return it, if cache is enabled. + if (this._cache) { + await this._cache.put(keyObj, result); + } + + return result; + } +} diff --git a/packages/ipld-eth-client/src/eth-queries.ts b/packages/ipld-eth-client/src/eth-queries.ts new file mode 100644 index 00000000..3f6f7a1c --- /dev/null +++ b/packages/ipld-eth-client/src/eth-queries.ts @@ -0,0 +1,30 @@ +import { gql } from 'graphql-request'; + +export const getStorageAt = gql` +query getStorageAt($blockHash: Bytes32!, $contract: Address!, $slot: Bytes32!) { + getStorageAt(blockHash: $blockHash, contract: $contract, slot: $slot) { + value + cid + ipldBlock + } +} +`; + +export const getLogs = gql` +query getLogs($blockHash: Bytes32!, $contract: Address!) { + getLogs(blockHash: $blockHash, contract: $contract) { + account { + address + } + topics + data + cid + ipldBlock + } +} +`; + +export default { + getStorageAt, + getLogs +}; diff --git a/packages/ipld-eth-client/src/utils.ts b/packages/ipld-eth-client/src/utils.ts new file mode 100644 index 00000000..4484c04a --- /dev/null +++ b/packages/ipld-eth-client/src/utils.ts @@ -0,0 +1,24 @@ +import leftPad from 'left-pad'; +import { ethers } from 'ethers'; + +export const padKey = input => + leftPad(ethers.utils.hexlify(input).replace('0x', ''), 64, '0'); + +export const getMappingSlot = (mappingSlot, key) => { + const mappingSlotPadded = padKey(mappingSlot); + const keyPadded = padKey(key); + const fullKey = keyPadded.concat(mappingSlotPadded); + const slot = ethers.utils.keccak256(`0x${fullKey}`); + + return slot +}; + +export const getStorageLeafKey = (slot) => ethers.utils.keccak256(slot); + +export const topictoAddress = (topic) => { + return ethers.utils.getAddress( + ethers.utils.hexZeroPad( + ethers.utils.hexStripZeros(topic), 20 + ) + ); +}; diff --git a/packages/server/src/gql.ts b/packages/server/src/gql.ts deleted file mode 100644 index 02c03e94..00000000 --- a/packages/server/src/gql.ts +++ /dev/null @@ -1,13 +0,0 @@ -import 'graphql-import-node'; -import { makeExecutableSchema } from '@graphql-tools/schema'; - -import * as typeDefs from './erc20.graphql'; -import mockResolvers from './mock/resolvers'; - -// TODO: Create resolvers backed by erc20 watcher. -const resolvers = process.env.MOCK ? mockResolvers : {}; - -export const schema = makeExecutableSchema({ - typeDefs, - resolvers -}); diff --git a/packages/server/src/mock/resolvers.ts b/packages/server/src/mock/resolvers.ts deleted file mode 100644 index 8c130849..00000000 --- a/packages/server/src/mock/resolvers.ts +++ /dev/null @@ -1,47 +0,0 @@ -import BigInt from 'apollo-type-bigint'; - -import { blocks } from './data'; - -const resolvers = { - BigInt: new BigInt('bigInt'), - - TokenEvent: { - __resolveType: (obj) => { - if (obj.owner) { - return 'ApprovalEvent'; - } - - return 'TransferEvent'; - } - }, - - Query: { - - balanceOf: (_, { blockHash, token, owner }) => { - console.log('balanceOf', blockHash, token, owner); - - return { - value: blocks[blockHash][token].balanceOf[owner], - proof: { data: '' } - } - }, - - allowance: (_, { blockHash, token, owner, spender }) => { - console.log('allowance', blockHash, token, owner, spender); - - return { - value: blocks[blockHash][token].allowance[owner][spender], - proof: { data: '' } - } - }, - - events: (_, { blockHash, token, name }) => { - console.log('events', blockHash, token, name); - return blocks[blockHash][token].events - .filter(e => !name || name === e.name) - .map(e => ({ 'event': e })); - } - } -}; - -export default resolvers; diff --git a/packages/server/src/server.ts b/packages/server/src/server.ts deleted file mode 100644 index 5e73024a..00000000 --- a/packages/server/src/server.ts +++ /dev/null @@ -1,25 +0,0 @@ -import express, { Application, Request, Response } from 'express'; -import { graphqlHTTP } from 'express-graphql'; - -import { schema } from './gql'; - -const app: Application = express(); - -// TODO: Accept CLI param for host and port. -const port: number = 3001; - -app.use( - '/graphql', - graphqlHTTP({ - schema, - graphiql: true, - }), -); - -app.get('/', (req: Request, res: Response) => { - res.send('ERC20 Watcher'); -}); - -app.listen(port, () => { - console.log(`Server is listening on port ${port}`); -}); diff --git a/packages/watcher/.gitkeep b/packages/watcher/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/packages/watcher/environments/local.toml b/packages/watcher/environments/local.toml new file mode 100644 index 00000000..21c90626 --- /dev/null +++ b/packages/watcher/environments/local.toml @@ -0,0 +1,12 @@ +[server] + host = "127.0.0.1" + port = 3001 + + +[upstream] + gqlEndpoint = "http://127.0.0.1:8083/graphql" + + [upstream.cache] + name = "requests" + enabled = true + deleteOnStart = false diff --git a/packages/server/package.json b/packages/watcher/package.json similarity index 57% rename from packages/server/package.json rename to packages/watcher/package.json index 25f8a938..4017b10b 100644 --- a/packages/server/package.json +++ b/packages/watcher/package.json @@ -1,10 +1,11 @@ { - "name": "erc20-watcher", + "name": "@vulcanize/erc20-watcher", "version": "0.1.0", "description": "ERC20 Watcher", "private": true, "scripts": { - "server": "MOCK=1 nodemon src/server.ts", + "server": "DEBUG=vulcanize:* nodemon src/server.ts -f environments/local.toml", + "server:mock": "MOCK=1 nodemon src/server.ts -f environments/local.toml", "test": "mocha -r ts-node/register src/**/*.spec.ts" }, "repository": { @@ -19,17 +20,29 @@ "homepage": "https://github.com/vulcanize/erc20-watcher#readme", "dependencies": { "@types/lodash": "^4.14.168", + "@vulcanize/cache": "^0.1.0", + "@vulcanize/ipld-eth-client": "^0.1.0", "apollo-type-bigint": "^0.1.3", + "canonical-json": "^0.0.4", + "debug": "^4.3.1", + "ethers": "^5.2.0", "express": "^4.17.1", "express-graphql": "^0.12.0", + "fs-extra": "^10.0.0", "graphql": "^15.5.0", "graphql-import-node": "^0.0.4", "graphql-request": "^3.4.0", "graphql-tools": "^7.0.4", - "lodash": "^4.17.21" + "left-pad": "^1.3.0", + "level": "^7.0.0", + "lodash": "^4.17.21", + "toml": "^3.0.0", + "yargs": "^17.0.1" }, "devDependencies": { "@types/express": "^4.17.11", - "nodemon": "^2.0.7" + "@types/yargs": "^17.0.0", + "nodemon": "^2.0.7", + "ts-node": "^10.0.0" } } diff --git a/packages/server/src/erc20.graphql b/packages/watcher/src/erc20.graphql similarity index 100% rename from packages/server/src/erc20.graphql rename to packages/watcher/src/erc20.graphql diff --git a/packages/watcher/src/gql.ts b/packages/watcher/src/gql.ts new file mode 100644 index 00000000..3bfca158 --- /dev/null +++ b/packages/watcher/src/gql.ts @@ -0,0 +1,15 @@ +import 'graphql-import-node'; +import { makeExecutableSchema } from '@graphql-tools/schema'; + +import * as typeDefs from './erc20.graphql'; +import { createResolvers as createMockResolvers } from './mock/resolvers'; +import { createResolvers } from './resolvers'; + +export const createSchema = async (config) => { + const resolvers = process.env.MOCK ? await createMockResolvers(config) : await createResolvers(config); + + return makeExecutableSchema({ + typeDefs, + resolvers + }); +}; diff --git a/packages/server/src/mock/data.ts b/packages/watcher/src/mock/data.ts similarity index 100% rename from packages/server/src/mock/data.ts rename to packages/watcher/src/mock/data.ts diff --git a/packages/watcher/src/mock/resolvers.ts b/packages/watcher/src/mock/resolvers.ts new file mode 100644 index 00000000..ef80e635 --- /dev/null +++ b/packages/watcher/src/mock/resolvers.ts @@ -0,0 +1,51 @@ +import debug from 'debug'; +import BigInt from 'apollo-type-bigint'; + +import { blocks } from './data'; + +const log = debug('test'); + +export const createResolvers = async (config) => { + + return { + BigInt: new BigInt('bigInt'), + + TokenEvent: { + __resolveType: (obj) => { + if (obj.owner) { + return 'ApprovalEvent'; + } + + return 'TransferEvent'; + } + }, + + Query: { + + balanceOf: (_, { blockHash, token, owner }) => { + log('balanceOf', blockHash, token, owner); + + return { + value: blocks[blockHash][token].balanceOf[owner], + proof: { data: '' } + } + }, + + allowance: (_, { blockHash, token, owner, spender }) => { + log('allowance', blockHash, token, owner, spender); + + return { + value: blocks[blockHash][token].allowance[owner][spender], + proof: { data: '' } + } + }, + + events: (_, { blockHash, token, name }) => { + log('events', blockHash, token, name); + return blocks[blockHash][token].events + .filter(e => !name || name === e.name) + .map(e => ({ 'event': e })); + } + } + }; +}; diff --git a/packages/server/src/mock/server.spec.ts b/packages/watcher/src/mock/server.spec.ts similarity index 98% rename from packages/server/src/mock/server.spec.ts rename to packages/watcher/src/mock/server.spec.ts index deae6147..a3c6dff9 100644 --- a/packages/server/src/mock/server.spec.ts +++ b/packages/watcher/src/mock/server.spec.ts @@ -57,8 +57,6 @@ blockHashes.forEach(blockHash => { }); }); -// console.log(JSON.stringify(testCases, null, 2)); - describe('server', () => { const client = new GraphQLClient("http://localhost:3001/graphql"); diff --git a/packages/server/src/queries.ts b/packages/watcher/src/queries.ts similarity index 100% rename from packages/server/src/queries.ts rename to packages/watcher/src/queries.ts diff --git a/packages/watcher/src/resolvers.ts b/packages/watcher/src/resolvers.ts new file mode 100644 index 00000000..192889cd --- /dev/null +++ b/packages/watcher/src/resolvers.ts @@ -0,0 +1,179 @@ +import assert from 'assert'; +import BigInt from 'apollo-type-bigint'; +import debug from 'debug'; + +import { getCache } from '@vulcanize/cache'; +import { EthClient, getMappingSlot, topictoAddress } from '@vulcanize/ipld-eth-client'; + +// Event slots. +// TODO: Read from storage layout file. +const ERC20_BALANCE_OF_SLOT = "0x00"; +const ERC20_ALLOWANCE_SLOT = "0x01"; + +// Event signatures. +// TODO: Generate from ABI. +const ERC20_EVENT_NAME_TOPICS = { + "Transfer": "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "Approval": "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925" +}; + +// Topic to GQL event name. +// TODO: Generate from ABI. +const GQL_EVENT_TYPE = { + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef": "TransferEvent", + "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925": "ApprovalEvent" +}; + +const log = debug('vulcanize:resolver'); + +export const createResolvers = async (config) => { + + const { upstream } = config; + assert(upstream, 'Missing upstream config'); + + const { gqlEndpoint, cache: cacheConfig } = upstream; + assert(upstream, 'Missing upstream gqlEndpoint'); + + const cache = await getCache(cacheConfig); + const ethClient = new EthClient({ gqlEndpoint, cache }); + + return { + BigInt: new BigInt('bigInt'), + + TokenEvent: { + __resolveType: (obj) => { + if (obj.owner) { + return 'ApprovalEvent'; + } + + return 'TransferEvent'; + } + }, + + Query: { + + balanceOf: async (_, { blockHash, token, owner }) => { + log('balanceOf', blockHash, token, owner); + + const slot = getMappingSlot(ERC20_BALANCE_OF_SLOT, owner); + + const vars = { + blockHash, + contract: token, + slot + }; + + const result = await ethClient.getStorageAt(vars); + log(JSON.stringify(result, null, 2)); + + const { getStorageAt: { value, cid, ipldBlock }} = result; + + return { + value, + proof: { + // TODO: Return proof only if requested. + data: JSON.stringify({ + blockHash, + account: { + address: token, + storage: { + cid, + ipldBlock + } + } + }) + } + } + }, + + allowance: async (_, { blockHash, token, owner, spender }) => { + log('allowance', blockHash, token, owner, spender); + + const slot = getMappingSlot(getMappingSlot(ERC20_ALLOWANCE_SLOT, owner), spender); + + const vars = { + blockHash, + contract: token, + slot + }; + + const result = await ethClient.getStorageAt(vars); + log(JSON.stringify(result, null, 2)); + + const { getStorageAt: { value, cid, ipldBlock }} = result; + + return { + value, + proof: { + // TODO: Return proof only if requested. + data: JSON.stringify({ + blockHash, + account: { + address: token, + storage: { + cid, + ipldBlock + } + } + }) + } + } + }, + + events: async (_, { blockHash, token, name }) => { + log('events', blockHash, token, name); + + const vars = { + blockHash, + contract: token + }; + + const result = await ethClient.getLogs(vars); + log(JSON.stringify(result, null, 2)); + + return result.getLogs + .filter(e => !name || ERC20_EVENT_NAME_TOPICS[name] === e.topics[0]) + .map(e => { + const [topic0, topic1, topic2] = e.topics; + + const eventName = GQL_EVENT_TYPE[topic0]; + const address1 = topictoAddress(topic1); + const address2 = topictoAddress(topic2); + + const eventFields = { value : e.data }; + + + switch (eventName) { + case 'TransferEvent': { + eventFields['from'] = address1; + eventFields['to'] = address2; + break; + }; + case 'ApprovalEvent': { + eventFields['owner'] = address1; + eventFields['spender'] = address2; + break; + }; + } + + return { + event: { + __typename: eventName, + ...eventFields + }, + proof: { + // TODO: Return proof only if requested. + data: JSON.stringify({ + blockHash, + receipt: { + cid: e.cid, + ipldBlock: e.ipldBlock + } + }) + } + } + }); + } + } + }; +}; diff --git a/packages/watcher/src/server.ts b/packages/watcher/src/server.ts new file mode 100644 index 00000000..f6bde7fc --- /dev/null +++ b/packages/watcher/src/server.ts @@ -0,0 +1,66 @@ +import assert from 'assert'; +import express, { Application, Request, Response } from 'express'; +import { graphqlHTTP } from 'express-graphql'; +import fs from 'fs-extra'; +import path from 'path'; +import toml from 'toml'; +import yargs from 'yargs'; +import { hideBin } from 'yargs/helpers' +import debug from 'debug'; + +import { createSchema } from './gql'; + +const log = debug('vulcanize:server'); + +export const createServer = async () => { + const argv = yargs(hideBin(process.argv)) + .option('f', { + alias: 'config-file', + demandOption: true, + describe: 'configuration file path (toml)', + type: 'string' + }) + .argv + + const configFile = argv['configFile']; + const configFilePath = path.resolve(configFile); + const fileExists = await fs.exists(configFilePath); + if (!fileExists) { + throw new Error(`Config file not found: ${configFilePath}`); + } + + var config = toml.parse(await fs.readFile(configFilePath)); + log("config", JSON.stringify(config, null, 2)); + + assert(config.server, 'Missing server config'); + + const { host, port } = config.server; + + const app: Application = express(); + + const schema = await createSchema(config); + + app.use( + '/graphql', + graphqlHTTP({ + schema, + graphiql: true, + }), + ); + + app.get('/', (req: Request, res: Response) => { + res.send('ERC20 Watcher'); + }); + + app.listen(port, host, () => { + log(`Server is listening on host ${host} port ${port}`); + }); + + return app; +}; + +createServer().then(() => { + log('Starting server...'); +}).catch(err => { + log(err); +}); diff --git a/yarn.lock b/yarn.lock index c13c83a4..9b374c89 100644 --- a/yarn.lock +++ b/yarn.lock @@ -490,6 +490,344 @@ "@babel/helper-validator-identifier" "^7.14.0" to-fast-properties "^2.0.0" +"@ethersproject/abi@5.2.0", "@ethersproject/abi@^5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.2.0.tgz#e2ca0b7f7e3b83e4d427ed8b38fdc1c48e2bb00f" + integrity sha512-24ExfHa0VbIOUHbB36b6lCVmWkaIVmrd9/m8MICtmSsRKzlugWqUD0B8g0zrRylXNxAOc3V6T4xKJ8jEDSvp3w== + dependencies: + "@ethersproject/address" "^5.2.0" + "@ethersproject/bignumber" "^5.2.0" + "@ethersproject/bytes" "^5.2.0" + "@ethersproject/constants" "^5.2.0" + "@ethersproject/hash" "^5.2.0" + "@ethersproject/keccak256" "^5.2.0" + "@ethersproject/logger" "^5.2.0" + "@ethersproject/properties" "^5.2.0" + "@ethersproject/strings" "^5.2.0" + +"@ethersproject/abstract-provider@5.2.0", "@ethersproject/abstract-provider@^5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@ethersproject/abstract-provider/-/abstract-provider-5.2.0.tgz#b5c24b162f119b5d241738ded9555186013aa77d" + integrity sha512-Xi7Pt+CulRijc/vskBGIaYMEhafKjoNx8y4RNj/dnSpXHXScOJUSTtypqGBUngZddRbcwZGbHwEr6DZoKZwIZA== + dependencies: + "@ethersproject/bignumber" "^5.2.0" + "@ethersproject/bytes" "^5.2.0" + "@ethersproject/logger" "^5.2.0" + "@ethersproject/networks" "^5.2.0" + "@ethersproject/properties" "^5.2.0" + "@ethersproject/transactions" "^5.2.0" + "@ethersproject/web" "^5.2.0" + +"@ethersproject/abstract-signer@5.2.0", "@ethersproject/abstract-signer@^5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@ethersproject/abstract-signer/-/abstract-signer-5.2.0.tgz#8e291fb6558b4190fb3e2fe440a9ffd092a2f459" + integrity sha512-JTXzLUrtoxpOEq1ecH86U7tstkEa9POKAGbGBb+gicbjGgzYYkLR4/LD83SX2/JNWvtYyY8t5errt5ehiy1gxQ== + dependencies: + "@ethersproject/abstract-provider" "^5.2.0" + "@ethersproject/bignumber" "^5.2.0" + "@ethersproject/bytes" "^5.2.0" + "@ethersproject/logger" "^5.2.0" + "@ethersproject/properties" "^5.2.0" + +"@ethersproject/address@5.2.0", "@ethersproject/address@^5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@ethersproject/address/-/address-5.2.0.tgz#afcfa92db84582f54a60a9da361cea4aae450a69" + integrity sha512-2YfZlalWefOEfnr/CdqKRrgMgbKidYc+zG4/ilxSdcryZSux3eBU5/5btAT/hSiaHipUjd8UrWK8esCBHU6QNQ== + dependencies: + "@ethersproject/bignumber" "^5.2.0" + "@ethersproject/bytes" "^5.2.0" + "@ethersproject/keccak256" "^5.2.0" + "@ethersproject/logger" "^5.2.0" + "@ethersproject/rlp" "^5.2.0" + +"@ethersproject/base64@5.2.0", "@ethersproject/base64@^5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@ethersproject/base64/-/base64-5.2.0.tgz#e01066d25e5b4e8a051545163bee5def47bd9534" + integrity sha512-D9wOvRE90QBI+yFsKMv0hnANiMzf40Xicq9JZbV9XYzh7srImmwmMcReU2wHjOs9FtEgSJo51Tt+sI1dKPYKDg== + dependencies: + "@ethersproject/bytes" "^5.2.0" + +"@ethersproject/basex@5.2.0", "@ethersproject/basex@^5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@ethersproject/basex/-/basex-5.2.0.tgz#f921039e3bdfdab8c5a7ba8b21e81c83fc1ab98b" + integrity sha512-Oo7oX7BmaHLY/8ZsOLI5W0mrSwPBb1iboosN17jfK/4vGAtKjAInDai9I72CzN4NRJaMN5FkFLoPYywGqgGHlg== + dependencies: + "@ethersproject/bytes" "^5.2.0" + "@ethersproject/properties" "^5.2.0" + +"@ethersproject/bignumber@5.2.0", "@ethersproject/bignumber@^5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@ethersproject/bignumber/-/bignumber-5.2.0.tgz#03f91ea740c5adb6f8c6a2e91bb4ee5ffaff5503" + integrity sha512-+MNQTxwV7GEiA4NH/i51UqQ+lY36O0rxPdV+0qzjFSySiyBlJpLk6aaa4UTvKmYWlI7YKZm6vuyCENeYn7qAOw== + dependencies: + "@ethersproject/bytes" "^5.2.0" + "@ethersproject/logger" "^5.2.0" + bn.js "^4.4.0" + +"@ethersproject/bytes@5.2.0", "@ethersproject/bytes@^5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@ethersproject/bytes/-/bytes-5.2.0.tgz#327917d5a1600f92fd2a9da4052fa6d974583132" + integrity sha512-O1CRpvJDnRTB47vvW8vyqojUZxVookb4LJv/s06TotriU3Xje5WFvlvXJu1yTchtxTz9BbvJw0lFXKpyO6Dn7w== + dependencies: + "@ethersproject/logger" "^5.2.0" + +"@ethersproject/constants@5.2.0", "@ethersproject/constants@^5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@ethersproject/constants/-/constants-5.2.0.tgz#ccea78ce325f78abfe7358397c03eec570518d92" + integrity sha512-p+34YG0KbHS20NGdE+Ic0M6egzd7cDvcfoO9RpaAgyAYm3V5gJVqL7UynS87yCt6O6Nlx6wRFboPiM5ctAr+jA== + dependencies: + "@ethersproject/bignumber" "^5.2.0" + +"@ethersproject/contracts@5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@ethersproject/contracts/-/contracts-5.2.0.tgz#f54e12ec4a323f2bf93c338034839cc6dfc1e347" + integrity sha512-/2fg5tWPG6Z4pciEWpwGji3ggGA5j0ChVNF7NTmkOhvFrrJuWnRpzbvYA00nz8tBDNCOV3cwub5zfWRpgwYEJQ== + dependencies: + "@ethersproject/abi" "^5.2.0" + "@ethersproject/abstract-provider" "^5.2.0" + "@ethersproject/abstract-signer" "^5.2.0" + "@ethersproject/address" "^5.2.0" + "@ethersproject/bignumber" "^5.2.0" + "@ethersproject/bytes" "^5.2.0" + "@ethersproject/constants" "^5.2.0" + "@ethersproject/logger" "^5.2.0" + "@ethersproject/properties" "^5.2.0" + "@ethersproject/transactions" "^5.2.0" + +"@ethersproject/hash@5.2.0", "@ethersproject/hash@^5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@ethersproject/hash/-/hash-5.2.0.tgz#2d21901eafc5bdb738b4ad96bee364d371ec724b" + integrity sha512-wEGry2HFFSssFiNEkFWMzj1vpdFv4rQlkBp41UfL6J58zKGNycoAWimokITDMk8p7548MKr27h48QfERnNKkRw== + dependencies: + "@ethersproject/abstract-signer" "^5.2.0" + "@ethersproject/address" "^5.2.0" + "@ethersproject/bignumber" "^5.2.0" + "@ethersproject/bytes" "^5.2.0" + "@ethersproject/keccak256" "^5.2.0" + "@ethersproject/logger" "^5.2.0" + "@ethersproject/properties" "^5.2.0" + "@ethersproject/strings" "^5.2.0" + +"@ethersproject/hdnode@5.2.0", "@ethersproject/hdnode@^5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@ethersproject/hdnode/-/hdnode-5.2.0.tgz#efea9b2f713e55aa5ba23cc62b4aac6d08dcfa53" + integrity sha512-ffq2JrW5AftCmfWZ8DxpdWdw/x06Yn+e9wrWHLpj8If1+w87W4LbTMRUaUmO1DUSN8H8g/6kMUKCTJPVuxsuOw== + dependencies: + "@ethersproject/abstract-signer" "^5.2.0" + "@ethersproject/basex" "^5.2.0" + "@ethersproject/bignumber" "^5.2.0" + "@ethersproject/bytes" "^5.2.0" + "@ethersproject/logger" "^5.2.0" + "@ethersproject/pbkdf2" "^5.2.0" + "@ethersproject/properties" "^5.2.0" + "@ethersproject/sha2" "^5.2.0" + "@ethersproject/signing-key" "^5.2.0" + "@ethersproject/strings" "^5.2.0" + "@ethersproject/transactions" "^5.2.0" + "@ethersproject/wordlists" "^5.2.0" + +"@ethersproject/json-wallets@5.2.0", "@ethersproject/json-wallets@^5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@ethersproject/json-wallets/-/json-wallets-5.2.0.tgz#d41c7c39e4d236b586e26e2145b09ac49dc56608" + integrity sha512-iWxSm9XiugEtaehYD6w1ImmXeatjcGcrQvffZVJHH1UqV4FckDzrOYnZBRHPQRYlnhNVrGTld1+S0Cu4MB8gdw== + dependencies: + "@ethersproject/abstract-signer" "^5.2.0" + "@ethersproject/address" "^5.2.0" + "@ethersproject/bytes" "^5.2.0" + "@ethersproject/hdnode" "^5.2.0" + "@ethersproject/keccak256" "^5.2.0" + "@ethersproject/logger" "^5.2.0" + "@ethersproject/pbkdf2" "^5.2.0" + "@ethersproject/properties" "^5.2.0" + "@ethersproject/random" "^5.2.0" + "@ethersproject/strings" "^5.2.0" + "@ethersproject/transactions" "^5.2.0" + aes-js "3.0.0" + scrypt-js "3.0.1" + +"@ethersproject/keccak256@5.2.0", "@ethersproject/keccak256@^5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@ethersproject/keccak256/-/keccak256-5.2.0.tgz#15257862807c23f24a3209d1016d322dca85a464" + integrity sha512-LqyxTwVANga5Y3L1yo184czW6b3PibabN8xyE/eOulQLLfXNrHHhwrOTpOhoVRWCICVCD/5SjQfwqTrczjS7jQ== + dependencies: + "@ethersproject/bytes" "^5.2.0" + js-sha3 "0.5.7" + +"@ethersproject/logger@5.2.0", "@ethersproject/logger@^5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.2.0.tgz#accf5348251f78b6c8891af67f42490a4ea4e5ae" + integrity sha512-dPZ6/E3YiArgG8dI/spGkaRDry7YZpCntf4gm/c6SI8Mbqiihd7q3nuLN5VvDap/0K3xm3RE1AIUOcUwwh2ezQ== + +"@ethersproject/networks@5.2.0", "@ethersproject/networks@^5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@ethersproject/networks/-/networks-5.2.0.tgz#66c23c6ac477dd703645b2c971ac842d8b8aa524" + integrity sha512-q+htMgq7wQoEnjlkdHM6t1sktKxNbEB/F6DQBPNwru7KpQ1R0n0UTIXJB8Rb7lSnvjqcAQ40X3iVqm94NJfYDw== + dependencies: + "@ethersproject/logger" "^5.2.0" + +"@ethersproject/pbkdf2@5.2.0", "@ethersproject/pbkdf2@^5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@ethersproject/pbkdf2/-/pbkdf2-5.2.0.tgz#8166a7a7238a5fd1d9bb6eb2000fea0f19fdde06" + integrity sha512-qKOoO6yir/qnAgg6OP3U4gRuZ6jl9P7xwggRu/spVfnuaR+wa490AatWLqB1WOXKf6JFjm5yOaT/T5fCICQVdQ== + dependencies: + "@ethersproject/bytes" "^5.2.0" + "@ethersproject/sha2" "^5.2.0" + +"@ethersproject/properties@5.2.0", "@ethersproject/properties@^5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@ethersproject/properties/-/properties-5.2.0.tgz#8fadf367f7ac7357019d0224aa579b234c545ac1" + integrity sha512-oNFkzcoGwXXV+/Yp/MLcDLrL/2i360XIy2YN9yRZJPnIbLwjroFNLiRzLs6PyPw1D09Xs8OcPR1/nHv6xDKE2A== + dependencies: + "@ethersproject/logger" "^5.2.0" + +"@ethersproject/providers@5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@ethersproject/providers/-/providers-5.2.0.tgz#b2f3e3b2ca4567c8372543ceb6f3c6e3a2370783" + integrity sha512-Yf/ZUqCrVr+jR0SHA9GuNZs4R1xnV9Ibnh1TlOa0ZzI6o+Qf8bEyE550k9bYI4zk2f9x9baX2RRs6BJY7Jz/WA== + dependencies: + "@ethersproject/abstract-provider" "^5.2.0" + "@ethersproject/abstract-signer" "^5.2.0" + "@ethersproject/address" "^5.2.0" + "@ethersproject/basex" "^5.2.0" + "@ethersproject/bignumber" "^5.2.0" + "@ethersproject/bytes" "^5.2.0" + "@ethersproject/constants" "^5.2.0" + "@ethersproject/hash" "^5.2.0" + "@ethersproject/logger" "^5.2.0" + "@ethersproject/networks" "^5.2.0" + "@ethersproject/properties" "^5.2.0" + "@ethersproject/random" "^5.2.0" + "@ethersproject/rlp" "^5.2.0" + "@ethersproject/sha2" "^5.2.0" + "@ethersproject/strings" "^5.2.0" + "@ethersproject/transactions" "^5.2.0" + "@ethersproject/web" "^5.2.0" + bech32 "1.1.4" + ws "7.2.3" + +"@ethersproject/random@5.2.0", "@ethersproject/random@^5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@ethersproject/random/-/random-5.2.0.tgz#1d7e19f17d88eda56228a263063826829e49eebe" + integrity sha512-7Nd3qjivBGlDCGDuGYjPi8CXdtVhRZ7NeyBXoJgtnJBwn1S01ahrbMeOUVmRVWrFM0YiSEPEGo7i4xEu2gRPcg== + dependencies: + "@ethersproject/bytes" "^5.2.0" + "@ethersproject/logger" "^5.2.0" + +"@ethersproject/rlp@5.2.0", "@ethersproject/rlp@^5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@ethersproject/rlp/-/rlp-5.2.0.tgz#bbf605183818a9d96bdc40323d734c79e26cfaca" + integrity sha512-RqGsELtPWxcFhOOhSr0lQ2hBNT9tBE08WK0tb6VQbCk97EpqkbgP8yXED9PZlWMiRGchJTw6S+ExzK62XMX/fw== + dependencies: + "@ethersproject/bytes" "^5.2.0" + "@ethersproject/logger" "^5.2.0" + +"@ethersproject/sha2@5.2.0", "@ethersproject/sha2@^5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@ethersproject/sha2/-/sha2-5.2.0.tgz#ae18fa6c09c6d99fa2b564dac7276bcd513c1579" + integrity sha512-Wqqptfn0PRO2mvmpktPW1HOLrrCyGtxhVQxO1ZyePoGrcEOurhICOlIvkTogoX4Q928D3Z9XtSSCUbdOJUF2kg== + dependencies: + "@ethersproject/bytes" "^5.2.0" + "@ethersproject/logger" "^5.2.0" + hash.js "1.1.3" + +"@ethersproject/signing-key@5.2.0", "@ethersproject/signing-key@^5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@ethersproject/signing-key/-/signing-key-5.2.0.tgz#e8eb10d3c0f4a575479db8d70c62aaf93cd384d1" + integrity sha512-9A+dVSkrVAPuhJnWqLWV/NkKi/KB4iagTKEuojfuApUfeIHEhpwQ0Jx3cBimk7qWISSSKdgiAmIqpvVtZ5FEkg== + dependencies: + "@ethersproject/bytes" "^5.2.0" + "@ethersproject/logger" "^5.2.0" + "@ethersproject/properties" "^5.2.0" + bn.js "^4.4.0" + elliptic "6.5.4" + +"@ethersproject/solidity@5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@ethersproject/solidity/-/solidity-5.2.0.tgz#ac902d8f8b11bf58fd37ccf77392178cbbd0b08f" + integrity sha512-EEFlNyEnONW3CWF8UGWPcqxJUHiaIoofO7itGwO/2gvGpnwlL+WUV+GmQoHNxmn+QJeOHspnZuh6NOVrJL6H1g== + dependencies: + "@ethersproject/bignumber" "^5.2.0" + "@ethersproject/bytes" "^5.2.0" + "@ethersproject/keccak256" "^5.2.0" + "@ethersproject/sha2" "^5.2.0" + "@ethersproject/strings" "^5.2.0" + +"@ethersproject/strings@5.2.0", "@ethersproject/strings@^5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@ethersproject/strings/-/strings-5.2.0.tgz#e93d989859587191c3f64bda124d9dedbc3f5a97" + integrity sha512-RmjX800wRYKgrzo2ZCSlA8OCQYyq4+M46VgjSVDVyYkLZctBXC3epqlppDA24R7eo856KNbXqezZsMnHT+sSuA== + dependencies: + "@ethersproject/bytes" "^5.2.0" + "@ethersproject/constants" "^5.2.0" + "@ethersproject/logger" "^5.2.0" + +"@ethersproject/transactions@5.2.0", "@ethersproject/transactions@^5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@ethersproject/transactions/-/transactions-5.2.0.tgz#052e2ef8f8adf7037ebe4cc47aad2a61950e6491" + integrity sha512-QrGbhGYsouNNclUp3tWMbckMsuXJTOsA56kT3BuRrLlXJcUH7myIihajXdSfKcyJsvHJPrGZP+U3TKh+sLzZtg== + dependencies: + "@ethersproject/address" "^5.2.0" + "@ethersproject/bignumber" "^5.2.0" + "@ethersproject/bytes" "^5.2.0" + "@ethersproject/constants" "^5.2.0" + "@ethersproject/keccak256" "^5.2.0" + "@ethersproject/logger" "^5.2.0" + "@ethersproject/properties" "^5.2.0" + "@ethersproject/rlp" "^5.2.0" + "@ethersproject/signing-key" "^5.2.0" + +"@ethersproject/units@5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@ethersproject/units/-/units-5.2.0.tgz#08643e5d4583ecc1a32b103c1157f7ae80803392" + integrity sha512-yrwlyomXcBBHp5oSrLxlLkyHN7dVu3PO7hMbQXc00h388zU4TF3o/PAIUhh+x695wgJ19Fa8YgUWCab3a1RDwA== + dependencies: + "@ethersproject/bignumber" "^5.2.0" + "@ethersproject/constants" "^5.2.0" + "@ethersproject/logger" "^5.2.0" + +"@ethersproject/wallet@5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@ethersproject/wallet/-/wallet-5.2.0.tgz#b5a8406676067e34f633536a4cb53c2ff98c0b5c" + integrity sha512-uPdjZwUmAJLo1+ybR/G/rL9pv/NEcCqOsjn6RJFvG7RmwP2kS1v5C+F+ysgx2W/PxBIVT+2IEsfXLbBz8s/6Rg== + dependencies: + "@ethersproject/abstract-provider" "^5.2.0" + "@ethersproject/abstract-signer" "^5.2.0" + "@ethersproject/address" "^5.2.0" + "@ethersproject/bignumber" "^5.2.0" + "@ethersproject/bytes" "^5.2.0" + "@ethersproject/hash" "^5.2.0" + "@ethersproject/hdnode" "^5.2.0" + "@ethersproject/json-wallets" "^5.2.0" + "@ethersproject/keccak256" "^5.2.0" + "@ethersproject/logger" "^5.2.0" + "@ethersproject/properties" "^5.2.0" + "@ethersproject/random" "^5.2.0" + "@ethersproject/signing-key" "^5.2.0" + "@ethersproject/transactions" "^5.2.0" + "@ethersproject/wordlists" "^5.2.0" + +"@ethersproject/web@5.2.0", "@ethersproject/web@^5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@ethersproject/web/-/web-5.2.0.tgz#47d8e152e7fcc07ba0aff4f99fde268fde79dd7a" + integrity sha512-mYb9qxGlOBFR2pR6t1CZczuqqX6r8RQGn7MtwrBciMex3cvA/qs+wbmcDgl+/OZY0Pco/ih6WHQRnVi+4sBeCQ== + dependencies: + "@ethersproject/base64" "^5.2.0" + "@ethersproject/bytes" "^5.2.0" + "@ethersproject/logger" "^5.2.0" + "@ethersproject/properties" "^5.2.0" + "@ethersproject/strings" "^5.2.0" + +"@ethersproject/wordlists@5.2.0", "@ethersproject/wordlists@^5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@ethersproject/wordlists/-/wordlists-5.2.0.tgz#afcce0229e9ef64af1bf8a1e96571fa441e9f444" + integrity sha512-/7TG5r/Zm8Wd9WhoqQ4QnntgMkIfIZ8QVrpU81muiChLD26XLOgmyiqKPL7K058uYt7UZ0wzbXjxyCYadU3xFQ== + dependencies: + "@ethersproject/bytes" "^5.2.0" + "@ethersproject/hash" "^5.2.0" + "@ethersproject/logger" "^5.2.0" + "@ethersproject/properties" "^5.2.0" + "@ethersproject/strings" "^5.2.0" + "@graphql-tools/batch-delegate@^7.0.0": version "7.0.2" resolved "https://registry.yarnpkg.com/@graphql-tools/batch-delegate/-/batch-delegate-7.0.2.tgz#e18bfe3f545c60c03b0bc079fe4bfa8f208b1631" @@ -784,6 +1122,26 @@ dependencies: defer-to-connect "^1.0.1" +"@tsconfig/node10@^1.0.7": + version "1.0.7" + resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.7.tgz#1eb1de36c73478a2479cc661ef5af1c16d86d606" + integrity sha512-aBvUmXLQbayM4w3A8TrjwrXs4DZ8iduJnuJLLRGdkWlyakCf1q6uHZJBzXoRA/huAEknG5tcUyQxN3A+In5euQ== + +"@tsconfig/node12@^1.0.7": + version "1.0.7" + resolved "https://registry.yarnpkg.com/@tsconfig/node12/-/node12-1.0.7.tgz#677bd9117e8164dc319987dd6ff5fc1ba6fbf18b" + integrity sha512-dgasobK/Y0wVMswcipr3k0HpevxFJLijN03A8mYfEPvWvOs14v0ZlYTR4kIgMx8g4+fTyTFv8/jLCIfRqLDJ4A== + +"@tsconfig/node14@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@tsconfig/node14/-/node14-1.0.0.tgz#5bd046e508b1ee90bc091766758838741fdefd6e" + integrity sha512-RKkL8eTdPv6t5EHgFKIVQgsDapugbuOptNd9OOunN/HAkzmmTnZELx1kNCK0rSdUYGmiFMM3rRQMAWiyp023LQ== + +"@tsconfig/node16@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.1.tgz#a6ca6a9a0ff366af433f42f5f0e124794ff6b8f1" + integrity sha512-FTgBI767POY/lKNDNbIzgAX6miIDBs6NTCbdlDb8TrWovHsSvaVIZDlTqym29C6UqhzwcJx4CYr+AlrMywA0cA== + "@types/body-parser@*": version "1.19.0" resolved "https://registry.yarnpkg.com/@types/body-parser/-/body-parser-1.19.0.tgz#0685b3c47eb3006ffed117cdd55164b61f80538f" @@ -868,6 +1226,18 @@ dependencies: "@types/node" "*" +"@types/yargs-parser@*": + version "20.2.0" + resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-20.2.0.tgz#dd3e6699ba3237f0348cd085e4698780204842f9" + integrity sha512-37RSHht+gzzgYeobbG+KWryeAW8J33Nhr69cjTqSYymXVZEN9NbRYWoYlRtDhHKPVT1FyNKwaTPC1NynKZpzRA== + +"@types/yargs@^17.0.0": + version "17.0.0" + resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.0.tgz#32f740934eedf0a5cd19470249f317755c91f1ae" + integrity sha512-RS7u2X7vdXjVQs160PWY1pjLBw6GJj04utojn0KU8p2rRZR37FSzzK6XOT+KLzT/DVbDYRyezroc0LHIvM5Z2A== + dependencies: + "@types/yargs-parser" "*" + "@types/zen-observable@^0.8.0": version "0.8.2" resolved "https://registry.yarnpkg.com/@types/zen-observable/-/zen-observable-0.8.2.tgz#808c9fa7e4517274ed555fa158f2de4b4f468e71" @@ -911,6 +1281,17 @@ abort-controller@3.0.0: dependencies: event-target-shim "^5.0.0" +abstract-leveldown@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/abstract-leveldown/-/abstract-leveldown-7.0.0.tgz#1a8bc3b07f502793804d456a881dc15cedb9bc5d" + integrity sha512-mFAi5sB/UjpNYglrQ4irzdmr2mbQtE94OJbrAYuK2yRARjH/OACinN1meOAorfnaLPMQdFymSQMlkiDm9AXXKQ== + dependencies: + buffer "^6.0.3" + is-buffer "^2.0.5" + level-concat-iterator "^3.0.0" + level-supports "^2.0.0" + queue-microtask "^1.2.3" + accepts@^1.3.7, accepts@~1.3.7: version "1.3.7" resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd" @@ -919,6 +1300,11 @@ accepts@^1.3.7, accepts@~1.3.7: mime-types "~2.1.24" negotiator "0.6.2" +aes-js@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-3.0.0.tgz#e21df10ad6c2053295bcbb8dab40b09dbea87e4d" + integrity sha1-4h3xCtbCBTKVvLuNq0Cwnb6ofk0= + ansi-align@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/ansi-align/-/ansi-align-3.0.0.tgz#b536b371cf687caaef236c18d3e21fe3797467cb" @@ -1082,11 +1468,21 @@ base64-js@^1.3.1: resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== +bech32@1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/bech32/-/bech32-1.1.4.tgz#e38c9f37bf179b8eb16ae3a772b40c356d4832e9" + integrity sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ== + binary-extensions@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== +bn.js@^4.11.9, bn.js@^4.4.0: + version "4.12.0" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88" + integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA== + body-parser@1.19.0: version "1.19.0" resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.19.0.tgz#96b2709e57c9c4e09a6fd66a8fd979844f69f08a" @@ -1132,6 +1528,11 @@ braces@^3.0.1, braces@~3.0.2: dependencies: fill-range "^7.0.1" +brorand@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" + integrity sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8= + browser-stdout@1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" @@ -1168,6 +1569,14 @@ buffer@^5.7.0: base64-js "^1.3.1" ieee754 "^1.1.13" +buffer@^6.0.3: + version "6.0.3" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6" + integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA== + dependencies: + base64-js "^1.3.1" + ieee754 "^1.2.1" + bytes@3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6" @@ -1217,6 +1626,16 @@ caniuse-lite@^1.0.30001219: resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001227.tgz#437fe8b514ac4512d9bdb4ea79f20c400bd0b4d1" integrity sha512-HHZT4QpUw4Pf45IE3xxKAPgAN3q2aRai/x5TSHP8lrrKzARoH0IeBviwStcRi5lsFlscTkBbXC7gXyms43151A== +canonical-json@^0.0.4: + version "0.0.4" + resolved "https://registry.yarnpkg.com/canonical-json/-/canonical-json-0.0.4.tgz#6579c072c3db5c477ec41dc978fbf2b8f41074a3" + integrity sha1-ZXnAcsPbXEd+xB3JePvyuPQQdKM= + +catering@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/catering/-/catering-2.0.0.tgz#15ce31bcbffafbf62855ea7677b0e5d23581233d" + integrity sha512-aD/WmxhGwUGsVPrj8C80vH7C7GphJilYVSdudoV4u16XdrLF7CVyfBmENsc4tLTVsJJzCRid8GbwJ7mcPLee6Q== + chai@^4.3.4: version "4.3.4" resolved "https://registry.yarnpkg.com/chai/-/chai-4.3.4.tgz#b55e655b31e1eac7099be4c08c21964fce2e6c49" @@ -1434,7 +1853,7 @@ debug@2.6.9, debug@^2.2.0: dependencies: ms "2.0.0" -debug@4.3.1, debug@^4.1.0: +debug@4.3.1, debug@^4.1.0, debug@^4.3.1: version "4.3.1" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee" integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ== @@ -1482,6 +1901,14 @@ defer-to-connect@^1.0.1: resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-1.1.3.tgz#331ae050c08dcf789f8c83a7b81f0ed94f4ac591" integrity sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ== +deferred-leveldown@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/deferred-leveldown/-/deferred-leveldown-6.0.0.tgz#364dc436682eccbd4a25a5fd5585614770d0d3d6" + integrity sha512-F6CLAZzNeURojlH4MCigZr54tNz+xDSi06YXsDr5uLSKeF3JKnvnQWTqd+RETh2hbWTJR3qDzGicQOWS5ZQ1BQ== + dependencies: + abstract-leveldown "^7.0.0" + inherits "^2.0.3" + define-properties@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" @@ -1543,6 +1970,19 @@ electron-to-chromium@^1.3.723: resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.727.tgz#857e310ca00f0b75da4e1db6ff0e073cc4a91ddf" integrity sha512-Mfz4FIB4FSvEwBpDfdipRIrwd6uo8gUDoRDF4QEYb4h4tSuI3ov594OrjU6on042UlFHouIJpClDODGkPcBSbg== +elliptic@6.5.4: + version "6.5.4" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb" + integrity sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ== + dependencies: + bn.js "^4.11.9" + brorand "^1.1.0" + hash.js "^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@^7.0.1: version "7.0.3" resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" @@ -1558,6 +1998,16 @@ encodeurl@~1.0.2: resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= +encoding-down@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/encoding-down/-/encoding-down-7.0.0.tgz#63357e0f44b4a85664d9539bd711500da70f0c63" + integrity sha512-hor6z2W/ZrVqDYMawQp7VtfEt6BrvYw+mgjWLauUMZsIBjMt1/k5aa+JreLbtjwJdkjrZ39TU+pV5GpHPGRpog== + dependencies: + abstract-leveldown "^7.0.0" + inherits "^2.0.3" + level-codec "^10.0.0" + level-errors "^3.0.0" + end-of-stream@^1.1.0: version "1.4.4" resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" @@ -1565,6 +2015,13 @@ end-of-stream@^1.1.0: dependencies: once "^1.4.0" +errno@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/errno/-/errno-1.0.0.tgz#0ea47d701864accf996412f09e29b4dc2cf3856d" + integrity sha512-3zV5mFS1E8/1bPxt/B0xxzI1snsg3uSCIh6Zo1qKg6iMw93hzPANk9oBFzSFBFrwuVoQuE3rLoouAUfwOAj1wQ== + dependencies: + prr "~1.0.1" + escalade@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" @@ -1595,6 +2052,42 @@ etag@~1.8.1: resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc= +ethers@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.2.0.tgz#13452e35947ab5d77053286d1f7161ee666c85ba" + integrity sha512-HqFGU2Qab0mAg3y1eHKVMXS4i1gTObMY0/4+x4LiO72NHhJL3Z795gnqyivmwG1J8e5NLSlRSfyIR7TL0Hw3ig== + dependencies: + "@ethersproject/abi" "5.2.0" + "@ethersproject/abstract-provider" "5.2.0" + "@ethersproject/abstract-signer" "5.2.0" + "@ethersproject/address" "5.2.0" + "@ethersproject/base64" "5.2.0" + "@ethersproject/basex" "5.2.0" + "@ethersproject/bignumber" "5.2.0" + "@ethersproject/bytes" "5.2.0" + "@ethersproject/constants" "5.2.0" + "@ethersproject/contracts" "5.2.0" + "@ethersproject/hash" "5.2.0" + "@ethersproject/hdnode" "5.2.0" + "@ethersproject/json-wallets" "5.2.0" + "@ethersproject/keccak256" "5.2.0" + "@ethersproject/logger" "5.2.0" + "@ethersproject/networks" "5.2.0" + "@ethersproject/pbkdf2" "5.2.0" + "@ethersproject/properties" "5.2.0" + "@ethersproject/providers" "5.2.0" + "@ethersproject/random" "5.2.0" + "@ethersproject/rlp" "5.2.0" + "@ethersproject/sha2" "5.2.0" + "@ethersproject/signing-key" "5.2.0" + "@ethersproject/solidity" "5.2.0" + "@ethersproject/strings" "5.2.0" + "@ethersproject/transactions" "5.2.0" + "@ethersproject/units" "5.2.0" + "@ethersproject/wallet" "5.2.0" + "@ethersproject/web" "5.2.0" + "@ethersproject/wordlists" "5.2.0" + event-target-shim@^5.0.0: version "5.0.1" resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789" @@ -1774,6 +2267,15 @@ fresh@0.5.2: resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac= +fs-extra@^10.0.0: + version "10.0.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-10.0.0.tgz#9ff61b655dde53fb34a82df84bb214ce802e17c1" + integrity sha512-C5owb14u9eJwizKGdchcDUQeFtlSHHthBk8pbX9Vc1PFZrLombudjDnNns88aYslCyF6IY5SUw3Roz6xShcEIQ== + dependencies: + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^2.0.0" + fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" @@ -1899,7 +2401,7 @@ got@^9.6.0: to-readable-stream "^1.0.0" url-parse-lax "^3.0.0" -graceful-fs@^4.1.2: +graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0: version "4.2.6" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.6.tgz#ff040b2b0853b23c3d31027523706f1885d76bee" integrity sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ== @@ -1998,11 +2500,36 @@ has@^1.0.3: dependencies: function-bind "^1.1.1" +hash.js@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.3.tgz#340dedbe6290187151c1ea1d777a3448935df846" + integrity sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA== + dependencies: + inherits "^2.0.3" + minimalistic-assert "^1.0.0" + +hash.js@^1.0.0, hash.js@^1.0.3: + version "1.1.7" + resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" + integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== + dependencies: + inherits "^2.0.3" + minimalistic-assert "^1.0.1" + he@1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== +hmac-drbg@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" + integrity sha1-0nRXAQJabHdabFRXk+1QL8DGSaE= + dependencies: + hash.js "^1.0.3" + minimalistic-assert "^1.0.0" + minimalistic-crypto-utils "^1.0.1" + hoist-non-react-statics@^3.3.2: version "3.3.2" resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz#ece0acaf71d62c2969c2ec59feff42a4b1a85b45" @@ -2055,7 +2582,7 @@ iconv-lite@0.4.24: dependencies: safer-buffer ">= 2.1.2 < 3" -ieee754@^1.1.13: +ieee754@^1.1.13, ieee754@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== @@ -2100,7 +2627,7 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@2.0.4: +inherits@2, inherits@2.0.4, inherits@^2.0.3, inherits@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== @@ -2132,6 +2659,11 @@ is-binary-path@~2.1.0: dependencies: binary-extensions "^2.0.0" +is-buffer@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.5.tgz#ebc252e400d22ff8d77fa09888821a24a658c191" + integrity sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ== + is-ci@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-2.0.0.tgz#6bc6334181810e04b5c22b3d589fdca55026404c" @@ -2224,6 +2756,11 @@ iterall@^1.2.1: resolved "https://registry.yarnpkg.com/iterall/-/iterall-1.3.0.tgz#afcb08492e2915cbd8a0884eb93a8c94d0d72fea" integrity sha512-QZ9qOMdF+QLHxy1QIpUHUU1D5pS2CG2P69LF6L6CPjPYA/XMOmKV3PZpawHoAjHNyB0swdVTRxdYT4tbBbxqwg== +js-sha3@0.5.7: + version "0.5.7" + resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.5.7.tgz#0d4ffd8002d5333aabaf4a23eed2f6374c9f28e7" + integrity sha1-DU/9gALVMzqrr0oj7tL2N0yfKOc= + "js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" @@ -2253,6 +2790,15 @@ json5@^2.1.2: dependencies: minimist "^1.2.5" +jsonfile@^6.0.1: + version "6.1.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae" + integrity sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ== + dependencies: + universalify "^2.0.0" + optionalDependencies: + graceful-fs "^4.1.6" + keyv@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/keyv/-/keyv-3.1.0.tgz#ecc228486f69991e49e9476485a5be1e8fc5c4d9" @@ -2267,6 +2813,91 @@ latest-version@^5.0.0: dependencies: package-json "^6.3.0" +left-pad@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/left-pad/-/left-pad-1.3.0.tgz#5b8a3a7765dfe001261dde915589e782f8c94d1e" + integrity sha512-XI5MPzVNApjAyhQzphX8BkmKsKUxD4LdyK24iZeQGinBN9yTQT3bFlCBy/aVx2HrNcqQGsdot8ghrjyrvMCoEA== + +level-codec@^10.0.0: + version "10.0.0" + resolved "https://registry.yarnpkg.com/level-codec/-/level-codec-10.0.0.tgz#f9e892770532c6cdcc83529546730791b0c62c12" + integrity sha512-QW3VteVNAp6c/LuV6nDjg7XDXx9XHK4abmQarxZmlRSDyXYk20UdaJTSX6yzVvQ4i0JyWSB7jert0DsyD/kk6g== + dependencies: + buffer "^6.0.3" + +level-concat-iterator@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/level-concat-iterator/-/level-concat-iterator-3.0.0.tgz#416ddaf0c2ed834f006aa3124ee68906eb4769d4" + integrity sha512-UHGiIdj+uiFQorOrURRvJF3Ei0uHc89ciM/aRi0qsWDV2f0HXypeXUPhJKL6DsONgSR76Pc0AI4sKYEYYRn2Dg== + +level-errors@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/level-errors/-/level-errors-3.0.0.tgz#5719f2ad9061d9f2bd7cf22e4a7def893e6d2e60" + integrity sha512-MZXOQT061uEjxxxq4C/Jf+M3RdEKK9e3NbxlN7yOp1LDYoLVAhE2i1j0b7XqXfl8FjFtUL7phwr3Sn0wXXoMqA== + dependencies: + errno "^1.0.0" + +level-iterator-stream@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/level-iterator-stream/-/level-iterator-stream-5.0.0.tgz#85b3438e1b4c54ce5aa8c0eb973cfb628117df9e" + integrity sha512-wnb1+o+CVFUDdiSMR/ZymE2prPs3cjVLlXuDeSq9Zb8o032XrabGEXcTCsBxprAtseO3qvFeGzh6406z9sOTRA== + dependencies: + inherits "^2.0.4" + readable-stream "^3.4.0" + +level-js@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/level-js/-/level-js-6.0.0.tgz#1faff0eb92ca34e4565d1f7bca7026989855625b" + integrity sha512-7dp7JuaoQoqKW4ZGvrV1RB5f51/ktLdEo9fSDsh3Ofmg7sKCMu3X0CIngbY/IUz/YyskhN7LRvEVIkZHCY3LKQ== + dependencies: + abstract-leveldown "^7.0.0" + buffer "^6.0.3" + inherits "^2.0.3" + ltgt "^2.1.2" + +level-packager@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/level-packager/-/level-packager-6.0.0.tgz#1881e062d2dc694ce88101b3212d37ef90aa7a99" + integrity sha512-me656XRWfOVqs9wc+mWckZ6Rb1GuP33ndN4ZntDXwXFspX8cGA++Y+YqJsdE/mjTiipTuxXf047Z4rV62nOVuw== + dependencies: + encoding-down "^7.0.0" + levelup "^5.0.0" + +level-supports@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/level-supports/-/level-supports-2.0.0.tgz#b0b9f63f30c4175fb2612217144f03f3b77580d9" + integrity sha512-8UJgzo1pvWP1wq80ZlkL19fPeK7tlyy0sBY90+2pj0x/kvzHCoLDWyuFJJMrsTn33oc7hbMkS3SkjCxMRPHWaw== + +level@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/level/-/level-7.0.0.tgz#10fa2d5a0b3b21a99d33e9307c92c1270243d1ce" + integrity sha512-QrBnjcWywalh86ms9hfizvxT5aBHrgWEu6rLChS9tFE2wwFU3aI1r0v+2SSZIyeUr4O4PFo8+sCc1kebahdhlw== + dependencies: + level-js "^6.0.0" + level-packager "^6.0.0" + leveldown "^6.0.0" + +leveldown@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/leveldown/-/leveldown-6.0.0.tgz#3ec7f00463c45f8f7c8e68248d10ab299059c7ca" + integrity sha512-NEsyqpfdDhpFO49Zm9htNSsWixMa9Q9sUXgrBTaQNPyPo2Kx1wRctgIXMzc7tduXJqNff8QAwulv2eZDboghxQ== + dependencies: + abstract-leveldown "^7.0.0" + napi-macros "~2.0.0" + node-gyp-build "~4.2.1" + +levelup@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/levelup/-/levelup-5.0.0.tgz#7cbbfd2ffc7495b3ebd75f81f5b328eb37866c3a" + integrity sha512-P4IKS4J17b6dzm8iI8Irv5gvOlrqJv04Lrpq1rAgZvjR2IsVSjbXQQo1LoK/PJuouxepLE8CTIiKGmHQYZnneA== + dependencies: + catering "^2.0.0" + deferred-leveldown "^6.0.0" + level-errors "^3.0.0" + level-iterator-stream "^5.0.0" + level-supports "^2.0.0" + queue-microtask "^1.2.3" + locate-path@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" @@ -2317,6 +2948,11 @@ lowercase-keys@^2.0.0: resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-2.0.0.tgz#2603e78b7b4b0006cbca2fbcc8a3202558ac9479" integrity sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA== +ltgt@^2.1.2: + version "2.2.1" + resolved "https://registry.yarnpkg.com/ltgt/-/ltgt-2.2.1.tgz#f35ca91c493f7b73da0e07495304f17b31f87ee5" + integrity sha1-81ypHEk/e3PaDgdJUwTxezH4fuU= + make-dir@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f" @@ -2384,6 +3020,16 @@ mimic-response@^1.0.0, mimic-response@^1.0.1: resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.1.tgz#4923538878eef42063cb8a3e3b0798781487ab1b" integrity sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ== +minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" + integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== + +minimalistic-crypto-utils@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" + integrity sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo= + minimatch@3.0.4, minimatch@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" @@ -2452,6 +3098,11 @@ nanoid@3.1.20: resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.20.tgz#badc263c6b1dcf14b71efaa85f6ab4c1d6cfc788" integrity sha512-a1cQNyczgKbLX9jwbS/+d7W8fX/RfgYR7lVWwWOGIPNgK2m0MWvrGF6/m4kk6U3QcFMnZf3RIhL0v2Jgh/0Uxw== +napi-macros@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/napi-macros/-/napi-macros-2.0.0.tgz#2b6bae421e7b96eb687aa6c77a7858640670001b" + integrity sha512-A0xLykHtARfueITVDernsAWdtIMbOJgKgcluwENp3AlsKN/PloyO10HtmoqnFAQAcxPkgZN7wdfPfEd0zNGxbg== + negotiator@0.6.2: version "0.6.2" resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb" @@ -2470,6 +3121,11 @@ node-fetch@2.6.1, node-fetch@^2.6.1: resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052" integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw== +node-gyp-build@~4.2.1: + version "4.2.3" + resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.2.3.tgz#ce6277f853835f718829efb47db20f3e4d9c4739" + integrity sha512-MN6ZpzmfNCRM+3t57PTJHgHyw/h4OWnZ6mR8P5j/uZtqQr46RRuDE/P+g3n0YR/AiYXeWixZZzaip77gdICfRg== + node-int64@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" @@ -2687,6 +3343,11 @@ proxy-addr@~2.0.5: forwarded "~0.1.2" ipaddr.js "1.9.1" +prr@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" + integrity sha1-0/wRS6BplaRexok/SEzrHXj19HY= + pstree.remy@^1.1.7: version "1.1.8" resolved "https://registry.yarnpkg.com/pstree.remy/-/pstree.remy-1.1.8.tgz#c242224f4a67c21f686839bbdb4ac282b8373d3a" @@ -2712,7 +3373,7 @@ qs@6.7.0: resolved "https://registry.yarnpkg.com/qs/-/qs-6.7.0.tgz#41dc1a015e3d581f1621776be31afb2876a9b1bc" integrity sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ== -queue-microtask@^1.2.2: +queue-microtask@^1.2.2, queue-microtask@^1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== @@ -2764,6 +3425,15 @@ react-is@^16.7.0, react-is@^16.8.1: resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== +readable-stream@^3.4.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" + integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== + dependencies: + inherits "^2.0.3" + string_decoder "^1.1.1" + util-deprecate "^1.0.1" + readdirp@~3.5.0: version "3.5.0" resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.5.0.tgz#9ba74c019b15d365278d2e91bb8c48d7b4d42c9e" @@ -2864,7 +3534,7 @@ safe-buffer@5.1.2, safe-buffer@~5.1.1: resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== -safe-buffer@^5.1.0: +safe-buffer@^5.1.0, safe-buffer@~5.2.0: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== @@ -2874,6 +3544,11 @@ safe-buffer@^5.1.0: resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== +scrypt-js@3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/scrypt-js/-/scrypt-js-3.0.1.tgz#d314a57c2aef69d1ad98a138a21fe9eafa9ee312" + integrity sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA== + semver-diff@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/semver-diff/-/semver-diff-3.1.1.tgz#05f77ce59f325e00e2706afd67bb506ddb1ca32b" @@ -3011,6 +3686,13 @@ string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0: is-fullwidth-code-point "^3.0.0" strip-ansi "^6.0.0" +string_decoder@^1.1.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" + integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== + dependencies: + safe-buffer "~5.2.0" + strip-ansi@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" @@ -3119,6 +3801,11 @@ toidentifier@1.0.0: resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553" integrity sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw== +toml@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/toml/-/toml-3.0.0.tgz#342160f1af1904ec9d204d03a5d61222d762c5ee" + integrity sha512-y/mWCZinnvxjTKYhJ+pYxwD0mRLVvOtdS2Awbgxln6iEnt4rk0yBxeSBHkGJcPucRiG0e55mwWp+g/05rsrd6w== + touch@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/touch/-/touch-3.1.0.tgz#fe365f5f75ec9ed4e56825e0bb76d24ab74af83b" @@ -3133,6 +3820,22 @@ ts-invariant@^0.7.0: dependencies: tslib "^2.1.0" +ts-node@^10.0.0: + version "10.0.0" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.0.0.tgz#05f10b9a716b0b624129ad44f0ea05dac84ba3be" + integrity sha512-ROWeOIUvfFbPZkoDis0L/55Fk+6gFQNZwwKPLinacRl6tsxstTF1DbAcLKkovwnpKMVvOMHP1TIbnwXwtLg1gg== + dependencies: + "@tsconfig/node10" "^1.0.7" + "@tsconfig/node12" "^1.0.7" + "@tsconfig/node14" "^1.0.0" + "@tsconfig/node16" "^1.0.1" + arg "^4.1.0" + create-require "^1.1.0" + diff "^4.0.1" + make-error "^1.1.1" + source-map-support "^0.5.17" + yn "3.1.1" + ts-node@^9.1.1: version "9.1.1" resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-9.1.1.tgz#51a9a450a3e959401bda5f004a72d54b936d376d" @@ -3214,6 +3917,11 @@ unique-string@^2.0.0: dependencies: crypto-random-string "^2.0.0" +universalify@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" + integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ== + unixify@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unixify/-/unixify-1.0.0.tgz#3a641c8c2ffbce4da683a5c70f03a462940c2090" @@ -3252,6 +3960,11 @@ url-parse-lax@^3.0.0: dependencies: prepend-http "^2.0.0" +util-deprecate@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= + utils-merge@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" @@ -3336,6 +4049,11 @@ write-file-atomic@^3.0.0: signal-exit "^3.0.2" typedarray-to-buffer "^3.1.5" +ws@7.2.3: + version "7.2.3" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.2.3.tgz#a5411e1fb04d5ed0efee76d26d5c46d830c39b46" + integrity sha512-HTDl9G9hbkNDk98naoR/cHDws7+EyYMOdL1BmjsZXRUjf7d+MficC4B7HLUPlSiho0vg+CWKrGIt/VJBd1xunQ== + ws@7.4.5: version "7.4.5" resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.5.tgz#a484dd851e9beb6fdb420027e3885e8ce48986c1" @@ -3421,6 +4139,19 @@ yargs@^15.3.1: y18n "^4.0.0" yargs-parser "^18.1.2" +yargs@^17.0.1: + version "17.0.1" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.0.1.tgz#6a1ced4ed5ee0b388010ba9fd67af83b9362e0bb" + integrity sha512-xBBulfCc8Y6gLFcrPvtqKz9hz8SO0l1Ni8GgDekvBX2ro0HRQImDGnikfc33cgzcYUSncapnNcZDjVFIH3f6KQ== + dependencies: + cliui "^7.0.2" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.0" + y18n "^5.0.5" + yargs-parser "^20.2.2" + yn@3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50"