diff --git a/.eslintrc b/.eslintrc index e4b189d..f59b80a 100644 --- a/.eslintrc +++ b/.eslintrc @@ -57,6 +57,7 @@ "@typescript-eslint/naming-convention": "off", "@typescript-eslint/no-use-before-define": "off", "@typescript-eslint/no-throw-literal": "off", + "consistent-return": "off", "no-restricted-syntax": [ "error", "ForInStatement", diff --git a/bun.lock b/bun.lock index 8042060..b6272c5 100644 --- a/bun.lock +++ b/bun.lock @@ -46,7 +46,7 @@ "@storybook/test-runner": "^0.22.1", "@testing-library/jest-dom": "^6.6.3", "@testing-library/react": "^16.3.0", - "@types/jest": "^29.5.11", + "@types/jest": "^30.0.0", "@types/node": "^20", "@types/react": "19.1.1", "@types/react-dom": "19.1.1", @@ -411,14 +411,18 @@ "@jest/create-cache-key-function": ["@jest/create-cache-key-function@30.4.1", "", { "dependencies": { "@jest/types": "30.4.1" } }, "sha512-R+xGEtzA95NIsvpXJSROG4t01956dDOt17KpamguY4XOnGvdHNFFXE7Er0C1OAsRjOwiIxpKqOvGlznIGZIQlQ=="], + "@jest/diff-sequences": ["@jest/diff-sequences@30.4.0", "", {}, "sha512-zOpzlfUs45l6u7jm39qr87JCHUDsaeCtvL+kQe/Vn9jSnRB4/5IPXISm0h9I1vZW/o00Kn4UTJ2MOlhnUGwv3g=="], + "@jest/environment": ["@jest/environment@29.7.0", "", { "dependencies": { "@jest/fake-timers": "^29.7.0", "@jest/types": "^29.6.3", "@types/node": "*", "jest-mock": "^29.7.0" } }, "sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw=="], "@jest/expect": ["@jest/expect@29.7.0", "", { "dependencies": { "expect": "^29.7.0", "jest-snapshot": "^29.7.0" } }, "sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ=="], - "@jest/expect-utils": ["@jest/expect-utils@29.7.0", "", { "dependencies": { "jest-get-type": "^29.6.3" } }, "sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA=="], + "@jest/expect-utils": ["@jest/expect-utils@30.4.1", "", { "dependencies": { "@jest/get-type": "30.1.0" } }, "sha512-ZBn5CglH8fBsQsvs4VWNzD4aWfUYks+IdOOQU3MEK71ol/BcVm+P+rtb1KpiFBpSWSCE27uOahyyf1vfqOVbcQ=="], "@jest/fake-timers": ["@jest/fake-timers@29.7.0", "", { "dependencies": { "@jest/types": "^29.6.3", "@sinonjs/fake-timers": "^10.0.2", "@types/node": "*", "jest-message-util": "^29.7.0", "jest-mock": "^29.7.0", "jest-util": "^29.7.0" } }, "sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ=="], + "@jest/get-type": ["@jest/get-type@30.1.0", "", {}, "sha512-eMbZE2hUnx1WV0pmURZY9XoXPkUYjpc55mb0CrhtdWLtzMQPFvu/rZkTLZFTsdaVQa+Tr4eWAteqcUzoawq/uA=="], + "@jest/globals": ["@jest/globals@29.7.0", "", { "dependencies": { "@jest/environment": "^29.7.0", "@jest/expect": "^29.7.0", "@jest/types": "^29.6.3", "jest-mock": "^29.7.0" } }, "sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ=="], "@jest/pattern": ["@jest/pattern@30.4.0", "", { "dependencies": { "@types/node": "*", "jest-regex-util": "30.4.0" } }, "sha512-RAWn3+f9u8BsHijKJ71uHcFp6vmyEt6VvoWXkl6hKF3qVIuWNmudVjg12DlBPGup/frIl5UcUlH5HfEuvHpEXg=="], @@ -725,7 +729,7 @@ "@types/istanbul-reports": ["@types/istanbul-reports@3.0.4", "", { "dependencies": { "@types/istanbul-lib-report": "*" } }, "sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ=="], - "@types/jest": ["@types/jest@29.5.14", "", { "dependencies": { "expect": "^29.0.0", "pretty-format": "^29.0.0" } }, "sha512-ZN+4sdnLUbo8EVvVc2ao0GFW6oVrQRPn4K2lglySj7APvSrgzxHiNNK99us4WDMi57xxA2yggblIAMNhXOotLQ=="], + "@types/jest": ["@types/jest@30.0.0", "", { "dependencies": { "expect": "^30.0.0", "pretty-format": "^30.0.0" } }, "sha512-XTYugzhuwqWjws0CVz8QpM36+T+Dz5mTEBKhNs/esGLnCIlGdRy+Dq78NRjd7ls7r8BC8ZRMOrKlkO1hU0JOwA=="], "@types/js-yaml": ["@types/js-yaml@4.0.9", "", {}, "sha512-k4MGaQl5TGo/iipqb2UDG2UwjXziSWkh0uysQelTlJpX1qGlpUZYm8PnO4DxG1qBomtJUdYJ6qR6xdIah10JLg=="], @@ -1341,7 +1345,7 @@ "expand-tilde": ["expand-tilde@1.2.2", "", { "dependencies": { "os-homedir": "^1.0.1" } }, "sha512-rtmc+cjLZqnu9dSYosX9EWmSJhTwpACgJQTfj4hgg2JjOD/6SIQalZrt4a3aQeh++oNxkazcaxrhPUj6+g5G/Q=="], - "expect": ["expect@29.7.0", "", { "dependencies": { "@jest/expect-utils": "^29.7.0", "jest-get-type": "^29.6.3", "jest-matcher-utils": "^29.7.0", "jest-message-util": "^29.7.0", "jest-util": "^29.7.0" } }, "sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw=="], + "expect": ["expect@30.4.1", "", { "dependencies": { "@jest/expect-utils": "30.4.1", "@jest/get-type": "30.1.0", "jest-matcher-utils": "30.4.1", "jest-message-util": "30.4.1", "jest-mock": "30.4.1", "jest-util": "30.4.1" } }, "sha512-PMARsyh/JtqC20HoGqlFcIlQAyqUtW4PlI1rup1uhYJtKuwAjbvWi3GQMAn+STdHum/dk8xrKfUM1+5SAwpolA=="], "expect-playwright": ["expect-playwright@0.8.0", "", {}, "sha512-+kn8561vHAY+dt+0gMqqj1oY+g5xWrsuGMk4QGxotT2WS545nVqqjs37z6hrYfIuucwqthzwJfCJUEYqixyljg=="], @@ -2135,7 +2139,7 @@ "prettier-linter-helpers": ["prettier-linter-helpers@1.0.1", "", { "dependencies": { "fast-diff": "^1.1.2" } }, "sha512-SxToR7P8Y2lWmv/kTzVLC1t/GDI2WGjMwNhLLE9qtH8Q13C+aEmuRlzDst4Up4s0Wc8sF2M+J57iB3cMLqftfg=="], - "pretty-format": ["pretty-format@29.7.0", "", { "dependencies": { "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", "react-is": "^18.0.0" } }, "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ=="], + "pretty-format": ["pretty-format@30.4.1", "", { "dependencies": { "@jest/schemas": "30.4.1", "ansi-styles": "^5.2.0", "react-is-18": "npm:react-is@^18.3.1", "react-is-19": "npm:react-is@^19.2.5" } }, "sha512-K6KiKMHTL4jjX4u3Kir2EW07nRfcqVTXIImx50wbjHQTcZPgg+gjVeNTIT3l3L1Rd4UefxfogquC9J37SoFyyw=="], "process": ["process@0.11.10", "", {}, "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A=="], @@ -2183,7 +2187,11 @@ "react-dom": ["react-dom@19.1.1", "", { "dependencies": { "scheduler": "^0.26.0" }, "peerDependencies": { "react": "^19.1.1" } }, "sha512-Dlq/5LAZgF0Gaz6yiqZCf6VCcZs1ghAJyrsu84Q/GT0gV+mCxbfmKNoGRKBYMJ8IEdGPqu49YWXD02GCknEDkw=="], - "react-is": ["react-is@18.3.1", "", {}, "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg=="], + "react-is": ["react-is@16.13.1", "", {}, "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="], + + "react-is-18": ["react-is@18.3.1", "", {}, "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg=="], + + "react-is-19": ["react-is@19.2.8", "", {}, "sha512-s5un28nYxKJw5gvUHyW5PCC28CvBqLu9r3cWgzHT4Vo/5fqqkFcdRYsGcKf50WMPpjjFZS5d76fn3YCo2njKwQ=="], "react-refresh": ["react-refresh@0.17.0", "", {}, "sha512-z6F7K9bV85EfseRCp2bzrpyQ0Gkw1uLoCel9XBVWPg/TjRj94SkJzUTGfOa4bs7iJvBWtQG0Wq7wnI0syw3EBQ=="], @@ -2719,8 +2727,12 @@ "@istanbuljs/load-nyc-config/js-yaml": ["js-yaml@3.14.2", "", { "dependencies": { "argparse": "^1.0.7", "esprima": "^4.0.0" }, "bin": { "js-yaml": "bin/js-yaml.js" } }, "sha512-PMSmkqxr106Xa156c2M265Z+FTrPl+oxd/rgOQy2tijQeK5TxQ43psO1ZCwhVOSdnn+RzkzlRz/eY4BgJBYVpg=="], + "@jest/core/pretty-format": ["pretty-format@29.7.0", "", { "dependencies": { "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", "react-is": "^18.0.0" } }, "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ=="], + "@jest/create-cache-key-function/@jest/types": ["@jest/types@30.4.1", "", { "dependencies": { "@jest/pattern": "30.4.0", "@jest/schemas": "30.4.1", "@types/istanbul-lib-coverage": "^2.0.6", "@types/istanbul-reports": "^3.0.4", "@types/node": "*", "@types/yargs": "^17.0.33", "chalk": "^4.1.2" } }, "sha512-f1x/vJXIfjOlEmejYpbkbgw1gOqpPECwMvMEtBqe47j7H2Hg8h8w3o3ikhSXq3MI15kg+oQ0exWO0uCtTNJLoQ=="], + "@jest/expect/expect": ["expect@29.7.0", "", { "dependencies": { "@jest/expect-utils": "^29.7.0", "jest-get-type": "^29.6.3", "jest-matcher-utils": "^29.7.0", "jest-message-util": "^29.7.0", "jest-util": "^29.7.0" } }, "sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw=="], + "@jest/pattern/jest-regex-util": ["jest-regex-util@30.4.0", "", {}, "sha512-mWlvLviKIgIQ8VCuM1xRdD0TWp3zlzionlmDBjuXVBs+VkmXq6FgW9T4Emr7oGz/Rk6feDCGyiugolcQEyp3mg=="], "@jest/reporters/glob": ["glob@7.2.3", "", { "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", "minimatch": "^3.1.1", "once": "^1.3.0", "path-is-absolute": "^1.0.0" } }, "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q=="], @@ -2847,6 +2859,14 @@ "execa/signal-exit": ["signal-exit@4.1.0", "", {}, "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw=="], + "expect/jest-matcher-utils": ["jest-matcher-utils@30.4.1", "", { "dependencies": { "@jest/get-type": "30.1.0", "chalk": "^4.1.2", "jest-diff": "30.4.1", "pretty-format": "30.4.1" } }, "sha512-zvYfX5CaeEkFrrLS9suWe9rvJrm9J1Iv3ua8kIBv9GEPzcnsfBf0bob37la7s67fs0nlBC3EuvkOLnXQKxtx4A=="], + + "expect/jest-message-util": ["jest-message-util@30.4.1", "", { "dependencies": { "@babel/code-frame": "^7.27.1", "@jest/types": "30.4.1", "@types/stack-utils": "^2.0.3", "chalk": "^4.1.2", "graceful-fs": "^4.2.11", "jest-util": "30.4.1", "picomatch": "^4.0.3", "pretty-format": "30.4.1", "slash": "^3.0.0", "stack-utils": "^2.0.6" } }, "sha512-kwCKIvq0MCW1HzLoGola9Te6JUdzgV0loyKJ3Qghrkz9i5/RRIHsL95BMQc2HBBhlBKC4j22K9p11TGHH8RBpQ=="], + + "expect/jest-mock": ["jest-mock@30.4.1", "", { "dependencies": { "@jest/types": "30.4.1", "@types/node": "*", "jest-util": "30.4.1" } }, "sha512-/i8SVb8/NSB7RfNi8gfqu8gxLV23KaL5EpAttyb9iz8qWRIqXRLflycz/32wXsYkOnaUlx8NAKnJYtpsmXUmfw=="], + + "expect/jest-util": ["jest-util@30.4.1", "", { "dependencies": { "@jest/types": "30.4.1", "@types/node": "*", "chalk": "^4.1.2", "ci-info": "^4.2.0", "graceful-fs": "^4.2.11", "picomatch": "^4.0.3" } }, "sha512-vjQb1sACEiv13DKJMDToJpzVW0joCsIQrmbg0fi7CyOOt+g9jTuQl2A216pWRBYhOVt53XbL/2LbMKg1BECWOw=="], + "fast-glob/glob-parent": ["glob-parent@5.1.2", "", { "dependencies": { "is-glob": "^4.0.1" } }, "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow=="], "figures/escape-string-regexp": ["escape-string-regexp@1.0.5", "", {}, "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg=="], @@ -2879,8 +2899,6 @@ "hasha/type-fest": ["type-fest@0.8.1", "", {}, "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA=="], - "hoist-non-react-statics/react-is": ["react-is@16.13.1", "", {}, "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="], - "htmlparser2/entities": ["entities@1.1.2", "", {}, "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w=="], "import-fresh/resolve-from": ["resolve-from@4.0.0", "", {}, "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g=="], @@ -2895,18 +2913,40 @@ "jest-changed-files/execa": ["execa@5.1.1", "", { "dependencies": { "cross-spawn": "^7.0.3", "get-stream": "^6.0.0", "human-signals": "^2.1.0", "is-stream": "^2.0.0", "merge-stream": "^2.0.0", "npm-run-path": "^4.0.1", "onetime": "^5.1.2", "signal-exit": "^3.0.3", "strip-final-newline": "^2.0.0" } }, "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg=="], + "jest-circus/pretty-format": ["pretty-format@29.7.0", "", { "dependencies": { "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", "react-is": "^18.0.0" } }, "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ=="], + "jest-config/glob": ["glob@7.2.3", "", { "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", "minimatch": "^3.1.1", "once": "^1.3.0", "path-is-absolute": "^1.0.0" } }, "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q=="], + "jest-config/pretty-format": ["pretty-format@29.7.0", "", { "dependencies": { "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", "react-is": "^18.0.0" } }, "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ=="], + + "jest-diff/pretty-format": ["pretty-format@29.7.0", "", { "dependencies": { "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", "react-is": "^18.0.0" } }, "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ=="], + + "jest-each/pretty-format": ["pretty-format@29.7.0", "", { "dependencies": { "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", "react-is": "^18.0.0" } }, "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ=="], + + "jest-leak-detector/pretty-format": ["pretty-format@29.7.0", "", { "dependencies": { "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", "react-is": "^18.0.0" } }, "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ=="], + + "jest-matcher-utils/pretty-format": ["pretty-format@29.7.0", "", { "dependencies": { "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", "react-is": "^18.0.0" } }, "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ=="], + + "jest-message-util/pretty-format": ["pretty-format@29.7.0", "", { "dependencies": { "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", "react-is": "^18.0.0" } }, "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ=="], + "jest-process-manager/wait-on": ["wait-on@7.2.0", "", { "dependencies": { "axios": "^1.6.1", "joi": "^17.11.0", "lodash": "^4.17.21", "minimist": "^1.2.8", "rxjs": "^7.8.1" }, "bin": { "wait-on": "bin/wait-on" } }, "sha512-wCQcHkRazgjG5XoAq9jbTMLpNIjoSlZslrJ2+N9MxDsGEv1HnFoVjOCexL0ESva7Y9cu350j+DWADdk54s4AFQ=="], "jest-runtime/glob": ["glob@7.2.3", "", { "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", "minimatch": "^3.1.1", "once": "^1.3.0", "path-is-absolute": "^1.0.0" } }, "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q=="], "jest-runtime/strip-bom": ["strip-bom@4.0.0", "", {}, "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w=="], + "jest-snapshot/@jest/expect-utils": ["@jest/expect-utils@29.7.0", "", { "dependencies": { "jest-get-type": "^29.6.3" } }, "sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA=="], + + "jest-snapshot/expect": ["expect@29.7.0", "", { "dependencies": { "@jest/expect-utils": "^29.7.0", "jest-get-type": "^29.6.3", "jest-matcher-utils": "^29.7.0", "jest-message-util": "^29.7.0", "jest-util": "^29.7.0" } }, "sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw=="], + + "jest-snapshot/pretty-format": ["pretty-format@29.7.0", "", { "dependencies": { "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", "react-is": "^18.0.0" } }, "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ=="], + "jest-util/picomatch": ["picomatch@2.3.2", "", {}, "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA=="], "jest-validate/camelcase": ["camelcase@6.3.0", "", {}, "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA=="], + "jest-validate/pretty-format": ["pretty-format@29.7.0", "", { "dependencies": { "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", "react-is": "^18.0.0" } }, "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ=="], + "jest-watch-typeahead/ansi-escapes": ["ansi-escapes@6.2.1", "", {}, "sha512-4nJ3yixlEthEJ9Rk4vPcdBRkZvQZlYyu8j4/Mqz5sgIkddmEnH2Yj2ZrnP9S3tQOvSNRUIgVNF/1yPpRAGNRig=="], "jest-watch-typeahead/chalk": ["chalk@5.6.2", "", {}, "sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA=="], @@ -2993,9 +3033,9 @@ "postcss-unique-selectors/postcss-selector-parser": ["postcss-selector-parser@7.1.1", "", { "dependencies": { "cssesc": "^3.0.0", "util-deprecate": "^1.0.2" } }, "sha512-orRsuYpJVw8LdAwqqLykBj9ecS5/cRHlI5+nvTo8LcCKmzDmqVORXtOIYEEQuL9D4BxtA1lm5isAqzQZCoQ6Eg=="], - "pretty-format/ansi-styles": ["ansi-styles@5.2.0", "", {}, "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA=="], + "pretty-format/@jest/schemas": ["@jest/schemas@30.4.1", "", { "dependencies": { "@sinclair/typebox": "^0.34.0" } }, "sha512-i6b4qw5qnP8c5FEeBJg/uZQ4ddrkN6Ca8qISJh0pr7a5hfn3h3v5x60BEbOC7OYAGZNMs1LfFLwnW2CuK8F57Q=="], - "prop-types/react-is": ["react-is@16.13.1", "", {}, "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="], + "pretty-format/ansi-styles": ["ansi-styles@5.2.0", "", {}, "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA=="], "psl/punycode": ["punycode@2.3.1", "", {}, "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg=="], @@ -3089,8 +3129,14 @@ "@istanbuljs/load-nyc-config/js-yaml/argparse": ["argparse@1.0.10", "", { "dependencies": { "sprintf-js": "~1.0.2" } }, "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg=="], + "@jest/core/pretty-format/ansi-styles": ["ansi-styles@5.2.0", "", {}, "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA=="], + + "@jest/core/pretty-format/react-is": ["react-is@18.3.1", "", {}, "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg=="], + "@jest/create-cache-key-function/@jest/types/@jest/schemas": ["@jest/schemas@30.4.1", "", { "dependencies": { "@sinclair/typebox": "^0.34.0" } }, "sha512-i6b4qw5qnP8c5FEeBJg/uZQ4ddrkN6Ca8qISJh0pr7a5hfn3h3v5x60BEbOC7OYAGZNMs1LfFLwnW2CuK8F57Q=="], + "@jest/expect/expect/@jest/expect-utils": ["@jest/expect-utils@29.7.0", "", { "dependencies": { "jest-get-type": "^29.6.3" } }, "sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA=="], + "@jest/reporters/string-length/char-regex": ["char-regex@1.0.2", "", {}, "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw=="], "@testing-library/dom/pretty-format/ansi-styles": ["ansi-styles@5.2.0", "", {}, "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA=="], @@ -3151,6 +3197,16 @@ "eslint/find-up/path-exists": ["path-exists@4.0.0", "", {}, "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w=="], + "expect/jest-matcher-utils/jest-diff": ["jest-diff@30.4.1", "", { "dependencies": { "@jest/diff-sequences": "30.4.0", "@jest/get-type": "30.1.0", "chalk": "^4.1.2", "pretty-format": "30.4.1" } }, "sha512-CRpFK0RtLriVDGcPPAnR6HMVI8bSR2jnUIgralhauzYQZIb4RH9AtEInTuQr65LmmGggGcRT6HIASxwqsVsmlA=="], + + "expect/jest-message-util/@jest/types": ["@jest/types@30.4.1", "", { "dependencies": { "@jest/pattern": "30.4.0", "@jest/schemas": "30.4.1", "@types/istanbul-lib-coverage": "^2.0.6", "@types/istanbul-reports": "^3.0.4", "@types/node": "*", "@types/yargs": "^17.0.33", "chalk": "^4.1.2" } }, "sha512-f1x/vJXIfjOlEmejYpbkbgw1gOqpPECwMvMEtBqe47j7H2Hg8h8w3o3ikhSXq3MI15kg+oQ0exWO0uCtTNJLoQ=="], + + "expect/jest-mock/@jest/types": ["@jest/types@30.4.1", "", { "dependencies": { "@jest/pattern": "30.4.0", "@jest/schemas": "30.4.1", "@types/istanbul-lib-coverage": "^2.0.6", "@types/istanbul-reports": "^3.0.4", "@types/node": "*", "@types/yargs": "^17.0.33", "chalk": "^4.1.2" } }, "sha512-f1x/vJXIfjOlEmejYpbkbgw1gOqpPECwMvMEtBqe47j7H2Hg8h8w3o3ikhSXq3MI15kg+oQ0exWO0uCtTNJLoQ=="], + + "expect/jest-util/@jest/types": ["@jest/types@30.4.1", "", { "dependencies": { "@jest/pattern": "30.4.0", "@jest/schemas": "30.4.1", "@types/istanbul-lib-coverage": "^2.0.6", "@types/istanbul-reports": "^3.0.4", "@types/node": "*", "@types/yargs": "^17.0.33", "chalk": "^4.1.2" } }, "sha512-f1x/vJXIfjOlEmejYpbkbgw1gOqpPECwMvMEtBqe47j7H2Hg8h8w3o3ikhSXq3MI15kg+oQ0exWO0uCtTNJLoQ=="], + + "expect/jest-util/ci-info": ["ci-info@4.4.0", "", {}, "sha512-77PSwercCZU2Fc4sX94eF8k8Pxte6JAwL4/ICZLFjJLqegs7kCuAsqqj/70NQF6TvDpgFjkubQB2FW2ZZddvQg=="], + "glob/foreground-child/signal-exit": ["signal-exit@4.1.0", "", {}, "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw=="], "glob/minimatch/brace-expansion": ["brace-expansion@2.1.1", "", { "dependencies": { "balanced-match": "^1.0.0" } }, "sha512-WR1cURNjuvBLMZBMbqM0UoE+WAfdUcEV1ccD8PVBVOI+Z3ND4+SZbN8RsfT2bMuG1qwz5RFvPukSZm5fF2D5eA=="], @@ -3175,10 +3231,46 @@ "jest-changed-files/execa/strip-final-newline": ["strip-final-newline@2.0.0", "", {}, "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA=="], + "jest-circus/pretty-format/ansi-styles": ["ansi-styles@5.2.0", "", {}, "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA=="], + + "jest-circus/pretty-format/react-is": ["react-is@18.3.1", "", {}, "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg=="], + + "jest-config/pretty-format/ansi-styles": ["ansi-styles@5.2.0", "", {}, "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA=="], + + "jest-config/pretty-format/react-is": ["react-is@18.3.1", "", {}, "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg=="], + + "jest-diff/pretty-format/ansi-styles": ["ansi-styles@5.2.0", "", {}, "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA=="], + + "jest-diff/pretty-format/react-is": ["react-is@18.3.1", "", {}, "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg=="], + + "jest-each/pretty-format/ansi-styles": ["ansi-styles@5.2.0", "", {}, "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA=="], + + "jest-each/pretty-format/react-is": ["react-is@18.3.1", "", {}, "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg=="], + + "jest-leak-detector/pretty-format/ansi-styles": ["ansi-styles@5.2.0", "", {}, "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA=="], + + "jest-leak-detector/pretty-format/react-is": ["react-is@18.3.1", "", {}, "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg=="], + + "jest-matcher-utils/pretty-format/ansi-styles": ["ansi-styles@5.2.0", "", {}, "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA=="], + + "jest-matcher-utils/pretty-format/react-is": ["react-is@18.3.1", "", {}, "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg=="], + + "jest-message-util/pretty-format/ansi-styles": ["ansi-styles@5.2.0", "", {}, "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA=="], + + "jest-message-util/pretty-format/react-is": ["react-is@18.3.1", "", {}, "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg=="], + "jest-process-manager/wait-on/joi": ["joi@17.13.3", "", { "dependencies": { "@hapi/hoek": "^9.3.0", "@hapi/topo": "^5.1.0", "@sideway/address": "^4.1.5", "@sideway/formula": "^3.0.1", "@sideway/pinpoint": "^2.0.0" } }, "sha512-otDA4ldcIx+ZXsKHWmp0YizCweVRZG96J10b0FevjfuncLO1oX59THoAmHkNubYJ+9gWsYsp5k8v4ib6oDv1fA=="], "jest-process-manager/wait-on/lodash": ["lodash@4.18.1", "", {}, "sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q=="], + "jest-snapshot/pretty-format/ansi-styles": ["ansi-styles@5.2.0", "", {}, "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA=="], + + "jest-snapshot/pretty-format/react-is": ["react-is@18.3.1", "", {}, "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg=="], + + "jest-validate/pretty-format/ansi-styles": ["ansi-styles@5.2.0", "", {}, "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA=="], + + "jest-validate/pretty-format/react-is": ["react-is@18.3.1", "", {}, "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg=="], + "jest-watch-typeahead/strip-ansi/ansi-regex": ["ansi-regex@6.2.2", "", {}, "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg=="], "jest-watcher/string-length/char-regex": ["char-regex@1.0.2", "", {}, "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw=="], @@ -3233,6 +3325,8 @@ "pkg-dir/find-up/path-exists": ["path-exists@4.0.0", "", {}, "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w=="], + "pretty-format/@jest/schemas/@sinclair/typebox": ["@sinclair/typebox@0.34.49", "", {}, "sha512-brySQQs7Jtn0joV8Xh9ZV/hZb9Ozb0pmazDIASBkYKCjXrXU3mpcFahmK/z4YDhGkQvP9mWJbVyahdtU5wQA+A=="], + "read-pkg/path-type/pify": ["pify@3.0.0", "", {}, "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg=="], "restore-cursor/onetime/mimic-fn": ["mimic-fn@2.1.0", "", {}, "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg=="], @@ -3353,6 +3447,12 @@ "eslint/find-up/locate-path/p-locate": ["p-locate@5.0.0", "", { "dependencies": { "p-limit": "^3.0.2" } }, "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw=="], + "expect/jest-message-util/@jest/types/@jest/schemas": ["@jest/schemas@30.4.1", "", { "dependencies": { "@sinclair/typebox": "^0.34.0" } }, "sha512-i6b4qw5qnP8c5FEeBJg/uZQ4ddrkN6Ca8qISJh0pr7a5hfn3h3v5x60BEbOC7OYAGZNMs1LfFLwnW2CuK8F57Q=="], + + "expect/jest-mock/@jest/types/@jest/schemas": ["@jest/schemas@30.4.1", "", { "dependencies": { "@sinclair/typebox": "^0.34.0" } }, "sha512-i6b4qw5qnP8c5FEeBJg/uZQ4ddrkN6Ca8qISJh0pr7a5hfn3h3v5x60BEbOC7OYAGZNMs1LfFLwnW2CuK8F57Q=="], + + "expect/jest-util/@jest/types/@jest/schemas": ["@jest/schemas@30.4.1", "", { "dependencies": { "@sinclair/typebox": "^0.34.0" } }, "sha512-i6b4qw5qnP8c5FEeBJg/uZQ4ddrkN6Ca8qISJh0pr7a5hfn3h3v5x60BEbOC7OYAGZNMs1LfFLwnW2CuK8F57Q=="], + "graphql-config/@graphql-tools/url-loader/@graphql-tools/executor-graphql-ws/@graphql-tools/executor-common": ["@graphql-tools/executor-common@1.0.6", "", { "dependencies": { "@envelop/core": "^5.4.0", "@graphql-tools/utils": "^11.0.0" }, "peerDependencies": { "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" } }, "sha512-23/K5C+LSlHDI0mj2SwCJ33RcELCcyDUgABm1Z8St7u/4Z5+95i925H/NAjUyggRjiaY8vYtNiMOPE49aPX1sg=="], "graphql-config/@graphql-tools/url-loader/@graphql-tools/executor-http/@graphql-hive/signal": ["@graphql-hive/signal@2.0.0", "", {}, "sha512-Pz8wB3K0iU6ae9S1fWfsmJX24CcGeTo6hE7T44ucmV/ALKRj+bxClmqrYcDT7v3f0d12Rh4FAXBb6gon+WkDpQ=="], @@ -3435,6 +3535,12 @@ "eslint-plugin-storybook/@typescript-eslint/utils/@typescript-eslint/typescript-estree/minimatch/brace-expansion": ["brace-expansion@5.0.6", "", { "dependencies": { "balanced-match": "^4.0.2" } }, "sha512-kLpxurY4Z4r9sgMsyG0Z9uzsBlgiU/EFKhj/h91/8yHu0edo7XuixOIH3VcJ8kkxs6/jPzoI6U9Vj3WqbMQ94g=="], + "expect/jest-message-util/@jest/types/@jest/schemas/@sinclair/typebox": ["@sinclair/typebox@0.34.49", "", {}, "sha512-brySQQs7Jtn0joV8Xh9ZV/hZb9Ozb0pmazDIASBkYKCjXrXU3mpcFahmK/z4YDhGkQvP9mWJbVyahdtU5wQA+A=="], + + "expect/jest-mock/@jest/types/@jest/schemas/@sinclair/typebox": ["@sinclair/typebox@0.34.49", "", {}, "sha512-brySQQs7Jtn0joV8Xh9ZV/hZb9Ozb0pmazDIASBkYKCjXrXU3mpcFahmK/z4YDhGkQvP9mWJbVyahdtU5wQA+A=="], + + "expect/jest-util/@jest/types/@jest/schemas/@sinclair/typebox": ["@sinclair/typebox@0.34.49", "", {}, "sha512-brySQQs7Jtn0joV8Xh9ZV/hZb9Ozb0pmazDIASBkYKCjXrXU3mpcFahmK/z4YDhGkQvP9mWJbVyahdtU5wQA+A=="], + "graphql-config/@graphql-tools/url-loader/@graphql-tools/wrap/@graphql-tools/delegate/@graphql-tools/batch-execute": ["@graphql-tools/batch-execute@10.0.8", "", { "dependencies": { "@graphql-tools/utils": "^11.0.0", "@whatwg-node/promise-helpers": "^1.3.2", "dataloader": "^2.2.3", "tslib": "^2.8.1" }, "peerDependencies": { "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" } }, "sha512-Kobt37qrVTFhX4HUK5/vPgMXFw/5f97AzmAlfmDBSRh/GnoAmLKCb48FrEI3gdeIwZB2fEhVHJyDqsojldnLQA=="], "lint-staged/listr2/cli-truncate/slice-ansi/ansi-styles": ["ansi-styles@6.2.3", "", {}, "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg=="], diff --git a/package.json b/package.json index e3aac11..7eeb0ed 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,7 @@ "@storybook/test-runner": "^0.22.1", "@testing-library/jest-dom": "^6.6.3", "@testing-library/react": "^16.3.0", - "@types/jest": "^29.5.11", + "@types/jest": "^30.0.0", "@types/node": "^20", "@types/react": "19.1.1", "@types/react-dom": "19.1.1", diff --git a/src/__generated__/gql.ts b/src/__generated__/gql.ts index 088ebaa..e27ec29 100644 --- a/src/__generated__/gql.ts +++ b/src/__generated__/gql.ts @@ -18,10 +18,10 @@ type Documents = { '\n query GetAccountById($id: String!) {\n account: account_by_pk(id: $id) {\n id\n free\n frozen\n reserved\n }\n accountStats: account_stats_by_pk(id: $id) {\n total_cancelled_transfers\n total_executed_transfers\n total_immediate_transfers\n total_mined_blocks\n total_rewards\n total_scheduled_transfers\n }\n multisig: multisig_by_pk(id: $id) {\n id\n }\n guardian: high_security_set_aggregate(\n where: { who: { id: { _eq: $id } } }\n ) {\n aggregate {\n totalCount: count\n }\n }\n beneficiaries: high_security_set_aggregate(\n where: { guardian: { id: { _eq: $id } } }\n ) {\n aggregate {\n totalCount: count\n }\n }\n }\n ': typeof types.GetAccountByIdDocument; '\n query GetAccountsStats($startDate: timestamptz!, $endDate: timestamptz!) {\n all: chain_stats_by_pk(id: "global") {\n total_accounts\n }\n\n recentlyActive: account_aggregate(\n where: {\n transfersFrom: { timestamp: { _gte: $startDate, _lte: $endDate } }\n }\n ) {\n aggregate {\n count\n }\n }\n\n recentlyDeposited: account_aggregate(\n where: {\n transfersTo: { timestamp: { _gte: $startDate, _lte: $endDate } }\n }\n ) {\n aggregate {\n count\n }\n }\n }\n ': typeof types.GetAccountsStatsDocument; '\n query GetBlocks(\n $limit: Int\n $offset: Int\n $orderBy: [block_order_by!]!\n $where: block_bool_exp\n ) {\n blocks: block(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n id\n hash\n height\n reward\n timestamp\n mined_by_id\n extrinsics {\n id\n }\n }\n meta: chain_stats_by_pk(id: "global") {\n totalCount: block_height\n }\n }\n ': typeof types.GetBlocksDocument; - '\n query GetBlockById($height: Int!, $hash: String!) {\n blocks: block(\n where: {\n _or: [{ height: { _eq: $height } }, { hash: { _eq: $hash } }]\n }\n ) {\n id\n hash\n height\n reward\n timestamp\n extrinsics(order_by: { index_in_block: asc }) {\n id\n pallet\n call\n success\n fee\n timestamp\n indexInBlock: index_in_block\n signer {\n id\n }\n }\n }\n minerRewards: miner_reward(\n where: {\n block: {\n _or: [{ height: { _eq: $height } }, { hash: { _eq: $hash } }]\n }\n }\n ) {\n reward\n timestamp\n miner {\n id\n }\n block {\n height\n hash\n }\n }\n }\n ': typeof types.GetBlockByIdDocument; + '\n query GetBlockById($height: Int!, $hash: String!) {\n blocks: block(\n where: {\n _or: [{ height: { _eq: $height } }, { hash: { _eq: $hash } }]\n }\n ) {\n id\n hash\n height\n reward\n timestamp\n extrinsics(order_by: { index_in_block: asc }) {\n id\n pallet\n call\n success\n fee\n timestamp\n indexInBlock: index_in_block\n signer {\n id\n }\n }\n }\n minerRewards: miner_reward(\n where: {\n block: {\n _or: [{ height: { _eq: $height } }, { hash: { _eq: $hash } }]\n }\n }\n ) {\n reward\n timestamp\n miner {\n id\n }\n block {\n height\n hash\n }\n }\n rewardTransfers: unified_transaction(\n where: {\n type: { _eq: "IMMEDIATE" }\n hash: { _is_null: true }\n block: {\n _or: [{ height: { _eq: $height } }, { hash: { _eq: $hash } }]\n }\n }\n ) {\n amount\n detail_id\n from {\n id\n }\n to {\n id\n }\n }\n }\n ': typeof types.GetBlockByIdDocument; '\n query GetBlockStats($startDate: timestamptz!, $endDate: timestamptz!) {\n chain: chain_stats_by_pk(id: "global") {\n block_height\n finalized_block_height\n }\n minedIn24Hours: block_aggregate(\n where: { timestamp: { _gte: $startDate, _lte: $endDate } }\n ) {\n aggregate {\n totalCount: count\n }\n }\n }\n ': typeof types.GetBlockStatsDocument; '\n query GetCancelledReversibleTransactionByTxId($tx_id: String!) {\n cancelledReversibleTransactions: cancelled_reversible_transfer(\n where: { tx_id: { _eq: $tx_id } }\n ) {\n timestamp\n tx_id\n block {\n height\n }\n cancelledBy {\n id\n }\n extrinsic {\n id\n pallet\n call\n }\n scheduledTransfer {\n amount\n scheduled_at\n fee\n from {\n id\n }\n to {\n id\n }\n }\n }\n }\n ': typeof types.GetCancelledReversibleTransactionByTxIdDocument; - '\n query GetHomeChainStats(\n $startDate: timestamptz!\n $endDate: timestamptz!\n $day0Start: timestamptz!\n $day0End: timestamptz!\n $day1Start: timestamptz!\n $day1End: timestamptz!\n $day2Start: timestamptz!\n $day2End: timestamptz!\n $day3Start: timestamptz!\n $day3End: timestamptz!\n $day4Start: timestamptz!\n $day4End: timestamptz!\n $day5Start: timestamptz!\n $day5End: timestamptz!\n $day6Start: timestamptz!\n $day6End: timestamptz!\n ) {\n status: chain_stats_by_pk(id: "global") {\n block_height\n total_accounts\n total_deposit_accounts\n total_executed_transfers\n total_immediate_transfers\n total_scheduled_transfers\n total_cancelled_transfers\n }\n last24Hour: transfer_aggregate(\n where: {\n timestamp: { _gte: $startDate, _lte: $endDate }\n extrinsic_id: { _is_null: false }\n }\n ) {\n aggregate {\n count\n }\n }\n blocksDay0: block_aggregate(\n where: { timestamp: { _gte: $day0Start, _lte: $day0End } }\n ) {\n aggregate {\n count\n }\n }\n transfersDay0: transfer_aggregate(\n where: {\n timestamp: { _gte: $day0Start, _lte: $day0End }\n extrinsic_id: { _is_null: false }\n }\n ) {\n aggregate {\n count\n }\n }\n activeAccountsDay0: transfer_aggregate(\n where: {\n timestamp: { _gte: $day0Start, _lte: $day0End }\n from_id: { _is_null: false }\n }\n ) {\n aggregate {\n count(columns: [from_id], distinct: true)\n }\n }\n blocksDay1: block_aggregate(\n where: { timestamp: { _gte: $day1Start, _lte: $day1End } }\n ) {\n aggregate {\n count\n }\n }\n transfersDay1: transfer_aggregate(\n where: {\n timestamp: { _gte: $day1Start, _lte: $day1End }\n extrinsic_id: { _is_null: false }\n }\n ) {\n aggregate {\n count\n }\n }\n activeAccountsDay1: transfer_aggregate(\n where: {\n timestamp: { _gte: $day1Start, _lte: $day1End }\n from_id: { _is_null: false }\n }\n ) {\n aggregate {\n count(columns: [from_id], distinct: true)\n }\n }\n blocksDay2: block_aggregate(\n where: { timestamp: { _gte: $day2Start, _lte: $day2End } }\n ) {\n aggregate {\n count\n }\n }\n transfersDay2: transfer_aggregate(\n where: {\n timestamp: { _gte: $day2Start, _lte: $day2End }\n extrinsic_id: { _is_null: false }\n }\n ) {\n aggregate {\n count\n }\n }\n activeAccountsDay2: transfer_aggregate(\n where: {\n timestamp: { _gte: $day2Start, _lte: $day2End }\n from_id: { _is_null: false }\n }\n ) {\n aggregate {\n count(columns: [from_id], distinct: true)\n }\n }\n blocksDay3: block_aggregate(\n where: { timestamp: { _gte: $day3Start, _lte: $day3End } }\n ) {\n aggregate {\n count\n }\n }\n transfersDay3: transfer_aggregate(\n where: {\n timestamp: { _gte: $day3Start, _lte: $day3End }\n extrinsic_id: { _is_null: false }\n }\n ) {\n aggregate {\n count\n }\n }\n activeAccountsDay3: transfer_aggregate(\n where: {\n timestamp: { _gte: $day3Start, _lte: $day3End }\n from_id: { _is_null: false }\n }\n ) {\n aggregate {\n count(columns: [from_id], distinct: true)\n }\n }\n blocksDay4: block_aggregate(\n where: { timestamp: { _gte: $day4Start, _lte: $day4End } }\n ) {\n aggregate {\n count\n }\n }\n transfersDay4: transfer_aggregate(\n where: {\n timestamp: { _gte: $day4Start, _lte: $day4End }\n extrinsic_id: { _is_null: false }\n }\n ) {\n aggregate {\n count\n }\n }\n activeAccountsDay4: transfer_aggregate(\n where: {\n timestamp: { _gte: $day4Start, _lte: $day4End }\n from_id: { _is_null: false }\n }\n ) {\n aggregate {\n count(columns: [from_id], distinct: true)\n }\n }\n blocksDay5: block_aggregate(\n where: { timestamp: { _gte: $day5Start, _lte: $day5End } }\n ) {\n aggregate {\n count\n }\n }\n transfersDay5: transfer_aggregate(\n where: {\n timestamp: { _gte: $day5Start, _lte: $day5End }\n extrinsic_id: { _is_null: false }\n }\n ) {\n aggregate {\n count\n }\n }\n activeAccountsDay5: transfer_aggregate(\n where: {\n timestamp: { _gte: $day5Start, _lte: $day5End }\n from_id: { _is_null: false }\n }\n ) {\n aggregate {\n count(columns: [from_id], distinct: true)\n }\n }\n blocksDay6: block_aggregate(\n where: { timestamp: { _gte: $day6Start, _lte: $day6End } }\n ) {\n aggregate {\n count\n }\n }\n transfersDay6: transfer_aggregate(\n where: {\n timestamp: { _gte: $day6Start, _lte: $day6End }\n extrinsic_id: { _is_null: false }\n }\n ) {\n aggregate {\n count\n }\n }\n activeAccountsDay6: transfer_aggregate(\n where: {\n timestamp: { _gte: $day6Start, _lte: $day6End }\n from_id: { _is_null: false }\n }\n ) {\n aggregate {\n count(columns: [from_id], distinct: true)\n }\n }\n }\n': typeof types.GetHomeChainStatsDocument; + '\n query GetHomeChainStats(\n $last24HourWhere: unified_transaction_bool_exp!\n $dayLimit: Int!\n ) {\n status: chain_stats_by_pk(id: "global") {\n block_height\n total_accounts\n total_deposit_accounts\n total_immediate_transfers\n total_scheduled_transfers\n total_executed_transfers\n total_cancelled_transfers\n }\n last24Hour: unified_transaction_aggregate(where: $last24HourWhere) {\n aggregate {\n count\n }\n }\n dailyStats: daily_chain_stats(order_by: { date: desc }, limit: $dayLimit) {\n id\n date\n blocks_count\n tx_count\n active_accounts\n }\n }\n': typeof types.GetHomeChainStatsDocument; '\n query GetStatus {\n status: chain_stats_by_pk(id: "global") {\n block_height\n total_accounts\n total_deposit_accounts\n total_executed_transfers\n total_immediate_transfers\n total_scheduled_transfers\n total_cancelled_transfers\n }\n }\n ': typeof types.GetStatusDocument; '\n query GetErrorEvents(\n $limit: Int\n $offset: Int\n $orderBy: [error_event_order_by!]\n $where: error_event_bool_exp\n ) {\n errorEvents: error_event(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n error_docs\n error_module\n error_name\n error_type\n extrinsic {\n id\n pallet\n call\n }\n id\n timestamp\n block {\n height\n }\n }\n meta: error_event_aggregate(where: $where) {\n aggregate {\n totalCount: count\n }\n }\n }\n ': typeof types.GetErrorEventsDocument; '\n query GetErrorEventsStats(\n $startDate: timestamptz!\n $endDate: timestamptz!\n ) {\n last24Hour: error_event_aggregate(\n where: { timestamp: { _gte: $startDate, _lte: $endDate } }\n ) {\n aggregate {\n totalCount: count\n }\n }\n allTime: chain_stats_by_pk(id: "global") {\n total_error_events\n }\n }\n ': typeof types.GetErrorEventsStatsDocument; @@ -77,11 +77,10 @@ type Documents = { '\n query GetMultisigSignerApprovedStats(\n $startDate: timestamptz!\n $endDate: timestamptz!\n ) {\n last24Hour: multisig_signer_approved_aggregate(\n where: { timestamp: { _gte: $startDate, _lte: $endDate } }\n ) {\n aggregate {\n totalCount: count\n }\n }\n allTime: chain_stats_by_pk(id: "global") {\n total_multisig_signer_approved\n }\n }\n ': typeof types.GetMultisigSignerApprovedStatsDocument; '\n \n query GetMultisigSignerApprovedByHash($hash: String!) {\n multisigSignerApprovedEvents: multisig_signer_approved(\n where: { extrinsic: { id: { _eq: $hash } } }\n ) {\n ...MultisigSignerApprovedFields\n }\n }\n ': typeof types.GetMultisigSignerApprovedByHashDocument; '\n query GetScheduledReversibleTransactionByTxId($tx_id: String!) {\n scheduledReversibleTransactions: scheduled_reversible_transfer(\n where: { tx_id: { _eq: $tx_id } }\n ) {\n extrinsic {\n id\n pallet\n call\n }\n amount\n timestamp\n scheduled_at\n tx_id\n fee\n block {\n height\n }\n from {\n id\n }\n to {\n id\n }\n }\n }\n ': typeof types.GetScheduledReversibleTransactionByTxIdDocument; - '\n query SearchAll($keyword: String, $keyword_number: Int, $limit: Int) {\n transactions: unified_transaction(\n limit: $limit\n where: {\n _or: [\n { hash: { _ilike: $keyword } }\n { detail_id: { _ilike: $keyword } }\n { id: { _ilike: $keyword } }\n ]\n }\n ) {\n id\n type\n hash\n detail_id\n block {\n height\n hash\n }\n }\n accounts: account(limit: $limit, where: { id: { _ilike: $keyword } }) {\n id\n }\n blocks: block(\n limit: $limit\n where: {\n _or: [\n { hash: { _ilike: $keyword } }\n { height: { _eq: $keyword_number } }\n ]\n }\n ) {\n height\n }\n highSecuritySets: high_security_set(\n limit: $limit\n where: { extrinsic: { id: { _ilike: $keyword } } }\n ) {\n extrinsic {\n id\n pallet\n call\n }\n }\n errorEvents: error_event(\n limit: $limit\n where: {\n _or: [\n { error_type: { _ilike: $keyword } }\n { error_name: { _ilike: $keyword } }\n ]\n }\n ) {\n extrinsic {\n id\n pallet\n call\n }\n }\n }\n ': typeof types.SearchAllDocument; + '\n query SearchHex($keyword: String, $limit: Int) {\n transactions: unified_transaction(\n limit: $limit\n where: {\n _or: [{ hash: { _like: $keyword } }, { detail_id: { _like: $keyword } }]\n }\n ) {\n id\n type\n hash\n detail_id\n block {\n height\n hash\n }\n }\n blocks: block(limit: $limit, where: { hash: { _like: $keyword } }) {\n height\n }\n highSecuritySets: high_security_set(\n limit: $limit\n where: { extrinsic: { id: { _like: $keyword } } }\n ) {\n extrinsic {\n id\n pallet\n call\n }\n }\n }\n': typeof types.SearchHexDocument; + '\n query SearchNumeric($keyword: String, $keyword_number: Int, $limit: Int) {\n transactions: unified_transaction(\n limit: $limit\n where: { detail_id: { _like: $keyword } }\n ) {\n id\n type\n hash\n detail_id\n block {\n height\n hash\n }\n }\n blocks: block(limit: $limit, where: { height: { _eq: $keyword_number } }) {\n height\n }\n }\n': typeof types.SearchNumericDocument; + '\n query SearchText($keyword: String, $limit: Int) {\n accounts: account(limit: $limit, where: { id: { _like: $keyword } }) {\n id\n }\n errorEvents: error_event(\n limit: $limit\n where: {\n _or: [\n { error_type: { _ilike: $keyword } }\n { error_name: { _ilike: $keyword } }\n ]\n }\n ) {\n extrinsic {\n id\n pallet\n call\n }\n }\n }\n': typeof types.SearchTextDocument; '\n query GetExtrinsicByHash($hash: String!) {\n extrinsics: extrinsic(where: { id: { _eq: $hash } }) {\n id\n pallet\n call\n success\n fee\n timestamp\n index_in_block\n signer {\n id\n }\n block {\n height\n }\n }\n transfersByExtrinsic: transfer(\n where: { extrinsic: { id: { _eq: $hash } } }\n order_by: { timestamp: asc }\n ) {\n id\n amount\n timestamp\n from {\n id\n }\n to {\n id\n }\n block {\n height\n }\n extrinsic {\n id\n pallet\n call\n success\n fee\n timestamp\n index_in_block\n signer {\n id\n }\n block {\n height\n }\n }\n }\n transfersById: transfer(where: { id: { _eq: $hash } }) {\n id\n amount\n timestamp\n from {\n id\n }\n to {\n id\n }\n block {\n height\n }\n extrinsic {\n id\n pallet\n call\n success\n fee\n timestamp\n index_in_block\n signer {\n id\n }\n block {\n height\n }\n }\n }\n }\n ': typeof types.GetExtrinsicByHashDocument; - '\n query GetUnifiedTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [unified_transaction_order_by!]\n $where: unified_transaction_bool_exp\n ) {\n transactions: unified_transaction(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n id\n type\n hash\n block {\n height\n hash\n }\n timestamp\n amount\n fee\n status\n detail_id\n from {\n id\n }\n to {\n id\n }\n }\n meta: unified_transaction_aggregate(where: $where) {\n aggregate {\n totalCount: count\n }\n }\n }\n ': typeof types.GetUnifiedTransactionsDocument; - '\n query GetRecentUnifiedTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [unified_transaction_order_by!]\n ) {\n transactions: unified_transaction(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n ) {\n id\n type\n hash\n block {\n height\n hash\n }\n timestamp\n amount\n fee\n status\n detail_id\n from {\n id\n }\n to {\n id\n }\n }\n }\n ': typeof types.GetRecentUnifiedTransactionsDocument; - '\n query GetUnifiedTransactionsStats(\n $startDate: timestamptz!\n $endDate: timestamptz!\n ) {\n last24Hour: unified_transaction_aggregate(\n where: { timestamp: { _gte: $startDate, _lte: $endDate } }\n ) {\n aggregate {\n totalCount: count\n }\n }\n allTime: unified_transaction_aggregate {\n aggregate {\n totalCount: count\n }\n }\n }\n ': typeof types.GetUnifiedTransactionsStatsDocument; '\n query GetWormholeExtrinsicById($id: String!) {\n wormholeExtrinsicById: wormhole_extrinsic_by_pk(id: $id) {\n id\n extrinsic {\n id\n pallet\n call\n }\n total_amount\n output_count\n timestamp\n privacy_score\n privacy_score01_pct\n privacy_score1_pct\n privacy_score5_pct\n privacy_label\n pool_snapshot\n block {\n id\n height\n hash\n timestamp\n }\n outputs {\n id\n exitAccount {\n id\n }\n amount\n }\n }\n wormholeNullifiers: wormhole_nullifier(\n where: { wormholeExtrinsic: { id: { _eq: $id } } }\n ) {\n nullifier\n nullifier_hash\n }\n }\n': typeof types.GetWormholeExtrinsicByIdDocument; '\n query GetTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [transfer_order_by!]\n $where: transfer_bool_exp\n ) {\n transactions: transfer(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n extrinsic {\n id\n }\n }\n }\n': typeof types.GetTransactionsDocument; '\n query GetCancelledReversibleTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [cancelled_reversible_transfer_order_by!]\n $where: cancelled_reversible_transfer_bool_exp\n ) {\n cancelledReversibleTransactions: cancelled_reversible_transfer(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n tx_id\n }\n }\n': typeof types.GetCancelledReversibleTransactionsDocument; @@ -98,13 +97,13 @@ const documents: Documents = { types.GetAccountsStatsDocument, '\n query GetBlocks(\n $limit: Int\n $offset: Int\n $orderBy: [block_order_by!]!\n $where: block_bool_exp\n ) {\n blocks: block(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n id\n hash\n height\n reward\n timestamp\n mined_by_id\n extrinsics {\n id\n }\n }\n meta: chain_stats_by_pk(id: "global") {\n totalCount: block_height\n }\n }\n ': types.GetBlocksDocument, - '\n query GetBlockById($height: Int!, $hash: String!) {\n blocks: block(\n where: {\n _or: [{ height: { _eq: $height } }, { hash: { _eq: $hash } }]\n }\n ) {\n id\n hash\n height\n reward\n timestamp\n extrinsics(order_by: { index_in_block: asc }) {\n id\n pallet\n call\n success\n fee\n timestamp\n indexInBlock: index_in_block\n signer {\n id\n }\n }\n }\n minerRewards: miner_reward(\n where: {\n block: {\n _or: [{ height: { _eq: $height } }, { hash: { _eq: $hash } }]\n }\n }\n ) {\n reward\n timestamp\n miner {\n id\n }\n block {\n height\n hash\n }\n }\n }\n ': + '\n query GetBlockById($height: Int!, $hash: String!) {\n blocks: block(\n where: {\n _or: [{ height: { _eq: $height } }, { hash: { _eq: $hash } }]\n }\n ) {\n id\n hash\n height\n reward\n timestamp\n extrinsics(order_by: { index_in_block: asc }) {\n id\n pallet\n call\n success\n fee\n timestamp\n indexInBlock: index_in_block\n signer {\n id\n }\n }\n }\n minerRewards: miner_reward(\n where: {\n block: {\n _or: [{ height: { _eq: $height } }, { hash: { _eq: $hash } }]\n }\n }\n ) {\n reward\n timestamp\n miner {\n id\n }\n block {\n height\n hash\n }\n }\n rewardTransfers: unified_transaction(\n where: {\n type: { _eq: "IMMEDIATE" }\n hash: { _is_null: true }\n block: {\n _or: [{ height: { _eq: $height } }, { hash: { _eq: $hash } }]\n }\n }\n ) {\n amount\n detail_id\n from {\n id\n }\n to {\n id\n }\n }\n }\n ': types.GetBlockByIdDocument, '\n query GetBlockStats($startDate: timestamptz!, $endDate: timestamptz!) {\n chain: chain_stats_by_pk(id: "global") {\n block_height\n finalized_block_height\n }\n minedIn24Hours: block_aggregate(\n where: { timestamp: { _gte: $startDate, _lte: $endDate } }\n ) {\n aggregate {\n totalCount: count\n }\n }\n }\n ': types.GetBlockStatsDocument, '\n query GetCancelledReversibleTransactionByTxId($tx_id: String!) {\n cancelledReversibleTransactions: cancelled_reversible_transfer(\n where: { tx_id: { _eq: $tx_id } }\n ) {\n timestamp\n tx_id\n block {\n height\n }\n cancelledBy {\n id\n }\n extrinsic {\n id\n pallet\n call\n }\n scheduledTransfer {\n amount\n scheduled_at\n fee\n from {\n id\n }\n to {\n id\n }\n }\n }\n }\n ': types.GetCancelledReversibleTransactionByTxIdDocument, - '\n query GetHomeChainStats(\n $startDate: timestamptz!\n $endDate: timestamptz!\n $day0Start: timestamptz!\n $day0End: timestamptz!\n $day1Start: timestamptz!\n $day1End: timestamptz!\n $day2Start: timestamptz!\n $day2End: timestamptz!\n $day3Start: timestamptz!\n $day3End: timestamptz!\n $day4Start: timestamptz!\n $day4End: timestamptz!\n $day5Start: timestamptz!\n $day5End: timestamptz!\n $day6Start: timestamptz!\n $day6End: timestamptz!\n ) {\n status: chain_stats_by_pk(id: "global") {\n block_height\n total_accounts\n total_deposit_accounts\n total_executed_transfers\n total_immediate_transfers\n total_scheduled_transfers\n total_cancelled_transfers\n }\n last24Hour: transfer_aggregate(\n where: {\n timestamp: { _gte: $startDate, _lte: $endDate }\n extrinsic_id: { _is_null: false }\n }\n ) {\n aggregate {\n count\n }\n }\n blocksDay0: block_aggregate(\n where: { timestamp: { _gte: $day0Start, _lte: $day0End } }\n ) {\n aggregate {\n count\n }\n }\n transfersDay0: transfer_aggregate(\n where: {\n timestamp: { _gte: $day0Start, _lte: $day0End }\n extrinsic_id: { _is_null: false }\n }\n ) {\n aggregate {\n count\n }\n }\n activeAccountsDay0: transfer_aggregate(\n where: {\n timestamp: { _gte: $day0Start, _lte: $day0End }\n from_id: { _is_null: false }\n }\n ) {\n aggregate {\n count(columns: [from_id], distinct: true)\n }\n }\n blocksDay1: block_aggregate(\n where: { timestamp: { _gte: $day1Start, _lte: $day1End } }\n ) {\n aggregate {\n count\n }\n }\n transfersDay1: transfer_aggregate(\n where: {\n timestamp: { _gte: $day1Start, _lte: $day1End }\n extrinsic_id: { _is_null: false }\n }\n ) {\n aggregate {\n count\n }\n }\n activeAccountsDay1: transfer_aggregate(\n where: {\n timestamp: { _gte: $day1Start, _lte: $day1End }\n from_id: { _is_null: false }\n }\n ) {\n aggregate {\n count(columns: [from_id], distinct: true)\n }\n }\n blocksDay2: block_aggregate(\n where: { timestamp: { _gte: $day2Start, _lte: $day2End } }\n ) {\n aggregate {\n count\n }\n }\n transfersDay2: transfer_aggregate(\n where: {\n timestamp: { _gte: $day2Start, _lte: $day2End }\n extrinsic_id: { _is_null: false }\n }\n ) {\n aggregate {\n count\n }\n }\n activeAccountsDay2: transfer_aggregate(\n where: {\n timestamp: { _gte: $day2Start, _lte: $day2End }\n from_id: { _is_null: false }\n }\n ) {\n aggregate {\n count(columns: [from_id], distinct: true)\n }\n }\n blocksDay3: block_aggregate(\n where: { timestamp: { _gte: $day3Start, _lte: $day3End } }\n ) {\n aggregate {\n count\n }\n }\n transfersDay3: transfer_aggregate(\n where: {\n timestamp: { _gte: $day3Start, _lte: $day3End }\n extrinsic_id: { _is_null: false }\n }\n ) {\n aggregate {\n count\n }\n }\n activeAccountsDay3: transfer_aggregate(\n where: {\n timestamp: { _gte: $day3Start, _lte: $day3End }\n from_id: { _is_null: false }\n }\n ) {\n aggregate {\n count(columns: [from_id], distinct: true)\n }\n }\n blocksDay4: block_aggregate(\n where: { timestamp: { _gte: $day4Start, _lte: $day4End } }\n ) {\n aggregate {\n count\n }\n }\n transfersDay4: transfer_aggregate(\n where: {\n timestamp: { _gte: $day4Start, _lte: $day4End }\n extrinsic_id: { _is_null: false }\n }\n ) {\n aggregate {\n count\n }\n }\n activeAccountsDay4: transfer_aggregate(\n where: {\n timestamp: { _gte: $day4Start, _lte: $day4End }\n from_id: { _is_null: false }\n }\n ) {\n aggregate {\n count(columns: [from_id], distinct: true)\n }\n }\n blocksDay5: block_aggregate(\n where: { timestamp: { _gte: $day5Start, _lte: $day5End } }\n ) {\n aggregate {\n count\n }\n }\n transfersDay5: transfer_aggregate(\n where: {\n timestamp: { _gte: $day5Start, _lte: $day5End }\n extrinsic_id: { _is_null: false }\n }\n ) {\n aggregate {\n count\n }\n }\n activeAccountsDay5: transfer_aggregate(\n where: {\n timestamp: { _gte: $day5Start, _lte: $day5End }\n from_id: { _is_null: false }\n }\n ) {\n aggregate {\n count(columns: [from_id], distinct: true)\n }\n }\n blocksDay6: block_aggregate(\n where: { timestamp: { _gte: $day6Start, _lte: $day6End } }\n ) {\n aggregate {\n count\n }\n }\n transfersDay6: transfer_aggregate(\n where: {\n timestamp: { _gte: $day6Start, _lte: $day6End }\n extrinsic_id: { _is_null: false }\n }\n ) {\n aggregate {\n count\n }\n }\n activeAccountsDay6: transfer_aggregate(\n where: {\n timestamp: { _gte: $day6Start, _lte: $day6End }\n from_id: { _is_null: false }\n }\n ) {\n aggregate {\n count(columns: [from_id], distinct: true)\n }\n }\n }\n': + '\n query GetHomeChainStats(\n $last24HourWhere: unified_transaction_bool_exp!\n $dayLimit: Int!\n ) {\n status: chain_stats_by_pk(id: "global") {\n block_height\n total_accounts\n total_deposit_accounts\n total_immediate_transfers\n total_scheduled_transfers\n total_executed_transfers\n total_cancelled_transfers\n }\n last24Hour: unified_transaction_aggregate(where: $last24HourWhere) {\n aggregate {\n count\n }\n }\n dailyStats: daily_chain_stats(order_by: { date: desc }, limit: $dayLimit) {\n id\n date\n blocks_count\n tx_count\n active_accounts\n }\n }\n': types.GetHomeChainStatsDocument, '\n query GetStatus {\n status: chain_stats_by_pk(id: "global") {\n block_height\n total_accounts\n total_deposit_accounts\n total_executed_transfers\n total_immediate_transfers\n total_scheduled_transfers\n total_cancelled_transfers\n }\n }\n ': types.GetStatusDocument, @@ -216,16 +215,14 @@ const documents: Documents = { types.GetMultisigSignerApprovedByHashDocument, '\n query GetScheduledReversibleTransactionByTxId($tx_id: String!) {\n scheduledReversibleTransactions: scheduled_reversible_transfer(\n where: { tx_id: { _eq: $tx_id } }\n ) {\n extrinsic {\n id\n pallet\n call\n }\n amount\n timestamp\n scheduled_at\n tx_id\n fee\n block {\n height\n }\n from {\n id\n }\n to {\n id\n }\n }\n }\n ': types.GetScheduledReversibleTransactionByTxIdDocument, - '\n query SearchAll($keyword: String, $keyword_number: Int, $limit: Int) {\n transactions: unified_transaction(\n limit: $limit\n where: {\n _or: [\n { hash: { _ilike: $keyword } }\n { detail_id: { _ilike: $keyword } }\n { id: { _ilike: $keyword } }\n ]\n }\n ) {\n id\n type\n hash\n detail_id\n block {\n height\n hash\n }\n }\n accounts: account(limit: $limit, where: { id: { _ilike: $keyword } }) {\n id\n }\n blocks: block(\n limit: $limit\n where: {\n _or: [\n { hash: { _ilike: $keyword } }\n { height: { _eq: $keyword_number } }\n ]\n }\n ) {\n height\n }\n highSecuritySets: high_security_set(\n limit: $limit\n where: { extrinsic: { id: { _ilike: $keyword } } }\n ) {\n extrinsic {\n id\n pallet\n call\n }\n }\n errorEvents: error_event(\n limit: $limit\n where: {\n _or: [\n { error_type: { _ilike: $keyword } }\n { error_name: { _ilike: $keyword } }\n ]\n }\n ) {\n extrinsic {\n id\n pallet\n call\n }\n }\n }\n ': - types.SearchAllDocument, + '\n query SearchHex($keyword: String, $limit: Int) {\n transactions: unified_transaction(\n limit: $limit\n where: {\n _or: [{ hash: { _like: $keyword } }, { detail_id: { _like: $keyword } }]\n }\n ) {\n id\n type\n hash\n detail_id\n block {\n height\n hash\n }\n }\n blocks: block(limit: $limit, where: { hash: { _like: $keyword } }) {\n height\n }\n highSecuritySets: high_security_set(\n limit: $limit\n where: { extrinsic: { id: { _like: $keyword } } }\n ) {\n extrinsic {\n id\n pallet\n call\n }\n }\n }\n': + types.SearchHexDocument, + '\n query SearchNumeric($keyword: String, $keyword_number: Int, $limit: Int) {\n transactions: unified_transaction(\n limit: $limit\n where: { detail_id: { _like: $keyword } }\n ) {\n id\n type\n hash\n detail_id\n block {\n height\n hash\n }\n }\n blocks: block(limit: $limit, where: { height: { _eq: $keyword_number } }) {\n height\n }\n }\n': + types.SearchNumericDocument, + '\n query SearchText($keyword: String, $limit: Int) {\n accounts: account(limit: $limit, where: { id: { _like: $keyword } }) {\n id\n }\n errorEvents: error_event(\n limit: $limit\n where: {\n _or: [\n { error_type: { _ilike: $keyword } }\n { error_name: { _ilike: $keyword } }\n ]\n }\n ) {\n extrinsic {\n id\n pallet\n call\n }\n }\n }\n': + types.SearchTextDocument, '\n query GetExtrinsicByHash($hash: String!) {\n extrinsics: extrinsic(where: { id: { _eq: $hash } }) {\n id\n pallet\n call\n success\n fee\n timestamp\n index_in_block\n signer {\n id\n }\n block {\n height\n }\n }\n transfersByExtrinsic: transfer(\n where: { extrinsic: { id: { _eq: $hash } } }\n order_by: { timestamp: asc }\n ) {\n id\n amount\n timestamp\n from {\n id\n }\n to {\n id\n }\n block {\n height\n }\n extrinsic {\n id\n pallet\n call\n success\n fee\n timestamp\n index_in_block\n signer {\n id\n }\n block {\n height\n }\n }\n }\n transfersById: transfer(where: { id: { _eq: $hash } }) {\n id\n amount\n timestamp\n from {\n id\n }\n to {\n id\n }\n block {\n height\n }\n extrinsic {\n id\n pallet\n call\n success\n fee\n timestamp\n index_in_block\n signer {\n id\n }\n block {\n height\n }\n }\n }\n }\n ': types.GetExtrinsicByHashDocument, - '\n query GetUnifiedTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [unified_transaction_order_by!]\n $where: unified_transaction_bool_exp\n ) {\n transactions: unified_transaction(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n id\n type\n hash\n block {\n height\n hash\n }\n timestamp\n amount\n fee\n status\n detail_id\n from {\n id\n }\n to {\n id\n }\n }\n meta: unified_transaction_aggregate(where: $where) {\n aggregate {\n totalCount: count\n }\n }\n }\n ': - types.GetUnifiedTransactionsDocument, - '\n query GetRecentUnifiedTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [unified_transaction_order_by!]\n ) {\n transactions: unified_transaction(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n ) {\n id\n type\n hash\n block {\n height\n hash\n }\n timestamp\n amount\n fee\n status\n detail_id\n from {\n id\n }\n to {\n id\n }\n }\n }\n ': - types.GetRecentUnifiedTransactionsDocument, - '\n query GetUnifiedTransactionsStats(\n $startDate: timestamptz!\n $endDate: timestamptz!\n ) {\n last24Hour: unified_transaction_aggregate(\n where: { timestamp: { _gte: $startDate, _lte: $endDate } }\n ) {\n aggregate {\n totalCount: count\n }\n }\n allTime: unified_transaction_aggregate {\n aggregate {\n totalCount: count\n }\n }\n }\n ': - types.GetUnifiedTransactionsStatsDocument, '\n query GetWormholeExtrinsicById($id: String!) {\n wormholeExtrinsicById: wormhole_extrinsic_by_pk(id: $id) {\n id\n extrinsic {\n id\n pallet\n call\n }\n total_amount\n output_count\n timestamp\n privacy_score\n privacy_score01_pct\n privacy_score1_pct\n privacy_score5_pct\n privacy_label\n pool_snapshot\n block {\n id\n height\n hash\n timestamp\n }\n outputs {\n id\n exitAccount {\n id\n }\n amount\n }\n }\n wormholeNullifiers: wormhole_nullifier(\n where: { wormholeExtrinsic: { id: { _eq: $id } } }\n ) {\n nullifier\n nullifier_hash\n }\n }\n': types.GetWormholeExtrinsicByIdDocument, '\n query GetTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [transfer_order_by!]\n $where: transfer_bool_exp\n ) {\n transactions: transfer(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n extrinsic {\n id\n }\n }\n }\n': @@ -282,8 +279,8 @@ export function gql( * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ export function gql( - source: '\n query GetBlockById($height: Int!, $hash: String!) {\n blocks: block(\n where: {\n _or: [{ height: { _eq: $height } }, { hash: { _eq: $hash } }]\n }\n ) {\n id\n hash\n height\n reward\n timestamp\n extrinsics(order_by: { index_in_block: asc }) {\n id\n pallet\n call\n success\n fee\n timestamp\n indexInBlock: index_in_block\n signer {\n id\n }\n }\n }\n minerRewards: miner_reward(\n where: {\n block: {\n _or: [{ height: { _eq: $height } }, { hash: { _eq: $hash } }]\n }\n }\n ) {\n reward\n timestamp\n miner {\n id\n }\n block {\n height\n hash\n }\n }\n }\n ' -): (typeof documents)['\n query GetBlockById($height: Int!, $hash: String!) {\n blocks: block(\n where: {\n _or: [{ height: { _eq: $height } }, { hash: { _eq: $hash } }]\n }\n ) {\n id\n hash\n height\n reward\n timestamp\n extrinsics(order_by: { index_in_block: asc }) {\n id\n pallet\n call\n success\n fee\n timestamp\n indexInBlock: index_in_block\n signer {\n id\n }\n }\n }\n minerRewards: miner_reward(\n where: {\n block: {\n _or: [{ height: { _eq: $height } }, { hash: { _eq: $hash } }]\n }\n }\n ) {\n reward\n timestamp\n miner {\n id\n }\n block {\n height\n hash\n }\n }\n }\n ']; + source: '\n query GetBlockById($height: Int!, $hash: String!) {\n blocks: block(\n where: {\n _or: [{ height: { _eq: $height } }, { hash: { _eq: $hash } }]\n }\n ) {\n id\n hash\n height\n reward\n timestamp\n extrinsics(order_by: { index_in_block: asc }) {\n id\n pallet\n call\n success\n fee\n timestamp\n indexInBlock: index_in_block\n signer {\n id\n }\n }\n }\n minerRewards: miner_reward(\n where: {\n block: {\n _or: [{ height: { _eq: $height } }, { hash: { _eq: $hash } }]\n }\n }\n ) {\n reward\n timestamp\n miner {\n id\n }\n block {\n height\n hash\n }\n }\n rewardTransfers: unified_transaction(\n where: {\n type: { _eq: "IMMEDIATE" }\n hash: { _is_null: true }\n block: {\n _or: [{ height: { _eq: $height } }, { hash: { _eq: $hash } }]\n }\n }\n ) {\n amount\n detail_id\n from {\n id\n }\n to {\n id\n }\n }\n }\n ' +): (typeof documents)['\n query GetBlockById($height: Int!, $hash: String!) {\n blocks: block(\n where: {\n _or: [{ height: { _eq: $height } }, { hash: { _eq: $hash } }]\n }\n ) {\n id\n hash\n height\n reward\n timestamp\n extrinsics(order_by: { index_in_block: asc }) {\n id\n pallet\n call\n success\n fee\n timestamp\n indexInBlock: index_in_block\n signer {\n id\n }\n }\n }\n minerRewards: miner_reward(\n where: {\n block: {\n _or: [{ height: { _eq: $height } }, { hash: { _eq: $hash } }]\n }\n }\n ) {\n reward\n timestamp\n miner {\n id\n }\n block {\n height\n hash\n }\n }\n rewardTransfers: unified_transaction(\n where: {\n type: { _eq: "IMMEDIATE" }\n hash: { _is_null: true }\n block: {\n _or: [{ height: { _eq: $height } }, { hash: { _eq: $hash } }]\n }\n }\n ) {\n amount\n detail_id\n from {\n id\n }\n to {\n id\n }\n }\n }\n ']; /** * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ @@ -300,8 +297,8 @@ export function gql( * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ export function gql( - source: '\n query GetHomeChainStats(\n $startDate: timestamptz!\n $endDate: timestamptz!\n $day0Start: timestamptz!\n $day0End: timestamptz!\n $day1Start: timestamptz!\n $day1End: timestamptz!\n $day2Start: timestamptz!\n $day2End: timestamptz!\n $day3Start: timestamptz!\n $day3End: timestamptz!\n $day4Start: timestamptz!\n $day4End: timestamptz!\n $day5Start: timestamptz!\n $day5End: timestamptz!\n $day6Start: timestamptz!\n $day6End: timestamptz!\n ) {\n status: chain_stats_by_pk(id: "global") {\n block_height\n total_accounts\n total_deposit_accounts\n total_executed_transfers\n total_immediate_transfers\n total_scheduled_transfers\n total_cancelled_transfers\n }\n last24Hour: transfer_aggregate(\n where: {\n timestamp: { _gte: $startDate, _lte: $endDate }\n extrinsic_id: { _is_null: false }\n }\n ) {\n aggregate {\n count\n }\n }\n blocksDay0: block_aggregate(\n where: { timestamp: { _gte: $day0Start, _lte: $day0End } }\n ) {\n aggregate {\n count\n }\n }\n transfersDay0: transfer_aggregate(\n where: {\n timestamp: { _gte: $day0Start, _lte: $day0End }\n extrinsic_id: { _is_null: false }\n }\n ) {\n aggregate {\n count\n }\n }\n activeAccountsDay0: transfer_aggregate(\n where: {\n timestamp: { _gte: $day0Start, _lte: $day0End }\n from_id: { _is_null: false }\n }\n ) {\n aggregate {\n count(columns: [from_id], distinct: true)\n }\n }\n blocksDay1: block_aggregate(\n where: { timestamp: { _gte: $day1Start, _lte: $day1End } }\n ) {\n aggregate {\n count\n }\n }\n transfersDay1: transfer_aggregate(\n where: {\n timestamp: { _gte: $day1Start, _lte: $day1End }\n extrinsic_id: { _is_null: false }\n }\n ) {\n aggregate {\n count\n }\n }\n activeAccountsDay1: transfer_aggregate(\n where: {\n timestamp: { _gte: $day1Start, _lte: $day1End }\n from_id: { _is_null: false }\n }\n ) {\n aggregate {\n count(columns: [from_id], distinct: true)\n }\n }\n blocksDay2: block_aggregate(\n where: { timestamp: { _gte: $day2Start, _lte: $day2End } }\n ) {\n aggregate {\n count\n }\n }\n transfersDay2: transfer_aggregate(\n where: {\n timestamp: { _gte: $day2Start, _lte: $day2End }\n extrinsic_id: { _is_null: false }\n }\n ) {\n aggregate {\n count\n }\n }\n activeAccountsDay2: transfer_aggregate(\n where: {\n timestamp: { _gte: $day2Start, _lte: $day2End }\n from_id: { _is_null: false }\n }\n ) {\n aggregate {\n count(columns: [from_id], distinct: true)\n }\n }\n blocksDay3: block_aggregate(\n where: { timestamp: { _gte: $day3Start, _lte: $day3End } }\n ) {\n aggregate {\n count\n }\n }\n transfersDay3: transfer_aggregate(\n where: {\n timestamp: { _gte: $day3Start, _lte: $day3End }\n extrinsic_id: { _is_null: false }\n }\n ) {\n aggregate {\n count\n }\n }\n activeAccountsDay3: transfer_aggregate(\n where: {\n timestamp: { _gte: $day3Start, _lte: $day3End }\n from_id: { _is_null: false }\n }\n ) {\n aggregate {\n count(columns: [from_id], distinct: true)\n }\n }\n blocksDay4: block_aggregate(\n where: { timestamp: { _gte: $day4Start, _lte: $day4End } }\n ) {\n aggregate {\n count\n }\n }\n transfersDay4: transfer_aggregate(\n where: {\n timestamp: { _gte: $day4Start, _lte: $day4End }\n extrinsic_id: { _is_null: false }\n }\n ) {\n aggregate {\n count\n }\n }\n activeAccountsDay4: transfer_aggregate(\n where: {\n timestamp: { _gte: $day4Start, _lte: $day4End }\n from_id: { _is_null: false }\n }\n ) {\n aggregate {\n count(columns: [from_id], distinct: true)\n }\n }\n blocksDay5: block_aggregate(\n where: { timestamp: { _gte: $day5Start, _lte: $day5End } }\n ) {\n aggregate {\n count\n }\n }\n transfersDay5: transfer_aggregate(\n where: {\n timestamp: { _gte: $day5Start, _lte: $day5End }\n extrinsic_id: { _is_null: false }\n }\n ) {\n aggregate {\n count\n }\n }\n activeAccountsDay5: transfer_aggregate(\n where: {\n timestamp: { _gte: $day5Start, _lte: $day5End }\n from_id: { _is_null: false }\n }\n ) {\n aggregate {\n count(columns: [from_id], distinct: true)\n }\n }\n blocksDay6: block_aggregate(\n where: { timestamp: { _gte: $day6Start, _lte: $day6End } }\n ) {\n aggregate {\n count\n }\n }\n transfersDay6: transfer_aggregate(\n where: {\n timestamp: { _gte: $day6Start, _lte: $day6End }\n extrinsic_id: { _is_null: false }\n }\n ) {\n aggregate {\n count\n }\n }\n activeAccountsDay6: transfer_aggregate(\n where: {\n timestamp: { _gte: $day6Start, _lte: $day6End }\n from_id: { _is_null: false }\n }\n ) {\n aggregate {\n count(columns: [from_id], distinct: true)\n }\n }\n }\n' -): (typeof documents)['\n query GetHomeChainStats(\n $startDate: timestamptz!\n $endDate: timestamptz!\n $day0Start: timestamptz!\n $day0End: timestamptz!\n $day1Start: timestamptz!\n $day1End: timestamptz!\n $day2Start: timestamptz!\n $day2End: timestamptz!\n $day3Start: timestamptz!\n $day3End: timestamptz!\n $day4Start: timestamptz!\n $day4End: timestamptz!\n $day5Start: timestamptz!\n $day5End: timestamptz!\n $day6Start: timestamptz!\n $day6End: timestamptz!\n ) {\n status: chain_stats_by_pk(id: "global") {\n block_height\n total_accounts\n total_deposit_accounts\n total_executed_transfers\n total_immediate_transfers\n total_scheduled_transfers\n total_cancelled_transfers\n }\n last24Hour: transfer_aggregate(\n where: {\n timestamp: { _gte: $startDate, _lte: $endDate }\n extrinsic_id: { _is_null: false }\n }\n ) {\n aggregate {\n count\n }\n }\n blocksDay0: block_aggregate(\n where: { timestamp: { _gte: $day0Start, _lte: $day0End } }\n ) {\n aggregate {\n count\n }\n }\n transfersDay0: transfer_aggregate(\n where: {\n timestamp: { _gte: $day0Start, _lte: $day0End }\n extrinsic_id: { _is_null: false }\n }\n ) {\n aggregate {\n count\n }\n }\n activeAccountsDay0: transfer_aggregate(\n where: {\n timestamp: { _gte: $day0Start, _lte: $day0End }\n from_id: { _is_null: false }\n }\n ) {\n aggregate {\n count(columns: [from_id], distinct: true)\n }\n }\n blocksDay1: block_aggregate(\n where: { timestamp: { _gte: $day1Start, _lte: $day1End } }\n ) {\n aggregate {\n count\n }\n }\n transfersDay1: transfer_aggregate(\n where: {\n timestamp: { _gte: $day1Start, _lte: $day1End }\n extrinsic_id: { _is_null: false }\n }\n ) {\n aggregate {\n count\n }\n }\n activeAccountsDay1: transfer_aggregate(\n where: {\n timestamp: { _gte: $day1Start, _lte: $day1End }\n from_id: { _is_null: false }\n }\n ) {\n aggregate {\n count(columns: [from_id], distinct: true)\n }\n }\n blocksDay2: block_aggregate(\n where: { timestamp: { _gte: $day2Start, _lte: $day2End } }\n ) {\n aggregate {\n count\n }\n }\n transfersDay2: transfer_aggregate(\n where: {\n timestamp: { _gte: $day2Start, _lte: $day2End }\n extrinsic_id: { _is_null: false }\n }\n ) {\n aggregate {\n count\n }\n }\n activeAccountsDay2: transfer_aggregate(\n where: {\n timestamp: { _gte: $day2Start, _lte: $day2End }\n from_id: { _is_null: false }\n }\n ) {\n aggregate {\n count(columns: [from_id], distinct: true)\n }\n }\n blocksDay3: block_aggregate(\n where: { timestamp: { _gte: $day3Start, _lte: $day3End } }\n ) {\n aggregate {\n count\n }\n }\n transfersDay3: transfer_aggregate(\n where: {\n timestamp: { _gte: $day3Start, _lte: $day3End }\n extrinsic_id: { _is_null: false }\n }\n ) {\n aggregate {\n count\n }\n }\n activeAccountsDay3: transfer_aggregate(\n where: {\n timestamp: { _gte: $day3Start, _lte: $day3End }\n from_id: { _is_null: false }\n }\n ) {\n aggregate {\n count(columns: [from_id], distinct: true)\n }\n }\n blocksDay4: block_aggregate(\n where: { timestamp: { _gte: $day4Start, _lte: $day4End } }\n ) {\n aggregate {\n count\n }\n }\n transfersDay4: transfer_aggregate(\n where: {\n timestamp: { _gte: $day4Start, _lte: $day4End }\n extrinsic_id: { _is_null: false }\n }\n ) {\n aggregate {\n count\n }\n }\n activeAccountsDay4: transfer_aggregate(\n where: {\n timestamp: { _gte: $day4Start, _lte: $day4End }\n from_id: { _is_null: false }\n }\n ) {\n aggregate {\n count(columns: [from_id], distinct: true)\n }\n }\n blocksDay5: block_aggregate(\n where: { timestamp: { _gte: $day5Start, _lte: $day5End } }\n ) {\n aggregate {\n count\n }\n }\n transfersDay5: transfer_aggregate(\n where: {\n timestamp: { _gte: $day5Start, _lte: $day5End }\n extrinsic_id: { _is_null: false }\n }\n ) {\n aggregate {\n count\n }\n }\n activeAccountsDay5: transfer_aggregate(\n where: {\n timestamp: { _gte: $day5Start, _lte: $day5End }\n from_id: { _is_null: false }\n }\n ) {\n aggregate {\n count(columns: [from_id], distinct: true)\n }\n }\n blocksDay6: block_aggregate(\n where: { timestamp: { _gte: $day6Start, _lte: $day6End } }\n ) {\n aggregate {\n count\n }\n }\n transfersDay6: transfer_aggregate(\n where: {\n timestamp: { _gte: $day6Start, _lte: $day6End }\n extrinsic_id: { _is_null: false }\n }\n ) {\n aggregate {\n count\n }\n }\n activeAccountsDay6: transfer_aggregate(\n where: {\n timestamp: { _gte: $day6Start, _lte: $day6End }\n from_id: { _is_null: false }\n }\n ) {\n aggregate {\n count(columns: [from_id], distinct: true)\n }\n }\n }\n']; + source: '\n query GetHomeChainStats(\n $last24HourWhere: unified_transaction_bool_exp!\n $dayLimit: Int!\n ) {\n status: chain_stats_by_pk(id: "global") {\n block_height\n total_accounts\n total_deposit_accounts\n total_immediate_transfers\n total_scheduled_transfers\n total_executed_transfers\n total_cancelled_transfers\n }\n last24Hour: unified_transaction_aggregate(where: $last24HourWhere) {\n aggregate {\n count\n }\n }\n dailyStats: daily_chain_stats(order_by: { date: desc }, limit: $dayLimit) {\n id\n date\n blocks_count\n tx_count\n active_accounts\n }\n }\n' +): (typeof documents)['\n query GetHomeChainStats(\n $last24HourWhere: unified_transaction_bool_exp!\n $dayLimit: Int!\n ) {\n status: chain_stats_by_pk(id: "global") {\n block_height\n total_accounts\n total_deposit_accounts\n total_immediate_transfers\n total_scheduled_transfers\n total_executed_transfers\n total_cancelled_transfers\n }\n last24Hour: unified_transaction_aggregate(where: $last24HourWhere) {\n aggregate {\n count\n }\n }\n dailyStats: daily_chain_stats(order_by: { date: desc }, limit: $dayLimit) {\n id\n date\n blocks_count\n tx_count\n active_accounts\n }\n }\n']; /** * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ @@ -636,32 +633,26 @@ export function gql( * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ export function gql( - source: '\n query SearchAll($keyword: String, $keyword_number: Int, $limit: Int) {\n transactions: unified_transaction(\n limit: $limit\n where: {\n _or: [\n { hash: { _ilike: $keyword } }\n { detail_id: { _ilike: $keyword } }\n { id: { _ilike: $keyword } }\n ]\n }\n ) {\n id\n type\n hash\n detail_id\n block {\n height\n hash\n }\n }\n accounts: account(limit: $limit, where: { id: { _ilike: $keyword } }) {\n id\n }\n blocks: block(\n limit: $limit\n where: {\n _or: [\n { hash: { _ilike: $keyword } }\n { height: { _eq: $keyword_number } }\n ]\n }\n ) {\n height\n }\n highSecuritySets: high_security_set(\n limit: $limit\n where: { extrinsic: { id: { _ilike: $keyword } } }\n ) {\n extrinsic {\n id\n pallet\n call\n }\n }\n errorEvents: error_event(\n limit: $limit\n where: {\n _or: [\n { error_type: { _ilike: $keyword } }\n { error_name: { _ilike: $keyword } }\n ]\n }\n ) {\n extrinsic {\n id\n pallet\n call\n }\n }\n }\n ' -): (typeof documents)['\n query SearchAll($keyword: String, $keyword_number: Int, $limit: Int) {\n transactions: unified_transaction(\n limit: $limit\n where: {\n _or: [\n { hash: { _ilike: $keyword } }\n { detail_id: { _ilike: $keyword } }\n { id: { _ilike: $keyword } }\n ]\n }\n ) {\n id\n type\n hash\n detail_id\n block {\n height\n hash\n }\n }\n accounts: account(limit: $limit, where: { id: { _ilike: $keyword } }) {\n id\n }\n blocks: block(\n limit: $limit\n where: {\n _or: [\n { hash: { _ilike: $keyword } }\n { height: { _eq: $keyword_number } }\n ]\n }\n ) {\n height\n }\n highSecuritySets: high_security_set(\n limit: $limit\n where: { extrinsic: { id: { _ilike: $keyword } } }\n ) {\n extrinsic {\n id\n pallet\n call\n }\n }\n errorEvents: error_event(\n limit: $limit\n where: {\n _or: [\n { error_type: { _ilike: $keyword } }\n { error_name: { _ilike: $keyword } }\n ]\n }\n ) {\n extrinsic {\n id\n pallet\n call\n }\n }\n }\n ']; + source: '\n query SearchHex($keyword: String, $limit: Int) {\n transactions: unified_transaction(\n limit: $limit\n where: {\n _or: [{ hash: { _like: $keyword } }, { detail_id: { _like: $keyword } }]\n }\n ) {\n id\n type\n hash\n detail_id\n block {\n height\n hash\n }\n }\n blocks: block(limit: $limit, where: { hash: { _like: $keyword } }) {\n height\n }\n highSecuritySets: high_security_set(\n limit: $limit\n where: { extrinsic: { id: { _like: $keyword } } }\n ) {\n extrinsic {\n id\n pallet\n call\n }\n }\n }\n' +): (typeof documents)['\n query SearchHex($keyword: String, $limit: Int) {\n transactions: unified_transaction(\n limit: $limit\n where: {\n _or: [{ hash: { _like: $keyword } }, { detail_id: { _like: $keyword } }]\n }\n ) {\n id\n type\n hash\n detail_id\n block {\n height\n hash\n }\n }\n blocks: block(limit: $limit, where: { hash: { _like: $keyword } }) {\n height\n }\n highSecuritySets: high_security_set(\n limit: $limit\n where: { extrinsic: { id: { _like: $keyword } } }\n ) {\n extrinsic {\n id\n pallet\n call\n }\n }\n }\n']; /** * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ export function gql( - source: '\n query GetExtrinsicByHash($hash: String!) {\n extrinsics: extrinsic(where: { id: { _eq: $hash } }) {\n id\n pallet\n call\n success\n fee\n timestamp\n index_in_block\n signer {\n id\n }\n block {\n height\n }\n }\n transfersByExtrinsic: transfer(\n where: { extrinsic: { id: { _eq: $hash } } }\n order_by: { timestamp: asc }\n ) {\n id\n amount\n timestamp\n from {\n id\n }\n to {\n id\n }\n block {\n height\n }\n extrinsic {\n id\n pallet\n call\n success\n fee\n timestamp\n index_in_block\n signer {\n id\n }\n block {\n height\n }\n }\n }\n transfersById: transfer(where: { id: { _eq: $hash } }) {\n id\n amount\n timestamp\n from {\n id\n }\n to {\n id\n }\n block {\n height\n }\n extrinsic {\n id\n pallet\n call\n success\n fee\n timestamp\n index_in_block\n signer {\n id\n }\n block {\n height\n }\n }\n }\n }\n ' -): (typeof documents)['\n query GetExtrinsicByHash($hash: String!) {\n extrinsics: extrinsic(where: { id: { _eq: $hash } }) {\n id\n pallet\n call\n success\n fee\n timestamp\n index_in_block\n signer {\n id\n }\n block {\n height\n }\n }\n transfersByExtrinsic: transfer(\n where: { extrinsic: { id: { _eq: $hash } } }\n order_by: { timestamp: asc }\n ) {\n id\n amount\n timestamp\n from {\n id\n }\n to {\n id\n }\n block {\n height\n }\n extrinsic {\n id\n pallet\n call\n success\n fee\n timestamp\n index_in_block\n signer {\n id\n }\n block {\n height\n }\n }\n }\n transfersById: transfer(where: { id: { _eq: $hash } }) {\n id\n amount\n timestamp\n from {\n id\n }\n to {\n id\n }\n block {\n height\n }\n extrinsic {\n id\n pallet\n call\n success\n fee\n timestamp\n index_in_block\n signer {\n id\n }\n block {\n height\n }\n }\n }\n }\n ']; -/** - * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. - */ -export function gql( - source: '\n query GetUnifiedTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [unified_transaction_order_by!]\n $where: unified_transaction_bool_exp\n ) {\n transactions: unified_transaction(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n id\n type\n hash\n block {\n height\n hash\n }\n timestamp\n amount\n fee\n status\n detail_id\n from {\n id\n }\n to {\n id\n }\n }\n meta: unified_transaction_aggregate(where: $where) {\n aggregate {\n totalCount: count\n }\n }\n }\n ' -): (typeof documents)['\n query GetUnifiedTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [unified_transaction_order_by!]\n $where: unified_transaction_bool_exp\n ) {\n transactions: unified_transaction(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n id\n type\n hash\n block {\n height\n hash\n }\n timestamp\n amount\n fee\n status\n detail_id\n from {\n id\n }\n to {\n id\n }\n }\n meta: unified_transaction_aggregate(where: $where) {\n aggregate {\n totalCount: count\n }\n }\n }\n ']; + source: '\n query SearchNumeric($keyword: String, $keyword_number: Int, $limit: Int) {\n transactions: unified_transaction(\n limit: $limit\n where: { detail_id: { _like: $keyword } }\n ) {\n id\n type\n hash\n detail_id\n block {\n height\n hash\n }\n }\n blocks: block(limit: $limit, where: { height: { _eq: $keyword_number } }) {\n height\n }\n }\n' +): (typeof documents)['\n query SearchNumeric($keyword: String, $keyword_number: Int, $limit: Int) {\n transactions: unified_transaction(\n limit: $limit\n where: { detail_id: { _like: $keyword } }\n ) {\n id\n type\n hash\n detail_id\n block {\n height\n hash\n }\n }\n blocks: block(limit: $limit, where: { height: { _eq: $keyword_number } }) {\n height\n }\n }\n']; /** * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ export function gql( - source: '\n query GetRecentUnifiedTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [unified_transaction_order_by!]\n ) {\n transactions: unified_transaction(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n ) {\n id\n type\n hash\n block {\n height\n hash\n }\n timestamp\n amount\n fee\n status\n detail_id\n from {\n id\n }\n to {\n id\n }\n }\n }\n ' -): (typeof documents)['\n query GetRecentUnifiedTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [unified_transaction_order_by!]\n ) {\n transactions: unified_transaction(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n ) {\n id\n type\n hash\n block {\n height\n hash\n }\n timestamp\n amount\n fee\n status\n detail_id\n from {\n id\n }\n to {\n id\n }\n }\n }\n ']; + source: '\n query SearchText($keyword: String, $limit: Int) {\n accounts: account(limit: $limit, where: { id: { _like: $keyword } }) {\n id\n }\n errorEvents: error_event(\n limit: $limit\n where: {\n _or: [\n { error_type: { _ilike: $keyword } }\n { error_name: { _ilike: $keyword } }\n ]\n }\n ) {\n extrinsic {\n id\n pallet\n call\n }\n }\n }\n' +): (typeof documents)['\n query SearchText($keyword: String, $limit: Int) {\n accounts: account(limit: $limit, where: { id: { _like: $keyword } }) {\n id\n }\n errorEvents: error_event(\n limit: $limit\n where: {\n _or: [\n { error_type: { _ilike: $keyword } }\n { error_name: { _ilike: $keyword } }\n ]\n }\n ) {\n extrinsic {\n id\n pallet\n call\n }\n }\n }\n']; /** * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ export function gql( - source: '\n query GetUnifiedTransactionsStats(\n $startDate: timestamptz!\n $endDate: timestamptz!\n ) {\n last24Hour: unified_transaction_aggregate(\n where: { timestamp: { _gte: $startDate, _lte: $endDate } }\n ) {\n aggregate {\n totalCount: count\n }\n }\n allTime: unified_transaction_aggregate {\n aggregate {\n totalCount: count\n }\n }\n }\n ' -): (typeof documents)['\n query GetUnifiedTransactionsStats(\n $startDate: timestamptz!\n $endDate: timestamptz!\n ) {\n last24Hour: unified_transaction_aggregate(\n where: { timestamp: { _gte: $startDate, _lte: $endDate } }\n ) {\n aggregate {\n totalCount: count\n }\n }\n allTime: unified_transaction_aggregate {\n aggregate {\n totalCount: count\n }\n }\n }\n ']; + source: '\n query GetExtrinsicByHash($hash: String!) {\n extrinsics: extrinsic(where: { id: { _eq: $hash } }) {\n id\n pallet\n call\n success\n fee\n timestamp\n index_in_block\n signer {\n id\n }\n block {\n height\n }\n }\n transfersByExtrinsic: transfer(\n where: { extrinsic: { id: { _eq: $hash } } }\n order_by: { timestamp: asc }\n ) {\n id\n amount\n timestamp\n from {\n id\n }\n to {\n id\n }\n block {\n height\n }\n extrinsic {\n id\n pallet\n call\n success\n fee\n timestamp\n index_in_block\n signer {\n id\n }\n block {\n height\n }\n }\n }\n transfersById: transfer(where: { id: { _eq: $hash } }) {\n id\n amount\n timestamp\n from {\n id\n }\n to {\n id\n }\n block {\n height\n }\n extrinsic {\n id\n pallet\n call\n success\n fee\n timestamp\n index_in_block\n signer {\n id\n }\n block {\n height\n }\n }\n }\n }\n ' +): (typeof documents)['\n query GetExtrinsicByHash($hash: String!) {\n extrinsics: extrinsic(where: { id: { _eq: $hash } }) {\n id\n pallet\n call\n success\n fee\n timestamp\n index_in_block\n signer {\n id\n }\n block {\n height\n }\n }\n transfersByExtrinsic: transfer(\n where: { extrinsic: { id: { _eq: $hash } } }\n order_by: { timestamp: asc }\n ) {\n id\n amount\n timestamp\n from {\n id\n }\n to {\n id\n }\n block {\n height\n }\n extrinsic {\n id\n pallet\n call\n success\n fee\n timestamp\n index_in_block\n signer {\n id\n }\n block {\n height\n }\n }\n }\n transfersById: transfer(where: { id: { _eq: $hash } }) {\n id\n amount\n timestamp\n from {\n id\n }\n to {\n id\n }\n block {\n height\n }\n extrinsic {\n id\n pallet\n call\n success\n fee\n timestamp\n index_in_block\n signer {\n id\n }\n block {\n height\n }\n }\n }\n }\n ']; /** * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ diff --git a/src/__generated__/graphql.ts b/src/__generated__/graphql.ts index 387ac04..c3796f9 100644 --- a/src/__generated__/graphql.ts +++ b/src/__generated__/graphql.ts @@ -2138,6 +2138,181 @@ export enum Cursor_Ordering { Desc = 'DESC' } +/** columns and relationships of "daily_chain_stats" */ +export type Daily_Chain_Stats = { + __typename?: 'daily_chain_stats'; + active_accounts: Scalars['Int']['output']; + blocks_count: Scalars['Int']['output']; + date: Scalars['timestamptz']['output']; + id: Scalars['String']['output']; + tx_count: Scalars['Int']['output']; +}; + +/** aggregated selection of "daily_chain_stats" */ +export type Daily_Chain_Stats_Aggregate = { + __typename?: 'daily_chain_stats_aggregate'; + aggregate?: Maybe; + nodes: Array; +}; + +/** aggregate fields of "daily_chain_stats" */ +export type Daily_Chain_Stats_Aggregate_Fields = { + __typename?: 'daily_chain_stats_aggregate_fields'; + avg?: Maybe; + count: Scalars['Int']['output']; + max?: Maybe; + min?: Maybe; + stddev?: Maybe; + stddev_pop?: Maybe; + stddev_samp?: Maybe; + sum?: Maybe; + var_pop?: Maybe; + var_samp?: Maybe; + variance?: Maybe; +}; + +/** aggregate fields of "daily_chain_stats" */ +export type Daily_Chain_Stats_Aggregate_FieldsCountArgs = { + columns?: InputMaybe>; + distinct?: InputMaybe; +}; + +/** aggregate avg on columns */ +export type Daily_Chain_Stats_Avg_Fields = { + __typename?: 'daily_chain_stats_avg_fields'; + active_accounts?: Maybe; + blocks_count?: Maybe; + tx_count?: Maybe; +}; + +/** Boolean expression to filter rows from the table "daily_chain_stats". All fields are combined with a logical 'AND'. */ +export type Daily_Chain_Stats_Bool_Exp = { + _and?: InputMaybe>; + _not?: InputMaybe; + _or?: InputMaybe>; + active_accounts?: InputMaybe; + blocks_count?: InputMaybe; + date?: InputMaybe; + id?: InputMaybe; + tx_count?: InputMaybe; +}; + +/** aggregate max on columns */ +export type Daily_Chain_Stats_Max_Fields = { + __typename?: 'daily_chain_stats_max_fields'; + active_accounts?: Maybe; + blocks_count?: Maybe; + date?: Maybe; + id?: Maybe; + tx_count?: Maybe; +}; + +/** aggregate min on columns */ +export type Daily_Chain_Stats_Min_Fields = { + __typename?: 'daily_chain_stats_min_fields'; + active_accounts?: Maybe; + blocks_count?: Maybe; + date?: Maybe; + id?: Maybe; + tx_count?: Maybe; +}; + +/** Ordering options when selecting data from "daily_chain_stats". */ +export type Daily_Chain_Stats_Order_By = { + active_accounts?: InputMaybe; + blocks_count?: InputMaybe; + date?: InputMaybe; + id?: InputMaybe; + tx_count?: InputMaybe; +}; + +/** select columns of table "daily_chain_stats" */ +export enum Daily_Chain_Stats_Select_Column { + /** column name */ + ActiveAccounts = 'active_accounts', + /** column name */ + BlocksCount = 'blocks_count', + /** column name */ + Date = 'date', + /** column name */ + Id = 'id', + /** column name */ + TxCount = 'tx_count' +} + +/** aggregate stddev on columns */ +export type Daily_Chain_Stats_Stddev_Fields = { + __typename?: 'daily_chain_stats_stddev_fields'; + active_accounts?: Maybe; + blocks_count?: Maybe; + tx_count?: Maybe; +}; + +/** aggregate stddev_pop on columns */ +export type Daily_Chain_Stats_Stddev_Pop_Fields = { + __typename?: 'daily_chain_stats_stddev_pop_fields'; + active_accounts?: Maybe; + blocks_count?: Maybe; + tx_count?: Maybe; +}; + +/** aggregate stddev_samp on columns */ +export type Daily_Chain_Stats_Stddev_Samp_Fields = { + __typename?: 'daily_chain_stats_stddev_samp_fields'; + active_accounts?: Maybe; + blocks_count?: Maybe; + tx_count?: Maybe; +}; + +/** Streaming cursor of the table "daily_chain_stats" */ +export type Daily_Chain_Stats_Stream_Cursor_Input = { + /** Stream column input with initial value */ + initial_value: Daily_Chain_Stats_Stream_Cursor_Value_Input; + /** cursor ordering */ + ordering?: InputMaybe; +}; + +/** Initial value of the column from where the streaming should start */ +export type Daily_Chain_Stats_Stream_Cursor_Value_Input = { + active_accounts?: InputMaybe; + blocks_count?: InputMaybe; + date?: InputMaybe; + id?: InputMaybe; + tx_count?: InputMaybe; +}; + +/** aggregate sum on columns */ +export type Daily_Chain_Stats_Sum_Fields = { + __typename?: 'daily_chain_stats_sum_fields'; + active_accounts?: Maybe; + blocks_count?: Maybe; + tx_count?: Maybe; +}; + +/** aggregate var_pop on columns */ +export type Daily_Chain_Stats_Var_Pop_Fields = { + __typename?: 'daily_chain_stats_var_pop_fields'; + active_accounts?: Maybe; + blocks_count?: Maybe; + tx_count?: Maybe; +}; + +/** aggregate var_samp on columns */ +export type Daily_Chain_Stats_Var_Samp_Fields = { + __typename?: 'daily_chain_stats_var_samp_fields'; + active_accounts?: Maybe; + blocks_count?: Maybe; + tx_count?: Maybe; +}; + +/** aggregate variance on columns */ +export type Daily_Chain_Stats_Variance_Fields = { + __typename?: 'daily_chain_stats_variance_fields'; + active_accounts?: Maybe; + blocks_count?: Maybe; + tx_count?: Maybe; +}; + /** columns and relationships of "deposit_pool_stats" */ export type Deposit_Pool_Stats = { __typename?: 'deposit_pool_stats'; @@ -5450,6 +5625,12 @@ export type Query_Root = { chain_stats_aggregate: Chain_Stats_Aggregate; /** fetch data from the table: "chain_stats" using primary key columns */ chain_stats_by_pk?: Maybe; + /** fetch data from the table: "daily_chain_stats" */ + daily_chain_stats: Array; + /** fetch aggregated fields from the table: "daily_chain_stats" */ + daily_chain_stats_aggregate: Daily_Chain_Stats_Aggregate; + /** fetch data from the table: "daily_chain_stats" using primary key columns */ + daily_chain_stats_by_pk?: Maybe; /** fetch data from the table: "deposit_pool_stats" */ deposit_pool_stats: Array; /** fetch aggregated fields from the table: "deposit_pool_stats" */ @@ -5730,6 +5911,26 @@ export type Query_RootChain_Stats_By_PkArgs = { id: Scalars['String']['input']; }; +export type Query_RootDaily_Chain_StatsArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + +export type Query_RootDaily_Chain_Stats_AggregateArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + +export type Query_RootDaily_Chain_Stats_By_PkArgs = { + id: Scalars['String']['input']; +}; + export type Query_RootDeposit_Pool_StatsArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -6841,6 +7042,14 @@ export type Subscription_Root = { chain_stats_by_pk?: Maybe; /** fetch data from the table in a streaming manner: "chain_stats" */ chain_stats_stream: Array; + /** fetch data from the table: "daily_chain_stats" */ + daily_chain_stats: Array; + /** fetch aggregated fields from the table: "daily_chain_stats" */ + daily_chain_stats_aggregate: Daily_Chain_Stats_Aggregate; + /** fetch data from the table: "daily_chain_stats" using primary key columns */ + daily_chain_stats_by_pk?: Maybe; + /** fetch data from the table in a streaming manner: "daily_chain_stats" */ + daily_chain_stats_stream: Array; /** fetch data from the table: "deposit_pool_stats" */ deposit_pool_stats: Array; /** fetch aggregated fields from the table: "deposit_pool_stats" */ @@ -7209,6 +7418,32 @@ export type Subscription_RootChain_Stats_StreamArgs = { where?: InputMaybe; }; +export type Subscription_RootDaily_Chain_StatsArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + +export type Subscription_RootDaily_Chain_Stats_AggregateArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + +export type Subscription_RootDaily_Chain_Stats_By_PkArgs = { + id: Scalars['String']['input']; +}; + +export type Subscription_RootDaily_Chain_Stats_StreamArgs = { + batch_size: Scalars['Int']['input']; + cursor: Array>; + where?: InputMaybe; +}; + export type Subscription_RootDeposit_Pool_StatsArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -9582,6 +9817,13 @@ export type GetBlockByIdQuery = { miner?: { __typename?: 'account'; id: string } | null; block?: { __typename?: 'block'; height: number; hash: string } | null; }>; + rewardTransfers: Array<{ + __typename?: 'unified_transaction'; + amount?: any | null; + detail_id: string; + from?: { __typename?: 'account'; id: string } | null; + to?: { __typename?: 'account'; id: string } | null; + }>; }; export type GetBlockStatsQueryVariables = Exact<{ @@ -9635,22 +9877,8 @@ export type GetCancelledReversibleTransactionByTxIdQuery = { }; export type GetHomeChainStatsQueryVariables = Exact<{ - startDate: Scalars['timestamptz']['input']; - endDate: Scalars['timestamptz']['input']; - day0Start: Scalars['timestamptz']['input']; - day0End: Scalars['timestamptz']['input']; - day1Start: Scalars['timestamptz']['input']; - day1End: Scalars['timestamptz']['input']; - day2Start: Scalars['timestamptz']['input']; - day2End: Scalars['timestamptz']['input']; - day3Start: Scalars['timestamptz']['input']; - day3End: Scalars['timestamptz']['input']; - day4Start: Scalars['timestamptz']['input']; - day4End: Scalars['timestamptz']['input']; - day5Start: Scalars['timestamptz']['input']; - day5End: Scalars['timestamptz']['input']; - day6Start: Scalars['timestamptz']['input']; - day6End: Scalars['timestamptz']['input']; + last24HourWhere: Unified_Transaction_Bool_Exp; + dayLimit: Scalars['Int']['input']; }>; export type GetHomeChainStatsQuery = { @@ -9660,144 +9888,26 @@ export type GetHomeChainStatsQuery = { block_height: number; total_accounts: number; total_deposit_accounts: number; - total_executed_transfers: number; total_immediate_transfers: number; total_scheduled_transfers: number; + total_executed_transfers: number; total_cancelled_transfers: number; } | null; last24Hour: { - __typename?: 'transfer_aggregate'; - aggregate?: { - __typename?: 'transfer_aggregate_fields'; - count: number; - } | null; - }; - blocksDay0: { - __typename?: 'block_aggregate'; - aggregate?: { __typename?: 'block_aggregate_fields'; count: number } | null; - }; - transfersDay0: { - __typename?: 'transfer_aggregate'; - aggregate?: { - __typename?: 'transfer_aggregate_fields'; - count: number; - } | null; - }; - activeAccountsDay0: { - __typename?: 'transfer_aggregate'; - aggregate?: { - __typename?: 'transfer_aggregate_fields'; - count: number; - } | null; - }; - blocksDay1: { - __typename?: 'block_aggregate'; - aggregate?: { __typename?: 'block_aggregate_fields'; count: number } | null; - }; - transfersDay1: { - __typename?: 'transfer_aggregate'; - aggregate?: { - __typename?: 'transfer_aggregate_fields'; - count: number; - } | null; - }; - activeAccountsDay1: { - __typename?: 'transfer_aggregate'; - aggregate?: { - __typename?: 'transfer_aggregate_fields'; - count: number; - } | null; - }; - blocksDay2: { - __typename?: 'block_aggregate'; - aggregate?: { __typename?: 'block_aggregate_fields'; count: number } | null; - }; - transfersDay2: { - __typename?: 'transfer_aggregate'; - aggregate?: { - __typename?: 'transfer_aggregate_fields'; - count: number; - } | null; - }; - activeAccountsDay2: { - __typename?: 'transfer_aggregate'; - aggregate?: { - __typename?: 'transfer_aggregate_fields'; - count: number; - } | null; - }; - blocksDay3: { - __typename?: 'block_aggregate'; - aggregate?: { __typename?: 'block_aggregate_fields'; count: number } | null; - }; - transfersDay3: { - __typename?: 'transfer_aggregate'; - aggregate?: { - __typename?: 'transfer_aggregate_fields'; - count: number; - } | null; - }; - activeAccountsDay3: { - __typename?: 'transfer_aggregate'; - aggregate?: { - __typename?: 'transfer_aggregate_fields'; - count: number; - } | null; - }; - blocksDay4: { - __typename?: 'block_aggregate'; - aggregate?: { __typename?: 'block_aggregate_fields'; count: number } | null; - }; - transfersDay4: { - __typename?: 'transfer_aggregate'; - aggregate?: { - __typename?: 'transfer_aggregate_fields'; - count: number; - } | null; - }; - activeAccountsDay4: { - __typename?: 'transfer_aggregate'; - aggregate?: { - __typename?: 'transfer_aggregate_fields'; - count: number; - } | null; - }; - blocksDay5: { - __typename?: 'block_aggregate'; - aggregate?: { __typename?: 'block_aggregate_fields'; count: number } | null; - }; - transfersDay5: { - __typename?: 'transfer_aggregate'; - aggregate?: { - __typename?: 'transfer_aggregate_fields'; - count: number; - } | null; - }; - activeAccountsDay5: { - __typename?: 'transfer_aggregate'; - aggregate?: { - __typename?: 'transfer_aggregate_fields'; - count: number; - } | null; - }; - blocksDay6: { - __typename?: 'block_aggregate'; - aggregate?: { __typename?: 'block_aggregate_fields'; count: number } | null; - }; - transfersDay6: { - __typename?: 'transfer_aggregate'; - aggregate?: { - __typename?: 'transfer_aggregate_fields'; - count: number; - } | null; - }; - activeAccountsDay6: { - __typename?: 'transfer_aggregate'; + __typename?: 'unified_transaction_aggregate'; aggregate?: { - __typename?: 'transfer_aggregate_fields'; + __typename?: 'unified_transaction_aggregate_fields'; count: number; } | null; }; + dailyStats: Array<{ + __typename?: 'daily_chain_stats'; + id: string; + date: any; + blocks_count: number; + tx_count: number; + active_accounts: number; + }>; }; export type GetStatusQueryVariables = Exact<{ [key: string]: never }>; @@ -10963,13 +11073,12 @@ export type GetScheduledReversibleTransactionByTxIdQuery = { }>; }; -export type SearchAllQueryVariables = Exact<{ +export type SearchHexQueryVariables = Exact<{ keyword?: InputMaybe; - keyword_number?: InputMaybe; limit?: InputMaybe; }>; -export type SearchAllQuery = { +export type SearchHexQuery = { __typename?: 'query_root'; transactions: Array<{ __typename?: 'unified_transaction'; @@ -10979,7 +11088,6 @@ export type SearchAllQuery = { detail_id: string; block?: { __typename?: 'block'; height: number; hash: string } | null; }>; - accounts: Array<{ __typename?: 'account'; id: string }>; blocks: Array<{ __typename?: 'block'; height: number }>; highSecuritySets: Array<{ __typename?: 'high_security_set'; @@ -10990,6 +11098,35 @@ export type SearchAllQuery = { call: string; } | null; }>; +}; + +export type SearchNumericQueryVariables = Exact<{ + keyword?: InputMaybe; + keyword_number?: InputMaybe; + limit?: InputMaybe; +}>; + +export type SearchNumericQuery = { + __typename?: 'query_root'; + transactions: Array<{ + __typename?: 'unified_transaction'; + id: string; + type: string; + hash?: string | null; + detail_id: string; + block?: { __typename?: 'block'; height: number; hash: string } | null; + }>; + blocks: Array<{ __typename?: 'block'; height: number }>; +}; + +export type SearchTextQueryVariables = Exact<{ + keyword?: InputMaybe; + limit?: InputMaybe; +}>; + +export type SearchTextQuery = { + __typename?: 'query_root'; + accounts: Array<{ __typename?: 'account'; id: string }>; errorEvents: Array<{ __typename?: 'error_event'; extrinsic?: { @@ -11063,132 +11200,49 @@ export type GetExtrinsicByHashQuery = { }>; }; -export type GetUnifiedTransactionsQueryVariables = Exact<{ - limit?: InputMaybe; - offset?: InputMaybe; - orderBy?: InputMaybe< - Array | Unified_Transaction_Order_By - >; - where?: InputMaybe; +export type GetWormholeExtrinsicByIdQueryVariables = Exact<{ + id: Scalars['String']['input']; }>; -export type GetUnifiedTransactionsQuery = { +export type GetWormholeExtrinsicByIdQuery = { __typename?: 'query_root'; - transactions: Array<{ - __typename?: 'unified_transaction'; + wormholeExtrinsicById?: { + __typename?: 'wormhole_extrinsic'; id: string; - type: string; - hash?: string | null; + total_amount: any; + output_count: number; timestamp: any; - amount?: any | null; - fee?: any | null; - status: string; - detail_id: string; - block?: { __typename?: 'block'; height: number; hash: string } | null; - from?: { __typename?: 'account'; id: string } | null; - to?: { __typename?: 'account'; id: string } | null; - }>; - meta: { - __typename?: 'unified_transaction_aggregate'; - aggregate?: { - __typename?: 'unified_transaction_aggregate_fields'; - totalCount: number; + privacy_score: any; + privacy_score01_pct: any; + privacy_score1_pct: any; + privacy_score5_pct: any; + privacy_label: string; + pool_snapshot: string; + extrinsic?: { + __typename?: 'extrinsic'; + id: string; + pallet: string; + call: string; } | null; - }; -}; - -export type GetRecentUnifiedTransactionsQueryVariables = Exact<{ - limit?: InputMaybe; - offset?: InputMaybe; - orderBy?: InputMaybe< - Array | Unified_Transaction_Order_By - >; -}>; - -export type GetRecentUnifiedTransactionsQuery = { - __typename?: 'query_root'; - transactions: Array<{ - __typename?: 'unified_transaction'; - id: string; - type: string; - hash?: string | null; - timestamp: any; - amount?: any | null; - fee?: any | null; - status: string; - detail_id: string; - block?: { __typename?: 'block'; height: number; hash: string } | null; - from?: { __typename?: 'account'; id: string } | null; - to?: { __typename?: 'account'; id: string } | null; - }>; -}; - -export type GetUnifiedTransactionsStatsQueryVariables = Exact<{ - startDate: Scalars['timestamptz']['input']; - endDate: Scalars['timestamptz']['input']; -}>; - -export type GetUnifiedTransactionsStatsQuery = { - __typename?: 'query_root'; - last24Hour: { - __typename?: 'unified_transaction_aggregate'; - aggregate?: { - __typename?: 'unified_transaction_aggregate_fields'; - totalCount: number; - } | null; - }; - allTime: { - __typename?: 'unified_transaction_aggregate'; - aggregate?: { - __typename?: 'unified_transaction_aggregate_fields'; - totalCount: number; - } | null; - }; -}; - -export type GetWormholeExtrinsicByIdQueryVariables = Exact<{ - id: Scalars['String']['input']; -}>; - -export type GetWormholeExtrinsicByIdQuery = { - __typename?: 'query_root'; - wormholeExtrinsicById?: { - __typename?: 'wormhole_extrinsic'; - id: string; - total_amount: any; - output_count: number; - timestamp: any; - privacy_score: any; - privacy_score01_pct: any; - privacy_score1_pct: any; - privacy_score5_pct: any; - privacy_label: string; - pool_snapshot: string; - extrinsic?: { - __typename?: 'extrinsic'; - id: string; - pallet: string; - call: string; - } | null; - block?: { - __typename?: 'block'; - id: string; - height: number; - hash: string; - timestamp: any; - } | null; - outputs: Array<{ - __typename?: 'wormhole_output'; - id: string; - amount: any; - exitAccount?: { __typename?: 'account'; id: string } | null; - }>; - } | null; - wormholeNullifiers: Array<{ - __typename?: 'wormhole_nullifier'; - nullifier: string; - nullifier_hash: string; - }>; + block?: { + __typename?: 'block'; + id: string; + height: number; + hash: string; + timestamp: any; + } | null; + outputs: Array<{ + __typename?: 'wormhole_output'; + id: string; + amount: any; + exitAccount?: { __typename?: 'account'; id: string } | null; + }>; + } | null; + wormholeNullifiers: Array<{ + __typename?: 'wormhole_nullifier'; + nullifier: string; + nullifier_hash: string; + }>; }; export type GetTransactionsQueryVariables = Exact<{ @@ -13200,6 +13254,155 @@ export const GetBlockByIdDocument = { } ] } + }, + { + kind: 'Field', + alias: { kind: 'Name', value: 'rewardTransfers' }, + name: { kind: 'Name', value: 'unified_transaction' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'where' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'type' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_eq' }, + value: { + kind: 'StringValue', + value: 'IMMEDIATE', + block: false + } + } + ] + } + }, + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'hash' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_is_null' }, + value: { kind: 'BooleanValue', value: true } + } + ] + } + }, + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'block' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_or' }, + value: { + kind: 'ListValue', + values: [ + { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'height' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { + kind: 'Name', + value: '_eq' + }, + value: { + kind: 'Variable', + name: { + kind: 'Name', + value: 'height' + } + } + } + ] + } + } + ] + }, + { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'hash' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { + kind: 'Name', + value: '_eq' + }, + value: { + kind: 'Variable', + name: { + kind: 'Name', + value: 'hash' + } + } + } + ] + } + } + ] + } + ] + } + } + ] + } + } + ] + } + } + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'amount' } }, + { kind: 'Field', name: { kind: 'Name', value: 'detail_id' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'from' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } } + ] + } + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'to' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } } + ] + } + } + ] + } } ] } @@ -13498,27 +13701,13 @@ export const GetHomeChainStatsDocument = { kind: 'VariableDefinition', variable: { kind: 'Variable', - name: { kind: 'Name', value: 'startDate' } - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'timestamptz' } - } - } - }, - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'endDate' } + name: { kind: 'Name', value: 'last24HourWhere' } }, type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { kind: 'Name', value: 'timestamptz' } + name: { kind: 'Name', value: 'unified_transaction_bool_exp' } } } }, @@ -13526,196 +13715,11 @@ export const GetHomeChainStatsDocument = { kind: 'VariableDefinition', variable: { kind: 'Variable', - name: { kind: 'Name', value: 'day0Start' } + name: { kind: 'Name', value: 'dayLimit' } }, type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'timestamptz' } - } - } - }, - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'day0End' } - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'timestamptz' } - } - } - }, - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'day1Start' } - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'timestamptz' } - } - } - }, - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'day1End' } - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'timestamptz' } - } - } - }, - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'day2Start' } - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'timestamptz' } - } - } - }, - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'day2End' } - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'timestamptz' } - } - } - }, - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'day3Start' } - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'timestamptz' } - } - } - }, - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'day3End' } - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'timestamptz' } - } - } - }, - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'day4Start' } - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'timestamptz' } - } - } - }, - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'day4End' } - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'timestamptz' } - } - } - }, - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'day5Start' } - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'timestamptz' } - } - } - }, - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'day5End' } - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'timestamptz' } - } - } - }, - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'day6Start' } - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'timestamptz' } - } - } - }, - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'day6End' } - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'timestamptz' } - } + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } } } } ], @@ -13750,15 +13754,15 @@ export const GetHomeChainStatsDocument = { }, { kind: 'Field', - name: { kind: 'Name', value: 'total_executed_transfers' } + name: { kind: 'Name', value: 'total_immediate_transfers' } }, { kind: 'Field', - name: { kind: 'Name', value: 'total_immediate_transfers' } + name: { kind: 'Name', value: 'total_scheduled_transfers' } }, { kind: 'Field', - name: { kind: 'Name', value: 'total_scheduled_transfers' } + name: { kind: 'Name', value: 'total_executed_transfers' } }, { kind: 'Field', @@ -13770,54 +13774,14 @@ export const GetHomeChainStatsDocument = { { kind: 'Field', alias: { kind: 'Name', value: 'last24Hour' }, - name: { kind: 'Name', value: 'transfer_aggregate' }, + name: { kind: 'Name', value: 'unified_transaction_aggregate' }, arguments: [ { kind: 'Argument', name: { kind: 'Name', value: 'where' }, value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'timestamp' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_gte' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'startDate' } - } - }, - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_lte' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'endDate' } - } - } - ] - } - }, - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'extrinsic_id' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_is_null' }, - value: { kind: 'BooleanValue', value: false } - } - ] - } - } - ] + kind: 'Variable', + name: { kind: 'Name', value: 'last24HourWhere' } } } ], @@ -13839,1498 +13803,45 @@ export const GetHomeChainStatsDocument = { }, { kind: 'Field', - alias: { kind: 'Name', value: 'blocksDay0' }, - name: { kind: 'Name', value: 'block_aggregate' }, + alias: { kind: 'Name', value: 'dailyStats' }, + name: { kind: 'Name', value: 'daily_chain_stats' }, arguments: [ { kind: 'Argument', - name: { kind: 'Name', value: 'where' }, + name: { kind: 'Name', value: 'order_by' }, value: { kind: 'ObjectValue', fields: [ { kind: 'ObjectField', - name: { kind: 'Name', value: 'timestamp' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_gte' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'day0Start' } - } - }, - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_lte' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'day0End' } - } - } - ] - } + name: { kind: 'Name', value: 'date' }, + value: { kind: 'EnumValue', value: 'desc' } } ] } + }, + { + kind: 'Argument', + name: { kind: 'Name', value: 'limit' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'dayLimit' } + } } ], selectionSet: { kind: 'SelectionSet', selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { kind: 'Field', name: { kind: 'Name', value: 'date' } }, { kind: 'Field', - name: { kind: 'Name', value: 'aggregate' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'count' } } - ] - } - } - ] - } - }, - { - kind: 'Field', - alias: { kind: 'Name', value: 'transfersDay0' }, - name: { kind: 'Name', value: 'transfer_aggregate' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'where' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'timestamp' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_gte' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'day0Start' } - } - }, - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_lte' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'day0End' } - } - } - ] - } - }, - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'extrinsic_id' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_is_null' }, - value: { kind: 'BooleanValue', value: false } - } - ] - } - } - ] - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'aggregate' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'count' } } - ] - } - } - ] - } - }, - { - kind: 'Field', - alias: { kind: 'Name', value: 'activeAccountsDay0' }, - name: { kind: 'Name', value: 'transfer_aggregate' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'where' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'timestamp' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_gte' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'day0Start' } - } - }, - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_lte' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'day0End' } - } - } - ] - } - }, - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'from_id' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_is_null' }, - value: { kind: 'BooleanValue', value: false } - } - ] - } - } - ] - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'aggregate' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'count' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'columns' }, - value: { - kind: 'ListValue', - values: [{ kind: 'EnumValue', value: 'from_id' }] - } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'distinct' }, - value: { kind: 'BooleanValue', value: true } - } - ] - } - ] - } - } - ] - } - }, - { - kind: 'Field', - alias: { kind: 'Name', value: 'blocksDay1' }, - name: { kind: 'Name', value: 'block_aggregate' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'where' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'timestamp' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_gte' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'day1Start' } - } - }, - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_lte' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'day1End' } - } - } - ] - } - } - ] - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'aggregate' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'count' } } - ] - } - } - ] - } - }, - { - kind: 'Field', - alias: { kind: 'Name', value: 'transfersDay1' }, - name: { kind: 'Name', value: 'transfer_aggregate' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'where' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'timestamp' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_gte' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'day1Start' } - } - }, - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_lte' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'day1End' } - } - } - ] - } - }, - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'extrinsic_id' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_is_null' }, - value: { kind: 'BooleanValue', value: false } - } - ] - } - } - ] - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'aggregate' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'count' } } - ] - } - } - ] - } - }, - { - kind: 'Field', - alias: { kind: 'Name', value: 'activeAccountsDay1' }, - name: { kind: 'Name', value: 'transfer_aggregate' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'where' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'timestamp' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_gte' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'day1Start' } - } - }, - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_lte' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'day1End' } - } - } - ] - } - }, - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'from_id' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_is_null' }, - value: { kind: 'BooleanValue', value: false } - } - ] - } - } - ] - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'aggregate' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'count' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'columns' }, - value: { - kind: 'ListValue', - values: [{ kind: 'EnumValue', value: 'from_id' }] - } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'distinct' }, - value: { kind: 'BooleanValue', value: true } - } - ] - } - ] - } - } - ] - } - }, - { - kind: 'Field', - alias: { kind: 'Name', value: 'blocksDay2' }, - name: { kind: 'Name', value: 'block_aggregate' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'where' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'timestamp' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_gte' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'day2Start' } - } - }, - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_lte' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'day2End' } - } - } - ] - } - } - ] - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'aggregate' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'count' } } - ] - } - } - ] - } - }, - { - kind: 'Field', - alias: { kind: 'Name', value: 'transfersDay2' }, - name: { kind: 'Name', value: 'transfer_aggregate' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'where' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'timestamp' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_gte' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'day2Start' } - } - }, - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_lte' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'day2End' } - } - } - ] - } - }, - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'extrinsic_id' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_is_null' }, - value: { kind: 'BooleanValue', value: false } - } - ] - } - } - ] - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'aggregate' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'count' } } - ] - } - } - ] - } - }, - { - kind: 'Field', - alias: { kind: 'Name', value: 'activeAccountsDay2' }, - name: { kind: 'Name', value: 'transfer_aggregate' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'where' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'timestamp' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_gte' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'day2Start' } - } - }, - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_lte' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'day2End' } - } - } - ] - } - }, - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'from_id' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_is_null' }, - value: { kind: 'BooleanValue', value: false } - } - ] - } - } - ] - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'aggregate' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'count' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'columns' }, - value: { - kind: 'ListValue', - values: [{ kind: 'EnumValue', value: 'from_id' }] - } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'distinct' }, - value: { kind: 'BooleanValue', value: true } - } - ] - } - ] - } - } - ] - } - }, - { - kind: 'Field', - alias: { kind: 'Name', value: 'blocksDay3' }, - name: { kind: 'Name', value: 'block_aggregate' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'where' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'timestamp' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_gte' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'day3Start' } - } - }, - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_lte' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'day3End' } - } - } - ] - } - } - ] - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'aggregate' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'count' } } - ] - } - } - ] - } - }, - { - kind: 'Field', - alias: { kind: 'Name', value: 'transfersDay3' }, - name: { kind: 'Name', value: 'transfer_aggregate' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'where' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'timestamp' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_gte' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'day3Start' } - } - }, - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_lte' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'day3End' } - } - } - ] - } - }, - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'extrinsic_id' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_is_null' }, - value: { kind: 'BooleanValue', value: false } - } - ] - } - } - ] - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'aggregate' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'count' } } - ] - } - } - ] - } - }, - { - kind: 'Field', - alias: { kind: 'Name', value: 'activeAccountsDay3' }, - name: { kind: 'Name', value: 'transfer_aggregate' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'where' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'timestamp' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_gte' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'day3Start' } - } - }, - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_lte' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'day3End' } - } - } - ] - } - }, - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'from_id' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_is_null' }, - value: { kind: 'BooleanValue', value: false } - } - ] - } - } - ] - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'aggregate' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'count' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'columns' }, - value: { - kind: 'ListValue', - values: [{ kind: 'EnumValue', value: 'from_id' }] - } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'distinct' }, - value: { kind: 'BooleanValue', value: true } - } - ] - } - ] - } - } - ] - } - }, - { - kind: 'Field', - alias: { kind: 'Name', value: 'blocksDay4' }, - name: { kind: 'Name', value: 'block_aggregate' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'where' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'timestamp' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_gte' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'day4Start' } - } - }, - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_lte' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'day4End' } - } - } - ] - } - } - ] - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'aggregate' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'count' } } - ] - } - } - ] - } - }, - { - kind: 'Field', - alias: { kind: 'Name', value: 'transfersDay4' }, - name: { kind: 'Name', value: 'transfer_aggregate' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'where' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'timestamp' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_gte' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'day4Start' } - } - }, - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_lte' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'day4End' } - } - } - ] - } - }, - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'extrinsic_id' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_is_null' }, - value: { kind: 'BooleanValue', value: false } - } - ] - } - } - ] - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'aggregate' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'count' } } - ] - } - } - ] - } - }, - { - kind: 'Field', - alias: { kind: 'Name', value: 'activeAccountsDay4' }, - name: { kind: 'Name', value: 'transfer_aggregate' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'where' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'timestamp' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_gte' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'day4Start' } - } - }, - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_lte' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'day4End' } - } - } - ] - } - }, - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'from_id' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_is_null' }, - value: { kind: 'BooleanValue', value: false } - } - ] - } - } - ] - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'aggregate' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'count' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'columns' }, - value: { - kind: 'ListValue', - values: [{ kind: 'EnumValue', value: 'from_id' }] - } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'distinct' }, - value: { kind: 'BooleanValue', value: true } - } - ] - } - ] - } - } - ] - } - }, - { - kind: 'Field', - alias: { kind: 'Name', value: 'blocksDay5' }, - name: { kind: 'Name', value: 'block_aggregate' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'where' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'timestamp' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_gte' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'day5Start' } - } - }, - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_lte' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'day5End' } - } - } - ] - } - } - ] - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'aggregate' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'count' } } - ] - } - } - ] - } - }, - { - kind: 'Field', - alias: { kind: 'Name', value: 'transfersDay5' }, - name: { kind: 'Name', value: 'transfer_aggregate' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'where' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'timestamp' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_gte' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'day5Start' } - } - }, - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_lte' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'day5End' } - } - } - ] - } - }, - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'extrinsic_id' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_is_null' }, - value: { kind: 'BooleanValue', value: false } - } - ] - } - } - ] - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'aggregate' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'count' } } - ] - } - } - ] - } - }, - { - kind: 'Field', - alias: { kind: 'Name', value: 'activeAccountsDay5' }, - name: { kind: 'Name', value: 'transfer_aggregate' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'where' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'timestamp' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_gte' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'day5Start' } - } - }, - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_lte' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'day5End' } - } - } - ] - } - }, - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'from_id' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_is_null' }, - value: { kind: 'BooleanValue', value: false } - } - ] - } - } - ] - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'aggregate' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'count' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'columns' }, - value: { - kind: 'ListValue', - values: [{ kind: 'EnumValue', value: 'from_id' }] - } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'distinct' }, - value: { kind: 'BooleanValue', value: true } - } - ] - } - ] - } - } - ] - } - }, - { - kind: 'Field', - alias: { kind: 'Name', value: 'blocksDay6' }, - name: { kind: 'Name', value: 'block_aggregate' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'where' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'timestamp' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_gte' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'day6Start' } - } - }, - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_lte' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'day6End' } - } - } - ] - } - } - ] - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'aggregate' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'count' } } - ] - } - } - ] - } - }, - { - kind: 'Field', - alias: { kind: 'Name', value: 'transfersDay6' }, - name: { kind: 'Name', value: 'transfer_aggregate' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'where' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'timestamp' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_gte' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'day6Start' } - } - }, - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_lte' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'day6End' } - } - } - ] - } - }, - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'extrinsic_id' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_is_null' }, - value: { kind: 'BooleanValue', value: false } - } - ] - } - } - ] - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'aggregate' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'count' } } - ] - } - } - ] - } - }, - { - kind: 'Field', - alias: { kind: 'Name', value: 'activeAccountsDay6' }, - name: { kind: 'Name', value: 'transfer_aggregate' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'where' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'timestamp' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_gte' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'day6Start' } - } - }, - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_lte' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'day6End' } - } - } - ] - } - }, - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'from_id' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_is_null' }, - value: { kind: 'BooleanValue', value: false } - } - ] - } - } - ] - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'aggregate' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'count' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'columns' }, - value: { - kind: 'ListValue', - values: [{ kind: 'EnumValue', value: 'from_id' }] - } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'distinct' }, - value: { kind: 'BooleanValue', value: true } - } - ] - } - ] - } + name: { kind: 'Name', value: 'blocks_count' } + }, + { kind: 'Field', name: { kind: 'Name', value: 'tx_count' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'active_accounts' } } ] } @@ -22408,13 +20919,13 @@ export const GetScheduledReversibleTransactionByTxIdDocument = { GetScheduledReversibleTransactionByTxIdQuery, GetScheduledReversibleTransactionByTxIdQueryVariables >; -export const SearchAllDocument = { +export const SearchHexDocument = { kind: 'Document', definitions: [ { kind: 'OperationDefinition', operation: 'query', - name: { kind: 'Name', value: 'SearchAll' }, + name: { kind: 'Name', value: 'SearchHex' }, variableDefinitions: [ { kind: 'VariableDefinition', @@ -22424,14 +20935,6 @@ export const SearchAllDocument = { }, type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } } }, - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'keyword_number' } - }, - type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } } - }, { kind: 'VariableDefinition', variable: { @@ -22480,7 +20983,7 @@ export const SearchAllDocument = { fields: [ { kind: 'ObjectField', - name: { kind: 'Name', value: '_ilike' }, + name: { kind: 'Name', value: '_like' }, value: { kind: 'Variable', name: { kind: 'Name', value: 'keyword' } @@ -22502,29 +21005,7 @@ export const SearchAllDocument = { fields: [ { kind: 'ObjectField', - name: { kind: 'Name', value: '_ilike' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'keyword' } - } - } - ] - } - } - ] - }, - { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'id' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_ilike' }, + name: { kind: 'Name', value: '_like' }, value: { kind: 'Variable', name: { kind: 'Name', value: 'keyword' } @@ -22566,53 +21047,6 @@ export const SearchAllDocument = { ] } }, - { - kind: 'Field', - alias: { kind: 'Name', value: 'accounts' }, - name: { kind: 'Name', value: 'account' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'limit' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'limit' } - } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'where' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'id' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_ilike' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'keyword' } - } - } - ] - } - } - ] - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } } - ] - } - }, { kind: 'Field', alias: { kind: 'Name', value: 'blocks' }, @@ -22624,66 +21058,27 @@ export const SearchAllDocument = { value: { kind: 'Variable', name: { kind: 'Name', value: 'limit' } - } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'where' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_or' }, - value: { - kind: 'ListValue', - values: [ - { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'hash' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_ilike' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'keyword' } - } - } - ] - } - } - ] - }, + } + }, + { + kind: 'Argument', + name: { kind: 'Name', value: 'where' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'hash' }, + value: { + kind: 'ObjectValue', + fields: [ { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'height' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_eq' }, - value: { - kind: 'Variable', - name: { - kind: 'Name', - value: 'keyword_number' - } - } - } - ] - } - } - ] + kind: 'ObjectField', + name: { kind: 'Name', value: '_like' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'keyword' } + } } ] } @@ -22732,7 +21127,7 @@ export const SearchAllDocument = { fields: [ { kind: 'ObjectField', - name: { kind: 'Name', value: '_ilike' }, + name: { kind: 'Name', value: '_like' }, value: { kind: 'Variable', name: { kind: 'Name', value: 'keyword' } @@ -22768,11 +21163,52 @@ export const SearchAllDocument = { } ] } + } + ] + } + } + ] +} as unknown as DocumentNode; +export const SearchNumericDocument = { + kind: 'Document', + definitions: [ + { + kind: 'OperationDefinition', + operation: 'query', + name: { kind: 'Name', value: 'SearchNumeric' }, + variableDefinitions: [ + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'keyword' } + }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } } + }, + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'keyword_number' } + }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } } + }, + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'limit' } }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } } + } + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ { kind: 'Field', - alias: { kind: 'Name', value: 'errorEvents' }, - name: { kind: 'Name', value: 'error_event' }, + alias: { kind: 'Name', value: 'transactions' }, + name: { kind: 'Name', value: 'unified_transaction' }, arguments: [ { kind: 'Argument', @@ -22790,53 +21226,17 @@ export const SearchAllDocument = { fields: [ { kind: 'ObjectField', - name: { kind: 'Name', value: '_or' }, + name: { kind: 'Name', value: 'detail_id' }, value: { - kind: 'ListValue', - values: [ - { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'error_type' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_ilike' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'keyword' } - } - } - ] - } - } - ] - }, + kind: 'ObjectValue', + fields: [ { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'error_name' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_ilike' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'keyword' } - } - } - ] - } - } - ] + kind: 'ObjectField', + name: { kind: 'Name', value: '_like' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'keyword' } + } } ] } @@ -22848,54 +21248,40 @@ export const SearchAllDocument = { selectionSet: { kind: 'SelectionSet', selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { kind: 'Field', name: { kind: 'Name', value: 'type' } }, + { kind: 'Field', name: { kind: 'Name', value: 'hash' } }, + { kind: 'Field', name: { kind: 'Name', value: 'detail_id' } }, { kind: 'Field', - name: { kind: 'Name', value: 'extrinsic' }, + name: { kind: 'Name', value: 'block' }, selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, { kind: 'Field', - name: { kind: 'Name', value: 'pallet' } + name: { kind: 'Name', value: 'height' } }, - { kind: 'Field', name: { kind: 'Name', value: 'call' } } + { kind: 'Field', name: { kind: 'Name', value: 'hash' } } ] } } ] } - } - ] - } - } - ] -} as unknown as DocumentNode; -export const GetExtrinsicByHashDocument = { - kind: 'Document', - definitions: [ - { - kind: 'OperationDefinition', - operation: 'query', - name: { kind: 'Name', value: 'GetExtrinsicByHash' }, - variableDefinitions: [ - { - kind: 'VariableDefinition', - variable: { kind: 'Variable', name: { kind: 'Name', value: 'hash' } }, - type: { - kind: 'NonNullType', - type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } } - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ + }, { kind: 'Field', - alias: { kind: 'Name', value: 'extrinsics' }, - name: { kind: 'Name', value: 'extrinsic' }, + alias: { kind: 'Name', value: 'blocks' }, + name: { kind: 'Name', value: 'block' }, arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'limit' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'limit' } + } + }, { kind: 'Argument', name: { kind: 'Name', value: 'where' }, @@ -22904,7 +21290,7 @@ export const GetExtrinsicByHashDocument = { fields: [ { kind: 'ObjectField', - name: { kind: 'Name', value: 'id' }, + name: { kind: 'Name', value: 'height' }, value: { kind: 'ObjectValue', fields: [ @@ -22913,7 +21299,7 @@ export const GetExtrinsicByHashDocument = { name: { kind: 'Name', value: '_eq' }, value: { kind: 'Variable', - name: { kind: 'Name', value: 'hash' } + name: { kind: 'Name', value: 'keyword_number' } } } ] @@ -22926,44 +21312,56 @@ export const GetExtrinsicByHashDocument = { selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { kind: 'Field', name: { kind: 'Name', value: 'pallet' } }, - { kind: 'Field', name: { kind: 'Name', value: 'call' } }, - { kind: 'Field', name: { kind: 'Name', value: 'success' } }, - { kind: 'Field', name: { kind: 'Name', value: 'fee' } }, - { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'index_in_block' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'signer' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'block' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'height' } } - ] - } - } + { kind: 'Field', name: { kind: 'Name', value: 'height' } } ] } + } + ] + } + } + ] +} as unknown as DocumentNode; +export const SearchTextDocument = { + kind: 'Document', + definitions: [ + { + kind: 'OperationDefinition', + operation: 'query', + name: { kind: 'Name', value: 'SearchText' }, + variableDefinitions: [ + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'keyword' } + }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } } + }, + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'limit' } }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } } + } + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ { kind: 'Field', - alias: { kind: 'Name', value: 'transfersByExtrinsic' }, - name: { kind: 'Name', value: 'transfer' }, + alias: { kind: 'Name', value: 'accounts' }, + name: { kind: 'Name', value: 'account' }, arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'limit' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'limit' } + } + }, { kind: 'Argument', name: { kind: 'Name', value: 'where' }, @@ -22972,25 +21370,16 @@ export const GetExtrinsicByHashDocument = { fields: [ { kind: 'ObjectField', - name: { kind: 'Name', value: 'extrinsic' }, + name: { kind: 'Name', value: 'id' }, value: { kind: 'ObjectValue', fields: [ { kind: 'ObjectField', - name: { kind: 'Name', value: 'id' }, + name: { kind: 'Name', value: '_like' }, value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_eq' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'hash' } - } - } - ] + kind: 'Variable', + name: { kind: 'Name', value: 'keyword' } } } ] @@ -22998,120 +21387,28 @@ export const GetExtrinsicByHashDocument = { } ] } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'order_by' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'timestamp' }, - value: { kind: 'EnumValue', value: 'asc' } - } - ] - } } ], selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { kind: 'Field', name: { kind: 'Name', value: 'amount' } }, - { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'from' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'to' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'block' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'height' } } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'extrinsic' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'pallet' } - }, - { kind: 'Field', name: { kind: 'Name', value: 'call' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'success' } - }, - { kind: 'Field', name: { kind: 'Name', value: 'fee' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'timestamp' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'index_in_block' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'signer' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'id' } - } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'block' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'height' } - } - ] - } - } - ] - } - } + { kind: 'Field', name: { kind: 'Name', value: 'id' } } ] } }, { kind: 'Field', - alias: { kind: 'Name', value: 'transfersById' }, - name: { kind: 'Name', value: 'transfer' }, + alias: { kind: 'Name', value: 'errorEvents' }, + name: { kind: 'Name', value: 'error_event' }, arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'limit' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'limit' } + } + }, { kind: 'Argument', name: { kind: 'Name', value: 'where' }, @@ -23120,17 +21417,53 @@ export const GetExtrinsicByHashDocument = { fields: [ { kind: 'ObjectField', - name: { kind: 'Name', value: 'id' }, + name: { kind: 'Name', value: '_or' }, value: { - kind: 'ObjectValue', - fields: [ + kind: 'ListValue', + values: [ { - kind: 'ObjectField', - name: { kind: 'Name', value: '_eq' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'hash' } - } + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'error_type' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_ilike' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'keyword' } + } + } + ] + } + } + ] + }, + { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'error_name' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_ilike' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'keyword' } + } + } + ] + } + } + ] } ] } @@ -23140,92 +21473,20 @@ export const GetExtrinsicByHashDocument = { } ], selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { kind: 'Field', name: { kind: 'Name', value: 'amount' } }, - { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'from' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'to' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'block' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'height' } } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'extrinsic' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'pallet' } - }, - { kind: 'Field', name: { kind: 'Name', value: 'call' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'success' } - }, - { kind: 'Field', name: { kind: 'Name', value: 'fee' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'timestamp' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'index_in_block' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'signer' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'id' } - } - ] - } - }, + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'extrinsic' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, { kind: 'Field', - name: { kind: 'Name', value: 'block' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'height' } - } - ] - } - } + name: { kind: 'Name', value: 'pallet' } + }, + { kind: 'Field', name: { kind: 'Name', value: 'call' } } ] } } @@ -23236,60 +21497,21 @@ export const GetExtrinsicByHashDocument = { } } ] -} as unknown as DocumentNode< - GetExtrinsicByHashQuery, - GetExtrinsicByHashQueryVariables ->; -export const GetUnifiedTransactionsDocument = { +} as unknown as DocumentNode; +export const GetExtrinsicByHashDocument = { kind: 'Document', definitions: [ { kind: 'OperationDefinition', operation: 'query', - name: { kind: 'Name', value: 'GetUnifiedTransactions' }, + name: { kind: 'Name', value: 'GetExtrinsicByHash' }, variableDefinitions: [ { kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'limit' } - }, - type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } } - }, - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'offset' } - }, - type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } } - }, - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'orderBy' } - }, - type: { - kind: 'ListType', - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'unified_transaction_order_by' } - } - } - } - }, - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'where' } - }, + variable: { kind: 'Variable', name: { kind: 'Name', value: 'hash' } }, type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'unified_transaction_bool_exp' } + kind: 'NonNullType', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } } } } ], @@ -23298,39 +21520,33 @@ export const GetUnifiedTransactionsDocument = { selections: [ { kind: 'Field', - alias: { kind: 'Name', value: 'transactions' }, - name: { kind: 'Name', value: 'unified_transaction' }, + alias: { kind: 'Name', value: 'extrinsics' }, + name: { kind: 'Name', value: 'extrinsic' }, arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'limit' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'limit' } - } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'offset' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'offset' } - } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'order_by' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'orderBy' } - } - }, { kind: 'Argument', name: { kind: 'Name', value: 'where' }, value: { - kind: 'Variable', - name: { kind: 'Name', value: 'where' } + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'id' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_eq' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'hash' } + } + } + ] + } + } + ] } } ], @@ -23338,30 +21554,18 @@ export const GetUnifiedTransactionsDocument = { kind: 'SelectionSet', selections: [ { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { kind: 'Field', name: { kind: 'Name', value: 'type' } }, - { kind: 'Field', name: { kind: 'Name', value: 'hash' } }, + { kind: 'Field', name: { kind: 'Name', value: 'pallet' } }, + { kind: 'Field', name: { kind: 'Name', value: 'call' } }, + { kind: 'Field', name: { kind: 'Name', value: 'success' } }, + { kind: 'Field', name: { kind: 'Name', value: 'fee' } }, + { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, { kind: 'Field', - name: { kind: 'Name', value: 'block' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'height' } - }, - { kind: 'Field', name: { kind: 'Name', value: 'hash' } } - ] - } + name: { kind: 'Name', value: 'index_in_block' } }, - { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, - { kind: 'Field', name: { kind: 'Name', value: 'amount' } }, - { kind: 'Field', name: { kind: 'Name', value: 'fee' } }, - { kind: 'Field', name: { kind: 'Name', value: 'status' } }, - { kind: 'Field', name: { kind: 'Name', value: 'detail_id' } }, { kind: 'Field', - name: { kind: 'Name', value: 'from' }, + name: { kind: 'Name', value: 'signer' }, selectionSet: { kind: 'SelectionSet', selections: [ @@ -23371,11 +21575,11 @@ export const GetUnifiedTransactionsDocument = { }, { kind: 'Field', - name: { kind: 'Name', value: 'to' }, + name: { kind: 'Name', value: 'block' }, selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } } + { kind: 'Field', name: { kind: 'Name', value: 'height' } } ] } } @@ -23384,118 +21588,56 @@ export const GetUnifiedTransactionsDocument = { }, { kind: 'Field', - alias: { kind: 'Name', value: 'meta' }, - name: { kind: 'Name', value: 'unified_transaction_aggregate' }, + alias: { kind: 'Name', value: 'transfersByExtrinsic' }, + name: { kind: 'Name', value: 'transfer' }, arguments: [ { kind: 'Argument', name: { kind: 'Name', value: 'where' }, value: { - kind: 'Variable', - name: { kind: 'Name', value: 'where' } - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'aggregate' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - alias: { kind: 'Name', value: 'totalCount' }, - name: { kind: 'Name', value: 'count' } - } - ] - } - } - ] - } - } - ] - } - } - ] -} as unknown as DocumentNode< - GetUnifiedTransactionsQuery, - GetUnifiedTransactionsQueryVariables ->; -export const GetRecentUnifiedTransactionsDocument = { - kind: 'Document', - definitions: [ - { - kind: 'OperationDefinition', - operation: 'query', - name: { kind: 'Name', value: 'GetRecentUnifiedTransactions' }, - variableDefinitions: [ - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'limit' } - }, - type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } } - }, - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'offset' } - }, - type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } } - }, - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'orderBy' } - }, - type: { - kind: 'ListType', - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'unified_transaction_order_by' } - } - } - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - alias: { kind: 'Name', value: 'transactions' }, - name: { kind: 'Name', value: 'unified_transaction' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'limit' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'limit' } - } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'offset' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'offset' } + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'extrinsic' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'id' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_eq' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'hash' } + } + } + ] + } + } + ] + } + } + ] } }, { kind: 'Argument', name: { kind: 'Name', value: 'order_by' }, value: { - kind: 'Variable', - name: { kind: 'Name', value: 'orderBy' } + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'timestamp' }, + value: { kind: 'EnumValue', value: 'asc' } + } + ] } } ], @@ -23503,30 +21645,21 @@ export const GetRecentUnifiedTransactionsDocument = { kind: 'SelectionSet', selections: [ { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { kind: 'Field', name: { kind: 'Name', value: 'type' } }, - { kind: 'Field', name: { kind: 'Name', value: 'hash' } }, + { kind: 'Field', name: { kind: 'Name', value: 'amount' } }, + { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, { kind: 'Field', - name: { kind: 'Name', value: 'block' }, + name: { kind: 'Name', value: 'from' }, selectionSet: { kind: 'SelectionSet', selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'height' } - }, - { kind: 'Field', name: { kind: 'Name', value: 'hash' } } + { kind: 'Field', name: { kind: 'Name', value: 'id' } } ] } }, - { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, - { kind: 'Field', name: { kind: 'Name', value: 'amount' } }, - { kind: 'Field', name: { kind: 'Name', value: 'fee' } }, - { kind: 'Field', name: { kind: 'Name', value: 'status' } }, - { kind: 'Field', name: { kind: 'Name', value: 'detail_id' } }, { kind: 'Field', - name: { kind: 'Name', value: 'from' }, + name: { kind: 'Name', value: 'to' }, selectionSet: { kind: 'SelectionSet', selections: [ @@ -23536,69 +21669,75 @@ export const GetRecentUnifiedTransactionsDocument = { }, { kind: 'Field', - name: { kind: 'Name', value: 'to' }, + name: { kind: 'Name', value: 'block' }, selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } } + { kind: 'Field', name: { kind: 'Name', value: 'height' } } + ] + } + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'extrinsic' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'pallet' } + }, + { kind: 'Field', name: { kind: 'Name', value: 'call' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'success' } + }, + { kind: 'Field', name: { kind: 'Name', value: 'fee' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'timestamp' } + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'index_in_block' } + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'signer' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'id' } + } + ] + } + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'block' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'height' } + } + ] + } + } ] } } ] } - } - ] - } - } - ] -} as unknown as DocumentNode< - GetRecentUnifiedTransactionsQuery, - GetRecentUnifiedTransactionsQueryVariables ->; -export const GetUnifiedTransactionsStatsDocument = { - kind: 'Document', - definitions: [ - { - kind: 'OperationDefinition', - operation: 'query', - name: { kind: 'Name', value: 'GetUnifiedTransactionsStats' }, - variableDefinitions: [ - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'startDate' } - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'timestamptz' } - } - } - }, - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'endDate' } }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'timestamptz' } - } - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ { kind: 'Field', - alias: { kind: 'Name', value: 'last24Hour' }, - name: { kind: 'Name', value: 'unified_transaction_aggregate' }, + alias: { kind: 'Name', value: 'transfersById' }, + name: { kind: 'Name', value: 'transfer' }, arguments: [ { kind: 'Argument', @@ -23608,24 +21747,16 @@ export const GetUnifiedTransactionsStatsDocument = { fields: [ { kind: 'ObjectField', - name: { kind: 'Name', value: 'timestamp' }, + name: { kind: 'Name', value: 'id' }, value: { kind: 'ObjectValue', fields: [ { kind: 'ObjectField', - name: { kind: 'Name', value: '_gte' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'startDate' } - } - }, - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_lte' }, + name: { kind: 'Name', value: '_eq' }, value: { kind: 'Variable', - name: { kind: 'Name', value: 'endDate' } + name: { kind: 'Name', value: 'hash' } } } ] @@ -23638,40 +21769,89 @@ export const GetUnifiedTransactionsStatsDocument = { selectionSet: { kind: 'SelectionSet', selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { kind: 'Field', name: { kind: 'Name', value: 'amount' } }, + { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, { kind: 'Field', - name: { kind: 'Name', value: 'aggregate' }, + name: { kind: 'Name', value: 'from' }, selectionSet: { kind: 'SelectionSet', selections: [ - { - kind: 'Field', - alias: { kind: 'Name', value: 'totalCount' }, - name: { kind: 'Name', value: 'count' } - } + { kind: 'Field', name: { kind: 'Name', value: 'id' } } ] } - } - ] - } - }, - { - kind: 'Field', - alias: { kind: 'Name', value: 'allTime' }, - name: { kind: 'Name', value: 'unified_transaction_aggregate' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ + }, { kind: 'Field', - name: { kind: 'Name', value: 'aggregate' }, + name: { kind: 'Name', value: 'to' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } } + ] + } + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'block' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'height' } } + ] + } + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'extrinsic' }, selectionSet: { kind: 'SelectionSet', selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, { kind: 'Field', - alias: { kind: 'Name', value: 'totalCount' }, - name: { kind: 'Name', value: 'count' } + name: { kind: 'Name', value: 'pallet' } + }, + { kind: 'Field', name: { kind: 'Name', value: 'call' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'success' } + }, + { kind: 'Field', name: { kind: 'Name', value: 'fee' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'timestamp' } + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'index_in_block' } + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'signer' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'id' } + } + ] + } + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'block' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'height' } + } + ] + } } ] } @@ -23684,8 +21864,8 @@ export const GetUnifiedTransactionsStatsDocument = { } ] } as unknown as DocumentNode< - GetUnifiedTransactionsStatsQuery, - GetUnifiedTransactionsStatsQueryVariables + GetExtrinsicByHashQuery, + GetExtrinsicByHashQueryVariables >; export const GetWormholeExtrinsicByIdDocument = { kind: 'Document', diff --git a/src/api/chain-status.tsx b/src/api/chain-status.tsx index 03abc11..15bb8f3 100644 --- a/src/api/chain-status.tsx +++ b/src/api/chain-status.tsx @@ -7,210 +7,35 @@ import type { HomeChainStatsResponse, HomeChainStatsVariables } from '@/schemas'; -import { - HOME_STATS_DAY_COUNT, - useHomeStatsDayWindows -} from '@/utils/get-home-stats-day-windows'; +import { HOME_STATS_DAY_COUNT } from '@/utils/get-home-stats-day-windows'; import { useGetRecentDateRange } from '@/utils/get-recent-date-range'; -import { - EXCLUDE_REWARD_TRANSFERS, - withExcludedRewardTransfers -} from '@/utils/unified-transaction-filters'; +import { withExcludedRewardTransfers } from '@/utils/unified-transaction-filters'; const GET_HOME_STATS = gql` query GetHomeChainStats( $last24HourWhere: unified_transaction_bool_exp! - $allTimeWhere: unified_transaction_bool_exp! - $transfersDay0Where: unified_transaction_bool_exp! - $transfersDay1Where: unified_transaction_bool_exp! - $transfersDay2Where: unified_transaction_bool_exp! - $transfersDay3Where: unified_transaction_bool_exp! - $transfersDay4Where: unified_transaction_bool_exp! - $transfersDay5Where: unified_transaction_bool_exp! - $transfersDay6Where: unified_transaction_bool_exp! - $day0Start: timestamptz! - $day0End: timestamptz! - $day1Start: timestamptz! - $day1End: timestamptz! - $day2Start: timestamptz! - $day2End: timestamptz! - $day3Start: timestamptz! - $day3End: timestamptz! - $day4Start: timestamptz! - $day4End: timestamptz! - $day5Start: timestamptz! - $day5End: timestamptz! - $day6Start: timestamptz! - $day6End: timestamptz! + $dayLimit: Int! ) { status: chain_stats_by_pk(id: "global") { block_height total_accounts total_deposit_accounts + total_immediate_transfers + total_scheduled_transfers + total_executed_transfers + total_cancelled_transfers } last24Hour: unified_transaction_aggregate(where: $last24HourWhere) { aggregate { count } } - allTimeTransactions: unified_transaction_aggregate(where: $allTimeWhere) { - aggregate { - count - } - } - blocksDay0: block_aggregate( - where: { timestamp: { _gte: $day0Start, _lte: $day0End } } - ) { - aggregate { - count - } - } - transfersDay0: unified_transaction_aggregate(where: $transfersDay0Where) { - aggregate { - count - } - } - activeAccountsDay0: transfer_aggregate( - where: { - timestamp: { _gte: $day0Start, _lte: $day0End } - from_id: { _is_null: false } - } - ) { - aggregate { - count(columns: [from_id], distinct: true) - } - } - blocksDay1: block_aggregate( - where: { timestamp: { _gte: $day1Start, _lte: $day1End } } - ) { - aggregate { - count - } - } - transfersDay1: unified_transaction_aggregate(where: $transfersDay1Where) { - aggregate { - count - } - } - activeAccountsDay1: transfer_aggregate( - where: { - timestamp: { _gte: $day1Start, _lte: $day1End } - from_id: { _is_null: false } - } - ) { - aggregate { - count(columns: [from_id], distinct: true) - } - } - blocksDay2: block_aggregate( - where: { timestamp: { _gte: $day2Start, _lte: $day2End } } - ) { - aggregate { - count - } - } - transfersDay2: unified_transaction_aggregate(where: $transfersDay2Where) { - aggregate { - count - } - } - activeAccountsDay2: transfer_aggregate( - where: { - timestamp: { _gte: $day2Start, _lte: $day2End } - from_id: { _is_null: false } - } - ) { - aggregate { - count(columns: [from_id], distinct: true) - } - } - blocksDay3: block_aggregate( - where: { timestamp: { _gte: $day3Start, _lte: $day3End } } - ) { - aggregate { - count - } - } - transfersDay3: unified_transaction_aggregate(where: $transfersDay3Where) { - aggregate { - count - } - } - activeAccountsDay3: transfer_aggregate( - where: { - timestamp: { _gte: $day3Start, _lte: $day3End } - from_id: { _is_null: false } - } - ) { - aggregate { - count(columns: [from_id], distinct: true) - } - } - blocksDay4: block_aggregate( - where: { timestamp: { _gte: $day4Start, _lte: $day4End } } - ) { - aggregate { - count - } - } - transfersDay4: unified_transaction_aggregate(where: $transfersDay4Where) { - aggregate { - count - } - } - activeAccountsDay4: transfer_aggregate( - where: { - timestamp: { _gte: $day4Start, _lte: $day4End } - from_id: { _is_null: false } - } - ) { - aggregate { - count(columns: [from_id], distinct: true) - } - } - blocksDay5: block_aggregate( - where: { timestamp: { _gte: $day5Start, _lte: $day5End } } - ) { - aggregate { - count - } - } - transfersDay5: unified_transaction_aggregate(where: $transfersDay5Where) { - aggregate { - count - } - } - activeAccountsDay5: transfer_aggregate( - where: { - timestamp: { _gte: $day5Start, _lte: $day5End } - from_id: { _is_null: false } - } - ) { - aggregate { - count(columns: [from_id], distinct: true) - } - } - blocksDay6: block_aggregate( - where: { timestamp: { _gte: $day6Start, _lte: $day6End } } - ) { - aggregate { - count - } - } - transfersDay6: unified_transaction_aggregate(where: $transfersDay6Where) { - aggregate { - count - } - } - activeAccountsDay6: transfer_aggregate( - where: { - timestamp: { _gte: $day6Start, _lte: $day6End } - from_id: { _is_null: false } - } - ) { - aggregate { - count(columns: [from_id], distinct: true) - } + dailyStats: daily_chain_stats(order_by: { date: desc }, limit: $dayLimit) { + id + date + blocks_count + tx_count + active_accounts } } `; @@ -243,66 +68,16 @@ export const chainStatus = { > ) => { const { startDate, endDate } = useGetRecentDateRange(); - const dayWindows = useHomeStatsDayWindows(); - - const variables = useMemo((): HomeChainStatsVariables => { - const [day0, day1, day2, day3, day4, day5, day6] = dayWindows; - - if ( - dayWindows.length !== HOME_STATS_DAY_COUNT || - !day0 || - !day1 || - !day2 || - !day3 || - !day4 || - !day5 || - !day6 - ) { - throw new Error('Expected 7 day windows for home stats'); - } - return { + const variables = useMemo( + (): HomeChainStatsVariables => ({ last24HourWhere: withExcludedRewardTransfers({ timestamp: { _gte: startDate, _lte: endDate } }), - allTimeWhere: EXCLUDE_REWARD_TRANSFERS, - transfersDay0Where: withExcludedRewardTransfers({ - timestamp: { _gte: day0.start, _lte: day0.end } - }), - transfersDay1Where: withExcludedRewardTransfers({ - timestamp: { _gte: day1.start, _lte: day1.end } - }), - transfersDay2Where: withExcludedRewardTransfers({ - timestamp: { _gte: day2.start, _lte: day2.end } - }), - transfersDay3Where: withExcludedRewardTransfers({ - timestamp: { _gte: day3.start, _lte: day3.end } - }), - transfersDay4Where: withExcludedRewardTransfers({ - timestamp: { _gte: day4.start, _lte: day4.end } - }), - transfersDay5Where: withExcludedRewardTransfers({ - timestamp: { _gte: day5.start, _lte: day5.end } - }), - transfersDay6Where: withExcludedRewardTransfers({ - timestamp: { _gte: day6.start, _lte: day6.end } - }), - day0Start: day0.start, - day0End: day0.end, - day1Start: day1.start, - day1End: day1.end, - day2Start: day2.start, - day2End: day2.end, - day3Start: day3.start, - day3End: day3.end, - day4Start: day4.start, - day4End: day4.end, - day5Start: day5.start, - day5End: day5.end, - day6Start: day6.start, - day6End: day6.end - }; - }, [dayWindows, endDate, startDate]); + dayLimit: HOME_STATS_DAY_COUNT + }), + [endDate, startDate] + ); return useQuery( GET_HOME_STATS, diff --git a/src/api/search.tsx b/src/api/search.tsx index 3d1f47d..e4d99ef 100644 --- a/src/api/search.tsx +++ b/src/api/search.tsx @@ -6,109 +6,207 @@ import type { SearchAllResponse } from '@/schemas'; import type DataFetcher from '@/utils/fetcher'; import { getGqlString } from '@/utils/get-gql-string'; -const getSearchVariables = (oriKeyword: string) => { +export type SearchShape = 'hex' | 'numeric' | 'text'; + +const EMPTY_SEARCH: SearchAllResponse = { + transactions: [], + accounts: [], + blocks: [], + highSecuritySets: [], + errorEvents: [] +}; + +/** Classify search input so we only hit the indexed fields for that shape. */ +export function classifySearchKeyword(oriKeyword: string): SearchShape { + if (oriKeyword.startsWith('0x') || oriKeyword.startsWith('0X')) { + return 'hex'; + } + if (/^\d+$/.test(oriKeyword)) { + return 'numeric'; + } + return 'text'; +} + +export const getSearchVariables = (oriKeyword: string) => { + const shape = classifySearchKeyword(oriKeyword); let keyword_number = -1; - if (!oriKeyword.startsWith('0x') && !Number.isNaN(Number(oriKeyword))) { + if (shape === 'numeric') { keyword_number = Number(oriKeyword); } let keyword = oriKeyword; + if (shape === 'hex') { + // Hashes are stored lowercase; case-sensitive _like needs a normalized prefix. + keyword = oriKeyword.toLowerCase(); + } if (keyword.length > 0) { keyword = `${keyword}%`; } return { + shape, keyword, keyword_number, limit: SEARCH_PREVIEW_RESULTS_LIMIT }; }; -export const search = (fetcher: DataFetcher) => ({ - all: () => { - const SEARCH_ALL = gql` - query SearchAll($keyword: String, $keyword_number: Int, $limit: Int) { - transactions: unified_transaction( - limit: $limit - where: { - _or: [ - { hash: { _ilike: $keyword } } - { detail_id: { _ilike: $keyword } } - { id: { _ilike: $keyword } } - ] - } - ) { - id - type - hash - detail_id - block { - height - hash - } - } - accounts: account(limit: $limit, where: { id: { _ilike: $keyword } }) { - id - } - blocks: block( - limit: $limit - where: { - _or: [ - { hash: { _ilike: $keyword } } - { height: { _eq: $keyword_number } } - ] - } - ) { - height - } - highSecuritySets: high_security_set( - limit: $limit - where: { extrinsic: { id: { _ilike: $keyword } } } - ) { - extrinsic { - id - pallet - call - } - } - errorEvents: error_event( - limit: $limit - where: { - _or: [ - { error_type: { _ilike: $keyword } } - { error_name: { _ilike: $keyword } } - ] - } - ) { - extrinsic { - id - pallet - call - } - } +const SEARCH_HEX = gql` + query SearchHex($keyword: String, $limit: Int) { + transactions: unified_transaction( + limit: $limit + where: { + _or: [{ hash: { _like: $keyword } }, { detail_id: { _like: $keyword } }] } - `; + ) { + id + type + hash + detail_id + block { + height + hash + } + } + blocks: block(limit: $limit, where: { hash: { _like: $keyword } }) { + height + } + highSecuritySets: high_security_set( + limit: $limit + where: { extrinsic: { id: { _like: $keyword } } } + ) { + extrinsic { + id + pallet + call + } + } + } +`; +const SEARCH_NUMERIC = gql` + query SearchNumeric($keyword: String, $keyword_number: Int, $limit: Int) { + transactions: unified_transaction( + limit: $limit + where: { detail_id: { _like: $keyword } } + ) { + id + type + hash + detail_id + block { + height + hash + } + } + blocks: block(limit: $limit, where: { height: { _eq: $keyword_number } }) { + height + } + } +`; + +const SEARCH_TEXT = gql` + query SearchText($keyword: String, $limit: Int) { + accounts: account(limit: $limit, where: { id: { _like: $keyword } }) { + id + } + errorEvents: error_event( + limit: $limit + where: { + _or: [ + { error_type: { _ilike: $keyword } } + { error_name: { _ilike: $keyword } } + ] + } + ) { + extrinsic { + id + pallet + call + } + } + } +`; + +function documentForShape(shape: SearchShape) { + if (shape === 'hex') return SEARCH_HEX; + if (shape === 'numeric') return SEARCH_NUMERIC; + return SEARCH_TEXT; +} + +function operationNameForShape(shape: SearchShape) { + if (shape === 'hex') return 'SearchHex'; + if (shape === 'numeric') return 'SearchNumeric'; + return 'SearchText'; +} + +function normalizeSearchResponse( + data: Partial | null | undefined +): SearchAllResponse { + return { + transactions: data?.transactions ?? [], + accounts: data?.accounts ?? [], + blocks: data?.blocks ?? [], + highSecuritySets: data?.highSecuritySets ?? [], + errorEvents: data?.errorEvents ?? [] + }; +} + +function searchQueryData( + data: SearchAllResponse | undefined, + keyword: string +): SearchAllResponse | undefined { + if (data) return normalizeSearchResponse(data); + if (keyword) return EMPTY_SEARCH; + return undefined; +} + +export const search = (fetcher: DataFetcher) => ({ + all: () => { return { - query: (keyword: string) => - fetcher.graphql( + query: async (keyword: string) => { + const variables = getSearchVariables(keyword); + const document = documentForShape(variables.shape); + const result = await fetcher.graphql>( { - query: getGqlString(SEARCH_ALL), - variables: getSearchVariables(keyword), - operationName: 'SearchAll' + query: getGqlString(document), + variables: { + keyword: variables.keyword, + keyword_number: variables.keyword_number, + limit: variables.limit + }, + operationName: operationNameForShape(variables.shape) }, { retries: 0 } - ), + ); + + return { + ...result, + data: normalizeSearchResponse(result.data) + }; + }, useQuery: ( keyword: string, config?: QueryHookOptions - ) => - useQuery(SEARCH_ALL, { + ) => { + const variables = getSearchVariables(keyword); + const document = documentForShape(variables.shape); + const result = useQuery(document, { ...config, - variables: getSearchVariables(keyword) - }) + variables: { + keyword: variables.keyword, + keyword_number: variables.keyword_number, + limit: variables.limit + } + } as QueryHookOptions); + + return { + ...result, + data: searchQueryData(result.data, keyword) + }; + } }; } }); diff --git a/src/api/unified-transactions.tsx b/src/api/unified-transactions.tsx index e28de69..43fd315 100644 --- a/src/api/unified-transactions.tsx +++ b/src/api/unified-transactions.tsx @@ -12,7 +12,154 @@ import type { } from '@/schemas'; import type { PaginatedQueryVariables } from '@/types/query'; import { useGetRecentDateRange } from '@/utils/get-recent-date-range'; -import { EXCLUDE_REWARD_TRANSFERS } from '@/utils/unified-transaction-filters'; +import { + type ChainTransferTotals, + sumChainTransferTotals +} from '@/utils/sum-chain-transfer-totals'; +import { + EXCLUDE_REWARD_TRANSFERS, + extractAccountPartyId, + isUnfilteredExcludeRewards, + withExcludedRewardTransfers +} from '@/utils/unified-transaction-filters'; + +export { isUnfilteredExcludeRewards } from '@/utils/unified-transaction-filters'; + +const UNIFIED_TX_FIELDS = ` + id + type + hash + block { + height + hash + } + timestamp + amount + fee + status + detail_id + from { + id + } + to { + id + } +`; + +const TRANSFER_TOTAL_FIELDS = ` + total_immediate_transfers + total_scheduled_transfers + total_executed_transfers + total_cancelled_transfers +`; + +const GET_UNIFIED_TRANSACTIONS = gql` + query GetUnifiedTransactions( + $limit: Int + $offset: Int + $orderBy: [unified_transaction_order_by!] + $where: unified_transaction_bool_exp + ) { + transactions: unified_transaction( + limit: $limit + offset: $offset + order_by: $orderBy + where: $where + ) { + ${UNIFIED_TX_FIELDS} + } + meta: unified_transaction_aggregate(where: $where) { + aggregate { + totalCount: count + } + } + } +`; + +/** Unfiltered list: total from O(1) chain_stats sum instead of full-table aggregate. */ +const GET_UNIFIED_TRANSACTIONS_WITH_CHAIN_TOTAL = gql` + query GetUnifiedTransactionsWithChainTotal( + $limit: Int + $offset: Int + $orderBy: [unified_transaction_order_by!] + $where: unified_transaction_bool_exp + ) { + transactions: unified_transaction( + limit: $limit + offset: $offset + order_by: $orderBy + where: $where + ) { + ${UNIFIED_TX_FIELDS} + } + meta: chain_stats_by_pk(id: "global") { + ${TRANSFER_TOTAL_FIELDS} + } + } +`; + +/** Account party list: total from O(1) account_stats sum instead of filtered aggregate. */ +const GET_UNIFIED_TRANSACTIONS_WITH_ACCOUNT_TOTAL = gql` + query GetUnifiedTransactionsWithAccountTotal( + $limit: Int + $offset: Int + $orderBy: [unified_transaction_order_by!] + $where: unified_transaction_bool_exp + $accountId: String! + ) { + transactions: unified_transaction( + limit: $limit + offset: $offset + order_by: $orderBy + where: $where + ) { + ${UNIFIED_TX_FIELDS} + } + meta: account_stats_by_pk(id: $accountId) { + ${TRANSFER_TOTAL_FIELDS} + } + } +`; + +type StatsTotalListResponse = { + transactions: UnifiedListTransactionListResponse['transactions']; + meta: ChainTransferTotals | null; +}; + +function documentForListTotals(options: { + useChainTotal: boolean; + useAccountTotal: boolean; +}) { + if (options.useChainTotal) { + return GET_UNIFIED_TRANSACTIONS_WITH_CHAIN_TOTAL; + } + if (options.useAccountTotal) { + return GET_UNIFIED_TRANSACTIONS_WITH_ACCOUNT_TOTAL; + } + return GET_UNIFIED_TRANSACTIONS; +} + +function normalizeListResponse( + data: UnifiedListTransactionListResponse | StatsTotalListResponse | undefined +): UnifiedListTransactionListResponse | undefined { + if (!data) return undefined; + const meta = data.meta as + | UnifiedListTransactionListResponse['meta'] + | ChainTransferTotals + | null + | undefined; + if (meta && 'aggregate' in meta) { + return data as UnifiedListTransactionListResponse; + } + return { + transactions: data.transactions, + meta: { + aggregate: { + totalCount: sumChainTransferTotals(meta as ChainTransferTotals | null) + } + } + }; +} export const unifiedTransactions = { useGetAll: ( @@ -21,64 +168,36 @@ export const unifiedTransactions = { PaginatedQueryVariables< UnifiedListTransactionSorts, Unified_Transaction_Bool_Exp - > + > & { accountId?: string } > ) => { - const GET_UNIFIED_TRANSACTIONS = gql` - query GetUnifiedTransactions( - $limit: Int - $offset: Int - $orderBy: [unified_transaction_order_by!] - $where: unified_transaction_bool_exp - ) { - transactions: unified_transaction( - limit: $limit - offset: $offset - order_by: $orderBy - where: $where - ) { - id - type - hash - block { - height - hash - } - timestamp - amount - fee - status - detail_id - from { - id - } - to { - id - } - } - meta: unified_transaction_aggregate(where: $where) { - aggregate { - totalCount: count - } - } - } - `; + const where = config?.variables?.where; + const accountId = extractAccountPartyId(where); + const useChainTotal = isUnfilteredExcludeRewards(where); + const useAccountTotal = !useChainTotal && !!accountId; - return useQuery< - UnifiedListTransactionListResponse, - PaginatedQueryVariables< - UnifiedListTransactionSorts, - Unified_Transaction_Bool_Exp - > - >(GET_UNIFIED_TRANSACTIONS, { + const document = documentForListTotals({ useChainTotal, useAccountTotal }); + + const result = useQuery(document, { ...config, variables: { orderBy: config?.variables?.orderBy ?? { timestamp: 'desc' }, limit: config?.variables?.limit ?? QUERY_DEFAULT_LIMIT, offset: config?.variables?.offset ?? 0, - where: config?.variables?.where + where: where ?? EXCLUDE_REWARD_TRANSFERS, + ...(useAccountTotal ? { accountId } : {}) } }); + + return { + ...result, + data: normalizeListResponse( + result.data as + | UnifiedListTransactionListResponse + | StatsTotalListResponse + | undefined + ) + }; }, useGetRecent: ( @@ -100,24 +219,7 @@ export const unifiedTransactions = { order_by: $orderBy where: $where ) { - id - type - hash - block { - height - hash - } - timestamp - amount - fee - status - detail_id - from { - id - } - to { - id - } + ${UNIFIED_TX_FIELDS} } } `; @@ -146,35 +248,46 @@ export const unifiedTransactions = { const GET_UNIFIED_TRANSACTIONS_STATS = gql` query GetUnifiedTransactionsStats( $last24HourWhere: unified_transaction_bool_exp! - $allTimeWhere: unified_transaction_bool_exp! ) { last24Hour: unified_transaction_aggregate(where: $last24HourWhere) { aggregate { totalCount: count } } - allTime: unified_transaction_aggregate(where: $allTimeWhere) { - aggregate { - totalCount: count - } + allTime: chain_stats_by_pk(id: "global") { + ${TRANSFER_TOTAL_FIELDS} } } `; - return useQuery( - GET_UNIFIED_TRANSACTIONS_STATS, - { - ...config, - variables: { - last24HourWhere: { - _and: [ - EXCLUDE_REWARD_TRANSFERS, - { timestamp: { _gte: startDate, _lte: endDate } } - ] - }, - allTimeWhere: EXCLUDE_REWARD_TRANSFERS - } + type StatsRaw = { + last24Hour: UnifiedListTransactionsStatsResponse['last24Hour']; + allTime: ChainTransferTotals | null; + }; + + const result = useQuery(GET_UNIFIED_TRANSACTIONS_STATS, { + ...(config as QueryHookOptions | undefined), + variables: { + last24HourWhere: withExcludedRewardTransfers({ + timestamp: { _gte: startDate, _lte: endDate } + }) } - ); + }); + + const data: UnifiedListTransactionsStatsResponse | undefined = result.data + ? { + last24Hour: result.data.last24Hour, + allTime: { + aggregate: { + totalCount: sumChainTransferTotals(result.data.allTime) + } + } + } + : undefined; + + return { + ...result, + data + }; } }; diff --git a/src/components/common/table-columns/UNIFIED_LIST_TRANSACTION_COLUMNS.tsx b/src/components/common/table-columns/UNIFIED_LIST_TRANSACTION_COLUMNS.tsx index 908e75d..3d9eede 100644 --- a/src/components/common/table-columns/UNIFIED_LIST_TRANSACTION_COLUMNS.tsx +++ b/src/components/common/table-columns/UNIFIED_LIST_TRANSACTION_COLUMNS.tsx @@ -146,6 +146,42 @@ export const UNIFIED_LIST_TRANSACTION_COLUMNS = [ }) ]; +/** Account Activity columns with viewer-relative IN/OUT direction */ +export const createAccountUnifiedTransactionColumns = (accountId: string) => { + const directionColumn = columnHelper.display({ + id: 'direction', + header: '', + cell: ({ row }) => { + const fromId = row.original.from?.id; + const toId = row.original.to?.id; + + if (fromId === accountId) { + return ( + + OUT + + ); + } + if (toId === accountId) { + return ( + + IN + + ); + } + return ; + }, + enableSorting: false + }); + + const fromIndex = UNIFIED_LIST_TRANSACTION_COLUMNS.findIndex( + (col) => col.id === 'from' + ); + const columns = [...UNIFIED_LIST_TRANSACTION_COLUMNS]; + columns.splice(fromIndex + 1, 0, directionColumn as any); + return columns; +}; + /** Compact columns for landing recent transactions */ export const RECENT_UNIFIED_LIST_TRANSACTION_COLUMNS = [ columnHelper.accessor((row) => row.hash ?? row.detail_id, { diff --git a/src/components/features/account-details/account-all-transactions/hook.tsx b/src/components/features/account-details/account-all-transactions/hook.tsx index 76ae6b6..4249700 100644 --- a/src/components/features/account-details/account-all-transactions/hook.tsx +++ b/src/components/features/account-details/account-all-transactions/hook.tsx @@ -2,7 +2,7 @@ import { getCoreRowModel, useReactTable } from '@tanstack/react-table'; import { useEffect, useMemo, useState } from 'react'; import useApiClient from '@/api'; -import { UNIFIED_LIST_TRANSACTION_COLUMNS } from '@/components/common/table-columns/UNIFIED_LIST_TRANSACTION_COLUMNS'; +import { createAccountUnifiedTransactionColumns } from '@/components/common/table-columns/UNIFIED_LIST_TRANSACTION_COLUMNS'; import { DATA_POOL_INTERVAL } from '@/constants/data-pool-interval'; import { QUERY_DEFAULT_LIMIT } from '@/constants/query-default-limit'; import type { UnifiedListTransactionSorts } from '@/constants/query-sorts'; @@ -53,8 +53,8 @@ export const useAccountAllTransactions = (accountId: string) => { }); const transactionColumns = useMemo( - () => UNIFIED_LIST_TRANSACTION_COLUMNS, - [] + () => createAccountUnifiedTransactionColumns(accountId), + [accountId] ); const [rowCount, setRowCount] = useState( data?.meta.aggregate.totalCount ?? 0 diff --git a/src/components/features/landing/block-tables/hook.tsx b/src/components/features/landing/block-tables/hook.tsx index 64d535e..c47c475 100644 --- a/src/components/features/landing/block-tables/hook.tsx +++ b/src/components/features/landing/block-tables/hook.tsx @@ -4,28 +4,11 @@ import { useMemo } from 'react'; import useApiClient from '@/api'; import { RECENT_BLOCK_COLUMNS } from '@/components/common/table-columns/RECENT_BLOCK_COLUMNS'; import { DATA_POOL_INTERVAL } from '@/constants/data-pool-interval'; -import { transformBlockOrderBy } from '@/constants/query-sorts'; -import { useTableState } from '@/hooks/useTableState'; +import { QUERY_RECENT_LIMIT } from '@/constants/query-recent-limit'; import type { Block } from '@/schemas'; -import { transformSortLiteral } from '@/utils/transform-sort'; export const useBlocksTable = () => { const api = useApiClient(); - const { - orderBy, - limit, - currentPageIndex, - handleChangeSorting, - handleChangePagination, - paginationValue - } = useTableState('timestamp:desc'); - - const orderByObject = useMemo( - () => transformBlockOrderBy(orderBy ?? 'timestamp:desc'), - [orderBy] - ); - const sortingValue = transformSortLiteral(orderBy); - const { loading, data, @@ -33,9 +16,7 @@ export const useBlocksTable = () => { } = api.blocks.useGetAll({ pollInterval: DATA_POOL_INTERVAL, variables: { - orderBy: orderByObject, - limit, - offset: currentPageIndex * limit + limit: QUERY_RECENT_LIMIT } }); @@ -44,13 +25,10 @@ export const useBlocksTable = () => { const table = useReactTable({ data: data?.blocks ?? [], columns: blockColumns, - getCoreRowModel: getCoreRowModel(), state: { - sorting: sortingValue, - pagination: paginationValue + pagination: { pageSize: QUERY_RECENT_LIMIT, pageIndex: 0 } }, - onSortingChange: handleChangeSorting, - onPaginationChange: handleChangePagination, + getCoreRowModel: getCoreRowModel(), rowCount: data?.meta?.totalCount ?? 0, manualPagination: true, manualSorting: true diff --git a/src/components/features/landing/hero/chain-stats/hook.tsx b/src/components/features/landing/hero/chain-stats/hook.tsx index 249c2c2..85b6cc8 100644 --- a/src/components/features/landing/hero/chain-stats/hook.tsx +++ b/src/components/features/landing/hero/chain-stats/hook.tsx @@ -3,22 +3,39 @@ import { useMemo } from 'react'; import useApiClient from '@/api'; import type { SparklinePoint } from '@/components/ui/composites/stat-sparkline-card'; import { DATA_POOL_INTERVAL } from '@/constants/data-pool-interval'; -import type { HomeChainStatsResponse } from '@/schemas'; +import type { DailyChainStatRow, HomeChainStatsResponse } from '@/schemas'; import { - HOME_STATS_DAY_COUNT, - useHomeStatsDayWindows + formatHomeStatsUtcDayLabel, + HOME_STATS_DAY_COUNT } from '@/utils/get-home-stats-day-windows'; +import { sumChainTransferTotals } from '@/utils/sum-chain-transfer-totals'; -const seriesFromDays = ( - data: HomeChainStatsResponse | undefined, - prefix: 'blocksDay' | 'transfersDay' | 'activeAccountsDay' -): number[] => { - if (!data) return []; +/** Oldest → newest, pad missing UTC days with zeros so sparklines stay 7 points. */ +const alignDailyStats = ( + rows: DailyChainStatRow[] | undefined +): DailyChainStatRow[] => { + const byId = new Map((rows ?? []).map((row) => [row.id, row])); + const today = new Date(); + const todayUtc = Date.UTC( + today.getUTCFullYear(), + today.getUTCMonth(), + today.getUTCDate() + ); return Array.from({ length: HOME_STATS_DAY_COUNT }, (_, index) => { - const key = `${prefix}${index}` as keyof HomeChainStatsResponse; - const bucket = data[key] as HomeChainStatsResponse['blocksDay0']; - return bucket?.aggregate?.count ?? 0; + const dayMs = + todayUtc - (HOME_STATS_DAY_COUNT - 1 - index) * 24 * 60 * 60 * 1000; + const day = new Date(dayMs); + const id = day.toISOString().slice(0, 10); + return ( + byId.get(id) ?? { + id, + date: `${id}T00:00:00.000Z`, + blocks_count: 0, + tx_count: 0, + active_accounts: 0 + } + ); }); }; @@ -35,7 +52,6 @@ const toPoints = ( export const useChainStats = () => { const api = useApiClient(); - const dayWindows = useHomeStatsDayWindows(); const { loading, data, error } = api.chainStatus.useGetHomeStats({ pollInterval: DATA_POOL_INTERVAL }); @@ -46,43 +62,51 @@ export const useChainStats = () => { const totalAccounts = status?.total_accounts ?? 0; const activeAccounts = totalAccounts - depositAccounts; - const totalTransactions = data?.allTimeTransactions?.aggregate?.count ?? 0; - + const totalTransactions = sumChainTransferTotals(status); const last24HourTransactions = data?.last24Hour?.aggregate?.count ?? 0; + const alignedDays = useMemo( + () => alignDailyStats(data?.dailyStats), + [data?.dailyStats] + ); + const dayLabels = useMemo( - () => dayWindows.map((window) => window.label), - [dayWindows] + () => + alignedDays.map((row) => { + const label = formatHomeStatsUtcDayLabel(new Date(row.date)); + return `${label} (UTC)`; + }), + [alignedDays] ); const blocksPoints = useMemo( () => toPoints( - seriesFromDays(data, 'blocksDay'), + alignedDays.map((row) => row.blocks_count), dayLabels, (value) => `${value.toLocaleString()} blocks` ), - [data, dayLabels] + [alignedDays, dayLabels] ); const transfersPoints = useMemo( () => toPoints( - seriesFromDays(data, 'transfersDay'), + alignedDays.map((row) => row.tx_count), dayLabels, (value) => `${value.toLocaleString()} txs` ), - [data, dayLabels] + [alignedDays, dayLabels] ); const activeAccountsPoints = useMemo( () => toPoints( - seriesFromDays(data, 'activeAccountsDay'), + alignedDays.map((row) => row.active_accounts), dayLabels, (value) => `${value.toLocaleString()} active` ), - [data, dayLabels] + [alignedDays, dayLabels] ); return { @@ -98,3 +122,6 @@ export const useChainStats = () => { activeAccountsPoints }; }; + +// Keep type import used for documentation / potential tests +export type { HomeChainStatsResponse }; diff --git a/src/components/features/landing/transactions-table/hook.tsx b/src/components/features/landing/transactions-table/hook.tsx index 47fa92c..b5dbc7f 100644 --- a/src/components/features/landing/transactions-table/hook.tsx +++ b/src/components/features/landing/transactions-table/hook.tsx @@ -4,6 +4,7 @@ import { useMemo } from 'react'; import useApiClient from '@/api'; import { RECENT_UNIFIED_LIST_TRANSACTION_COLUMNS } from '@/components/common/table-columns/UNIFIED_LIST_TRANSACTION_COLUMNS'; import { DATA_POOL_INTERVAL } from '@/constants/data-pool-interval'; +import { QUERY_RECENT_LIMIT } from '@/constants/query-recent-limit'; import type { UnifiedListTransaction } from '@/schemas'; export const useTransactionsTable = () => { @@ -25,6 +26,9 @@ export const useTransactionsTable = () => { columns: transactionColumns, getCoreRowModel: getCoreRowModel(), enableSorting: false, + state: { + pagination: { pageSize: QUERY_RECENT_LIMIT, pageIndex: 0 } + }, rowCount: data?.transactions?.length ?? 0, manualPagination: true, manualSorting: true diff --git a/src/components/ui/badge.tsx b/src/components/ui/badge.tsx index 8906d91..27d3cc8 100644 --- a/src/components/ui/badge.tsx +++ b/src/components/ui/badge.tsx @@ -4,7 +4,7 @@ import * as React from 'react'; import { cn } from '@/lib/utils'; const badgeVariants = cva( - 'inline-flex items-center whitespace-nowrap border border-solid bg-transparent px-[7px] py-0.5 font-sans text-[10px] tracking-[0.05em]', + 'inline-flex items-center whitespace-nowrap border border-solid bg-transparent px-[7px] py-0.5 font-sans text-[10px] tracking-wider', { variants: { variant: { diff --git a/src/components/ui/composites/data-table/DataTable.tsx b/src/components/ui/composites/data-table/DataTable.tsx index 10317d1..d93bcd3 100644 --- a/src/components/ui/composites/data-table/DataTable.tsx +++ b/src/components/ui/composites/data-table/DataTable.tsx @@ -63,6 +63,18 @@ const areSamePageData = (a: unknown[], b: unknown[]) => { return a.every((item, index) => item === b[index]); }; +const checkIfEmptyData = ( + isDesktop: boolean, + withControls: boolean, + currentPageCount: number, + accumulatedData: unknown[] +) => { + if (isDesktop) return currentPageCount === 0; + if (withControls) return accumulatedData.length === 0; + + return currentPageCount === 0; +}; + export const DataTable = ({ table, fetch, @@ -122,11 +134,12 @@ export const DataTable = ({ }); const currentPageCount = table.getRowModel().rows.length; - const isEmptyData = isDesktop - ? currentPageCount === 0 - : withControls - ? accumulatedData.length === 0 - : currentPageCount === 0; + const isEmptyData = checkIfEmptyData( + isDesktop, + withControls, + currentPageCount, + accumulatedData + ); const canLoadMore = withControls && @@ -153,7 +166,7 @@ export const DataTable = ({ }, [canLoadMore, table, pageIndex]); if (status === 'error') { - return <>{fetch?.errorFallback}; + return fetch?.errorFallback; } if (status === 'success' && isEmptyData) @@ -195,8 +208,8 @@ export const DataTable = ({ return (
-
- +
+
{table.getHeaderGroups().map((headerGroup) => ( @@ -243,7 +256,10 @@ export const DataTable = ({ {row.getVisibleCells().map((cell) => { return ( - + {flexRender(cell.column.columnDef.cell, { ...cell.getContext(), ...customCellProps diff --git a/src/components/ui/composites/stat-sparkline-card/StatSparklineCard.tsx b/src/components/ui/composites/stat-sparkline-card/StatSparklineCard.tsx index c6c5028..1455967 100644 --- a/src/components/ui/composites/stat-sparkline-card/StatSparklineCard.tsx +++ b/src/components/ui/composites/stat-sparkline-card/StatSparklineCard.tsx @@ -38,7 +38,7 @@ export const StatSparklineCard = ({ - + {loading && (
@@ -61,7 +61,7 @@ export const StatSparklineCard = ({
{live && ( )} diff --git a/src/lib/graphql-benchmark/registry.ts b/src/lib/graphql-benchmark/registry.ts index a018814..13d2724 100644 --- a/src/lib/graphql-benchmark/registry.ts +++ b/src/lib/graphql-benchmark/registry.ts @@ -1,3 +1,4 @@ +import { gql } from '@apollo/client'; import { endOfToday } from 'date-fns/endOfToday'; import { startOfToday } from 'date-fns/startOfToday'; import { subDays } from 'date-fns/subDays'; @@ -28,14 +29,46 @@ import { GetStatusDocument, GetTransactionsDocument, GetWormholeExtrinsicByIdDocument, - GetWormholeExtrinsicsDocument, - SearchAllDocument + GetWormholeExtrinsicsDocument } from '@/__generated__/graphql'; import { QUERY_DEFAULT_LIMIT } from '@/constants/query-default-limit'; import { SEARCH_PREVIEW_RESULTS_LIMIT } from '@/constants/search-preview-results-limit'; import type { GraphqlBenchmarkRegistryEntry } from './types'; +const SearchHexDocument = gql` + query SearchHex($keyword: String, $limit: Int) { + transactions: unified_transaction( + limit: $limit + where: { + _or: [{ hash: { _like: $keyword } }, { detail_id: { _like: $keyword } }] + } + ) { + id + type + hash + detail_id + block { + height + hash + } + } + blocks: block(limit: $limit, where: { hash: { _like: $keyword } }) { + height + } + highSecuritySets: high_security_set( + limit: $limit + where: { extrinsic: { id: { _like: $keyword } } } + ) { + extrinsic { + id + pallet + call + } + } + } +`; + function accountStatsDates() { return { startDate: subDays(startOfToday(), 7).toISOString(), @@ -212,11 +245,10 @@ export const graphqlBenchmarkRegistry: GraphqlBenchmarkRegistryEntry[] = [ ctx.scheduledTxId ? { tx_id: ctx.scheduledTxId } : null }, { - name: 'SearchAll', - document: SearchAllDocument, + name: 'SearchHex', + document: SearchHexDocument, getVariables: () => ({ - keyword: '0x', - keyword_number: -1, + keyword: '0x%', limit: SEARCH_PREVIEW_RESULTS_LIMIT }) }, diff --git a/src/schemas/chain-status.ts b/src/schemas/chain-status.ts index d3e234a..9e34ef2 100644 --- a/src/schemas/chain-status.ts +++ b/src/schemas/chain-status.ts @@ -1,17 +1,14 @@ import type { Unified_Transaction_Bool_Exp } from '@/__generated__/graphql'; -import type * as gql from '../__generated__/graphql'; -export interface ChainStatus - extends Pick< - gql.Chain_Stats, - | 'block_height' - | 'total_accounts' - | 'total_deposit_accounts' - | 'total_executed_transfers' - | 'total_immediate_transfers' - | 'total_scheduled_transfers' - | 'total_cancelled_transfers' - > {} +export interface ChainStatus { + block_height: number; + total_accounts: number; + total_deposit_accounts: number; + total_executed_transfers: number; + total_immediate_transfers: number; + total_scheduled_transfers: number; + total_cancelled_transfers: number; +} export interface ChainStatusResponse { status: ChainStatus; @@ -23,61 +20,31 @@ export interface AggregateCount { } | null; } -export interface HomeChainStatsStatus - extends Pick< - gql.Chain_Stats, - 'block_height' | 'total_accounts' | 'total_deposit_accounts' - > {} +export interface HomeChainStatsStatus { + block_height: number; + total_accounts: number; + total_deposit_accounts: number; + total_immediate_transfers: number; + total_scheduled_transfers: number; + total_executed_transfers: number; + total_cancelled_transfers: number; +} + +export interface DailyChainStatRow { + id: string; + date: string; + blocks_count: number; + tx_count: number; + active_accounts: number; +} export interface HomeChainStatsResponse { status: HomeChainStatsStatus | null; last24Hour: AggregateCount; - allTimeTransactions: AggregateCount; - blocksDay0: AggregateCount; - blocksDay1: AggregateCount; - blocksDay2: AggregateCount; - blocksDay3: AggregateCount; - blocksDay4: AggregateCount; - blocksDay5: AggregateCount; - blocksDay6: AggregateCount; - transfersDay0: AggregateCount; - transfersDay1: AggregateCount; - transfersDay2: AggregateCount; - transfersDay3: AggregateCount; - transfersDay4: AggregateCount; - transfersDay5: AggregateCount; - transfersDay6: AggregateCount; - activeAccountsDay0: AggregateCount; - activeAccountsDay1: AggregateCount; - activeAccountsDay2: AggregateCount; - activeAccountsDay3: AggregateCount; - activeAccountsDay4: AggregateCount; - activeAccountsDay5: AggregateCount; - activeAccountsDay6: AggregateCount; + dailyStats: DailyChainStatRow[]; } export interface HomeChainStatsVariables { last24HourWhere: Unified_Transaction_Bool_Exp; - allTimeWhere: Unified_Transaction_Bool_Exp; - transfersDay0Where: Unified_Transaction_Bool_Exp; - transfersDay1Where: Unified_Transaction_Bool_Exp; - transfersDay2Where: Unified_Transaction_Bool_Exp; - transfersDay3Where: Unified_Transaction_Bool_Exp; - transfersDay4Where: Unified_Transaction_Bool_Exp; - transfersDay5Where: Unified_Transaction_Bool_Exp; - transfersDay6Where: Unified_Transaction_Bool_Exp; - day0Start: string; - day0End: string; - day1Start: string; - day1End: string; - day2Start: string; - day2End: string; - day3Start: string; - day3End: string; - day4Start: string; - day4End: string; - day5Start: string; - day5End: string; - day6Start: string; - day6End: string; + dayLimit: number; } diff --git a/src/utils/get-home-stats-day-windows.ts b/src/utils/get-home-stats-day-windows.ts index e5e3bfa..f9fc381 100644 --- a/src/utils/get-home-stats-day-windows.ts +++ b/src/utils/get-home-stats-day-windows.ts @@ -14,12 +14,31 @@ export interface DayWindow { label: string; } -/** Formats a day label like the mock: "Jun 11". */ +/** Formats a day label like the mock: "Jun 11" (local timezone). */ export const formatHomeStatsDayLabel = (date: Date) => format(date, 'MMM d'); +/** Formats a UTC calendar day as "Jun 11" regardless of viewer timezone. */ +export const formatHomeStatsUtcDayLabel = (date: Date) => { + const months = [ + 'Jan', + 'Feb', + 'Mar', + 'Apr', + 'May', + 'Jun', + 'Jul', + 'Aug', + 'Sep', + 'Oct', + 'Nov', + 'Dec' + ] as const; + return `${months[date.getUTCMonth()]} ${date.getUTCDate()}`; +}; + /** * Builds 7 chronological day windows ending today (oldest → newest). - * Matches existing explorer date helpers (local calendar days). + * Local calendar days — kept for any callers that still need local windows. */ export const useHomeStatsDayWindows = (): DayWindow[] => useMemo(() => { diff --git a/src/utils/sum-chain-transfer-totals.ts b/src/utils/sum-chain-transfer-totals.ts new file mode 100644 index 0000000..96abbe5 --- /dev/null +++ b/src/utils/sum-chain-transfer-totals.ts @@ -0,0 +1,20 @@ +/** Fields used to derive explorer “Total Transactions” from chain_stats. */ +export interface ChainTransferTotals { + total_immediate_transfers: number; + total_scheduled_transfers: number; + total_executed_transfers: number; + total_cancelled_transfers: number; +} + +/** Immediate + reversible lifecycle counts (excludes miner rewards once immediate is fixed). */ +export function sumChainTransferTotals( + stats: ChainTransferTotals | null | undefined +): number { + if (!stats) return 0; + return ( + (stats.total_immediate_transfers ?? 0) + + (stats.total_scheduled_transfers ?? 0) + + (stats.total_executed_transfers ?? 0) + + (stats.total_cancelled_transfers ?? 0) + ); +} diff --git a/src/utils/unified-transaction-filters.test.ts b/src/utils/unified-transaction-filters.test.ts new file mode 100644 index 0000000..e16272f --- /dev/null +++ b/src/utils/unified-transaction-filters.test.ts @@ -0,0 +1,106 @@ +import { + EXCLUDE_REWARD_TRANSFERS, + extractAccountPartyId, + isUnfilteredExcludeRewards, + withExcludedRewardTransfers +} from './unified-transaction-filters'; + +describe('isUnfilteredExcludeRewards', () => { + it('treats undefined as unfiltered', () => { + expect(isUnfilteredExcludeRewards(undefined)).toBe(true); + }); + + it('matches the shared EXCLUDE_REWARD_TRANSFERS reference', () => { + expect(isUnfilteredExcludeRewards(EXCLUDE_REWARD_TRANSFERS)).toBe(true); + expect(isUnfilteredExcludeRewards(withExcludedRewardTransfers())).toBe( + true + ); + }); + + it('rejects wrapped account filters', () => { + expect( + isUnfilteredExcludeRewards( + withExcludedRewardTransfers({ + _or: [ + { from: { id: { _eq: 'acc1' } } }, + { to: { id: { _eq: 'acc1' } } } + ] + }) + ) + ).toBe(false); + }); +}); + +describe('extractAccountPartyId', () => { + const accountId = '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY'; + + it('returns null for undefined / unfiltered exclude-rewards', () => { + expect(extractAccountPartyId(undefined)).toBeNull(); + expect(extractAccountPartyId(EXCLUDE_REWARD_TRANSFERS)).toBeNull(); + expect(extractAccountPartyId(withExcludedRewardTransfers())).toBeNull(); + }); + + it('extracts id from exclude-rewards + from/to same-id OR', () => { + expect( + extractAccountPartyId( + withExcludedRewardTransfers({ + _or: [ + { from: { id: { _eq: accountId } } }, + { to: { id: { _eq: accountId } } } + ] + }) + ) + ).toBe(accountId); + }); + + it('extracts id from bare from/to same-id OR', () => { + expect( + extractAccountPartyId({ + _or: [ + { from: { id: { _eq: accountId } } }, + { to: { id: { _eq: accountId } } } + ] + }) + ).toBe(accountId); + }); + + it('returns null for block height filter', () => { + expect( + extractAccountPartyId( + withExcludedRewardTransfers({ + block_height: { _eq: 42 } + }) + ) + ).toBeNull(); + }); + + it('returns null when from/to ids differ', () => { + expect( + extractAccountPartyId( + withExcludedRewardTransfers({ + _or: [ + { from: { id: { _eq: accountId } } }, + { to: { id: { _eq: 'other' } } } + ] + }) + ) + ).toBeNull(); + }); + + it('returns null when _or is missing or incomplete', () => { + expect( + extractAccountPartyId( + withExcludedRewardTransfers({ + from: { id: { _eq: accountId } } + }) + ) + ).toBeNull(); + expect( + extractAccountPartyId( + withExcludedRewardTransfers({ + _or: [{ from: { id: { _eq: accountId } } }] + }) + ) + ).toBeNull(); + }); +}); diff --git a/src/utils/unified-transaction-filters.ts b/src/utils/unified-transaction-filters.ts index ae33b23..e9421e4 100644 --- a/src/utils/unified-transaction-filters.ts +++ b/src/utils/unified-transaction-filters.ts @@ -13,3 +13,80 @@ export function withExcludedRewardTransfers( if (!where) return EXCLUDE_REWARD_TRANSFERS; return { _and: [EXCLUDE_REWARD_TRANSFERS, where] }; } + +/** True when where is exactly the global exclude-rewards filter (no extra predicates). */ +export function isUnfilteredExcludeRewards( + where?: Unified_Transaction_Bool_Exp +): boolean { + if (!where) return true; + return where === EXCLUDE_REWARD_TRANSFERS; +} + +function isExcludeRewardsClause( + clause: Unified_Transaction_Bool_Exp | null | undefined +): boolean { + if (!clause?._not?._and || clause._not._and.length !== 2) return false; + const parts = clause._not._and; + const hasImmediate = parts.some((p) => p?.type?._eq === 'IMMEDIATE'); + const hasNullHash = parts.some((p) => p?.hash?._is_null === true); + return hasImmediate && hasNullHash; +} + +function definedKeys(obj: object): string[] { + return Object.keys(obj).filter( + (k) => (obj as Record)[k] != null + ); +} + +/** + * If `where` is exclude-rewards + from/to party filter for one account, return that id. + * Otherwise null (block filters, mismatched ids, unfiltered, etc.). + */ +export function extractAccountPartyId( + where?: Unified_Transaction_Bool_Exp +): string | null { + if (!where) return null; + + let partyWhere: Unified_Transaction_Bool_Exp = where; + + if (where._and && Array.isArray(where._and) && where._and.length === 2) { + const [first, second] = where._and; + if (!isExcludeRewardsClause(first) || !second) return null; + if (definedKeys(where).length !== 1) return null; + partyWhere = second; + } else if (isExcludeRewardsClause(where)) { + return null; + } + + if (definedKeys(partyWhere).length !== 1 || !partyWhere._or) return null; + if (!Array.isArray(partyWhere._or) || partyWhere._or.length !== 2) { + return null; + } + + let fromId: string | undefined; + let toId: string | undefined; + + for (const clause of partyWhere._or) { + if (!clause || definedKeys(clause).length !== 1) return null; + const fromEq = clause.from?.id?._eq; + const toEq = clause.to?.id?._eq; + if (typeof fromEq === 'string' && clause.from && !clause.to) { + if (definedKeys(clause.from).length !== 1) return null; + if (!clause.from.id || definedKeys(clause.from.id).length !== 1) { + return null; + } + fromId = fromEq; + } else if (typeof toEq === 'string' && clause.to && !clause.from) { + if (definedKeys(clause.to).length !== 1) return null; + if (!clause.to.id || definedKeys(clause.to.id).length !== 1) { + return null; + } + toId = toEq; + } else { + return null; + } + } + + if (!fromId || !toId || fromId !== toId) return null; + return fromId; +} diff --git a/tsconfig.json b/tsconfig.json index 680a3b2..75b9b97 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -10,7 +10,7 @@ "alwaysStrict": true, "strictNullChecks": true, "noUncheckedIndexedAccess": true, - "types": ["vite/client"], + "types": ["vite/client", "jest"], "noImplicitAny": true, "noImplicitReturns": true, @@ -37,7 +37,6 @@ "incremental": true, // Path aliases - "baseUrl": ".", "paths": { "@/*": ["./src/*"], "@/public/*": ["./public/*"]