diff --git a/package-lock.json b/package-lock.json index d1b1295..daac533 100644 --- a/package-lock.json +++ b/package-lock.json @@ -71,12 +71,6 @@ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", "dev": true - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true } } }, @@ -89,14 +83,6 @@ "@babel/types": "^7.15.6", "jsesc": "^2.5.1", "source-map": "^0.5.0" - }, - "dependencies": { - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - } } }, "@babel/helper-compilation-targets": { @@ -725,137 +711,6 @@ "@polkadot/util-crypto": "^7.9.1", "eventemitter3": "^4.0.7", "rxjs": "^7.4.0" - }, - "dependencies": { - "@babel/runtime": { - "version": "7.16.3", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.16.3.tgz", - "integrity": "sha512-WBwekcqacdY2e9AF/Q7WLFUWmdJGJTkbjqTjoMDgXkVZ3ZRUvOPsLb5KdwISoQVsbP+DQzVZW4Zhci0DvpbNTQ==", - "requires": { - "regenerator-runtime": "^0.13.4" - } - }, - "@polkadot/keyring": { - "version": "7.9.1", - "resolved": "https://registry.npmjs.org/@polkadot/keyring/-/keyring-7.9.1.tgz", - "integrity": "sha512-iIoNKkTAuIH6EbJg14ha9B3Bi55B3Bsoj9RiIR3aKZNh0+EcRLOlUR9b/SpXoKxqxJF8acScE5d7GVW6oEM7QQ==", - "requires": { - "@babel/runtime": "^7.16.3", - "@polkadot/util": "7.9.1", - "@polkadot/util-crypto": "7.9.1" - } - }, - "@polkadot/networks": { - "version": "7.9.1", - "resolved": "https://registry.npmjs.org/@polkadot/networks/-/networks-7.9.1.tgz", - "integrity": "sha512-fyxpCDSvwQTeJo6O+/NPK4WBBP69PFC7WkP6XgZx0su9JJYR4a3X1wKJ73PcpLR8VUQLtAihOs2cvKEHkRzctg==", - "requires": { - "@babel/runtime": "^7.16.3" - } - }, - "@polkadot/util": { - "version": "7.9.1", - "resolved": "https://registry.npmjs.org/@polkadot/util/-/util-7.9.1.tgz", - "integrity": "sha512-M4P1UFyUXdUYNMNALmsZg7LhwdQRvgPAJFWxCFjB3zIlANvePdTVJpknP22usD1LA3rbfYG6E3CnwrqkHdX5og==", - "requires": { - "@babel/runtime": "^7.16.3", - "@polkadot/x-textdecoder": "7.9.1", - "@polkadot/x-textencoder": "7.9.1", - "@types/bn.js": "^4.11.6", - "bn.js": "^4.12.0", - "camelcase": "^6.2.1", - "ip-regex": "^4.3.0" - } - }, - "@polkadot/util-crypto": { - "version": "7.9.1", - "resolved": "https://registry.npmjs.org/@polkadot/util-crypto/-/util-crypto-7.9.1.tgz", - "integrity": "sha512-K/ZbK8bAdniEptV1jkpqoNaWw8qvuoBjx4yuAPWOHQ4D3s3nT/6fXqwq3PFPyKjA8Ac0YZJ0bLve+SwnOD9RXA==", - "requires": { - "@babel/runtime": "^7.16.3", - "@polkadot/networks": "7.9.1", - "@polkadot/util": "7.9.1", - "@polkadot/wasm-crypto": "^4.3.1", - "@polkadot/x-randomvalues": "7.9.1", - "blakejs": "^1.1.1", - "bn.js": "^4.12.0", - "create-hash": "^1.2.0", - "ed2curve": "^0.3.0", - "elliptic": "^6.5.4", - "hash.js": "^1.1.7", - "js-sha3": "^0.8.0", - "micro-base": "^0.9.0", - "scryptsy": "^2.1.0", - "tweetnacl": "^1.0.3", - "xxhashjs": "^0.2.2" - } - }, - "@polkadot/wasm-crypto": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@polkadot/wasm-crypto/-/wasm-crypto-4.3.1.tgz", - "integrity": "sha512-O1YrOsv+B9JLtFDc3Immr2WPWVKHsxGxWjDO7qYDB7VyYP2hVVZ7Cc4NyCwZV/qsklIX7FLMRIcsS5XevL+8aQ==", - "requires": { - "@babel/runtime": "^7.16.3", - "@polkadot/wasm-crypto-asmjs": "^4.3.1", - "@polkadot/wasm-crypto-wasm": "^4.3.1" - } - }, - "@polkadot/wasm-crypto-asmjs": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@polkadot/wasm-crypto-asmjs/-/wasm-crypto-asmjs-4.3.1.tgz", - "integrity": "sha512-syU6ORwWcbyBYOEXS5/3arBFWTduYqpmJeFidg22e8ZbnzA50iiwB8pWN7Skhlyg22ymUAaST9y3DNAMBOmmfw==", - "requires": { - "@babel/runtime": "^7.16.3" - } - }, - "@polkadot/wasm-crypto-wasm": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@polkadot/wasm-crypto-wasm/-/wasm-crypto-wasm-4.3.1.tgz", - "integrity": "sha512-WTWUAQgKPk8B9f9zi34SXVhSuHUIVicCZT9Id8/Lov9kGw/9Tctcnjj1uUmXSNj9YsvIfSfh7sMopULuqRUIIw==", - "requires": { - "@babel/runtime": "^7.16.3" - } - }, - "@polkadot/x-global": { - "version": "7.9.1", - "resolved": "https://registry.npmjs.org/@polkadot/x-global/-/x-global-7.9.1.tgz", - "integrity": "sha512-lK6v8DQ6F50nzQzt4NZNgnJDFfXkaxexzDt3A4CvH6am3jkIeiQbNa1e9EFOj3sfy01Gt5t8N137QM506Rw4UQ==", - "requires": { - "@babel/runtime": "^7.16.3" - } - }, - "@polkadot/x-randomvalues": { - "version": "7.9.1", - "resolved": "https://registry.npmjs.org/@polkadot/x-randomvalues/-/x-randomvalues-7.9.1.tgz", - "integrity": "sha512-l9IRocWV7amOD4qt+PCLOUbDcxXfb9iA7b/biwrWbvnCw1yMcAJYpIpsveoksfH8BRNSnl+8FjyACaa/gFEJxA==", - "requires": { - "@babel/runtime": "^7.16.3", - "@polkadot/x-global": "7.9.1" - } - }, - "@polkadot/x-textdecoder": { - "version": "7.9.1", - "resolved": "https://registry.npmjs.org/@polkadot/x-textdecoder/-/x-textdecoder-7.9.1.tgz", - "integrity": "sha512-Pe9csqAXvVtEqoWjSjOCPvN2uKvo8WbbN1wQQWct0wEUc2OY05pBoI+sxOWoKNk4KMnkrKWReWKBnZKlgRUz0g==", - "requires": { - "@babel/runtime": "^7.16.3", - "@polkadot/x-global": "7.9.1" - } - }, - "@polkadot/x-textencoder": { - "version": "7.9.1", - "resolved": "https://registry.npmjs.org/@polkadot/x-textencoder/-/x-textencoder-7.9.1.tgz", - "integrity": "sha512-Zh+dP8eJ2+gSlaZdF5M2EUI+ucpCnGQFRCP0g8oqnBwdSr/1XQl861jDnggr9JlaHIgYuFpGR9aEI205y/vDtw==", - "requires": { - "@babel/runtime": "^7.16.3", - "@polkadot/x-global": "7.9.1" - } - }, - "camelcase": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.1.tgz", - "integrity": "sha512-tVI4q5jjFV5CavAU8DXfza/TJcZutVKo/5Foskmsqcm0MsL91moHvwiGNnqaa2o6PF/7yT5ikDRcVcl8Rj6LCA==" - } } }, "@polkadot/api-derive": { @@ -870,127 +725,6 @@ "@polkadot/util": "^7.9.1", "@polkadot/util-crypto": "^7.9.1", "rxjs": "^7.4.0" - }, - "dependencies": { - "@babel/runtime": { - "version": "7.16.3", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.16.3.tgz", - "integrity": "sha512-WBwekcqacdY2e9AF/Q7WLFUWmdJGJTkbjqTjoMDgXkVZ3ZRUvOPsLb5KdwISoQVsbP+DQzVZW4Zhci0DvpbNTQ==", - "requires": { - "regenerator-runtime": "^0.13.4" - } - }, - "@polkadot/networks": { - "version": "7.9.1", - "resolved": "https://registry.npmjs.org/@polkadot/networks/-/networks-7.9.1.tgz", - "integrity": "sha512-fyxpCDSvwQTeJo6O+/NPK4WBBP69PFC7WkP6XgZx0su9JJYR4a3X1wKJ73PcpLR8VUQLtAihOs2cvKEHkRzctg==", - "requires": { - "@babel/runtime": "^7.16.3" - } - }, - "@polkadot/util": { - "version": "7.9.1", - "resolved": "https://registry.npmjs.org/@polkadot/util/-/util-7.9.1.tgz", - "integrity": "sha512-M4P1UFyUXdUYNMNALmsZg7LhwdQRvgPAJFWxCFjB3zIlANvePdTVJpknP22usD1LA3rbfYG6E3CnwrqkHdX5og==", - "requires": { - "@babel/runtime": "^7.16.3", - "@polkadot/x-textdecoder": "7.9.1", - "@polkadot/x-textencoder": "7.9.1", - "@types/bn.js": "^4.11.6", - "bn.js": "^4.12.0", - "camelcase": "^6.2.1", - "ip-regex": "^4.3.0" - } - }, - "@polkadot/util-crypto": { - "version": "7.9.1", - "resolved": "https://registry.npmjs.org/@polkadot/util-crypto/-/util-crypto-7.9.1.tgz", - "integrity": "sha512-K/ZbK8bAdniEptV1jkpqoNaWw8qvuoBjx4yuAPWOHQ4D3s3nT/6fXqwq3PFPyKjA8Ac0YZJ0bLve+SwnOD9RXA==", - "requires": { - "@babel/runtime": "^7.16.3", - "@polkadot/networks": "7.9.1", - "@polkadot/util": "7.9.1", - "@polkadot/wasm-crypto": "^4.3.1", - "@polkadot/x-randomvalues": "7.9.1", - "blakejs": "^1.1.1", - "bn.js": "^4.12.0", - "create-hash": "^1.2.0", - "ed2curve": "^0.3.0", - "elliptic": "^6.5.4", - "hash.js": "^1.1.7", - "js-sha3": "^0.8.0", - "micro-base": "^0.9.0", - "scryptsy": "^2.1.0", - "tweetnacl": "^1.0.3", - "xxhashjs": "^0.2.2" - } - }, - "@polkadot/wasm-crypto": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@polkadot/wasm-crypto/-/wasm-crypto-4.3.1.tgz", - "integrity": "sha512-O1YrOsv+B9JLtFDc3Immr2WPWVKHsxGxWjDO7qYDB7VyYP2hVVZ7Cc4NyCwZV/qsklIX7FLMRIcsS5XevL+8aQ==", - "requires": { - "@babel/runtime": "^7.16.3", - "@polkadot/wasm-crypto-asmjs": "^4.3.1", - "@polkadot/wasm-crypto-wasm": "^4.3.1" - } - }, - "@polkadot/wasm-crypto-asmjs": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@polkadot/wasm-crypto-asmjs/-/wasm-crypto-asmjs-4.3.1.tgz", - "integrity": "sha512-syU6ORwWcbyBYOEXS5/3arBFWTduYqpmJeFidg22e8ZbnzA50iiwB8pWN7Skhlyg22ymUAaST9y3DNAMBOmmfw==", - "requires": { - "@babel/runtime": "^7.16.3" - } - }, - "@polkadot/wasm-crypto-wasm": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@polkadot/wasm-crypto-wasm/-/wasm-crypto-wasm-4.3.1.tgz", - "integrity": "sha512-WTWUAQgKPk8B9f9zi34SXVhSuHUIVicCZT9Id8/Lov9kGw/9Tctcnjj1uUmXSNj9YsvIfSfh7sMopULuqRUIIw==", - "requires": { - "@babel/runtime": "^7.16.3" - } - }, - "@polkadot/x-global": { - "version": "7.9.1", - "resolved": "https://registry.npmjs.org/@polkadot/x-global/-/x-global-7.9.1.tgz", - "integrity": "sha512-lK6v8DQ6F50nzQzt4NZNgnJDFfXkaxexzDt3A4CvH6am3jkIeiQbNa1e9EFOj3sfy01Gt5t8N137QM506Rw4UQ==", - "requires": { - "@babel/runtime": "^7.16.3" - } - }, - "@polkadot/x-randomvalues": { - "version": "7.9.1", - "resolved": "https://registry.npmjs.org/@polkadot/x-randomvalues/-/x-randomvalues-7.9.1.tgz", - "integrity": "sha512-l9IRocWV7amOD4qt+PCLOUbDcxXfb9iA7b/biwrWbvnCw1yMcAJYpIpsveoksfH8BRNSnl+8FjyACaa/gFEJxA==", - "requires": { - "@babel/runtime": "^7.16.3", - "@polkadot/x-global": "7.9.1" - } - }, - "@polkadot/x-textdecoder": { - "version": "7.9.1", - "resolved": "https://registry.npmjs.org/@polkadot/x-textdecoder/-/x-textdecoder-7.9.1.tgz", - "integrity": "sha512-Pe9csqAXvVtEqoWjSjOCPvN2uKvo8WbbN1wQQWct0wEUc2OY05pBoI+sxOWoKNk4KMnkrKWReWKBnZKlgRUz0g==", - "requires": { - "@babel/runtime": "^7.16.3", - "@polkadot/x-global": "7.9.1" - } - }, - "@polkadot/x-textencoder": { - "version": "7.9.1", - "resolved": "https://registry.npmjs.org/@polkadot/x-textencoder/-/x-textencoder-7.9.1.tgz", - "integrity": "sha512-Zh+dP8eJ2+gSlaZdF5M2EUI+ucpCnGQFRCP0g8oqnBwdSr/1XQl861jDnggr9JlaHIgYuFpGR9aEI205y/vDtw==", - "requires": { - "@babel/runtime": "^7.16.3", - "@polkadot/x-global": "7.9.1" - } - }, - "camelcase": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.1.tgz", - "integrity": "sha512-tVI4q5jjFV5CavAU8DXfza/TJcZutVKo/5Foskmsqcm0MsL91moHvwiGNnqaa2o6PF/7yT5ikDRcVcl8Rj6LCA==" - } } }, "@polkadot/keyring": { @@ -1021,61 +755,6 @@ "@polkadot/types": "6.9.1", "@polkadot/util": "^7.9.1", "rxjs": "^7.4.0" - }, - "dependencies": { - "@babel/runtime": { - "version": "7.16.3", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.16.3.tgz", - "integrity": "sha512-WBwekcqacdY2e9AF/Q7WLFUWmdJGJTkbjqTjoMDgXkVZ3ZRUvOPsLb5KdwISoQVsbP+DQzVZW4Zhci0DvpbNTQ==", - "requires": { - "regenerator-runtime": "^0.13.4" - } - }, - "@polkadot/util": { - "version": "7.9.1", - "resolved": "https://registry.npmjs.org/@polkadot/util/-/util-7.9.1.tgz", - "integrity": "sha512-M4P1UFyUXdUYNMNALmsZg7LhwdQRvgPAJFWxCFjB3zIlANvePdTVJpknP22usD1LA3rbfYG6E3CnwrqkHdX5og==", - "requires": { - "@babel/runtime": "^7.16.3", - "@polkadot/x-textdecoder": "7.9.1", - "@polkadot/x-textencoder": "7.9.1", - "@types/bn.js": "^4.11.6", - "bn.js": "^4.12.0", - "camelcase": "^6.2.1", - "ip-regex": "^4.3.0" - } - }, - "@polkadot/x-global": { - "version": "7.9.1", - "resolved": "https://registry.npmjs.org/@polkadot/x-global/-/x-global-7.9.1.tgz", - "integrity": "sha512-lK6v8DQ6F50nzQzt4NZNgnJDFfXkaxexzDt3A4CvH6am3jkIeiQbNa1e9EFOj3sfy01Gt5t8N137QM506Rw4UQ==", - "requires": { - "@babel/runtime": "^7.16.3" - } - }, - "@polkadot/x-textdecoder": { - "version": "7.9.1", - "resolved": "https://registry.npmjs.org/@polkadot/x-textdecoder/-/x-textdecoder-7.9.1.tgz", - "integrity": "sha512-Pe9csqAXvVtEqoWjSjOCPvN2uKvo8WbbN1wQQWct0wEUc2OY05pBoI+sxOWoKNk4KMnkrKWReWKBnZKlgRUz0g==", - "requires": { - "@babel/runtime": "^7.16.3", - "@polkadot/x-global": "7.9.1" - } - }, - "@polkadot/x-textencoder": { - "version": "7.9.1", - "resolved": "https://registry.npmjs.org/@polkadot/x-textencoder/-/x-textencoder-7.9.1.tgz", - "integrity": "sha512-Zh+dP8eJ2+gSlaZdF5M2EUI+ucpCnGQFRCP0g8oqnBwdSr/1XQl861jDnggr9JlaHIgYuFpGR9aEI205y/vDtw==", - "requires": { - "@babel/runtime": "^7.16.3", - "@polkadot/x-global": "7.9.1" - } - }, - "camelcase": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.1.tgz", - "integrity": "sha512-tVI4q5jjFV5CavAU8DXfza/TJcZutVKo/5Foskmsqcm0MsL91moHvwiGNnqaa2o6PF/7yT5ikDRcVcl8Rj6LCA==" - } } }, "@polkadot/rpc-provider": { @@ -1091,127 +770,6 @@ "@polkadot/x-global": "^7.9.1", "@polkadot/x-ws": "^7.9.1", "eventemitter3": "^4.0.7" - }, - "dependencies": { - "@babel/runtime": { - "version": "7.16.3", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.16.3.tgz", - "integrity": "sha512-WBwekcqacdY2e9AF/Q7WLFUWmdJGJTkbjqTjoMDgXkVZ3ZRUvOPsLb5KdwISoQVsbP+DQzVZW4Zhci0DvpbNTQ==", - "requires": { - "regenerator-runtime": "^0.13.4" - } - }, - "@polkadot/networks": { - "version": "7.9.1", - "resolved": "https://registry.npmjs.org/@polkadot/networks/-/networks-7.9.1.tgz", - "integrity": "sha512-fyxpCDSvwQTeJo6O+/NPK4WBBP69PFC7WkP6XgZx0su9JJYR4a3X1wKJ73PcpLR8VUQLtAihOs2cvKEHkRzctg==", - "requires": { - "@babel/runtime": "^7.16.3" - } - }, - "@polkadot/util": { - "version": "7.9.1", - "resolved": "https://registry.npmjs.org/@polkadot/util/-/util-7.9.1.tgz", - "integrity": "sha512-M4P1UFyUXdUYNMNALmsZg7LhwdQRvgPAJFWxCFjB3zIlANvePdTVJpknP22usD1LA3rbfYG6E3CnwrqkHdX5og==", - "requires": { - "@babel/runtime": "^7.16.3", - "@polkadot/x-textdecoder": "7.9.1", - "@polkadot/x-textencoder": "7.9.1", - "@types/bn.js": "^4.11.6", - "bn.js": "^4.12.0", - "camelcase": "^6.2.1", - "ip-regex": "^4.3.0" - } - }, - "@polkadot/util-crypto": { - "version": "7.9.1", - "resolved": "https://registry.npmjs.org/@polkadot/util-crypto/-/util-crypto-7.9.1.tgz", - "integrity": "sha512-K/ZbK8bAdniEptV1jkpqoNaWw8qvuoBjx4yuAPWOHQ4D3s3nT/6fXqwq3PFPyKjA8Ac0YZJ0bLve+SwnOD9RXA==", - "requires": { - "@babel/runtime": "^7.16.3", - "@polkadot/networks": "7.9.1", - "@polkadot/util": "7.9.1", - "@polkadot/wasm-crypto": "^4.3.1", - "@polkadot/x-randomvalues": "7.9.1", - "blakejs": "^1.1.1", - "bn.js": "^4.12.0", - "create-hash": "^1.2.0", - "ed2curve": "^0.3.0", - "elliptic": "^6.5.4", - "hash.js": "^1.1.7", - "js-sha3": "^0.8.0", - "micro-base": "^0.9.0", - "scryptsy": "^2.1.0", - "tweetnacl": "^1.0.3", - "xxhashjs": "^0.2.2" - } - }, - "@polkadot/wasm-crypto": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@polkadot/wasm-crypto/-/wasm-crypto-4.3.1.tgz", - "integrity": "sha512-O1YrOsv+B9JLtFDc3Immr2WPWVKHsxGxWjDO7qYDB7VyYP2hVVZ7Cc4NyCwZV/qsklIX7FLMRIcsS5XevL+8aQ==", - "requires": { - "@babel/runtime": "^7.16.3", - "@polkadot/wasm-crypto-asmjs": "^4.3.1", - "@polkadot/wasm-crypto-wasm": "^4.3.1" - } - }, - "@polkadot/wasm-crypto-asmjs": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@polkadot/wasm-crypto-asmjs/-/wasm-crypto-asmjs-4.3.1.tgz", - "integrity": "sha512-syU6ORwWcbyBYOEXS5/3arBFWTduYqpmJeFidg22e8ZbnzA50iiwB8pWN7Skhlyg22ymUAaST9y3DNAMBOmmfw==", - "requires": { - "@babel/runtime": "^7.16.3" - } - }, - "@polkadot/wasm-crypto-wasm": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@polkadot/wasm-crypto-wasm/-/wasm-crypto-wasm-4.3.1.tgz", - "integrity": "sha512-WTWUAQgKPk8B9f9zi34SXVhSuHUIVicCZT9Id8/Lov9kGw/9Tctcnjj1uUmXSNj9YsvIfSfh7sMopULuqRUIIw==", - "requires": { - "@babel/runtime": "^7.16.3" - } - }, - "@polkadot/x-global": { - "version": "7.9.1", - "resolved": "https://registry.npmjs.org/@polkadot/x-global/-/x-global-7.9.1.tgz", - "integrity": "sha512-lK6v8DQ6F50nzQzt4NZNgnJDFfXkaxexzDt3A4CvH6am3jkIeiQbNa1e9EFOj3sfy01Gt5t8N137QM506Rw4UQ==", - "requires": { - "@babel/runtime": "^7.16.3" - } - }, - "@polkadot/x-randomvalues": { - "version": "7.9.1", - "resolved": "https://registry.npmjs.org/@polkadot/x-randomvalues/-/x-randomvalues-7.9.1.tgz", - "integrity": "sha512-l9IRocWV7amOD4qt+PCLOUbDcxXfb9iA7b/biwrWbvnCw1yMcAJYpIpsveoksfH8BRNSnl+8FjyACaa/gFEJxA==", - "requires": { - "@babel/runtime": "^7.16.3", - "@polkadot/x-global": "7.9.1" - } - }, - "@polkadot/x-textdecoder": { - "version": "7.9.1", - "resolved": "https://registry.npmjs.org/@polkadot/x-textdecoder/-/x-textdecoder-7.9.1.tgz", - "integrity": "sha512-Pe9csqAXvVtEqoWjSjOCPvN2uKvo8WbbN1wQQWct0wEUc2OY05pBoI+sxOWoKNk4KMnkrKWReWKBnZKlgRUz0g==", - "requires": { - "@babel/runtime": "^7.16.3", - "@polkadot/x-global": "7.9.1" - } - }, - "@polkadot/x-textencoder": { - "version": "7.9.1", - "resolved": "https://registry.npmjs.org/@polkadot/x-textencoder/-/x-textencoder-7.9.1.tgz", - "integrity": "sha512-Zh+dP8eJ2+gSlaZdF5M2EUI+ucpCnGQFRCP0g8oqnBwdSr/1XQl861jDnggr9JlaHIgYuFpGR9aEI205y/vDtw==", - "requires": { - "@babel/runtime": "^7.16.3", - "@polkadot/x-global": "7.9.1" - } - }, - "camelcase": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.1.tgz", - "integrity": "sha512-tVI4q5jjFV5CavAU8DXfza/TJcZutVKo/5Foskmsqcm0MsL91moHvwiGNnqaa2o6PF/7yT5ikDRcVcl8Rj6LCA==" - } } }, "@polkadot/types": { @@ -1223,127 +781,6 @@ "@polkadot/util": "^7.9.1", "@polkadot/util-crypto": "^7.9.1", "rxjs": "^7.4.0" - }, - "dependencies": { - "@babel/runtime": { - "version": "7.16.3", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.16.3.tgz", - "integrity": "sha512-WBwekcqacdY2e9AF/Q7WLFUWmdJGJTkbjqTjoMDgXkVZ3ZRUvOPsLb5KdwISoQVsbP+DQzVZW4Zhci0DvpbNTQ==", - "requires": { - "regenerator-runtime": "^0.13.4" - } - }, - "@polkadot/networks": { - "version": "7.9.1", - "resolved": "https://registry.npmjs.org/@polkadot/networks/-/networks-7.9.1.tgz", - "integrity": "sha512-fyxpCDSvwQTeJo6O+/NPK4WBBP69PFC7WkP6XgZx0su9JJYR4a3X1wKJ73PcpLR8VUQLtAihOs2cvKEHkRzctg==", - "requires": { - "@babel/runtime": "^7.16.3" - } - }, - "@polkadot/util": { - "version": "7.9.1", - "resolved": "https://registry.npmjs.org/@polkadot/util/-/util-7.9.1.tgz", - "integrity": "sha512-M4P1UFyUXdUYNMNALmsZg7LhwdQRvgPAJFWxCFjB3zIlANvePdTVJpknP22usD1LA3rbfYG6E3CnwrqkHdX5og==", - "requires": { - "@babel/runtime": "^7.16.3", - "@polkadot/x-textdecoder": "7.9.1", - "@polkadot/x-textencoder": "7.9.1", - "@types/bn.js": "^4.11.6", - "bn.js": "^4.12.0", - "camelcase": "^6.2.1", - "ip-regex": "^4.3.0" - } - }, - "@polkadot/util-crypto": { - "version": "7.9.1", - "resolved": "https://registry.npmjs.org/@polkadot/util-crypto/-/util-crypto-7.9.1.tgz", - "integrity": "sha512-K/ZbK8bAdniEptV1jkpqoNaWw8qvuoBjx4yuAPWOHQ4D3s3nT/6fXqwq3PFPyKjA8Ac0YZJ0bLve+SwnOD9RXA==", - "requires": { - "@babel/runtime": "^7.16.3", - "@polkadot/networks": "7.9.1", - "@polkadot/util": "7.9.1", - "@polkadot/wasm-crypto": "^4.3.1", - "@polkadot/x-randomvalues": "7.9.1", - "blakejs": "^1.1.1", - "bn.js": "^4.12.0", - "create-hash": "^1.2.0", - "ed2curve": "^0.3.0", - "elliptic": "^6.5.4", - "hash.js": "^1.1.7", - "js-sha3": "^0.8.0", - "micro-base": "^0.9.0", - "scryptsy": "^2.1.0", - "tweetnacl": "^1.0.3", - "xxhashjs": "^0.2.2" - } - }, - "@polkadot/wasm-crypto": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@polkadot/wasm-crypto/-/wasm-crypto-4.3.1.tgz", - "integrity": "sha512-O1YrOsv+B9JLtFDc3Immr2WPWVKHsxGxWjDO7qYDB7VyYP2hVVZ7Cc4NyCwZV/qsklIX7FLMRIcsS5XevL+8aQ==", - "requires": { - "@babel/runtime": "^7.16.3", - "@polkadot/wasm-crypto-asmjs": "^4.3.1", - "@polkadot/wasm-crypto-wasm": "^4.3.1" - } - }, - "@polkadot/wasm-crypto-asmjs": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@polkadot/wasm-crypto-asmjs/-/wasm-crypto-asmjs-4.3.1.tgz", - "integrity": "sha512-syU6ORwWcbyBYOEXS5/3arBFWTduYqpmJeFidg22e8ZbnzA50iiwB8pWN7Skhlyg22ymUAaST9y3DNAMBOmmfw==", - "requires": { - "@babel/runtime": "^7.16.3" - } - }, - "@polkadot/wasm-crypto-wasm": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@polkadot/wasm-crypto-wasm/-/wasm-crypto-wasm-4.3.1.tgz", - "integrity": "sha512-WTWUAQgKPk8B9f9zi34SXVhSuHUIVicCZT9Id8/Lov9kGw/9Tctcnjj1uUmXSNj9YsvIfSfh7sMopULuqRUIIw==", - "requires": { - "@babel/runtime": "^7.16.3" - } - }, - "@polkadot/x-global": { - "version": "7.9.1", - "resolved": "https://registry.npmjs.org/@polkadot/x-global/-/x-global-7.9.1.tgz", - "integrity": "sha512-lK6v8DQ6F50nzQzt4NZNgnJDFfXkaxexzDt3A4CvH6am3jkIeiQbNa1e9EFOj3sfy01Gt5t8N137QM506Rw4UQ==", - "requires": { - "@babel/runtime": "^7.16.3" - } - }, - "@polkadot/x-randomvalues": { - "version": "7.9.1", - "resolved": "https://registry.npmjs.org/@polkadot/x-randomvalues/-/x-randomvalues-7.9.1.tgz", - "integrity": "sha512-l9IRocWV7amOD4qt+PCLOUbDcxXfb9iA7b/biwrWbvnCw1yMcAJYpIpsveoksfH8BRNSnl+8FjyACaa/gFEJxA==", - "requires": { - "@babel/runtime": "^7.16.3", - "@polkadot/x-global": "7.9.1" - } - }, - "@polkadot/x-textdecoder": { - "version": "7.9.1", - "resolved": "https://registry.npmjs.org/@polkadot/x-textdecoder/-/x-textdecoder-7.9.1.tgz", - "integrity": "sha512-Pe9csqAXvVtEqoWjSjOCPvN2uKvo8WbbN1wQQWct0wEUc2OY05pBoI+sxOWoKNk4KMnkrKWReWKBnZKlgRUz0g==", - "requires": { - "@babel/runtime": "^7.16.3", - "@polkadot/x-global": "7.9.1" - } - }, - "@polkadot/x-textencoder": { - "version": "7.9.1", - "resolved": "https://registry.npmjs.org/@polkadot/x-textencoder/-/x-textencoder-7.9.1.tgz", - "integrity": "sha512-Zh+dP8eJ2+gSlaZdF5M2EUI+ucpCnGQFRCP0g8oqnBwdSr/1XQl861jDnggr9JlaHIgYuFpGR9aEI205y/vDtw==", - "requires": { - "@babel/runtime": "^7.16.3", - "@polkadot/x-global": "7.9.1" - } - }, - "camelcase": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.1.tgz", - "integrity": "sha512-tVI4q5jjFV5CavAU8DXfza/TJcZutVKo/5Foskmsqcm0MsL91moHvwiGNnqaa2o6PF/7yT5ikDRcVcl8Rj6LCA==" - } } }, "@polkadot/types-known": { @@ -1355,69 +792,6 @@ "@polkadot/networks": "^7.9.1", "@polkadot/types": "6.9.1", "@polkadot/util": "^7.9.1" - }, - "dependencies": { - "@babel/runtime": { - "version": "7.16.3", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.16.3.tgz", - "integrity": "sha512-WBwekcqacdY2e9AF/Q7WLFUWmdJGJTkbjqTjoMDgXkVZ3ZRUvOPsLb5KdwISoQVsbP+DQzVZW4Zhci0DvpbNTQ==", - "requires": { - "regenerator-runtime": "^0.13.4" - } - }, - "@polkadot/networks": { - "version": "7.9.1", - "resolved": "https://registry.npmjs.org/@polkadot/networks/-/networks-7.9.1.tgz", - "integrity": "sha512-fyxpCDSvwQTeJo6O+/NPK4WBBP69PFC7WkP6XgZx0su9JJYR4a3X1wKJ73PcpLR8VUQLtAihOs2cvKEHkRzctg==", - "requires": { - "@babel/runtime": "^7.16.3" - } - }, - "@polkadot/util": { - "version": "7.9.1", - "resolved": "https://registry.npmjs.org/@polkadot/util/-/util-7.9.1.tgz", - "integrity": "sha512-M4P1UFyUXdUYNMNALmsZg7LhwdQRvgPAJFWxCFjB3zIlANvePdTVJpknP22usD1LA3rbfYG6E3CnwrqkHdX5og==", - "requires": { - "@babel/runtime": "^7.16.3", - "@polkadot/x-textdecoder": "7.9.1", - "@polkadot/x-textencoder": "7.9.1", - "@types/bn.js": "^4.11.6", - "bn.js": "^4.12.0", - "camelcase": "^6.2.1", - "ip-regex": "^4.3.0" - } - }, - "@polkadot/x-global": { - "version": "7.9.1", - "resolved": "https://registry.npmjs.org/@polkadot/x-global/-/x-global-7.9.1.tgz", - "integrity": "sha512-lK6v8DQ6F50nzQzt4NZNgnJDFfXkaxexzDt3A4CvH6am3jkIeiQbNa1e9EFOj3sfy01Gt5t8N137QM506Rw4UQ==", - "requires": { - "@babel/runtime": "^7.16.3" - } - }, - "@polkadot/x-textdecoder": { - "version": "7.9.1", - "resolved": "https://registry.npmjs.org/@polkadot/x-textdecoder/-/x-textdecoder-7.9.1.tgz", - "integrity": "sha512-Pe9csqAXvVtEqoWjSjOCPvN2uKvo8WbbN1wQQWct0wEUc2OY05pBoI+sxOWoKNk4KMnkrKWReWKBnZKlgRUz0g==", - "requires": { - "@babel/runtime": "^7.16.3", - "@polkadot/x-global": "7.9.1" - } - }, - "@polkadot/x-textencoder": { - "version": "7.9.1", - "resolved": "https://registry.npmjs.org/@polkadot/x-textencoder/-/x-textencoder-7.9.1.tgz", - "integrity": "sha512-Zh+dP8eJ2+gSlaZdF5M2EUI+ucpCnGQFRCP0g8oqnBwdSr/1XQl861jDnggr9JlaHIgYuFpGR9aEI205y/vDtw==", - "requires": { - "@babel/runtime": "^7.16.3", - "@polkadot/x-global": "7.9.1" - } - }, - "camelcase": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.1.tgz", - "integrity": "sha512-tVI4q5jjFV5CavAU8DXfza/TJcZutVKo/5Foskmsqcm0MsL91moHvwiGNnqaa2o6PF/7yT5ikDRcVcl8Rj6LCA==" - } } }, "@polkadot/util": { @@ -1492,24 +866,6 @@ "@polkadot/x-global": "7.9.1", "@types/node-fetch": "^2.5.12", "node-fetch": "^2.6.6" - }, - "dependencies": { - "@babel/runtime": { - "version": "7.16.3", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.16.3.tgz", - "integrity": "sha512-WBwekcqacdY2e9AF/Q7WLFUWmdJGJTkbjqTjoMDgXkVZ3ZRUvOPsLb5KdwISoQVsbP+DQzVZW4Zhci0DvpbNTQ==", - "requires": { - "regenerator-runtime": "^0.13.4" - } - }, - "@polkadot/x-global": { - "version": "7.9.1", - "resolved": "https://registry.npmjs.org/@polkadot/x-global/-/x-global-7.9.1.tgz", - "integrity": "sha512-lK6v8DQ6F50nzQzt4NZNgnJDFfXkaxexzDt3A4CvH6am3jkIeiQbNa1e9EFOj3sfy01Gt5t8N137QM506Rw4UQ==", - "requires": { - "@babel/runtime": "^7.16.3" - } - } } }, "@polkadot/x-global": { @@ -1556,24 +912,6 @@ "@polkadot/x-global": "7.9.1", "@types/websocket": "^1.0.4", "websocket": "^1.0.34" - }, - "dependencies": { - "@babel/runtime": { - "version": "7.16.3", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.16.3.tgz", - "integrity": "sha512-WBwekcqacdY2e9AF/Q7WLFUWmdJGJTkbjqTjoMDgXkVZ3ZRUvOPsLb5KdwISoQVsbP+DQzVZW4Zhci0DvpbNTQ==", - "requires": { - "regenerator-runtime": "^0.13.4" - } - }, - "@polkadot/x-global": { - "version": "7.9.1", - "resolved": "https://registry.npmjs.org/@polkadot/x-global/-/x-global-7.9.1.tgz", - "integrity": "sha512-lK6v8DQ6F50nzQzt4NZNgnJDFfXkaxexzDt3A4CvH6am3jkIeiQbNa1e9EFOj3sfy01Gt5t8N137QM506Rw4UQ==", - "requires": { - "@babel/runtime": "^7.16.3" - } - } } }, "@rollup/plugin-commonjs": { @@ -2710,30 +2048,8 @@ "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.13.8.tgz", "integrity": "sha512-A4af7G7YZLfG5OnARJRMtlpEsCkq/zHZQXewgPA864l9D6VjjbH1SuFYK/OSV6BtHwDGkdwyRrX0qQFLnMfUcw==", "requires": { - "esbuild-android-arm64": "0.13.8", - "esbuild-darwin-64": "0.13.8", - "esbuild-darwin-arm64": "0.13.8", - "esbuild-freebsd-64": "0.13.8", - "esbuild-freebsd-arm64": "0.13.8", - "esbuild-linux-32": "0.13.8", - "esbuild-linux-64": "0.13.8", - "esbuild-linux-arm": "0.13.8", - "esbuild-linux-arm64": "0.13.8", - "esbuild-linux-mips64le": "0.13.8", - "esbuild-linux-ppc64le": "0.13.8", - "esbuild-netbsd-64": "0.13.8", - "esbuild-openbsd-64": "0.13.8", - "esbuild-sunos-64": "0.13.8", - "esbuild-windows-32": "0.13.8", - "esbuild-windows-64": "0.13.8", - "esbuild-windows-arm64": "0.13.8" - } - }, - "esbuild-android-arm64": { - "version": "0.13.8", - "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.13.8.tgz", - "integrity": "sha512-AilbChndywpk7CdKkNSZ9klxl+9MboLctXd9LwLo3b0dawmOF/i/t2U5d8LM6SbT1Xw36F8yngSUPrd8yPs2RA==", - "optional": true + "esbuild-darwin-64": "0.13.8" + } }, "esbuild-darwin-64": { "version": "0.13.8", @@ -2741,96 +2057,6 @@ "integrity": "sha512-b6sdiT84zV5LVaoF+UoMVGJzR/iE2vNUfUDfFQGrm4LBwM/PWXweKpuu6RD9mcyCq18cLxkP6w/LD/w9DtX3ng==", "optional": true }, - "esbuild-darwin-arm64": { - "version": "0.13.8", - "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.13.8.tgz", - "integrity": "sha512-R8YuPiiJayuJJRUBG4H0VwkEKo6AvhJs2m7Tl0JaIer3u1FHHXwGhMxjJDmK+kXwTFPriSysPvcobXC/UrrZCQ==", - "optional": true - }, - "esbuild-freebsd-64": { - "version": "0.13.8", - "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.13.8.tgz", - "integrity": "sha512-zBn6urrn8FnKC+YSgDxdof9jhPCeU8kR/qaamlV4gI8R3KUaUK162WYM7UyFVAlj9N0MyD3AtB+hltzu4cysTw==", - "optional": true - }, - "esbuild-freebsd-arm64": { - "version": "0.13.8", - "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.13.8.tgz", - "integrity": "sha512-pWW2slN7lGlkx0MOEBoUGwRX5UgSCLq3dy2c8RIOpiHtA87xAUpDBvZK10MykbT+aMfXc0NI2lu1X+6kI34xng==", - "optional": true - }, - "esbuild-linux-32": { - "version": "0.13.8", - "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.13.8.tgz", - "integrity": "sha512-T0I0ueeKVO/Is0CAeSEOG9s2jeNNb8jrrMwG9QBIm3UU18MRB60ERgkS2uV3fZ1vP2F8i3Z2e3Zju4lg9dhVmw==", - "optional": true - }, - "esbuild-linux-64": { - "version": "0.13.8", - "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.13.8.tgz", - "integrity": "sha512-Bm8SYmFtvfDCIu9sjKppFXzRXn2BVpuCinU1ChTuMtdKI/7aPpXIrkqBNOgPTOQO9AylJJc1Zw6EvtKORhn64w==", - "optional": true - }, - "esbuild-linux-arm": { - "version": "0.13.8", - "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.13.8.tgz", - "integrity": "sha512-4/HfcC40LJ4GPyboHA+db0jpFarTB628D1ifU+/5bunIgY+t6mHkJWyxWxAAE8wl/ZIuRYB9RJFdYpu1AXGPdg==", - "optional": true - }, - "esbuild-linux-arm64": { - "version": "0.13.8", - "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.13.8.tgz", - "integrity": "sha512-X4pWZ+SL+FJ09chWFgRNO3F+YtvAQRcWh0uxKqZSWKiWodAB20flsW/OWFYLXBKiVCTeoGMvENZS/GeVac7+tQ==", - "optional": true - }, - "esbuild-linux-mips64le": { - "version": "0.13.8", - "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.13.8.tgz", - "integrity": "sha512-o7e0D+sqHKT31v+mwFircJFjwSKVd2nbkHEn4l9xQ1hLR+Bv8rnt3HqlblY3+sBdlrOTGSwz0ReROlKUMJyldA==", - "optional": true - }, - "esbuild-linux-ppc64le": { - "version": "0.13.8", - "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.13.8.tgz", - "integrity": "sha512-eZSQ0ERsWkukJp2px/UWJHVNuy0lMoz/HZcRWAbB6reoaBw7S9vMzYNUnflfL3XA6WDs+dZn3ekHE4Y2uWLGig==", - "optional": true - }, - "esbuild-netbsd-64": { - "version": "0.13.8", - "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.13.8.tgz", - "integrity": "sha512-gZX4kP7gVvOrvX0ZwgHmbuHczQUwqYppxqtoyC7VNd80t5nBHOFXVhWo2Ad/Lms0E8b+wwgI/WjZFTCpUHOg9Q==", - "optional": true - }, - "esbuild-openbsd-64": { - "version": "0.13.8", - "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.13.8.tgz", - "integrity": "sha512-afzza308X4WmcebexbTzAgfEWt9MUkdTvwIa8xOu4CM2qGbl2LanqEl8/LUs8jh6Gqw6WsicEK52GPrS9wvkcw==", - "optional": true - }, - "esbuild-sunos-64": { - "version": "0.13.8", - "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.13.8.tgz", - "integrity": "sha512-mWPZibmBbuMKD+LDN23LGcOZ2EawMYBONMXXHmbuxeT0XxCNwadbCVwUQ/2p5Dp5Kvf6mhrlIffcnWOiCBpiVw==", - "optional": true - }, - "esbuild-windows-32": { - "version": "0.13.8", - "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.13.8.tgz", - "integrity": "sha512-QsZ1HnWIcnIEApETZWw8HlOhDSWqdZX2SylU7IzGxOYyVcX7QI06ety/aDcn437mwyO7Ph4RrbhB+2ntM8kX8A==", - "optional": true - }, - "esbuild-windows-64": { - "version": "0.13.8", - "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.13.8.tgz", - "integrity": "sha512-76Fb57B9eE/JmJi1QmUW0tRLQZfGo0it+JeYoCDTSlbTn7LV44ecOHIMJSSgZADUtRMWT9z0Kz186bnaB3amSg==", - "optional": true - }, - "esbuild-windows-arm64": { - "version": "0.13.8", - "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.13.8.tgz", - "integrity": "sha512-HW6Mtq5eTudllxY2YgT62MrVcn7oq2o8TAoAvDUhyiEmRmDY8tPwAhb1vxw5/cdkbukM3KdMYtksnUhF/ekWeg==", - "optional": true - }, "escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", @@ -5036,6 +4262,12 @@ } } }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, "sourcemap-codec": { "version": "1.4.8", "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", diff --git a/src/tools/block-fees.ts b/src/tools/block-fees.ts old mode 100644 new mode 100755 index bceac24..0c5e3af --- a/src/tools/block-fees.ts +++ b/src/tools/block-fees.ts @@ -5,6 +5,9 @@ import { DispatchInfo } from "@polkadot/types/interfaces"; import { exploreBlockRange, getApiFor, NETWORK_YARGS_OPTIONS } from ".."; +const WEIGHT_PER_GAS=1_000_000_000_000n / 40_000_000n + + const argv = yargs(process.argv.slice(2)) .usage("Usage: $0") .version("1.0.0") @@ -35,8 +38,10 @@ const printMOVRs = (value: bigint, decimals = 4) => { }; const main = async () => { + // Instantiate Api const api = await getApiFor(argv); + // Set to and from block numbers const toBlockNumber = argv.to || (await api.rpc.chain.getBlock()).block.header.number.toNumber(); const fromBlockNumber = argv.from || toBlockNumber; @@ -45,9 +50,16 @@ const main = async () => { let sumBlockBurnt = 0n; let blockCount = 0; + // Get from block hash and totalSupply const fromPreBlockHash = (await api.rpc.chain.getBlockHash(fromBlockNumber - 1)).toString(); const fromPreSupply = await (await api.at(fromPreBlockHash)).query.balances.totalIssuance(); - let previusBlockHash = fromPreBlockHash; + let previousBlockHash = fromPreBlockHash; + + // Get to block hash and totalSupply + const toBlockHash = (await api.rpc.chain.getBlockHash(toBlockNumber)).toString(); + const toSupply = await (await api.at(toBlockHash)).query.balances.totalIssuance(); + + // fetch block information for all blocks in the range await exploreBlockRange( api, { from: fromBlockNumber, to: toBlockNumber, concurrency: 5 }, @@ -56,6 +68,7 @@ const main = async () => { let blockFees = 0n; let blockBurnt = 0n; + // iterate over every extrinsic for (const { events, extrinsic, fee } of blockDetails.txWithEvents) { // This hash will only exist if the transaction was executed through ethereum. let ethereumAddress = ""; @@ -71,6 +84,8 @@ const main = async () => { let txFees = 0n; let txBurnt = 0n; + + // For every extrinsic, iterate over every event and search for ExtrinsicSuccess or ExtrinsicFailed for (const event of events) { if ( event.section == "system" && @@ -80,16 +95,22 @@ const main = async () => { event.method == "ExtrinsicSuccess" ? (event.data[0] as DispatchInfo) : (event.data[1] as DispatchInfo); + + // We are only interested in fee paying extrinsics: + // Either ethereum transactions or signed extrinsics with fees (substrate tx) if ( dispatchInfo.paysFee.isYes && (!extrinsic.signer.isEmpty || extrinsic.method.section == "ethereum") ) { if (extrinsic.method.section == "ethereum") { + // For Ethereum tx we caluculate fee by first converting weight to gas + const gasFee=dispatchInfo.weight.toBigInt() / WEIGHT_PER_GAS; + // And then multiplying by gasPrice txFees = - (dispatchInfo.weight.toBigInt() * - (extrinsic.method.args[0] as any).gasPrice.toBigInt()) / - 25000n; + (gasFee * + (extrinsic.method.args[0] as any).gasPrice.toBigInt()) } else { + // For a regular substrate tx, we use the partialFee txFees = fee.partialFee.toBigInt(); } txBurnt += (txFees * 80n) / 100n; // 20% goes to treasury @@ -101,13 +122,15 @@ const main = async () => { ? ethereumAddress : extrinsic.signer.toString(); + // Get balance of the origin account both before and after extrinsic execution const fromBalance = await ( - await api.at(previusBlockHash) + await api.at(previousBlockHash) ).query.system.account(origin); const toBalance = await ( await api.at(blockDetails.block.hash) ).query.system.account(origin); + // Verbose option will display tx fee and balance change for each extrinsic if (argv.verbose) { console.log( ` ${extrinsic.method.section == "ethereum" ? "[Eth]" : "[Sub]"}${ @@ -115,19 +138,25 @@ const main = async () => { }${origin.toString()}: ${txFees.toString().padStart(19, " ")} (${printMOVRs( txFees, 5 - )})} (Balance: ${(toBalance.data.free.toBigInt() - fromBalance.data.free.toBigInt()).toString().padStart(20, " ")})` + )} MOVR) (Balance diff: ${(toBalance.data.free.toBigInt() - fromBalance.data.free.toBigInt()).toString().padStart(20, " ")})(${printMOVRs( + (toBalance.data.free.toBigInt() - fromBalance.data.free.toBigInt()), + 5 + )} MOVR)` ); } } } } + // Then search for Deposit event from treasury // This is for bug detection when the fees are not matching the expected value for (const event of events) { if (event.section == "treasury" && event.method == "Deposit") { const deposit = (event.data[0] as any).toBigInt(); + // Compare deposit event amont to what should have been sent to deposit (if they don't match, which is not a desired behavior) if (txFees - txBurnt !== deposit) { - console.log(`treasury: ${(txFees - txBurnt).toString().padStart(30, " ")}`); - console.log(` deposit: ${deposit.toString().padStart(30, " ")}`); + console.log("Desposit Amount Discrepancy!") + console.log(`fees not burnt : ${(txFees - txBurnt).toString().padStart(30, " ")}`); + console.log(` deposit : ${deposit.toString().padStart(30, " ")}`); } } } @@ -137,9 +166,10 @@ const main = async () => { console.log( `#${blockDetails.block.header.number} Fees : ${printMOVRs(blockFees, 4)} MOVRs` ); - previusBlockHash = blockDetails.block.hash.toString(); + previousBlockHash = blockDetails.block.hash.toString(); } ); + // Print total and average for the block range console.log( `Total blocks : ${blockCount}, ${printMOVRs( sumBlockFees / BigInt(blockCount), @@ -147,16 +177,15 @@ const main = async () => { )}/block, ${printMOVRs(sumBlockFees, 4)} Total` ); - const toBlockHash = (await api.rpc.chain.getBlockHash(toBlockNumber)).toString(); - const toSupply = await (await api.at(toBlockHash)).query.balances.totalIssuance(); + // Log difference in supply, we should be equal to the burnt fees console.log( ` supply diff: ${(fromPreSupply.toBigInt() - toSupply.toBigInt()) .toString() .padStart(30, " ")}` ); - console.log(` burnt: ${sumBlockBurnt.toString().padStart(30, " ")}`); - console.log(` fees: ${sumBlockFees.toString().padStart(30, " ")}`); + console.log(` burnt fees : ${sumBlockBurnt.toString().padStart(30, " ")}`); + console.log(` total fees : ${sumBlockFees.toString().padStart(30, " ")}`); await api.disconnect(); }; diff --git a/src/utils/monitoring.ts b/src/utils/monitoring.ts index e6ff2f7..62f62e1 100644 --- a/src/utils/monitoring.ts +++ b/src/utils/monitoring.ts @@ -100,7 +100,8 @@ export interface BlockRangeOption { to: number; concurrency?: number; } -// Explore all blocks for the given range + +// Explore all blocks for the given range adn return block information for each one // fromBlockNumber and toBlockNumber included export const exploreBlockRange = async ( api: ApiPromise,