diff --git a/docker/polkastats-backend/docker-compose.yml b/docker/polkastats-backend/docker-compose.yml index d3722758..c68157e7 100644 --- a/docker/polkastats-backend/docker-compose.yml +++ b/docker/polkastats-backend/docker-compose.yml @@ -14,7 +14,7 @@ services: - '30333:30333' - '9933:9933' - '9944:9944' - command: -d /data --unsafe-ws-external --rpc-cors all --pruning=archive --name 'Polkastats 🤖 v3' + command: -d /data --unsafe-ws-external --rpc-cors all --pruning=archive --name 'Polkastats 🤖 v3' --chain kusama restart: on-failure # # SQL data base diff --git a/docker/polkastats-backend/sql/polkastats.sql b/docker/polkastats-backend/sql/polkastats.sql index fdd441d3..52fb7e34 100644 --- a/docker/polkastats-backend/sql/polkastats.sql +++ b/docker/polkastats-backend/sql/polkastats.sql @@ -67,7 +67,7 @@ CREATE TABLE IF NOT EXISTS rewards ( stake_info TEXT, estimated_payout BIGINT NOT NULL, timestamp BIGINT NOT NULL, - PRIMARY KEY ( block_number, era_index, stash_id ) + PRIMARY KEY ( era_index, stash_id ) ); CREATE TABLE IF NOT EXISTS validator_slashes_era ( @@ -170,10 +170,12 @@ CREATE TABLE IF NOT EXISTS account ( account_id VARCHAR(47) NOT NULL, identity TEXT NOT NULL, identity_display VARCHAR(100) NOT NULL, + identity_display_parent VARCHAR(100) NOT NULL, balances TEXT NOT NULL, available_balance BIGINT NOT NULL, free_balance BIGINT NOT NULL, locked_balance BIGINT NOT NULL, + nonce BIGINT NOT NULL, timestamp BIGINT NOT NULL, block_height BIGINT NOT NULL, is_staking BOOLEAN NOT NULL, diff --git a/docker/polkastats-backend/substrate-client/Dockerfile b/docker/polkastats-backend/substrate-client/Dockerfile index 48ad90e5..f7bd5f0d 100644 --- a/docker/polkastats-backend/substrate-client/Dockerfile +++ b/docker/polkastats-backend/substrate-client/Dockerfile @@ -2,7 +2,7 @@ FROM phusion/baseimage:0.11 LABEL maintainer "@ColmenaLabs_svq" LABEL description="Small image with the Substrate binary." -ARG VERSION=v0.7.33 +ARG VERSION=v0.8.7 RUN apt-get update && apt-get install wget curl jq -y diff --git a/lib/crawlers/activeAccounts.js b/lib/crawlers/activeAccounts.js index 8499d8a6..c2804cdb 100644 --- a/lib/crawlers/activeAccounts.js +++ b/lib/crawlers/activeAccounts.js @@ -93,20 +93,22 @@ const makeQuery = (state, block, timestamp) => { const freeBalance = balances.freeBalance.toString(); const lockedBalance = balances.lockedBalance.toString(); const identityDisplay = identity.display ? identity.display.toString() : ``; + const identityDisplayParent = identity.displayParent ? identity.displayParent.toString() : ``; const JSONIdentity = identity.display ? JSON.stringify(identity) : ``; - const JSONbalances = JSON.stringify(balances); - const query = ` \ - INSERT INTO account (account_id, identity, identity_display, balances, available_balance, free_balance, locked_balance, timestamp, block_height, is_staking) \ - VALUES ('${id}', '${JSONIdentity}', '${identityDisplay}', '${JSONbalances}', '${availableBalance}', '${freeBalance}', '${lockedBalance}', '${timestamp}', '${block}', ${isStaking}) \ - ON CONFLICT (account_id) \ - DO UPDATE \ - SET identity = EXCLUDED.identity, \ - balances = EXCLUDED.balances, \ - available_balance = EXCLUDED.available_balance, \ - free_balance = EXCLUDED.free_balance, \ - timestamp = EXCLUDED.timestamp, \ - is_staking = EXCLUDED.is_staking, \ - block_height = EXCLUDED.block_height; \ + const JSONbalances = JSON.stringify(balances); + const nonce = balances.accountNonce.toString(); + const query = ` \ + INSERT INTO account (account_id, identity, identity_display, identity_display_parent, balances, available_balance, free_balance, locked_balance, nonce, timestamp, block_height, is_staking) \ + VALUES ('${id}', '${JSONIdentity}', '${identityDisplay}', '${identityDisplayParent}', '${JSONbalances}', '${availableBalance}', '${freeBalance}', '${lockedBalance}', '${nonce}', '${timestamp}', '${block}', ${isStaking}) \ + ON CONFLICT (account_id) \ + DO UPDATE \ + SET identity = EXCLUDED.identity, \ + balances = EXCLUDED.balances, \ + available_balance = EXCLUDED.available_balance, \ + free_balance = EXCLUDED.free_balance, \ + timestamp = EXCLUDED.timestamp, \ + is_staking = EXCLUDED.is_staking, \ + block_height = EXCLUDED.block_height; \ `; return { ...state, query }; diff --git a/lib/crawlers/blockHarvester.js b/lib/crawlers/blockHarvester.js index e41052da..e7fa7155 100644 --- a/lib/crawlers/blockHarvester.js +++ b/lib/crawlers/blockHarvester.js @@ -179,7 +179,17 @@ module.exports = { // Get block author identity display name const blockAuthorIdentity = await api.derive.accounts.info(blockAuthor); - const blockAuthorName = blockAuthorIdentity.identity.display || ``; + let blockAuthorName; + if ( + blockAuthorIdentity.identity.displayParent && + blockAuthorIdentity.identity.displayParent !== `` && + blockAuthorIdentity.identity.display && + blockAuthorIdentity.identity.display !== `` + ) { + blockAuthorName = `${blockAuthorIdentity.identity.displayParent} / ${blockAuthorIdentity.identity.display}`; + } else { + blockAuthorName = blockAuthorIdentity.identity.display || ``; + } // Get runtime spec name and version const runtimeVersion = await api.rpc.state.getRuntimeVersion(blockHash); diff --git a/lib/crawlers/blockListener.js b/lib/crawlers/blockListener.js index 129cdeb2..ed4d3734 100644 --- a/lib/crawlers/blockListener.js +++ b/lib/crawlers/blockListener.js @@ -38,7 +38,17 @@ module.exports = { // Get block author identity display name const blockAuthorIdentity = await api.derive.accounts.info(blockAuthor); - const blockAuthorName = blockAuthorIdentity.identity.display || ``; + let blockAuthorName; + if ( + blockAuthorIdentity.identity.displayParent && + blockAuthorIdentity.identity.displayParent !== `` && + blockAuthorIdentity.identity.display && + blockAuthorIdentity.identity.display !== `` + ) { + blockAuthorName = `${blockAuthorIdentity.identity.displayParent} / ${blockAuthorIdentity.identity.display}`; + } else { + blockAuthorName = blockAuthorIdentity.identity.display || ``; + } // Get runtime spec name and version const runtimeVersion = await api.rpc.state.getRuntimeVersion(blockHash); diff --git a/lib/crawlers/rewardsSlashes.js b/lib/crawlers/rewardsSlashes.js index 236f4d5a..651b9f0b 100644 --- a/lib/crawlers/rewardsSlashes.js +++ b/lib/crawlers/rewardsSlashes.js @@ -131,7 +131,10 @@ module.exports = { const estimatedPayoutKSM = estimatedPayout.dividedBy(1e12).toNumber().toFixed(3); const sql = `INSERT INTO rewards (block_number, era_index, stash_id, commission, era_rewards, era_points, stake_info, estimated_payout, timestamp) - VALUES ('${blockNumber}', '${lastEraIndex}', '${validator}', '${eraValidatorCommission[index].commission}', '${poolRewardWithCommission.toString(10)}', '${eraPoints}', '${JSON.stringify(exposure)}', '${estimatedPayout.toFixed(0)}', extract(epoch from now()));`; + VALUES ('${blockNumber}', '${lastEraIndex}', '${validator}', '${eraValidatorCommission[index].commission}', '${poolRewardWithCommission.toString(10)}', '${eraPoints}', '${JSON.stringify(exposure)}', '${estimatedPayout.toFixed(0)}', extract(epoch from now())) + ON CONFLICT ON CONSTRAINT rewards_pkey + DO NOTHING + `; try { logger.info(`Adding reward for validator ${validator}, era: ${lastEraIndex}, commission: ${commission}%, points: ${eraPoints} (${eraPointsPercent}%), exposure: ${totalExposure} KSM, reward: ${poolRewardWithCommissionKSM} KSM (without ${commission}% = ${poolRewardWithoutCommissionKSM} KSM), estimated era profit for 1000 KSM: ${estimatedPayoutKSM} KSM`); await pool.query(sql); diff --git a/package-lock.json b/package-lock.json index f99faf3d..12d89c08 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,162 +1,162 @@ { "name": "polkastats-backend-v3", - "version": "3.0.0-milestone2-1", + "version": "3.0.0-milestone2.2", "lockfileVersion": 1, "requires": true, "dependencies": { "@babel/runtime": { - "version": "7.9.6", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.9.6.tgz", - "integrity": "sha512-64AF1xY3OAkFHqOb9s4jpgk1Mm5vDZ4L3acHvAml+53nO1XbXLuDodsVpO4OIUsmemlUHMxNdYMNJmsvOwLrvQ==", + "version": "7.10.2", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.10.2.tgz", + "integrity": "sha512-6sF3uQw2ivImfVIl62RZ7MXhO2tap69WeWK57vAaimT6AZbE4FbqjdEJIN1UqoD6wI6B+1n9UiagafH1sxjOtg==", "requires": { "regenerator-runtime": "^0.13.4" } }, "@polkadot/api": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/@polkadot/api/-/api-1.13.1.tgz", - "integrity": "sha512-q/dzklbTpshR58tpLmi7Z51ii6dtpbW6vmPu9PAJbFoFIe45Z09B8rczf6BgXi9mWMiO1Az9gxwtjuc1lnnobg==", - "requires": { - "@babel/runtime": "^7.9.6", - "@polkadot/api-derive": "1.13.1", - "@polkadot/keyring": "^2.9.1", - "@polkadot/metadata": "1.13.1", - "@polkadot/rpc-core": "1.13.1", - "@polkadot/rpc-provider": "1.13.1", - "@polkadot/types": "1.13.1", - "@polkadot/types-known": "1.13.1", - "@polkadot/util": "^2.9.1", - "@polkadot/util-crypto": "^2.9.1", - "bn.js": "^5.1.1", - "eventemitter3": "^4.0.0", + "version": "1.18.1", + "resolved": "https://registry.npmjs.org/@polkadot/api/-/api-1.18.1.tgz", + "integrity": "sha512-3UqY3MYthDvHBT+UWxGJeb5XRX1QOnheez2TJatXwENOh4V6PsE2GtdI+ckXkYh9p61978uNtWhZ5WxDupiW/A==", + "requires": { + "@babel/runtime": "^7.10.2", + "@polkadot/api-derive": "1.18.1", + "@polkadot/keyring": "^2.13.1", + "@polkadot/metadata": "1.18.1", + "@polkadot/rpc-core": "1.18.1", + "@polkadot/rpc-provider": "1.18.1", + "@polkadot/types": "1.18.1", + "@polkadot/types-known": "1.18.1", + "@polkadot/util": "^2.13.1", + "@polkadot/util-crypto": "^2.13.1", + "bn.js": "^5.1.2", + "eventemitter3": "^4.0.4", "rxjs": "^6.5.5" } }, "@polkadot/api-derive": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/@polkadot/api-derive/-/api-derive-1.13.1.tgz", - "integrity": "sha512-Zj5JIg8oyn321G8vX2tpD9UlEHFhMNvdvho8nK7a1L+pqglcE3rs3GSDbCGhCaPHx2fUXYEARazBJKkOHMgMdQ==", - "requires": { - "@babel/runtime": "^7.9.6", - "@polkadot/api": "1.13.1", - "@polkadot/rpc-core": "1.13.1", - "@polkadot/rpc-provider": "1.13.1", - "@polkadot/types": "1.13.1", - "@polkadot/util": "^2.9.1", - "@polkadot/util-crypto": "^2.9.1", - "bn.js": "^5.1.1", + "version": "1.18.1", + "resolved": "https://registry.npmjs.org/@polkadot/api-derive/-/api-derive-1.18.1.tgz", + "integrity": "sha512-B0sqwIH6RhfHjOAf9sU0Wulcf47gNKYDmm0qEvF1oFTWIlLrEa6h2tisSqS/2GetE4J97wEtMM/5bb/69qdCgA==", + "requires": { + "@babel/runtime": "^7.10.2", + "@polkadot/api": "1.18.1", + "@polkadot/rpc-core": "1.18.1", + "@polkadot/rpc-provider": "1.18.1", + "@polkadot/types": "1.18.1", + "@polkadot/util": "^2.13.1", + "@polkadot/util-crypto": "^2.13.1", + "bn.js": "^5.1.2", "memoizee": "^0.4.14", "rxjs": "^6.5.5" } }, "@polkadot/keyring": { - "version": "2.9.1", - "resolved": "https://registry.npmjs.org/@polkadot/keyring/-/keyring-2.9.1.tgz", - "integrity": "sha512-r1jcgV7SQCpc5r2twUxGLqOeQ2tqkfCFVcl877lEolCn+xrASx5rXqO+YyHDKgRnft3RK9z9/k407R+2DjVF9w==", + "version": "2.13.1", + "resolved": "https://registry.npmjs.org/@polkadot/keyring/-/keyring-2.13.1.tgz", + "integrity": "sha512-Vm3ohFyvPAKYFJsUtphYQ0zYgD6VlOV2e6yaHqq8e6q7opLdHcpkE11OSeEnaYs7kUdzs873VH5GTYP2pTKJFQ==", "requires": { - "@babel/runtime": "^7.9.2", - "@polkadot/util": "2.9.1", - "@polkadot/util-crypto": "2.9.1" + "@babel/runtime": "^7.10.2", + "@polkadot/util": "2.13.1", + "@polkadot/util-crypto": "2.13.1" } }, "@polkadot/metadata": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/@polkadot/metadata/-/metadata-1.13.1.tgz", - "integrity": "sha512-81/iWr+49nWJ8FY1+xF73jiUphTR6+JSkB299oHDPvGOcbNgrcJCK49OlAvn1CLdDSybUfv62dLKX5COQ0qaNQ==", + "version": "1.18.1", + "resolved": "https://registry.npmjs.org/@polkadot/metadata/-/metadata-1.18.1.tgz", + "integrity": "sha512-JfKkmI68Uu2Zzu9Us2Ci048dpCQhRtLlQGNreDXKnYnBjhedoWfiYYykutGiWdXVqO9Zkqp6u+fkfcGHP6xZeg==", "requires": { - "@babel/runtime": "^7.9.6", - "@polkadot/types": "1.13.1", - "@polkadot/types-known": "1.13.1", - "@polkadot/util": "^2.9.1", - "@polkadot/util-crypto": "^2.9.1", - "bn.js": "^5.1.1" + "@babel/runtime": "^7.10.2", + "@polkadot/types": "1.18.1", + "@polkadot/types-known": "1.18.1", + "@polkadot/util": "^2.13.1", + "@polkadot/util-crypto": "^2.13.1", + "bn.js": "^5.1.2" } }, "@polkadot/rpc-core": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/@polkadot/rpc-core/-/rpc-core-1.13.1.tgz", - "integrity": "sha512-Lzr3XdLzn9VWATUKc+tjysPZIIoDxhIU3uxN/SeTBIIigelkRoEjs3xSVSeUjN+K81N7blnUqWlS2ka2qyuDrw==", - "requires": { - "@babel/runtime": "^7.9.6", - "@polkadot/metadata": "1.13.1", - "@polkadot/rpc-provider": "1.13.1", - "@polkadot/types": "1.13.1", - "@polkadot/util": "^2.9.1", + "version": "1.18.1", + "resolved": "https://registry.npmjs.org/@polkadot/rpc-core/-/rpc-core-1.18.1.tgz", + "integrity": "sha512-3rpb/xdXkz9o/avMd63yqVK0+p/AKGSBPklSUSjnPvf9AfjGA4WF8xRwisQKqF3KKWfbm3ytbaJhPWU5dD3QNQ==", + "requires": { + "@babel/runtime": "^7.10.2", + "@polkadot/metadata": "1.18.1", + "@polkadot/rpc-provider": "1.18.1", + "@polkadot/types": "1.18.1", + "@polkadot/util": "^2.13.1", "memoizee": "^0.4.14", "rxjs": "^6.5.5" } }, "@polkadot/rpc-provider": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/@polkadot/rpc-provider/-/rpc-provider-1.13.1.tgz", - "integrity": "sha512-thr8sa/4MSx36+VYrQUtRSHgeyND1sz/GyQyPYj57KHrzG0AkXs/akM2p4ohdUKs7SCcBVCXuGq5rNbO9hjgQQ==", - "requires": { - "@babel/runtime": "^7.9.6", - "@polkadot/metadata": "1.13.1", - "@polkadot/types": "1.13.1", - "@polkadot/util": "^2.9.1", - "@polkadot/util-crypto": "^2.9.1", - "bn.js": "^5.1.1", - "eventemitter3": "^4.0.0", + "version": "1.18.1", + "resolved": "https://registry.npmjs.org/@polkadot/rpc-provider/-/rpc-provider-1.18.1.tgz", + "integrity": "sha512-UE2+RAOny9JApcajY8xblzMdebYShTlNczF4YhHVa1FThrP6wnTTHUbdAoAVp15eazAXqotnXO3suSq7HFaL2Q==", + "requires": { + "@babel/runtime": "^7.10.2", + "@polkadot/metadata": "1.18.1", + "@polkadot/types": "1.18.1", + "@polkadot/util": "^2.13.1", + "@polkadot/util-crypto": "^2.13.1", + "bn.js": "^5.1.2", + "eventemitter3": "^4.0.4", "isomorphic-fetch": "^2.2.1", "websocket": "^1.0.31" } }, "@polkadot/types": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/@polkadot/types/-/types-1.13.1.tgz", - "integrity": "sha512-cyANcVkDQmb3Ih5XggvLMWj7Gu9/VL/HYoebua50mecuYWa9eOn3iYGVmvvYG2rFcObikLwAwrUu8Dn1AZ5RoA==", - "requires": { - "@babel/runtime": "^7.9.6", - "@polkadot/metadata": "1.13.1", - "@polkadot/util": "^2.9.1", - "@polkadot/util-crypto": "^2.9.1", + "version": "1.18.1", + "resolved": "https://registry.npmjs.org/@polkadot/types/-/types-1.18.1.tgz", + "integrity": "sha512-j+KhEQpeGDOLIoTGs5hi47PA+4sZPoOdOV1aaqUqt95T5OXO4O8M1qr1GrTv41hkZ23QGDcRCGIMq6aYdKmRHg==", + "requires": { + "@babel/runtime": "^7.10.2", + "@polkadot/metadata": "1.18.1", + "@polkadot/util": "^2.13.1", + "@polkadot/util-crypto": "^2.13.1", "@types/bn.js": "^4.11.6", - "bn.js": "^5.1.1", + "bn.js": "^5.1.2", "memoizee": "^0.4.14", "rxjs": "^6.5.5" } }, "@polkadot/types-known": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/@polkadot/types-known/-/types-known-1.13.1.tgz", - "integrity": "sha512-TIFV9Fzoostg9dgdIGy4zh4cpQJ0WeyyMeYstYUBMbLU4cfTLpHEXLJN2U7/wZ5SDFpQh1TOt/xzGWjCzmv1jg==", + "version": "1.18.1", + "resolved": "https://registry.npmjs.org/@polkadot/types-known/-/types-known-1.18.1.tgz", + "integrity": "sha512-AL371sBtBkyNHE7akpAawDgIAWKydafmB8ADePLJSr8zIFjRk62q1TWoeTzUMYOC9uwYPVF6N0cifXpPHzbeLQ==", "requires": { - "@babel/runtime": "^7.9.6", - "@polkadot/types": "1.13.1", - "@polkadot/util": "^2.9.1", - "bn.js": "^5.1.1" + "@babel/runtime": "^7.10.2", + "@polkadot/types": "1.18.1", + "@polkadot/util": "^2.13.1", + "bn.js": "^5.1.2" } }, "@polkadot/util": { - "version": "2.9.1", - "resolved": "https://registry.npmjs.org/@polkadot/util/-/util-2.9.1.tgz", - "integrity": "sha512-7E/bl9B8hNPb3gnuH8IDAqpsdQ6Z+Y8RgPIJNY9l20FJ1W1ST0UpZgB0BCurrL9kTf4TTg4Lt8iFVwcq8MHRjg==", + "version": "2.13.1", + "resolved": "https://registry.npmjs.org/@polkadot/util/-/util-2.13.1.tgz", + "integrity": "sha512-k1GrS3W5c57sLJJyKYF2bq7H5d8vn6jzTaK8rDM7hRp9Ai2Crl4SjyY+5Tdr0LWG+UTybfc8rIieJklB3amA3w==", "requires": { - "@babel/runtime": "^7.9.2", + "@babel/runtime": "^7.10.2", "@types/bn.js": "^4.11.6", - "bn.js": "^5.1.1", + "bn.js": "^5.1.2", "camelcase": "^5.3.1", "chalk": "^4.0.0", "ip-regex": "^4.1.0" } }, "@polkadot/util-crypto": { - "version": "2.9.1", - "resolved": "https://registry.npmjs.org/@polkadot/util-crypto/-/util-crypto-2.9.1.tgz", - "integrity": "sha512-agPZyW1XJH0vpbwLh3khZ5txBMSjWtyflmpTJeYSVinrDqs4EFkcN3IOVqQEL+SEpLPXUHxNXYNQM7Ls7poZ6Q==", + "version": "2.13.1", + "resolved": "https://registry.npmjs.org/@polkadot/util-crypto/-/util-crypto-2.13.1.tgz", + "integrity": "sha512-AZZCwzW6EOql/KTKfDNgUUKpaGkKEk04cxMWdUzU52gmCLcGS8NXdl/YEs+R8JmQsF41q11gcSD/WzTFuv4ehQ==", "requires": { - "@babel/runtime": "^7.9.2", - "@polkadot/util": "2.9.1", + "@babel/runtime": "^7.10.2", + "@polkadot/util": "2.13.1", "@polkadot/wasm-crypto": "^1.2.1", "base-x": "^3.0.8", "bip39": "^3.0.2", "blakejs": "^1.1.0", - "bn.js": "^5.1.1", + "bn.js": "^5.1.2", "bs58": "^4.0.1", "elliptic": "^6.5.2", "js-sha3": "^0.8.0", - "pbkdf2": "^3.0.17", + "pbkdf2": "^3.1.1", "tweetnacl": "^1.0.3", "xxhashjs": "^0.2.2" } @@ -180,9 +180,9 @@ "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==" }, "@types/node": { - "version": "13.13.5", - "resolved": "https://registry.npmjs.org/@types/node/-/node-13.13.5.tgz", - "integrity": "sha512-3ySmiBYJPqgjiHA7oEaIo2Rzz0HrOZ7yrNO5HWyaE5q0lQ3BppDZ3N53Miz8bw2I7gh1/zir2MGVZBvpb1zq9g==" + "version": "14.0.13", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.0.13.tgz", + "integrity": "sha512-rouEWBImiRaSJsVA+ITTFM6ZxibuAlTuNOCyxVbwreu6k6+ujs7DfnU9o+PShFhET78pMBl3eH+AGSI5eOTkPA==" }, "ansi-styles": { "version": "4.2.1", @@ -243,9 +243,9 @@ "integrity": "sha1-ad+S75U6qIylGjLfarHFShVfx6U=" }, "bn.js": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.1.1.tgz", - "integrity": "sha512-IUTD/REb78Z2eodka1QZyyEk66pciRcP6Sroka0aI3tG/iwIdYLrBD62RsubR7vqdt3WyX8p4jxeatzmRSphtA==" + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.1.2.tgz", + "integrity": "sha512-40rZaf3bUNKTVYu9sIeeEGOg7g14Yvnj9kH7b50EiwX0Q7A6umbvfI5tvHaOERH0XigqKkfLkFQxzb4e6CIXnA==" }, "brorand": { "version": "1.1.0", @@ -271,9 +271,9 @@ "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" }, "chalk": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.0.0.tgz", - "integrity": "sha512-N9oWFcegS0sFr9oh1oz2d7Npos6vNoWW9HvtCg5N1KRFpUhaAhvTv5Y58g880fZaEYSNm3qDz8SU1UrGvp+n7A==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", "requires": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -368,9 +368,9 @@ }, "dependencies": { "bn.js": { - "version": "4.11.8", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", - "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==" + "version": "4.11.9", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" } } }, @@ -439,9 +439,9 @@ } }, "eventemitter3": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.0.tgz", - "integrity": "sha512-qerSRB0p+UDEssxTtm6EDKcE7W4OaoisfIMl4CngyEhjpYglocpNg6UEqCvemdGhosAsg4sO2dXJOdyBifPGCg==" + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.4.tgz", + "integrity": "sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ==" }, "ext": { "version": "1.4.0", @@ -650,9 +650,9 @@ "integrity": "sha512-HAKu/fG3HpHFO0AA8WE8q2g+gBJaZ9MG7fcKk+IJPLTGAD6Psw4443l+9DGRbOIh3/aXr7Phy0TjilYivJo5XQ==" }, "pbkdf2": { - "version": "3.0.17", - "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.17.tgz", - "integrity": "sha512-U/il5MsrZp7mGg3mSQfn742na2T+1/vHDCG5/iTI3X9MKUuYUZVLQhyRsg06mCgDBTd57TxzgZt7P+fYfjRLtA==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.1.tgz", + "integrity": "sha512-4Ejy1OPxi9f2tt1rRV7Go7zmfDQ+ZectEQz3VGUQhgq62HtIRPDyG/JtnwIxs6x3uNMwo2V7q1fMvKjb+Tnpqg==", "requires": { "create-hash": "^1.1.2", "create-hmac": "^1.1.4", @@ -803,9 +803,9 @@ } }, "safe-buffer": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz", - "integrity": "sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==" + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" }, "safer-buffer": { "version": "2.1.2", @@ -874,9 +874,9 @@ } }, "tslib": { - "version": "1.11.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.11.2.tgz", - "integrity": "sha512-tTSkux6IGPnUGUd1XAZHcpu85MOkIl5zX49pO+jfsie3eP0B6pyhOlLXm3cAC6T7s+euSDDUUV+Acop5WmtkVg==" + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.13.0.tgz", + "integrity": "sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q==" }, "tweetnacl": { "version": "1.0.3", diff --git a/package.json b/package.json index f8792ad6..9849cfc8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "polkastats-backend-v3", - "version": "3.0.0-milestone2.2", + "version": "3.0.0-milestone3", "description": "PolkaStats backend v3", "main": "index.js", "scripts": { @@ -31,7 +31,7 @@ }, "homepage": "https://github.com/Colm3na/polkastats-backend-v3#readme", "dependencies": { - "@polkadot/api": "^1.13.1", + "@polkadot/api": "^1.18.1", "axios": "^0.19.2", "bignumber.js": "^9.0.0", "dotenv": "^8.2.0",