diff --git a/package-lock.json b/package-lock.json index cce95c611905..98947961911b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -56,727 +56,846 @@ "integrity": "sha512-96Z2IP3mYmF1Xg2cDm8f1gWGf/HUVedQ3FMifV4kG/PQ4yEP51xDtRAEfhVNt5f/uzpNkZHwWQuUcu6D6K+Ekw==" }, "node_modules/@aws-crypto/crc32": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@aws-crypto/crc32/-/crc32-3.0.0.tgz", - "integrity": "sha512-IzSgsrxUcsrejQbPVilIKy16kAT52EwB6zSaI+M3xxIhKh5+aldEyvI+z6erM7TCLB2BJsFrtHjp6/4/sr+3dA==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/crc32/-/crc32-5.2.0.tgz", + "integrity": "sha512-nLbCWqQNgUiwwtFsen1AdzAtvuLRsQS8rYgMuxCrdKf9kOssamGLuPwyTY9wyYblNr9+1XM8v6zoDTPPSIeANg==", "dependencies": { - "@aws-crypto/util": "^3.0.0", + "@aws-crypto/util": "^5.2.0", "@aws-sdk/types": "^3.222.0", - "tslib": "^1.11.1" + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" } }, - "node_modules/@aws-crypto/crc32/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" - }, "node_modules/@aws-crypto/crc32c": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@aws-crypto/crc32c/-/crc32c-3.0.0.tgz", - "integrity": "sha512-ENNPPManmnVJ4BTXlOjAgD7URidbAznURqD0KvfREyc4o20DPYdEldU1f5cQ7Jbj0CJJSPaMIk/9ZshdB3210w==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/crc32c/-/crc32c-5.2.0.tgz", + "integrity": "sha512-+iWb8qaHLYKrNvGRbiYRHSdKRWhto5XlZUEBwDjYNf+ly5SVYG6zEoYIdxvf5R3zyeP16w4PLBn3rH1xc74Rag==", "dependencies": { - "@aws-crypto/util": "^3.0.0", + "@aws-crypto/util": "^5.2.0", "@aws-sdk/types": "^3.222.0", - "tslib": "^1.11.1" + "tslib": "^2.6.2" } }, - "node_modules/@aws-crypto/crc32c/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" - }, - "node_modules/@aws-crypto/ie11-detection": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@aws-crypto/ie11-detection/-/ie11-detection-3.0.0.tgz", - "integrity": "sha512-341lBBkiY1DfDNKai/wXM3aujNBkXR7tq1URPQDL9wi3AUbI80NR74uF1TXHMm7po1AcnFk8iu2S2IeU/+/A+Q==", + "node_modules/@aws-crypto/sha1-browser": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/sha1-browser/-/sha1-browser-5.2.0.tgz", + "integrity": "sha512-OH6lveCFfcDjX4dbAvCFSYUjJZjDr/3XJ3xHtjn3Oj5b9RjojQo8npoLeA/bNwkOkrSQ0wgrHzXk4tDRxGKJeg==", "dependencies": { - "tslib": "^1.11.1" + "@aws-crypto/supports-web-crypto": "^5.2.0", + "@aws-crypto/util": "^5.2.0", + "@aws-sdk/types": "^3.222.0", + "@aws-sdk/util-locate-window": "^3.0.0", + "@smithy/util-utf8": "^2.0.0", + "tslib": "^2.6.2" } }, - "node_modules/@aws-crypto/ie11-detection/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + "node_modules/@aws-crypto/sha1-browser/node_modules/@smithy/is-array-buffer": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.2.0.tgz", + "integrity": "sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA==", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + } }, - "node_modules/@aws-crypto/sha1-browser": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@aws-crypto/sha1-browser/-/sha1-browser-3.0.0.tgz", - "integrity": "sha512-NJth5c997GLHs6nOYTzFKTbYdMNA6/1XlKVgnZoaZcQ7z7UJlOgj2JdbHE8tiYLS3fzXNCguct77SPGat2raSw==", + "node_modules/@aws-crypto/sha1-browser/node_modules/@smithy/util-buffer-from": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-2.2.0.tgz", + "integrity": "sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA==", "dependencies": { - "@aws-crypto/ie11-detection": "^3.0.0", - "@aws-crypto/supports-web-crypto": "^3.0.0", - "@aws-crypto/util": "^3.0.0", - "@aws-sdk/types": "^3.222.0", - "@aws-sdk/util-locate-window": "^3.0.0", - "@aws-sdk/util-utf8-browser": "^3.0.0", - "tslib": "^1.11.1" + "@smithy/is-array-buffer": "^2.2.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" } }, - "node_modules/@aws-crypto/sha1-browser/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + "node_modules/@aws-crypto/sha1-browser/node_modules/@smithy/util-utf8": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.3.0.tgz", + "integrity": "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A==", + "dependencies": { + "@smithy/util-buffer-from": "^2.2.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + } }, "node_modules/@aws-crypto/sha256-browser": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-browser/-/sha256-browser-3.0.0.tgz", - "integrity": "sha512-8VLmW2B+gjFbU5uMeqtQM6Nj0/F1bro80xQXCW6CQBWgosFWXTx77aeOF5CAIAmbOK64SdMBJdNr6J41yP5mvQ==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-browser/-/sha256-browser-5.2.0.tgz", + "integrity": "sha512-AXfN/lGotSQwu6HNcEsIASo7kWXZ5HYWvfOmSNKDsEqC4OashTp8alTmaz+F7TC2L083SFv5RdB+qU3Vs1kZqw==", "dependencies": { - "@aws-crypto/ie11-detection": "^3.0.0", - "@aws-crypto/sha256-js": "^3.0.0", - "@aws-crypto/supports-web-crypto": "^3.0.0", - "@aws-crypto/util": "^3.0.0", + "@aws-crypto/sha256-js": "^5.2.0", + "@aws-crypto/supports-web-crypto": "^5.2.0", + "@aws-crypto/util": "^5.2.0", "@aws-sdk/types": "^3.222.0", "@aws-sdk/util-locate-window": "^3.0.0", - "@aws-sdk/util-utf8-browser": "^3.0.0", - "tslib": "^1.11.1" + "@smithy/util-utf8": "^2.0.0", + "tslib": "^2.6.2" + } + }, + "node_modules/@aws-crypto/sha256-browser/node_modules/@smithy/is-array-buffer": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.2.0.tgz", + "integrity": "sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA==", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" } }, - "node_modules/@aws-crypto/sha256-browser/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + "node_modules/@aws-crypto/sha256-browser/node_modules/@smithy/util-buffer-from": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-2.2.0.tgz", + "integrity": "sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA==", + "dependencies": { + "@smithy/is-array-buffer": "^2.2.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-crypto/sha256-browser/node_modules/@smithy/util-utf8": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.3.0.tgz", + "integrity": "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A==", + "dependencies": { + "@smithy/util-buffer-from": "^2.2.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + } }, "node_modules/@aws-crypto/sha256-js": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-js/-/sha256-js-3.0.0.tgz", - "integrity": "sha512-PnNN7os0+yd1XvXAy23CFOmTbMaDxgxXtTKHybrJ39Y8kGzBATgBFibWJKH6BhytLI/Zyszs87xCOBNyBig6vQ==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-js/-/sha256-js-5.2.0.tgz", + "integrity": "sha512-FFQQyu7edu4ufvIZ+OadFpHHOt+eSTBaYaki44c+akjg7qZg9oOQeLlk77F6tSYqjDAFClrHJk9tMf0HdVyOvA==", "dependencies": { - "@aws-crypto/util": "^3.0.0", + "@aws-crypto/util": "^5.2.0", "@aws-sdk/types": "^3.222.0", - "tslib": "^1.11.1" + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" } }, - "node_modules/@aws-crypto/sha256-js/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" - }, "node_modules/@aws-crypto/supports-web-crypto": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@aws-crypto/supports-web-crypto/-/supports-web-crypto-3.0.0.tgz", - "integrity": "sha512-06hBdMwUAb2WFTuGG73LSC0wfPu93xWwo5vL2et9eymgmu3Id5vFAHBbajVWiGhPO37qcsdCap/FqXvJGJWPIg==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/supports-web-crypto/-/supports-web-crypto-5.2.0.tgz", + "integrity": "sha512-iAvUotm021kM33eCdNfwIN//F77/IADDSs58i+MDaOqFrVjZo9bAal0NK7HurRuWLLpF1iLX7gbWrjHjeo+YFg==", "dependencies": { - "tslib": "^1.11.1" + "tslib": "^2.6.2" } }, - "node_modules/@aws-crypto/supports-web-crypto/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" - }, "node_modules/@aws-crypto/util": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@aws-crypto/util/-/util-3.0.0.tgz", - "integrity": "sha512-2OJlpeJpCR48CC8r+uKVChzs9Iungj9wkZrl8Z041DWEWvyIHILYKCPNzJghKsivj+S3mLo6BVc7mBNzdxA46w==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/util/-/util-5.2.0.tgz", + "integrity": "sha512-4RkU9EsI6ZpBve5fseQlGNUWKMa1RLPQ1dnjnQoe07ldfIzcsGb5hC5W0Dm7u423KWzawlrpbjXBrXCEv9zazQ==", "dependencies": { "@aws-sdk/types": "^3.222.0", - "@aws-sdk/util-utf8-browser": "^3.0.0", - "tslib": "^1.11.1" + "@smithy/util-utf8": "^2.0.0", + "tslib": "^2.6.2" } }, - "node_modules/@aws-crypto/util/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" - }, - "node_modules/@aws-sdk/client-s3": { - "version": "3.485.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-s3/-/client-s3-3.485.0.tgz", - "integrity": "sha512-Vh8FRiXekwu1sSdfhS/wpNzjIljPmIXrUdEapR7EmaIwditR+mTTzNS+7y69YdPQhVEE2u9QxRlo4Eg1e1jD3w==", - "dependencies": { - "@aws-crypto/sha1-browser": "3.0.0", - "@aws-crypto/sha256-browser": "3.0.0", - "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/client-sts": "3.485.0", - "@aws-sdk/core": "3.485.0", - "@aws-sdk/credential-provider-node": "3.485.0", - "@aws-sdk/middleware-bucket-endpoint": "3.485.0", - "@aws-sdk/middleware-expect-continue": "3.485.0", - "@aws-sdk/middleware-flexible-checksums": "3.485.0", - "@aws-sdk/middleware-host-header": "3.485.0", - "@aws-sdk/middleware-location-constraint": "3.485.0", - "@aws-sdk/middleware-logger": "3.485.0", - "@aws-sdk/middleware-recursion-detection": "3.485.0", - "@aws-sdk/middleware-sdk-s3": "3.485.0", - "@aws-sdk/middleware-signing": "3.485.0", - "@aws-sdk/middleware-ssec": "3.485.0", - "@aws-sdk/middleware-user-agent": "3.485.0", - "@aws-sdk/region-config-resolver": "3.485.0", - "@aws-sdk/signature-v4-multi-region": "3.485.0", - "@aws-sdk/types": "3.485.0", - "@aws-sdk/util-endpoints": "3.485.0", - "@aws-sdk/util-user-agent-browser": "3.485.0", - "@aws-sdk/util-user-agent-node": "3.485.0", - "@aws-sdk/xml-builder": "3.485.0", - "@smithy/config-resolver": "^2.0.23", - "@smithy/core": "^1.2.2", - "@smithy/eventstream-serde-browser": "^2.0.16", - "@smithy/eventstream-serde-config-resolver": "^2.0.16", - "@smithy/eventstream-serde-node": "^2.0.16", - "@smithy/fetch-http-handler": "^2.3.2", - "@smithy/hash-blob-browser": "^2.0.17", - "@smithy/hash-node": "^2.0.18", - "@smithy/hash-stream-node": "^2.0.18", - "@smithy/invalid-dependency": "^2.0.16", - "@smithy/md5-js": "^2.0.18", - "@smithy/middleware-content-length": "^2.0.18", - "@smithy/middleware-endpoint": "^2.3.0", - "@smithy/middleware-retry": "^2.0.26", - "@smithy/middleware-serde": "^2.0.16", - "@smithy/middleware-stack": "^2.0.10", - "@smithy/node-config-provider": "^2.1.9", - "@smithy/node-http-handler": "^2.2.2", - "@smithy/protocol-http": "^3.0.12", - "@smithy/smithy-client": "^2.2.1", - "@smithy/types": "^2.8.0", - "@smithy/url-parser": "^2.0.16", - "@smithy/util-base64": "^2.0.1", - "@smithy/util-body-length-browser": "^2.0.1", - "@smithy/util-body-length-node": "^2.1.0", - "@smithy/util-defaults-mode-browser": "^2.0.24", - "@smithy/util-defaults-mode-node": "^2.0.32", - "@smithy/util-endpoints": "^1.0.8", - "@smithy/util-retry": "^2.0.9", - "@smithy/util-stream": "^2.0.24", - "@smithy/util-utf8": "^2.0.2", - "@smithy/util-waiter": "^2.0.16", - "fast-xml-parser": "4.2.5", - "tslib": "^2.5.0" + "node_modules/@aws-crypto/util/node_modules/@smithy/is-array-buffer": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.2.0.tgz", + "integrity": "sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA==", + "dependencies": { + "tslib": "^2.6.2" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-sso": { - "version": "3.485.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.485.0.tgz", - "integrity": "sha512-apN2bEn0PZs0jD4jAfvwO3dlWqw9YIQJ6TAudM1bd3S5vzWqlBBcLfQpK6taHoQaI+WqgUWXLuOf7gRFbGXKPg==", - "dependencies": { - "@aws-crypto/sha256-browser": "3.0.0", - "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/core": "3.485.0", - "@aws-sdk/middleware-host-header": "3.485.0", - "@aws-sdk/middleware-logger": "3.485.0", - "@aws-sdk/middleware-recursion-detection": "3.485.0", - "@aws-sdk/middleware-user-agent": "3.485.0", - "@aws-sdk/region-config-resolver": "3.485.0", - "@aws-sdk/types": "3.485.0", - "@aws-sdk/util-endpoints": "3.485.0", - "@aws-sdk/util-user-agent-browser": "3.485.0", - "@aws-sdk/util-user-agent-node": "3.485.0", - "@smithy/config-resolver": "^2.0.23", - "@smithy/core": "^1.2.2", - "@smithy/fetch-http-handler": "^2.3.2", - "@smithy/hash-node": "^2.0.18", - "@smithy/invalid-dependency": "^2.0.16", - "@smithy/middleware-content-length": "^2.0.18", - "@smithy/middleware-endpoint": "^2.3.0", - "@smithy/middleware-retry": "^2.0.26", - "@smithy/middleware-serde": "^2.0.16", - "@smithy/middleware-stack": "^2.0.10", - "@smithy/node-config-provider": "^2.1.9", - "@smithy/node-http-handler": "^2.2.2", - "@smithy/protocol-http": "^3.0.12", - "@smithy/smithy-client": "^2.2.1", - "@smithy/types": "^2.8.0", - "@smithy/url-parser": "^2.0.16", - "@smithy/util-base64": "^2.0.1", - "@smithy/util-body-length-browser": "^2.0.1", - "@smithy/util-body-length-node": "^2.1.0", - "@smithy/util-defaults-mode-browser": "^2.0.24", - "@smithy/util-defaults-mode-node": "^2.0.32", - "@smithy/util-endpoints": "^1.0.8", - "@smithy/util-retry": "^2.0.9", - "@smithy/util-utf8": "^2.0.2", - "tslib": "^2.5.0" + "node_modules/@aws-crypto/util/node_modules/@smithy/util-buffer-from": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-2.2.0.tgz", + "integrity": "sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA==", + "dependencies": { + "@smithy/is-array-buffer": "^2.2.0", + "tslib": "^2.6.2" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-sts": { - "version": "3.485.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.485.0.tgz", - "integrity": "sha512-PI4q36kVF0fpIPZyeQhrwwJZ6SRkOGvU3rX5Qn4b5UY5X+Ct1aLhqSX8/OB372UZIcnh6eSvERu8POHleDO7Jw==", - "dependencies": { - "@aws-crypto/sha256-browser": "3.0.0", - "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/core": "3.485.0", - "@aws-sdk/credential-provider-node": "3.485.0", - "@aws-sdk/middleware-host-header": "3.485.0", - "@aws-sdk/middleware-logger": "3.485.0", - "@aws-sdk/middleware-recursion-detection": "3.485.0", - "@aws-sdk/middleware-user-agent": "3.485.0", - "@aws-sdk/region-config-resolver": "3.485.0", - "@aws-sdk/types": "3.485.0", - "@aws-sdk/util-endpoints": "3.485.0", - "@aws-sdk/util-user-agent-browser": "3.485.0", - "@aws-sdk/util-user-agent-node": "3.485.0", - "@smithy/config-resolver": "^2.0.23", - "@smithy/core": "^1.2.2", - "@smithy/fetch-http-handler": "^2.3.2", - "@smithy/hash-node": "^2.0.18", - "@smithy/invalid-dependency": "^2.0.16", - "@smithy/middleware-content-length": "^2.0.18", - "@smithy/middleware-endpoint": "^2.3.0", - "@smithy/middleware-retry": "^2.0.26", - "@smithy/middleware-serde": "^2.0.16", - "@smithy/middleware-stack": "^2.0.10", - "@smithy/node-config-provider": "^2.1.9", - "@smithy/node-http-handler": "^2.2.2", - "@smithy/protocol-http": "^3.0.12", - "@smithy/smithy-client": "^2.2.1", - "@smithy/types": "^2.8.0", - "@smithy/url-parser": "^2.0.16", - "@smithy/util-base64": "^2.0.1", - "@smithy/util-body-length-browser": "^2.0.1", - "@smithy/util-body-length-node": "^2.1.0", - "@smithy/util-defaults-mode-browser": "^2.0.24", - "@smithy/util-defaults-mode-node": "^2.0.32", - "@smithy/util-endpoints": "^1.0.8", - "@smithy/util-middleware": "^2.0.9", - "@smithy/util-retry": "^2.0.9", - "@smithy/util-utf8": "^2.0.2", - "fast-xml-parser": "4.2.5", - "tslib": "^2.5.0" + "node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.3.0.tgz", + "integrity": "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A==", + "dependencies": { + "@smithy/util-buffer-from": "^2.2.0", + "tslib": "^2.6.2" }, "engines": { "node": ">=14.0.0" } }, + "node_modules/@aws-sdk/client-s3": { + "version": "3.623.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-s3/-/client-s3-3.623.0.tgz", + "integrity": "sha512-vEroSYEtbp5n289xsQnnAhKxg3R5NGkbhKXWpW1m7GGDsFihwVT9CVsDHpIW2Hvezz5ob65gB4ZAYMnJWZuUpA==", + "dependencies": { + "@aws-crypto/sha1-browser": "5.2.0", + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@aws-sdk/client-sso-oidc": "3.623.0", + "@aws-sdk/client-sts": "3.623.0", + "@aws-sdk/core": "3.623.0", + "@aws-sdk/credential-provider-node": "3.623.0", + "@aws-sdk/middleware-bucket-endpoint": "3.620.0", + "@aws-sdk/middleware-expect-continue": "3.620.0", + "@aws-sdk/middleware-flexible-checksums": "3.620.0", + "@aws-sdk/middleware-host-header": "3.620.0", + "@aws-sdk/middleware-location-constraint": "3.609.0", + "@aws-sdk/middleware-logger": "3.609.0", + "@aws-sdk/middleware-recursion-detection": "3.620.0", + "@aws-sdk/middleware-sdk-s3": "3.622.0", + "@aws-sdk/middleware-signing": "3.620.0", + "@aws-sdk/middleware-ssec": "3.609.0", + "@aws-sdk/middleware-user-agent": "3.620.0", + "@aws-sdk/region-config-resolver": "3.614.0", + "@aws-sdk/signature-v4-multi-region": "3.622.0", + "@aws-sdk/types": "3.609.0", + "@aws-sdk/util-endpoints": "3.614.0", + "@aws-sdk/util-user-agent-browser": "3.609.0", + "@aws-sdk/util-user-agent-node": "3.614.0", + "@aws-sdk/xml-builder": "3.609.0", + "@smithy/config-resolver": "^3.0.5", + "@smithy/core": "^2.3.2", + "@smithy/eventstream-serde-browser": "^3.0.5", + "@smithy/eventstream-serde-config-resolver": "^3.0.3", + "@smithy/eventstream-serde-node": "^3.0.4", + "@smithy/fetch-http-handler": "^3.2.4", + "@smithy/hash-blob-browser": "^3.1.2", + "@smithy/hash-node": "^3.0.3", + "@smithy/hash-stream-node": "^3.1.2", + "@smithy/invalid-dependency": "^3.0.3", + "@smithy/md5-js": "^3.0.3", + "@smithy/middleware-content-length": "^3.0.5", + "@smithy/middleware-endpoint": "^3.1.0", + "@smithy/middleware-retry": "^3.0.14", + "@smithy/middleware-serde": "^3.0.3", + "@smithy/middleware-stack": "^3.0.3", + "@smithy/node-config-provider": "^3.1.4", + "@smithy/node-http-handler": "^3.1.4", + "@smithy/protocol-http": "^4.1.0", + "@smithy/smithy-client": "^3.1.12", + "@smithy/types": "^3.3.0", + "@smithy/url-parser": "^3.0.3", + "@smithy/util-base64": "^3.0.0", + "@smithy/util-body-length-browser": "^3.0.0", + "@smithy/util-body-length-node": "^3.0.0", + "@smithy/util-defaults-mode-browser": "^3.0.14", + "@smithy/util-defaults-mode-node": "^3.0.14", + "@smithy/util-endpoints": "^2.0.5", + "@smithy/util-retry": "^3.0.3", + "@smithy/util-stream": "^3.1.3", + "@smithy/util-utf8": "^3.0.0", + "@smithy/util-waiter": "^3.1.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-sso": { + "version": "3.623.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.623.0.tgz", + "integrity": "sha512-oEACriysQMnHIVcNp7TD6D1nzgiHfYK0tmMBMbUxgoFuCBkW9g9QYvspHN+S9KgoePfMEXHuPUe9mtG9AH9XeA==", + "dependencies": { + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@aws-sdk/core": "3.623.0", + "@aws-sdk/middleware-host-header": "3.620.0", + "@aws-sdk/middleware-logger": "3.609.0", + "@aws-sdk/middleware-recursion-detection": "3.620.0", + "@aws-sdk/middleware-user-agent": "3.620.0", + "@aws-sdk/region-config-resolver": "3.614.0", + "@aws-sdk/types": "3.609.0", + "@aws-sdk/util-endpoints": "3.614.0", + "@aws-sdk/util-user-agent-browser": "3.609.0", + "@aws-sdk/util-user-agent-node": "3.614.0", + "@smithy/config-resolver": "^3.0.5", + "@smithy/core": "^2.3.2", + "@smithy/fetch-http-handler": "^3.2.4", + "@smithy/hash-node": "^3.0.3", + "@smithy/invalid-dependency": "^3.0.3", + "@smithy/middleware-content-length": "^3.0.5", + "@smithy/middleware-endpoint": "^3.1.0", + "@smithy/middleware-retry": "^3.0.14", + "@smithy/middleware-serde": "^3.0.3", + "@smithy/middleware-stack": "^3.0.3", + "@smithy/node-config-provider": "^3.1.4", + "@smithy/node-http-handler": "^3.1.4", + "@smithy/protocol-http": "^4.1.0", + "@smithy/smithy-client": "^3.1.12", + "@smithy/types": "^3.3.0", + "@smithy/url-parser": "^3.0.3", + "@smithy/util-base64": "^3.0.0", + "@smithy/util-body-length-browser": "^3.0.0", + "@smithy/util-body-length-node": "^3.0.0", + "@smithy/util-defaults-mode-browser": "^3.0.14", + "@smithy/util-defaults-mode-node": "^3.0.14", + "@smithy/util-endpoints": "^2.0.5", + "@smithy/util-middleware": "^3.0.3", + "@smithy/util-retry": "^3.0.3", + "@smithy/util-utf8": "^3.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-sso-oidc": { + "version": "3.623.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso-oidc/-/client-sso-oidc-3.623.0.tgz", + "integrity": "sha512-lMFEXCa6ES/FGV7hpyrppT1PiAkqQb51AbG0zVU3TIgI2IO4XX02uzMUXImRSRqRpGymRCbJCaCs9LtKvS/37Q==", + "dependencies": { + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@aws-sdk/core": "3.623.0", + "@aws-sdk/credential-provider-node": "3.623.0", + "@aws-sdk/middleware-host-header": "3.620.0", + "@aws-sdk/middleware-logger": "3.609.0", + "@aws-sdk/middleware-recursion-detection": "3.620.0", + "@aws-sdk/middleware-user-agent": "3.620.0", + "@aws-sdk/region-config-resolver": "3.614.0", + "@aws-sdk/types": "3.609.0", + "@aws-sdk/util-endpoints": "3.614.0", + "@aws-sdk/util-user-agent-browser": "3.609.0", + "@aws-sdk/util-user-agent-node": "3.614.0", + "@smithy/config-resolver": "^3.0.5", + "@smithy/core": "^2.3.2", + "@smithy/fetch-http-handler": "^3.2.4", + "@smithy/hash-node": "^3.0.3", + "@smithy/invalid-dependency": "^3.0.3", + "@smithy/middleware-content-length": "^3.0.5", + "@smithy/middleware-endpoint": "^3.1.0", + "@smithy/middleware-retry": "^3.0.14", + "@smithy/middleware-serde": "^3.0.3", + "@smithy/middleware-stack": "^3.0.3", + "@smithy/node-config-provider": "^3.1.4", + "@smithy/node-http-handler": "^3.1.4", + "@smithy/protocol-http": "^4.1.0", + "@smithy/smithy-client": "^3.1.12", + "@smithy/types": "^3.3.0", + "@smithy/url-parser": "^3.0.3", + "@smithy/util-base64": "^3.0.0", + "@smithy/util-body-length-browser": "^3.0.0", + "@smithy/util-body-length-node": "^3.0.0", + "@smithy/util-defaults-mode-browser": "^3.0.14", + "@smithy/util-defaults-mode-node": "^3.0.14", + "@smithy/util-endpoints": "^2.0.5", + "@smithy/util-middleware": "^3.0.3", + "@smithy/util-retry": "^3.0.3", + "@smithy/util-utf8": "^3.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + }, + "peerDependencies": { + "@aws-sdk/client-sts": "^3.623.0" + } + }, + "node_modules/@aws-sdk/client-sts": { + "version": "3.623.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.623.0.tgz", + "integrity": "sha512-iJNdx76SOw0YjHAUv8aj3HXzSu3TKI7qSGuR+OGATwA/kpJZDd+4+WYBdGtr8YK+hPrGGqhfecuCkEg805O5iA==", + "dependencies": { + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@aws-sdk/client-sso-oidc": "3.623.0", + "@aws-sdk/core": "3.623.0", + "@aws-sdk/credential-provider-node": "3.623.0", + "@aws-sdk/middleware-host-header": "3.620.0", + "@aws-sdk/middleware-logger": "3.609.0", + "@aws-sdk/middleware-recursion-detection": "3.620.0", + "@aws-sdk/middleware-user-agent": "3.620.0", + "@aws-sdk/region-config-resolver": "3.614.0", + "@aws-sdk/types": "3.609.0", + "@aws-sdk/util-endpoints": "3.614.0", + "@aws-sdk/util-user-agent-browser": "3.609.0", + "@aws-sdk/util-user-agent-node": "3.614.0", + "@smithy/config-resolver": "^3.0.5", + "@smithy/core": "^2.3.2", + "@smithy/fetch-http-handler": "^3.2.4", + "@smithy/hash-node": "^3.0.3", + "@smithy/invalid-dependency": "^3.0.3", + "@smithy/middleware-content-length": "^3.0.5", + "@smithy/middleware-endpoint": "^3.1.0", + "@smithy/middleware-retry": "^3.0.14", + "@smithy/middleware-serde": "^3.0.3", + "@smithy/middleware-stack": "^3.0.3", + "@smithy/node-config-provider": "^3.1.4", + "@smithy/node-http-handler": "^3.1.4", + "@smithy/protocol-http": "^4.1.0", + "@smithy/smithy-client": "^3.1.12", + "@smithy/types": "^3.3.0", + "@smithy/url-parser": "^3.0.3", + "@smithy/util-base64": "^3.0.0", + "@smithy/util-body-length-browser": "^3.0.0", + "@smithy/util-body-length-node": "^3.0.0", + "@smithy/util-defaults-mode-browser": "^3.0.14", + "@smithy/util-defaults-mode-node": "^3.0.14", + "@smithy/util-endpoints": "^2.0.5", + "@smithy/util-middleware": "^3.0.3", + "@smithy/util-retry": "^3.0.3", + "@smithy/util-utf8": "^3.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, "node_modules/@aws-sdk/core": { - "version": "3.485.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.485.0.tgz", - "integrity": "sha512-Yvi80DQcbjkYCft471ClE3HuetuNVqntCs6eFOomDcrJaqdOFrXv2kJAxky84MRA/xb7bGlDGAPbTuj1ICputg==", + "version": "3.623.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.623.0.tgz", + "integrity": "sha512-8Toq3X6trX/67obSdh4K0MFQY4f132bEbr1i0YPDWk/O3KdBt12mLC/sW3aVRnlIs110XMuX9yrWWqJ8fDW10g==", "dependencies": { - "@smithy/core": "^1.2.2", - "@smithy/protocol-http": "^3.0.12", - "@smithy/signature-v4": "^2.0.0", - "@smithy/smithy-client": "^2.2.1", - "@smithy/types": "^2.8.0", - "tslib": "^2.5.0" + "@smithy/core": "^2.3.2", + "@smithy/node-config-provider": "^3.1.4", + "@smithy/protocol-http": "^4.1.0", + "@smithy/signature-v4": "^4.1.0", + "@smithy/smithy-client": "^3.1.12", + "@smithy/types": "^3.3.0", + "@smithy/util-middleware": "^3.0.3", + "fast-xml-parser": "4.4.1", + "tslib": "^2.6.2" }, "engines": { - "node": ">=14.0.0" + "node": ">=16.0.0" } }, "node_modules/@aws-sdk/credential-provider-env": { - "version": "3.485.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.485.0.tgz", - "integrity": "sha512-3XkFgwVU1XOB33dV7t9BKJ/ptdl2iS+0dxE7ecq8aqT2/gsfKmLCae1G17P8WmdD3z0kMDTvnqM2aWgUnSOkmg==", + "version": "3.620.1", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.620.1.tgz", + "integrity": "sha512-ExuILJ2qLW5ZO+rgkNRj0xiAipKT16Rk77buvPP8csR7kkCflT/gXTyzRe/uzIiETTxM7tr8xuO9MP/DQXqkfg==", "dependencies": { - "@aws-sdk/types": "3.485.0", - "@smithy/property-provider": "^2.0.0", - "@smithy/types": "^2.8.0", - "tslib": "^2.5.0" + "@aws-sdk/types": "3.609.0", + "@smithy/property-provider": "^3.1.3", + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" }, "engines": { - "node": ">=14.0.0" + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-http": { + "version": "3.622.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-http/-/credential-provider-http-3.622.0.tgz", + "integrity": "sha512-VUHbr24Oll1RK3WR8XLUugLpgK9ZuxEm/NVeVqyFts1Ck9gsKpRg1x4eH7L7tW3SJ4TDEQNMbD7/7J+eoL2svg==", + "dependencies": { + "@aws-sdk/types": "3.609.0", + "@smithy/fetch-http-handler": "^3.2.4", + "@smithy/node-http-handler": "^3.1.4", + "@smithy/property-provider": "^3.1.3", + "@smithy/protocol-http": "^4.1.0", + "@smithy/smithy-client": "^3.1.12", + "@smithy/types": "^3.3.0", + "@smithy/util-stream": "^3.1.3", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" } }, "node_modules/@aws-sdk/credential-provider-ini": { - "version": "3.485.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.485.0.tgz", - "integrity": "sha512-cFYF/Bdw7EnT4viSxYpNIv3IBkri/Yb+JpQXl8uDq7bfVJfAN5qZmK07vRkg08xL6TC4F41wshhMSAucGdTwIw==", - "dependencies": { - "@aws-sdk/credential-provider-env": "3.485.0", - "@aws-sdk/credential-provider-process": "3.485.0", - "@aws-sdk/credential-provider-sso": "3.485.0", - "@aws-sdk/credential-provider-web-identity": "3.485.0", - "@aws-sdk/types": "3.485.0", - "@smithy/credential-provider-imds": "^2.0.0", - "@smithy/property-provider": "^2.0.0", - "@smithy/shared-ini-file-loader": "^2.0.6", - "@smithy/types": "^2.8.0", - "tslib": "^2.5.0" + "version": "3.623.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.623.0.tgz", + "integrity": "sha512-kvXA1SwGneqGzFwRZNpESitnmaENHGFFuuTvgGwtMe7mzXWuA/LkXdbiHmdyAzOo0iByKTCD8uetuwh3CXy4Pw==", + "dependencies": { + "@aws-sdk/credential-provider-env": "3.620.1", + "@aws-sdk/credential-provider-http": "3.622.0", + "@aws-sdk/credential-provider-process": "3.620.1", + "@aws-sdk/credential-provider-sso": "3.623.0", + "@aws-sdk/credential-provider-web-identity": "3.621.0", + "@aws-sdk/types": "3.609.0", + "@smithy/credential-provider-imds": "^3.2.0", + "@smithy/property-provider": "^3.1.3", + "@smithy/shared-ini-file-loader": "^3.1.4", + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" }, "engines": { - "node": ">=14.0.0" + "node": ">=16.0.0" + }, + "peerDependencies": { + "@aws-sdk/client-sts": "^3.623.0" } }, "node_modules/@aws-sdk/credential-provider-node": { - "version": "3.485.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.485.0.tgz", - "integrity": "sha512-2DwzO2azkSzngifKDT61W/DL0tSzewuaFHiLJWdfc8Et3mdAQJ9x3KAj8u7XFpjIcGNqk7FiKjN+zeGUuNiEhA==", - "dependencies": { - "@aws-sdk/credential-provider-env": "3.485.0", - "@aws-sdk/credential-provider-ini": "3.485.0", - "@aws-sdk/credential-provider-process": "3.485.0", - "@aws-sdk/credential-provider-sso": "3.485.0", - "@aws-sdk/credential-provider-web-identity": "3.485.0", - "@aws-sdk/types": "3.485.0", - "@smithy/credential-provider-imds": "^2.0.0", - "@smithy/property-provider": "^2.0.0", - "@smithy/shared-ini-file-loader": "^2.0.6", - "@smithy/types": "^2.8.0", - "tslib": "^2.5.0" + "version": "3.623.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.623.0.tgz", + "integrity": "sha512-qDwCOkhbu5PfaQHyuQ+h57HEx3+eFhKdtIw7aISziWkGdFrMe07yIBd7TJqGe4nxXnRF1pfkg05xeOlMId997g==", + "dependencies": { + "@aws-sdk/credential-provider-env": "3.620.1", + "@aws-sdk/credential-provider-http": "3.622.0", + "@aws-sdk/credential-provider-ini": "3.623.0", + "@aws-sdk/credential-provider-process": "3.620.1", + "@aws-sdk/credential-provider-sso": "3.623.0", + "@aws-sdk/credential-provider-web-identity": "3.621.0", + "@aws-sdk/types": "3.609.0", + "@smithy/credential-provider-imds": "^3.2.0", + "@smithy/property-provider": "^3.1.3", + "@smithy/shared-ini-file-loader": "^3.1.4", + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" }, "engines": { - "node": ">=14.0.0" + "node": ">=16.0.0" } }, "node_modules/@aws-sdk/credential-provider-process": { - "version": "3.485.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.485.0.tgz", - "integrity": "sha512-X9qS6ZO/rDKYDgWqD1YmSX7sAUUHax9HbXlgGiTTdtfhZvQh1ZmnH6wiPu5WNliafHZFtZT2W07kgrDLPld/Ug==", + "version": "3.620.1", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.620.1.tgz", + "integrity": "sha512-hWqFMidqLAkaV9G460+1at6qa9vySbjQKKc04p59OT7lZ5cO5VH5S4aI05e+m4j364MBROjjk2ugNvfNf/8ILg==", "dependencies": { - "@aws-sdk/types": "3.485.0", - "@smithy/property-provider": "^2.0.0", - "@smithy/shared-ini-file-loader": "^2.0.6", - "@smithy/types": "^2.8.0", - "tslib": "^2.5.0" + "@aws-sdk/types": "3.609.0", + "@smithy/property-provider": "^3.1.3", + "@smithy/shared-ini-file-loader": "^3.1.4", + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" }, "engines": { - "node": ">=14.0.0" + "node": ">=16.0.0" } }, "node_modules/@aws-sdk/credential-provider-sso": { - "version": "3.485.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.485.0.tgz", - "integrity": "sha512-l0oC8GTrWh+LFQQfSmG1Jai1PX7Mhj9arb/CaS1/tmeZE0hgIXW++tvljYs/Dds4LGXUlaWG+P7BrObf6OyIXA==", + "version": "3.623.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.623.0.tgz", + "integrity": "sha512-70LZhUb3l7cttEsg4A0S4Jq3qrCT/v5Jfyl8F7w1YZJt5zr3oPPcvDJxo/UYckFz4G4/5BhGa99jK8wMlNE9QA==", "dependencies": { - "@aws-sdk/client-sso": "3.485.0", - "@aws-sdk/token-providers": "3.485.0", - "@aws-sdk/types": "3.485.0", - "@smithy/property-provider": "^2.0.0", - "@smithy/shared-ini-file-loader": "^2.0.6", - "@smithy/types": "^2.8.0", - "tslib": "^2.5.0" + "@aws-sdk/client-sso": "3.623.0", + "@aws-sdk/token-providers": "3.614.0", + "@aws-sdk/types": "3.609.0", + "@smithy/property-provider": "^3.1.3", + "@smithy/shared-ini-file-loader": "^3.1.4", + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" }, "engines": { - "node": ">=14.0.0" + "node": ">=16.0.0" } }, "node_modules/@aws-sdk/credential-provider-web-identity": { - "version": "3.485.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.485.0.tgz", - "integrity": "sha512-WpBFZFE0iXtnibH5POMEKITj/hR0YV5l2n9p8BEvKjdJ63s3Xke1RN20ZdIyKDaRDwj8adnKDgNPEnAKdS4kLw==", + "version": "3.621.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.621.0.tgz", + "integrity": "sha512-w7ASSyfNvcx7+bYGep3VBgC3K6vEdLmlpjT7nSIHxxQf+WSdvy+HynwJosrpZax0sK5q0D1Jpn/5q+r5lwwW6w==", "dependencies": { - "@aws-sdk/types": "3.485.0", - "@smithy/property-provider": "^2.0.0", - "@smithy/types": "^2.8.0", - "tslib": "^2.5.0" + "@aws-sdk/types": "3.609.0", + "@smithy/property-provider": "^3.1.3", + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" }, "engines": { - "node": ">=14.0.0" + "node": ">=16.0.0" + }, + "peerDependencies": { + "@aws-sdk/client-sts": "^3.621.0" } }, "node_modules/@aws-sdk/middleware-bucket-endpoint": { - "version": "3.485.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-bucket-endpoint/-/middleware-bucket-endpoint-3.485.0.tgz", - "integrity": "sha512-DptPuprsx9V1LH91ZvC/7a7B1UnuSAIi1ArJHlHqJL1ISo6sH1oeXP6KRa0tj8biGMDIx0b22wg8EEpFePMy3w==", + "version": "3.620.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-bucket-endpoint/-/middleware-bucket-endpoint-3.620.0.tgz", + "integrity": "sha512-eGLL0W6L3HDb3OACyetZYOWpHJ+gLo0TehQKeQyy2G8vTYXqNTeqYhuI6up9HVjBzU9eQiULVQETmgQs7TFaRg==", "dependencies": { - "@aws-sdk/types": "3.485.0", - "@aws-sdk/util-arn-parser": "3.465.0", - "@smithy/node-config-provider": "^2.1.9", - "@smithy/protocol-http": "^3.0.12", - "@smithy/types": "^2.8.0", - "@smithy/util-config-provider": "^2.1.0", - "tslib": "^2.5.0" + "@aws-sdk/types": "3.609.0", + "@aws-sdk/util-arn-parser": "3.568.0", + "@smithy/node-config-provider": "^3.1.4", + "@smithy/protocol-http": "^4.1.0", + "@smithy/types": "^3.3.0", + "@smithy/util-config-provider": "^3.0.0", + "tslib": "^2.6.2" }, "engines": { - "node": ">=14.0.0" + "node": ">=16.0.0" } }, "node_modules/@aws-sdk/middleware-expect-continue": { - "version": "3.485.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-expect-continue/-/middleware-expect-continue-3.485.0.tgz", - "integrity": "sha512-rOwJJWM1/ydwSiJJ1l/X5h91u2Xzb8/CwOW6ZY+E8iZA0HDCtlJnKNlhHb+NHGtDamd4+1qdGSRtPQevyS58Cg==", + "version": "3.620.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-expect-continue/-/middleware-expect-continue-3.620.0.tgz", + "integrity": "sha512-QXeRFMLfyQ31nAHLbiTLtk0oHzG9QLMaof5jIfqcUwnOkO8YnQdeqzakrg1Alpy/VQ7aqzIi8qypkBe2KXZz0A==", "dependencies": { - "@aws-sdk/types": "3.485.0", - "@smithy/protocol-http": "^3.0.12", - "@smithy/types": "^2.8.0", - "tslib": "^2.5.0" + "@aws-sdk/types": "3.609.0", + "@smithy/protocol-http": "^4.1.0", + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" }, "engines": { - "node": ">=14.0.0" + "node": ">=16.0.0" } }, "node_modules/@aws-sdk/middleware-flexible-checksums": { - "version": "3.485.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-flexible-checksums/-/middleware-flexible-checksums-3.485.0.tgz", - "integrity": "sha512-5+OmVMbEwl1LDdWbaJxoSViw6vuMsdDQgASFUM37aG46q1zWSiPU171IXutEAFZZXN/t0HcOFi0AmNrS0o+dkQ==", + "version": "3.620.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-flexible-checksums/-/middleware-flexible-checksums-3.620.0.tgz", + "integrity": "sha512-ftz+NW7qka2sVuwnnO1IzBku5ccP+s5qZGeRTPgrKB7OzRW85gthvIo1vQR2w+OwHFk7WJbbhhWwbCbktnP4UA==", "dependencies": { - "@aws-crypto/crc32": "3.0.0", - "@aws-crypto/crc32c": "3.0.0", - "@aws-sdk/types": "3.485.0", - "@smithy/is-array-buffer": "^2.0.0", - "@smithy/protocol-http": "^3.0.12", - "@smithy/types": "^2.8.0", - "@smithy/util-utf8": "^2.0.2", - "tslib": "^2.5.0" + "@aws-crypto/crc32": "5.2.0", + "@aws-crypto/crc32c": "5.2.0", + "@aws-sdk/types": "3.609.0", + "@smithy/is-array-buffer": "^3.0.0", + "@smithy/protocol-http": "^4.1.0", + "@smithy/types": "^3.3.0", + "@smithy/util-utf8": "^3.0.0", + "tslib": "^2.6.2" }, "engines": { - "node": ">=14.0.0" + "node": ">=16.0.0" } }, "node_modules/@aws-sdk/middleware-host-header": { - "version": "3.485.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.485.0.tgz", - "integrity": "sha512-1mAUX9dQNGo2RIKseVj7SI/D5abQJQ/Os8hQ0NyVAyyVYF+Yjx5PphKgfhM5yoBwuwZUl6q71XPYEGNx7be6SA==", + "version": "3.620.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.620.0.tgz", + "integrity": "sha512-VMtPEZwqYrII/oUkffYsNWY9PZ9xpNJpMgmyU0rlDQ25O1c0Hk3fJmZRe6pEkAJ0omD7kLrqGl1DUjQVxpd/Rg==", "dependencies": { - "@aws-sdk/types": "3.485.0", - "@smithy/protocol-http": "^3.0.12", - "@smithy/types": "^2.8.0", - "tslib": "^2.5.0" + "@aws-sdk/types": "3.609.0", + "@smithy/protocol-http": "^4.1.0", + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" }, "engines": { - "node": ">=14.0.0" + "node": ">=16.0.0" } }, "node_modules/@aws-sdk/middleware-location-constraint": { - "version": "3.485.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-location-constraint/-/middleware-location-constraint-3.485.0.tgz", - "integrity": "sha512-Mrp4chtYliqCUSVjzLYPcZCPGmhL4QM7o6NhHBdA6omaIGdn4pJqFwN5ELZoWJDZMKyfrKi6s6u97jR9VtEXRg==", + "version": "3.609.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-location-constraint/-/middleware-location-constraint-3.609.0.tgz", + "integrity": "sha512-xzsdoTkszGVqGVPjUmgoP7TORiByLueMHieI1fhQL888WPdqctwAx3ES6d/bA9Q/i8jnc6hs+Fjhy8UvBTkE9A==", "dependencies": { - "@aws-sdk/types": "3.485.0", - "@smithy/types": "^2.8.0", - "tslib": "^2.5.0" + "@aws-sdk/types": "3.609.0", + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" }, "engines": { - "node": ">=14.0.0" + "node": ">=16.0.0" } }, "node_modules/@aws-sdk/middleware-logger": { - "version": "3.485.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.485.0.tgz", - "integrity": "sha512-O8IgJ0LHi5wTs5GlpI7nqmmSSagkVdd1shpGgQWY2h0kMSCII8CJZHBG97dlFFpGTvx5EDlhPNek7rl/6F4dRw==", + "version": "3.609.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.609.0.tgz", + "integrity": "sha512-S62U2dy4jMDhDFDK5gZ4VxFdWzCtLzwbYyFZx2uvPYTECkepLUfzLic2BHg2Qvtu4QjX+oGE3P/7fwaGIsGNuQ==", "dependencies": { - "@aws-sdk/types": "3.485.0", - "@smithy/types": "^2.8.0", - "tslib": "^2.5.0" + "@aws-sdk/types": "3.609.0", + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" }, "engines": { - "node": ">=14.0.0" + "node": ">=16.0.0" } }, "node_modules/@aws-sdk/middleware-recursion-detection": { - "version": "3.485.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.485.0.tgz", - "integrity": "sha512-ZeVNATGNFcqkWDut3luVszROTUzkU5u+rJpB/xmeMoenlDAjPRiHt/ca3WkI5wAnIJ1VSNGpD2sOFLMCH+EWag==", + "version": "3.620.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.620.0.tgz", + "integrity": "sha512-nh91S7aGK3e/o1ck64sA/CyoFw+gAYj2BDOnoNa6ouyCrVJED96ZXWbhye/fz9SgmNUZR2g7GdVpiLpMKZoI5w==", "dependencies": { - "@aws-sdk/types": "3.485.0", - "@smithy/protocol-http": "^3.0.12", - "@smithy/types": "^2.8.0", - "tslib": "^2.5.0" + "@aws-sdk/types": "3.609.0", + "@smithy/protocol-http": "^4.1.0", + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" }, "engines": { - "node": ">=14.0.0" + "node": ">=16.0.0" } }, "node_modules/@aws-sdk/middleware-sdk-s3": { - "version": "3.485.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-sdk-s3/-/middleware-sdk-s3-3.485.0.tgz", - "integrity": "sha512-3769c4e3UtvaNU5T6dHxhjGI1kEXymldqiP1PMZMX2jVffwSGhbvyLq0Kl6+9Jr51fj2oXN6Tex+8J9+5dzTgQ==", + "version": "3.622.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-sdk-s3/-/middleware-sdk-s3-3.622.0.tgz", + "integrity": "sha512-tX9wZ2ALx5Ez4bkY+SvSj6DpNZ6TmY4zlsVsdgV95LZFLjNwqnZkKkS+uKnsIyLBiBp6g92JVQwnUEIp7ov2Zw==", "dependencies": { - "@aws-sdk/types": "3.485.0", - "@aws-sdk/util-arn-parser": "3.465.0", - "@smithy/node-config-provider": "^2.1.9", - "@smithy/protocol-http": "^3.0.12", - "@smithy/signature-v4": "^2.0.0", - "@smithy/smithy-client": "^2.2.1", - "@smithy/types": "^2.8.0", - "@smithy/util-config-provider": "^2.1.0", - "tslib": "^2.5.0" + "@aws-sdk/types": "3.609.0", + "@aws-sdk/util-arn-parser": "3.568.0", + "@smithy/node-config-provider": "^3.1.4", + "@smithy/protocol-http": "^4.1.0", + "@smithy/signature-v4": "^4.1.0", + "@smithy/smithy-client": "^3.1.12", + "@smithy/types": "^3.3.0", + "@smithy/util-config-provider": "^3.0.0", + "@smithy/util-stream": "^3.1.3", + "@smithy/util-utf8": "^3.0.0", + "tslib": "^2.6.2" }, "engines": { - "node": ">=14.0.0" + "node": ">=16.0.0" } }, "node_modules/@aws-sdk/middleware-signing": { - "version": "3.485.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-signing/-/middleware-signing-3.485.0.tgz", - "integrity": "sha512-41xzT2p1sOibhsLkdE5rwPJkNbBtKD8Gp36/ySfu0KE415wfXKacElSVxAaBw39/j7iSWDYqqybeEYbAzk+3GQ==", + "version": "3.620.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-signing/-/middleware-signing-3.620.0.tgz", + "integrity": "sha512-gxI7rubiaanUXaLfJ4NybERa9MGPNg2Ycl/OqANsozrBnR3Pw8vqy3EuVImQOyn2pJ2IFvl8ZPoSMHf4pX56FQ==", "dependencies": { - "@aws-sdk/types": "3.485.0", - "@smithy/property-provider": "^2.0.0", - "@smithy/protocol-http": "^3.0.12", - "@smithy/signature-v4": "^2.0.0", - "@smithy/types": "^2.8.0", - "@smithy/util-middleware": "^2.0.9", - "tslib": "^2.5.0" + "@aws-sdk/types": "3.609.0", + "@smithy/property-provider": "^3.1.3", + "@smithy/protocol-http": "^4.1.0", + "@smithy/signature-v4": "^4.1.0", + "@smithy/types": "^3.3.0", + "@smithy/util-middleware": "^3.0.3", + "tslib": "^2.6.2" }, "engines": { - "node": ">=14.0.0" + "node": ">=16.0.0" } }, "node_modules/@aws-sdk/middleware-ssec": { - "version": "3.485.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-ssec/-/middleware-ssec-3.485.0.tgz", - "integrity": "sha512-A59WTC0egT8zLnRzB+yWKq2AonugD1DgN4710RG70JY5XUmx5TYdECbUrVeG/zhNIKbBLLFjRcVk2uo4OZcgIA==", + "version": "3.609.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-ssec/-/middleware-ssec-3.609.0.tgz", + "integrity": "sha512-GZSD1s7+JswWOTamVap79QiDaIV7byJFssBW68GYjyRS5EBjNfwA/8s+6uE6g39R3ojyTbYOmvcANoZEhSULXg==", "dependencies": { - "@aws-sdk/types": "3.485.0", - "@smithy/types": "^2.8.0", - "tslib": "^2.5.0" + "@aws-sdk/types": "3.609.0", + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" }, "engines": { - "node": ">=14.0.0" + "node": ">=16.0.0" } }, "node_modules/@aws-sdk/middleware-user-agent": { - "version": "3.485.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.485.0.tgz", - "integrity": "sha512-CddCVOn+OPQ0CcchketIg+WF6v+MDLAf3GOYTR2htUxxIm7HABuRd6R3kvQ5Jny9CV8gMt22G1UZITsFexSJlQ==", + "version": "3.620.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.620.0.tgz", + "integrity": "sha512-bvS6etn+KsuL32ubY5D3xNof1qkenpbJXf/ugGXbg0n98DvDFQ/F+SMLxHgbnER5dsKYchNnhmtI6/FC3HFu/A==", "dependencies": { - "@aws-sdk/types": "3.485.0", - "@aws-sdk/util-endpoints": "3.485.0", - "@smithy/protocol-http": "^3.0.12", - "@smithy/types": "^2.8.0", - "tslib": "^2.5.0" + "@aws-sdk/types": "3.609.0", + "@aws-sdk/util-endpoints": "3.614.0", + "@smithy/protocol-http": "^4.1.0", + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" }, "engines": { - "node": ">=14.0.0" + "node": ">=16.0.0" } }, "node_modules/@aws-sdk/region-config-resolver": { - "version": "3.485.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/region-config-resolver/-/region-config-resolver-3.485.0.tgz", - "integrity": "sha512-2FB2EQ0sIE+YgFqGtkE1lDIMIL6nYe6MkOHBwBM7bommadKIrbbr2L22bPZGs3ReTsxiJabjzxbuCAVhrpHmhg==", + "version": "3.614.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/region-config-resolver/-/region-config-resolver-3.614.0.tgz", + "integrity": "sha512-vDCeMXvic/LU0KFIUjpC3RiSTIkkvESsEfbVHiHH0YINfl8HnEqR5rj+L8+phsCeVg2+LmYwYxd5NRz4PHxt5g==", "dependencies": { - "@smithy/node-config-provider": "^2.1.9", - "@smithy/types": "^2.8.0", - "@smithy/util-config-provider": "^2.1.0", - "@smithy/util-middleware": "^2.0.9", - "tslib": "^2.5.0" + "@aws-sdk/types": "3.609.0", + "@smithy/node-config-provider": "^3.1.4", + "@smithy/types": "^3.3.0", + "@smithy/util-config-provider": "^3.0.0", + "@smithy/util-middleware": "^3.0.3", + "tslib": "^2.6.2" }, "engines": { - "node": ">=14.0.0" + "node": ">=16.0.0" } }, "node_modules/@aws-sdk/signature-v4-multi-region": { - "version": "3.485.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/signature-v4-multi-region/-/signature-v4-multi-region-3.485.0.tgz", - "integrity": "sha512-168ipXkbG75l9cKQmsBtx/4+AYjGsBoy724bXosW13t2/l/E3IzJAYUjDROiK0JXVMG85xAnGWbFwZkjxVXzrQ==", + "version": "3.622.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/signature-v4-multi-region/-/signature-v4-multi-region-3.622.0.tgz", + "integrity": "sha512-K7ddofVNzwTFRjmLZLfs/v+hiE9m5LguajHk8WULxXQgkcDI3nPgOfmMMGuslYohaQhRwW+ic+dzYlateLUudQ==", "dependencies": { - "@aws-sdk/middleware-sdk-s3": "3.485.0", - "@aws-sdk/types": "3.485.0", - "@smithy/protocol-http": "^3.0.12", - "@smithy/signature-v4": "^2.0.0", - "@smithy/types": "^2.8.0", - "tslib": "^2.5.0" + "@aws-sdk/middleware-sdk-s3": "3.622.0", + "@aws-sdk/types": "3.609.0", + "@smithy/protocol-http": "^4.1.0", + "@smithy/signature-v4": "^4.1.0", + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" }, "engines": { - "node": ">=14.0.0" + "node": ">=16.0.0" } }, "node_modules/@aws-sdk/token-providers": { - "version": "3.485.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.485.0.tgz", - "integrity": "sha512-kOXA1WKIVIFNRqHL8ynVZ3hCKLsgnEmGr2iDR6agDNw5fYIlCO/6N2xR6QdGcLTvUUbwOlz4OvKLUQnWMKAnnA==", - "dependencies": { - "@aws-crypto/sha256-browser": "3.0.0", - "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/middleware-host-header": "3.485.0", - "@aws-sdk/middleware-logger": "3.485.0", - "@aws-sdk/middleware-recursion-detection": "3.485.0", - "@aws-sdk/middleware-user-agent": "3.485.0", - "@aws-sdk/region-config-resolver": "3.485.0", - "@aws-sdk/types": "3.485.0", - "@aws-sdk/util-endpoints": "3.485.0", - "@aws-sdk/util-user-agent-browser": "3.485.0", - "@aws-sdk/util-user-agent-node": "3.485.0", - "@smithy/config-resolver": "^2.0.23", - "@smithy/fetch-http-handler": "^2.3.2", - "@smithy/hash-node": "^2.0.18", - "@smithy/invalid-dependency": "^2.0.16", - "@smithy/middleware-content-length": "^2.0.18", - "@smithy/middleware-endpoint": "^2.3.0", - "@smithy/middleware-retry": "^2.0.26", - "@smithy/middleware-serde": "^2.0.16", - "@smithy/middleware-stack": "^2.0.10", - "@smithy/node-config-provider": "^2.1.9", - "@smithy/node-http-handler": "^2.2.2", - "@smithy/property-provider": "^2.0.0", - "@smithy/protocol-http": "^3.0.12", - "@smithy/shared-ini-file-loader": "^2.0.6", - "@smithy/smithy-client": "^2.2.1", - "@smithy/types": "^2.8.0", - "@smithy/url-parser": "^2.0.16", - "@smithy/util-base64": "^2.0.1", - "@smithy/util-body-length-browser": "^2.0.1", - "@smithy/util-body-length-node": "^2.1.0", - "@smithy/util-defaults-mode-browser": "^2.0.24", - "@smithy/util-defaults-mode-node": "^2.0.32", - "@smithy/util-endpoints": "^1.0.8", - "@smithy/util-retry": "^2.0.9", - "@smithy/util-utf8": "^2.0.2", - "tslib": "^2.5.0" + "version": "3.614.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.614.0.tgz", + "integrity": "sha512-okItqyY6L9IHdxqs+Z116y5/nda7rHxLvROxtAJdLavWTYDydxrZstImNgGWTeVdmc0xX2gJCI77UYUTQWnhRw==", + "dependencies": { + "@aws-sdk/types": "3.609.0", + "@smithy/property-provider": "^3.1.3", + "@smithy/shared-ini-file-loader": "^3.1.4", + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" }, "engines": { - "node": ">=14.0.0" + "node": ">=16.0.0" + }, + "peerDependencies": { + "@aws-sdk/client-sso-oidc": "^3.614.0" } }, "node_modules/@aws-sdk/types": { - "version": "3.485.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.485.0.tgz", - "integrity": "sha512-+QW32YQdvZRDOwrAQPo/qCyXoSjgXB6RwJwCwkd8ebJXRXw6tmGKIHaZqYHt/LtBymvnaBgBBADNa4+qFvlOFw==", + "version": "3.609.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.609.0.tgz", + "integrity": "sha512-+Tqnh9w0h2LcrUsdXyT1F8mNhXz+tVYBtP19LpeEGntmvHwa2XzvLUCWpoIAIVsHp5+HdB2X9Sn0KAtmbFXc2Q==", "dependencies": { - "@smithy/types": "^2.8.0", - "tslib": "^2.5.0" + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" }, "engines": { - "node": ">=14.0.0" + "node": ">=16.0.0" } }, "node_modules/@aws-sdk/util-arn-parser": { - "version": "3.465.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-arn-parser/-/util-arn-parser-3.465.0.tgz", - "integrity": "sha512-zOJ82vzDJFqBX9yZBlNeHHrul/kpx/DCoxzW5UBbZeb26kfV53QhMSoEmY8/lEbBqlqargJ/sgRC845GFhHNQw==", + "version": "3.568.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-arn-parser/-/util-arn-parser-3.568.0.tgz", + "integrity": "sha512-XUKJWWo+KOB7fbnPP0+g/o5Ulku/X53t7i/h+sPHr5xxYTJJ9CYnbToo95mzxe7xWvkLrsNtJ8L+MnNn9INs2w==", "dependencies": { - "tslib": "^2.5.0" + "tslib": "^2.6.2" }, "engines": { - "node": ">=14.0.0" + "node": ">=16.0.0" } }, "node_modules/@aws-sdk/util-endpoints": { - "version": "3.485.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.485.0.tgz", - "integrity": "sha512-dTd642F7nJisApF8YjniqQ6U59CP/DCtar11fXf1nG9YNBCBsNNVw5ZfZb5nSNzaIdy27mQioWTCV18JEj1mxg==", + "version": "3.614.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.614.0.tgz", + "integrity": "sha512-wK2cdrXHH4oz4IomV/yrGkftU9A+ITB6nFL+rxxyO78is2ifHJpFdV4aqk4LSkXYPi6CXWNru/Dqc7yiKXgJPw==", "dependencies": { - "@aws-sdk/types": "3.485.0", - "@smithy/util-endpoints": "^1.0.8", - "tslib": "^2.5.0" + "@aws-sdk/types": "3.609.0", + "@smithy/types": "^3.3.0", + "@smithy/util-endpoints": "^2.0.5", + "tslib": "^2.6.2" }, "engines": { - "node": ">=14.0.0" + "node": ">=16.0.0" } }, "node_modules/@aws-sdk/util-locate-window": { - "version": "3.465.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-locate-window/-/util-locate-window-3.465.0.tgz", - "integrity": "sha512-f+QNcWGswredzC1ExNAB/QzODlxwaTdXkNT5cvke2RLX8SFU5pYk6h4uCtWC0vWPELzOfMfloBrJefBzlarhsw==", + "version": "3.568.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-locate-window/-/util-locate-window-3.568.0.tgz", + "integrity": "sha512-3nh4TINkXYr+H41QaPelCceEB2FXP3fxp93YZXB/kqJvX0U9j0N0Uk45gvsjmEPzG8XxkPEeLIfT2I1M7A6Lig==", "dependencies": { - "tslib": "^2.5.0" + "tslib": "^2.6.2" }, "engines": { - "node": ">=14.0.0" + "node": ">=16.0.0" } }, "node_modules/@aws-sdk/util-user-agent-browser": { - "version": "3.485.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.485.0.tgz", - "integrity": "sha512-QliWbjg0uOhGTcWgWTKPMY0SBi07g253DjwrCINT1auqDrdQPxa10xozpZExBYjAK2KuhYDNUzni127ae6MHOw==", + "version": "3.609.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.609.0.tgz", + "integrity": "sha512-fojPU+mNahzQ0YHYBsx0ZIhmMA96H+ZIZ665ObU9tl+SGdbLneVZVikGve+NmHTQwHzwkFsZYYnVKAkreJLAtA==", "dependencies": { - "@aws-sdk/types": "3.485.0", - "@smithy/types": "^2.8.0", + "@aws-sdk/types": "3.609.0", + "@smithy/types": "^3.3.0", "bowser": "^2.11.0", - "tslib": "^2.5.0" + "tslib": "^2.6.2" } }, "node_modules/@aws-sdk/util-user-agent-node": { - "version": "3.485.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.485.0.tgz", - "integrity": "sha512-QF+aQ9jnDlPUlFBxBRqOylPf86xQuD3aEPpOErR+50qJawVvKa94uiAFdvtI9jv6hnRZmuFsTj2rsyytnbAYBA==", + "version": "3.614.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.614.0.tgz", + "integrity": "sha512-15ElZT88peoHnq5TEoEtZwoXTXRxNrk60TZNdpl/TUBJ5oNJ9Dqb5Z4ryb8ofN6nm9aFf59GVAerFDz8iUoHBA==", "dependencies": { - "@aws-sdk/types": "3.485.0", - "@smithy/node-config-provider": "^2.1.9", - "@smithy/types": "^2.8.0", - "tslib": "^2.5.0" + "@aws-sdk/types": "3.609.0", + "@smithy/node-config-provider": "^3.1.4", + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" }, "engines": { - "node": ">=14.0.0" + "node": ">=16.0.0" }, "peerDependencies": { "aws-crt": ">=1.0.0" @@ -787,24 +906,16 @@ } } }, - "node_modules/@aws-sdk/util-utf8-browser": { - "version": "3.259.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-utf8-browser/-/util-utf8-browser-3.259.0.tgz", - "integrity": "sha512-UvFa/vR+e19XookZF8RzFZBrw2EUkQWxiBW0yYQAhvk3C+QVGl0H3ouca8LDBlBfQKXwmW3huo/59H8rwb1wJw==", - "dependencies": { - "tslib": "^2.3.1" - } - }, "node_modules/@aws-sdk/xml-builder": { - "version": "3.485.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/xml-builder/-/xml-builder-3.485.0.tgz", - "integrity": "sha512-xQexPM6LINOIkf3NLFywplcbApifZRMWFN41TDWYSNgCUa5uC9fntfenw8N/HTx1n+McRCWSAFBTjDqY/2OLCQ==", + "version": "3.609.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/xml-builder/-/xml-builder-3.609.0.tgz", + "integrity": "sha512-l9XxNcA4HX98rwCC2/KoiWcmEiRfZe4G+mYwDbCFT87JIMj6GBhLDkAzr/W8KAaA2IDr8Vc6J8fZPgVulxxfMA==", "dependencies": { - "@smithy/types": "^2.8.0", - "tslib": "^2.5.0" + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" }, "engines": { - "node": ">=14.0.0" + "node": ">=16.0.0" } }, "node_modules/@babel/runtime": { @@ -1210,640 +1321,653 @@ } }, "node_modules/@smithy/abort-controller": { - "version": "2.0.16", - "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-2.0.16.tgz", - "integrity": "sha512-4foO7738k8kM9flMHu3VLabqu7nPgvIj8TB909S0CnKx0YZz/dcDH3pZ/4JHdatfxlZdKF1JWOYCw9+v3HVVsw==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-3.1.1.tgz", + "integrity": "sha512-MBJBiidoe+0cTFhyxT8g+9g7CeVccLM0IOKKUMCNQ1CNMJ/eIfoo0RTfVrXOONEI1UCN1W+zkiHSbzUNE9dZtQ==", "dependencies": { - "@smithy/types": "^2.8.0", - "tslib": "^2.5.0" + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" }, "engines": { - "node": ">=14.0.0" + "node": ">=16.0.0" } }, "node_modules/@smithy/chunked-blob-reader": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@smithy/chunked-blob-reader/-/chunked-blob-reader-2.0.0.tgz", - "integrity": "sha512-k+J4GHJsMSAIQPChGBrjEmGS+WbPonCXesoqP9fynIqjn7rdOThdH8FAeCmokP9mxTYKQAKoHCLPzNlm6gh7Wg==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@smithy/chunked-blob-reader/-/chunked-blob-reader-3.0.0.tgz", + "integrity": "sha512-sbnURCwjF0gSToGlsBiAmd1lRCmSn72nu9axfJu5lIx6RUEgHu6GwTMbqCdhQSi0Pumcm5vFxsi9XWXb2mTaoA==", "dependencies": { - "tslib": "^2.5.0" + "tslib": "^2.6.2" } }, "node_modules/@smithy/chunked-blob-reader-native": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@smithy/chunked-blob-reader-native/-/chunked-blob-reader-native-2.0.1.tgz", - "integrity": "sha512-N2oCZRglhWKm7iMBu7S6wDzXirjAofi7tAd26cxmgibRYOBS4D3hGfmkwCpHdASZzwZDD8rluh0Rcqw1JeZDRw==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@smithy/chunked-blob-reader-native/-/chunked-blob-reader-native-3.0.0.tgz", + "integrity": "sha512-VDkpCYW+peSuM4zJip5WDfqvg2Mo/e8yxOv3VF1m11y7B8KKMKVFtmZWDe36Fvk8rGuWrPZHHXZ7rR7uM5yWyg==", "dependencies": { - "@smithy/util-base64": "^2.0.1", - "tslib": "^2.5.0" + "@smithy/util-base64": "^3.0.0", + "tslib": "^2.6.2" } }, "node_modules/@smithy/config-resolver": { - "version": "2.0.23", - "resolved": "https://registry.npmjs.org/@smithy/config-resolver/-/config-resolver-2.0.23.tgz", - "integrity": "sha512-XakUqgtP2YY8Mi+Nlif5BiqJgWdvfxJafSpOSQeCOMizu+PUhE4fBQSy6xFcR+eInrwVadaABNxoJyGUMn15ew==", + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@smithy/config-resolver/-/config-resolver-3.0.5.tgz", + "integrity": "sha512-SkW5LxfkSI1bUC74OtfBbdz+grQXYiPYolyu8VfpLIjEoN/sHVBlLeGXMQ1vX4ejkgfv6sxVbQJ32yF2cl1veA==", "dependencies": { - "@smithy/node-config-provider": "^2.1.9", - "@smithy/types": "^2.8.0", - "@smithy/util-config-provider": "^2.1.0", - "@smithy/util-middleware": "^2.0.9", - "tslib": "^2.5.0" + "@smithy/node-config-provider": "^3.1.4", + "@smithy/types": "^3.3.0", + "@smithy/util-config-provider": "^3.0.0", + "@smithy/util-middleware": "^3.0.3", + "tslib": "^2.6.2" }, "engines": { - "node": ">=14.0.0" + "node": ">=16.0.0" } }, "node_modules/@smithy/core": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@smithy/core/-/core-1.2.2.tgz", - "integrity": "sha512-uLjrskLT+mWb0emTR5QaiAIxVEU7ndpptDaVDrTwwhD+RjvHhjIiGQ3YL5jKk1a5VSDQUA2RGkXvJ6XKRcz6Dg==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/@smithy/core/-/core-2.3.2.tgz", + "integrity": "sha512-in5wwt6chDBcUv1Lw1+QzZxN9fBffi+qOixfb65yK4sDuKG7zAUO9HAFqmVzsZM3N+3tTyvZjtnDXePpvp007Q==", "dependencies": { - "@smithy/middleware-endpoint": "^2.3.0", - "@smithy/middleware-retry": "^2.0.26", - "@smithy/middleware-serde": "^2.0.16", - "@smithy/protocol-http": "^3.0.12", - "@smithy/smithy-client": "^2.2.1", - "@smithy/types": "^2.8.0", - "@smithy/util-middleware": "^2.0.9", - "tslib": "^2.5.0" + "@smithy/middleware-endpoint": "^3.1.0", + "@smithy/middleware-retry": "^3.0.14", + "@smithy/middleware-serde": "^3.0.3", + "@smithy/protocol-http": "^4.1.0", + "@smithy/smithy-client": "^3.1.12", + "@smithy/types": "^3.3.0", + "@smithy/util-middleware": "^3.0.3", + "tslib": "^2.6.2" }, "engines": { - "node": ">=14.0.0" + "node": ">=16.0.0" } }, "node_modules/@smithy/credential-provider-imds": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-2.1.5.tgz", - "integrity": "sha512-VfvE6Wg1MUWwpTZFBnUD7zxvPhLY8jlHCzu6bCjlIYoWgXCDzZAML76IlZUEf45nib3rjehnFgg0s1rgsuN/bg==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-3.2.0.tgz", + "integrity": "sha512-0SCIzgd8LYZ9EJxUjLXBmEKSZR/P/w6l7Rz/pab9culE/RWuqelAKGJvn5qUOl8BgX8Yj5HWM50A5hiB/RzsgA==", "dependencies": { - "@smithy/node-config-provider": "^2.1.9", - "@smithy/property-provider": "^2.0.17", - "@smithy/types": "^2.8.0", - "@smithy/url-parser": "^2.0.16", - "tslib": "^2.5.0" + "@smithy/node-config-provider": "^3.1.4", + "@smithy/property-provider": "^3.1.3", + "@smithy/types": "^3.3.0", + "@smithy/url-parser": "^3.0.3", + "tslib": "^2.6.2" }, "engines": { - "node": ">=14.0.0" + "node": ">=16.0.0" } }, "node_modules/@smithy/eventstream-codec": { - "version": "2.0.16", - "resolved": "https://registry.npmjs.org/@smithy/eventstream-codec/-/eventstream-codec-2.0.16.tgz", - "integrity": "sha512-umYh5pdCE9GHgiMAH49zu9wXWZKNHHdKPm/lK22WYISTjqu29SepmpWNmPiBLy/yUu4HFEGJHIFrDWhbDlApaw==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-codec/-/eventstream-codec-3.1.2.tgz", + "integrity": "sha512-0mBcu49JWt4MXhrhRAlxASNy0IjDRFU+aWNDRal9OtUJvJNiwDuyKMUONSOjLjSCeGwZaE0wOErdqULer8r7yw==", "dependencies": { - "@aws-crypto/crc32": "3.0.0", - "@smithy/types": "^2.8.0", - "@smithy/util-hex-encoding": "^2.0.0", - "tslib": "^2.5.0" + "@aws-crypto/crc32": "5.2.0", + "@smithy/types": "^3.3.0", + "@smithy/util-hex-encoding": "^3.0.0", + "tslib": "^2.6.2" } }, "node_modules/@smithy/eventstream-serde-browser": { - "version": "2.0.16", - "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-browser/-/eventstream-serde-browser-2.0.16.tgz", - "integrity": "sha512-W+BdiN728R57KuZOcG0GczpIOEFf8S5RP/OdVH7T3FMCy8HU2bBU0vB5xZZR5c00VRdoeWrohNv3XlHoZuGRoA==", + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-browser/-/eventstream-serde-browser-3.0.5.tgz", + "integrity": "sha512-dEyiUYL/ekDfk+2Ra4GxV+xNnFoCmk1nuIXg+fMChFTrM2uI/1r9AdiTYzPqgb72yIv/NtAj6C3dG//1wwgakQ==", "dependencies": { - "@smithy/eventstream-serde-universal": "^2.0.16", - "@smithy/types": "^2.8.0", - "tslib": "^2.5.0" + "@smithy/eventstream-serde-universal": "^3.0.4", + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" }, "engines": { - "node": ">=14.0.0" + "node": ">=16.0.0" } }, "node_modules/@smithy/eventstream-serde-config-resolver": { - "version": "2.0.16", - "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-config-resolver/-/eventstream-serde-config-resolver-2.0.16.tgz", - "integrity": "sha512-8qrE4nh+Tg6m1SMFK8vlzoK+8bUFTlIhXidmmQfASMninXW3Iu0T0bI4YcIk4nLznHZdybQ0qGydIanvVZxzVg==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-config-resolver/-/eventstream-serde-config-resolver-3.0.3.tgz", + "integrity": "sha512-NVTYjOuYpGfrN/VbRQgn31x73KDLfCXCsFdad8DiIc3IcdxL+dYA9zEQPyOP7Fy2QL8CPy2WE4WCUD+ZsLNfaQ==", "dependencies": { - "@smithy/types": "^2.8.0", - "tslib": "^2.5.0" + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" }, "engines": { - "node": ">=14.0.0" + "node": ">=16.0.0" } }, "node_modules/@smithy/eventstream-serde-node": { - "version": "2.0.16", - "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-node/-/eventstream-serde-node-2.0.16.tgz", - "integrity": "sha512-NRNQuOa6mQdFSkqzY0IV37swHWx0SEoKxFtUfdZvfv0AVQPlSw4N7E3kcRSCpnHBr1kCuWWirdDlWcjWuD81MA==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-node/-/eventstream-serde-node-3.0.4.tgz", + "integrity": "sha512-mjlG0OzGAYuUpdUpflfb9zyLrBGgmQmrobNT8b42ZTsGv/J03+t24uhhtVEKG/b2jFtPIHF74Bq+VUtbzEKOKg==", "dependencies": { - "@smithy/eventstream-serde-universal": "^2.0.16", - "@smithy/types": "^2.8.0", - "tslib": "^2.5.0" + "@smithy/eventstream-serde-universal": "^3.0.4", + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" }, "engines": { - "node": ">=14.0.0" + "node": ">=16.0.0" } }, "node_modules/@smithy/eventstream-serde-universal": { - "version": "2.0.16", - "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-universal/-/eventstream-serde-universal-2.0.16.tgz", - "integrity": "sha512-ZyLnGaYQMLc75j9kKEVMJ3X6bdBE9qWxhZdTXM5RIltuytxJC3FaOhawBxjE+IL1enmWSIohHGZCm/pLwEliQA==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-universal/-/eventstream-serde-universal-3.0.4.tgz", + "integrity": "sha512-Od9dv8zh3PgOD7Vj4T3HSuox16n0VG8jJIM2gvKASL6aCtcS8CfHZDWe1Ik3ZXW6xBouU+45Q5wgoliWDZiJ0A==", "dependencies": { - "@smithy/eventstream-codec": "^2.0.16", - "@smithy/types": "^2.8.0", - "tslib": "^2.5.0" + "@smithy/eventstream-codec": "^3.1.2", + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" }, "engines": { - "node": ">=14.0.0" + "node": ">=16.0.0" } }, "node_modules/@smithy/fetch-http-handler": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-2.3.2.tgz", - "integrity": "sha512-O9R/OlnAOTsnysuSDjt0v2q6DcSvCz5cCFC/CFAWWcLyBwJDeFyGTCTszgpQTb19+Fi8uRwZE5/3ziAQBFeDMQ==", + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-3.2.4.tgz", + "integrity": "sha512-kBprh5Gs5h7ug4nBWZi1FZthdqSM+T7zMmsZxx0IBvWUn7dK3diz2SHn7Bs4dQGFDk8plDv375gzenDoNwrXjg==", "dependencies": { - "@smithy/protocol-http": "^3.0.12", - "@smithy/querystring-builder": "^2.0.16", - "@smithy/types": "^2.8.0", - "@smithy/util-base64": "^2.0.1", - "tslib": "^2.5.0" + "@smithy/protocol-http": "^4.1.0", + "@smithy/querystring-builder": "^3.0.3", + "@smithy/types": "^3.3.0", + "@smithy/util-base64": "^3.0.0", + "tslib": "^2.6.2" } }, "node_modules/@smithy/hash-blob-browser": { - "version": "2.0.17", - "resolved": "https://registry.npmjs.org/@smithy/hash-blob-browser/-/hash-blob-browser-2.0.17.tgz", - "integrity": "sha512-/mPpv1sRiRDdjO4zZuO8be6eeabmg5AVgKDfnmmqkpBtRyMGSJb968fjRuHt+FRAsIGywgIKJFmUUAYjhsi1oQ==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@smithy/hash-blob-browser/-/hash-blob-browser-3.1.2.tgz", + "integrity": "sha512-hAbfqN2UbISltakCC2TP0kx4LqXBttEv2MqSPE98gVuDFMf05lU+TpC41QtqGP3Ff5A3GwZMPfKnEy0VmEUpmg==", "dependencies": { - "@smithy/chunked-blob-reader": "^2.0.0", - "@smithy/chunked-blob-reader-native": "^2.0.1", - "@smithy/types": "^2.8.0", - "tslib": "^2.5.0" + "@smithy/chunked-blob-reader": "^3.0.0", + "@smithy/chunked-blob-reader-native": "^3.0.0", + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" } }, "node_modules/@smithy/hash-node": { - "version": "2.0.18", - "resolved": "https://registry.npmjs.org/@smithy/hash-node/-/hash-node-2.0.18.tgz", - "integrity": "sha512-gN2JFvAgnZCyDN9rJgcejfpK0uPPJrSortVVVVWsru9whS7eQey6+gj2eM5ln2i6rHNntIXzal1Fm9XOPuoaKA==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@smithy/hash-node/-/hash-node-3.0.3.tgz", + "integrity": "sha512-2ctBXpPMG+B3BtWSGNnKELJ7SH9e4TNefJS0cd2eSkOOROeBnnVBnAy9LtJ8tY4vUEoe55N4CNPxzbWvR39iBw==", "dependencies": { - "@smithy/types": "^2.8.0", - "@smithy/util-buffer-from": "^2.0.0", - "@smithy/util-utf8": "^2.0.2", - "tslib": "^2.5.0" + "@smithy/types": "^3.3.0", + "@smithy/util-buffer-from": "^3.0.0", + "@smithy/util-utf8": "^3.0.0", + "tslib": "^2.6.2" }, "engines": { - "node": ">=14.0.0" + "node": ">=16.0.0" } }, "node_modules/@smithy/hash-stream-node": { - "version": "2.0.18", - "resolved": "https://registry.npmjs.org/@smithy/hash-stream-node/-/hash-stream-node-2.0.18.tgz", - "integrity": "sha512-OuFk+ITpv8CtxGjQcS8GA04faNycu9UMm6YobvQzjeEoXZ0dLF6sRfuzD+3S8RHPKpTyLuXtKG1+GiJycZ5TcA==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@smithy/hash-stream-node/-/hash-stream-node-3.1.2.tgz", + "integrity": "sha512-PBgDMeEdDzi6JxKwbfBtwQG9eT9cVwsf0dZzLXoJF4sHKHs5HEo/3lJWpn6jibfJwT34I1EBXpBnZE8AxAft6g==", "dependencies": { - "@smithy/types": "^2.8.0", - "@smithy/util-utf8": "^2.0.2", - "tslib": "^2.5.0" + "@smithy/types": "^3.3.0", + "@smithy/util-utf8": "^3.0.0", + "tslib": "^2.6.2" }, "engines": { - "node": ">=14.0.0" + "node": ">=16.0.0" } }, "node_modules/@smithy/invalid-dependency": { - "version": "2.0.16", - "resolved": "https://registry.npmjs.org/@smithy/invalid-dependency/-/invalid-dependency-2.0.16.tgz", - "integrity": "sha512-apEHakT/kmpNo1VFHP4W/cjfeP9U0x5qvfsLJubgp7UM/gq4qYp0GbqdE7QhsjUaYvEnrftRqs7+YrtWreV0wA==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@smithy/invalid-dependency/-/invalid-dependency-3.0.3.tgz", + "integrity": "sha512-ID1eL/zpDULmHJbflb864k72/SNOZCADRc9i7Exq3RUNJw6raWUSlFEQ+3PX3EYs++bTxZB2dE9mEHTQLv61tw==", "dependencies": { - "@smithy/types": "^2.8.0", - "tslib": "^2.5.0" + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" } }, "node_modules/@smithy/is-array-buffer": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.0.0.tgz", - "integrity": "sha512-z3PjFjMyZNI98JFRJi/U0nGoLWMSJlDjAW4QUX2WNZLas5C0CmVV6LJ01JI0k90l7FvpmixjWxPFmENSClQ7ug==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-3.0.0.tgz", + "integrity": "sha512-+Fsu6Q6C4RSJiy81Y8eApjEB5gVtM+oFKTffg+jSuwtvomJJrhUJBu2zS8wjXSgH/g1MKEWrzyChTBe6clb5FQ==", "dependencies": { - "tslib": "^2.5.0" + "tslib": "^2.6.2" }, "engines": { - "node": ">=14.0.0" + "node": ">=16.0.0" } }, "node_modules/@smithy/md5-js": { - "version": "2.0.18", - "resolved": "https://registry.npmjs.org/@smithy/md5-js/-/md5-js-2.0.18.tgz", - "integrity": "sha512-bHwZ8/m6RbERQdVW5rJ2LzeW8qxfXv6Q/S7Fiudhso4pWRrksqLx3nsGZw7bmqqfN4zLqkxydxSa9+4c7s5zxg==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@smithy/md5-js/-/md5-js-3.0.3.tgz", + "integrity": "sha512-O/SAkGVwpWmelpj/8yDtsaVe6sINHLB1q8YE/+ZQbDxIw3SRLbTZuRaI10K12sVoENdnHqzPp5i3/H+BcZ3m3Q==", "dependencies": { - "@smithy/types": "^2.8.0", - "@smithy/util-utf8": "^2.0.2", - "tslib": "^2.5.0" + "@smithy/types": "^3.3.0", + "@smithy/util-utf8": "^3.0.0", + "tslib": "^2.6.2" } }, "node_modules/@smithy/middleware-content-length": { - "version": "2.0.18", - "resolved": "https://registry.npmjs.org/@smithy/middleware-content-length/-/middleware-content-length-2.0.18.tgz", - "integrity": "sha512-ZJ9uKPTfxYheTKSKYB+GCvcj+izw9WGzRLhjn8n254q0jWLojUzn7Vw0l4R/Gq7Wdpf/qmk/ptD+6CCXHNVCaw==", + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@smithy/middleware-content-length/-/middleware-content-length-3.0.5.tgz", + "integrity": "sha512-ILEzC2eyxx6ncej3zZSwMpB5RJ0zuqH7eMptxC4KN3f+v9bqT8ohssKbhNR78k/2tWW+KS5Spw+tbPF4Ejyqvw==", "dependencies": { - "@smithy/protocol-http": "^3.0.12", - "@smithy/types": "^2.8.0", - "tslib": "^2.5.0" + "@smithy/protocol-http": "^4.1.0", + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" }, "engines": { - "node": ">=14.0.0" + "node": ">=16.0.0" } }, "node_modules/@smithy/middleware-endpoint": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-2.3.0.tgz", - "integrity": "sha512-VsOAG2YQ8ykjSmKO+CIXdJBIWFo6AAvG6Iw95BakBTqk66/4BI7XyqLevoNSq/lZ6NgZv24sLmrcIN+fLDWBCg==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-3.1.0.tgz", + "integrity": "sha512-5y5aiKCEwg9TDPB4yFE7H6tYvGFf1OJHNczeY10/EFF8Ir8jZbNntQJxMWNfeQjC1mxPsaQ6mR9cvQbf+0YeMw==", "dependencies": { - "@smithy/middleware-serde": "^2.0.16", - "@smithy/node-config-provider": "^2.1.9", - "@smithy/shared-ini-file-loader": "^2.2.8", - "@smithy/types": "^2.8.0", - "@smithy/url-parser": "^2.0.16", - "@smithy/util-middleware": "^2.0.9", - "tslib": "^2.5.0" + "@smithy/middleware-serde": "^3.0.3", + "@smithy/node-config-provider": "^3.1.4", + "@smithy/shared-ini-file-loader": "^3.1.4", + "@smithy/types": "^3.3.0", + "@smithy/url-parser": "^3.0.3", + "@smithy/util-middleware": "^3.0.3", + "tslib": "^2.6.2" }, "engines": { - "node": ">=14.0.0" + "node": ">=16.0.0" } }, "node_modules/@smithy/middleware-retry": { - "version": "2.0.26", - "resolved": "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-2.0.26.tgz", - "integrity": "sha512-Qzpxo0U5jfNiq9iD38U3e2bheXwvTEX4eue9xruIvEgh+UKq6dKuGqcB66oBDV7TD/mfoJi9Q/VmaiqwWbEp7A==", + "version": "3.0.14", + "resolved": "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-3.0.14.tgz", + "integrity": "sha512-7ZaWZJOjUxa5hgmuMspyt8v/zVsh0GXYuF7OvCmdcbVa/xbnKQoYC+uYKunAqRGTkxjOyuOCw9rmFUFOqqC0eQ==", "dependencies": { - "@smithy/node-config-provider": "^2.1.9", - "@smithy/protocol-http": "^3.0.12", - "@smithy/service-error-classification": "^2.0.9", - "@smithy/smithy-client": "^2.2.1", - "@smithy/types": "^2.8.0", - "@smithy/util-middleware": "^2.0.9", - "@smithy/util-retry": "^2.0.9", - "tslib": "^2.5.0", - "uuid": "^8.3.2" + "@smithy/node-config-provider": "^3.1.4", + "@smithy/protocol-http": "^4.1.0", + "@smithy/service-error-classification": "^3.0.3", + "@smithy/smithy-client": "^3.1.12", + "@smithy/types": "^3.3.0", + "@smithy/util-middleware": "^3.0.3", + "@smithy/util-retry": "^3.0.3", + "tslib": "^2.6.2", + "uuid": "^9.0.1" }, "engines": { - "node": ">=14.0.0" + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/middleware-retry/node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "bin": { + "uuid": "dist/bin/uuid" } }, "node_modules/@smithy/middleware-serde": { - "version": "2.0.16", - "resolved": "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-2.0.16.tgz", - "integrity": "sha512-5EAd4t30pcc4M8TSSGq7q/x5IKrxfXR5+SrU4bgxNy7RPHQo2PSWBUco9C+D9Tfqp/JZvprRpK42dnupZafk2g==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-3.0.3.tgz", + "integrity": "sha512-puUbyJQBcg9eSErFXjKNiGILJGtiqmuuNKEYNYfUD57fUl4i9+mfmThtQhvFXU0hCVG0iEJhvQUipUf+/SsFdA==", "dependencies": { - "@smithy/types": "^2.8.0", - "tslib": "^2.5.0" + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" }, "engines": { - "node": ">=14.0.0" + "node": ">=16.0.0" } }, "node_modules/@smithy/middleware-stack": { - "version": "2.0.10", - "resolved": "https://registry.npmjs.org/@smithy/middleware-stack/-/middleware-stack-2.0.10.tgz", - "integrity": "sha512-I2rbxctNq9FAPPEcuA1ntZxkTKOPQFy7YBPOaD/MLg1zCvzv21CoNxR0py6J8ZVC35l4qE4nhxB0f7TF5/+Ldw==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@smithy/middleware-stack/-/middleware-stack-3.0.3.tgz", + "integrity": "sha512-r4klY9nFudB0r9UdSMaGSyjyQK5adUyPnQN/ZM6M75phTxOdnc/AhpvGD1fQUvgmqjQEBGCwpnPbDm8pH5PapA==", "dependencies": { - "@smithy/types": "^2.8.0", - "tslib": "^2.5.0" + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" }, "engines": { - "node": ">=14.0.0" + "node": ">=16.0.0" } }, "node_modules/@smithy/node-config-provider": { - "version": "2.1.9", - "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-2.1.9.tgz", - "integrity": "sha512-tUyW/9xrRy+s7RXkmQhgYkAPMpTIF8izK4orhHjNFEKR3QZiOCbWB546Y8iB/Fpbm3O9+q0Af9rpywLKJOwtaQ==", + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-3.1.4.tgz", + "integrity": "sha512-YvnElQy8HR4vDcAjoy7Xkx9YT8xZP4cBXcbJSgm/kxmiQu08DwUwj8rkGnyoJTpfl/3xYHH+d8zE+eHqoDCSdQ==", "dependencies": { - "@smithy/property-provider": "^2.0.17", - "@smithy/shared-ini-file-loader": "^2.2.8", - "@smithy/types": "^2.8.0", - "tslib": "^2.5.0" + "@smithy/property-provider": "^3.1.3", + "@smithy/shared-ini-file-loader": "^3.1.4", + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" }, "engines": { - "node": ">=14.0.0" + "node": ">=16.0.0" } }, "node_modules/@smithy/node-http-handler": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-2.2.2.tgz", - "integrity": "sha512-XO58TO/Eul/IBQKFKaaBtXJi0ItEQQCT+NI4IiKHCY/4KtqaUT6y/wC1EvDqlA9cP7Dyjdj7FdPs4DyynH3u7g==", + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-3.1.4.tgz", + "integrity": "sha512-+UmxgixgOr/yLsUxcEKGH0fMNVteJFGkmRltYFHnBMlogyFdpzn2CwqWmxOrfJELhV34v0WSlaqG1UtE1uXlJg==", "dependencies": { - "@smithy/abort-controller": "^2.0.16", - "@smithy/protocol-http": "^3.0.12", - "@smithy/querystring-builder": "^2.0.16", - "@smithy/types": "^2.8.0", - "tslib": "^2.5.0" + "@smithy/abort-controller": "^3.1.1", + "@smithy/protocol-http": "^4.1.0", + "@smithy/querystring-builder": "^3.0.3", + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" }, "engines": { - "node": ">=14.0.0" + "node": ">=16.0.0" } }, "node_modules/@smithy/property-provider": { - "version": "2.0.17", - "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-2.0.17.tgz", - "integrity": "sha512-+VkeZbVu7qtQ2DjI48Qwaf9fPOr3gZIwxQpuLJgRRSkWsdSvmaTCxI3gzRFKePB63Ts9r4yjn4HkxSCSkdWmcQ==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-3.1.3.tgz", + "integrity": "sha512-zahyOVR9Q4PEoguJ/NrFP4O7SMAfYO1HLhB18M+q+Z4KFd4V2obiMnlVoUFzFLSPeVt1POyNWneHHrZaTMoc/g==", "dependencies": { - "@smithy/types": "^2.8.0", - "tslib": "^2.5.0" + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" }, "engines": { - "node": ">=14.0.0" + "node": ">=16.0.0" } }, "node_modules/@smithy/protocol-http": { - "version": "3.0.12", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-3.0.12.tgz", - "integrity": "sha512-Xz4iaqLiaBfbQpB9Hgi3VcZYbP7xRDXYhd8XWChh4v94uw7qwmvlxdU5yxzfm6ACJM66phHrTbS5TVvj5uQ72w==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-4.1.0.tgz", + "integrity": "sha512-dPVoHYQ2wcHooGXg3LQisa1hH0e4y0pAddPMeeUPipI1tEOqL6A4N0/G7abeq+K8wrwSgjk4C0wnD1XZpJm5aA==", "dependencies": { - "@smithy/types": "^2.8.0", - "tslib": "^2.5.0" + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" }, "engines": { - "node": ">=14.0.0" + "node": ">=16.0.0" } }, "node_modules/@smithy/querystring-builder": { - "version": "2.0.16", - "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-2.0.16.tgz", - "integrity": "sha512-Q/GsJT0C0mijXMRs7YhZLLCP5FcuC4797lYjKQkME5CZohnLC4bEhylAd2QcD3gbMKNjCw8+T2I27WKiV/wToA==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-3.0.3.tgz", + "integrity": "sha512-vyWckeUeesFKzCDaRwWLUA1Xym9McaA6XpFfAK5qI9DKJ4M33ooQGqvM4J+LalH4u/Dq9nFiC8U6Qn1qi0+9zw==", "dependencies": { - "@smithy/types": "^2.8.0", - "@smithy/util-uri-escape": "^2.0.0", - "tslib": "^2.5.0" + "@smithy/types": "^3.3.0", + "@smithy/util-uri-escape": "^3.0.0", + "tslib": "^2.6.2" }, "engines": { - "node": ">=14.0.0" + "node": ">=16.0.0" } }, "node_modules/@smithy/querystring-parser": { - "version": "2.0.16", - "resolved": "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-2.0.16.tgz", - "integrity": "sha512-c4ueAuL6BDYKWpkubjrQthZKoC3L5kql5O++ovekNxiexRXTlLIVlCR4q3KziOktLIw66EU9SQljPXd/oN6Okg==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-3.0.3.tgz", + "integrity": "sha512-zahM1lQv2YjmznnfQsWbYojFe55l0SLG/988brlLv1i8z3dubloLF+75ATRsqPBboUXsW6I9CPGE5rQgLfY0vQ==", "dependencies": { - "@smithy/types": "^2.8.0", - "tslib": "^2.5.0" + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" }, "engines": { - "node": ">=14.0.0" + "node": ">=16.0.0" } }, "node_modules/@smithy/service-error-classification": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@smithy/service-error-classification/-/service-error-classification-2.0.9.tgz", - "integrity": "sha512-0K+8GvtwI7VkGmmInPydM2XZyBfIqLIbfR7mDQ+oPiz8mIinuHbV6sxOLdvX1Jv/myk7XTK9orgt3tuEpBu/zg==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@smithy/service-error-classification/-/service-error-classification-3.0.3.tgz", + "integrity": "sha512-Jn39sSl8cim/VlkLsUhRFq/dKDnRUFlfRkvhOJaUbLBXUsLRLNf9WaxDv/z9BjuQ3A6k/qE8af1lsqcwm7+DaQ==", "dependencies": { - "@smithy/types": "^2.8.0" + "@smithy/types": "^3.3.0" }, "engines": { - "node": ">=14.0.0" + "node": ">=16.0.0" } }, "node_modules/@smithy/shared-ini-file-loader": { - "version": "2.2.8", - "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-2.2.8.tgz", - "integrity": "sha512-E62byatbwSWrtq9RJ7xN40tqrRKDGrEL4EluyNpaIDvfvet06a/QC58oHw2FgVaEgkj0tXZPjZaKrhPfpoU0qw==", + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-3.1.4.tgz", + "integrity": "sha512-qMxS4hBGB8FY2GQqshcRUy1K6k8aBWP5vwm8qKkCT3A9K2dawUwOIJfqh9Yste/Bl0J2lzosVyrXDj68kLcHXQ==", "dependencies": { - "@smithy/types": "^2.8.0", - "tslib": "^2.5.0" + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" }, "engines": { - "node": ">=14.0.0" + "node": ">=16.0.0" } }, "node_modules/@smithy/signature-v4": { - "version": "2.0.19", - "resolved": "https://registry.npmjs.org/@smithy/signature-v4/-/signature-v4-2.0.19.tgz", - "integrity": "sha512-nwc3JihdM+kcJjtORv/n7qRHN2Kfh7S2RJI2qr8pz9UcY5TD8rSCRGQ0g81HgyS3jZ5X9U/L4p014P3FonBPhg==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@smithy/signature-v4/-/signature-v4-4.1.0.tgz", + "integrity": "sha512-aRryp2XNZeRcOtuJoxjydO6QTaVhxx/vjaR+gx7ZjaFgrgPRyZ3HCTbfwqYj6ZWEBHkCSUfcaymKPURaByukag==", "dependencies": { - "@smithy/eventstream-codec": "^2.0.16", - "@smithy/is-array-buffer": "^2.0.0", - "@smithy/types": "^2.8.0", - "@smithy/util-hex-encoding": "^2.0.0", - "@smithy/util-middleware": "^2.0.9", - "@smithy/util-uri-escape": "^2.0.0", - "@smithy/util-utf8": "^2.0.2", - "tslib": "^2.5.0" + "@smithy/is-array-buffer": "^3.0.0", + "@smithy/protocol-http": "^4.1.0", + "@smithy/types": "^3.3.0", + "@smithy/util-hex-encoding": "^3.0.0", + "@smithy/util-middleware": "^3.0.3", + "@smithy/util-uri-escape": "^3.0.0", + "@smithy/util-utf8": "^3.0.0", + "tslib": "^2.6.2" }, "engines": { - "node": ">=14.0.0" + "node": ">=16.0.0" } }, "node_modules/@smithy/smithy-client": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-2.2.1.tgz", - "integrity": "sha512-SpD7FLK92XV2fon2hMotaNDa2w5VAy5/uVjP9WFmjGSgWM8pTPVkHcDl1yFs5Z8LYbij0FSz+DbCBK6i+uXXUA==", + "version": "3.1.12", + "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-3.1.12.tgz", + "integrity": "sha512-wtm8JtsycthkHy1YA4zjIh2thJgIQ9vGkoR639DBx5lLlLNU0v4GARpQZkr2WjXue74nZ7MiTSWfVrLkyD8RkA==", "dependencies": { - "@smithy/middleware-endpoint": "^2.3.0", - "@smithy/middleware-stack": "^2.0.10", - "@smithy/protocol-http": "^3.0.12", - "@smithy/types": "^2.8.0", - "@smithy/util-stream": "^2.0.24", - "tslib": "^2.5.0" + "@smithy/middleware-endpoint": "^3.1.0", + "@smithy/middleware-stack": "^3.0.3", + "@smithy/protocol-http": "^4.1.0", + "@smithy/types": "^3.3.0", + "@smithy/util-stream": "^3.1.3", + "tslib": "^2.6.2" }, "engines": { - "node": ">=14.0.0" + "node": ">=16.0.0" } }, "node_modules/@smithy/types": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.8.0.tgz", - "integrity": "sha512-h9sz24cFgt/W1Re22OlhQKmUZkNh244ApgRsUDYinqF8R+QgcsBIX344u2j61TPshsTz3CvL6HYU1DnQdsSrHA==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", + "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", "dependencies": { - "tslib": "^2.5.0" + "tslib": "^2.6.2" }, "engines": { - "node": ">=14.0.0" + "node": ">=16.0.0" } }, "node_modules/@smithy/url-parser": { - "version": "2.0.16", - "resolved": "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-2.0.16.tgz", - "integrity": "sha512-Wfz5WqAoRT91TjRy1JeLR0fXtkIXHGsMbgzKFTx7E68SrZ55TB8xoG+vm11Ru4gheFTMXjAjwAxv1jQdC+pAQA==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-3.0.3.tgz", + "integrity": "sha512-pw3VtZtX2rg+s6HMs6/+u9+hu6oY6U7IohGhVNnjbgKy86wcIsSZwgHrFR+t67Uyxvp4Xz3p3kGXXIpTNisq8A==", "dependencies": { - "@smithy/querystring-parser": "^2.0.16", - "@smithy/types": "^2.8.0", - "tslib": "^2.5.0" + "@smithy/querystring-parser": "^3.0.3", + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" } }, "node_modules/@smithy/util-base64": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@smithy/util-base64/-/util-base64-2.0.1.tgz", - "integrity": "sha512-DlI6XFYDMsIVN+GH9JtcRp3j02JEVuWIn/QOZisVzpIAprdsxGveFed0bjbMRCqmIFe8uetn5rxzNrBtIGrPIQ==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-base64/-/util-base64-3.0.0.tgz", + "integrity": "sha512-Kxvoh5Qtt0CDsfajiZOCpJxgtPHXOKwmM+Zy4waD43UoEMA+qPxxa98aE/7ZhdnBFZFXMOiBR5xbcaMhLtznQQ==", "dependencies": { - "@smithy/util-buffer-from": "^2.0.0", - "tslib": "^2.5.0" + "@smithy/util-buffer-from": "^3.0.0", + "@smithy/util-utf8": "^3.0.0", + "tslib": "^2.6.2" }, "engines": { - "node": ">=14.0.0" + "node": ">=16.0.0" } }, "node_modules/@smithy/util-body-length-browser": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@smithy/util-body-length-browser/-/util-body-length-browser-2.0.1.tgz", - "integrity": "sha512-NXYp3ttgUlwkaug4bjBzJ5+yIbUbUx8VsSLuHZROQpoik+gRkIBeEG9MPVYfvPNpuXb/puqodeeUXcKFe7BLOQ==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-body-length-browser/-/util-body-length-browser-3.0.0.tgz", + "integrity": "sha512-cbjJs2A1mLYmqmyVl80uoLTJhAcfzMOyPgjwAYusWKMdLeNtzmMz9YxNl3/jRLoxSS3wkqkf0jwNdtXWtyEBaQ==", "dependencies": { - "tslib": "^2.5.0" + "tslib": "^2.6.2" } }, "node_modules/@smithy/util-body-length-node": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@smithy/util-body-length-node/-/util-body-length-node-2.1.0.tgz", - "integrity": "sha512-/li0/kj/y3fQ3vyzn36NTLGmUwAICb7Jbe/CsWCktW363gh1MOcpEcSO3mJ344Gv2dqz8YJCLQpb6hju/0qOWw==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-body-length-node/-/util-body-length-node-3.0.0.tgz", + "integrity": "sha512-Tj7pZ4bUloNUP6PzwhN7K386tmSmEET9QtQg0TgdNOnxhZvCssHji+oZTUIuzxECRfG8rdm2PMw2WCFs6eIYkA==", "dependencies": { - "tslib": "^2.5.0" + "tslib": "^2.6.2" }, "engines": { - "node": ">=14.0.0" + "node": ">=16.0.0" } }, "node_modules/@smithy/util-buffer-from": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-2.0.0.tgz", - "integrity": "sha512-/YNnLoHsR+4W4Vf2wL5lGv0ksg8Bmk3GEGxn2vEQt52AQaPSCuaO5PM5VM7lP1K9qHRKHwrPGktqVoAHKWHxzw==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-3.0.0.tgz", + "integrity": "sha512-aEOHCgq5RWFbP+UDPvPot26EJHjOC+bRgse5A8V3FSShqd5E5UN4qc7zkwsvJPPAVsf73QwYcHN1/gt/rtLwQA==", "dependencies": { - "@smithy/is-array-buffer": "^2.0.0", - "tslib": "^2.5.0" + "@smithy/is-array-buffer": "^3.0.0", + "tslib": "^2.6.2" }, "engines": { - "node": ">=14.0.0" + "node": ">=16.0.0" } }, "node_modules/@smithy/util-config-provider": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@smithy/util-config-provider/-/util-config-provider-2.1.0.tgz", - "integrity": "sha512-S6V0JvvhQgFSGLcJeT1CBsaTR03MM8qTuxMH9WPCCddlSo2W0V5jIHimHtIQALMLEDPGQ0ROSRr/dU0O+mxiQg==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-config-provider/-/util-config-provider-3.0.0.tgz", + "integrity": "sha512-pbjk4s0fwq3Di/ANL+rCvJMKM5bzAQdE5S/6RL5NXgMExFAi6UgQMPOm5yPaIWPpr+EOXKXRonJ3FoxKf4mCJQ==", "dependencies": { - "tslib": "^2.5.0" + "tslib": "^2.6.2" }, "engines": { - "node": ">=14.0.0" + "node": ">=16.0.0" } }, "node_modules/@smithy/util-defaults-mode-browser": { - "version": "2.0.24", - "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-2.0.24.tgz", - "integrity": "sha512-TsP5mBuLgO2C21+laNG2nHYZEyUdkbGURv2tHvSuQQxLz952MegX95uwdxOY2jR2H4GoKuVRfdJq7w4eIjGYeg==", + "version": "3.0.14", + "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-3.0.14.tgz", + "integrity": "sha512-0iwTgKKmAIf+vFLV8fji21Jb2px11ktKVxbX6LIDPAUJyWQqGqBVfwba7xwa1f2FZUoolYQgLvxQEpJycXuQ5w==", "dependencies": { - "@smithy/property-provider": "^2.0.17", - "@smithy/smithy-client": "^2.2.1", - "@smithy/types": "^2.8.0", + "@smithy/property-provider": "^3.1.3", + "@smithy/smithy-client": "^3.1.12", + "@smithy/types": "^3.3.0", "bowser": "^2.11.0", - "tslib": "^2.5.0" + "tslib": "^2.6.2" }, "engines": { "node": ">= 10.0.0" } }, "node_modules/@smithy/util-defaults-mode-node": { - "version": "2.0.32", - "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-2.0.32.tgz", - "integrity": "sha512-d0S33dXA2cq1NyorVMroMrEtqKMr3MlyLITcfTBf9pXiigYiPMOtbSI7czHIfDbuVuM89Cg0urAgpt73QV9mPQ==", + "version": "3.0.14", + "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-3.0.14.tgz", + "integrity": "sha512-e9uQarJKfXApkTMMruIdxHprhcXivH1flYCe8JRDTzkkLx8dA3V5J8GZlST9yfDiRWkJpZJlUXGN9Rc9Ade3OQ==", "dependencies": { - "@smithy/config-resolver": "^2.0.23", - "@smithy/credential-provider-imds": "^2.1.5", - "@smithy/node-config-provider": "^2.1.9", - "@smithy/property-provider": "^2.0.17", - "@smithy/smithy-client": "^2.2.1", - "@smithy/types": "^2.8.0", - "tslib": "^2.5.0" + "@smithy/config-resolver": "^3.0.5", + "@smithy/credential-provider-imds": "^3.2.0", + "@smithy/node-config-provider": "^3.1.4", + "@smithy/property-provider": "^3.1.3", + "@smithy/smithy-client": "^3.1.12", + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" }, "engines": { "node": ">= 10.0.0" } }, "node_modules/@smithy/util-endpoints": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/@smithy/util-endpoints/-/util-endpoints-1.0.8.tgz", - "integrity": "sha512-l8zVuyZZ61IzZBYp5NWvsAhbaAjYkt0xg9R4xUASkg5SEeTT2meHOJwJHctKMFUXe4QZbn9fR2MaBYjP2119+w==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@smithy/util-endpoints/-/util-endpoints-2.0.5.tgz", + "integrity": "sha512-ReQP0BWihIE68OAblC/WQmDD40Gx+QY1Ez8mTdFMXpmjfxSyz2fVQu3A4zXRfQU9sZXtewk3GmhfOHswvX+eNg==", "dependencies": { - "@smithy/node-config-provider": "^2.1.9", - "@smithy/types": "^2.8.0", - "tslib": "^2.5.0" + "@smithy/node-config-provider": "^3.1.4", + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" }, "engines": { - "node": ">= 14.0.0" + "node": ">=16.0.0" } }, "node_modules/@smithy/util-hex-encoding": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@smithy/util-hex-encoding/-/util-hex-encoding-2.0.0.tgz", - "integrity": "sha512-c5xY+NUnFqG6d7HFh1IFfrm3mGl29lC+vF+geHv4ToiuJCBmIfzx6IeHLg+OgRdPFKDXIw6pvi+p3CsscaMcMA==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-hex-encoding/-/util-hex-encoding-3.0.0.tgz", + "integrity": "sha512-eFndh1WEK5YMUYvy3lPlVmYY/fZcQE1D8oSf41Id2vCeIkKJXPcYDCZD+4+xViI6b1XSd7tE+s5AmXzz5ilabQ==", "dependencies": { - "tslib": "^2.5.0" + "tslib": "^2.6.2" }, "engines": { - "node": ">=14.0.0" + "node": ">=16.0.0" } }, "node_modules/@smithy/util-middleware": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-2.0.9.tgz", - "integrity": "sha512-PnCnBJ07noMX1lMDTEefmxSlusWJUiLfrme++MfK5TD0xz8NYmakgoXy5zkF/16zKGmiwOeKAztWT/Vjk1KRIQ==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-3.0.3.tgz", + "integrity": "sha512-l+StyYYK/eO3DlVPbU+4Bi06Jjal+PFLSMmlWM1BEwyLxZ3aKkf1ROnoIakfaA7mC6uw3ny7JBkau4Yc+5zfWw==", "dependencies": { - "@smithy/types": "^2.8.0", - "tslib": "^2.5.0" + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" }, "engines": { - "node": ">=14.0.0" + "node": ">=16.0.0" } }, "node_modules/@smithy/util-retry": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@smithy/util-retry/-/util-retry-2.0.9.tgz", - "integrity": "sha512-46BFWe9RqB6g7f4mxm3W3HlqknqQQmWHKlhoqSFZuGNuiDU5KqmpebMbvC3tjTlUkqn4xa2Z7s3Hwb0HNs5scw==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@smithy/util-retry/-/util-retry-3.0.3.tgz", + "integrity": "sha512-AFw+hjpbtVApzpNDhbjNG5NA3kyoMs7vx0gsgmlJF4s+yz1Zlepde7J58zpIRIsdjc+emhpAITxA88qLkPF26w==", "dependencies": { - "@smithy/service-error-classification": "^2.0.9", - "@smithy/types": "^2.8.0", - "tslib": "^2.5.0" + "@smithy/service-error-classification": "^3.0.3", + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" }, "engines": { - "node": ">= 14.0.0" + "node": ">=16.0.0" } }, "node_modules/@smithy/util-stream": { - "version": "2.0.24", - "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-2.0.24.tgz", - "integrity": "sha512-hRpbcRrOxDriMVmbya+Mv77VZVupxRAsfxVDKS54XuiURhdiwCUXJP0X1iJhHinuUf6n8pBF0MkG9C8VooMnWw==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-3.1.3.tgz", + "integrity": "sha512-FIv/bRhIlAxC0U7xM1BCnF2aDRPq0UaelqBHkM2lsCp26mcBbgI0tCVTv+jGdsQLUmAMybua/bjDsSu8RQHbmw==", "dependencies": { - "@smithy/fetch-http-handler": "^2.3.2", - "@smithy/node-http-handler": "^2.2.2", - "@smithy/types": "^2.8.0", - "@smithy/util-base64": "^2.0.1", - "@smithy/util-buffer-from": "^2.0.0", - "@smithy/util-hex-encoding": "^2.0.0", - "@smithy/util-utf8": "^2.0.2", - "tslib": "^2.5.0" + "@smithy/fetch-http-handler": "^3.2.4", + "@smithy/node-http-handler": "^3.1.4", + "@smithy/types": "^3.3.0", + "@smithy/util-base64": "^3.0.0", + "@smithy/util-buffer-from": "^3.0.0", + "@smithy/util-hex-encoding": "^3.0.0", + "@smithy/util-utf8": "^3.0.0", + "tslib": "^2.6.2" }, "engines": { - "node": ">=14.0.0" + "node": ">=16.0.0" } }, "node_modules/@smithy/util-uri-escape": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@smithy/util-uri-escape/-/util-uri-escape-2.0.0.tgz", - "integrity": "sha512-ebkxsqinSdEooQduuk9CbKcI+wheijxEb3utGXkCoYQkJnwTnLbH1JXGimJtUkQwNQbsbuYwG2+aFVyZf5TLaw==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-uri-escape/-/util-uri-escape-3.0.0.tgz", + "integrity": "sha512-LqR7qYLgZTD7nWLBecUi4aqolw8Mhza9ArpNEQ881MJJIU2sE5iHCK6TdyqqzcDLy0OPe10IY4T8ctVdtynubg==", "dependencies": { - "tslib": "^2.5.0" + "tslib": "^2.6.2" }, "engines": { - "node": ">=14.0.0" + "node": ">=16.0.0" } }, "node_modules/@smithy/util-utf8": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.0.2.tgz", - "integrity": "sha512-qOiVORSPm6Ce4/Yu6hbSgNHABLP2VMv8QOC3tTDNHHlWY19pPyc++fBTbZPtx6egPXi4HQxKDnMxVxpbtX2GoA==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-3.0.0.tgz", + "integrity": "sha512-rUeT12bxFnplYDe815GXbq/oixEGHfRFFtcTF3YdDi/JaENIM6aSYYLJydG83UNzLXeRI5K8abYd/8Sp/QM0kA==", "dependencies": { - "@smithy/util-buffer-from": "^2.0.0", - "tslib": "^2.5.0" + "@smithy/util-buffer-from": "^3.0.0", + "tslib": "^2.6.2" }, "engines": { - "node": ">=14.0.0" + "node": ">=16.0.0" } }, "node_modules/@smithy/util-waiter": { - "version": "2.0.16", - "resolved": "https://registry.npmjs.org/@smithy/util-waiter/-/util-waiter-2.0.16.tgz", - "integrity": "sha512-5i4YONHQ6HoUWDd+X0frpxTXxSXgJhUFl+z0iMy/zpUmVeCQY2or3Vss6DzHKKMMQL4pmVHpQm9WayHDorFdZg==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@smithy/util-waiter/-/util-waiter-3.1.2.tgz", + "integrity": "sha512-4pP0EV3iTsexDx+8PPGAKCQpd/6hsQBaQhqWzU4hqKPHN5epPsxKbvUTIiYIHTxaKt6/kEaqPBpu/ufvfbrRzw==", "dependencies": { - "@smithy/abort-controller": "^2.0.16", - "@smithy/types": "^2.8.0", - "tslib": "^2.5.0" + "@smithy/abort-controller": "^3.1.1", + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" }, "engines": { - "node": ">=14.0.0" + "node": ">=16.0.0" } }, "node_modules/@solana/buffer-layout": { @@ -2754,17 +2878,17 @@ "integrity": "sha512-wpYMUmFu5f00Sm0cj2pfivpmawLZ0NKdviQ4w9zJeR8JVtOpOxHmLaJuj0vxvGqMJQWyP/COUkF75/57OKyRag==" }, "node_modules/fast-xml-parser": { - "version": "4.2.5", - "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.2.5.tgz", - "integrity": "sha512-B9/wizE4WngqQftFPmdaMYlXoJlJOYxGQOanC77fq9k8+Z0v5dDSVh+3glErdIROP//s/jgb7ZuxKfB8nVyo0g==", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.4.1.tgz", + "integrity": "sha512-xkjOecfnKGkSsOwtZ5Pz7Us/T6mrbPQrq0nh+aCO5V9nk5NLWmasAHumTKjiPJPWANe+kAZ84Jc8ooJkzZ88Sw==", "funding": [ - { - "type": "paypal", - "url": "https://paypal.me/naturalintelligence" - }, { "type": "github", "url": "https://github.com/sponsors/NaturalIntelligence" + }, + { + "type": "paypal", + "url": "https://paypal.me/naturalintelligence" } ], "dependencies": { diff --git a/projects/Astra/index.js b/projects/Astra/index.js new file mode 100644 index 000000000000..49a217f9d9f0 --- /dev/null +++ b/projects/Astra/index.js @@ -0,0 +1,13 @@ +const { getUniTVL } = require('../helper/unknownTokens') + +const FACTORY = "0x2b6852CeDEF193ece9814Ee99BE4A4Df7F463557" // This factory is on AirDAO Mainnet (Chain Id: 16718) + +const dexTVL = getUniTVL({ factory: FACTORY, useDefaultCoreAssets: true, fetchBalances: true, }) + +module.exports = { + misrepresentedTokens: true, + methodology: `Uses factory(${FACTORY}) address to find and price Liquidity Pool pairs.`, + airdao: { + tvl: dexTVL + } +}; diff --git a/projects/aark/index.js b/projects/aark/index.js index 83e1c5288389..8f2f40192199 100644 --- a/projects/aark/index.js +++ b/projects/aark/index.js @@ -5,7 +5,7 @@ async function tvl(api) { return api.sumTokens({ owner: VAULT_CONTRACT_ADDRESS, tokens: [ ADDRESSES.arbitrum.WETH, ADDRESSES.arbitrum.USDC, - '0x17FC002b466eEc40DaE837Fc4bE5c67993ddBd6F', //FRAX + ADDRESSES.arbitrum.FRAX, //FRAX ADDRESSES.arbitrum.USDC_CIRCLE, ADDRESSES.arbitrum.WSTETH, ADDRESSES.arbitrum.DAI, diff --git a/projects/aevo-xyz/index.js b/projects/aevo-xyz/index.js index 2b3d109ae4f3..72df3d5d87d5 100644 --- a/projects/aevo-xyz/index.js +++ b/projects/aevo-xyz/index.js @@ -50,4 +50,17 @@ module.exports = { ] }) }, + base: { + tvl: sumTokensExport({ + owners: [ + '0x6ee3907D1B9423584195979812379143B327fb48', // Native USDC + '0xA8bD0eCb10a83CC6E14FC5381f384DD3C0779e8B', // WETH + ], + tokens: [ + ADDRESSES.base.USDC, + ADDRESSES.base.USDbC, + ADDRESSES.base.WETH, + ] + }) + } } diff --git a/projects/airpuff/index.js b/projects/airpuff/index.js index 037b5ccdcd41..8c0a498dace4 100644 --- a/projects/airpuff/index.js +++ b/projects/airpuff/index.js @@ -45,22 +45,22 @@ module.exports = { tvl: async (api) => { const KUSDC = { vault: "0x4c18E80b801AA24066D8B1C6E65ee245497Cb741", - token: "0xa415021bC5c4C3b5B989116DC35Ae95D9C962c8D", + token: ADDRESSES.karak.USDC, }; const KWETH = { vault: "0x9a9631F7BEcE5C6E0aBA1f73f0e5796c534dc4db", - token: "0x4200000000000000000000000000000000000006", + token: ADDRESSES.optimism.WETH_1, }; const wethLending = { vault: "0xd6034F9147CF7528e857403Dea93bc45743295eb", - token: "0x4200000000000000000000000000000000000006", + token: ADDRESSES.optimism.WETH_1, }; const usdcLending = { vault: "0x475820E4bCE0E3d233Ad7f6A8c9DD1f66974c5d6", - token: "0xa415021bC5c4C3b5B989116DC35Ae95D9C962c8D", + token: ADDRESSES.karak.USDC, }; const KarakUSDCBal = await api.call({ target: KUSDC.vault, abi: contractAbis.getTotalSupply }); diff --git a/projects/akronswap/index.js b/projects/akronswap/index.js index fea9a6e6afa7..ed0555999c95 100644 --- a/projects/akronswap/index.js +++ b/projects/akronswap/index.js @@ -1,17 +1,11 @@ const { getUniTVL } = require('../helper/unknownTokens'); - + +const tvl = getUniTVL({ factory: '0xAf39606bec181887951Ab6912Ac7EA216Bd6E4B4', useDefaultCoreAssets: true, fetchBalances: true, }) + module.exports = { misrepresentedTokens: true, - ethereum:{ - tvl: getUniTVL({ factory: '0x6624Ac5F9abFA36174511607860e81C8dB9e84E9', useDefaultCoreAssets: true, fetchBalances: true, }), - }, - arbitrum:{ - tvl: getUniTVL({ factory: '0x40Cbdf84475f8Dd7C9a9c665eDE551EeaaF21F8d', useDefaultCoreAssets: true, fetchBalances: true, }), - }, - base:{ - tvl: getUniTVL({ factory: '0xD2156Bb9ed200FE88705443BfFcA788BA8b205f6', useDefaultCoreAssets: true, fetchBalances: true, }), - }, - bsc:{ - tvl: getUniTVL({ factory: '0x40Cbdf84475f8Dd7C9a9c665eDE551EeaaF21F8d', useDefaultCoreAssets: true, fetchBalances: true, }), - }, + ethereum: { tvl, }, + arbitrum: { tvl, }, + base: { tvl, }, + bsc: { tvl, }, } \ No newline at end of file diff --git a/projects/alcor/index.js b/projects/alcor/index.js index 3ef74175e374..f23d4dc835a3 100644 --- a/projects/alcor/index.js +++ b/projects/alcor/index.js @@ -14,7 +14,7 @@ async function eos() { // Alcor // https://wax.alcor.exchange async function wax() { - const accounts = ["swap.alcor", "alcordexmain"]; + const accounts = ["swap.alcor", "alcordexmain", "liquid.alcor"]; const tokens = [ ["eosio.token", "WAX", "wax"], ["alien.worlds", "TLM", "alien-worlds"], diff --git a/projects/alexlab/api.js b/projects/alexlab/api.js new file mode 100644 index 000000000000..539871663ad8 --- /dev/null +++ b/projects/alexlab/api.js @@ -0,0 +1,110 @@ +const { call } = require('../helper/chain/stacks-api') +const { getCache, setCache } = require('../helper/cache') +const { sleep } = require('../helper/utils') +const sdk = require('@defillama/sdk') + +const factory = 'SP102V8P0F7JX67ARQ77WEA3D3CFB5XW39REDT0AM.amm-pool-v2-01' + +async function tvl(api) { + // https://docs.alexgo.io/developers/smart-contracts + + + // get simple weight pool data + const simpleWeightAMM = 'SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.simple-weight-pool-alex' + let { value: swPools } = await call({ target: simpleWeightAMM, abi: 'get-pools' }) + swPools = swPools.map(i => i.value) + for (const { value: pool } of swPools) { + const inputArgs = ['token-x', 'token-y'].map(key => pool[key]) + const { value: poolData } = await call({ target: simpleWeightAMM, abi: 'get-pool-details', inputArgs }) + api.add(pool['token-x'].value, poolData['balance-x'].value) + api.add(pool['token-y'].value, poolData['balance-y'].value) + await sleep(2100) + } + + + + // get fixed weight pool data + const fixedWeightAMM = 'SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.fixed-weight-pool-v1-01' + let { value: fwPools } = await call({ target: fixedWeightAMM, abi: 'get-pools' }) + fwPools = fwPools.map(i => i.value) + for (const { value: pool } of fwPools) { + const inputArgs = ['token-x', 'token-y', 'weight-x', 'weight-y'].map(key => pool[key]) + const { value: poolData } = await call({ target: fixedWeightAMM, abi: 'get-pool-details', inputArgs }) + api.add(pool['token-x'].value, poolData['balance-x'].value) + api.add(pool['token-y'].value, poolData['balance-y'].value) + await sleep(2100) + } + + + + // update cache for amm v2 pools & token metadata + const cache = await getCache('alex/ammv2', 'stacks') + if (!cache.pairData) cache.pairData = [] + if (!cache.tokenMetadata) cache.tokenMetadata = {} + const currentPairCount = cache.pairData.length + let hasMorePairs = true + let i = currentPairCount + 1 + do { + try { + const pairData = await call({ target: factory, abi: 'get-pool-details-by-id', inputArgs: [{ type: 'number', value: i }] }) + if (!pairData.value?.factor) hasMorePairs = false + else + cache.pairData.push(pairData.value) + i++ + await sleep(2100) + } catch (e) { + sdk.log('error fetching pair data', e) + hasMorePairs = false + } + } while (hasMorePairs) + let cacheNeedsUpdate = cache.pairData.length > currentPairCount + const tokenSet = new Set(cache.pairData.flatMap(pair => [pair['token-x'], pair['token-y']]).map(token => token.value) + .filter(token => !cache.tokenMetadata[token]) + ) + const tokensMissingMetadata = Array.from(tokenSet) + if (tokensMissingMetadata.length > 0) { + cacheNeedsUpdate = true + for (const token of tokensMissingMetadata) { + try { + const decimals = await call({ target: token, abi: 'get-decimals' }) + const symbol = await call({ target: token, abi: 'get-symbol' }) + let baseToken = {} + let baseDecimals = {} + let baseSymbol = {} + try { + baseDecimals = await call({ target: token, abi: 'get-base-decimals' }) + baseToken = await call({ target: token, abi: 'get-base-token' }) + if (typeof baseToken === 'string') baseToken = { value: baseToken } + if (baseToken.value) { + baseSymbol = await call({ target: baseToken.value, abi: 'get-symbol' }) + } + } catch (e) { + // sdk.log('error fetching base token metadata', e) + } + cache.tokenMetadata[token] = { decimals: decimals.value, symbol: symbol.value, baseToken: baseToken.value, baseDecimals: baseDecimals.value, baseSymbol: baseSymbol.value } + await sleep(2100) + } catch (e) { + sdk.log('error fetching token metadata', e) + } + } + } + + api.log('pair count', cache.pairData.length) + if (cacheNeedsUpdate) + await setCache('alex/ammv2', 'stacks', cache) + + + + // add amm v2 tvl + for (const pair of cache.pairData) { + const { value: bals } = await call({ target: factory, abi: 'get-balances', inputArgs: [pair['token-x'], pair['token-y'], pair.factor] }) + api.add(pair['token-x'].value, bals['balance-x'].value) + api.add(pair['token-y'].value, bals['balance-y'].value) + await sleep(600) + } + return api.getBalances() +} + +module.exports = { + stacks: { tvl } +} \ No newline at end of file diff --git a/projects/alexlab/index.js b/projects/alexlab/index.js index 523b6f815f2e..a723011104df 100644 --- a/projects/alexlab/index.js +++ b/projects/alexlab/index.js @@ -4,41 +4,16 @@ const { get } = require('../helper/http') // https://stacks-node-api.blockstack.org/extended/v1/address/SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.alex-vault/balances const ALEX_API = "https://api.alexlab.co/v1"; -async function fetch() { - const url = `${ALEX_API}/pool_token_stats`; - const alexStatsResponse = await get(url) - - const valueLockedMap = {}; - let totalValueLocked = 0; - for (const pool of alexStatsResponse) { - let poolValue = 0; - const poolToken = pool.pool_token; - - if (poolToken == "age000-governance-token") { - poolValue = pool.price * pool.reserved_balance; - } else { - poolValue = pool.price * pool.total_supply; - } - totalValueLocked += poolValue; - valueLockedMap[poolToken] = poolValue; - } - - return { tether: totalValueLocked }; -} - async function staking() { const url = `${ALEX_API}/stats/tvl`; const alexResponse = await get(url) return { tether: alexResponse.reserve_pool_value }; } +const { getExports } = require('../helper/heroku-api') -// node test.js projects/alexlab/index.js module.exports = { - misrepresentedTokens: true, timetravel: false, - stacks: { - tvl: fetch, - staking, - }, - methodology: "Alex Lab TVL is sum of tokens locked in ALEX platform.", -}; + ...getExports("alexlab", ['stacks']), +} + +module.exports.stacks.staking = staking diff --git a/projects/alienworlds/index.js b/projects/alienworlds/index.js new file mode 100644 index 000000000000..d5c46289a0d0 --- /dev/null +++ b/projects/alienworlds/index.js @@ -0,0 +1,26 @@ +const { get_account_tvl } = require("../helper/chain/eos"); + +const accounts = ["nftmt.worlds", "stake.worlds", "lore.worlds", "arena.worlds", "boost.worlds"] + +// AlienWorlds +// https://alienworlds.io/ +async function wax() { + const tokens = [ + ["eosio.token", "WAX", "wax"], + ]; + return await get_account_tvl(accounts, tokens, "wax"); +} +async function staking() { + const tokens = [ + ["alien.worlds", "TLM", "alien-worlds"], + ]; + return await get_account_tvl(accounts, tokens, "wax"); +} + +module.exports = { + methodology: `AlienWorlds TVL is achieved by querying token balances from Staking, Voting & Gaming smart contract(s).`, + wax: { + tvl: wax, + staking, + }, +} diff --git a/projects/alphaX-protocol/index.js b/projects/alphaX-protocol/index.js new file mode 100644 index 000000000000..0eb194a9a8e4 --- /dev/null +++ b/projects/alphaX-protocol/index.js @@ -0,0 +1,29 @@ +const ADDRESSES = require('../helper/coreAssets.json'); +const { sumTokensExport } = require('../helper/unwrapLPs'); + +const tokens = [ + ADDRESSES.ethereum.USDT, +]; + +const walletAddresses = { + ethereum: ['0xA61a6E696B7C566DA42B80dA27d96e7104bcec99'], + arbitrum: ['0x552E7A55802f3350C707a243E402aa50Eda9D286'] + +}; + +const tokenAddress = { + ethereum: [ADDRESSES.ethereum.USDT], + arbitrum: [ADDRESSES.arbitrum.USDT], + + +} + +module.exports = { + ethereum: { + tvl: sumTokensExport({ owners: walletAddresses.ethereum, tokens: tokenAddress.ethereum }), + }, + arbitrum: { + tvl: sumTokensExport({ owners: walletAddresses.arbitrum, tokens: tokenAddress.arbitrum }), + }, + +}; diff --git a/projects/alphafi/index.js b/projects/alphafi/index.js index d6a25b7fba01..4119f2420f76 100644 --- a/projects/alphafi/index.js +++ b/projects/alphafi/index.js @@ -1,3 +1,4 @@ +const ADDRESSES = require('../helper/coreAssets.json') const sui = require("../helper/chain/sui") const { addUniV3LikePosition } = require("../helper/unwrapLPs") @@ -7,43 +8,58 @@ const ALPHAFI_CETUS_TVL_IDS = [ poolID: "0x30066d9879374276dc01177fbd239a9377b497bcd347c82811d75fcda35b18e5", cetusPoolID: "0xc8d7a1503dc2f9f5b05449a87d8733593e2f0f3e7bffd90541252782e4d2ca20", investorID: "0x87a76889bf4ed211276b16eb482bf6df8d4e27749ebecd13017d19a63f75a6d5", - token0Type: "0xc060006111016b8a020ad5b33834984a437aaa7d3c74c18e09a95d48aceab08c::coin::COIN", - token1Type: "0x5d4b302506645c37ff133b98c4b50a5ae14841659738d6d733d59d0d217a93bf::coin::COIN" + token0Type: ADDRESSES.sui.USDT, + token1Type: ADDRESSES.sui.USDC }, { poolID: "0xa7239a0c727c40ee3a139689b16b281acfd0682a06c23531b184a61721ece437", cetusPoolID: "0x0e809689d04d87f4bd4e660cd1b84bf5448c5a7997e3d22fc480e7e5e0b3f58d", investorID: "0x1b923520f19660d4eb013242c6d03c84fdea034b8f784cfd71173ef72ece50e1", token0Type: "0x960b531667636f39e85867775f52f6b1f220a058c4de786905bdf761e06a56bb::usdy::USDY", - token1Type: "0x5d4b302506645c37ff133b98c4b50a5ae14841659738d6d733d59d0d217a93bf::coin::COIN" + token1Type: ADDRESSES.sui.USDC }, { poolID: "0xee6f6392cbd9e1997f6e4cf71db0c1ae1611f1f5f7f23f90ad2c64b8f23cceab", cetusPoolID: "0xcf994611fd4c48e277ce3ffd4d4364c914af2c3cbb05f7bf6facd371de688630", investorID: "0xb6ca8aba0fb26ed264a3ae3d9c1461ac7c96cdcbeabb01e71086e9a8340b9c55", - token0Type: "0x5d4b302506645c37ff133b98c4b50a5ae14841659738d6d733d59d0d217a93bf::coin::COIN", - token1Type: "0x2::sui::SUI" + token0Type: ADDRESSES.sui.USDC, + token1Type: ADDRESSES.sui.SUI }, { poolID: "0x676fc5cad79f51f6a7d03bfa3474ecd3c695d322380fc68e3d4f61819da3bf8a", cetusPoolID: "0xaa57c66ba6ee8f2219376659f727f2b13d49ead66435aa99f57bb008a64a8042", investorID: "0x9ae0e56aa0ebc27f9d8a17b5a9118d368ba262118d878977b6194a10a671bbbc", - token0Type: "0x5d4b302506645c37ff133b98c4b50a5ae14841659738d6d733d59d0d217a93bf::coin::COIN", - token1Type: "0x027792d9fed7f9844eb4839566001bb6f6cb4804f66aa2da6fe1ee242d896881::coin::COIN" + token0Type: ADDRESSES.sui.USDC, + token1Type: ADDRESSES.sui.WBTC }, { poolID: "0xbdf4f673b34274f36be284bca3f765083380fefb29141f971db289294bf679c6", cetusPoolID: "0x5b0b24c27ccf6d0e98f3a8704d2e577de83fa574d3a9060eb8945eeb82b3e2df", investorID: "0x05fa099d1df7b5bfb2e420d5ee2d63508db17c40ce7c4e0ca0305cd5df974e43", - token0Type: "0xaf8cd5edc19c4512f4259f0bee101a40d41ebed738ade5874359610ef8eeced5::coin::COIN", - token1Type: "0x5d4b302506645c37ff133b98c4b50a5ae14841659738d6d733d59d0d217a93bf::coin::COIN" + token0Type: ADDRESSES.sui.WETH, + token1Type: ADDRESSES.sui.USDC }, + { + poolID: "0x045e4e3ccd383bedeb8fda54c39a7a1b1a6ed6a9f66aec4998984373558f96a0", + cetusPoolID: "0x0254747f5ca059a1972cd7f6016485d51392a3fde608107b93bbaebea550f703", + investorID: "0xdd9018247d579bd7adfdbced4ed39c28821c6019461d37dbdf32f0d409959b1c", + token0Type: "0xa99b8952d4f7d947ea77fe0ecdcc9e5fc0bcab2841d6e2a5aa00c3044e5544b5::navx::NAVX", + token1Type: ADDRESSES.sui.SUI + }, + { + poolID: "0x59ff9c5df31bfd0a59ac8393cf6f8db1373252e845958953e6199952d194dae4", + cetusPoolID: "0x81fe26939ed676dd766358a60445341a06cea407ca6f3671ef30f162c84126d5", + investorID: "0x8051a9ce43f9c21e58331b1ba2b1925e4ae4c001b1400459236d86d5d3d2888b", + token0Type: ADDRESSES.sui.BUCK, + token1Type: ADDRESSES.sui.USDC + }, + ] const ALPHAFI_NAVI_TVL_IDS = [ { poolID: "0x643f84e0a33b19e2b511be46232610c6eb38e772931f582f019b8bbfb893ddb3", - tokenType: "0x2::sui::SUI", + tokenType: ADDRESSES.sui.SUI, expo: 9 }, { @@ -53,14 +69,19 @@ const ALPHAFI_NAVI_TVL_IDS = [ }, { poolID: "0xc696ca5b8f21a1f8fcd62cff16bbe5a396a4bed6f67909cfec8269eb16e60757", - tokenType: "0xc060006111016b8a020ad5b33834984a437aaa7d3c74c18e09a95d48aceab08c::coin::COIN", + tokenType: ADDRESSES.sui.USDT, expo: 6, }, { poolID: "0x01493446093dfcdcfc6c16dc31ffe40ba9ac2e99a3f6c16a0d285bff861944ae", - tokenType: "0x5d4b302506645c37ff133b98c4b50a5ae14841659738d6d733d59d0d217a93bf::coin::COIN", + tokenType: ADDRESSES.sui.USDC, expo: 6 }, + { + poolID: "0xe4eef7d4d8cafa3ef90ea486ff7d1eec347718375e63f1f778005ae646439aad", + tokenType: ADDRESSES.sui.WETH, + expo: 8 + }, ] const ALPHAFI_POOL2_IDS = [{ @@ -68,7 +89,7 @@ const ALPHAFI_POOL2_IDS = [{ cetusPoolID: "0xda7347c3192a27ddac32e659c9d9cbed6f8c9d1344e605c71c8886d7b787d720", investorID: "0x46d901d5e1dba34103038bd2ba789b775861ea0bf4d6566afd5029cf466a3d88", token0Type: "0xfe3afec26c59e874f3c1d60b8203cb3852d2bb2aa415df9548b8d688e6683f93::alpha::ALPHA", - token1Type: "0x2::sui::SUI" + token1Type: ADDRESSES.sui.SUI }, ] diff --git a/projects/angle/addresses.js b/projects/angle/addresses.js index e36103f28ef3..6f2cadb65e29 100644 --- a/projects/angle/addresses.js +++ b/projects/angle/addresses.js @@ -14,7 +14,7 @@ const TreasuryTokenAddresses = { ADDRESSES.ethereum.CVX, '0x875773784Af8135eA0ef43b5a374AaD105c5D39e', '0x6c3F90f043a72FA612cbac8115EE7e52BDe6E490', - '0x3432B6A60D23Ca0dFCa7761B7ab56459D9C964D0', + ADDRESSES.ethereum.FXS, '0x73968b9a57c6E53d41345FD57a6E6ae27d6CDB2F', '0x4da27a545c0c5B758a6BA100e3a049001de870f5', ADDRESSES.ethereum.USDC, @@ -122,7 +122,7 @@ const chains = [ const tokens = { ethereum: { EURA: '0x1a7e4e63778B4f12a199C062f3eFdD288afCBce8', - stEUR: '0x004626A008B1aCdC4c74ab51644093b155e59A23', + stEUR: ADDRESSES.celo.STEUR, USDA: '0x0000206329b97DB379d5E1Bf586BbDB969C63274', stUSD: '0x0022228a2cc5E7eF0274A7Baa600d44da5aB5776', bC3M: '0x2F123cF3F37CE3328CC9B5b8415f9EC5109b45e7', @@ -133,7 +133,7 @@ const tokens = { }, arbitrum: { EURA: '0xFA5Ed56A203466CbBC2430a43c66b9D8723528E7', - stEUR: '0x004626A008B1aCdC4c74ab51644093b155e59A23', + stEUR: ADDRESSES.celo.STEUR, USDA: '0x0000206329b97DB379d5E1Bf586BbDB969C63274', stUSD: '0x0022228a2cc5E7eF0274A7Baa600d44da5aB5776', }, @@ -154,7 +154,7 @@ const tokens = { }, xdai: { EURA: '0x4b1E2c2762667331Bc91648052F646d1b0d35984', - stEUR: '0x004626A008B1aCdC4c74ab51644093b155e59A23', + stEUR: ADDRESSES.celo.STEUR, USDA: '0x0000206329b97DB379d5E1Bf586BbDB969C63274', stUSD: '0x0022228a2cc5E7eF0274A7Baa600d44da5aB5776', }, @@ -165,7 +165,7 @@ const tokens = { }, celo: { EURA: '0xC16B81Af351BA9e64C1a069E3Ab18c244A1E3049', - stEUR: '0x004626A008B1aCdC4c74ab51644093b155e59A23', + stEUR: ADDRESSES.celo.STEUR, USDA: '0x0000206329b97DB379d5E1Bf586BbDB969C63274', stUSD: '0x0022228a2cc5E7eF0274A7Baa600d44da5aB5776', }, diff --git a/projects/apex-omni/index.js b/projects/apex-omni/index.js index 74ecad0c41dd..5c109418ef17 100644 --- a/projects/apex-omni/index.js +++ b/projects/apex-omni/index.js @@ -9,13 +9,17 @@ const tokens = [ const walletAddresses = { bsc: ['0xb8d9f005654b7b127b34dae8f973ba729ca3a2d9'], ethereum: ['0x35D173cdfE4d484BC5985fDa55FABad5892c7B82'], - arbitrum: ['0x3169844a120c0f517b4eb4a750c08d8518c8466a'] + arbitrum: ['0x3169844a120c0f517b4eb4a750c08d8518c8466a'], + base: ['0xee7981c4642de8d19aed11da3bac59277dfd59d7'], + mantle: ['0x3c7c0ebfcd5786ef48df5ed127cddeb806db976c'] }; const tokenAddress = { bsc: [ADDRESSES.bsc.USDT], arbitrum: [ADDRESSES.arbitrum.USDT], + base: ['0xfde4C96c8593536E31F229EA8f37b2ADa2699bb2'], + mantle: [ADDRESSES.mantle.USDT] } module.exports = { @@ -28,4 +32,10 @@ module.exports = { arbitrum: { tvl: sumTokensExport({ owners: walletAddresses.arbitrum, tokens: tokenAddress.arbitrum }), }, + base: { + tvl: sumTokensExport({ owners: walletAddresses.base, tokens: tokenAddress.base }), + }, + mantle: { + tvl: sumTokensExport({ owners: walletAddresses.mantle, tokens: tokenAddress.mantle }), + }, }; \ No newline at end of file diff --git a/projects/armada/index.js b/projects/armada/index.js index f27dbd7bee12..3184eed7f8f9 100644 --- a/projects/armada/index.js +++ b/projects/armada/index.js @@ -1,11 +1,10 @@ -const BN = require("bn.js"); -const BigNumber = require("bignumber.js"); const { ArmadaIDL, WhirpoolIDL } = require("./idl"); const { getProvider, sumTokens2 } = require("../helper/solana"); const { Program } = require("@project-serum/anchor"); const { PublicKey } = require("@solana/web3.js"); +const { addUniV3LikePosition } = require("../helper/unwrapLPs"); -async function tvl() { +async function tvl(api) { const anchorProvider = getProvider(); const programId = new PublicKey( "ArmN3Av2boBg8pkkeCK9UuCN9zSUVc2UQg1qR2sKwm8d" @@ -46,307 +45,24 @@ async function tvl() { return agg; }, {}); // Convert Positions to token amounts - const balances = {}; - positions.forEach((position) => { + + for (const position of positions) { const whirlpool = whirlpoolMap[position.whirlpool.toString()]; - const sqrtPriceLowerX64 = tickIndexToSqrtPriceX64(position.tickLowerIndex); - const sqrtPriceUpperX64 = tickIndexToSqrtPriceX64(position.tickUpperIndex); - const { tokenA, tokenB } = getTokenAmountsFromLiquidity( - position.liquidity, - whirlpool.sqrtPrice, - sqrtPriceLowerX64, - sqrtPriceUpperX64, - true - ); - const balanceKeyA = `solana:${whirlpool.tokenMintA.toString()}`; - const balanceKeyB = `solana:${whirlpool.tokenMintB.toString()}`; - const prevBalanceA = balances[balanceKeyA]; - const prevBalanceB = balances[balanceKeyB]; - balances[balanceKeyA] = prevBalanceA ? prevBalanceA.add(tokenA) : tokenA; - balances[balanceKeyB] = prevBalanceB ? prevBalanceB.add(tokenB) : tokenB; - }); - Object.keys(balances).forEach((key) => { - balances[key] = balances[key].toString() - }) + const tickLower = position.tickLowerIndex + const tickUpper = position.tickUpperIndex + const tick = whirlpool.tickCurrentIndex + const liquidity = position.liquidity + const token0 = whirlpool.tokenMintA.toString() + const token1 = whirlpool.tokenMintB.toString() + addUniV3LikePosition({ api, token0, token1, liquidity, tickLower, tickUpper, tick }) + } + return sumTokens2({ tokenAccounts: vaultTokenAccounts, - balances, + balances: api.getBalances() }); } -const tickIndexToSqrtPriceX64 = (tickIndex) => { - if (tickIndex > 0) { - return new BN(tickIndexToSqrtPricePositive(tickIndex)); - } else { - return new BN(tickIndexToSqrtPriceNegative(tickIndex)); - } -}; - -function tickIndexToSqrtPricePositive(tick) { - let ratio; - - if ((tick & 1) != 0) { - ratio = new BN("79232123823359799118286999567"); - } else { - ratio = new BN("79228162514264337593543950336"); - } - - if ((tick & 2) != 0) { - ratio = signedShiftRight( - ratio.mul(new BN("79236085330515764027303304731")), - 96, - 256 - ); - } - if ((tick & 4) != 0) { - ratio = signedShiftRight( - ratio.mul(new BN("79244008939048815603706035061")), - 96, - 256 - ); - } - if ((tick & 8) != 0) { - ratio = signedShiftRight( - ratio.mul(new BN("79259858533276714757314932305")), - 96, - 256 - ); - } - if ((tick & 16) != 0) { - ratio = signedShiftRight( - ratio.mul(new BN("79291567232598584799939703904")), - 96, - 256 - ); - } - if ((tick & 32) != 0) { - ratio = signedShiftRight( - ratio.mul(new BN("79355022692464371645785046466")), - 96, - 256 - ); - } - if ((tick & 64) != 0) { - ratio = signedShiftRight( - ratio.mul(new BN("79482085999252804386437311141")), - 96, - 256 - ); - } - if ((tick & 128) != 0) { - ratio = signedShiftRight( - ratio.mul(new BN("79736823300114093921829183326")), - 96, - 256 - ); - } - if ((tick & 256) != 0) { - ratio = signedShiftRight( - ratio.mul(new BN("80248749790819932309965073892")), - 96, - 256 - ); - } - if ((tick & 512) != 0) { - ratio = signedShiftRight( - ratio.mul(new BN("81282483887344747381513967011")), - 96, - 256 - ); - } - if ((tick & 1024) != 0) { - ratio = signedShiftRight( - ratio.mul(new BN("83390072131320151908154831281")), - 96, - 256 - ); - } - if ((tick & 2048) != 0) { - ratio = signedShiftRight( - ratio.mul(new BN("87770609709833776024991924138")), - 96, - 256 - ); - } - if ((tick & 4096) != 0) { - ratio = signedShiftRight( - ratio.mul(new BN("97234110755111693312479820773")), - 96, - 256 - ); - } - if ((tick & 8192) != 0) { - ratio = signedShiftRight( - ratio.mul(new BN("119332217159966728226237229890")), - 96, - 256 - ); - } - if ((tick & 16384) != 0) { - ratio = signedShiftRight( - ratio.mul(new BN("179736315981702064433883588727")), - 96, - 256 - ); - } - if ((tick & 32768) != 0) { - ratio = signedShiftRight( - ratio.mul(new BN("407748233172238350107850275304")), - 96, - 256 - ); - } - if ((tick & 65536) != 0) { - ratio = signedShiftRight( - ratio.mul(new BN("2098478828474011932436660412517")), - 96, - 256 - ); - } - if ((tick & 131072) != 0) { - ratio = signedShiftRight( - ratio.mul(new BN("55581415166113811149459800483533")), - 96, - 256 - ); - } - if ((tick & 262144) != 0) { - ratio = signedShiftRight( - ratio.mul(new BN("38992368544603139932233054999993551")), - 96, - 256 - ); - } - - return signedShiftRight(ratio, 32, 256); -} - -function tickIndexToSqrtPriceNegative(tickIndex) { - let tick = Math.abs(tickIndex); - let ratio; - - if ((tick & 1) != 0) { - ratio = new BN("18445821805675392311"); - } else { - ratio = new BN("18446744073709551616"); - } - - if ((tick & 2) != 0) { - ratio = signedShiftRight(ratio.mul(new BN("18444899583751176498")), 64, 256); - } - if ((tick & 4) != 0) { - ratio = signedShiftRight(ratio.mul(new BN("18443055278223354162")), 64, 256); - } - if ((tick & 8) != 0) { - ratio = signedShiftRight(ratio.mul(new BN("18439367220385604838")), 64, 256); - } - if ((tick & 16) != 0) { - ratio = signedShiftRight(ratio.mul(new BN("18431993317065449817")), 64, 256); - } - if ((tick & 32) != 0) { - ratio = signedShiftRight(ratio.mul(new BN("18417254355718160513")), 64, 256); - } - if ((tick & 64) != 0) { - ratio = signedShiftRight(ratio.mul(new BN("18387811781193591352")), 64, 256); - } - if ((tick & 128) != 0) { - ratio = signedShiftRight(ratio.mul(new BN("18329067761203520168")), 64, 256); - } - if ((tick & 256) != 0) { - ratio = signedShiftRight(ratio.mul(new BN("18212142134806087854")), 64, 256); - } - if ((tick & 512) != 0) { - ratio = signedShiftRight(ratio.mul(new BN("17980523815641551639")), 64, 256); - } - if ((tick & 1024) != 0) { - ratio = signedShiftRight(ratio.mul(new BN("17526086738831147013")), 64, 256); - } - if ((tick & 2048) != 0) { - ratio = signedShiftRight(ratio.mul(new BN("16651378430235024244")), 64, 256); - } - if ((tick & 4096) != 0) { - ratio = signedShiftRight(ratio.mul(new BN("15030750278693429944")), 64, 256); - } - if ((tick & 8192) != 0) { - ratio = signedShiftRight(ratio.mul(new BN("12247334978882834399")), 64, 256); - } - if ((tick & 16384) != 0) { - ratio = signedShiftRight(ratio.mul(new BN("8131365268884726200")), 64, 256); - } - if ((tick & 32768) != 0) { - ratio = signedShiftRight(ratio.mul(new BN("3584323654723342297")), 64, 256); - } - if ((tick & 65536) != 0) { - ratio = signedShiftRight(ratio.mul(new BN("696457651847595233")), 64, 256); - } - if ((tick & 131072) != 0) { - ratio = signedShiftRight(ratio.mul(new BN("26294789957452057")), 64, 256); - } - if ((tick & 262144) != 0) { - ratio = signedShiftRight(ratio.mul(new BN("37481735321082")), 64, 256); - } - - return ratio; -} - -function signedShiftRight(n0, shiftBy, bitWidth) { - let twoN0 = n0.toTwos(bitWidth).shrn(shiftBy); - twoN0.imaskn(bitWidth - shiftBy + 1); - return twoN0.fromTwos(bitWidth - shiftBy); -} - -const getTokenAmountsFromLiquidity = ( - liquidity, - currentSqrtPrice, - lowerSqrtPrice, - upperSqrtPrice, - round_up -) => { - const _liquidity = new BigNumber(liquidity.toString()); - const _currentPrice = new BigNumber(currentSqrtPrice.toString()); - const _lowerPrice = new BigNumber(lowerSqrtPrice.toString()); - const _upperPrice = new BigNumber(upperSqrtPrice.toString()); - let tokenA, tokenB; - if (currentSqrtPrice.lt(lowerSqrtPrice)) { - // x = L * (pb - pa) / (pa * pb) - tokenA = toX64_Decimal(_liquidity) - .times(_upperPrice.minus(_lowerPrice)) - .div(_lowerPrice.times(_upperPrice)); - tokenB = new BigNumber(0); - } else if (currentSqrtPrice.lt(upperSqrtPrice)) { - // x = L * (pb - p) / (p * pb) - // y = L * (p - pa) - tokenA = toX64_Decimal(_liquidity) - .times(_upperPrice.minus(_currentPrice)) - .div(_currentPrice.times(_upperPrice)); - tokenB = fromX64_Decimal(_liquidity.times(_currentPrice.minus(_lowerPrice))); - } else { - // y = L * (pb - pa) - tokenA = new BigNumber(0); - tokenB = fromX64_Decimal(_liquidity.times(_upperPrice.minus(_lowerPrice))); - } - - if (round_up) { - return { - tokenA: new BN(tokenA.integerValue(BigNumber.ROUND_CEIL).toString()), - tokenB: new BN(tokenB.integerValue(BigNumber.ROUND_CEIL).toString()), - }; - } else { - return { - tokenA: new BN(tokenA.integerValue(BigNumber.ROUND_FLOOR).toString()), - tokenB: new BN(tokenB.integerValue(BigNumber.ROUND_FLOOR).toString()), - }; - } -}; - -const toX64_Decimal = (num) => { - return num.times(new BigNumber(2).pow(64)); -}; - -const fromX64_Decimal = (num) => { - return num.times(new BigNumber(2).pow(-64)); -}; - module.exports = { doublecounted: true, misrepresentedTokens: true, diff --git a/projects/arrow-markets/index.js b/projects/arrow-markets/index.js new file mode 100644 index 000000000000..7c9065442323 --- /dev/null +++ b/projects/arrow-markets/index.js @@ -0,0 +1,11 @@ +async function staking(api) { + const bal = await api.call({ abi: 'uint256:totalStakeAmounts', target: '0x9193957DC6d298a83afdA45A83C24c6C397b135f' }) + api.add('0x5c5e384Bd4e36724B2562cCAA582aFd125277C9B', bal) +} + +module.exports = { + avax: { + tvl: () => ({}), + staking, + } +} \ No newline at end of file diff --git a/projects/astherus/index.js b/projects/astherus/index.js index e3e924285ffb..de07fb304d71 100644 --- a/projects/astherus/index.js +++ b/projects/astherus/index.js @@ -1,4 +1,5 @@ const { getConfig } = require('../helper/cache') +const { sumTokens2 } = require('../helper/solana') const config = { bsc: '0x128463A60784c4D3f46c23Af3f65Ed859Ba87974', @@ -18,4 +19,11 @@ Object.keys(config).forEach(chain => { return api.sumTokens({ owner: vault, tokens }) } } -}) \ No newline at end of file +}) + +module.exports['solana'] = { + tvl: async function (...rest) { + const { data: tokens } = await getConfig(`astherus/solana`, `https://astherus.finance/bapi/futures/v1/public/future/web3/ae-deposit-asset?network=SOL`) + return sumTokens2({ tokenAccounts: tokens.map(({ tokenVault }) => [tokenVault]).flat() }) + } +} diff --git a/projects/aura-finance/index.js b/projects/aura-finance/index.js index d4ecb17a4387..07dc07649b39 100644 --- a/projects/aura-finance/index.js +++ b/projects/aura-finance/index.js @@ -68,6 +68,7 @@ const config = { xdai: { factory: '0x83E443EF4f9963C77bd860f94500075556668cb8', fromBlock: 27088527, voterProxy: '0xC181Edc719480bd089b94647c2Dc504e2700a2B0' }, polygon_zkevm: { factory: '0x2498A2B0d6462d2260EAC50aE1C3e03F4829BA95', fromBlock: 203652, voterProxy: '0xC181Edc719480bd089b94647c2Dc504e2700a2B0' }, avax: { factory: '0xf23b4DB826DbA14c0e857029dfF076b1c0264843', fromBlock: 32558551, voterProxy: '0xC181Edc719480bd089b94647c2Dc504e2700a2B0' }, + fraxtal: { factory: '0xc3ccacE87f6d3A81724075ADcb5ddd85a8A1bB68', fromBlock: 4712390, voterProxy: '0xC181Edc719480bd089b94647c2Dc504e2700a2B0' }, } module.exports = { diff --git a/projects/avalance-btc/index.js b/projects/avalance-btc/index.js new file mode 100644 index 000000000000..9ccfdf9a1a76 --- /dev/null +++ b/projects/avalance-btc/index.js @@ -0,0 +1,16 @@ +const sdk = require('@defillama/sdk'); +const { sumTokensExport } = require('../helper/sumTokens'); + +//https://support.avax.network/en/articles/6349640-how-does-the-avalanche-bridge-work +const owners = [ +'bc1q2f0tczgrukdxjrhhadpft2fehzpcrwrz549u90', // https://prnt.sc/unrBvLvw3z1t +] + +module.exports = { + methodology: 'BTC wallets on bc1q2f0tczgrukdxjrhhadpft2fehzpcrwrz549u90', + bitcoin: { + tvl: sdk.util.sumChainTvls([ + sumTokensExport({ owners }), + ]), + }, +}; diff --git a/projects/balancer-cow-amm/index.js b/projects/balancer-cow-amm/index.js new file mode 100644 index 000000000000..35c72404d95a --- /dev/null +++ b/projects/balancer-cow-amm/index.js @@ -0,0 +1,19 @@ +const { v1Tvl } = require('../helper/balancer') +const sdk = require('@defillama/sdk') + +const config = { + ethereum: [ + ['0xf76c421bAb7df8548604E60deCCcE50477C10462', 20432455], + ['0x23fcC2166F991B8946D195de53745E1b804C91B7', 20391510], + ], + xdai: [ + ['0x703Bd8115E6F21a37BB5Df97f78614ca72Ad7624', 35259725], + ['0x7573B99BC09c11Dc0427fb9c6662bc603E008304', 35163914], + ], +} + +Object.keys(config).forEach(chain => { + module.exports[chain] = { + tvl: sdk.util.sumChainTvls(config[chain].map(c => v1Tvl(...c))) + } +}) \ No newline at end of file diff --git a/projects/balus/index.js b/projects/balus/index.js new file mode 100644 index 000000000000..c06b764c3953 --- /dev/null +++ b/projects/balus/index.js @@ -0,0 +1,14 @@ +const ADDRESSES = require("../helper/coreAssets.json") +const { sumTokensExport } = require("../helper/chain/ton") +const CONTRACT = "EQDswKn606G8kwS8RuUJg9baJbgAhixb6bYJC6VmIPU873uq" + +module.exports = { + methodology: "Counts all TON balance in the smart contract as the TVL", + timetravel: false, + ton: { + tvl: sumTokensExport({ + owners: [CONTRACT], + tokens: ADDRESSES.ton.TON, + }) + }, +}; diff --git a/projects/bella.js b/projects/bella.js index 55e063a1cbbf..7eaaa8ac2e59 100644 --- a/projects/bella.js +++ b/projects/bella.js @@ -1,48 +1,34 @@ -const sdk = require('@defillama/sdk') -const { sumTokens } = require('./helper/unwrapLPs') -const bVaultAbi = require('./config/bella/abis/bVault') +const { sumTokens2 } = require('./helper/unwrapLPs') const ADDRESSES = require('./helper/coreAssets.json'); -const { getPoolLiquidityAmount } = require('./config/bella/izi'); -const iziABI = require('./config/bella/abis/izi'); +const { getPoolLiquidityAmount } = require('./bella/izi'); +const iziABI = require('./bella/abis/izi'); const bVaults = { - bUsdt: { address: '0x2c23276107b45E64c8c59482f4a24f4f2E568ea6', }, - bUsdc: { address: '0x8016907D54eD8BCf5da100c4D0EB434C0185dC0E', }, - bArpa: { address: '0x750d30A8259E63eD72a075f5b6630f08ce7996d0', }, - bWbtc: { address: '0x3fb6b07d77dace1BA6B5f6Ab1d8668643d15a2CC', }, - bHbtc: { address: '0x8D9A39706d3B66446a298f1ae735730257Ec6108', }, - // bBusd: { address: '0x378388aa69f3032FA46150221210C7FA70A35153', }, // according to the team this is deprecated + bUsdt: '0x2c23276107b45E64c8c59482f4a24f4f2E568ea6', + bUsdc: '0x8016907D54eD8BCf5da100c4D0EB434C0185dC0E', + bArpa: '0x750d30A8259E63eD72a075f5b6630f08ce7996d0', + bWbtc: '0x3fb6b07d77dace1BA6B5f6Ab1d8668643d15a2CC', + bHbtc: '0x8D9A39706d3B66446a298f1ae735730257Ec6108', + // bBusd: '0x378388aa69f3032FA46150221210C7FA70A35153', // according to the team this is deprecated } -const uniswapV2Pools = { - belUsdt: { address: '0xf0d1109e723cb06e400e2e57d0b6c7c32bedf61a', owner: '0x6731a6a2586a0d555dcff7eb4d8fb7444bdfde2a' }, - belEth: { address: '0x9e98deac1a416c9ce3c892bd8eef586f1291ca35', owner: '0x994be2994471d5ef93c600cf78c2752c5e96f5a7' }, - arpaUsdt: { address: '0x9F624b25991b99D7b14d6740A9D581DD77980808', owner: '0xc935285b0d88069305431dace0c3c01d7e793d84' }, -} - -async function tvl(ts, block) { - const tokenCalls = Object.values(bVaults).map(a => ({ target: a.address })) - - const { output: tokenResponse } = await sdk.api.abi.multiCall({ - block, calls: tokenCalls, abi: bVaultAbi.token - }) +const uniswapV2Pools = [ + ['0xf0d1109e723cb06e400e2e57d0b6c7c32bedf61a','0x6731a6a2586a0d555dcff7eb4d8fb7444bdfde2a'], // belUsdt + ['0x9e98deac1a416c9ce3c892bd8eef586f1291ca35','0x994be2994471d5ef93c600cf78c2752c5e96f5a7'], // belEth + ['0x9F624b25991b99D7b14d6740A9D581DD77980808','0xc935285b0d88069305431dace0c3c01d7e793d84'], // arpaUsdt +] - const { output: underlyingBalances } = await sdk.api.abi.multiCall({ - block, calls: tokenCalls, abi: bVaultAbi.underlyingBalance - }) +async function tvl(api) { + const tokens = Object.values(bVaults) + const utokens = await api.multiCall({ calls: tokens, abi: 'address:token'}) + const bals = await api.multiCall({ calls: tokens, abi: "uint256:underlyingBalance"}) + api.add(utokens, bals) - const balances = {} - tokenResponse.forEach(({ input, output }, i) => { - sdk.util.sumSingleBalance(balances, output, underlyingBalances[i].output || 0) - }) - return balances } -async function pool2(ts, block) { - const toa = [] - Object.values(uniswapV2Pools).forEach(({ address, owner }) => toa.push([address, owner])) - return sumTokens({}, toa, block,) +async function pool2(api) { + return sumTokens2({ api, tokensAndOwners: uniswapV2Pools, resolveLP: true, }) } module.exports = { @@ -50,15 +36,15 @@ module.exports = { tvl, pool2, }, - manta: { + manta: { pool2: async (api) => { const STONE = '0xEc901DA9c68E90798BbBb74c11406A32A70652C3' const WUSDM = '0xbdAd407F77f44F7Da6684B416b1951ECa461FB07' const IZI = '0x91647632245cabf3d66121f86c387ae0ad295f9a' const miningContract = '0x2C9bFcA337bAc7cBdA3B80D1b2d10ed6482D7C0f' const MiningABI = iziABI.mantaMiningABI; - const {totalTokenX_, totalTokenY_, totalNIZI_} = await api.call({ - abi: MiningABI, + const { totalTokenX_, totalTokenY_, totalNIZI_ } = await api.call({ + abi: MiningABI, target: miningContract, chain: 'manta', }); @@ -121,10 +107,9 @@ module.exports = { const infoABI = "function getMiningContractInfo() external view returns (address tokenX, address tokenY, uint24 fee_, address iziTokenAddr, uint256 lastTouchTime_, uint256 totalVLiquidity_, uint256 bal0, uint256 bal1, uint256 balIzi, uint256 startTime_, uint256 endTime_)" const data = await api.multiCall({ abi: infoABI, calls: pool2s }) - const transform = i => i.toLowerCase() === '0xb83cfb285fc8d936e8647fa9b1cc641dbaae92d9' ? 'ethereum:0xa91ac63d040deb1b7a5e4d4134ad23eb0ba07e14': 'era:'+i for (const { tokenX, tokenY, iziTokenAddr, bal0, bal1, balIzi } of data) { - api.add(transform(tokenX), bal0, { skipChain: true}) - api.add(transform(tokenY), bal1, { skipChain: true}) + api.add(tokenX, bal0) + api.add(tokenY, bal1) api.add(iziTokenAddr, balIzi) } }, diff --git a/projects/config/bella/abis/bVault.js b/projects/bella/abis/bVault.js similarity index 100% rename from projects/config/bella/abis/bVault.js rename to projects/bella/abis/bVault.js diff --git a/projects/config/bella/abis/izi.js b/projects/bella/abis/izi.js similarity index 100% rename from projects/config/bella/abis/izi.js rename to projects/bella/abis/izi.js diff --git a/projects/config/bella/izi.js b/projects/bella/izi.js similarity index 100% rename from projects/config/bella/izi.js rename to projects/bella/izi.js diff --git a/projects/config/bella/util.js b/projects/bella/util.js similarity index 100% rename from projects/config/bella/util.js rename to projects/bella/util.js diff --git a/projects/beta-finance-v2/index.js b/projects/beta-finance-v2/index.js index b4578abb80cd..910972b10ca6 100644 --- a/projects/beta-finance-v2/index.js +++ b/projects/beta-finance-v2/index.js @@ -4,6 +4,8 @@ const { getUniqueAddresses } = require('../helper/tokenMapping'); const config = { ethereum: { bank: '0x1150d370C61cdd5d6F81c68783678382b447B07D', fromBlock: 18569809, }, + bsc: { bank: '0x5F579336b1959a4a51782B61ce8E877fF6171A6C', fromBlock: 34515370, }, + arbitrum: { bank: '0xAcF4dC6043043324b84aFE77e00678607F9e70fF', fromBlock: 223761172, }, } const abis = { diff --git a/projects/bifi/index.js b/projects/bifi/index.js index c22a620cfbeb..c5a0511bf930 100644 --- a/projects/bifi/index.js +++ b/projects/bifi/index.js @@ -51,7 +51,7 @@ const chainPools = { UnifiedDAI: { pool: '0x2168dAb12A6A93181bbAD9C9dc769307C36fB45C', token: ADDRESSES.bfc.UnifiedDAI }, UnifiedWBTC: { pool: '0xEa3b4a2dA5DbE8379AD4c60aaD5184df69D7C9AD', token: ADDRESSES.bfc.WBTC}, UnifiedBTCB: { pool: '0x0B31FeE8bF53bFe2f5F7083B73A4c9C8B517E32F', token: ADDRESSES.bfc.BTCB}, - BitcoinUSD: { pool: '0xcF2FC1d354018A39D5Ef036aA865Ad8cbF7B611E', token: '0x6906Ccda405926FC3f04240187dd4fAd5DF6d555' } + BitcoinUSD: { pool: '0xcF2FC1d354018A39D5Ef036aA865Ad8cbF7B611E', token: ADDRESSES.bfc.BitcoinUSD } }, } diff --git a/projects/bitdrome/index.js b/projects/bitdrome/index.js new file mode 100644 index 000000000000..a8e4e946a5b7 --- /dev/null +++ b/projects/bitdrome/index.js @@ -0,0 +1,13 @@ +async function tvl(api) { + const TwoPoolFactory = '0x634FB7F07BDb77281c64a57F69E1EB19583E727a' + const pools = await api.fetchList({ lengthAbi: 'pool_count', itemAbi: 'pool_list', target: TwoPoolFactory }) + const tokens = await api.multiCall({ target: TwoPoolFactory, calls: pools, abi: 'function get_coins(address _pool) view returns (address[2])' }) + const ownerTokens = tokens.map((v, i) => [v, pools[i]]) + return api.sumTokens({ ownerTokens }) +} + +module.exports = { + bevm: { + tvl + } +} \ No newline at end of file diff --git a/projects/bitstamp/index.js b/projects/bitstamp/index.js index 387dd88bda36..71f427b32761 100644 --- a/projects/bitstamp/index.js +++ b/projects/bitstamp/index.js @@ -286,6 +286,7 @@ const config = { "452b94b0072819f60c0d757f6927155f12d6376409b0e6eac42d04946cd4c6eb", ], }, + /* stellar: { owners: [ 'GCMDM2J4UH3CY5CUVNAKN3ALJ6VW7QVOV5WYBNC6XSJ4JCFTYPRLWG4C', @@ -300,6 +301,7 @@ const config = { 'GDFHYZ7VDCVWKSMYAQH5XUO6CQQFFD5PQD6BEPVARNGNK5WLCNSECNFG' ], }, + */ algorand: { owners: [ 'QLMX7FEKGZIKACSIH7FIFV3BNHXP77YZ5PTLTN5TKWWXBKL6HD6MO44FFQ', diff --git a/projects/blasterswap-vaults/index.js b/projects/blasterswap-vaults/index.js index 8bde49169e06..80d01bcd8ee4 100644 --- a/projects/blasterswap-vaults/index.js +++ b/projects/blasterswap-vaults/index.js @@ -1,3 +1,4 @@ +const ADDRESSES = require('../helper/coreAssets.json') const { staking } = require("../helper/staking.js"); const vaults = ['0xC52fb7E613e401a0195C2fdB369618580D58C91D', '0x013249266842e078999088807033D80531A84260']; @@ -5,7 +6,7 @@ const tokens = ['0xd43D8aDAC6A4C7d9Aeece7c3151FcA8f23752cf8', '0x5ffd9EbD27f2fcA module.exports = { blast: { - tvl: staking('0x0464a36beCf9967111D2dCAb57CAf4a2376f6E3F', '0xb1a5700fa2358173fe465e6ea4ff52e36e88e2ad'), + tvl: staking('0x0464a36beCf9967111D2dCAb57CAf4a2376f6E3F', ADDRESSES.blast.BLAST), staking: staking(vaults, tokens) }, } diff --git a/projects/blend-finance/index.js b/projects/blend-finance/index.js new file mode 100644 index 000000000000..0119682aa18b --- /dev/null +++ b/projects/blend-finance/index.js @@ -0,0 +1,12 @@ + +const { aaveExports } = require('../helper/aave') +const methodologies = require('../helper/methodologies') + +module.exports = { + methodology: methodologies.lendingMarket, + bevm: aaveExports('bevm', '0x26fb0b1eef8822f8F71a385d2839b6a654cA186a', undefined, ['0x3Eb2Dd6c395B8E6E3ab843858480aC60e9D0f3Bc'], { + v3: true, abis: { + getAllATokens: "function getAllBTokens() view returns (tuple(string symbol, address tokenAddress)[])", + } + }), +} \ No newline at end of file diff --git a/projects/blindex/index.js b/projects/blindex/index.js index 05b6979a8b3e..5349e7138ee0 100644 --- a/projects/blindex/index.js +++ b/projects/blindex/index.js @@ -1,5 +1,12 @@ const sdk = require("@defillama/sdk"); -const abi = require("../helper/abis/blindex.json"); +const abi = { + "bdstable_pools_array": "function bdstable_pools_array(uint256) view returns (address)", + "getBdStablesPoolsLength": "uint256:getBdStablesPoolsLength", + "getBDStablePoolCollateral": "address:collateral_token", + "getBDStable": "function bdstables(uint256) view returns (address)", + "getBdStablesLength": "uint256:getBdStablesLength", + "getBDXPriceUsdD12": "uint256:BDX_price_d12" +} const { getUniTVL, } = require("../helper/unknownTokens"); const chains = { diff --git a/projects/blockng/index.js b/projects/blockng/index.js index 376ce4cc57cb..73e8bc69c01a 100644 --- a/projects/blockng/index.js +++ b/projects/blockng/index.js @@ -2,7 +2,10 @@ const ADDRESSES = require('../helper/coreAssets.json') const { sumUnknownTokens, getUniTVL, sumTokensExport } = require('../helper/unknownTokens'); const { staking, } = require('../helper/staking') const sdk = require('@defillama/sdk') -const blockng = require('../helper/abis/blockng.json'); +const blockng = { + "getPoolInfo": "function getPoolInfo(address, address, uint256, uint256) view returns (tuple(address lpTokenAddress, address subTokenAddress, string subTokenSymbol, address dexFactory, address gaugeAddress, uint256 gaugeTotalSupply, uint256 lpPrice, uint256 gaugeAPR, address bribeAddress, int256 weights, uint256 punkId)[] beams)", + "numberOfPool": "function numberOfPool(address voter) view returns (uint256 len)" +} const chain = 'smartbch' const WBCH = ADDRESSES.smartbch.WBCH diff --git a/projects/bob-gateway/index.js b/projects/bob-gateway/index.js new file mode 100644 index 000000000000..3e9ec079e13a --- /dev/null +++ b/projects/bob-gateway/index.js @@ -0,0 +1,26 @@ +const ADDRESSES = require('../helper/coreAssets.json') +const { sumTokens2 } = require("../helper/unwrapLPs"); + +module.exports = { + bob: { + tvl: (api) => + sumTokens2({ + api, + chain: "bob", + tokens: [ + ADDRESSES.bob.WBTC, + ADDRESSES.bob.TBTC, + ], + owners: [ + // taken from onramp factory (allOnramps): https://explorer.gobob.xyz/address/0x1831d29376eb94bba3ca855af7984db923768b27?tab=read_contract + "0x587e6E2b280C70ec811a371671D3CBE9D7b9F691", + "0xA1884124a52331Bc2fa66e2b0EFa15856C6830c6", + "0x2e0A1Fa2f61985c475B869559cF2Cf733d4DB282", + "0xCA94d277d04e8e6ce960F7492b2df62e2215d562", + "0x9BBBc8F4e4258cC9Ec79164DDB7ef72954f381E2", + "0x47340424457463Fa77B59FDAdea31cA886a241FD", + ], + }), + } +}; + diff --git a/projects/bracket-fi/index.js b/projects/bracket-fi/index.js index ea9e7f0d6a9f..9581a2b6cc94 100644 --- a/projects/bracket-fi/index.js +++ b/projects/bracket-fi/index.js @@ -21,7 +21,7 @@ const config = { "0xEC70Dcb4A1EFa46b8F2D97C310C9c4790ba5ffA8", "0x35751007a407ca6FEFfE80b3cB397736D2cf4dbe", "0x4186BFC76E2E237523CBC30FD220FE055156b41F", - "0x2416092f143378750bb29b79eD961ab195CcEea5" + ADDRESSES.blast.ezETH ] }, } diff --git a/projects/bridgers-ai/index.js b/projects/bridgers-ai/index.js index c5e4cb897bb1..4d6ddf8a6720 100644 --- a/projects/bridgers-ai/index.js +++ b/projects/bridgers-ai/index.js @@ -137,7 +137,7 @@ const tokensConf = { TON: ADDRESSES.ton.TON, USDT: ADDRESSES.ton.USDT, USDC: ADDRESSES.ton.USDC, - NOT: 'EQAvlWFDxGF2lXm67y4yzC17wYKD9A0guwPkMs1gOsM__NOT', + NOT: ADDRESSES.ton.NOT, }, era: { ETH: nullAddress, diff --git a/projects/bsquared/index.js b/projects/bsquared/index.js index d6bbe79545d2..3057e6cf2246 100644 --- a/projects/bsquared/index.js +++ b/projects/bsquared/index.js @@ -14,9 +14,15 @@ const BTCOwners = [ "14UwPgMLZY6rLZRDxxvmNWQ9rMkg2iraHG", "bc1quetqhxs809mwgms0rhae4cw98chzqe0er8fryr", "34ThPcBtz5ayRybbg1MXnQWBGtUzqUDCMa", - "3LmiF7qBJt8BteQi4eJdqa2TXLHBHVjE9L", - "32pdcULaBMkd5o7gvJeoaamPuCFMeqwpDh" + "bc1q082azm83lgpln7puvn4egc9dumlaqfqkqmsght", + "bc1qxxgxywxcq0q405849fyrlxa2zu4nxukf4ytg57", + "3LcCJLivWmaomMyhnyt4pqg8iWi2ECU92T", + "bc1qe4xx7eg5c4qjq8838zv05f7uzfmyyyftdpy48t", + "3GPVsXtvbfFNRYbLwJowaL7EXo8hqakfkv", + "bc1q8axfvwqa0fqds5w6vva9g5kej9e4mp4ap3dmff", + "19M7Z1E8Bs4pkXmHJrrJtngmVMUmgFu4K2" ]; + const BRC20Owners = [ "bc1q97ctqygjgj0ljxgge4q735ujxvlad8smass7f0axc6x3ggffr8xqwn69hc", //Bitcoin Multisig Addresses ]; diff --git a/projects/burve-protocol/index.js b/projects/burve-protocol/index.js index 7f2fc8dabf46..53d9ae554d50 100644 --- a/projects/burve-protocol/index.js +++ b/projects/burve-protocol/index.js @@ -2,11 +2,12 @@ const { getLogs2 } = require('../helper/cache/getLogs') const config = { bsc: { fromBlock: 35953570 }, arbitrum: { fromBlock: 184614246 }, + base: { fromBlock: 15653766 }, } module.exports = { start: 1707300000, - methodology: "BurveProtocol TVL including total values of assets locked in the tokens which is deployed by BurveProtocol", + methodology: "The TVL including total values of assets locked in the tokens which are deployed by BurveProtocol", } Object.keys(config).forEach(chain => { diff --git a/projects/buzz-farming/index.js b/projects/buzz-farming/index.js index 158f1ddda7db..0c8950c9e5cb 100644 --- a/projects/buzz-farming/index.js +++ b/projects/buzz-farming/index.js @@ -1,15 +1,15 @@ const {sumTokensExport} = require('../helper/sumTokens'); const ADDRESSES = require('../helper/coreAssets.json') -const ADDRESSES_BSQUARED_BSTONE = '0x7537C1F80c9E157ED7AFD93a494be3e1f04f1462'; -const ADDRESSES_BSQUARED_FDUSD = '0xC2Fe4f673455Ef92299770a09CDB5E8756A525D5'; -const ADDRESSES_BSQUARED_MATIC = '0xc3ee2Df14B1Bc526c24ED802f1873d49664a0d5c'; -const ADDRESSES_BSQUARED_ORDI = '0xa0f4470B714677AEEcE0d20074c540b3Cf6a477E'; -const ADDRESSES_BSQUARED_SATS = '0x7eBFcE05E418C380a2b6EB0F65995cA04ef4bc00'; +const ADDRESSES_BSQUARED_BSTONE = ADDRESSES.bsquared.BSTONE; +const ADDRESSES_BSQUARED_FDUSD = ADDRESSES.bsquared.FDUSD; +const ADDRESSES_BSQUARED_MATIC = ADDRESSES.bsquared.MATIC; +const ADDRESSES_BSQUARED_ORDI = ADDRESSES.bsquared.ORDI; +const ADDRESSES_BSQUARED_SATS = ADDRESSES.bsquared.SATS; const ADDRESSES_BSQUARED_FBTC = '0x5d247f32b792a61f7b4078cf7752a878aff152e2'; -const ADDRESSES_BSQUARED_UBTC = '0x796e4d53067ff374b89b2ac101ce0c1f72ccaac2'; +const ADDRESSES_BSQUARED_UBTC = ADDRESSES.bsquared.UBTC; const ADDRESSES_BSQUARED_USDA = '0x46fecc5bef70615ee3bfdbd2b278944368b78cf5'; -const ADDRESSES_BSQUARED_ETH = '0xd48d3a551757ac47655fce25bde1b0b6b1cb2a5a'; +const ADDRESSES_BSQUARED_ETH = ADDRESSES.bsquared.ETH; const tokenList = [ADDRESSES.null, ADDRESSES.bsquared.USDT, ADDRESSES.bsquared.USDC, ADDRESSES.bsquared.WBTC, ADDRESSES_BSQUARED_BSTONE, ADDRESSES_BSQUARED_FDUSD, ADDRESSES_BSQUARED_MATIC, ADDRESSES_BSQUARED_ORDI, ADDRESSES_BSQUARED_SATS, ADDRESSES_BSQUARED_FBTC, ADDRESSES_BSQUARED_UBTC, ADDRESSES_BSQUARED_USDA, ADDRESSES_BSQUARED_ETH,]; diff --git a/projects/carbondefi/index.js b/projects/carbondefi/index.js index 36f28828d07d..8fd3768e9430 100644 --- a/projects/carbondefi/index.js +++ b/projects/carbondefi/index.js @@ -1,3 +1,4 @@ +const ADDRESSES = require('../helper/coreAssets.json') const { sumTokens2 } = require("../helper/unwrapLPs"); const config = { @@ -12,7 +13,7 @@ const config = { celo: { fromBlock: 26828280, controller: "0x6619871118D144c1c28eC3b23036FC1f0829ed3a", - gasToken: "0x471EcE3750Da237f93B8E339c536989b8978a438", + gasToken: ADDRESSES.celo.CELO, }, }; diff --git a/projects/celerbridge/index.js b/projects/celerbridge/index.js index 448459932383..1d10495e01b7 100644 --- a/projects/celerbridge/index.js +++ b/projects/celerbridge/index.js @@ -376,7 +376,7 @@ const liquidityBridgeTokens = [ }, { // FXS - ethereum: "0x3432B6A60D23Ca0dFCa7761B7ab56459D9C964D0", + ethereum: ADDRESSES.ethereum.FXS, }, { // MAI diff --git a/projects/chiliz-governance-staking/index.js b/projects/chiliz-governance-staking/index.js index 02b95529187e..72f3cb4aef44 100644 --- a/projects/chiliz-governance-staking/index.js +++ b/projects/chiliz-governance-staking/index.js @@ -1,5 +1,6 @@ +const ADDRESSES = require('../helper/coreAssets.json') const { sumTokensExport, nullAddress } = require("../helper/unwrapLPs"); -const STAKING_CONTRACT = '0x0000000000000000000000000000000000001000'; +const STAKING_CONTRACT = ADDRESSES.findora.FRA; module.exports = { methodology: 'Total CHZ Locked in Staking System Contract.', diff --git a/projects/concentrator/index.js b/projects/concentrator/index.js index 343424b532be..1a89013741f8 100644 --- a/projects/concentrator/index.js +++ b/projects/concentrator/index.js @@ -23,7 +23,7 @@ const arUSDAddress = "0x549716F858aefF9CB845d4C78c67A7599B0Df240"; const arUSD4626Address = "0x07D1718fF05a8C53C8F05aDAEd57C0d672945f9a"; const rUSDAddress = "0x65D72AA8DA931F047169112fcf34f52DbaAE7D18"; const aFXNAddress = "0x00Bac667a4cCf9089aB1Db978238C555C4349545"; -const fxnAddress = "0x365AccFCa291e7D3914637ABf1F7635dB165Bb09"; +const fxnAddress = ADDRESSES.ethereum.FXN; const concentratorNewVault = "0x3Cf54F3A1969be9916DAD548f3C084331C4450b5"; const concentratorAfxsVault = "0xD6E3BB7b1D6Fa75A71d48CFB10096d59ABbf99E1"; diff --git a/projects/config/cover/cover.js b/projects/config/cover/cover.js deleted file mode 100644 index 06f0adefe8e9..000000000000 --- a/projects/config/cover/cover.js +++ /dev/null @@ -1,14 +0,0 @@ -let abis = {}; - -abis.cover = { - getProtocolDetails: "function getProtocolDetails() view returns (bytes32 _name, bool _active, uint256 _claimNonce, uint256 _claimRedeemDelay, uint256 _noclaimRedeemDelay, address[] _collaterals, uint48[] _expirationTimestamps, address[] _allCovers, address[] _allActiveCovers)", -} - -abis.protocols = { - getAllProtocolAddresses: "address[]:getAllProtocolAddresses", -} - -module.exports = { - abis -} - diff --git a/projects/config/defisaver/abis.js b/projects/config/defisaver/abis.js deleted file mode 100644 index 3415032db2d6..000000000000 --- a/projects/config/defisaver/abis.js +++ /dev/null @@ -1,70 +0,0 @@ -module.exports = { - "CompoundSubscriptions": { - "abi": { - getSubscribers: "function getSubscribers() view returns (tuple(address user, uint128 minRatio, uint128 maxRatio, uint128 optimalRatioBoost, uint128 optimalRatioRepay, bool boostEnabled)[])", - }, - "networks": { - "1": { - "createdBlock": 8335635, - "address": "0x52015effd577e08f498a0ccc11905925d58d6207" - } - } - }, - "CompoundLoanInfo": { - "abi": { - getLoanDataArr: "function getLoanDataArr(address[] _users) view returns (tuple(address user, uint128 ratio, address[] collAddr, address[] borrowAddr, uint256[] collAmounts, uint256[] borrowAmounts)[] loans)", - }, - "networks": { - "1": { - "createdBlock": 8335635, - "address": "0xb1f40b5109bba75c27a302c4e5d2afc30d5d1f30" - } - } - }, - "McdSubscriptions": { - "abi":{ - getSubscribers: "function getSubscribers() view returns (tuple(uint128 minRatio, uint128 maxRatio, uint128 optimalRatioBoost, uint128 optimalRatioRepay, address owner, uint256 cdpId, bool boostEnabled, bool nextPriceEnabled)[])", - }, - "networks": { - "1": { - "createdBlock": 8335635, - "address": "0xC45d4f6B6bf41b6EdAA58B01c4298B8d9078269a" - } - } - }, - "MCDSaverProxy": { - "abi": { - getCdpDetailedInfo: "function getCdpDetailedInfo(uint256 _cdpId) view returns (uint256 collateral, uint256 debt, uint256 price, bytes32 ilk)", - }, - "networks": { - "42": { - "createdBlock": 14500373, - "address": "0xDbfdfDBcA9f796Bf955B8B4EB2b46dBb51CaE30B" - }, - "1": { - "createdBlock": 8928152, - "address": "0x260C1543743FD03cD98a1d1eDC3A4724af0A1Fce" - } - } - }, - "AaveSubscriptionsV2": { - "abi": { - getSubscribers: "function getSubscribers() view returns (tuple(address user, uint128 minRatio, uint128 maxRatio, uint128 optimalRatioBoost, uint128 optimalRatioRepay, bool boostEnabled)[])", - }, - "networks": { - "1": { - "address": "0x6B25043BF08182d8e86056C6548847aF607cd7CD" - } - } - }, - "AaveLoanInfoV2": { - "abi": { - getLoanDataArr: "function getLoanDataArr(address _market, address[] _users) view returns (tuple(address user, uint128 ratio, address[] collAddr, address[] borrowAddr, uint256[] collAmounts, uint256[] borrowStableAmounts, uint256[] borrowVariableAmounts)[] loans)", - }, - "networks": { - "1": { - "address": "0xd0C9ADDABbA270493A6503e74E62794435c8F1D3" - } - } - }, -} diff --git a/projects/config/hakka/abi.json b/projects/config/hakka/abi.json deleted file mode 100644 index d68cc38951d5..000000000000 --- a/projects/config/hakka/abi.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "balanceOf": "function balanceOf(address account) view returns (uint256)", - "totalSupply": "uint256:totalSupply", - "pancakeUserInfo": "function userInfo(uint256, address) view returns (uint256 amount, uint256 rewardDebt)", - "alpacaUserInfo": "function userInfo(uint256, address) view returns (uint256 amount, uint256 rewardDebt, uint256 bonusDebt, address fundedBy)", - "beltUserInfo": "function userInfo(uint256, address) view returns (uint256 shares, uint256 rewardDebt)" -} \ No newline at end of file diff --git a/projects/config/hodltree/addresses.js b/projects/config/hodltree/addresses.js deleted file mode 100644 index f366254dfaff..000000000000 --- a/projects/config/hodltree/addresses.js +++ /dev/null @@ -1,158 +0,0 @@ -const ADDRESSES = require('../../helper/coreAssets.json') -const { - dexType, - flashloan, - lendBorrow, - em -} = require('./types.js'); - -/** - * @typedef {Object} ContractDef - * @property {String} contractType - * @property {String} address - * @property {Object} miscInfo - */ - -/** - * @typedef {Object} Dex - * @property {String} dexType - * @property {ContractDef[]} contracts - */ - -/** - * @typedef {Dex[]} NetworkDex - */ - -/** - * @type {NetworkDex} - */ -const eth = [ - { - dexType: dexType.lendBorrow, - contracts: [{ - contractType: lendBorrow.lender, - address: '0xb3e1912fa5d9d219da8c65cda407cc998849428b', - miscInfo: { - tokenIn: ADDRESSES.ethereum.WETH - } - }, { - contractType: lendBorrow.borrower, - address: '0x8ac9425260b6da02db07da7980b09525ebf3b6a0', - miscInfo: { - tokenIn: '0xBcca60bB61934080951369a648Fb03DF4F96263C' - } - }, { - contractType: lendBorrow.borrower, - address: '0x45d5a790da3bfa305efca81eac652678ae3a90a6', - miscInfo: { - tokenIn: '0x028171bCA77440897B824Ca71D1c56caC55b68A3' - } - }] - }, - { - dexType: dexType.flashloan, - contracts: [{ - contractType: flashloan.lp, - address: '0x2e5a08c26cb22109e585784c4f99363bb3e199ab', - miscInfo: { - tokensIn: [ - ADDRESSES.ethereum.sUSD, - '0x056Fd409E1d7A124BD7017459dFEa2F387b6d5Cd', - ADDRESSES.ethereum.USDC, - ADDRESSES.ethereum.DAI, - ADDRESSES.ethereum.TUSD - ] - } - }] - }, - { - dexType: dexType.em, - contracts: [{ - contractType: em.ep, - address: '0x95142849d31eaa20b5b9ab746dff27ff400ce6bf', - miscInfo: { - token: '0x28e598846febb750effc384853fbce82988eaaa2' - } - }, { - contractType: em.rp, - address: '0xce596bf99d21e46fa91143c03d7a356682b67859', - miscInfo: { - token: ADDRESSES.ethereum.sUSD - } - }, { - contractType: em.vps, - address: '0xb7ead8c418f3d03bc22dd538c22600abe7209e72', - miscInfo: { - token: ADDRESSES.ethereum.sUSD - } - }, - - { - contractType: em.ep, - address: '0x78E52d69fA8e0F036fFEF0BcDc4C289DB0DF63E2', - miscInfo: { - token: '0xba100000625a3754423978a60c9317c58a424e3D' - } - }, { - contractType: em.rp, - address: '0x87B46E49681E08E3adDF8A90F6a1fb5183079033', - miscInfo: { - token: ADDRESSES.ethereum.USDC - } - }, { - contractType: em.vps, - address: '0xcB72e764Ab46535aAD13cbF55b1F06cB15347A95', - miscInfo: { - token: ADDRESSES.ethereum.USDC - } - }] - } -] - -/** - * @type {NetworkDex} - */ -const polygon = [ - { - dexType: dexType.lendBorrow, - contracts: [{ - contractType: lendBorrow.lender, - address: '0x2F35d311fd2F0b0dA65FA268B86831279FB4fd98', - miscInfo: { - tokenIn: ADDRESSES.polygon.WMATIC_2 - } - }, { - contractType: lendBorrow.borrower, - address: '0xbfb5215aD157Cd6C8B22494dC54Ff4B74bA18C09', - miscInfo: { - tokenIn: '0x1a13f4ca1d028320a707d99520abfefca3998b7f' - } - }, { - contractType: lendBorrow.borrower, - address: '0x0Cf91744D15684b91E6705e56f6dC820647B3067', - miscInfo: { - tokenIn: '0x27f8d03b3a2196956ed754badc28d73be8830a6e' - } - }] - }, - { - dexType: dexType.flashloan, - contracts: [{ - contractType: flashloan.lp, - address: '0xCAFDa65B1031535F1766C6b1E3b5efF5520c7C0f', - miscInfo: { - tokensIn: [ - ADDRESSES.polygon.USDC, - ADDRESSES.polygon.DAI, - ADDRESSES.polygon.USDT - ] - } - }] - } -] - - -module.exports = { - eth, - polygon -} \ No newline at end of file diff --git a/projects/config/hodltree/index.js b/projects/config/hodltree/index.js deleted file mode 100644 index b5f9eb53e714..000000000000 --- a/projects/config/hodltree/index.js +++ /dev/null @@ -1,8 +0,0 @@ -const { eth, polygon } = require("./addresses"); -const dexTypes = require('./types'); - -module.exports = { - ethContracts: eth, - polygonContracts: polygon, - dexTypes -} \ No newline at end of file diff --git a/projects/config/hodltree/types.js b/projects/config/hodltree/types.js deleted file mode 100644 index b31869e5f1c4..000000000000 --- a/projects/config/hodltree/types.js +++ /dev/null @@ -1,28 +0,0 @@ -const dexType = { - lendBorrow: 'lendBorrow', - flashloan: 'flashloan', - em: 'em' -} - -const lendBorrow = { - lender: 'lender', - borrower: 'borrower' -} - -const flashloan = { - lp: 'liquidityPool' -} - -const em = { - ep: 'elasticPool', - vp: 'volatilePool', - vps: 'volatilePoolStorage', - rp: 'reservePool' -} - -module.exports = { - dexType, - lendBorrow, - flashloan, - em -} \ No newline at end of file diff --git a/projects/config/keys.js b/projects/config/keys.js deleted file mode 100644 index 9d5be2d3bd2d..000000000000 --- a/projects/config/keys.js +++ /dev/null @@ -1,61 +0,0 @@ -const ADDRESSES = require('../helper/coreAssets.json') -let keys = - { - - [ADDRESSES.ethereum.LINK]: 'chainlink', - [ADDRESSES.ethereum.WBTC]: 'bitcoin', - [ADDRESSES.ethereum.AAVE]: 'aave', - [ADDRESSES.ethereum.USDC]: 'stable', - [ADDRESSES.ethereum.TUSD]: 'stable', - [ADDRESSES.ethereum.YFI]: 'yearn-finance', - '0x408e41876cccdc0f92210600ef50372656052a38': 'republic-protocol', //ren - '0x80fB784B7eD66730e8b1DBd9820aFD29931aab03': 'ethlend', //lend - [ADDRESSES.ethereum.BUSD]: 'stable', - [ADDRESSES.ethereum.USDT]: 'stable', - [ADDRESSES.ethereum.DAI]: 'stable', - [ADDRESSES.ethereum.MKR]: 'maker', - [ADDRESSES.ethereum.SNX]: 'havven', - '0x0f5d2fb29fb7d3cfee444a200298f468908cc942': 'decentraland', //MANA - [ADDRESSES.ethereum.UNI]: 'uniswap', - '0xdd974d5c2e2928dea5f71b9825b8b646686bd200': 'kyber-network', //knc - '0xf629cbd94d3791c9250152bd8dfbdf380e2a3b9c': 'enjincoin', //ENJ - [ADDRESSES.ethereum.BAT]: 'basic-attention-token', - [ADDRESSES.ethereum.sUSD]: 'stable', - '0xe41d2489571d322189246dafa5ebde1f4699f498': '0x', //0x - [ADDRESSES.ethereum.CRV]: 'curve-dao-token', - '0xc00e94cb662c3520282e6f5717214004a7f26888': 'compound-governance-token', - '0x04fa0d235c4abf4bcf4787af4cf447de572ef828': 'uma', - '0xd26114cd6ee289accf82350c8d8487fedb8a0c07': 'omisego', - [ADDRESSES.ethereum.SAI]: 'sai', - [ADDRESSES.ethereum.WETH]: 'ethereum', - '0x5d3a536e4d6dbd6114cc1ead35777bab948e3643': 'cdai', - '0xbc396689893d065f41bc2c6ecbee5e0085233447': 'perpetual-protocol', - '0x92e187a03b6cd19cb6af293ba17f2745fd2357d5': 'unit-protocol-duck', - '0x2ba592f78db6436527729929aaf6c908497cb200': 'cream', - '0x0ae055097c6d159879521c384f1d2123d1f195e6': 'xdai-stake', - '0x1ceb5cb57c4d4e2b2433641b95dd330a33185a44': 'keep3rv1', - [ADDRESSES.ethereum.FTM]: 'fantom', - [ADDRESSES.ethereum.SUSHI]: 'sushi', - '0x4688a8b1f292fdab17e9a90c8bc379dc1dbd8713': 'cover-protocol', - '0x3472a5a71965499acd81997a54bba8d852c6e53d': 'badger-dao', - '0xa3bed4e1c75d00fa6f4e5e6922db7261b5e9acd2': 'meta', - '0xca1207647ff814039530d7d35df0e1dd2e91fa84': 'dhedge-dao', - '0x1b40183efb4dd766f11bda7a7c3ad8982e998421': 'vesper-finance', - '0x5f64ab1544d28732f0a24f4713c2c8ec0da089f0': 'dextf', - '0x903bef1736cddf2a537176cf3c64579c3867a881': 'ichi-farm', - '0xaac41ec512808d64625576eddd580e7ea40ef8b2': 'gameswap-org', - '0x7240ac91f01233baaf8b064248e80feaa5912ba3': 'octofi', - '0x8798249c2e607446efb7ad49ec89dd1865ff4272': 'xsushi', - '0xb753428af26e81097e7fd17f40c88aaa3e04902c': 'saffron-finance', - '0xc944e90c64b2c07662a292be6244bdf05cda44a7': 'the-graph', - '0xc5bddf9843308380375a611c18b50fb9341f502a': 'vecrv-dao-yvault', - '0x1337def16f9b486faed0293eb623dc8395dfe46a': 'armor', - '0xd291e7a03283640fdc51b121ac401383a46cc623': 'rari-governance-token', - '0xeb4c2781e4eba804ce9a9803c67d0893436bb27d': 'bitcoin', //renbtc - '0xe1406825186D63980fd6e2eC61888f7B91C4bAe4': 'strudel-finance', // vBTC - } - - -module.exports = { - keys -} diff --git a/projects/config/mantra-dao/contracts/lp-staking-contracts.js b/projects/config/mantra-dao/contracts/lp-staking-contracts.js deleted file mode 100644 index 9b9e96e592af..000000000000 --- a/projects/config/mantra-dao/contracts/lp-staking-contracts.js +++ /dev/null @@ -1,197 +0,0 @@ -const ADDRESSES = require('../../../helper/coreAssets.json') -const lpStakingAssetsETH = [ - // LABS-ETH UNI LP simple staking - { - contract: "0x5f81a986611C600a3656d9adc202283186C6121D", - pairAddress: "0x2d9fd51e896ff0352cb6d697d13d04c2cb85ca83", - token1: "0x2D9FD51E896Ff0352Cb6D697D13D04C2CB85CA83", - price1: "labs-group", - token2: ADDRESSES.ethereum.WETH, - price2: "weth", - }, - // LABS-ETH UNI LP staking with exit tollbooth - { - contract: "0xfc8e3b55897d8cef791451bbe69b204b9c58fc8a", - pairAddress: "0x2d9fd51e896ff0352cb6d697d13d04c2cb85ca83", - token1: "0x2D9FD51E896Ff0352Cb6D697D13D04C2CB85CA83", - price1: "labs-group", - token2: ADDRESSES.ethereum.WETH, - price2: "weth", - }, - // MANTRA DAO OM-ETH LP staking - { - contract: "0x91fe14df53eae3a87e310ec6edcdd2d775e1a23f", - pairAddress: "0xe46935ae80e05cdebd4a4008b6ccaa36d2845370", - token1: "0x3593D125a4f7849a1B059E64F4517A86Dd60c95d", - price1: "mantra-dao", - token2: ADDRESSES.ethereum.WETH, - price2: "weth", - }, - // ROYA-ETH LP staking - { - contract: "0x55e0F2cE66Fa8C86ef478fa47bA0bE978eFC2647", - pairAddress: "0x6d9d2427cfa49e39b4667c4c3f627e56ae586f37", - token1: "0x4Cd4c0eEDb2bC21f4e280d0Fe4C45B17430F94A9", - price1: "royale", - token2: ADDRESSES.ethereum.WETH, - price2: "weth", - }, - // BITE-ETH LP staking - { - contract: "0xb12f0CbcC89457d44323139e6Bb0526Fd82f12F2", - pairAddress: "0x1f07f8e712659087914b96db4d6f6e4fee32285e", - token1: "0x4eed0fa8de12d5a86517f214c2f11586ba2ed88d", - price1: "dragonbite", - token2: ADDRESSES.ethereum.WETH, - price2: "weth", - }, - // BITE-ETH LP staking w/ tollbooth - { - contract: "0x18Ba986ED3128fc7E3E86a09E902436e900a899c", - pairAddress: "0x1f07f8e712659087914b96db4d6f6e4fee32285e", - token1: "0x4eed0fa8de12d5a86517f214c2f11586ba2ed88d", - price1: "dragonbite", - token2: ADDRESSES.ethereum.WETH, - price2: "weth", - }, - // BBANK-ETH LP staking - { - contract: "0x6406788d1CD4fdD823ef607A924c00a4244a841d", - pairAddress: "0x2a182e532a379cb2c7f1b34ce3f76f3f7d3596f7", - token1: ADDRESSES.ethereum.WETH, - price1: "weth", - token2: "0xf4b5470523ccd314c6b9da041076e7d79e0df267", - price2: "blockbank", - }, - // RAZE-ETH LP staking - { - contract: "0xe2a80A76B084B51CFAe5B2C3e0FF5232e0408201", - pairAddress: "0x4fc47579ecf6aa76677ee142b6b75faf9eeafba8", - token1: "0x5eaa69b29f99c84fe5de8200340b4e9b4ab38eac", - price1: "raze-network", - token2: ADDRESSES.ethereum.WETH, - price2: "weth", - }, - // BCUBE-ETH LP staking - { - contract: "0xFF964d0bf9f81c401932A6B975EAE54129712eE5", - pairAddress: "0xc62bf2c79f34ff24e2f97982af4f064161ed8949", - token1: "0x93c9175e26f57d2888c7df8b470c9eea5c0b0a93", - price1: "b-cube-ai", - token2: ADDRESSES.ethereum.WETH, - price2: "weth", - }, -]; - -// BSC LP Staking -const lpStakingAssetsBSC = [ - // FINE-BNB LP staking - { - contract: "0xF25897a7EDf1Dfa9C65f5DB7Ec4Bad868873805B", - pairAddress: "0xC309a6d2F1537922E06f15aA2eb21CaA1b2eEDb6", - token1: "0x4e6415a5727ea08aae4580057187923aec331227", - price1: "refinable", - token2: ADDRESSES.bsc.WBNB, - price2: "wbnb", - }, - // OM-BNB LP staking - { - contract: "0xcbf42ace1dbd895ffdcabc1b841488542626014d", - pairAddress: "0x49837a48abde7c525bdc86d9acba39f739cbe22c", - token1: ADDRESSES.bsc.WBNB, - price1: "wbnb", - token2: "0xf78d2e7936f5fe18308a3b2951a93b6c4a41f5e2", - price2: "mantra-dao", - }, - // CBD-BNB LP staking - { - contract: "0x92fCe8AfFB2A68d418BaDF8E360E0CDe06c39356", - pairAddress: "0x0b49580278b403ca13055bf4d81b6b7aa85fd8b9", - token1: "0x0e2b41ea957624a314108cc4e33703e9d78f4b3c", - price1: "greenheart-cbd", - token2: ADDRESSES.bsc.WBNB, - price2: "wbnb", - }, - // BBANK-BNB LP staking - { - contract: "0x1E8BC897bf03ebac570Df7e5526561f8a42eCe05", - pairAddress: "0x538e61bd3258304e9970f4f2db37a217f60436e1", - token1: ADDRESSES.bsc.WBNB, - price1: "wbnb", - token2: "0xf4b5470523ccd314c6b9da041076e7d79e0df267", - price2: "blockbank", - }, - // BONDLY-BNB LP staking - { - contract: "0xD862866599CA681c492492E1B7B9aB80066f2FaC", - pairAddress: "0xb8b4383b49d451bbea63bc4421466e1086da6f18", - token1: "0x96058f8c3e16576d9bd68766f3836d9a33158f89", - price1: "bondly", - token2: ADDRESSES.bsc.WBNB, - price2: "wbnb", - }, - // MIST-BNB LP staking - { - contract: "0x4F905f75F5576228eD2D0EA508Fb0c32a0696090", - pairAddress: "0x5a26eb7c9c72140d01039eb172dcb8ec98d071bd", - token1: "0x68e374f856bf25468d365e539b700b648bf94b67", - price1: "mist", - token2: ADDRESSES.bsc.WBNB, - price2: "wbnb", - }, - // ROSN-BNB LP staking - { - contract: "0x5B4463bBD7B2E870601e91161e0F1F7f84CDE214", - pairAddress: "0x5548bd47293171d3bc1621edccd953bcc9b814cb", - token1: "0x651Cd665bD558175A956fb3D72206eA08Eb3dF5b", - price1: "roseon-finance", - token2: ADDRESSES.bsc.WBNB, - price2: "wbnb", - }, - // MLT-BNB LP staking - { - contract: "0x398a5FEE22E0dEb67dA1bD15FA4841b6Aa64c471", - pairAddress: "0x560b96f81a2190ff6ac84ebfd17788bab3679cbc", - token1: "0x4518231a8fdf6ac553b9bbd51bbb86825b583263", - price1: "media-licensing-token", - token2: ADDRESSES.bsc.WBNB, - price2: "wbnb", - }, - // L3P-BNB LP staking - { - contract: "0x3ba3E2f3cACcDbE3C56D3046FFe859cc9deE08a0", - pairAddress: "0xB62c57Bda4C126E21A726e3D28734bfb1151231e", - token1: ADDRESSES.bsc.WBNB, - price1: "wbnb", - token2: "0xdeF1da03061DDd2A5Ef6c59220C135dec623116d", - price2: "lepricon", - }, -]; - -// POLYGON LP Staking -const lpStakingAssetsPOLYGON = [ - // OM-WETH LP staking - { - contract: "0xCBf42Ace1dBD895FFDCaBC1b841488542626014d", - pairAddress: "0xff2bbcb399ad50bbd06debadd47d290933ae1038", - token1: ADDRESSES.polygon.WETH_1, - price1: "weth", - token2: "0xC3Ec80343D2bae2F8E680FDADDe7C17E71E114ea", - price2: "mantra-dao", - }, - // GAMER-WETH LP staking - { - contract: "0x11c70CAA910647d820bD014d676Dcd97EDD64A99", - pairAddress: "0x1dF661fC4319415a2f990bd5F49D5cA70EFDee1C", - token1: "0x3f6b3595ecF70735D3f48D69b09C4E4506DB3F47", - price1: "gamestation", - token2: ADDRESSES.polygon.WETH_1, - price2: "weth", - }, -]; - -module.exports = { - lpStakingAssetsETH, - lpStakingAssetsBSC, - lpStakingAssetsPOLYGON, -}; diff --git a/projects/config/mantra-dao/contracts/naked-staking-contracts.js b/projects/config/mantra-dao/contracts/naked-staking-contracts.js deleted file mode 100644 index 5afba0c79e90..000000000000 --- a/projects/config/mantra-dao/contracts/naked-staking-contracts.js +++ /dev/null @@ -1,134 +0,0 @@ -const stakingAssetsETH = [ - // sOM POOL 1 - Staked OM - { - contract: "0x9E15Ad979919bB4db331Bfe864475Ae3BFFebA93", - token: "0x3593D125a4f7849a1B059E64F4517A86Dd60c95d", - price: "mantra-dao", - }, - // sOM POOL 2 - Staked OM - { - contract: "0xa01892d97e9c8290c2c225fb0b756bfe26bc9802", - token: "0x3593D125a4f7849a1B059E64F4517A86Dd60c95d", - price: "mantra-dao", - }, - // RFUEL Pool 2 - Staked RFUEL - { - contract: "0x456DF576962289256A92290C9E48EE116B8Cb413", - token: "0xaf9f549774ecedbd0966c52f250acc548d3f36e5", - price: "rio-defi", - }, - // L3P - Staked Lepricon - { - contract: "0xdbc34d084393ed8d7b750FfCCea5A139EC7b9349", - token: "0xdef1da03061ddd2a5ef6c59220c135dec623116d", - price: "lepricon", - }, - // ROYA - Staked royale - { - contract: "0x4Cd4c0eEDb2bC21f4e280d0Fe4C45B17430F94A9", - token: "0x7eaF9C89037e4814DC0d9952Ac7F888C784548DB", - price: "royale", - }, - // Finxflo - Staked Finxflo - { - contract: "0x6BcDC61A7A6d86f7b7B66d461b7eF7fa268571a0", - token: "0x8a40c222996f9F3431f63Bf80244C36822060f12", - price: "finxflo", - }, - // PKF - Staked Polkafoundry - { - contract: "0x1dfdb0fb85402dc7f8d72d92ada8fbbb3ffc8633", - token: "0x4eed0fa8de12d5a86517f214c2f11586ba2ed88d", - price: "polkafoundry", - }, - // RAZE - Staked Raze - { - contract: "0x2d0ea72db9f9a63f4b185eab1ca74137d808ebfa", - token: "0x5eaa69b29f99c84fe5de8200340b4e9b4ab38eac", - price: "raze-network", - }, - // KYL - Staked KYL - { - contract: "0x6ae05b5db520011bf76645ebb4d6a697e5b3774b", - token: "0x67b6d479c7bb412c54e03dca8e1bc6740ce6b99c", - price: "kylin-network", - }, - // LABS Pool 1 - Staked LABS - { - contract: "0x6f0db359309CAD297D2e7952a4F5f081bDC1e373", - token: "0x8b0e42f366ba502d787bb134478adfae966c8798", - price: "labs-group", - }, - // LABS Pool 2 - Staked LABS - { - contract: "0xb96e42c0de658ca26048b0e200f9a1e05ad89e0f", - token: "0x8b0E42F366bA502d787BB134478aDfAE966C8798", - price: "labs-group", - }, - // BONDLY staking - { - contract: "0x39621A555554A7FF77F2b64185c53E04C90cD540", - token: "0xd2dda223b2617cb616c1580db421e4cfae6a8a85", - price: "bondly", - }, - // BITE staking - { - contract: "0xa571309B1267676568Bf9f155606a08790896Fe2", - token: "0x4eED0fa8dE12D5a86517f214C2f11586Ba2ED88D", - price: "dragonbite", - }, - // BCUBE staking - { - contract: "0xb19b94d53D362CDfC7360C951a85ca2c1d5400BA", - token: "0x93C9175E26F57d2888c7Df8B470C9eeA5C0b0A93", - price: "b-cube-ai", - }, -]; - -const stakingAssetsBSC = [ - // ROSN staking - { - contract: "0x7dd79e93dba1d677574d0b5e99721f2e4b45e297", - token: "0x651cd665bd558175a956fb3d72206ea08eb3df5b", - price: "roseon-finance", - }, - // BONDLY staking - { - contract: "0x004c0908518e19aa8b27a55c171564097fa3c354", - token: "0x96058f8c3e16576d9bd68766f3836d9a33158f89", - price: "bondly", - }, - // MLT staking - { - contract: "0xF0185520Cc773502f0f208433ca178f2f57157A9", - token: "0x4518231a8fdf6ac553b9bbd51bbb86825b583263", - price: "media-licensing-token", - }, - // OM staking - { - contract: "0xEfc2d65302eb6345A7C0e212B791e0d45C2C3c91", - token: "0xf78d2e7936f5fe18308a3b2951a93b6c4a41f5e2", - price: "mantra-dao", - }, -]; - -const stakingAssetsPOLYGON = [ - // OM staking - { - contract: "0xCdD0f77A2A158B0C7cFe38d00443E9A4731d6ea6", - token: "0xc3ec80343d2bae2f8e680fdadde7c17e71e114ea", - price: "mantra-dao", - }, - // GAMER staking - { - contract: "0xd1ecDC553651daB068486d9c4d066eCDC614416e", - token: "0x3f6b3595ecf70735d3f48d69b09c4e4506db3f47", - price: "gamestation", - }, -]; - -module.exports = { - stakingAssetsETH, - stakingAssetsBSC, - stakingAssetsPOLYGON, -}; diff --git a/projects/config/onx/avalanche/vaults.js b/projects/config/onx/avalanche/vaults.js deleted file mode 100644 index 8440ae3433ee..000000000000 --- a/projects/config/onx/avalanche/vaults.js +++ /dev/null @@ -1,47 +0,0 @@ - -const vaults = [ - //usdcAvax - ['0xa389f9430876455c36478deea9769b7ca4e3ddb1', '0x8025d4deDa0C7512d44438a7DC597612B4108F07'], - //wethAvax - ['0xfe15c2695f1f920da45c30aae47d11de51007af9', '0xf7AcA362510b327bDAca693611353b6a837cBDB2'], - //avaxUsdte - ['0xed8cbd9f0ce3c6986b22002f03c6475ceb7a6256', '0x897Fb124aCdF5A685d9258645ffee0058464817A'], - //joeAvax [not available] - ['0x454e67025631c065d3cfad6d71e6892f74487a15', '0x02e9bc3EF29A3f51EdE6e4c4F70fdcb894CD6Cf5'], - //wBtcAvax - ['0xd5a37dc5c9a396a03dd1136fc76a1a02b1c88ffa', '0x8922E41342C6160fAf4dC40f2c1fCFCd94E98779'], - //linkAvax - ['0x6f3a0c89f611ef5dc9d96650324ac633d02265d3', '0x55F42961b3aD4E2A08f1780C7434dd8EC5f7FcE4'], - //joeUsdce - ['0x67926d973cd8ee876ad210faaf7dffa99e414acf', '0xD9F63Cc588822cD3eF802D900808E946d13CE609'], - //bnbAvax - ['0xeb8eb6300c53c3addbb7382ff6c6fbc4165b0742', '0x4decafaCD4591e52f85e8FE69F82F2400176BB33'], - //joeUsdte - ['0x1643de2efb8e35374d796297a9f95f64c082a8ce', '0xfD127Bc3b6153b043fFD8d7f38272593700b124c'], - // //spellAvax [not available] - ['0x62cf16bf2bc053e7102e2ac1dee5029b94008d99', '0x9eE877279DFE8e5F20614db88e50CD72B4efDEAD'], - // //xavaAvax [not available] - ['0x72c3438cf1c915ecf5d9f17a6ed346b273d5bf71', '0x54720637Fa477eD87Cd06F674247a649A5168eB6'], - //linkeUsdce - ['0xb9f425bc9af072a91c423e31e9eb7e04f226b39d', '0x62CA6F1640776070ECa70E09d9AF27352a43a5D8'], - //wethUsdce - ['0x199fb78019a08af2cb6a078409d0c8233eba8a0c', '0x2C858E3181988f2E4458f14768aE204E5BF2Ee0e'], - //pefiAvax [not available] - ['0xb78c8238bd907c42be45aebdb4a8c8a5d7b49755', '0x276F74C24Cc4443Ecb4967Db77572BE50aeD4117'], - //wbtceAvax - ['0x62475f52add016a06b398aa3b2c2f2e540d36859', '0x008E6bf114D686713dC233487e360A158433e519'], - //aaveAvax - ['0xc3e6d9f7a3a5e3e223356383c7c055ee3f26a34f', '0xE7c34e1946A10a3A28BEd4B0Cb5B7F0d85F5368D'], - //qiAvax - ['0x2774516897ac629ad3ed9dcac7e375dda78412b9', '0x0240269d999301d03aAe390104584F7517f52ECd'], - // //avaxBoo [not available] - ['0xebf50b8089a0c5e7c5de23f644fcd723818f65b3', '0xB4a805Ad532BB92501507C9eAc27FD0BAe4d68A1'], - // //maiAvax [not available] - ['0x23ddca8de11eccd8000263f008a92e10dc1f21e8', '0x2071fD6779B701aa71c4a48b8f37970160e5FE75'], - // //h20Avax [not available] - ['0x9615a11eaa912eae869e9c1097df263fc3e105f3', '0x6b42A98af10C2E94a6951c94b8Ac5B5EEB23c8AF'], -] - -module.exports = { - vaults, -} \ No newline at end of file diff --git a/projects/config/onx/constant.js b/projects/config/onx/constant.js deleted file mode 100644 index 49f50ba4e5b2..000000000000 --- a/projects/config/onx/constant.js +++ /dev/null @@ -1,23 +0,0 @@ -const tokenAddresses = { - onx: "0xe0ad1806fd3e7edf6ff52fdb822432e847411033", - sOnx: "0xa99f0ad2a539b2867fcfea47f7e71f240940b47c", - onxFarm: "0x168f8469ac17dd39cd9a2c2ead647f814a488ce9", - onxTripleFarm: "0x30D1A19EA928cCf46634cBC2944D2D89Be636f22", - onxWethSushiPair: "0x62f22A47e5D2F8b71cC44fD85863753618312f67", - pool: "0x47F3E6C1Ef0cBe69502167095b592e61de108BaA", - aethToken: "0xE95A203B1a91a908F9B9CE46459d101078c2c3cb", - onsToken: "0xfC97C0c12438B6E4CF246cD831b02FeF4950DCAD", - oneVault: "0x3BdF1977d87EDAD8e0617efCEa958F6d43A4C30E", - onePools: [ - '0x54c532E367031F56c401C6024aC4ABEfF2b03534', - '0xbc2346C3c7F3998A12A1c8E7Be44734EcC832763', - '0xe64796FCc97c33A2193Ba60f013F3fA5D4712d56', - '0xe659fA84e0C687760245046BA63329d44320997c', - '0x19Eb6536777713aCdAcA8dd9A3AD9843D74E9E3b', - '0x1B72255a11DF705Bb598E670830E03A19F2D242f', - '0x7058EE5467edef417746aab0B8cabbbE36eF1798', - '0x9792eE4c36a622a8CF9566b037c57519A9fe8a56', - ] -}; - -module.exports = tokenAddresses; diff --git a/projects/config/onx/ethereum/index.js b/projects/config/onx/ethereum/index.js deleted file mode 100644 index 64d49959e7e4..000000000000 --- a/projects/config/onx/ethereum/index.js +++ /dev/null @@ -1,61 +0,0 @@ -const tokenAddresses = require('../constant'); -const { vaults } = require('./vaults'); -const { staking } = require('../../../helper/staking') -const ADDRESSES = require('../../../helper/coreAssets.json') - -const getEthereumStaking = staking(tokenAddresses.sOnx, tokenAddresses.onx) - -const getEthereumBorrows = async (api) => { - api.add(ADDRESSES.null, await api.call({ target: tokenAddresses.pool, abi: 'uint256:totalBorrow' })) -} - -async function getEthereumPoolTvl(api) { - const pools = ['0xAdb6d1cB866a52C5E8C1e79Ff8e0559c12F4D7a3'] - const tokens = ['0x0652687e87a4b8b5370b05bc298ff00d205d9b5f'] - const bals = await api.multiCall({ abi: 'uint256:underlyingBalanceWithInvestment', calls: pools }) - api.addTokens(tokens, bals) - return api.sumTokens({ owners: [tokenAddresses.onxFarm, tokenAddresses.onxTripleFarm], tokens: ['0x0652687e87a4b8b5370b05bc298ff00d205d9b5f', tokenAddresses.onxWethSushiPair] }) -} - -async function ethTvl(api) { - await Promise.all([addFarmTvl, addOnePoolTvl, addVaultTvl, addOneVaultTvl, ethStakeTvl ].map(i => i())) - - async function ethStakeTvl() { - let totalStake = await api.call({ target: tokenAddresses.pool, abi: 'uint256:totalStake' }) - let totalBorrow = await api.call({ target: tokenAddresses.pool, abi: 'uint256:totalPledge' }) - api.add(ADDRESSES.null, totalStake - totalBorrow) - } - - - async function addVaultTvl() { - const pools = vaults.map(i => i[1]) - const tokens = vaults.map(i => i[0]) - const bals = await api.multiCall({ abi: 'uint256:underlyingBalanceWithInvestment', calls: pools }) - api.addTokens(tokens, bals) - } - - async function addFarmTvl() { - const farm = '0x168f8469ac17dd39cd9a2c2ead647f814a488ce9' - const pools = await api.fetchList({ lengthAbi: 'uint256:poolLength', itemAbi: 'function poolInfo(uint256) view returns (address token, uint256,uint256,uint256)', target: farm }) - return api.sumTokens({ owner: farm, tokens: pools.map(i => i.token), blacklistedTokens: ['0x0652687e87a4b8b5370b05bc298ff00d205d9b5f', tokenAddresses.onxWethSushiPair] }) - } - async function addOnePoolTvl() { - const pools = tokenAddresses.onePools - const tokens = await api.multiCall({ abi: 'address:stakingToken', calls: pools }) - return api.sumTokens({ tokensAndOwners2: [tokens, pools] }) - } - - async function addOneVaultTvl() { - const vault = tokenAddresses.oneVault - const aETH = await api.call({ abi: 'address:aEth', target: vault }) - const aETHb = await api.call({ abi: 'address:aETHb', target: vault }) - return api.sumTokens({ tokens: [aETH, aETHb], owner: vault }) - } -} - -module.exports = { - getEthereumStaking, - getEthereumPoolTvl, - getEthereumBorrows, - ethTvl, -} diff --git a/projects/config/onx/ethereum/vaults.js b/projects/config/onx/ethereum/vaults.js deleted file mode 100644 index e4523e5deb09..000000000000 --- a/projects/config/onx/ethereum/vaults.js +++ /dev/null @@ -1,24 +0,0 @@ -const vaults = [ - ['0xceff51756c56ceffca006cd410b03ffc46dd3a58', '0x2abCe7c4C77e215fcCc189E02Fc5D2A30b52a06a'], - ['0x397ff1542f962076d0bfe58ea045ffa2d347aca0', '0x637c871C559ade45b37074fCF3B8081Ec81c55FC'], - ['0x06da0fd433c1a5d7a4faa01111c044910a184553', '0xeAaE5CEfce1092eb3eA1DA7622B3cF4fb20B8b81'], - - ['0x795065dcc9f64b5614c407a6efdc400da6221fb0', '0xdC6f222c4504C43225a89b84E3aae15Ad0DFDF0F'], - ['0x36e2fcccc59e5747ff63a03ea2e5c0c2c14911e7', '0x10A8dc3C0Db7BDFE1Db36d113c2685e60daaFEb8'], - ['0xfa5bc40c3bd5afa8bc2fe6b84562fee16fb2df5f', '0x6901Aac9813f3EfAae32F44E9b579f08A12707AD'], - ['0x1241f4a348162d99379a23e73926cf0bfcbf131e', '0x121eF4eEc2bb4D5eD91347166F02c0763af1C49A'], - ['0x088ee5007c98a9677165d78dd2109ae4a3d04d0c', '0x431b1F5356EcAc2D86b2313907B747B16D11066f'], - - ['0xc3d03e4f041fd4cd388c549ee2a29a9e5075882f', '0x5EA1b54C522f279ecC0182d9b35229d6435D42b7'], - ['0xd75ea151a61d06868e31f8988d28dfe5e9df57b4', '0x9DB4AFCABdB25C89424c88e720dD47D6be43BdBe'], - ['0xc40d16476380e4037e6b1a2594caf6a6cc8da967', '0xbd3a37e3690ad4e145c39983D0Aaf8bd5f5e2F29'], - ['0x31503dcb60119a812fee820bb7042752019f2355', '0x8d47f6fd4602B1ecF7928C0f1AEF9C215E3596b4'], - ['0x31503dcb60119a812fee820bb7042752019f2355', '0x8d47f6fd4602B1ecF7928C0f1AEF9C215E3596b4'], - - ['0xba13afecda9beb75de5c56bbaf696b880a5a50dd', '0x659217CdA99658AeBA399B4a79FB03D96B3c46bC'], - ['0xf55c33d94150d93c2cfb833bcca30be388b14964', '0xcedB7921013A012c5538C0d2925a90AA817Bef4D'], -] - -module.exports = { - vaults, -} \ No newline at end of file diff --git a/projects/config/onx/fantom/vaults.js b/projects/config/onx/fantom/vaults.js deleted file mode 100644 index 73cfd84fb0e4..000000000000 --- a/projects/config/onx/fantom/vaults.js +++ /dev/null @@ -1,42 +0,0 @@ -const vaults = [ - //xBoo - ['0x841fad6eae12c286d1fd18d1d525dffa75c7effe', '0x95d0d6A7D75A5b086d2823C38F6Dd80a50fD0d93',], - //BooFtm - ['0xec7178f4c41f346b2721907f5cf7628e388a7a58', '0x62CA6F1640776070ECa70E09d9AF27352a43a5D8'], - //UsdcFtm - ['0x2b4c76d0dc16be1c31d4c1dc53bf9b45987fc75c', '0x6b42A98af10C2E94a6951c94b8Ac5B5EEB23c8AF'], - //fUsdtFtm - ['0x5965E53aa80a0bcF1CD6dbDd72e6A9b2AA047410', '0xC033338F7605B1555b1d3FC2a3626b2b76a0E042'], - //DaiFtm - ['0xe120ffBDA0d14f3Bb6d6053E90E63c572A66a428', '0xf1Ba3EF65262ee4058462E65A3A09a7571193400'], - //btc - ['0xFdb9Ab8B9513Ad9E419Cf19530feE49d412C3Ee3', '0x0f16CBDaF6c8115cDde59876cF232903E95D488A'], - //eth - ['0xf0702249F4D3A25cD3DED7859a165693685Ab577', '0x7396241a8a45E6252A2b5bBB571CBdfF599E16F1'], - //link - ['0x89d9bC2F2d091CfBFc31e333D6Dc555dDBc2fd29', '0x8D20fB2F4F96E897Fed7E3E50f8A403aFc59dA23'], - //aave - ['0xeBF374bB21D83Cf010cC7363918776aDF6FF2BF6', '0xE663F7d6AFB3A3Ef458D5c4a068E29368a46Eb87'], - //sushi - ['0xf84E313B36E86315af7a06ff26C8b20e9EB443C3', '0x32B750721Ad93f62b21402526354d53ac46953C2'], - //crv - ['0xB471Ac6eF617e952b84C6a9fF5de65A9da96C93B', '0x424B1AE0AF693d4577dde25081E970cb656013C7'], - //bnb - ['0x956DE13EA0FA5b577E4097Be837BF4aC80005820', '0x1fA1B8D94B922e3C9821f66363a75237c36096af'], - //any - ['0x5c021D9cfaD40aaFC57786b409A9ce571de375b4', '0xE41718b549B935358A2f62acbD289F3dcccABB18'], - //mim - ['0x6f86e65b255c9111109d2D2325ca2dFc82456efc', '0xfB271303B157d2e3d91CF86C7956eb46180d62E5'], - //yfi - ['0x0845c0bFe75691B1e21b24351aAc581a7FB6b7Df', '0x4CddFEf40f13F16520b7f98f269f772560A8fb9a'], - //btcEth - ['0xEc454EdA10accdD66209C57aF8C12924556F3aBD', '0x58bC3B5949C6784819A606645d616D8D2dA7594B'], - //spell - ['0x78f82c16992932EfDd18d93f889141CcF326DBc2', '0x4aFa2C780d0d2b139886A532d1D1959f4D316ee7'], - //joe - ['0xd518737Ff601c2A7C67F55EbbEb0a4e3fF5C0C35', '0xbE0093F744287Ea0478cc75c6320043a8b79E845'], -] - -module.exports = { - vaults, -} \ No newline at end of file diff --git a/projects/config/onx/polygon/vaults.js b/projects/config/onx/polygon/vaults.js deleted file mode 100644 index 1da4897cb8db..000000000000 --- a/projects/config/onx/polygon/vaults.js +++ /dev/null @@ -1,46 +0,0 @@ -const vaults = [ - //dualMaticUsdc - ['0x6e7a5fafcec6bb1e78bae2a1f0b612012bf14827', '0x36D14424Cc5a18893e93A0f8FdD42DC40562887E'], - //dualMaticEth - ['0xadbf1854e5883eb8aa7baf50705338739e558e5b', '0xfe51dE20719d05152Ace63a069446Bb5C89511DB'], - //dualMaticUsdt - ['0x604229c960e5cacf2aaeac8be68ac07ba9df81c3', '0x067E7586Eb8733bF108167C15cBAbee4c629C37A'], - //dualMaticQuick - ['0x019ba0325f1988213d448b3472fa1cf8d07618d7', '0x849031F78970639F8Dc9Dc3E962e0d0079D1051c'], - //EthUsdc - ['0x853ee4b2a13f8a742d64c8f088be7ba2131f670d', '0x185A1cfdb7173b224d08E61F1Cb21Fd5Fd6ee8CD'], - //wBtcEth - ['0xdc9232e2df177d7a12fdff6ecbab114e2231198d', '0xf1ba3ef65262ee4058462e65a3a09a7571193400'], - //ethUsdt - ['0xf6422b997c7f54d1c6a6e103bcb1499eea0a7046', '0x353856185fBB65a098b971B6d492CC3c245D9a59'], - //quickEth - ['0x1bd06b96dd42ada85fdd0795f3b4a79db914add5', '0x9767218525A443AE1B04A2a84Cf2f6D646C2fA06'], - //aaveEth - ['0x90bc3e68ba8393a3bf2d79309365089975341a43', '0xbB760a23924a23e5270c659349c753d16e7C1078'], - //ethDai - ['0x4a35582a710e1f4b2030a3f826da20bfb6703c09', '0x0d553115D2c1E2b734d66De1Eba4BAe1a88cB175'], - //wbtcUsdc - ['0xf6a637525402643b0654a54bead2cb9a83c8b498', '0x248Eecc8286A8C6484B4A87e1F32f0bc2d7971D4'], - //linkEth - ['0x5ca6ca6c3709e1e6cfe74a50cf6b2b6ba2dadd67', '0x58bC3B5949C6784819A606645d616D8D2dA7594B'], - //usdcQuick - ['0x1f1e4c845183ef6d50e9609f16f6f9cae43bc9cb', '0x7E9dA60002dAF64778C78Ac90dD5bdc9391acb00'], - //usdcUsdt - ['0x2cf7252e74036d1da831d11089d326296e64a728', '0x1a130be9a0E9046936E5461D3e8727b6aF7d0C2C'], - //avaxMatic - ['0xeb477ae74774b697b5d515ef8ca09e24fee413b5', '0x8D20fB2F4F96E897Fed7E3E50f8A403aFc59dA23'], - //solMatic - ['0x898386dd8756779a4ba4f1462891b92dd76b78ef', '0x0A1EfAF7dd833F9D8EF9f2f095bf1d6C725FF110'], - //bnbUsdc - ['0x40a5df3e37152d4daf279e0450289af76472b02e', '0x43bE6849BC355735D77238AcfDBcEB7bE8673f02'], - //ftmMatic - ['0xd2b61a42d3790533fedc2829951a65120624034a', '0xF020de990036D5aE107860592Bde0E53892F1531'], - //daiUsdc - ['0xf04adbf75cdfc5ed26eea4bbbb991db002036bdd', '0x260e6fB68C787CdA2E9ea104f9e3a3923E4119f6'], - //daiUsdt - ['0x59153f27eefe07e5ece4f9304ebba1da6f53ca88', '0x32B750721Ad93f62b21402526354d53ac46953C2'], -] - -module.exports = { - vaults, -} \ No newline at end of file diff --git a/projects/config/onx/vault.js b/projects/config/onx/vault.js deleted file mode 100644 index 5d08d27fe2df..000000000000 --- a/projects/config/onx/vault.js +++ /dev/null @@ -1,13 +0,0 @@ -const EXCHANGE_TYPE = { - SUSHISWAP: 'SUSHISWAP', - AVALANCHE: 'AVALANCHE', - UNISWAP: 'UNISWAP', - QUICKSWAP: 'QUICKSWAP', - QUICKSWAP_DUAL_MATIC: 'QUICKSWAP_DUAL_MATIC', - SPOOKYSWAP: 'SPOOKYSWAP', - SPOOKYSWAP_SINGLE: 'SPOOKYSWAP_SINGLE', -} - -module.exports = { - EXCHANGE_TYPE, -} \ No newline at end of file diff --git a/projects/config/piedao/abi/IPie.json b/projects/config/piedao/abi/IPie.json deleted file mode 100644 index 3df655fc4d9d..000000000000 --- a/projects/config/piedao/abi/IPie.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "totalSupply": "uint256:totalSupply", - "calcTokensForAmount": "function calcTokensForAmount(uint256 _amount) view returns (address[] tokens, uint256[] amounts)" -} \ No newline at end of file diff --git a/projects/config/piedao/abi/IStakingAll.json b/projects/config/piedao/abi/IStakingAll.json deleted file mode 100644 index 9dee9d343590..000000000000 --- a/projects/config/piedao/abi/IStakingAll.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "poolCount": "uint256:poolCount", - "getPoolToken": "function getPoolToken(uint256 _poolId) view returns (address)" -} \ No newline at end of file diff --git a/projects/convex/index.js b/projects/convex/index.js index 10505a93fb82..35e6962b2dab 100644 --- a/projects/convex/index.js +++ b/projects/convex/index.js @@ -10,7 +10,7 @@ const boosterAddresses = { const staker = '0x989aeb4d175e16225e39e87d0d97a3360524ad80' const cvxRewardsAddress = "0xCF50b810E57Ac33B91dCF525C6ddd9881B139332"; -const cvxLockerAddress = "0x72a19342e8F1838460eBFCCEf09F6585e32db86E"; +const cvxLockerAddress = ADDRESSES.ethereum.vlCVX; const arbiPoolInfoABI = 'function poolInfo(uint256) view returns (address lptoken, address gauge, address rewards, bool shutdown, address factory)' diff --git a/projects/cover.js b/projects/cover.js index b5db9ec2b7d8..7599462a0554 100644 --- a/projects/cover.js +++ b/projects/cover.js @@ -1,10 +1,18 @@ const ADDRESSES = require('./helper/coreAssets.json') -const abis = require('./config/cover/cover.js') +const abis = { + cover: { + getProtocolDetails: "function getProtocolDetails() view returns (bytes32 _name, bool _active, uint256 _claimNonce, uint256 _claimRedeemDelay, uint256 _noclaimRedeemDelay, address[] _collaterals, uint48[] _expirationTimestamps, address[] _allCovers, address[] _allActiveCovers)", + }, + protocols: { + getAllProtocolAddresses: "address[]:getAllProtocolAddresses", + } +} + async function tvl(api) { let factory = '0xedfC81Bf63527337cD2193925f9C0cF2D537AccA' - const allProtocols = await api.call({ abi: abis.abis.protocols.getAllProtocolAddresses, target: factory }) - const details = await api.multiCall({ abi: abis.abis.cover.getProtocolDetails, calls: allProtocols}) + const allProtocols = await api.call({ abi: abis.protocols.getAllProtocolAddresses, target: factory }) + const details = await api.multiCall({ abi: abis.cover.getProtocolDetails, calls: allProtocols }) const tokens = [ADDRESSES.ethereum.DAI, '0x16de59092dAE5CcF4A1E6439D611fd0653f0Bd01'] const owners = details.map(i => i._allCovers).flat() return api.sumTokens({ owners, tokens }) diff --git a/projects/crackandstack/index.js b/projects/crackandstack/index.js new file mode 100644 index 000000000000..64377de46ee1 --- /dev/null +++ b/projects/crackandstack/index.js @@ -0,0 +1,16 @@ +const { sumTokensExport } = require("../helper/unwrapLPs"); +const coreAssets = require("../helper/coreAssets.json"); + +const TAIKO_TOKEN = "0xA9d23408b9bA935c230493c40C73824Df71A0975"; + +// Crack & Stack +// https://crackandstack.com/ +module.exports = { + methodology: `Crack & Stack TVL is the backed value of the Lanterns NFT.`, + taiko: { + tvl: sumTokensExport({ + owners: ["0x2c301eBfB0bb42Af519377578099b63E921515B7", "0xD8F7cd7d919c5266777FB83542F956dD30E80187"], + tokens: [coreAssets.null, coreAssets.taiko.USDT, coreAssets.taiko.USDC_e, coreAssets.taiko.USDC, TAIKO_TOKEN] + }), + }, +} diff --git a/projects/delta/index.js b/projects/delta/index.js index e0ad89e1b9a6..c7a6143220d6 100644 --- a/projects/delta/index.js +++ b/projects/delta/index.js @@ -1,6 +1,3 @@ -const ADDRESSES = require('../helper/coreAssets.json') -const sdk = require("@defillama/sdk"); -const BigNumber = require("bignumber.js"); const { staking } = require("../helper/staking"); const vaultStakingContract = "0x9fE9Bb6B66958f2271C4B0aD23F6E8DDA8C221BE"; @@ -8,74 +5,18 @@ const rebasingContract = "0xfcfC434ee5BfF924222e084a8876Eee74Ea7cfbA"; const DELTA_WETH_SLP = "0x1498bd576454159Bb81B5Ce532692a8752D163e8"; const DELTA = "0x9EA3b5b4EC044b70375236A281986106457b20EF"; -const WETH = ADDRESSES.ethereum.WETH; -async function Pool2(timestamp, block) { - const balances = {}; - - const totalSupply_slp = ( - await sdk.api.erc20.totalSupply({ - target: DELTA_WETH_SLP, - }) - ).output; - - const totalSupply_rlp = ( - await sdk.api.erc20.totalSupply({ - target: rebasingContract, - }) - ).output; - - const balance_slp = ( - await sdk.api.abi.call({ - abi: 'erc20:balanceOf', - target: DELTA_WETH_SLP, - params: rebasingContract, - block - }) - ).output; - - const balance_rlp = ( - await sdk.api.abi.call({ - abi: 'erc20:balanceOf', - target: rebasingContract, - params: vaultStakingContract, - block - }) - ).output; - - const underlyingsBalance = ( - await sdk.api.abi.multiCall({ - calls: [DELTA, WETH].map((token) => ({ - target: token, - params: DELTA_WETH_SLP, - })), - abi: 'erc20:balanceOf', - block - }) - ).output; - - underlyingsBalance.forEach((call) => { - const underlyingSetBalance = BigNumber(call.output) - .times(balance_slp) - .div(totalSupply_slp) - .times(balance_rlp) - .div(totalSupply_rlp); - - sdk.util.sumSingleBalance( - balances, - call.input.target, - underlyingSetBalance.toFixed(0) - ); - }); - - return balances; +async function pool2(api) { + const totalSupply_rlp = await api.call({ abi: 'erc20:totalSupply', target: rebasingContract, }) + const balance_slp = await api.call({ abi: 'erc20:balanceOf', target: DELTA_WETH_SLP, params: rebasingContract, }) + const balance_rlp = await api.call({ abi: 'erc20:balanceOf', target: rebasingContract, params: vaultStakingContract, }) + api.add(DELTA_WETH_SLP, balance_slp * balance_rlp / totalSupply_rlp) } module.exports = { - misrepresentedTokens: true, ethereum: { staking: staking(vaultStakingContract, DELTA), - pool2: Pool2, + pool2, tvl: async () => ({}) }, methodology: "Counts liquidty on the Staking and Pool2", diff --git a/projects/demeter/index.js b/projects/demeter/index.js index c7adf3de8270..d414bdcd542f 100644 --- a/projects/demeter/index.js +++ b/projects/demeter/index.js @@ -2,6 +2,9 @@ const { get } = require('../helper/http') async function fetch() { let results = await get('https://api.deotoken.com/api/demeter/supply-data'); + if(results.tvl > 1e9){ + throw new Error(">1bn") + } return results.tvl; } diff --git a/projects/demodyfi/index.js b/projects/demodyfi/index.js index 5d4e830a964e..56664c44bd9c 100644 --- a/projects/demodyfi/index.js +++ b/projects/demodyfi/index.js @@ -1,139 +1,18 @@ -const ADDRESSES = require('../helper/coreAssets.json') const { getUniTVL } = require('../helper/unknownTokens') -const sdk = require("@defillama/sdk"); -const BigNumber = require("bignumber.js"); -const wGLMR = ADDRESSES.moonbeam.WGLMR; -const { unwrapUniswapLPs } = require("../helper/unwrapLPs"); - -async function dmodBscStakingPool(timestamp, block, chainBlocks) { - const stakingBalance = new BigNumber( - ( - await sdk.api.abi.call({ - abi: "erc20:balanceOf", - chain: "bsc", - target: "0x002D8563759f5e1EAf8784181F3973288F6856e4", - params: ["0xc94e085E2E2D92A950fa4A6B923263C0B47c6dBa"], - block: chainBlocks["bsc"], - }) - ).output - ); - - const decimals = new BigNumber( - ( - await sdk.api.abi.call({ - abi: "erc20:decimals", - chain: "bsc", - target: "0x002D8563759f5e1EAf8784181F3973288F6856e4", - params: [], - block: chainBlocks["bsc"], - }) - ).output - ); - - return { 'demodyfi': stakingBalance.div(new BigNumber(10).pow(decimals)).toFixed(0) }; -} -async function dmodEthereumStakingPool(timestamp, block, chainBlocks) { - const stakingBalance = new BigNumber( - ( - await sdk.api.abi.call({ - abi: "erc20:balanceOf", - chain: "ethereum", - target: ADDRESSES.moonbeam.WGLMR, - params: ["0x024D59Ac0Bb03dEd28B9A16cd50B3d242B43a683"], - block - }) - ).output - ); - - const decimals = new BigNumber( - ( - await sdk.api.abi.call({ - abi: "erc20:decimals", - chain: "ethereum", - target: ADDRESSES.moonbeam.WGLMR, - params: [], - block - }) - ).output - ); - - return { 'demodyfi': stakingBalance.div(new BigNumber(10).pow(decimals)).toFixed(0) }; -} -async function dmodBscLPPool(timestamp, block, chainBlocks) { - const transform = i => `bsc:${i}`; - const balances = {}; - - const lpTokenbalance = new BigNumber( - ( - await sdk.api.abi.call({ - abi: "erc20:balanceOf", - chain: "bsc", - target: "0x0f35d854C267D29C0E418F561b75aE09B9E413D4", - params: ["0xc94e085E2E2D92A950fa4A6B923263C0B47c6dBa"], - block: chainBlocks["bsc"], - }) - ).output - ); - - await unwrapUniswapLPs( - balances, - [ - { - balance: lpTokenbalance, - token: "0x0f35d854C267D29C0E418F561b75aE09B9E413D4", - }, - ], - chainBlocks["bsc"], - "bsc", - transform - ); - - return balances; -} -async function dmodEthereumLPPool(timestamp, block, chainBlocks) { - const balances = {}; - - const lpTokenbalance = new BigNumber( - ( - await sdk.api.abi.call({ - abi: "erc20:balanceOf", - chain: "ethereum", - target: "0xD5B1Cd8D245A93E0697707AEe82497388508b132", - params: ["0x024D59Ac0Bb03dEd28B9A16cd50B3d242B43a683"], - block - }) - ).output - ); - - await unwrapUniswapLPs( - balances, - [ - { - balance: lpTokenbalance, - token: "0xD5B1Cd8D245A93E0697707AEe82497388508b132", - }, - ], - block, - "ethereum" - ); - - return balances; -} +const { staking } = require('../helper/staking') +const { pool2 } = require('../helper/pool2') module.exports = { misrepresentedTokens: true, ethereum: { - tvl: () => ({}), - staking: dmodEthereumStakingPool, - pool2: dmodEthereumLPPool + staking: staking('0x024D59Ac0Bb03dEd28B9A16cd50B3d242B43a683', '0x5f6c5C2fB289dB2228d159C69621215e354218d7'), + pool2: pool2('0x024D59Ac0Bb03dEd28B9A16cd50B3d242B43a683', '0xD5B1Cd8D245A93E0697707AEe82497388508b132'), }, bsc: { - tvl: () => ({}), - staking: dmodBscStakingPool, - pool2: dmodBscLPPool + staking: staking('0xc94e085E2E2D92A950fa4A6B923263C0B47c6dBa', '0x002D8563759f5e1EAf8784181F3973288F6856e4'), + pool2: pool2('0xc94e085E2E2D92A950fa4A6B923263C0B47c6dBa', '0x0f35d854C267D29C0E418F561b75aE09B9E413D4'), }, moonbeam: { tvl: getUniTVL({ factory: '0x61999fAb7fdcEe1B26b82b5c2f825BCC8F8c2458', useDefaultCoreAssets: true }), }, -}; -// node test.js projects/demodyfi/index.js \ No newline at end of file +}; \ No newline at end of file diff --git a/projects/diviswap/index.js b/projects/diviswap/index.js new file mode 100644 index 000000000000..7f30bfcf047e --- /dev/null +++ b/projects/diviswap/index.js @@ -0,0 +1,2 @@ +const { uniTvlExport } = require("../helper/unknownTokens"); +module.exports = uniTvlExport('chz', "0xbdd9c322ecf401e09c9d2dca3be46a7e45d48bb1") \ No newline at end of file diff --git a/projects/djed-alliance/index.js b/projects/djed-alliance/index.js index 705e632a15c4..f1dad7c7d5ea 100644 --- a/projects/djed-alliance/index.js +++ b/projects/djed-alliance/index.js @@ -6,9 +6,9 @@ const { sumTokensExport } = require("../helper/chain/cardano"); module.exports = { - methodology: 'The TVL of each Djed deployment is the reserve belonging to the deployment. The TVL within a given blockchain is the sum of the TVLs of all known Djed deployments within that blockchain. The total TVL is the sum of the Djed TVLs on all blockchains.', + methodology: 'The TVL of Djed is the reserve belonging to the deployment. The TVL within a given blockchain is the sum of the TVLs of all known Djed deployments within that blockchain.', cardano: { - tvl: sumTokensExport({ owner: 'addr1zxem3j9xw7gyqnry0mfdhku7grrzu0707dc9fs68zwkln5sm5kjdmrpmng059yellupyvwgay2v0lz6663swmds7hp0qul0eqc', tokens: ['lovelace']}), + tvl: sumTokensExport({ owner: 'addr1zx82ru5f7p8ewhhdvahueg2s4gxs3gxl66fkygdekkjs74sm5kjdmrpmng059yellupyvwgay2v0lz6663swmds7hp0q4vpw0l', tokens: ['lovelace']}), }, }; diff --git a/projects/dotoracle/index.js b/projects/dotoracle/index.js index 0911ba1624c9..c131683560be 100644 --- a/projects/dotoracle/index.js +++ b/projects/dotoracle/index.js @@ -14,7 +14,7 @@ const config = { usdt: ADDRESSES.ethereum.USDT, DAI: ADDRESSES.ethereum.DAI, frax: ADDRESSES.ethereum.FRAX, - fxs: '0x3432b6a60d23ca0dfca7761b7ab56459d9c964d0', + fxs: ADDRESSES.ethereum.FXS, maker: ADDRESSES.ethereum.MKR, aave: ADDRESSES.ethereum.AAVE, } diff --git a/projects/doubler/index.js b/projects/doubler/index.js index 4ecc77fbf9b3..98a8ad562867 100644 --- a/projects/doubler/index.js +++ b/projects/doubler/index.js @@ -1,4 +1,5 @@ -const WETH_CONTRACT = '0x82af49447d8a07e3bd95bd0d56f35241523fbab1'; +const ADDRESSES = require('../helper/coreAssets.json') +const WETH_CONTRACT = ADDRESSES.arbitrum.WETH; const DOUBLER_CONTRACT = '0x56386f04111057a5D8DF8d719827038B716333F0'; async function tvl(api) { diff --git a/projects/drift.js b/projects/drift.js index 702364a68c16..da3f57d84a58 100644 --- a/projects/drift.js +++ b/projects/drift.js @@ -1,4 +1,8 @@ +const { PublicKey } = require("@solana/web3.js"); +const anchor = require("@project-serum/anchor"); const { sumTokens2, } = require("./helper/solana"); +const DRIFT_PROGRAM_ID = new PublicKey('dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH') +const { getConfig } = require('./helper/cache') module.exports = { timetravel: false, @@ -8,11 +12,38 @@ module.exports = { }, }; -async function tvl() { - return sumTokens2({ - owners: [ - 'CU4eFxpyCGNDEXN27Jonn7RfgwBt3cnp7TcTrJF6EW9Q', // legacy - 'JCNCMFXo5M5qwUPg2Utu1u6YWp3MbygxqBsBeXXJfrw', // Drift vault - ], - }) +async function tvl(api) { + + const legacyVaults = [ + '6W9yiHDCW9EpropkFV8R3rPiL8LVWUHSiys3YeW6AT6S', // legacy usdc vault + 'Bzjkrm1bFwVXUaV9HTnwxFrPtNso7dnwPQamhqSxtuhZ', // legacy usdc insurance fund + ]; + const getSpotMarketVaultPublicKey = marketIndex => getVaultPublicKey('spot_market_vault', marketIndex) + const getInsuranceFundVaultPublicKey = marketIndex => getVaultPublicKey('insurance_fund_vault', marketIndex) + let configFile = await getConfig('drift-config', 'https://raw.githubusercontent.com/drift-labs/protocol-v2/master/sdk/src/constants/spotMarkets.ts') + const marketIndices = []; + configFile = configFile.slice(configFile.indexOf('MainnetSpotMarkets:')) + + const regex = /marketIndex:\s*(\d+),/g + let match; + while ((match = regex.exec(configFile))) { + marketIndices.push(parseInt(match[1])); + } + + const vaults = [ + ...legacyVaults, + ...marketIndices.map(getSpotMarketVaultPublicKey), + ...marketIndices.map(getInsuranceFundVaultPublicKey), + ] + + return sumTokens2({ tokenAccounts: vaults }) } + +function getVaultPublicKey(seed, marketIndex) { + return PublicKey.findProgramAddressSync( + [ + Buffer.from(anchor.utils.bytes.utf8.encode(seed)), + new anchor.BN(marketIndex).toArrayLike(Buffer, 'le', 2), + ], DRIFT_PROGRAM_ID)[0].toBase58() +} + diff --git a/projects/duet/bsc.js b/projects/duet/bsc.js index c833afef31ad..3480ab750bf2 100644 --- a/projects/duet/bsc.js +++ b/projects/duet/bsc.js @@ -1,14 +1,11 @@ const { getConfig } = require("../helper/cache"); -const collateralReaderContractABI = require("./abis/collateral-reader.json"); const ebcakeReaderContractABI = require("./abis/ebcake-reader.json"); const { getUniqueAddresses } = require('../helper/utils') -const BigNumber = require("bignumber.js"); const { sumTokens2 } = require("../helper/unwrapLPs"); const { staking } = require("../helper/staking"); const TOKEN_LIST_URL = "https://app.duet.finance/tokens.json"; -const COLLATERAL_READER_CONTRACT = "0xFfB8FD0E5eA13bb71401B19e00f9F934746f0b7A"; const DUET = '0x95EE03e1e2C5c4877f9A298F1C0D6c98698FAB7B' async function getEBCakeTvl(api) { @@ -51,16 +48,9 @@ async function tvl(api) { if (!tokens[i]) return; tokensAndOwners.push([tokens[i], underlyingMap[v]]) }) - // api.add('tether', (await getEBCakeTvl(api)) / 1e8, { skipChain: true }) await getEBCakeTvl(api) return sumTokens2({ tokensAndOwners, api, resolveLP: true, blacklistedTokens: [DUET]}) - - // const tokenTvls = await api.multiCall({ abi: collateralReaderContractABI.depositVaultValues, target: COLLATERAL_READER_CONTRACT, calls: uniqueVaults.map(i => ({ params: [[i], false] })) }) - // api.add('tether', (await getEBCakeTvl(api)) / 1e8, { skipChain: true }) - // tokenTvls.forEach(v => { - // if (v) api.add('tether', v[1][0] / 1e8, { skipChain: true }) - // }) } module.exports = { diff --git a/projects/dyad/index.js b/projects/dyad/index.js index ec95d77124b5..ad98f5fab901 100644 --- a/projects/dyad/index.js +++ b/projects/dyad/index.js @@ -5,12 +5,11 @@ const vaults = [ "0x7e5f2b8f089a4cd27f5b6b846306020800df45bd", // "0xf3768D6e78E65FC64b8F12ffc824452130BD5394", // Kerosene is own token "0x3D72f7Fc3A9537e1fcC6FBF91AF55CcF2c5C4ed0", + "0x3FC5c0e19b6287f25EB271c2E8e7Ba898FE7ab29", ] async function tvl(api) { const tokens = await api.multiCall({ abi: 'address:asset', calls: vaults }) - tokens.push(ADDRESSES.null) - vaults.push('0xdc400bbe0b8b79c07a962ea99a642f5819e3b712') return api.sumTokens({ tokensAndOwners2: [tokens, vaults] }) } diff --git a/projects/ease/index.js b/projects/ease/index.js index 953cbceadcbf..266eca108145 100644 --- a/projects/ease/index.js +++ b/projects/ease/index.js @@ -1,5 +1,3 @@ -const sdk = require('@defillama/sdk'); -const { default: BigNumber } = require('bignumber.js'); const { stakings } = require("../helper/staking"); const { getConfig } = require('../helper/cache') @@ -9,17 +7,11 @@ const NXM = "0xd7c49CEE7E9188cCa6AD8FF264C1DA2e69D4Cf3B"; // const ARNXM_VAULT = "0x1337DEF1FC06783D4b03CB8C1Bf3EBf7D0593FC4"; const STAKING_CONTRACTS = [ //BRIBE_POT - "0xEA5EdeF17C9be57228389962ba50b98397f1E28C", + "0xEA5EdeF17C9be57228389962ba50b98397f1E28C", //GV_EASE "0xEa5edeF1eDB2f47B9637c029A6aC3b80a7ae1550", ]; -const RCA_SHIELD = { - abis: { - uBalance: "uint256:uBalance" - }, -}; - const ARNXM_VAULT = { abis: { aum: "uint256:aum", @@ -31,17 +23,17 @@ async function tvl(api) { //get TVL of Uninsurance vaults let resp = await getConfig('ease', VAULT_LIST_URL); let vaults = resp.map(i => i.address.toLowerCase()).filter(i => i !== '0x8f247eb2d71beeacdf212f8bc748f09cdf7144c0') - const bals = await api.multiCall({ abi: 'uint256:uBalance', calls: vaults }) - const tokens = await api.multiCall({ abi: 'address:uToken', calls: vaults }) - const decimals = await api.multiCall({ abi: 'erc20:decimals', calls: tokens }) + const bals = await api.multiCall({ abi: 'uint256:uBalance', calls: vaults }) + const tokens = await api.multiCall({ abi: 'address:uToken', calls: vaults }) + const decimals = await api.multiCall({ abi: 'erc20:decimals', calls: tokens }) api.addTokens(tokens, bals.map((v, i) => v / 10 ** (18 - decimals[i]))) //get TVL of arNXM vault - const balNXM = await api.call({ target: ARNXM_VAULT.address, abi: ARNXM_VAULT.abis.aum, }); + const balNXM = await api.call({ target: ARNXM_VAULT.address, abi: ARNXM_VAULT.abis.aum, }); api.add(NXM, balNXM) } module.exports = { - ethereum:{ + ethereum: { tvl, staking: stakings(STAKING_CONTRACTS, EASE), }, diff --git a/projects/echo-bridge/index.js b/projects/echo-bridge/index.js new file mode 100644 index 000000000000..60fe3a95d0de --- /dev/null +++ b/projects/echo-bridge/index.js @@ -0,0 +1,8 @@ +const ADDRESSES = require('../helper/coreAssets.json') +const { sumTokensExport } = require('../helper/sumTokens') + +module.exports = { + bsquared: { + tvl: sumTokensExport({ owner: '0x5b1399B8b97fBC3601D8B60Cc0F535844C411Bd5', tokens: [ADDRESSES.bsquared.UBTC]}) + } +} \ No newline at end of file diff --git a/projects/econia.js b/projects/econia.js index 43682d065cee..c6fc3d330e78 100644 --- a/projects/econia.js +++ b/projects/econia.js @@ -1,5 +1,4 @@ const axios = require("axios"); -const BigNumber = require("bignumber.js"); const URL = 'https://aptos-mainnet-econia.nodeinfra.com'; diff --git a/projects/edgeX/index.js b/projects/edgeX/index.js new file mode 100644 index 000000000000..77bcb85f9ce3 --- /dev/null +++ b/projects/edgeX/index.js @@ -0,0 +1,26 @@ +const ADDRESSES = require('../helper/coreAssets.json'); +const { sumTokensExport } = require('../helper/unwrapLPs'); + +const walletAddresses = { + eth: ['0xc0a1a1e4af873e9a37a0cac37f3ab81152432cc5', '0xfAaE2946e846133af314d1Df13684c89fA7d83DD'], + bsc: ['0x0520b0a951658db92b8a2dd9f146bb8223638740'], + arbitrum: ['0xceeed84620e5eb9ab1d6dfc316867d2cda332e41'], +}; + +const tokenAddress = { + eth: [ADDRESSES.ethereum.USDT], + bsc: [ADDRESSES.bsc.USDT], + arbitrum: [ADDRESSES.arbitrum.USDT], +} + +module.exports = { + ethereum: { + tvl: sumTokensExport({ owners: walletAddresses.eth, tokens: tokenAddress.eth }), + }, + bsc: { + tvl: sumTokensExport({ owners: walletAddresses.bsc, tokens: tokenAddress.bsc }), + }, + arbitrum: { + tvl: sumTokensExport({ owners: walletAddresses.arbitrum, tokens: tokenAddress.arbitrum }), + }, +}; diff --git a/projects/ensuro/index.js b/projects/ensuro/index.js index 47ac5caf0486..231b15184a0c 100644 --- a/projects/ensuro/index.js +++ b/projects/ensuro/index.js @@ -7,7 +7,7 @@ const addressBook = { aave_v3_usdc: "0x625E7708f30cA75bfd92586e17077590C60eb4cD", // aPolUSDC aave_v2_usdc: "0x1a13F4Ca1d028320A707D99520AbFefca3998b7F", // amUSDC compound_v3_usdc: "0xF25212E676D1F7F89Cd72fFEe66158f541246445", // Compound USDC - mountain_usdm: "0x59D9356E565Ab3A36dD77763Fc0d87fEaf85508C", // Mountain USDM + mountain_usdm: ADDRESSES.ethereum.USDM, // Mountain USDM reserves: [ // eTokens {name: "eToken Junior Koala", address: "0x8d2Ee82c4172B2138B06b8037d769cBfAf9C0274"}, diff --git a/projects/ethereum-classic-stable-dollar/index.js b/projects/ethereum-classic-stable-dollar/index.js new file mode 100644 index 000000000000..a7d96f22adfa --- /dev/null +++ b/projects/ethereum-classic-stable-dollar/index.js @@ -0,0 +1,14 @@ +const ADDRESSES = require('../helper/coreAssets.json') +const { nullAddress, } = require('../helper/unwrapLPs') +const { sumTokensExport, } = require('../helper/sumTokens') + +module.exports = { + methodology: "The TVL of ECSD is the amount of ETC in the contract's reserve.", + ethereumclassic: { + tvl: sumTokensExport({ + owner: '0xCc3664d7021FD36B1Fe2b136e2324710c8442cCf', + tokens: [nullAddress], + }) + }, +} + diff --git a/projects/fbtc/index.js b/projects/fbtc/index.js new file mode 100644 index 000000000000..27ec3a12b39b --- /dev/null +++ b/projects/fbtc/index.js @@ -0,0 +1,28 @@ +const { sumTokens } = require('../helper/chain/bitcoin') +const sdk = require('@defillama/sdk') + +const staticAddresses = [ + // https://docs.fbtc.com/security/bitcoin-reserve-address + 'bc1qr5nz7n8ulcdz0w3s6fska80fawxhvqlh273qypm3rkjequ9wpmhs65ppw7', + 'bc1q7jgulg69frc8zuzy0ng8d5208kae7t0twyfjwm', + 'bc1q6c3c0t3zvnphce37ufr4yz9veaqvew2wg0shwr', + '3HjNJWcn2ayFLikzmKRaFtcbLufYChQo3T', + '374vhN24WryvNWUUZR2uDAnL4oNP5EW4qR', +] +const abi = { + getQualifiedUserInfo: "function getQualifiedUserInfo(address _user) view returns ((bool locked, string depositAddress, string withdrawalAddress) info)", +} +async function tvl() { + const api = new sdk.ChainApi({ chain: 'ethereum' }) + const users = await api.call({ abi: 'address[]:getQualifiedUsers', target: '0xbee335BB44e75C4794a0b9B54E8027b111395943' }) + const userInfos = await api.multiCall({ abi: abi.getQualifiedUserInfo, target: '0xbee335BB44e75C4794a0b9B54E8027b111395943', calls: users }) + userInfos.forEach(i => staticAddresses.push(i.depositAddress)) + return sumTokens({ owners: staticAddresses }) +} + +module.exports = { + timetravel: false, + bitcoin: { + tvl, + } +} \ No newline at end of file diff --git a/projects/filliquid/index.js b/projects/filliquid/index.js index 6df0d083b519..0e9283eb60bc 100644 --- a/projects/filliquid/index.js +++ b/projects/filliquid/index.js @@ -1,12 +1,10 @@ async function tvl(api) { // https://github.com/FILL-Lab/FILLiquid/blob/main/contracts/FILLiquid.sol - const res = await api.call({ abi: abi.getStatus, target: '0xFD669BDDfbb0d085135cBd92521785C39c95bA4b'}) - api.addGasToken(res.totalFIL) -} -const abi = { - getStatus: "function getStatus() view returns ((uint256 totalFIL, uint256 availableFIL, uint256 utilizedLiquidity, uint256 accumulatedDeposit, uint256 accumulatedRedeem, uint256 accumulatedBurntFILTrust, uint256 accumulatedMintFILTrust, uint256 accumulatedBorrow, uint256 accumulatedPayback, uint256 accumulatedInterest, uint256 accumulatedRedeemFee, uint256 accumulatedBorrowFee, uint256 accumulatedBadDebt, uint256 accumulatedLiquidateReward, uint256 accumulatedLiquidateFee, uint256 accumulatedDeposits, uint256 accumulatedBorrows, uint256 utilizationRate, uint256 exchangeRate, uint256 interestRate, uint256 collateralizedMiner, uint256 minerWithBorrows, uint256 rateBase))" + const res = await api.call({ abi: 'uint256:getTVL', target: '0xA25F892cF2731ba89b88750423Fc618De0959C43'}) + api.addGasToken(res) } module.exports = { + methodology: 'Get the total amount of pledge and account balance of fil in the statistical contract', filecoin: { tvl } } diff --git a/projects/finceptor/index.js b/projects/finceptor/index.js new file mode 100644 index 000000000000..856cb3bf5a4e --- /dev/null +++ b/projects/finceptor/index.js @@ -0,0 +1,15 @@ +const FINC_TOKEN_CONTRACT = '0xA856098dCBc1b2B3a9C96C35c32bC4f71E49AEd2'; +const FINCEPTOR_STAKING_AMOUNTS_CONTRACT = '0xA8a15EC4D496521D3a4B70e3cC2c15fF1701E3BE'; + +async function staking(api) { + const stakedBalance = await api.call({ abi: 'uint256:totalStaked', target: FINCEPTOR_STAKING_AMOUNTS_CONTRACT, }) + api.add(FINC_TOKEN_CONTRACT, stakedBalance) +} + +module.exports = { + methodology: 'gets the total number of FINC tokens locked in all active staking contracts of Finceptor.', + bsc: { + tvl: () => ({}), + staking, + } +} \ No newline at end of file diff --git a/projects/firoza-finance/index.js b/projects/firoza-finance/index.js new file mode 100644 index 000000000000..d7af333b1a6c --- /dev/null +++ b/projects/firoza-finance/index.js @@ -0,0 +1,30 @@ +const { getConfig } = require('../helper/cache') +const { sumERC4626Vaults } = require('../helper/erc4626'); +const { sumTokens2 } = require('../helper/unwrapLPs'); + +const POOL_API_URL = "https://firoza.finance/api/pools"; + +async function tvl(api) { + const poolAddresses = await getConfig('firoza', POOL_API_URL); + const assets = await api.multiCall({ abi: 'address:asset', calls: poolAddresses}) + return sumTokens2({ api, tokensAndOwners2: [assets, poolAddresses] }) +} + +async function borrowed(api) { + const poolAddresses = await getConfig('firoza', POOL_API_URL); + const assets = await api.multiCall({ abi: 'address:asset', calls: poolAddresses}) + await sumERC4626Vaults({ api, calls: poolAddresses, isOG4626: true, }); + const calls = assets.map((target, i) => ({ target, params: poolAddresses[i] })); + const tokenBals = await api.multiCall({ abi: 'erc20:balanceOf', calls }) + tokenBals.forEach((bal, i) => api.add(assets[i], bal * -1)) + return sumTokens2({ api }) +} + + +module.exports = { + methodology: "TVL counts the tokens deposited in the Firoza Finance pools.", + islm: { tvl, borrowed, }, + hallmarks: [ + [1688169600, "Launch on ISLM"] + ], +}; \ No newline at end of file diff --git a/projects/flapdotsh/index.js b/projects/flapdotsh/index.js new file mode 100644 index 000000000000..289eb41a3c42 --- /dev/null +++ b/projects/flapdotsh/index.js @@ -0,0 +1,14 @@ +const { sumTokensExport } = require("../helper/unwrapLPs"); +const coreAssets = require("../helper/coreAssets.json"); + +const portal = [ + "0xe2ce6ab80874fa9fa2aae65d277dd6b8e65c9de0", +]; + +const tokens = [coreAssets.null]; + +module.exports = { + bsc: { + tvl: sumTokensExport({ owners: portal, tokens }) + }, +}; \ No newline at end of file diff --git a/projects/fluid/index.js b/projects/fluid/index.js index 1f4e067c8cc9..1765f6eadb4d 100644 --- a/projects/fluid/index.js +++ b/projects/fluid/index.js @@ -22,6 +22,9 @@ const config = { arbitrum: { liquidityResolver: (block) => "0x46859d33E662d4bF18eEED88f74C36256E606e44", }, + base: { + liquidityResolver: (block) => "0x35A915336e2b3349FA94c133491b915eD3D3b0cd", + }, }; async function getListedTokens(api) { @@ -62,7 +65,7 @@ async function borrowed(api) { const tokens = await getListedTokens(api); const borrowed = await api.call({ target: config[api.chain].liquidityResolver(api.block), - abi: api.block < 19992056 ? abi.getOverallTokensDataLegacy : abi.getOverallTokensData, + abi: api.chain == "ethereum" && api.block < 19992056 ? abi.getOverallTokensDataLegacy : abi.getOverallTokensData, params: [tokens], }); api.add( @@ -75,5 +78,6 @@ module.exports = { methodology: methodologies.lendingMarket, ethereum: { tvl, borrowed }, arbitrum: { tvl, borrowed }, + base: { tvl, borrowed }, }; // node test.js projects/fluid/index.js diff --git a/projects/fortunafi-fbill/index.js b/projects/fortunafi-fbill/index.js deleted file mode 100644 index 208728f2e2f6..000000000000 --- a/projects/fortunafi-fbill/index.js +++ /dev/null @@ -1,32 +0,0 @@ -const ADDRESSES = require('../helper/coreAssets.json') - -const contracts = { - canto: { - token: '0x79ECCE8E2D17603877Ff15BC29804CbCB590EC08' - }, - arbitrum: { - token: '0x79ECCE8E2D17603877Ff15BC29804CbCB590EC08' - }, - blast: { - token: '0x79ECCE8E2D17603877Ff15BC29804CbCB590EC08' - } -} - -const tvl = async (api) => { - const nav = await api.call({ target: contracts[api.chain].token, abi: 'function nav() external view returns (uint256)' }); - - switch (api.chain) { - case 'blast': - api.add(ADDRESSES['blast'].USDB, nav); - break; - default: - api.add(ADDRESSES[api.chain].USDC, nav / 1e12); - } -} - -module.exports = { - misrepresentedTokens: true, - canto: { tvl }, - arbitrum: { tvl }, - blast: { tvl } -}; diff --git a/projects/fortunafi-ifbill/index.js b/projects/fortunafi-ifbill/index.js deleted file mode 100644 index 0b20c6c11da9..000000000000 --- a/projects/fortunafi-ifbill/index.js +++ /dev/null @@ -1,31 +0,0 @@ -const ADDRESSES = require('../helper/coreAssets.json') - -const contracts = { - canto: { - token: '0x45bafad5a6a531Bc18Cf6CE5B02C58eA4D20589b' - }, - arbitrum: { - token: '0x45bafad5a6a531Bc18Cf6CE5B02C58eA4D20589b' - }, - blast: { - token: '0x45bafad5a6a531Bc18Cf6CE5B02C58eA4D20589b' - } -}; - -const tvl = async (_, _1, _2, { api }) => { - const nav = await api.call({ target: contracts[api.chain].token, abi: 'function nav() external view returns (uint256)' }); - - switch (api.chain) { - case 'blast': - api.add(ADDRESSES['blast'].USDB, nav); - break; - default: - api.add(ADDRESSES[api.chain].USDC, nav / 1e12); - } -} - -module.exports = { - canto: { tvl }, - arbitrum: { tvl }, - blast: { tvl } -}; diff --git a/projects/fortunafi/index.js b/projects/fortunafi/index.js new file mode 100644 index 000000000000..16071d86359a --- /dev/null +++ b/projects/fortunafi/index.js @@ -0,0 +1,35 @@ + +const config = { + canto: { + fbill: '0x79ECCE8E2D17603877Ff15BC29804CbCB590EC08', + fCOIN: '0x855EA9979189383ef5A85eB74Ed3a02E2604EA81', + ifBill: '0x45bafad5a6a531Bc18Cf6CE5B02C58eA4D20589b', + }, + arbitrum: { + fbill: '0x79ECCE8E2D17603877Ff15BC29804CbCB590EC08', + fCOIN: '0x108Ec61bd5A91F5596F824832524C6b6002E3F03', + ifBill: '0x45bafad5a6a531Bc18Cf6CE5B02C58eA4D20589b', + }, + blast: { + fbill: '0x79ECCE8E2D17603877Ff15BC29804CbCB590EC08', + fCOIN: '0xE85Ae7e8Fa0Ee69426019b7D3E77843673807ABE', + ifBill: '0x45bafad5a6a531Bc18Cf6CE5B02C58eA4D20589b', + }, + ethereum: { + fCOIN: '0x2378aC4EEAAe44695E1e3d0fcAEEd6ba8b0F5108', + }, +} + +module.exports = { + misrepresentedTokens: true, +} + +Object.keys(config).forEach(chain => { + const tConfig = config[chain] + module.exports[chain] = { + tvl: async (api) => { + const nav = await api.multiCall({ abi: 'uint256:nav', calls: Object.values(tConfig), permitFailure: true }) + api.addCGToken('tether', nav.reduce((acc, i) => acc + (i ?? 0)/1e18, 0)) + } + } +}) diff --git a/projects/fpi/index.js b/projects/fpi/index.js index 24cf40c7a7fb..99d24c8518ed 100644 --- a/projects/fpi/index.js +++ b/projects/fpi/index.js @@ -1,7 +1,7 @@ const ADDRESSES = require('../helper/coreAssets.json') const frax = ADDRESSES.ethereum.FRAX -const fxs = "0x3432b6a60d23ca0dfca7761b7ab56459d9c964d0" +const fxs = ADDRESSES.ethereum.FXS async function tvl(api){ const balances = {} diff --git a/projects/fraxfinance/index.js b/projects/fraxfinance/index.js index 7203aed3a44a..acb073dfecc8 100644 --- a/projects/fraxfinance/index.js +++ b/projects/fraxfinance/index.js @@ -4,7 +4,7 @@ const { staking, } = require("../helper/staking"); const { sumTokens2, nullAddress, } = require("../helper/unwrapLPs"); const USDC = ADDRESSES.ethereum.USDC; -const FXS = "0x3432b6a60d23ca0dfca7761b7ab56459d9c964d0"; +const FXS = ADDRESSES.ethereum.FXS; const FRAX_3CRV = '0xd632f22692fac7611d2aa1c0d552930d43caed3b' const T_3CRV = '0x6c3F90f043a72FA612cbac8115EE7e52BDe6E490' diff --git a/projects/fraxlend/index.js b/projects/fraxlend/index.js index c8bb6771f3fb..ef6e0a08debc 100644 --- a/projects/fraxlend/index.js +++ b/projects/fraxlend/index.js @@ -15,8 +15,8 @@ const registry_config = { const frax_config = { ethereum: ADDRESSES.ethereum.FRAX, - fraxtal: "0xFc00000000000000000000000000000000000001", - arbitrum: "0x17FC002b466eEc40DaE837Fc4bE5c67993ddBd6F" + fraxtal: ADDRESSES.fraxtal.FRAX, + arbitrum: ADDRESSES.arbitrum.FRAX } async function tvl(api) { diff --git a/projects/fwx-dex/index.js b/projects/fwx-dex/index.js new file mode 100644 index 000000000000..5a1bd24e4a6a --- /dev/null +++ b/projects/fwx-dex/index.js @@ -0,0 +1,37 @@ +const { getLogs } = require('../helper/cache/getLogs') +const { transformDexBalances } = require('../helper/portedTokens') + +const config = { + avax: { factory: '0x2131Bdb0E0B451BC1C5A53F2cBC80B16D43634Fa', fromBlock: 46372045 }, +} + +module.exports = { + misrepresentedTokens: true, +}; + +Object.keys(config).forEach(chain => { + module.exports[chain] = { tvl } +}) + + +async function tvl(api) { + const { factory, fromBlock } = config[api.chain] + const logs = await getLogs({ + api, + target: factory, + topics: ['0x0d3648bd0f6ba80134a33ba9275ac585d9d315f0ad8355cddefde31afa28d0e9'], + eventAbi: 'event PairCreated(address indexed token0, address indexed token1, address pair, uint256 )', + onlyArgs: true, + fromBlock, + }) + const tok0Bals = await api.multiCall({ abi: 'erc20:balanceOf', calls: logs.map(i => ({ target: i.token0, params: i.pair })) }) + const tok1Bals = await api.multiCall({ abi: 'erc20:balanceOf', calls: logs.map(i => ({ target: i.token1, params: i.pair })) }) + return transformDexBalances({ + chain: api.chain, data: logs.map((log, i) => ({ + token0: log.token0, + token0Bal: tok0Bals[i], + token1: log.token1, + token1Bal: tok1Bals[i], + })) + }) +} \ No newline at end of file diff --git a/projects/fyde/index.js b/projects/fyde/index.js index ca92d3c59305..802dfef06c96 100644 --- a/projects/fyde/index.js +++ b/projects/fyde/index.js @@ -5,6 +5,8 @@ const RESTAKING_AGGREGATOR = "0x3f69F62e25441Cf72E362508f4d6711d53B05341"; const DEPOSIT_ESCROW = "0x63ec950633Eb85797477166084AD0a7121910470"; const ORACLE = "0x05198327206123E89c24ABd9A482316449bD2aEe" const WETH = ADDRESSES.ethereum.WETH; +const YIELDMANAGER = "0xB615A7E4D1Ed426470Ac2Df14F3153fA2DcCC3ba" +const PTTOKENS = ["0x1c085195437738d73d75DC64bC5A3E098b7f93b1", "0x6ee2b5e19ecba773a352e5b21415dc419a700d1d"] async function tvl(api) { const tokens = await api.fetchList({ lengthAbi: 'getAssetsListLength', itemAbi: 'assetsList', target: FYDE_CONTRACT }) @@ -38,7 +40,10 @@ async function tvl(api) { // add assets in the deposit escrow const tokensEscrow = await api.fetchList({ lengthAbi: 'getAssetListLength', itemAbi: 'assetList', target: DEPOSIT_ESCROW }) - return api.sumTokens({ tokens: tokensEscrow, owner: DEPOSIT_ESCROW }) + return api.sumTokens({ ownerTokens: [ + [tokensEscrow, DEPOSIT_ESCROW], + [PTTOKENS, YIELDMANAGER], + ],}) } module.exports = { diff --git a/projects/gluon-gold/index.js b/projects/gluon-gold/index.js new file mode 100644 index 000000000000..04e44f05a728 --- /dev/null +++ b/projects/gluon-gold/index.js @@ -0,0 +1,13 @@ +const { sumTokensExport } = require('../helper/sumTokens') +const ADDRESSES = require('../helper/coreAssets.json') + +module.exports = { + ergo: { + tvl: sumTokensExport({ + owners: [ + 'E81MR2gGkYE1vDkdcGYns4wYehfJLdX6hpwHMGrhwKEirNBZ6JRUKopeU1i7jT4NkgdM8GpL8bhFCyXFJuSaj8tiWSs28rq6Go3H5regcwr67yWiAy97RmXh94ierf8YuELivuMfwkEZd4X81RrfFJ2GDKzxmSdqUP6D4mXqepnxWcCvqGgk7DR1tKKuBJNroWaDSuDwrKASw68KuGspCbd1pgHs2iWzxirT4NTXq2rfPqmSJ7cqUQnd1mamB583H2ZC4esNzjqyMcvsQi6QFePSg8bwYbCTs4e8Nz42bZoUNQktFpteqwhcA5NRwXN7vDVQBGgHXr8KY3fDKmhoQiwTbrZLB5qzJ1UpCoAd4h88CERG7VbH4z5nyJC5c3j1SuEE5dSXPNtYR6yiGhNq2TCHNb24f5eZcBpBUQ6qviecoDtxPb78qnR2gBn4HcHGBWBZxfXJ3ZC7NPtNWreWWPuGMF5QF7EgswjALFHNDzRdkJpbsbrdaVbFNq9vC6Adug2P5NXnBjsr7wYTQrB4neWFNLS4vWQqgTYu3Cuap1V7mc13u7tK6X3s1wod6psy6cTWak1SEYtUcjwwvjHhQqn8R2D9G81jiH7efpCt9JdgCYoamioDfLaTFx7S2Su55bjLaD8JLsUyNL1LkDcmcUfhtiTAkM1mUDGswAHk6wDtoVUEuR59T94LUv9SFddZ2p1vJYi32AUAEZu66UiGkGeBDnNSq38mgiwta1X6SsNtv1mgZjkLx45Vun538ekYwWZ51EcvRgMScogtZ5xBDk1RRPn3HkXQLWGKr4yEFSwjuDNy8d4LbWUJ8n4prMvxQ8G5h7rUj9dJ5kz7YzKZRNF5VBmCAacYocgUUnEwQbVbkvFDDt7FQAQnNmY7tyjDQEJaeAviWp2Gtoewh7ShDDLgX69gB9XcAjuYn9Tbfvm6FLnfNE9qusqL76GnaPeJRf6LNR6JczQVBGhS4NUy6sBSSfq4oWFYbShUGTe3zLG9JFMcdAKZR7NwyHyKBM5Zj5w5kXroL1xLPahxBz6hiQmz9xcJGGWNQsNR2Acirx3PmQ1V23sSqjhLmDMRVYquStc8o86JUH7KzBjm12nAfdq4pN6LAfKdCvLwdQQn9MQxmcquog9EiQccdURgF9NJK1CwWgcgrfXLtSkm5JwbTPgQjd5HFR9y26DtLJr36RWZHrbv9zvv9GawT3J2jWQEk9Ue41zMRp9jjMP57S4JdWdVvPuxYSJf2e7y4diN9w3XxQYZv21Eq91DduD9dWE7aYbdJiXu2DpM8VRdTpC9K3xXhzSkczHWKpftYZyNQq8KQsQBPHLc5pQFfi7Fqr4YCPk4ZFmRSiY6MsnkJc2rtzYAi9BKh9wAGZteAE8oWqphhiTBbEwHUiZdXAKe1BSPrQFsrc2Q6oizcgwm4rjmESMv3PGoQCpCAuvQL1kd9TULwsng7vRyMsUUh2KvCFSHrpqaDEpXEXH5rjFRzzwL2FBU6VATpeDj2BBS5NcxwrDqCcbEBerq3QYHSkQr1dd3MeATt5HzaGyA8xLvfohHdgZ4rWGT9zQf7rCk2xPeh1G8KRqSEDE4SUtBZxZbxF34dPxJDr4xqzjG2FKPtptkmXrBWNV3DVxPn5V8WL8bCo6HraLdUcmDJN7kn8dYSEgFhr4nwtCt4yKdsVtmAHEMhaMmGVRd92kiE5Xtc2ey3ZsHuWHRQX1T5Dw8xCCJngGcas3eMMr2J2N8cYFJkqCzuNPn8JZM9wqQBNay7ygsSR8Jj2ffo6veKRZSkcLzpCLWrxYj7LhMRxLkxLGY64GmWXL1aoyjQar3mFph6ZYmYUD3G934YTRKkUpV56VsNmSVxrNFbRCEotZ2s5Xzn5UJDU3NtaqDE4WqckKK7AXXB7DTLKfwT39RxjFep7xep6HThP7TfhL15KwB1RhgYF8cmExFwWoiMKsGkF9P3Jy6PZBVa4pWEXGCF8pUfprjKUffUm8wa8c4UQXNKSGd19y9sscamFqa5iEsxmDFXti6bqcGmG58ggneM8k9P91QBzoMy1JZFxv955n9CQV27wWJmaWRErjrpbtgJQmVx1fhQDCmQJvTHduSYmZBjYRi7TrYkjfBc1pheMgH6uzxJ6LJ92T7B1kPqvMTwiDareuW7mcR9rNwUNorWZMvH8uACNd1sqoERGtfVLkNTirmWJ6nfnqw1WPPgiCQ5nBcixusHy26btdvEVmjDjx9iNb3RPJKCiDbQLBq1yZEbyTCu8T9yRXvCexFqz4DPN5NmjFFPvPtgmvpds1DEdGVVTfwAY4THxLTVyD4z87FEk5gGzn1Csod1ZDNctHpYpPpfk9CVgzXwp3z2D75KJvNu9jUVvMyVBS53WdnELYwcEsWdappt9y2fmefQmYuAww3ekvFGDA4KnxfpCCixHMcrSZX6khifCuqn6prTDFDAT7ssCt7QJKB7KpGreh9tE7SHqSAAkPUuiJNHqn6xPHVKFGmrV5fjy1zNMGLdpebEL5f37jXzPGCpmRXJ9ZCz3REznoZNNg1o4UJoACKuvcfbcg91CMZS6ZvhNp6WXYMNSZqgCcGpkTSS5Dvy5hHTy71bJhSoQPvusCP8v5C5ammcpiDSHeKoKyUJy5JghCnAiAYqZoN9MMATR64YmBqmzFxVqHdE9WqYYwkt7EerA2szprVoh5UwWfUFMkyCiAUUxmYdPodLpYaVZwBcMv5SiZuWEnX51H1oowEVj7qhr3SGRapBpYZmiLDdVSKtqru11XfQJfbCiG4uYk3U9ZsvzcZv5oXTmKCB4XEKFv7bK8w3wbpmgBCYJMZZ5JrTE8iZKKgL3TmiM9q2v1ggxtVq932axuw4ncELjL6oJ4Bo7Uck2zogD11KvhTGuSHwBk84cUpqCMSsauFiVSaZ47uYXKdAXNZKF3JRvzNjGePgDRnPMMruyztbNfNgRM3fz39s6NYRVGMth6MS5jbw1PYkYhp4nv66bjPpU7tGXuy6JhsT3iAZ52nKzNN88pPKJVMhi9mtA5hQtmTNfzQGZtC7EfVz5yd7TKXgPhUaCYD4KQSKASvi66nwkee1NUDPPA6kYU12ppV6PCzXg3Q6AX5mWPQv8eAg5PxUVCvAvRpuvZNUZWRCbJxgQEgNRfCYbsdT27z4MFttDw54bPDNZfWcNBP7Q6FRq5iJ6EcaXGof3sWPvjKXQ3G3VGBBJ4JhkzAFMcv274tnCMvfE6xQt4DDHFsWjTHbR4Mp8UZ49gDnUWqtMPH1KVXFQKJdDBUTmDrBSM3u33Ed3dKefqzeqWvhLvXVnfdSrUJhqa3bFsKzwMyeGjxdyuide5rZRff4JsT5Hb8erq4qUwckcWErv6L4kgJZc6MWREswrQn4KbrDHNUU1RxXzCKnhQfYMsKQT11XKB2uwHnF4b1CTkTJhafQSxiHFGA4KTP1qpftK3HtJaDRnw7wGoJqVoptAgBC6hmbWd1SdqDHC2e5dQUvXDciqkAv8vwWMxK6UWXzPkv4MMf11Dnmh1PFtbnZ26sJmoPwp4gWmWsidqtGvKRYdFiadMSAWfkpTQnWmQV5tBU51SbFMihDhSYHc835fVvEHZWzZUj2FhqSazJaoCgPiaQN38zeJ4SE2rZ8vhXy4m2UXuB1ZjsvHVqLJvmbgC33CqEMicoT4P4vjuhHUsVuwspcWYkW87ZaCj5qMfqxt4ZnygnGssjsQfXK6GMtNeR4iDJK9qHncBbJ5ye5Lih2tyU1JFB2FcZYB7dQSHGpUS6bMFktFNgPhCZ5CGjgCiKQAYBe4jx6TJDinLjWQ9P', + ], + tokens: [ADDRESSES.null], + }) + } +} \ No newline at end of file diff --git a/projects/gudchain/index.js b/projects/gudchain/index.js index 3d6d22fec118..05acdf355112 100644 --- a/projects/gudchain/index.js +++ b/projects/gudchain/index.js @@ -1,3 +1,4 @@ +const ADDRESSES = require('../helper/coreAssets.json') const { sumTokensExport } = require("../helper/unwrapLPs"); const launchBridge = "0xd759e176DEF0F14e5C2D300238d41b1CBB5585BF"; @@ -8,14 +9,14 @@ module.exports = { owner: launchBridge, start: 20203960, tokens: [ - "0x0000000000000000000000000000000000000000", - "0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84", + ADDRESSES.null, + ADDRESSES.ethereum.STETH, "0xa2E3356610840701BDf5611a53974510Ae27E2e1", "0xd5F7838F5C461fefF7FE49ea5ebaF7728bB0ADfa", - "0x6B175474E89094C44Da98b954EedeAC495271d0F", - "0x83F20F44975D03b1b09e64809B757c47f942BEeA", - "0xdAC17F958D2ee523a2206206994597C13D831ec7", - "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48" + ADDRESSES.ethereum.DAI, + ADDRESSES.ethereum.SDAI, + ADDRESSES.ethereum.USDT, + ADDRESSES.ethereum.USDC ] }) } diff --git a/projects/hbtc.js b/projects/hbtc.js index c75e4383f43a..9fc2122d5820 100644 --- a/projects/hbtc.js +++ b/projects/hbtc.js @@ -1,9 +1,7 @@ -const sdk = require('@defillama/sdk') - -async function tvl(ts, block) { - return { - '0x0316EB71485b0Ab14103307bf65a021042c6d380': (await sdk.api.erc20.totalSupply({ target: '0x0316EB71485b0Ab14103307bf65a021042c6d380', block })).output - } +async function tvl(api) { + const hbtc = '0x0316EB71485b0Ab14103307bf65a021042c6d380' + const supply = await api.call({ abi: 'erc20:totalSupply', target: hbtc }) + api.add(hbtc, supply) } module.exports = { diff --git a/projects/helper/abis/blindex.json b/projects/helper/abis/blindex.json deleted file mode 100644 index 3ee9c7df2daf..000000000000 --- a/projects/helper/abis/blindex.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "bdstable_pools_array": "function bdstable_pools_array(uint256) view returns (address)", - "getBdStablesPoolsLength": "uint256:getBdStablesPoolsLength", - "getBDStablePoolCollateral": "address:collateral_token", - "getBDStable": "function bdstables(uint256) view returns (address)", - "getBdStablesLength": "uint256:getBdStablesLength", - "getBDXPriceUsdD12": "uint256:BDX_price_d12" -} \ No newline at end of file diff --git a/projects/helper/abis/blockng.json b/projects/helper/abis/blockng.json deleted file mode 100644 index ef90ca5bb64b..000000000000 --- a/projects/helper/abis/blockng.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "getPoolInfo": "function getPoolInfo(address, address, uint256, uint256) view returns (tuple(address lpTokenAddress, address subTokenAddress, string subTokenSymbol, address dexFactory, address gaugeAddress, uint256 gaugeTotalSupply, uint256 lpPrice, uint256 gaugeAPR, address bribeAddress, int256 weights, uint256 punkId)[] beams)", - "numberOfPool": "function numberOfPool(address voter) view returns (uint256 len)" -} \ No newline at end of file diff --git a/projects/helper/cex.js b/projects/helper/cex.js index 3c4210a714eb..1ab2338cb615 100644 --- a/projects/helper/cex.js +++ b/projects/helper/cex.js @@ -86,7 +86,7 @@ const defaultTokens = { '0xaaef88cea01475125522e117bfe45cf32044e238', // GF '0x949d48eca67b17269629c7194f4b727d4ef9e5d6', // MC '0xbb0e17ef65f82ab018d8edd776e8dd940327b28b', // AXS - '0x3432b6a60d23ca0dfca7761b7ab56459d9c964d0', // FXS + ADDRESSES.ethereum.FXS, // FXS '0xd417144312dbf50465b1c641d016962017ef6240',// cqt '0xcb84d72e61e383767c4dfeb2d8ff7f4fb89abc6e', //VEGA '0xcccd1ba9f7acd6117834e0d28f25645decb1736a', //ecox @@ -109,6 +109,7 @@ const defaultTokens = { "0x23878914efe38d27c4d67ab83ed1b93a74d4086a", //aEthUSDT "0x4d5f47fa6a74757f35c14fd3a6ef8e3c9bc514e8", // aEthWETH "0x98c23e9d8f34fefb1b7bd6a91b7ff122f4e16f5c", // aEthUSDC + "0x6982508145454ce325ddbe47a25d4ec3d2311933" // PEPE ], tron: [ nullAddress, @@ -173,6 +174,7 @@ const defaultTokens = { '0xe9d78bf51ae04c7e1263a76ed89a65537b9ca903', // GMEX '0x59769630b236398c2471eb26e6a529448030d94f', //NKYC nonkyc exchange token '0xbf5140a22578168fd562dccf235e5d43a02ce9b1', // UNI + '0x25d887ce7a35172c62febfd67a1856f20faebb00', //pepe ], eos: [ ["eosio.token", "EOS", "eos"], @@ -188,6 +190,7 @@ const defaultTokens = { '0x088cd8f5ef3652623c22d48b1605dcfe860cd704', //vela ADDRESSES.arbitrum.LPT, //lpt '0x51fc0f6660482ea73330e414efd7808811a57fa2', //premia + '0x25d887ce7a35172c62febfd67a1856f20faebb00', //pepe ], avax: [ nullAddress, diff --git a/projects/helper/chain/algorand.js b/projects/helper/chain/algorand.js index 9a36d84581f2..af9476fc014b 100644 --- a/projects/helper/chain/algorand.js +++ b/projects/helper/chain/algorand.js @@ -4,7 +4,6 @@ const axios = require('axios') const { getApplicationAddress } = require('./algorandUtils/address') const { RateLimiter } = require("limiter"); const coreAssets = require('../coreAssets.json') -const ADDRESSES = coreAssets const sdk = require('@defillama/sdk'); const { default: BigNumber } = require('bignumber.js'); const stateCache = {} diff --git a/projects/helper/chain/bitcoin.js b/projects/helper/chain/bitcoin.js index ac1a531d9c7a..dbd183809bd8 100644 --- a/projects/helper/chain/bitcoin.js +++ b/projects/helper/chain/bitcoin.js @@ -1,31 +1,74 @@ const sdk = require('@defillama/sdk') const { get } = require('../http') const { getEnv } = require('../env') +const { getUniqueAddresses } = require('../tokenMapping') +const { RateLimiter } = require("limiter"); const url = addr => 'https://blockstream.info/api/address/' + addr +const url2 = addr => 'https://rpc.ankr.com/http/btc_blockbook/api/address/' + addr +const url3 = addrs => 'https://blockchain.info/multiaddr?active=' + addrs.join('|') const delay = 3 * 60 * 60 // 3 hours const balancesNow = { } + +const limiter = new RateLimiter({ tokensPerInterval: 1, interval: 10_000 }); + +async function _sumTokensBlockchain({ balances = {}, owners = [], }) { + console.time('bitcoin' + owners.length + '___' + owners[0]) + const { addresses } = await get(url3(owners)) + for (const addr of addresses) + sdk.util.sumSingleBalance(balances, 'bitcoin', addr.final_balance / 1e8) + + console.timeEnd('bitcoin' + owners.length + '___' + owners[0]) + return balances +} + +const withLimiter = (fn, tokensToRemove = 1) => async (...args) => { + await limiter.removeTokens(tokensToRemove); + return fn(...args); +} + +const sumTokensBlockchain = withLimiter(_sumTokensBlockchain) + async function getBalanceNow(addr) { if (balancesNow[addr]) return balancesNow[addr] + try { + + const { chain_stats: { + funded_txo_sum, spent_txo_sum, + } } = await get(url(addr)) + + balancesNow[addr] = (funded_txo_sum - spent_txo_sum) / 1e8 + + } catch (e) { + sdk.log('bitcoin balance error', addr, e.toString()) - const { chain_stats: { - funded_txo_sum, spent_txo_sum, - } } = await get(url(addr)) + const { balance } = await get(url2(addr)) + balancesNow[addr] = balance + } - balancesNow[addr] = (funded_txo_sum - spent_txo_sum) / 1e8 return balancesNow[addr] } async function sumTokens({ balances = {}, owners = [], timestamp }) { if (typeof timestamp === "object" && timestamp.timestamp) timestamp = timestamp.timestamp - const bitBals = [] + owners = getUniqueAddresses(owners, 'bitcoin') + const now = Date.now() / 1e3 + + if (!timestamp || (now - timestamp) < delay) { + try { + await sumTokensBlockchain({ balances, owners }) + return balances + } catch (e) { + sdk.log('bitcoin sumTokens error', e.toString()) + } + } + for (const addr of owners) - bitBals.push(await getBalance(addr, timestamp)) - sdk.util.sumSingleBalance(balances, 'bitcoin', bitBals.reduce((a, i) => a + i, 0)) + sdk.util.sumSingleBalance(balances, 'bitcoin', await getBalance(addr, timestamp)) return balances } diff --git a/projects/helper/chains.json b/projects/helper/chains.json index e0dccafc7543..1d21a6407af4 100644 --- a/projects/helper/chains.json +++ b/projects/helper/chains.json @@ -151,6 +151,7 @@ "iotex", "islm", "jbc", + "joltify", "juno", "kadena", "karak", @@ -226,6 +227,7 @@ "orai", "ore", "osmosis", + "ox_chain", "ozone", "palette", "palm", @@ -264,6 +266,7 @@ "rss3_vsl", "rvn", "saakuru", + "sanko", "sapphire", "scroll", "secret", @@ -326,12 +329,10 @@ "zeniq", "zeta", "zilliqa", + "zkcro", "zkfair", "zklink", "zksync", "zora", - "zyx", - "joltify", - "sanko", - "ox_chain" + "zyx" ] diff --git a/projects/helper/coreAssets.json b/projects/helper/coreAssets.json index 9fd47702a747..d11ebf23c1a6 100644 --- a/projects/helper/coreAssets.json +++ b/projects/helper/coreAssets.json @@ -513,7 +513,6 @@ "_AVAX": "0x525bd1f949ffa2a0c5820f3b6fe61bb897466ff7", "SWAPZ": "0x9b6fbf0ea23faf0d77b94d5699b44062e5e747ac", "DAI": "0xe3f5a90f9cb311505cd691a46596599aa1a0ad7d", - "SCAR": "0x8d9fb713587174ee97e91866050c383b5cee6209", "sVLX": "0xaadbaa6758fc00dec9b43a0364a372605d8f1883", "VLX": "0x2b1abeb48f875465bf0d3a262a2080ab1c7a3e39", "ETH_1": "0x380f73bad5e7396b260f737291ae5a8100baabcd", @@ -1294,7 +1293,8 @@ "MEGA": "EQBf6-YoR9xylol_NwjHrLkrTFAZJCX-bsd-Xx_902OaPaBf", "WEMIX": "EQCf7Nb341dxOE3N0jimngRxGEV8T3zo-eU2EZVs_nchNhhZ", "jUSDT": "EQBynBO23ywHy_CgarY9NK9FTz0yDsG82PtcbSTQgGoXwiuA", - "USDT": "EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs" + "USDT": "EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs", + "NOT": "EQAvlWFDxGF2lXm67y4yzC17wYKD9A0guwPkMs1gOsM__NOT" }, "defichain": { "DFI": "DFI", @@ -1420,7 +1420,8 @@ "USDC": "0x15D38573d2feeb82e7ad5187aB8c1D52810B1f07", "USDT": "0x0Cb6F5a34ad42ec934882A05265A7d5F59b51A2f", "HEX": "0x2b591e99afe9f32eaa6214f7b7629768c40eeb39", - "DAI": "0xefd766ccb38eaf1dfd701853bfce31359239f305" + "DAI": "0xefd766ccb38eaf1dfd701853bfce31359239f305", + "sDAI": "0x30fcb23a906493371b1721c8feb8815804808d74" }, "onus": { "WONUS": "0x4c761e48d1e735af551cc38abcbdce1d7faac6e4", @@ -1470,7 +1471,8 @@ "WETH": "0x4200000000000000000000000000000000000006", "USDbC": "0xd9aAEc86B65D86f6A7B5B1b0c42FFA531710b6CA", "USDC": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", - "DAI": "0x50c5725949a6f0c72e6c4a641f24049a917db0cb" + "DAI": "0x50c5725949a6f0c72e6c4a641f24049a917db0cb", + "USDT": "0xfde4C96c8593536E31F229EA8f37b2ADa2699bb2" }, "sei": { "SEI": "usei", @@ -1575,7 +1577,8 @@ "BIFI": "0x047938C3aD13c1eB821C8e310B2B6F889b6d0003", "WBTC": "0x7b8FAC5F29E101BaaB33c5f9c39d4F85ba2cc7C1", "BTCB": "0xd267F821F1b8344B5A63626c8c824697194A173E", - "BitcoinUSD": "0x6906Ccda405926FC3f04240187dd4fAd5DF6d555" + "BitcoinUSD": "0x6906Ccda405926FC3f04240187dd4fAd5DF6d555", + "BtcUSD": "0x6906Ccda405926FC3f04240187dd4fAd5DF6d555" }, "scroll": { "WETH": "0x5300000000000000000000000000000000000004", @@ -1810,7 +1813,8 @@ "TBTC": "0xbba2ef945d523c4e2608c9e1214c2cc64d4fc2e2" }, "btr": { - "ETH": "0xef63d4e178b3180beec9b0e143e0f37f4c93f4c2" + "ETH": "0xef63d4e178b3180beec9b0e143e0f37f4c93f4c2", + "WBTC": "0xff204e2681a6fa0e2c3fade68a1b28fb90e4fc5f" }, "taiko": { "USDC": "0x07d83526730c7438048D55A4fc0b850e2aaB6f0b", @@ -1860,5 +1864,20 @@ "rari": { "WETH": "0xf037540e51d71b2d2b1120e8432ba49f29edfbd0", "USDC.e": "0xfbda5f676cb37624f28265a144a48b0d6e87d3b6" + }, + "real": { + "RWA": "0x4644066f535ead0cde82d209df78d94572fcbf14" + }, + "saakuru": { + "WOAS": "0x557a526472372f1F222EcC6af8818C1e6e78A85f", + "USDC.e": "0x739222D8A9179fE05129C77a8fa354049c088CaA" + }, + "bouncebit": { + "wstBBTC": "0x8f083eafcbba2e126ad9757639c3a1e25a061a08" + }, + "reya": { + "WETH": "0x6b48c2e6a32077ec17e8ba0d98ffc676dfab1a30", + "USDC": "0x3B860c0b53f2e8bd5264AA7c3451d41263C933F2", + "RUSD": "0xa9f32a851b1800742e47725da54a09a7ef2556a3" } -} +} \ No newline at end of file diff --git a/projects/helper/curvePools.js b/projects/helper/curvePools.js index 4c4cd6f354bb..b87da2c8dde2 100644 --- a/projects/helper/curvePools.js +++ b/projects/helper/curvePools.js @@ -347,7 +347,7 @@ module.exports = { swapContract: '0x59bf0545fca0e5ad48e13da269facd2e8c886ba4', underlyingTokens: [ '0x64343594ab9b56e99087bfa6f2335db24c2d1f17', - '0x17FC002b466eEc40DaE837Fc4bE5c67993ddBd6F', + ADDRESSES.arbitrum.FRAX, ] }, // pBTC-sBTC Ethereum @@ -389,7 +389,7 @@ module.exports = { }, '0x961226b64ad373275130234145b96d100dc0b655': { swapContract: '0x961226b64ad373275130234145b96d100dc0b655', - underlyingTokens: ['0x3432B6A60D23Ca0dFCa7761B7ab56459D9C964D0'] + underlyingTokens: [ADDRESSES.ethereum.FXS] }, // TOKEMAKS END diff --git a/projects/helper/hodltree/calculateBalances.js b/projects/helper/hodltree/calculateBalances.js deleted file mode 100644 index 0f1031e71cc7..000000000000 --- a/projects/helper/hodltree/calculateBalances.js +++ /dev/null @@ -1,54 +0,0 @@ -const sdk = require('@defillama/sdk'); - -const { - ethContracts, - polygonContracts, - dexTypes -} = require('../../config/hodltree'); -const { getChainTransform } = require('../portedTokens'); -const { calculateEM } = require('./calculateEM'); -const { calculateFlashloan } = require('./calculateFlashloan'); -const { calculateLendBorrow } = require('./calculateLendBorrow'); - -async function calculateHodltreeBalances(dexes, chain, chainBlocks, transform) { - let tokenBalances = []; - for (let dex of dexes) { - let res; - switch (dex.dexType) { - case dexTypes.dexType.flashloan: - res = await calculateFlashloan(dex, chain, chainBlocks) - break - - case dexTypes.dexType.lendBorrow: - res = await calculateLendBorrow(dex, chain, chainBlocks) - break - - case dexTypes.dexType.em: - res = await calculateEM(dex, chain, chainBlocks) - break - } - tokenBalances = tokenBalances.concat(res); - } - const balances = {}; - tokenBalances.map((tokenBalancePair) => { - sdk.util.sumSingleBalance(balances, transform(tokenBalancePair[0]), tokenBalancePair[1]); - }) - - return balances; -} - -async function calculateHodltreeBalancesEth(timestamp, block, chainBlocks) { - const transform = await getChainTransform('ethereum'); - return calculateHodltreeBalances(ethContracts, 'ethereum', chainBlocks, transform); -} - -async function calculateHodltreeBalancesPolygon(timestamp, block, chainBlocks) { - const transform = await getChainTransform('polygon') - return calculateHodltreeBalances(polygonContracts, 'polygon', chainBlocks, transform); - -} - -module.exports = { - calculateHodltreeBalancesEth, - calculateHodltreeBalancesPolygon -} \ No newline at end of file diff --git a/projects/helper/hodltree/calculateEM.js b/projects/helper/hodltree/calculateEM.js deleted file mode 100644 index 1b9a45f76b32..000000000000 --- a/projects/helper/hodltree/calculateEM.js +++ /dev/null @@ -1,40 +0,0 @@ -const sdk = require('@defillama/sdk'); - -/** - * @param {import("../../config/hodltree/addresses").Dex} dex - * @param {} chain - * @param {} chainBlocks - */ -async function calculateEM(dex, chain, chainBlocks) { - let tokens = []; - let calls = []; - dex.contracts.map((contract) => { - let token = contract.miscInfo.token; - tokens.push(token); - calls.push({ - target: token, - params: contract.address - }) - }) - - const flashloanBalances = ( - await sdk.api.abi.multiCall({ - abi: 'erc20:balanceOf', - calls, - chain: chain, - block: chainBlocks[chain], - }) - ).output.map((val) => val.output); - - let res = []; - - for (let tokenId = 0; tokenId < tokens.length; tokenId++) { - res.push([tokens[tokenId], flashloanBalances[tokenId]]); - } - - return res; -} - -module.exports = { - calculateEM -} \ No newline at end of file diff --git a/projects/helper/hodltree/calculateFlashloan.js b/projects/helper/hodltree/calculateFlashloan.js deleted file mode 100644 index be4068eb7db1..000000000000 --- a/projects/helper/hodltree/calculateFlashloan.js +++ /dev/null @@ -1,41 +0,0 @@ -const sdk = require('@defillama/sdk'); - -/** - * @param {import("../../config/hodltree/addresses").Dex} dex - * @param {} chain - * @param {} chainBlocks - */ -async function calculateFlashloan(dex, chain, chainBlocks) { - let tokens = []; - let calls = []; - dex.contracts.map((contract) => { - for (let token of contract.miscInfo.tokensIn) { - tokens.push(token); - calls.push({ - target: token, - params: contract.address - }) - } - }) - - const flashloanBalances = ( - await sdk.api.abi.multiCall({ - abi: 'erc20:balanceOf', - calls, - chain: chain, - block: chainBlocks[chain], - }) - ).output.map((val) => val.output); - - let res = []; - - for (let tokenId = 0; tokenId < tokens.length; tokenId++) { - res.push([tokens[tokenId], flashloanBalances[tokenId]]); - } - - return res; -} - -module.exports = { - calculateFlashloan -} \ No newline at end of file diff --git a/projects/helper/hodltree/calculateLendBorrow.js b/projects/helper/hodltree/calculateLendBorrow.js deleted file mode 100644 index 1ac01b6e5d57..000000000000 --- a/projects/helper/hodltree/calculateLendBorrow.js +++ /dev/null @@ -1,41 +0,0 @@ -const sdk = require('@defillama/sdk'); - -/** - * @param {import("../../config/hodltree/addresses").Dex} dex - * @param {} chain - * @param {} chainBlocks - */ -async function calculateLendBorrow(dex, chain, chainBlocks) { - let calls = []; - let tokens = []; - - dex.contracts.map((contract) => { - let token = contract.miscInfo.tokenIn; - tokens.push(token); - calls.push({ - target: token, - params: contract.address - }); - }); - - const lendBorrowBalances = ( - await sdk.api.abi.multiCall({ - abi: 'erc20:balanceOf', - calls, - chain: chain, - block: chainBlocks[chain], - }) - ).output.map((val) => val.output); - - let res = []; - - for (let tokenId = 0; tokenId < tokens.length; tokenId++) { - res.push([tokens[tokenId], lendBorrowBalances[tokenId]]); - } - - return res; -} - -module.exports = { - calculateLendBorrow -} \ No newline at end of file diff --git a/projects/helper/tokenMapping.js b/projects/helper/tokenMapping.js index 76324f638bbd..a91afada5323 100644 --- a/projects/helper/tokenMapping.js +++ b/projects/helper/tokenMapping.js @@ -40,43 +40,9 @@ const fixBalancesTokens = { ozone: { // '0x83048f0bf34feed8ced419455a4320a735a92e9d': { coingeckoId: "ozonechain", decimals: 18 }, // was mapped to wrong chain }, - xdc: { - '0x8f9920283470f52128bf11b0c14e798be704fd15': { coingeckoId: 'comtech-gold', decimals: 18 }, - }, - - real: { - '0x4644066f535ead0cde82d209df78d94572fcbf14': { coingeckoId: 're-al', decimals: 18 }, - '0xaec9e50e3397f9ddc635c6c429c8c7eca418a143': { coingeckoId: 'arcana-2', decimals: 18 }, - '0xce1581d7b4ba40176f0e219b2cac30088ad50c7a': { coingeckoId: 'pearl', decimals: 18 }, - }, - airdao: { - [ADDRESSES.null]: { coingeckoId: 'amber', decimals: 18 }, - [ADDRESSES.airdao.USDC]: { coingeckoId: 'usd-coin', decimals: 18 }, - }, - lukso: { - [ADDRESSES.null]: { coingeckoId: "lukso-token-2", decimals: 18 }, - [ADDRESSES.lukso.WLYX]: { coingeckoId: 'lukso-token-2', decimals: 18 }, - }, - bfc: { - '0x6906Ccda405926FC3f04240187dd4fAd5DF6d555': { coingeckoId: "bitcoin-usd-btcfi", decimals: 18, }, - }, - pulse: { - '0x30fcb23a906493371b1721c8feb8815804808d74': { coingeckoId: 'savings-dai', decimals: 18 }, - }, - saakuru: { - '0x557a526472372f1F222EcC6af8818C1e6e78A85f': { coingeckoId: 'oasys', decimals: 18 }, - '0x739222D8A9179fE05129C77a8fa354049c088CaA': { coingeckoId: 'usd-coin', decimals: 6 } - }, - bouncebit: { - '0x8f083eafcbba2e126ad9757639c3a1e25a061a08': { coingeckoId: 'bouncebit-btc', decimals: 18 } - }, - ripple: { - "XRP": { coingeckoId: "ripple", decimals: 6 }, - }, - reya: { - "0x6b48c2e6a32077ec17e8ba0d98ffc676dfab1a30": { coingeckoId: "ethereum", decimals: 18 }, - "0xa9f32a851b1800742e47725da54a09a7ef2556a3": { coingeckoId: "usd-coin", decimals: 6 }, - }, + islm: { + '0x0ce35b0d42608ca54eb7bcc8044f7087c18e7717': { coingeckoId: 'usd-coin', decimals: 6 }, + } } ibcChains.forEach(chain => fixBalancesTokens[chain] = { ...ibcMappings, ...(fixBalancesTokens[chain] || {}) }) diff --git a/projects/helper/utils.js b/projects/helper/utils.js index 153da04c3d86..c588d76acb85 100644 --- a/projects/helper/utils.js +++ b/projects/helper/utils.js @@ -255,7 +255,8 @@ async function debugBalances({ balances = {}, chain, log = false, tableLabel = ' labelMapping[label] = token return } - if (!token.startsWith('0x') || chain === 'starknet') return; + const blacklistedChains = ['starknet', 'solana', 'sui', 'aptos'] + if (!token.startsWith('0x') || blacklistedChains.includes(chain)) return; if (!label.startsWith(chain)) ethTokens.push(token) else diff --git a/projects/hinkal/registryTokens.js b/projects/hinkal/registryTokens.js index f85eef475e5d..2b653c698edb 100644 --- a/projects/hinkal/registryTokens.js +++ b/projects/hinkal/registryTokens.js @@ -45,7 +45,7 @@ const ETHEREUM_REGISTRY_TOKENS = [ "0xAf5191B0De278C7286d6C7CC6ab6BB8A73bA2Cd6", "0xdf55670e27bE5cDE7228dD0A6849181891c9ebA1", "0x9D0464996170c6B9e75eED71c68B99dDEDf279e8", - "0x3432B6A60D23Ca0dFCa7761B7ab56459D9C964D0", + ADDRESSES.ethereum.FXS, ADDRESSES.ethereum.cvxFXS, "0xBC6DA0FE9aD5f3b0d58160288917AA56653660E9", "0xB30dA2376F63De30b42dC055C93fa474F31330A5", @@ -264,7 +264,7 @@ const ARBITRUM_REGISTRY_TOKENS = [ ADDRESSES.optimism.DAI, ADDRESSES.arbitrum.MIM, "0x7f90122BF0700F9E7e1F688fe926940E8839F353", - "0x17FC002b466eEc40DaE837Fc4bE5c67993ddBd6F", + ADDRESSES.arbitrum.FRAX, "0x11cDb42B0EB46D95f990BeDD4695A6e3fA034978", "0x64343594Ab9b56e99087BfA6F2335Db24c2d1F17", "0x641441c631e2F909700d2f41FD87F0aA6A6b4EDb", @@ -570,7 +570,7 @@ const POLYGON_REGISTRY_TOKENS = [ "0x4e3Decbb3645551B8A19f0eA1678079FCB33fB4c", ADDRESSES.polygon.WMATIC_2, "0xf8a57c1d3b9629b77b6726a042ca48990A84Fb49", - "0x45c32fA6DF82ead1e2EF74d17b76547EDdFaFF89", + ADDRESSES.polygon.FRAX, "0xA691D34Abf93C0A77998e53B564bEcfaf46Dae27", "0xaA91CDD7abb47F821Cf07a2d38Cc8668DEAf1bdc", "0x8343091F2499FD4b6174A46D067A920a3b851FF9", diff --git a/projects/hodltree/index.js b/projects/hodltree/index.js index 5701812cb1c6..5807c16e165d 100644 --- a/projects/hodltree/index.js +++ b/projects/hodltree/index.js @@ -1,16 +1,46 @@ -const { calculateHodltreeBalancesEth, calculateHodltreeBalancesPolygon } = require("../helper/hodltree/calculateBalances"); - +const ADDRESSES = require('../helper/coreAssets.json') module.exports = { - methodology: - `Flashloan pools: sum of all available liquidity + methodology: + `Flashloan pools: sum of all available liquidity Lend-borrow contracts: sum of tokens provided as collateral and tokens provided by lenders Elastic-Modules: sum of tokens provided by hedgers and amount of tokens to hedge `, - ethereum: { - tvl: calculateHodltreeBalancesEth - }, - polygon: { - tvl: calculateHodltreeBalancesPolygon +} + +const config = { + ethereum: { + flashloan: '0x2e5a08c26cb22109e585784c4f99363bb3e199ab', tokensAndOwners: [ + // em + ['0x28e598846febb750effc384853fbce82988eaaa2', '0x95142849d31eaa20b5b9ab746dff27ff400ce6bf'], + [ADDRESSES.ethereum.sUSD, '0xce596bf99d21e46fa91143c03d7a356682b67859'], + [ADDRESSES.ethereum.sUSD, '0xb7ead8c418f3d03bc22dd538c22600abe7209e72'], + ['0xba100000625a3754423978a60c9317c58a424e3D', '0x78E52d69fA8e0F036fFEF0BcDc4C289DB0DF63E2'], + [ADDRESSES.ethereum.USDC, '0x87B46E49681E08E3adDF8A90F6a1fb5183079033'], + [ADDRESSES.ethereum.USDC, '0xcB72e764Ab46535aAD13cbF55b1F06cB15347A95'], + + // lend-borrow + [ADDRESSES.ethereum.WETH, '0xb3e1912fa5d9d219da8c65cda407cc998849428b'], + ['0xBcca60bB61934080951369a648Fb03DF4F96263C', '0x8ac9425260b6da02db07da7980b09525ebf3b6a0'], + ['0x028171bCA77440897B824Ca71D1c56caC55b68A3', '0x45d5a790da3bfa305efca81eac652678ae3a90a6'], + ] + }, + polygon: { + flashloan: '0xCAFDa65B1031535F1766C6b1E3b5efF5520c7C0f', tokensAndOwners: [ + // lend-borrow + [ADDRESSES.polygon.WMATIC_2, '0x2F35d311fd2F0b0dA65FA268B86831279FB4fd98'], + ['0x1a13f4ca1d028320a707d99520abfefca3998b7f', '0xbfb5215aD157Cd6C8B22494dC54Ff4B74bA18C09'], + ['0x27f8d03b3a2196956ed754badc28d73be8830a6e', '0x0Cf91744D15684b91E6705e56f6dC820647B3067'], + ] + }, +} + +Object.keys(config).forEach(chain => { + const { flashloan, tokensAndOwners = [] } = config[chain] + module.exports[chain] = { + tvl: async (api) => { + const fTokens = await api.fetchList({ lengthAbi: 'N_TOKENS', itemAbi: 'TOKENS', target: flashloan }) + fTokens.forEach(fToken => tokensAndOwners.push([fToken, flashloan])) + await api.sumTokens({ tokensAndOwners }) } -}; - \ No newline at end of file + } +}) \ No newline at end of file diff --git a/projects/huobi/index.js b/projects/huobi/index.js index 5c5744cc79d9..2eee4134fae1 100644 --- a/projects/huobi/index.js +++ b/projects/huobi/index.js @@ -8,7 +8,7 @@ const config = { owners: [ '12qTdZHx6f77aQ74CPCZGSY47VaRwYjVD8', '143gLvWYUojXaWZRrxquRKpVNTkhmr415B', - '1KVpuCfhftkzJ67ZUegaMuaYey7qni7pPj', + // '1KVpuCfhftkzJ67ZUegaMuaYey7qni7pPj', this wallet is backing USDD acording here https://prnt.sc/i3cFaak7H9Y8. For that reason, it should not included as HTX. //These 3 addresses has 48,555 #Bitcoin. This is only less than 3% of the total high value assets we have, including btc, usd, stablecoins, T-bills.. According to Justin Sun https://twitter.com/justinsuntron/status/1590311559242612743 '14XKsv8tT6tt8P8mfDQZgNF8wtN5erNu5D', '1LXzGrDQqKqVBqxfGDUyhC6rTRBN5s8Sbj', @@ -54,11 +54,8 @@ const config = { '0xf881bcb3705926cea9c598ab05a837cf41a833a9', // add on 08/08/2023 (we defillama) '0xa03400e098f4421b34a3a44a1b4e571419517687', '0x598273ea2cabd9f798564877851788c5e0d5b7b9', // start add on 23/02/2024 (we defillama) - '0x18709e89bd403f470088abdacebe86cc60dda12e', '0x4fb312915b779b1339388e14b6d079741ca83128', '0x30741289523c2e4d2a62c7d6722686d14e723851', - '0x5c985e89dde482efe97ea9f1950ad149eb73829b', - '0xe4818f8fde0c977a01da4fa467365b8bf22b071e', '0xe93381fb4c4f14bda253907b18fad305d799241a', // end add on 23/02/2024 (we defillama) '0x6663613FbD927cE78abBF7F5Ca7e2c3FE0d96d18', // add on 22/07/2024 ], @@ -102,7 +99,7 @@ const config = { 'TAuUCiH4JVNBZmDnEDZkXEUXDARdGpXTmX', 'TF2fmSbg5HAD34KPUH7WtWCxxvgXHohzYM', 'THZovMcKoZaV9zzFTWteQYd2f3NEvnzxAM', - 'TZ1SsapyhKNWaVLca6P2qgVzkHTdk6nkXa', + // 'TZ1SsapyhKNWaVLca6P2qgVzkHTdk6nkXa', // this wallet is backing USDD acording here https://prnt.sc/lvIQUtCNbk2X. For that reason, it should not included as HTX. 'TDvf1dSBhR7dEskJs17HxGHheJrjXhiFyM', 'TUJGLHo3rq4EAUY1LHRhNkHPX8qmrv9WFs', // add on 08/08/2023 (we defillama) 'TRSXRWudzfzY4jH7AaMowdMNUXDkHisbcd', // add on 08/08/2023 (we defillama) @@ -165,6 +162,9 @@ module.exports = mergeExports([ { ethereum: { tvl: stakingTVL, } } ]) module.exports.methodology = 'We added the wallets from here https://github.com/huobiapi/Tool-Node.js-VerifyAddress/blob/main/snapshot/huobi_por_20230701.csv . We are not tracking 3 wallets, 2 on Heco Chain, 1 on BTTC chain. We also count stUSDT.' +module.exports.hallmarks = [ + [1723066836,"remove usdd collateral"] +] async function stakingTVL() { diff --git a/projects/imbtc.js b/projects/imbtc.js index e83d4b92af20..7d80f59ec1a1 100644 --- a/projects/imbtc.js +++ b/projects/imbtc.js @@ -1,10 +1,8 @@ -const sdk = require('@defillama/sdk') - -async function tvl(ts, block) { - return { - 'bitcoin': (await sdk.api.erc20.totalSupply({ target: '0x3212b29E33587A00FB1C83346f5dBFA69A458923', block })).output / 1e8 - } +async function tvl(api) { + const imBTC = '0x3212b29E33587A00FB1C83346f5dBFA69A458923' + const supply = await api.call({ abi: 'erc20:totalSupply', target: imBTC }) + api.add(imBTC, supply) } module.exports = { diff --git a/projects/imf-money/index.js b/projects/imf-money/index.js index 486c45d8afed..3a1aa03f603f 100644 --- a/projects/imf-money/index.js +++ b/projects/imf-money/index.js @@ -1,10 +1,11 @@ const { sumTokensExport } = require('../helper/unwrapLPs') const PEPE_TOKEN_CONTRACT = '0x6982508145454Ce325dDbE47a25d4ec3d2311933'; +const MOG_TOKEN_CONTRACT = '0xaaee1a9723aadb7afa2810263653a34ba2c21c7a'; const LOCKED_MONEY_CONTRACT = '0x30F75834cB406b7093208Fda7F689938aCBD1EeB'; //wallet that has all the locked money module.exports = { methodology: 'Sums the value of deposited memes', ethereum: { - tvl: sumTokensExport({ owner: LOCKED_MONEY_CONTRACT, token: PEPE_TOKEN_CONTRACT}), + tvl: sumTokensExport({ owner: LOCKED_MONEY_CONTRACT, tokens: [PEPE_TOKEN_CONTRACT,MOG_TOKEN_CONTRACT]}), } }; diff --git a/projects/impermax/impermaxHelper.js b/projects/impermax/impermaxHelper.js index 0817f51d849b..b52e85578953 100644 --- a/projects/impermax/impermaxHelper.js +++ b/projects/impermax/impermaxHelper.js @@ -107,6 +107,7 @@ function impermaxHelper(exportsObj, config, blacklistedPools) { case 'scroll': case 'base': case 'mantle': + case 'optimism': default: impermaxSymbol = 'STKD-UNI-V2' return underlyings.filter((_, i) => uSymbols[i] === impermaxSymbol) diff --git a/projects/impermax/index.js b/projects/impermax/index.js index 27efed1a61a1..9a991c4522f1 100644 --- a/projects/impermax/index.js +++ b/projects/impermax/index.js @@ -49,7 +49,7 @@ const config = { '0x9b4ae930255CB8695a9F525dA414F80C4C7a945B', ] }, - scroll: { + scroll: { factories: [ '0x02Ff7B4d96EeBF8c9B34Fae0418E591e11da3099', '0xFBD17F3AA7d6506601D2bF7e15a6C96081296a01', // scroll stablefactory @@ -66,8 +66,12 @@ const config = { factories: [ '0x3047523D5ed0df1545B1C440BdAaB095f1f3cf5C' ] + }, + optimism: { + factories: [ + '0xa058Ba91958cD30D44c7B0Cf58A369876Fb70B05' + ] } - } const blacklistedPools = { @@ -111,7 +115,8 @@ const blacklistedPools = { ], scroll: [], base: [], - mantle: [] + mantle: [], + optimism: [] } module.exports = {} diff --git a/projects/inverse/index.js b/projects/inverse/index.js index 51eb1d2e1062..9f7137a697a5 100644 --- a/projects/inverse/index.js +++ b/projects/inverse/index.js @@ -206,10 +206,7 @@ module.exports = { methodology: "DOLA curve metapool replaced by DOLA", hallmarks: [ [1648771200, "INV price hack"], - [1655380800, "Inverse Frontier Deprecated"], - [1670701200, "Launch of FiRM"], - [1696204800, "Borrow against INV on FiRM"], - [1707177600, "Launch of sDOLA"], + [1655380800, "Inverse Frontier Deprecated"] ], start: 1607731200, // Dec 12 2020 00:00:00 GMT+0000 ethereum: { tvl } diff --git a/projects/jvault/index.js b/projects/jvault/index.js new file mode 100644 index 000000000000..260a6a9aeba4 --- /dev/null +++ b/projects/jvault/index.js @@ -0,0 +1,22 @@ +const ADDRESSES = require("../helper/coreAssets.json"); +const { fetchURL } = require('../helper/utils'); + +async function staking(api) { + + // API is used to get all vaults and their TVLs to avoid scan of all blockchain for matching vaults + // also Jettons values are converted to TON using DEXs prices + const response = await fetchURL("https://jvault.xyz/staking/stake?type=json") + for (const pool of response.data.pools) { + api.add(ADDRESSES.ton.TON, pool.ton_tvl * 1e9) + } +} + + +module.exports = { + methodology: 'Counts balances of all tokens based on DEXs prices in all vaults.', + timetravel: false, + ton: { + tvl: () => ({}), + staking, + } +} diff --git a/projects/kalax/index.js b/projects/kalax/index.js index ed945f180c71..49a4905a40c5 100644 --- a/projects/kalax/index.js +++ b/projects/kalax/index.js @@ -1,20 +1,55 @@ const { sumTokens2 } = require("../helper/unwrapLPs") -const KALAX = "0x2F67F59b3629Bf24962290DB9edE0CD4127e606D" -const farms = ['0xE63153C3360aCa0F4e7Ca7A1FC61c2215FAEF5A1', '0xFe899401A1d86cC1113020fb40878c76239142a5',"0x1CB8f6cecf7c8FBB9863417f8371Cb2A076C9115"] +const blastKalax = "0x2F67F59b3629Bf24962290DB9edE0CD4127e606D" +const blastfarms = ['0xE63153C3360aCa0F4e7Ca7A1FC61c2215FAEF5A1', '0xFe899401A1d86cC1113020fb40878c76239142a5',"0x1CB8f6cecf7c8FBB9863417f8371Cb2A076C9115"] +const scrollKalax = "0x1f4F171676f8cb3B1C3FD38867B3B160679F934A" +const scrollFarms = ['0xB99AeDd16714A7393768273F9AbFF4C4F48980eD'] async function tvl(api) { + let farms = api.chain === 'blast'?blastfarms:scrollFarms + let kalax = api.chain === 'blast'?blastKalax:scrollKalax + let pools = (await api.multiCall({ abi: abiInfo.poolInfos, calls: farms })).flat() - pools - .filter((i) => i.assets !== KALAX) - .forEach((i) => api.add(i.assets, i.tvl)) + if(api.chain === 'blast'){ + pools + .filter((i) => i.assets !== kalax) + .forEach((i) => api.add(i.assets, i.tvl)) + }else{ + pools + .filter((i) => i.assets !== kalax) + .forEach((i)=>{ + if(i.assets === '0x0000000000000000000000000000000000000001'){ + i.assets ='0x0000000000000000000000000000000000000000' + } + api.add(i.assets, i.tvl) + }) + } return sumTokens2({ api, resolveLP: true }) } + +const usdt = "0xf55BEC9cafDbE8730f096Aa55dad6D22d44099Df" +const scrollKalaLp = "0x4fc09BE6eB49764CcAE4e95Bd2B93f67a34c0188" async function staking(api) { + let farms = api.chain === 'blast'?blastfarms:scrollFarms + let kalax = api.chain === 'blast'?blastKalax:scrollKalax + let pools = (await api.multiCall({ abi: abiInfo.poolInfos, calls: farms })).flat() - pools.filter((i) => i.assets === KALAX).forEach((i) => api.add(i.assets, i.tvl)) + if(api.chain === 'blast'){ + pools.filter((i) => i.assets === kalax).forEach((i) => api.add(i.assets, i.tvl)) + }else{ + let pool = pools.find(i=>i.assets === kalax) + let poolTvl = pool.tvl + let sqrtPriceX96 =await api.call({ + abi:abiInfo.state, + target:scrollKalaLp + }) + let p = (sqrtPriceX96 / 2 ** 96) ** 2 + let rate = p * 10**12 + let usdtNum = poolTvl/10**18 * rate * 10**6 + api.add(usdt,usdtNum) + } } module.exports = { @@ -22,9 +57,15 @@ module.exports = { tvl, staking, }, + scroll:{ + tvl, + staking + } } const abiInfo = { poolInfos: "function getPoolTotalTvl() view returns (tuple(uint256 pid, address assets, uint256 tvl)[])", + state: + "function state()external view returns(uint160 sqrtPrice_96)" } diff --git a/projects/kelp-dao/index.js b/projects/kelp-dao/index.js index 806e3ee6714b..607e09eb1c16 100644 --- a/projects/kelp-dao/index.js +++ b/projects/kelp-dao/index.js @@ -1,14 +1,49 @@ +const sdk = require('@defillama/sdk') const DEPOSIT_POOL = "0x036676389e48133B63a802f8635AD39E752D375D"; +const rstETH = '0xA1290d69c65A6Fe4DF752f95823fae25cB99e5A7' + +const oft_tokens = { + 'arbitrum' : '0x4186BFC76E2E237523CBC30FD220FE055156b41F', + 'optimism' : '0x4186BFC76E2E237523CBC30FD220FE055156b41F', + 'manta' : '0x4186BFC76E2E237523CBC30FD220FE055156b41F', + 'mode' : '0x4186BFC76E2E237523CBC30FD220FE055156b41F', + 'blast' : '0x4186BFC76E2E237523CBC30FD220FE055156b41F', + 'scroll' : '0x65421ba909200b81640d98B979d07487C9781B66', + 'base' : '0x1Bc71130A0e39942a7658878169764Bbd8A45993', + 'era' : '0xd4169E045bcF9a86cC00101225d9ED61D2F51af2', + 'linea' : '0xD2671165570f41BBB3B0097893300b6EB6101E6C', + 'xlayer' : '0x5a71f5888ee05b36ded9149e6d32ee93812ee5e9', +} async function tvl(api) { + const supplies = await oft_supplies(api) const config = await api.call({ abi: 'address:lrtConfig', target: DEPOSIT_POOL}) - const tokens= await api.call({ abi: 'address[]:getSupportedAssetList', target: config}) + const tokens = await api.call({ abi: 'address[]:getSupportedAssetList', target: config}) const bals = await api.multiCall({ abi: 'function getTotalAssetDeposits(address) external view returns (uint256)', calls: tokens, target: DEPOSIT_POOL}) api.addTokens(tokens, bals); + api.addTokens(rstETH, - supplies) // We subtract the rstETH oft on other chains from ethereum chain to avoid double counting once bridged return api.getBalances() } + +const oft_tvls = async (api, oft) => { + const oft_supply = await api.call({ abi: 'erc20:totalSupply', target: oft}) + api.add(rstETH, oft_supply, { skipChain: true }) +} + +const oft_supplies = async (api) => { + const totalSupplies = await Promise.all( + Object.keys(oft_tokens).map(async (chain) => { + const chainApi = new sdk.ChainApi({ chain, timestamp: api.timestamp}) + // await chainApi.getBlock() + return chainApi.call({ abi: 'erc20:totalSupply', target: oft_tokens[chain] }); + }) + ); + return totalSupplies.reduce((sum, value) => sum + Number(value), 0); +} + module.exports = { + timetravel: false, doublecounted: true, methodology: "deposited LSTs in deposit pool, node delegator contracts and from them into eigenlayer strategy contracts", @@ -16,3 +51,13 @@ module.exports = { tvl, }, }; + +Object.keys(oft_tokens).forEach((chain) => { + const contract = oft_tokens[chain]; + module.exports[chain] = { + tvl: async (api) => oft_tvls(api, contract), + }; +}); + + + diff --git a/projects/kiloex/index.js b/projects/kiloex/index.js index d2a5863fafb8..04eb9a113c00 100644 --- a/projects/kiloex/index.js +++ b/projects/kiloex/index.js @@ -10,9 +10,9 @@ const taiko_owners = ["0x735D00A9368164B9dcB2e008d5Cd15b367649aD5", "0x235C5C450 module.exports = { start: 1690971144, - bsc: { tvl: sumTokensExport({ owners, tokens: [ADDRESSES.bsc.USDT, "0xc5f0f7b66764F6ec8C8Dff7BA683102295E16409", "0x80137510979822322193FC997d400D5A6C747bf7"], }) }, + bsc: { tvl: sumTokensExport({ owners, tokens: [ADDRESSES.bsc.USDT, ADDRESSES.ethereum.FDUSD, ADDRESSES.scroll.STONE], }) }, op_bnb: { - tvl: sumTokensExport({ owners: opbnb_owners, tokens: [ADDRESSES.op_bnb.USDT, "0x50c5725949a6f0c72e6c4a641f24049a917db0cb","0x4200000000000000000000000000000000000006"] }) + tvl: sumTokensExport({ owners: opbnb_owners, tokens: [ADDRESSES.op_bnb.USDT, ADDRESSES.base.DAI,ADDRESSES.optimism.WETH_1] }) }, manta: { tvl: sumTokensExport({ owners: manta_owners, tokens: [ADDRESSES.manta.USDT, manta_stone_token, manat_manta_token] }) diff --git a/projects/limitless/index.js b/projects/limitless/index.js index a0edc079acc5..da315123fc9b 100644 --- a/projects/limitless/index.js +++ b/projects/limitless/index.js @@ -4,10 +4,11 @@ const { getUniqueAddresses } = require("../helper/utils") const sdk = require('@defillama/sdk') const config = { - base: { postionManager: '0x3eF54A2Cf152f6E06C0928722412883D448F92eC', factory: '0x33128a8fC17869897dcE68Ed026d694621f6FDfD', limWETH: '0x845d629D2485555514B93F05Bdbe344cC2e4b0ce', marginContract: '0x536801AaE40cb214c08f178c6727d7594a7c655b', graphEndpoint: 'https://api.studio.thegraph.com/query/71042/limitless-subgraph-base/version/latest', dataProvider: '0x87E697c3EBe41eD707E4AD52541f19292Be81177', lmQuoter: '0xED14586763578147136e55D20a0Ee884Cd8fBC6d', }, - arbitrum: { postionManager: '0x6D73fc6F4C299E369377C0e60CebFef2409f86A0', factory: '0x1F98431c8aD98523631AE4a59f267346ea31F984', limWETH: '0xdEe4326E0a8B5eF94E50a457F7c70d4821be9f4C', }, + base: { postionManager: '0x6822063E39f1b8F40373402Ac96963B383877B3C', factory: '0x33128a8fC17869897dcE68Ed026d694621f6FDfD', limWETH: '0x845d629D2485555514B93F05Bdbe344cC2e4b0ce', marginContract: '0x536801AaE40cb214c08f178c6727d7594a7c655b', graphEndpoint: 'https://api.studio.thegraph.com/query/71042/limitless-subgraph-base/version/latest', dataProvider: '0x87E697c3EBe41eD707E4AD52541f19292Be81177', lmQuoter: '0xED14586763578147136e55D20a0Ee884Cd8fBC6d', }, + arbitrum: { postionManager: '0xf3B0362a5F210Fd826E74b3b10b269D4044085e5', factory: '0x1F98431c8aD98523631AE4a59f267346ea31F984', limWETH: '0x3a4F8E8512624226d2aC14fE496Bb9A4DdB73a9a', marginContract: '0x3611CD2B957514222a94C93e1A9a5be66b0b2841', graphEndpoint: 'https://api.studio.thegraph.com/query/71042/limitless-subgraph-arbitrum/version/latest', dataProvider: '0x9139929dFbEeDfB03bbF8B59b4005BC631529b14', lmQuoter: '0x2E4a9Eb87375D518F4c4473a845D56AAbf1967FE', }, linea: { postionManager: '0x726e3116AE07f43A7E1921c635352B75e2DEa4Ad', factory: '0x31FAfd4889FA1269F7a13A66eE0fB458f27D72A9', limWETH: '0x5188b47Cb80D1A3E22Cc6221792F199f1Fb0DD3c', }, } + const liquidityProvidedQuery = ` query($lastId: String, $block: Int) { liquidityProvideds( diff --git a/projects/lobis.js b/projects/lobis.js index 5ca84c198591..444a4e7c517e 100644 --- a/projects/lobis.js +++ b/projects/lobis.js @@ -6,7 +6,7 @@ module.exports = ohmTvl(treasury, [ //curve [ADDRESSES.ethereum.CRV, false], //frax - ["0x3432b6a60d23ca0dfca7761b7ab56459d9c964d0", false], + [ADDRESSES.ethereum.FXS, false], //Sushi LP ["0x2734f4a846d1127f4b5d3bab261facfe51df1d9a", true], ], "ethereum", "0x3818eff63418e0a0ba3980aba5ff388b029b6d90", "0xdec41db0c33f3f6f3cb615449c311ba22d418a8d") diff --git a/projects/lore/index.js b/projects/lore/index.js new file mode 100644 index 000000000000..35520fc00160 --- /dev/null +++ b/projects/lore/index.js @@ -0,0 +1,5 @@ +const { aaveExports } = require('../helper/aave') + +module.exports = { + scroll: aaveExports("scroll", "0xBc6DE4458b7D6fbf82240ce8cC0CA6a2f4986eb5"), +} diff --git a/projects/lynx/index.js b/projects/lynx/index.js index 38ecda6e9e89..84a8d36aee6f 100644 --- a/projects/lynx/index.js +++ b/projects/lynx/index.js @@ -22,7 +22,7 @@ const config = { ], [ // USDC Token - "0x04068da6c83afcfa0e13ba15a6696662335d5b75", + ADDRESSES.fantom.USDC, // OFTChipAdapter (owner) "0x194609ea1C1D77e66eaB28C48CE266A48f3bC30a", ], @@ -90,7 +90,7 @@ const config = { tokenAndOwnerPair: [ [ // stEUR Token - "0x004626a008b1acdc4c74ab51644093b155e59a23", + ADDRESSES.celo.STEUR, // OFTChipAdapter (owner) "0xc5e782e2a4e2cfcb7ed454cf5a7b6aa2bb424b90", ], diff --git a/projects/mahaxyz/index.js b/projects/mahaxyz/index.js index de15cfbf7674..7bb6e8ba04d5 100644 --- a/projects/mahaxyz/index.js +++ b/projects/mahaxyz/index.js @@ -1,6 +1,5 @@ -const ADDRESSES = require('../helper/coreAssets.json') -const { sumTokens2 } = require("../helper/unwrapLPs.js"); -const { staking } = require("../helper/staking"); +const ADDRESSES = require('../helper/coreAssets.json'); +const { sumTokensExport } = require('../helper/unwrapLPs.js'); const eth = { // tokens @@ -11,15 +10,16 @@ const eth = { weth: ADDRESSES.ethereum.WETH, zai: "0x69000405f9dce69bd4cbf4f2865b79144a69bfe0", - // pools - zaiFraxBPCurve: "0x057c658dfbbcbb96c361fb4e66b86cca081b6c6a", - mahaEthCurve: "0x6b7127a638edc7db04bede220c7c49930fdb4160", - - // staking contracts + // peg stability modules psmUSDC: '0x69000052a82e218ccb61fe6e9d7e3f87b9c5916f', - stakedZai: '0x69000e468f7f6d6f4ed00cf46f368acdac252553', - zaiFraxBPStaked: "0x6900066d9f8df0bfaf1e25ef89c0453e8e12373d", + // pools + zaiUsdcCurve: "0x6ee1955afb64146b126162b4ff018db1eb8f08c3", + zaiMahaCurve: "0x0086ef314a313018c70a2cd92504c7d1038a25aa", + + // pool staking contracts + zaiMahaCurveStaking: "0x237efe587f2cb44597063dc8403a4892a60a5a4f", + zaiUsdcCurveStaking: "0x154F52B347D8E48b8DbD8D8325Fe5bb45AAdCCDa", }; Object.keys(eth).forEach((k) => (eth[k] = eth[k].toLowerCase())); @@ -29,13 +29,12 @@ const pegStabilityModules = [eth.psmUSDC] module.exports = { ethereum: { - // todo add pool2 - // pool2: genericUnwrapCvxDeposit({ - // tokensAndOwners: [ - // [eth.zaiFraxBP, eth.zaiFraxBPStaked], - // ] - // }), - // staking: staking(eth.stakedZai, eth.zai), // we dont staking for CDP as tokens backing the minted token is already counted towards tvl - tvl: () => sumTokens2({ owners: pegStabilityModules, tokens: collaterals}), + pool2: sumTokensExport({ + tokensAndOwners: [ + [eth.zaiMahaCurve, eth.zaiMahaCurveStaking], + [eth.zaiUsdcCurve, eth.zaiUsdcCurveStaking] + ] + }), + tvl: sumTokensExport({ owners: pegStabilityModules, tokens: collaterals }), } }; diff --git a/projects/mangrove/index.js b/projects/mangrove/index.js index 30240ab1cbb6..4063ddd38040 100644 --- a/projects/mangrove/index.js +++ b/projects/mangrove/index.js @@ -1,9 +1,12 @@ const abi = require("./abi.json"); const { BigNumber } = require("bignumber.js"); -const mgvReader = "0x26fD9643Baf1f8A44b752B28f0D90AEBd04AB3F8"; +const mgvReaders = { + blast: "0x26fD9643Baf1f8A44b752B28f0D90AEBd04AB3F8", + arbitrum: "0x7E108d7C9CADb03E026075Bf242aC2353d0D1875", +}; -const getOffers = async (api, { tkn0, tkn1, tickSpacing }) => { +const getOffers = async (api, mgvReader, { tkn0, tkn1, tickSpacing }) => { let total = BigNumber(0); let currentId = 0; do { @@ -25,7 +28,7 @@ const getOffers = async (api, { tkn0, tkn1, tickSpacing }) => { return total; }; -async function getMangroveTVL(api) { +async function getMangroveTVL(api, mgvReader) { const markets = await api.call({ target: mgvReader, abi: abi.openMarkets, @@ -33,18 +36,30 @@ async function getMangroveTVL(api) { for (const market of markets) { const [tkn0, tkn1, tickSpacing] = market; - const tkn0TPV = await getOffers(api, { tkn0, tkn1, tickSpacing }); - const tkn1TPV = await getOffers(api, { tkn0: tkn1, tkn1: tkn0, tickSpacing }); + const tkn0TPV = await getOffers(api, mgvReader, { + tkn0, + tkn1, + tickSpacing, + }); + const tkn1TPV = await getOffers(api, mgvReader, { + tkn0: tkn1, + tkn1: tkn0, + tickSpacing, + }); api.addTokens([tkn0, tkn1], [tkn0TPV, tkn1TPV]); } } module.exports = { - blast: { - tvl: getMangroveTVL, - }, misrepresentedTokens: false, - methodology: "TVL is calculated by getting the total promised liquidity on the orderbook on a specific block.", + methodology: + "TVL is calculated by getting the total promised liquidity on the orderbook on a specific block.", start: 1708992000, }; + +for (const chain in mgvReaders) { + module.exports[chain] = { + tvl: (api) => getMangroveTVL(api, mgvReaders[chain]), + }; +} diff --git a/projects/mantradao.js b/projects/mantradao.js index f2bc28967a74..051239582593 100644 --- a/projects/mantradao.js +++ b/projects/mantradao.js @@ -1,41 +1,82 @@ -const ADDRESSES = require('./helper/coreAssets.json') -const { sumTokens } = require("./helper/unwrapLPs"); -const { compoundExports } = require("./helper/compound"); -const { stakingAssetsETH, stakingAssetsBSC, stakingAssetsPOLYGON, } = require("./config/mantra-dao/contracts/naked-staking-contracts"); -const { lpStakingAssetsETH, lpStakingAssetsBSC, lpStakingAssetsPOLYGON, } = require("./config/mantra-dao/contracts/lp-staking-contracts"); +const { sumTokensExport } = require('./helper/unwrapLPs') +const { compoundExports2 } = require("./helper/compound"); -const chainConfig = { - ethereum: { staking: stakingAssetsETH, pool2: lpStakingAssetsETH, }, - bsc: { staking: stakingAssetsBSC, pool2: lpStakingAssetsBSC, }, - polygon: { staking: stakingAssetsPOLYGON, pool2: lpStakingAssetsPOLYGON, }, +module.exports = { + ethereum: compoundExports2({ comptroller: "0x606246e9EF6C70DCb6CEE42136cd06D127E2B7C7", cether: '0x4F905f75F5576228eD2D0EA508Fb0c32a0696090', blacklistedTokens: ['0x3593d125a4f7849a1b059e64f4517a86dd60c95d'] }) } -const comptroller = "0x606246e9EF6C70DCb6CEE42136cd06D127E2B7C7" -const zenETH = "0x4F905f75F5576228eD2D0EA508Fb0c32a0696090" -const zenETHEquivalent = ADDRESSES.ethereum.WETH; - -module.exports = {} - -Object.keys(chainConfig).forEach(chain => { - const { staking, pool2 } = chainConfig[chain] - let ethAdditional = {} - - if (chain === 'ethereum') - ethAdditional = compoundExports(comptroller, "ethereum", zenETH, zenETHEquivalent) +const config = { + ethereum: { + staking: [ + ["0x3593D125a4f7849a1B059E64F4517A86Dd60c95d", "0x9E15Ad979919bB4db331Bfe864475Ae3BFFebA93"], + ["0x3593D125a4f7849a1B059E64F4517A86Dd60c95d", "0xa01892d97e9c8290c2c225fb0b756bfe26bc9802"], + ["0x3593D125a4f7849a1B059E64F4517A86Dd60c95d", "0x04493F715B08DeA8af77814d600bEf22f1f0C63B"], + ["0x3593D125a4f7849a1B059E64F4517A86Dd60c95d", "0x1eA973A69643091410721C7D91aA5499CF8D2Cb7"], + ["0xaf9f549774ecedbd0966c52f250acc548d3f36e5", "0x456DF576962289256A92290C9E48EE116B8Cb413"], + ["0xdef1da03061ddd2a5ef6c59220c135dec623116d", "0xdbc34d084393ed8d7b750FfCCea5A139EC7b9349"], + ["0x7eaF9C89037e4814DC0d9952Ac7F888C784548DB", "0x4Cd4c0eEDb2bC21f4e280d0Fe4C45B17430F94A9"], + ["0x8a40c222996f9F3431f63Bf80244C36822060f12", "0x6BcDC61A7A6d86f7b7B66d461b7eF7fa268571a0"], + ["0x4eed0fa8de12d5a86517f214c2f11586ba2ed88d", "0x1dfdb0fb85402dc7f8d72d92ada8fbbb3ffc8633"], + ["0x5eaa69b29f99c84fe5de8200340b4e9b4ab38eac", "0x2d0ea72db9f9a63f4b185eab1ca74137d808ebfa"], + ["0x67b6d479c7bb412c54e03dca8e1bc6740ce6b99c", "0x6ae05b5db520011bf76645ebb4d6a697e5b3774b"], + ["0x8b0e42f366ba502d787bb134478adfae966c8798", "0x6f0db359309CAD297D2e7952a4F5f081bDC1e373"], + ["0x8b0E42F366bA502d787BB134478aDfAE966C8798", "0xb96e42c0de658ca26048b0e200f9a1e05ad89e0f"], + ["0xd2dda223b2617cb616c1580db421e4cfae6a8a85", "0x39621A555554A7FF77F2b64185c53E04C90cD540"], + ["0x4eED0fa8dE12D5a86517f214C2f11586Ba2ED88D", "0xa571309B1267676568Bf9f155606a08790896Fe2"], + ["0x93C9175E26F57d2888c7Df8B470C9eeA5C0b0A93", "0xb19b94d53D362CDfC7360C951a85ca2c1d5400BA"], + ], + pool2: [ + ["0x2d9fd51e896ff0352cb6d697d13d04c2cb85ca83", "0x5f81a986611C600a3656d9adc202283186C6121D"], + ["0x2d9fd51e896ff0352cb6d697d13d04c2cb85ca83", "0xfc8e3b55897d8cef791451bbe69b204b9c58fc8a"], + ["0xe46935ae80e05cdebd4a4008b6ccaa36d2845370", "0x91fe14df53eae3a87e310ec6edcdd2d775e1a23f"], + ["0x6d9d2427cfa49e39b4667c4c3f627e56ae586f37", "0x55e0F2cE66Fa8C86ef478fa47bA0bE978eFC2647"], + ["0x1f07f8e712659087914b96db4d6f6e4fee32285e", "0xb12f0CbcC89457d44323139e6Bb0526Fd82f12F2"], + ["0x1f07f8e712659087914b96db4d6f6e4fee32285e", "0x18Ba986ED3128fc7E3E86a09E902436e900a899c"], + ["0x2a182e532a379cb2c7f1b34ce3f76f3f7d3596f7", "0x6406788d1CD4fdD823ef607A924c00a4244a841d"], + ["0x4fc47579ecf6aa76677ee142b6b75faf9eeafba8", "0xe2a80A76B084B51CFAe5B2C3e0FF5232e0408201"], + ["0xc62bf2c79f34ff24e2f97982af4f064161ed8949", "0xFF964d0bf9f81c401932A6B975EAE54129712eE5"], + ] + }, + bsc: { + staking: [ + ["0x651cd665bd558175a956fb3d72206ea08eb3df5b", "0x7dd79e93dba1d677574d0b5e99721f2e4b45e297"], + ["0x96058f8c3e16576d9bd68766f3836d9a33158f89", "0x004c0908518e19aa8b27a55c171564097fa3c354"], + ["0x4518231a8fdf6ac553b9bbd51bbb86825b583263", "0xF0185520Cc773502f0f208433ca178f2f57157A9"], + ["0xf78d2e7936f5fe18308a3b2951a93b6c4a41f5e2", "0xEfc2d65302eb6345A7C0e212B791e0d45C2C3c91"], + ["0xf78d2e7936f5fe18308a3b2951a93b6c4a41f5e2", "0x41A32C610FA23dEa9E85D471CAD66ea828853153"], + ["0xf78d2e7936f5fe18308a3b2951a93b6c4a41f5e2", "0xEf2663d96e48a543D9EA96A39869aB54f7F5D872"], + ], + pool2: [ + ["0xC309a6d2F1537922E06f15aA2eb21CaA1b2eEDb6", "0xF25897a7EDf1Dfa9C65f5DB7Ec4Bad868873805B"], + ["0x49837a48abde7c525bdc86d9acba39f739cbe22c", "0xcbf42ace1dbd895ffdcabc1b841488542626014d"], + ["0x0b49580278b403ca13055bf4d81b6b7aa85fd8b9", "0x92fCe8AfFB2A68d418BaDF8E360E0CDe06c39356"], + ["0x538e61bd3258304e9970f4f2db37a217f60436e1", "0x1E8BC897bf03ebac570Df7e5526561f8a42eCe05"], + ["0xb8b4383b49d451bbea63bc4421466e1086da6f18", "0xD862866599CA681c492492E1B7B9aB80066f2FaC"], + ["0x5a26eb7c9c72140d01039eb172dcb8ec98d071bd", "0x4F905f75F5576228eD2D0EA508Fb0c32a0696090"], + ["0x5548bd47293171d3bc1621edccd953bcc9b814cb", "0x5B4463bBD7B2E870601e91161e0F1F7f84CDE214"], + ["0x560b96f81a2190ff6ac84ebfd17788bab3679cbc", "0x398a5FEE22E0dEb67dA1bD15FA4841b6Aa64c471"], + ["0xB62c57Bda4C126E21A726e3D28734bfb1151231e", "0x3ba3E2f3cACcDbE3C56D3046FFe859cc9deE08a0"], + ] + }, + polygon: { + staking: [ + ["0xc3ec80343d2bae2f8e680fdadde7c17e71e114ea", "0xCdD0f77A2A158B0C7cFe38d00443E9A4731d6ea6"], + ["0xc3ec80343d2bae2f8e680fdadde7c17e71e114ea", "0xD77F495Ce60cd9414F99670bEc8657A021e34C83"], + ["0xc3ec80343d2bae2f8e680fdadde7c17e71e114ea", "0x427756E0BBb792f24018E670D570b1b147DbF1F8"], + ["0x3f6b3595ecf70735d3f48d69b09c4e4506db3f47", "0xd1ecDC553651daB068486d9c4d066eCDC614416e"], + ], + pool2: [ + ["0xff2bbcb399ad50bbd06debadd47d290933ae1038", "0xCBf42Ace1dBD895FFDCaBC1b841488542626014d"], + ["0x1dF661fC4319415a2f990bd5F49D5cA70EFDee1C", "0x11c70CAA910647d820bD014d676Dcd97EDD64A99"], + ] + }, +} - module.exports[chain] = { - tvl: () => ({}), - staking: async (ts, _block, chainBlocks) => { - const block = chainBlocks[chain] - const tokens = staking.map(i => [i.token, i.contract,]) - return sumTokens(undefined, tokens, block, chain) - }, - pool2: async (ts, _block, chainBlocks) => { - const block = chainBlocks[chain] - const tokens = pool2.map((p) => [p.pairAddress, p.contract,]) - return sumTokens(undefined, tokens, block, chain) - }, - ...ethAdditional, - } -}) +Object.keys(config).forEach(chain => { + const { staking = [], pool2 = [], } = config[chain] + if (!module.exports[chain]) + module.exports[chain] = {} + module.exports[chain].staking = sumTokensExport({ tokensAndOwners: staking }) + module.exports[chain].pool2 = sumTokensExport({ tokensAndOwners: pool2, resolveLP: true, }) +}) \ No newline at end of file diff --git a/projects/meanfinance/addresses.js b/projects/meanfinance/addresses.js index e06c3fb11a5d..5139a45ed63a 100644 --- a/projects/meanfinance/addresses.js +++ b/projects/meanfinance/addresses.js @@ -44,7 +44,7 @@ const TOKENS_IN_LEGACY_VERSIONS = { '0x2c89bbc92bd86f8075d1decc58c7f4e0107f286b', // AVAX '0x3066818837c5e6ed6601bd5a91b0762877a6b731', // UMA '0x3a58a54c066fdc0f2d55fc9c89f0415c92ebf3c4', // stMATIC - '0x45c32fa6df82ead1e2ef74d17b76547eddfaff89', // FRAX + ADDRESSES.polygon.FRAX, // FRAX '0x4e3decbb3645551b8a19f0ea1678079fcb33fb4c', // jEUR '0x50b728d8d964fd00c2d0aad81718b71311fef68a', // SNX '0x53e0bca35ec356bd5dddfebbd1fc0fd03fabad39', // LINK diff --git a/projects/mellow-protocol-v2/index.js b/projects/mellow-protocol-v2/index.js index a18cfc7fcec8..f6cb5cb78f31 100644 --- a/projects/mellow-protocol-v2/index.js +++ b/projects/mellow-protocol-v2/index.js @@ -10,7 +10,9 @@ const config = { '0x49cd586dd9BA227Be9654C735A659a1dB08232a9', '0x82dc3260f599f4fC4307209A1122B6eAa007163b', '0xd6E09a5e6D719d1c881579C9C8670a210437931b', - '0x8c9532a60E0E7C6BbD2B2c1303F63aCE1c3E9811' + '0x8c9532a60E0E7C6BbD2B2c1303F63aCE1c3E9811', + '0x5E362eb2c0706Bd1d134689eC75176018385430B', + '0x7F43fDe12A40dE708d908Fb3b9BFB8540d9Ce444' ], }, } diff --git a/projects/meridian-lend/index.js b/projects/meridian-lend/index.js index ab48dae7a710..df360e037e56 100644 --- a/projects/meridian-lend/index.js +++ b/projects/meridian-lend/index.js @@ -16,4 +16,5 @@ module.exports = { telos: v2("telos", "0xb84171C0824B4F3C0B415706C99A4A8ED5779b75"), meter: v2("meter", "0x64Be9ee529E555860DA0705819138F41247e76E6"), fuse: v2("fuse", "0xbdD3d2f93cc1c6C951342C42Ef0795323CE83719"), + taiko: v2("taiko", "0x8Cf3E0e7aE4eB82237d0931388EA72D5649D76e0"), } \ No newline at end of file diff --git a/projects/merlin-l2/index.js b/projects/merlin-l2/index.js index ab92d570c537..e1958dd39a71 100644 --- a/projects/merlin-l2/index.js +++ b/projects/merlin-l2/index.js @@ -26,7 +26,8 @@ const owners = [ "bc1qq76dy32nnk5sha36etg6pdj94vl5zrskavux2f", // add on 12/05/2024 "36n825H7orW1u8yWmvR4zs2CWfmkY2rkpK", // add on 12/05/2024 "bc1p35l88j3ashhktg75tjctt6pacrgpyr93ldt7yw484dm4expq073qk4n0a0", // add on 12/05/2024 - + "bc1pahkqca39mfcfay7nueczyhn9v8wq96x7mp4pjxpsdpsnurxzuwuqnhsdg3", // this wallet was provide by merlin team chain on the 14/08/2024 + "1A7oMBdQir24ESgk8LDccM4MUKJx6d2mCw" // this wallet was provide by merlin team chain on the 14/08/2024 ] module.exports = { diff --git a/projects/meso-finance/index.js b/projects/meso-finance/index.js index 51bb73931797..1afc27b17865 100644 --- a/projects/meso-finance/index.js +++ b/projects/meso-finance/index.js @@ -5,17 +5,19 @@ let _poolData function getPoolData() { if (!_poolData) { - _poolData = new Promise(async (resolve, reject) => { - try { - const poolAddresses = await getPoolAddresses() - const poolInfos = await Promise.all(poolAddresses.map(getPoolInfo)) - resolve(poolInfos) - } catch (e) { reject(e) } - }) + _poolData = new Promise(fetchPoolData) } return _poolData + async function fetchPoolData(resolve, reject) { + try { + const poolAddresses = await getPoolAddresses() + const poolInfos = await Promise.all(poolAddresses.map(getPoolInfo)) + resolve(poolInfos) + } catch (e) { reject(e) } + } + async function getPoolAddresses() { const pools = await function_view({ functionStr: "0x68476f9d437e3f32fd262ba898b5e3ee0a23a1d586a6cf29a28add35f253f6f7::meso::pools" }) return pools[0]['data'].map(obj => { return { coin: obj.key, poolAddress: obj.value.inner } }) diff --git a/projects/mitosis/index.js b/projects/mitosis/index.js index e0b048e7703a..8cc14608b2e4 100644 --- a/projects/mitosis/index.js +++ b/projects/mitosis/index.js @@ -1,6 +1,24 @@ const ADDRESSES = require('../helper/coreAssets.json'); const { sumTokens2 } = require('../helper/unwrapLPs'); -const sdk = require('@defillama/sdk'); + +const UNIETH_ADDRESS = { + ethereum: { + asset: "0xf1376bcef0f78459c0ed0ba5ddce976f1ddf51f4", + vault: "0x02Ff1F648Ff443B5d88214341F0acE6ECFb94cF3", + }, + arbitrum: { + asset: "0x3d15fd46ce9e551498328b1c83071d9509e2c3a0", + vault: "0x7E8cffBe165c6905a8AceC0f37B341c00353e8BA", + }, + scroll: { + asset: "0x15eefe5b297136b8712291b632404b66a8ef4d25", + vault: "0xA0EeB418213f8472cba2c842378E1bB64e28bd28", + }, + linea: { + asset: "0x15eefe5b297136b8712291b632404b66a8ef4d25", + vault: "0x56ceD49205e5D9b4d8D9B29f4aBfbe7bb8b08768", + }, +}; const WEETH_ADDRESS = { ethereum: "0xCd5fE23C85820F7B72D0926FC9b05b43E359b7ee", @@ -14,14 +32,18 @@ const WEETH_ADDRESS = { }; const VAULT_weETHs = { - ethereum: "0x917ceE801a67f933F2e6b33fC0cD1ED2d5909D88", + ethereum: "0x917cee801a67f933f2e6b33fc0cd1ed2d5909d88", }; const CAP_ADDRESS = { - scroll: "0x4a6219E25a41FD4165fbd158D89723a7175EA382", ethereum: "0x451d791b6e9a9b8c9237bb55e58a7757342b16f9", + arbitrum: "0xb883ee478d3b7fea8a5357a3c3e27e2d2292b1d2", + optimism: "0xb883ee478d3b7fea8a5357a3c3e27e2d2292b1d2", + mode: "0xb883ee478d3b7fea8a5357a3c3e27e2d2292b1d2", + manta: "0xb883ee478d3b7fea8a5357a3c3e27e2d2292b1d2", blast: "0x096430ef0a653c067df32e93ff77090e084169de", linea: "0xcd32876b9b483eb75e8ca74935e4b51725f33a91", + scroll: "0xcd32876b9B483eb75e8ca74935E4b51725F33A91", }; const vaults = { @@ -29,60 +51,96 @@ const vaults = { ethereum: '0xE4cf2D4eb9c01784798679F2FED4CF47cc59a3ec' }; -const ethCapTVL = async (api) => { - const ethcap = CAP_ADDRESS.ethereum; - const tvl = await api.call({ abi: "uint256:load", target: ethcap }); - - const balance = {}; - balance[WEETH_ADDRESS.ethereum] = tvl; - - return balance; -}; - -const ethVaultTVL = async (api) => { - const ethvault = vaults.ethereum; - return sumTokens2({ api, owner: ethvault, tokens: [VAULT_weETHs.ethereum] }); -}; - -const scrollVaultTVL = async (api) => { - const vault = vaults.scroll; - return sumTokens2({ api, owner: vault, tokens: [WEETH_ADDRESS.scroll] }); -}; - -const capTVL = (chain) => async (api) => { - const cap = CAP_ADDRESS[chain] ?? "0xb883ee478d3b7fea8a5357a3c3e27e2d2292b1d2"; - const tvl = await api.call({ abi: "uint256:load", target: cap }); - api.add(WEETH_ADDRESS[chain], tvl); -}; - +/** + * @param { + * ( + * { + * type: 'cap'; + * data: { + * asset: string; + * cap: string; + * } + * } | { + * type: 'vault'; + * data: { + * asset: string; + * cap: string; + * } + * } + * )[]} inputs + */ +const chainTVL = (inputs) => async (api) => { + for (const { type, data } of inputs) { + if (type === 'cap') { + const tvl = await api.call({ abi: "uint256:load", target: data.cap }); + api.add(data.asset, tvl); + } else if (type === 'vault') { + await sumTokens2({ api, owner: data.vault, tokens: [data.asset] }); + } + } +} module.exports = { + doublecounted: true, ethereum: { - tvl: sdk.util.sumChainTvls([ethCapTVL, ethVaultTVL]) + tvl: chainTVL( + [ + { type: 'cap', data: { asset: WEETH_ADDRESS.ethereum, cap: CAP_ADDRESS.ethereum }}, + { type: 'vault', data: { asset: VAULT_weETHs.ethereum, vault: vaults.ethereum }}, + { type: 'vault', data: UNIETH_ADDRESS.ethereum }, + ], + ), }, scroll: { - tvl: scrollVaultTVL, + tvl: chainTVL( + [ + { type: 'cap', data: { asset: WEETH_ADDRESS.scroll, cap: CAP_ADDRESS.scroll }}, + { type: 'vault', data: UNIETH_ADDRESS.scroll }, + ] + ), }, arbitrum: { - tvl: capTVL("arbitrum"), + tvl: chainTVL( + [ + { type: 'cap', data: { asset: WEETH_ADDRESS.arbitrum, cap: CAP_ADDRESS.arbitrum }}, + { type: 'vault', data: UNIETH_ADDRESS.arbitrum }, + ] + ), }, optimism: { - tvl: capTVL("optimism"), + tvl: chainTVL( + [ + { type: 'cap', data: { asset: WEETH_ADDRESS.optimism, cap: CAP_ADDRESS.optimism }}, + ], + ), }, mode: { - tvl: capTVL("mode"), + tvl: chainTVL( + [ + { type: 'cap', data: { asset: WEETH_ADDRESS.mode, cap: CAP_ADDRESS.mode }}, + ], + ), }, manta: { - tvl: capTVL("manta"), + tvl: chainTVL( + [ + { type: 'cap', data: { asset: WEETH_ADDRESS.manta, cap: CAP_ADDRESS.manta }}, + ], + ), }, blast: { - tvl: capTVL("blast"), + tvl: chainTVL( + [ + { type: 'cap', data: { asset: WEETH_ADDRESS.blast, cap: CAP_ADDRESS.blast }}, + ], + ), }, linea: { - tvl: capTVL("linea"), + tvl: chainTVL( + [ + { type: 'cap', data: { asset: WEETH_ADDRESS.linea, cap: CAP_ADDRESS.linea }}, + { type: 'vault', data: UNIETH_ADDRESS.linea }, + ], + ), }, }; - - - - diff --git a/projects/mole/index.js b/projects/mole/index.js index 2e7e443aa5c9..3fe52bf72bca 100644 --- a/projects/mole/index.js +++ b/projects/mole/index.js @@ -15,8 +15,10 @@ async function aptosTvl() { return {...lyfTvl}; } -async function suiTvl(api) { - return calLyfTvlSui(api) +async function suiTvl() { + const { api } = arguments[3] + + const lyfTvl = await calLyfTvlSui(api) } // run command: node test.js projects/mole/index.js diff --git a/projects/mole/lyf.js b/projects/mole/lyf.js index 966b803e48fa..d07d8610db47 100644 --- a/projects/mole/lyf.js +++ b/projects/mole/lyf.js @@ -4,10 +4,9 @@ const BigNumber = require("bignumber.js"); const { coreTokens } = require("../helper/chain/aptos"); const { getResources } = require("../helper/chain/aptos"); const { getConfig } = require('../helper/cache') -const { unwrapUniswapLPs } = require("../helper/unwrapLPs"); +const { unwrapUniswapLPs, addUniV3LikePosition } = require("../helper/unwrapLPs"); const sui = require('../helper/chain/sui') const { transformBalances } = require("../helper/portedTokens"); -const { i32BitsToNumber } = require("./utils") async function getProcolAddresses(chain) { // if (chain === 'avax') { @@ -17,16 +16,17 @@ async function getProcolAddresses(chain) { // ) // ); // } - - if (chain === 'aptos') { + + if(chain === 'aptos') { return ( - await getConfig('mole/' + chain, + await getConfig('mole/'+chain, "https://raw.githubusercontent.com/Mole-Fi/mole-protocol/main/.aptos_mainnet.json" ) ); - } else if (chain === 'sui') { + }else if(chain === 'sui') { return ( - await getConfig('mole/' + chain, + // modify the hosts for raw.githubusercontent.com ip if it cannot be retrieved. + await getConfig('mole/'+chain, "https://raw.githubusercontent.com/Mole-Fi/mole-protocol/main/.sui_mainnet.json" ) ); @@ -37,7 +37,7 @@ async function getProcolAddresses(chain) { async function calLyfTvl(chain, block) { /// @dev Initialized variables const balances = {}; - const transform = addr => 'avax:' + addr + const transform = addr => 'avax:'+addr /// @dev Getting all addresses from Github const addresses = await getProcolAddresses(chain); @@ -125,18 +125,18 @@ async function calLyfTvlAptos() { /// @dev unwrap LP to get underlaying token balances for workers that are working with LPs await unwrapPancakeSwapLps({ - balances, - lps, - account: '0xc7efb4076dbe143cbcd98cfaaa929ecfc8f299203dfff63b95ccb6bfe19850fa', - poolStr: 'swap::TokenPairReserve', - token0Reserve: i => i.data.reserve_x, - token1Reserve: i => i.data.reserve_y + balances, + lps, + account: '0xc7efb4076dbe143cbcd98cfaaa929ecfc8f299203dfff63b95ccb6bfe19850fa', + poolStr: 'swap::TokenPairReserve', + token0Reserve: i => i.data.reserve_x, + token1Reserve: i => i.data.reserve_y }) /// @dev getting all unused liquidity on each vault resources.filter(i => i.type.includes("vault::VaultInfo")) .map(i => { - const token = i.type.split('<')[1].replace('>', ''); + const token = i.type.split('<')[1].replace('>',''); sdk.util.sumSingleBalance(balances, token, new BigNumber(i.data.coin.value).minus(i.data.reserve_pool).toFixed(0)) }) @@ -149,7 +149,7 @@ function sumPancakeWorkerStakingLps(resources, lps, workers) { i.type.includes("pancake_worker::WorkerInfo") || i.type.includes("delta_neutral_pancake_asset_worker::WorkerInfo") || i.type.includes("delta_neutral_pancake_stable_worker::WorkerInfo") - ) && workers[i.type.split('::', 1)[0]] + ) && workers[i.type.split('::',1)[0]] ) workerInfos.forEach(i => { @@ -158,7 +158,7 @@ function sumPancakeWorkerStakingLps(resources, lps, workers) { const lp = lpWithSuffix.substr(0, lpWithSuffix.length - 1); const amount = new BigNumber(i.data.total_balance ?? i.data.total_lp_balance) - if (lps[lp] === undefined) { + if(lps[lp] === undefined) { lps[lp] = { amount: amount } } else { lps[lp].amount = lps[lp].amount.plus(amount); @@ -174,13 +174,13 @@ async function unwrapPancakeSwapLps({ token0Reserve = i => i.data.coin_x_reserve.value, token1Reserve = i => i.data.coin_y_reserve.value, getTokens = i => i.type.split('<')[1].replace('>', '').split(', ') -}) { +}){ const coinInfos = {} const lpReserves = {} for (const lpType in lps) { - if (lps.hasOwnProperty(lpType)) { + if(lps.hasOwnProperty(lpType)){ coinInfos[`0x1::coin::CoinInfo<${lpType}>`] = lpType; - const tokens = getTokens({ type: lpType }) + const tokens = getTokens({type: lpType}) lpReserves[`${account}::${poolStr}<${tokens[0]}, ${tokens[1]}>`] = lpType; } } @@ -188,7 +188,7 @@ async function unwrapPancakeSwapLps({ let pools = await getResources(account); let lpInfos = pools; pools = pools.filter((i) => { - if (!i.type.includes(poolStr)) { + if(!i.type.includes(poolStr)){ return false } @@ -197,7 +197,7 @@ async function unwrapPancakeSwapLps({ }); lpInfos.forEach(i => { const lpType = coinInfos[i.type]; - if (lpType) { + if(lpType){ lps[lpType].totalSupply = new BigNumber(i.data.supply.vec[0].integer.vec[0].value) } }); @@ -238,71 +238,47 @@ async function calLyfTvlSui(api) { const workerInfos = await sui.getObjects(workerInfoIds) let poolIds = [] - workerInfos.forEach(workerInfo => { - let poolId = workerInfo.fields.position_nft.fields.pool - // poolId = poolId.replace('0x0', '0x') - if (!poolIds.includes(poolId)) { - poolIds.push(poolId) + workerInfos.forEach(workerInfo => + { + let poolId = workerInfo.fields.position_nft.fields.pool + // poolId = poolId.replace('0x0', '0x') + if (!poolIds.includes(poolId)) { + poolIds.push(poolId) + } } - } ) - const poolInfos = await sui.getObjects(poolIds) + const poolInfos = await sui.getObjects(poolIds) let poolMap = new Map() - poolInfos.forEach(poolInfo => { - // const poolId = poolInfo.fields.id.id.replace('0x0', '0x') - poolMap.set(poolInfo.fields.id.id, poolInfo) - } + poolInfos.forEach(poolInfo => + { + // const poolId = poolInfo.fields.id.id.replace('0x0', '0x') + poolMap.set(poolInfo.fields.id.id, poolInfo) + } ) - workerInfos.forEach(workerInfo => { - let poolId = workerInfo.fields.position_nft.fields.pool - - let coinAamount = 0 - let coinBamount = 0 - computeCLMMPositionBalances() - - const [coinA, coinB] = poolMap.get(poolId).type.replace('>', '').split('<')[1].split(', ') - api.add(coinA, coinAamount) - api.add(coinB, coinBamount) - - // code copied from uni v3 NFT resolver - function computeCLMMPositionBalances() { - const tickToPrice = (tick) => 1.0001 ** tick - - const liquidity = workerInfo.fields.position_nft.fields.liquidity - const tickLowerIndex = i32BitsToNumber(workerInfo.fields.position_nft.fields.tick_lower_index.fields.bits) - const tickUpperIndex = i32BitsToNumber(workerInfo.fields.position_nft.fields.tick_upper_index.fields.bits) - const bottomTick = tickLowerIndex - const topTick = tickUpperIndex - const tick = i32BitsToNumber(poolMap.get(poolId).fields.current_tick_index.fields.bits) - const sa = tickToPrice(bottomTick / 2) - const sb = tickToPrice(topTick / 2) - - if (tick < bottomTick) { - coinAamount = liquidity * (sb - sa) / (sa * sb) - } else if (tick < topTick) { - const price = tickToPrice(tick) - const sp = price ** 0.5 - - coinAamount = liquidity * (sb - sp) / (sp * sb) - coinBamount = liquidity * (sp - sa) - } else { - coinBamount = liquidity * (sb - sa) - } - } + for (const workerInfo of workerInfos) { + const liquidity = workerInfo.fields.position_nft.fields.liquidity + const tickLower = workerInfo.fields.position_nft.fields.tick_lower_index.fields.bits + const tickUpper = workerInfo.fields.position_nft.fields.tick_upper_index.fields.bits + const poolId = workerInfo.fields.position_nft.fields.pool + const currentSqrtPrice = poolMap.get(poolId).fields.current_sqrt_price + const tick = Math.floor(Math.log(currentSqrtPrice ** 2) / Math.log(1.0001)); + const [token0, token1] = poolMap.get(poolId).type.replace('>', '').split('<')[1].split(', ') + addUniV3LikePosition({ api, token0, token1, liquidity, tickLower, tickUpper, tick }) } - ) // calculate the Vault TVL. const vaultInfoIds = addresses.Vaults.map(valut => valut.vaultInfo) const vaultInfos = await sui.getObjects(vaultInfoIds) - + for (let i = 0; i < vaultInfos.length; i++) { const baseToken = addresses.Vaults[i].baseToken const tokenAmount = vaultInfos[i].fields.value.fields.coin - api.add(baseToken, tokenAmount) + const vaultDebtVal = vaultInfos[i].fields.value.fields.vault_debt_val + const vaultAmount = parseInt(tokenAmount) + parseInt(vaultDebtVal) + api.add(baseToken, vaultAmount.toString()) } } @@ -312,3 +288,4 @@ module.exports = { calLyfTvlAptos, calLyfTvlSui, } + \ No newline at end of file diff --git a/projects/mole/utils.js b/projects/mole/utils.js deleted file mode 100644 index fc5220af102e..000000000000 --- a/projects/mole/utils.js +++ /dev/null @@ -1,12 +0,0 @@ - -function asIntN(int, bits = 32) { - return Number(BigInt.asIntN(bits, BigInt(int))); -} - -function i32BitsToNumber(v) { - return asIntN(BigInt(v), 32); -} - -module.exports = { - i32BitsToNumber, -} diff --git a/projects/moonwell/index.js b/projects/moonwell/index.js index 0554398a7902..7424e20795f4 100644 --- a/projects/moonwell/index.js +++ b/projects/moonwell/index.js @@ -31,8 +31,17 @@ const baseConfig = { // Moonbeam const baseTVL = usdCompoundExports(baseConfig.comptroller, baseConfig.chain) +// Optimism +const optimismConfig = { + comptroller: '0xCa889f40aae37FFf165BccF69aeF1E82b5C511B9', + chain: 'optimism' +} + +const optimismTVL = usdCompoundExports(optimismConfig.comptroller, optimismConfig.chain) + module.exports = { moonbeam: { ...moonbeamTVL, staking: moonbeamStaking }, base: { ...baseTVL }, + optimism: { ...optimismTVL }, hallmarks: [[1659312000, 'Nomad Bridge Exploit']] } diff --git a/projects/nearlenddao/index.js b/projects/nearlenddao/index.js new file mode 100644 index 000000000000..c3591ac0b1a8 --- /dev/null +++ b/projects/nearlenddao/index.js @@ -0,0 +1,29 @@ +const { call, sumSingleBalance, sumTokens } = require('../helper/chain/near') +const NEARLEND_DAO_CONTRACT = 'v1.nearlend-official.near' + +async function borrowed() { + const balances = {}; + const assetsCallResponse = await call(NEARLEND_DAO_CONTRACT, 'get_assets_paged', {}); + + assetsCallResponse.forEach(([token, asset]) => { + const extraDecimals = asset.config.extra_decimals; + sumSingleBalance(balances, token, asset.borrowed.balance / (10 ** extraDecimals)); + }) + + return balances; +} + +async function tvl(api) { + const assetsCallResponse = await call(NEARLEND_DAO_CONTRACT, 'get_assets_paged', {}); + const tokens = assetsCallResponse.map(([token]) => token); + return sumTokens({ owners: [NEARLEND_DAO_CONTRACT], tokens }); +} + +module.exports = { + near: { + tvl, + borrowed, + }, + timetravel: false, + methodology: 'Summed up all the tokens deposited in their main lending contract' +} diff --git a/projects/nimbora-yield/index.js b/projects/nimbora-yield/index.js index 41ba202628e5..70f2db349333 100644 --- a/projects/nimbora-yield/index.js +++ b/projects/nimbora-yield/index.js @@ -28,7 +28,7 @@ async function tvl(api) { const strategyData = await getConfig('nimbora-yield', undefined, { fetcher }) for (let index = 0; index < strategyData.length; index++) { const strategyInfo = strategyData[index]; - const underlying = parseAddress(strategyInfo.underlying) == "0x05574eb6b8789a91466f902c380d978e472db68170ff82a5b650b95a58ddf4ad" ? ADDRESSES.starknet.DAI : parseAddress(strategyInfo.underlying); + const underlying = parseAddress(strategyInfo.underlying) == ADDRESSES.starknet.DAI_1 ? ADDRESSES.starknet.DAI : parseAddress(strategyInfo.underlying); const strategyTvl = await call({ target: strategyInfo.tokenManager, abi: totalAssetsAbi }); api.add(underlying, strategyTvl) } diff --git a/projects/nomad/index.js b/projects/nomad/index.js index 03d5464f891f..a9b18f894b41 100644 --- a/projects/nomad/index.js +++ b/projects/nomad/index.js @@ -29,7 +29,7 @@ const TOKEN_ADDRESSES = [ }, { // FXS - 'ethereum': '0x3432B6A60D23Ca0dFCa7761B7ab56459D9C964D0' + 'ethereum': ADDRESSES.ethereum.FXS }, { 'ethereum': ADDRESSES.ethereum.WETH diff --git a/projects/nxfinance/index.js b/projects/nxfinance/index.js index 98400c018acd..01d45f48f78a 100644 --- a/projects/nxfinance/index.js +++ b/projects/nxfinance/index.js @@ -1,16 +1,25 @@ const { Program } = require("@project-serum/anchor"); const { getProvider, } = require("../helper/solana"); -const nxIdl = require("./nx-idl.json"); +const nxIdlV1 = require("./nx-idl-v1.json"); +const nxIdlV2 = require("./nx-idl-v2.json"); -const NX_PROGRAM_ADDR = "EHBN9YKtMmrZhj8JZqyBQRGqyyeHw5xUB1Q5eAHszuMt"; +const NX_PROGRAM_ADDR_V1 = "EHBN9YKtMmrZhj8JZqyBQRGqyyeHw5xUB1Q5eAHszuMt"; +const NX_PROGRAM_ADDR_V2 = "NXFiKimQN3QSL3CDhCXddyVmLfrai8HK36bHKaAzK7g"; async function tvl(api) { const provider = getProvider(); - const nx_program = new Program(nxIdl, NX_PROGRAM_ADDR, provider); - const accounts = await nx_program.account.marginPool.all() - for (let { account: pool } of accounts) - api.add(pool.tokenMint.toBase58(), pool.depositTokens.toString()) + const nx_program_v1 = new Program(nxIdlV1, NX_PROGRAM_ADDR_V1, provider) + const nx_program_v2 = new Program(nxIdlV2, NX_PROGRAM_ADDR_V2, provider) + const res = await Promise.all([ + nx_program_v1.account.marginPool.all(), + nx_program_v2.account.collateralPool.all(), + nx_program_v2.account.lendingPool.all() + ]) + + for (let value of res) + for (let { account: pool } of value) + api.add(pool.tokenMint.toBase58(), pool.depositTokens.toString()) } module.exports = { diff --git a/projects/nxfinance/nx-idl.json b/projects/nxfinance/nx-idl-v1.json similarity index 100% rename from projects/nxfinance/nx-idl.json rename to projects/nxfinance/nx-idl-v1.json diff --git a/projects/nxfinance/nx-idl-v2.json b/projects/nxfinance/nx-idl-v2.json new file mode 100644 index 000000000000..deb4ab748646 --- /dev/null +++ b/projects/nxfinance/nx-idl-v2.json @@ -0,0 +1,167 @@ +{ + "version": "0.1.0", + "name": "nx_lend", + "instructions": [], + "accounts": [ + { + "name": "CollateralPool", + "type": { + "kind": "struct", + "fields": [ + { + "name": "nxMarket", + "docs": [ + "Market's pubkey" + ], + "type": "publicKey" + }, + { + "name": "marketAuthority", + "docs": [ + "The pool authority to act" + ], + "type": "publicKey" + }, + { + "name": "tokenMint", + "docs": [ + "The token the pool allows lending and borrowing on" + ], + "type": "publicKey" + }, + { + "name": "depositTokens", + "docs": [ + "The total amount of tokens available in the pool's vault" + ], + "type": "u64" + }, + { + "name": "depositNotes", + "docs": [ + "The total amount of notes issued to depositors of tokens." + ], + "type": "u64" + } + ] + } + }, + { + "name": "LendingPool", + "type": { + "kind": "struct", + "fields": [ + { + "name": "nxMarket", + "docs": [ + "Market's pubkey" + ], + "type": "publicKey" + }, + { + "name": "tokenMint", + "docs": [ + "The pool authority to act", + "The token the pool allows lending and borrowing on" + ], + "type": "publicKey" + }, + { + "name": "borrowTokens", + "docs": [ + "The total amount of tokens borrowed, that need to be repaid to", + "the pool." + ], + "type": "u64" + }, + { + "name": "borrowNotes", + "docs": [ + "The total amount of notes issued to borrowers of tokens" + ], + "type": "u64" + }, + { + "name": "depositTokens", + "docs": [ + "The total amount of tokens available in the pool's vault" + ], + "type": "u64" + }, + { + "name": "depositNotes", + "docs": [ + "The total amount of notes issued to depositors of tokens." + ], + "type": "u64" + }, + { + "name": "depositInterest", + "type": "u64" + }, + { + "name": "borrowInterest", + "docs": [ + "Amount of unrepaid interest by borrowers, for loan note exchange rate calculation" + ], + "type": "u64" + }, + { + "name": "protocolFee", + "docs": [ + "10% of interest goes to the protocol," + ], + "type": "u64" + }, + { + "name": "accruedUntil", + "docs": [ + "The time the interest was last accrued up to" + ], + "type": "i64" + }, + { + "name": "utilizationFlag", + "docs": [ + "If the utilization rate is flagged as full" + ], + "type": "u16" + }, + { + "name": "interestRateConfigs", + "type": { + "vec": { + "defined": "InterestRateData" + } + } + } + ] + } + } + ], + "types": [ + { + "name": "InterestRateData", + "type": { + "kind": "struct", + "fields": [ + { + "name": "utilizationRate", + "docs": [ + "y=kx+b x=utilization_rate y=interest_rate" + ], + "type": "i32" + }, + { + "name": "kValue", + "type": "i32" + }, + { + "name": "bValue", + "type": "i32" + } + ] + } + } + ] +} \ No newline at end of file diff --git a/projects/olympus/index.js b/projects/olympus/index.js index 2a83b091b661..f3713bd1ac6a 100644 --- a/projects/olympus/index.js +++ b/projects/olympus/index.js @@ -31,7 +31,7 @@ const addressMap = { "0xb23dfc0c4502a271976f1ee65321c51be2529640": "0x76fcf0e8c7ff37a47a799fa2cd4c13cde0d981c9", //aura50OHM-50DAI -> 50OHM-50DAI "0xc8418af6358ffdda74e09ca9cc3fe03ca6adc5b0": - "0x3432b6a60d23ca0dfca7761b7ab56459d9c964d0", // veFXS -> FXS + ADDRESSES.ethereum.FXS, // veFXS -> FXS "0x3fa73f1e5d8a792c80f426fc8f84fbf7ce9bbcac": "0xc0c293ce456ff0ed870add98a0828dd4d2903dbf", //vlAURA -> AURA [ADDRESSES.ethereum.vlCVX]: diff --git a/projects/onx.js b/projects/onx.js index c29a45c357f2..a42c16f5307e 100644 --- a/projects/onx.js +++ b/projects/onx.js @@ -1,7 +1,232 @@ -const { ethTvl, getEthereumStaking, getEthereumPoolTvl, getEthereumBorrows, } = require('./config/onx/ethereum'); -const { vaults: fVaults } = require('./config/onx/fantom/vaults'); -const { vaults: pVaults } = require('./config/onx/polygon/vaults'); -const { vaults: aVaults } = require('./config/onx/avalanche/vaults'); + +const { staking } = require('./helper/staking') +const ADDRESSES = require('./helper/coreAssets.json') + + +const config = { + polygon: { vaults: [ + //dualMaticUsdc + ['0x6e7a5fafcec6bb1e78bae2a1f0b612012bf14827', '0x36D14424Cc5a18893e93A0f8FdD42DC40562887E'], + //dualMaticEth + ['0xadbf1854e5883eb8aa7baf50705338739e558e5b', '0xfe51dE20719d05152Ace63a069446Bb5C89511DB'], + //dualMaticUsdt + ['0x604229c960e5cacf2aaeac8be68ac07ba9df81c3', '0x067E7586Eb8733bF108167C15cBAbee4c629C37A'], + //dualMaticQuick + ['0x019ba0325f1988213d448b3472fa1cf8d07618d7', '0x849031F78970639F8Dc9Dc3E962e0d0079D1051c'], + //EthUsdc + ['0x853ee4b2a13f8a742d64c8f088be7ba2131f670d', '0x185A1cfdb7173b224d08E61F1Cb21Fd5Fd6ee8CD'], + //wBtcEth + ['0xdc9232e2df177d7a12fdff6ecbab114e2231198d', '0xf1ba3ef65262ee4058462e65a3a09a7571193400'], + //ethUsdt + ['0xf6422b997c7f54d1c6a6e103bcb1499eea0a7046', '0x353856185fBB65a098b971B6d492CC3c245D9a59'], + //quickEth + ['0x1bd06b96dd42ada85fdd0795f3b4a79db914add5', '0x9767218525A443AE1B04A2a84Cf2f6D646C2fA06'], + //aaveEth + ['0x90bc3e68ba8393a3bf2d79309365089975341a43', '0xbB760a23924a23e5270c659349c753d16e7C1078'], + //ethDai + ['0x4a35582a710e1f4b2030a3f826da20bfb6703c09', '0x0d553115D2c1E2b734d66De1Eba4BAe1a88cB175'], + //wbtcUsdc + ['0xf6a637525402643b0654a54bead2cb9a83c8b498', '0x248Eecc8286A8C6484B4A87e1F32f0bc2d7971D4'], + //linkEth + ['0x5ca6ca6c3709e1e6cfe74a50cf6b2b6ba2dadd67', '0x58bC3B5949C6784819A606645d616D8D2dA7594B'], + //usdcQuick + ['0x1f1e4c845183ef6d50e9609f16f6f9cae43bc9cb', '0x7E9dA60002dAF64778C78Ac90dD5bdc9391acb00'], + //usdcUsdt + ['0x2cf7252e74036d1da831d11089d326296e64a728', '0x1a130be9a0E9046936E5461D3e8727b6aF7d0C2C'], + //avaxMatic + ['0xeb477ae74774b697b5d515ef8ca09e24fee413b5', '0x8D20fB2F4F96E897Fed7E3E50f8A403aFc59dA23'], + //solMatic + ['0x898386dd8756779a4ba4f1462891b92dd76b78ef', '0x0A1EfAF7dd833F9D8EF9f2f095bf1d6C725FF110'], + //bnbUsdc + ['0x40a5df3e37152d4daf279e0450289af76472b02e', '0x43bE6849BC355735D77238AcfDBcEB7bE8673f02'], + //ftmMatic + ['0xd2b61a42d3790533fedc2829951a65120624034a', '0xF020de990036D5aE107860592Bde0E53892F1531'], + //daiUsdc + ['0xf04adbf75cdfc5ed26eea4bbbb991db002036bdd', '0x260e6fB68C787CdA2E9ea104f9e3a3923E4119f6'], + //daiUsdt + ['0x59153f27eefe07e5ece4f9304ebba1da6f53ca88', '0x32B750721Ad93f62b21402526354d53ac46953C2'], + ] }, + avax: { vaults: [ + //usdcAvax + ['0xa389f9430876455c36478deea9769b7ca4e3ddb1', '0x8025d4deDa0C7512d44438a7DC597612B4108F07'], + //wethAvax + ['0xfe15c2695f1f920da45c30aae47d11de51007af9', '0xf7AcA362510b327bDAca693611353b6a837cBDB2'], + //avaxUsdte + ['0xed8cbd9f0ce3c6986b22002f03c6475ceb7a6256', '0x897Fb124aCdF5A685d9258645ffee0058464817A'], + //joeAvax [not available] + ['0x454e67025631c065d3cfad6d71e6892f74487a15', '0x02e9bc3EF29A3f51EdE6e4c4F70fdcb894CD6Cf5'], + //wBtcAvax + ['0xd5a37dc5c9a396a03dd1136fc76a1a02b1c88ffa', '0x8922E41342C6160fAf4dC40f2c1fCFCd94E98779'], + //linkAvax + ['0x6f3a0c89f611ef5dc9d96650324ac633d02265d3', '0x55F42961b3aD4E2A08f1780C7434dd8EC5f7FcE4'], + //joeUsdce + ['0x67926d973cd8ee876ad210faaf7dffa99e414acf', '0xD9F63Cc588822cD3eF802D900808E946d13CE609'], + //bnbAvax + ['0xeb8eb6300c53c3addbb7382ff6c6fbc4165b0742', '0x4decafaCD4591e52f85e8FE69F82F2400176BB33'], + //joeUsdte + ['0x1643de2efb8e35374d796297a9f95f64c082a8ce', '0xfD127Bc3b6153b043fFD8d7f38272593700b124c'], + // //spellAvax [not available] + ['0x62cf16bf2bc053e7102e2ac1dee5029b94008d99', '0x9eE877279DFE8e5F20614db88e50CD72B4efDEAD'], + // //xavaAvax [not available] + ['0x72c3438cf1c915ecf5d9f17a6ed346b273d5bf71', '0x54720637Fa477eD87Cd06F674247a649A5168eB6'], + //linkeUsdce + ['0xb9f425bc9af072a91c423e31e9eb7e04f226b39d', '0x62CA6F1640776070ECa70E09d9AF27352a43a5D8'], + //wethUsdce + ['0x199fb78019a08af2cb6a078409d0c8233eba8a0c', '0x2C858E3181988f2E4458f14768aE204E5BF2Ee0e'], + //pefiAvax [not available] + ['0xb78c8238bd907c42be45aebdb4a8c8a5d7b49755', '0x276F74C24Cc4443Ecb4967Db77572BE50aeD4117'], + //wbtceAvax + ['0x62475f52add016a06b398aa3b2c2f2e540d36859', '0x008E6bf114D686713dC233487e360A158433e519'], + //aaveAvax + ['0xc3e6d9f7a3a5e3e223356383c7c055ee3f26a34f', '0xE7c34e1946A10a3A28BEd4B0Cb5B7F0d85F5368D'], + //qiAvax + ['0x2774516897ac629ad3ed9dcac7e375dda78412b9', '0x0240269d999301d03aAe390104584F7517f52ECd'], + // //avaxBoo [not available] + ['0xebf50b8089a0c5e7c5de23f644fcd723818f65b3', '0xB4a805Ad532BB92501507C9eAc27FD0BAe4d68A1'], + // //maiAvax [not available] + ['0x23ddca8de11eccd8000263f008a92e10dc1f21e8', '0x2071fD6779B701aa71c4a48b8f37970160e5FE75'], + // //h20Avax [not available] + ['0x9615a11eaa912eae869e9c1097df263fc3e105f3', '0x6b42A98af10C2E94a6951c94b8Ac5B5EEB23c8AF'], + ] }, + fantom: { vaults: [ + //xBoo + ['0x841fad6eae12c286d1fd18d1d525dffa75c7effe', '0x95d0d6A7D75A5b086d2823C38F6Dd80a50fD0d93',], + //BooFtm + ['0xec7178f4c41f346b2721907f5cf7628e388a7a58', '0x62CA6F1640776070ECa70E09d9AF27352a43a5D8'], + //UsdcFtm + ['0x2b4c76d0dc16be1c31d4c1dc53bf9b45987fc75c', '0x6b42A98af10C2E94a6951c94b8Ac5B5EEB23c8AF'], + //fUsdtFtm + ['0x5965E53aa80a0bcF1CD6dbDd72e6A9b2AA047410', '0xC033338F7605B1555b1d3FC2a3626b2b76a0E042'], + //DaiFtm + ['0xe120ffBDA0d14f3Bb6d6053E90E63c572A66a428', '0xf1Ba3EF65262ee4058462E65A3A09a7571193400'], + //btc + ['0xFdb9Ab8B9513Ad9E419Cf19530feE49d412C3Ee3', '0x0f16CBDaF6c8115cDde59876cF232903E95D488A'], + //eth + ['0xf0702249F4D3A25cD3DED7859a165693685Ab577', '0x7396241a8a45E6252A2b5bBB571CBdfF599E16F1'], + //link + ['0x89d9bC2F2d091CfBFc31e333D6Dc555dDBc2fd29', '0x8D20fB2F4F96E897Fed7E3E50f8A403aFc59dA23'], + //aave + ['0xeBF374bB21D83Cf010cC7363918776aDF6FF2BF6', '0xE663F7d6AFB3A3Ef458D5c4a068E29368a46Eb87'], + //sushi + ['0xf84E313B36E86315af7a06ff26C8b20e9EB443C3', '0x32B750721Ad93f62b21402526354d53ac46953C2'], + //crv + ['0xB471Ac6eF617e952b84C6a9fF5de65A9da96C93B', '0x424B1AE0AF693d4577dde25081E970cb656013C7'], + //bnb + ['0x956DE13EA0FA5b577E4097Be837BF4aC80005820', '0x1fA1B8D94B922e3C9821f66363a75237c36096af'], + //any + ['0x5c021D9cfaD40aaFC57786b409A9ce571de375b4', '0xE41718b549B935358A2f62acbD289F3dcccABB18'], + //mim + ['0x6f86e65b255c9111109d2D2325ca2dFc82456efc', '0xfB271303B157d2e3d91CF86C7956eb46180d62E5'], + //yfi + ['0x0845c0bFe75691B1e21b24351aAc581a7FB6b7Df', '0x4CddFEf40f13F16520b7f98f269f772560A8fb9a'], + //btcEth + ['0xEc454EdA10accdD66209C57aF8C12924556F3aBD', '0x58bC3B5949C6784819A606645d616D8D2dA7594B'], + //spell + ['0x78f82c16992932EfDd18d93f889141CcF326DBc2', '0x4aFa2C780d0d2b139886A532d1D1959f4D316ee7'], + //joe + ['0xd518737Ff601c2A7C67F55EbbEb0a4e3fF5C0C35', '0xbE0093F744287Ea0478cc75c6320043a8b79E845'], + ] }, +} + +async function tvl(api) { + const { vaults } = config[api.chain] + const pools = vaults.map(i => i[1]) + const tokens = vaults.map(i => i[0]) + const bals = await api.multiCall({ abi: 'uint256:underlyingBalanceWithInvestment', calls: pools }) + api.addTokens(tokens, bals) +} + +const tokenAddresses = { + onx: "0xe0ad1806fd3e7edf6ff52fdb822432e847411033", + sOnx: "0xa99f0ad2a539b2867fcfea47f7e71f240940b47c", + onxFarm: "0x168f8469ac17dd39cd9a2c2ead647f814a488ce9", + onxTripleFarm: "0x30D1A19EA928cCf46634cBC2944D2D89Be636f22", + onxWethSushiPair: "0x62f22A47e5D2F8b71cC44fD85863753618312f67", + pool: "0x47F3E6C1Ef0cBe69502167095b592e61de108BaA", + aethToken: "0xE95A203B1a91a908F9B9CE46459d101078c2c3cb", + onsToken: "0xfC97C0c12438B6E4CF246cD831b02FeF4950DCAD", + oneVault: "0x3BdF1977d87EDAD8e0617efCEa958F6d43A4C30E", + onePools: [ + '0x54c532E367031F56c401C6024aC4ABEfF2b03534', + '0xbc2346C3c7F3998A12A1c8E7Be44734EcC832763', + '0xe64796FCc97c33A2193Ba60f013F3fA5D4712d56', + '0xe659fA84e0C687760245046BA63329d44320997c', + '0x19Eb6536777713aCdAcA8dd9A3AD9843D74E9E3b', + '0x1B72255a11DF705Bb598E670830E03A19F2D242f', + '0x7058EE5467edef417746aab0B8cabbbE36eF1798', + '0x9792eE4c36a622a8CF9566b037c57519A9fe8a56', + ] +} + +const getEthereumStaking = staking(tokenAddresses.sOnx, tokenAddresses.onx) + +const getEthereumBorrows = async (api) => { + api.add(ADDRESSES.null, await api.call({ target: tokenAddresses.pool, abi: 'uint256:totalBorrow' })) +} + +async function getEthereumPoolTvl(api) { + const pools = ['0xAdb6d1cB866a52C5E8C1e79Ff8e0559c12F4D7a3'] + const tokens = ['0x0652687e87a4b8b5370b05bc298ff00d205d9b5f'] + const bals = await api.multiCall({ abi: 'uint256:underlyingBalanceWithInvestment', calls: pools }) + api.addTokens(tokens, bals) + return api.sumTokens({ owners: [tokenAddresses.onxFarm, tokenAddresses.onxTripleFarm], tokens: ['0x0652687e87a4b8b5370b05bc298ff00d205d9b5f', tokenAddresses.onxWethSushiPair] }) +} + +async function ethTvl(api) { + await Promise.all([addFarmTvl, addOnePoolTvl, addVaultTvl, addOneVaultTvl, ethStakeTvl].map(i => i())) + + async function ethStakeTvl() { + let totalStake = await api.call({ target: tokenAddresses.pool, abi: 'uint256:totalStake' }) + let totalBorrow = await api.call({ target: tokenAddresses.pool, abi: 'uint256:totalPledge' }) + api.add(ADDRESSES.null, totalStake - totalBorrow) + } + + + async function addVaultTvl() { + const vaults = [ + ['0xceff51756c56ceffca006cd410b03ffc46dd3a58', '0x2abCe7c4C77e215fcCc189E02Fc5D2A30b52a06a'], + ['0x397ff1542f962076d0bfe58ea045ffa2d347aca0', '0x637c871C559ade45b37074fCF3B8081Ec81c55FC'], + ['0x06da0fd433c1a5d7a4faa01111c044910a184553', '0xeAaE5CEfce1092eb3eA1DA7622B3cF4fb20B8b81'], + + ['0x795065dcc9f64b5614c407a6efdc400da6221fb0', '0xdC6f222c4504C43225a89b84E3aae15Ad0DFDF0F'], + ['0x36e2fcccc59e5747ff63a03ea2e5c0c2c14911e7', '0x10A8dc3C0Db7BDFE1Db36d113c2685e60daaFEb8'], + ['0xfa5bc40c3bd5afa8bc2fe6b84562fee16fb2df5f', '0x6901Aac9813f3EfAae32F44E9b579f08A12707AD'], + ['0x1241f4a348162d99379a23e73926cf0bfcbf131e', '0x121eF4eEc2bb4D5eD91347166F02c0763af1C49A'], + ['0x088ee5007c98a9677165d78dd2109ae4a3d04d0c', '0x431b1F5356EcAc2D86b2313907B747B16D11066f'], + + ['0xc3d03e4f041fd4cd388c549ee2a29a9e5075882f', '0x5EA1b54C522f279ecC0182d9b35229d6435D42b7'], + ['0xd75ea151a61d06868e31f8988d28dfe5e9df57b4', '0x9DB4AFCABdB25C89424c88e720dD47D6be43BdBe'], + ['0xc40d16476380e4037e6b1a2594caf6a6cc8da967', '0xbd3a37e3690ad4e145c39983D0Aaf8bd5f5e2F29'], + ['0x31503dcb60119a812fee820bb7042752019f2355', '0x8d47f6fd4602B1ecF7928C0f1AEF9C215E3596b4'], + ['0x31503dcb60119a812fee820bb7042752019f2355', '0x8d47f6fd4602B1ecF7928C0f1AEF9C215E3596b4'], + + ['0xba13afecda9beb75de5c56bbaf696b880a5a50dd', '0x659217CdA99658AeBA399B4a79FB03D96B3c46bC'], + ['0xf55c33d94150d93c2cfb833bcca30be388b14964', '0xcedB7921013A012c5538C0d2925a90AA817Bef4D'], + ] + const pools = vaults.map(i => i[1]) + const tokens = vaults.map(i => i[0]) + const bals = await api.multiCall({ abi: 'uint256:underlyingBalanceWithInvestment', calls: pools }) + api.addTokens(tokens, bals) + } + + async function addFarmTvl() { + const farm = '0x168f8469ac17dd39cd9a2c2ead647f814a488ce9' + const pools = await api.fetchList({ lengthAbi: 'uint256:poolLength', itemAbi: 'function poolInfo(uint256) view returns (address token, uint256,uint256,uint256)', target: farm }) + return api.sumTokens({ owner: farm, tokens: pools.map(i => i.token), blacklistedTokens: ['0x0652687e87a4b8b5370b05bc298ff00d205d9b5f', tokenAddresses.onxWethSushiPair] }) + } + async function addOnePoolTvl() { + const pools = tokenAddresses.onePools + const tokens = await api.multiCall({ abi: 'address:stakingToken', calls: pools }) + return api.sumTokens({ tokensAndOwners2: [tokens, pools] }) + } + + async function addOneVaultTvl() { + const vault = tokenAddresses.oneVault + const aETH = await api.call({ abi: 'address:aEth', target: vault }) + const aETHb = await api.call({ abi: 'address:aETHb', target: vault }) + return api.sumTokens({ tokens: [aETH, aETHb], owner: vault }) + } +} module.exports = { doublecounted: true, @@ -14,18 +239,4 @@ module.exports = { polygon: { tvl, }, avax: { tvl, }, fantom: { tvl, }, -}; - -const config = { - polygon: { vaults: pVaults }, - avax: { vaults: aVaults }, - fantom: { vaults: fVaults }, -} - -async function tvl(api) { - const { vaults } = config[api.chain] - const pools = vaults.map(i => i[1]) - const tokens = vaults.map(i => i[0]) - const bals = await api.multiCall({ abi: 'uint256:underlyingBalanceWithInvestment', calls: pools }) - api.addTokens(tokens, bals) -} \ No newline at end of file +}; \ No newline at end of file diff --git a/projects/opus/index.js b/projects/opus/index.js new file mode 100644 index 000000000000..5f101278cf20 --- /dev/null +++ b/projects/opus/index.js @@ -0,0 +1,23 @@ +const ADDRESSES = require('../helper/coreAssets.json') +const { sumTokens } = require('../helper/chain/starknet') + +const tokensAndOwners = [ + // Gates + [ADDRESSES.starknet.ETH, "0x0315ce9c5d3e5772481181441369d8eea74303b9710a6c72e3fcbbdb83c0dab1"], + [ADDRESSES.starknet.STRK, "0x031a96fe18fe3fdab28822c82c81471f1802800723c8f3e209f1d9da53bc637d"], + [ADDRESSES.starknet.WBTC, "0x05bc1c8a78667fac3bf9617903dbf2c1bfe3937e1d37ada3d8b86bf70fb7926e"], + [ADDRESSES.starknet.WSTETH, "0x02d1e95661e7726022071c06a95cdae092595954096c373cde24a34bb3984cbf"], + // Transmuters + [ADDRESSES.starknet.USDC, "0x03878595db449e1af7de4fb0c99ddb01cac5f23f9eb921254f4b0723a64a23cb"], +] + +async function tvl(api) { + return await sumTokens({ api, tokensAndOwners: tokensAndOwners }); +} + +module.exports = { + methodology: 'Total value of collateral deposited by users into the smart contracts of Opus', + starknet: { + tvl, + }, +} diff --git a/projects/orange-finance/index.js b/projects/orange-finance/index.js index a342e569c15a..110b87f8f8fb 100644 --- a/projects/orange-finance/index.js +++ b/projects/orange-finance/index.js @@ -1,29 +1,18 @@ const ADDRESSES = require("../helper/coreAssets.json"); const VAULTS = [ - // alpha - { address: "0x1c99416c7243563ebEDCBEd91ec8532fF74B9a39", asset: ADDRESSES.arbitrum.USDC }, // UniswapV3 ETH-USDC.e Dynamic Hedge Vault - { address: "0x16F6617680333e90f18aA89a85817d347078b7b8", asset: ADDRESSES.arbitrum.USDC }, // UniswapV3 ETH-USDC.e DN Vault - { address: "0x810fd69F58fF7Ff8553D43a5D3DCE3853960cAa6", asset: ADDRESSES.arbitrum.USDC }, // UniswapV3 ETH-USDC.e DN Vault - { address: "0xb9c5425084671221d7d5a547dbf1bdcec26c8b7d", asset: ADDRESSES.arbitrum.USDC }, // Camelot ETH-USDC.e DN Vault - // broken { address: "0xdB8a12EeC655748A74576BD8E0acAbdF8e622508", asset: ADDRESSES.arbitrum.USDC_CIRCLE }, // Camelot USDC-USDC.e Stable Vault - { address: "0x690633417eA231073c53f00D30f194489196dfaD", asset: ADDRESSES.arbitrum.USDC_CIRCLE }, // Camelot USDC-WETH DN Vault - { address: "0x7B9d8c413ACE4008E22dcF08C3A79A9178682e13", asset: ADDRESSES.arbitrum.WETH }, // Camelot WETH-ARB DN Vault - { address: "0x32790eAf83B52E53d54bFD4779832d6aDEAC880E", asset: ADDRESSES.arbitrum.WETH }, // UniswapV3 WETH-WBTC DN Vault - { address: "0x3870eECe85e6CDD013511Afb4ac6A7C4c1688bEa", asset: ADDRESSES.arbitrum.WETH }, // Camelot WETH-USDC.e DN Vault // app - strategy - { address: "0x706b3bcA6d6deD8c61d73270c228f276f4414B5e", asset: ADDRESSES.arbitrum.USDC_CIRCLE }, // Camelot USDC-ARB DN Vault - { address: "0xF47ecD6514D66A635b2933765Bc7A64895e27139", asset: ADDRESSES.arbitrum.WETH }, // Camelot WETH-ARB DN Vault { address: "0xd6ecEb3978bf2b76958b96E8A207246b98C7d639", asset: ADDRESSES.arbitrum.USDC_CIRCLE }, // Camelot USDC-DAI Stable Vault - { address: "0x2854038d756Aaef87E801d0d617Df5219838bd05", asset: ADDRESSES.arbitrum.USDC_CIRCLE }, // Camelot USDC-WETH DN Vault - { address: "0x68EC0e9A000c2063b64DC98B8C58d019CCBFb01a", asset: ADDRESSES.arbitrum.WETH }, // Camelot WETH-USDC DN Vault { address: "0x0B48540e214bc196e1D0954834876691fE19068D", asset: ADDRESSES.arbitrum.USDC }, // Camelot USDC-USDT Stable Vault - { address: "0xe4762eAcD41BD6BfB87eCdd3eC815d242b72F4AF", asset: ADDRESSES.arbitrum.WETH }, // Camelot WETH-WBTC DN Vault - { address: "0xb70671F6b436C755389D3f7a2C61a39296D1ccda", asset: ADDRESSES.arbitrum.WETH }, // Camelot WETH-USDT DN Vault { address: "0x59671Aa8F4E5adCcb26f4c88F0d6047B0ae7620b", asset: ADDRESSES.arbitrum.USDC }, // Camelot USDC.e-USDC Stable Vault // app - lpdfi - { address: "0x65Fb7fa8731710b435999cB7d036D689097548e8", asset: ADDRESSES.arbitrum.WETH }, // Stryke CLAMM WETH-USDC +-2.5% Automator v1 { address: "0xe1B68841E764Cc31be1Eb1e59d156a4ED1217c2C", asset: ADDRESSES.arbitrum.WETH }, // Stryke CLAMM WETH-USDC +-2.5% Automator v2 + { address: "0x5f6D5a7e8eccA2A53C6322a96e9a48907A8284e0", asset: ADDRESSES.arbitrum.WETH }, // Stryke CLAMM WETH-USDC Automator v2 + { address: "0x22dd31a495CafB229131A16C54a8e5b2f43C1162", asset: ADDRESSES.arbitrum.USDC_CIRCLE }, // Stryke CLAMM USDC-WBTC Automator v2 + { address: "0x708790D732c5886D56b0cBBEd7b60ABF47848FaA", asset: ADDRESSES.arbitrum.USDC_CIRCLE }, // Stryke CLAMM USDC-ARB Automator v2 + { address: "0x01E371c500C49beA2fa985334f46A8Dc906253Ea", asset: ADDRESSES.arbitrum.USDC_CIRCLE }, // Stryke CLAMM USDC-WBTC Automator v2 + { address: "0xE32132282D181967960928b77236B3c472d5f396", asset: ADDRESSES.arbitrum.USDC_CIRCLE }, // Stryke CLAMM USDC-ARB Automator v2 + { address: "0x3D2692Bb38686d0Fb9B1FAa2A3e2e5620EF112A9", asset: "0x13A7DeDb7169a17bE92B0E3C7C2315B46f4772B3" }, // Stryke CLAMM BOOP-WETH Automator v2 ]; async function tvl(api) { @@ -34,7 +23,7 @@ async function tvl(api) { module.exports = { doublecounted: true, - start: 107356480, + start: 154577707, arbitrum: { tvl, }, diff --git a/projects/pancake-stryke/index.js b/projects/pancake-stryke/index.js new file mode 100644 index 000000000000..c73068a60ff7 --- /dev/null +++ b/projects/pancake-stryke/index.js @@ -0,0 +1,21 @@ +const config = { + arbitrum: { + pools: [ + "0x501B03BdB431154b8Df17BF1c00756E3a8F21744", // WETHUSDC + "0x550e7E236912DaA302F7d5D0d6e5D7b6EF191f04", // WBTCUSDC + "0x4eed3A2b797Bf5630517EcCe2e31C1438A76bb92", // ARBUSDC + ], + }, +} + +Object.keys(config).forEach(chain => { + const { pools } = config[chain] + module.exports[chain] = { + tvl: async (api) => { + const callAssets = await api.multiCall({ abi: 'address:callAsset', calls: pools }) + const putAssets = await api.multiCall({ abi: 'address:putAsset', calls: pools }) + + return api.sumTokens({ tokensAndOwners2: [callAssets.concat(putAssets), pools.concat(pools)]}) + } + } +}) \ No newline at end of file diff --git a/projects/paxe/index.js b/projects/paxe/index.js new file mode 100644 index 000000000000..eb070c98bc78 --- /dev/null +++ b/projects/paxe/index.js @@ -0,0 +1,13 @@ +const { staking } = require("../helper/staking") + +const PAXE_TOKEN = "0xd2A3eec06719D5Ac66248003B5488E02165dd2fa" +const PAXE_FARMING_CONTRACT = '0xbA576f5ecbA5182a20f010089107dFb00502241f' +const RESTAKING_POOL = '0x269e1ceb128ccCD5684BbAFF9906D69eD1e9e9C8' + +module.exports = { + methodology: 'We count the TVL on the PAXE token in the farming contract and the restaking pool', + bsc: { + tvl: () => ({}), + staking: staking([RESTAKING_POOL, PAXE_FARMING_CONTRACT], PAXE_TOKEN) + } +} diff --git a/projects/pell/index.js b/projects/pell/index.js index 1ba12511bec8..746bb039d5b1 100644 --- a/projects/pell/index.js +++ b/projects/pell/index.js @@ -1,7 +1,7 @@ const { sumTokens2 } = require('../helper/unwrapLPs') const { getConfig } = require('../helper/cache') -const chains = ['merlin', 'bouncebit', 'btr', 'bsc', 'bsquared', 'core', 'bevm', 'mantle', 'scroll', 'bob'] +const chains = ['ethereum', 'merlin', 'bouncebit', 'btr', 'bsc', 'bsquared', 'core', 'bevm', 'mantle', 'scroll', 'bob'] chains.forEach(chain => { module.exports[chain] = { diff --git a/projects/piedao/pieDAO.js b/projects/piedao/pieDAO.js index 70636d9d6db6..831a56b5c24e 100644 --- a/projects/piedao/pieDAO.js +++ b/projects/piedao/pieDAO.js @@ -9,8 +9,14 @@ tokensAndOwners.push( ['0xFAE2809935233d4BfE8a56c2355c4A2e7d1fFf1A', '0x8314337d2b13e1A61EadF0FD1686b2134D43762F'], ) -const pieABI = require("../config/piedao/abi/IPie.json"); -const pieStakingAll = require("../config/piedao/abi/IStakingAll.json"); +const pieABI = { + "totalSupply": "uint256:totalSupply", + "calcTokensForAmount": "function calcTokensForAmount(uint256 _amount) view returns (address[] tokens, uint256[] amounts)" +} +const pieStakingAll = { + "poolCount": "uint256:poolCount", + "getPoolToken": "function getPoolToken(uint256 _poolId) view returns (address)" +} async function addPools(api) { const stakingC = '0x6de77A304609472A4811a0BFD47d8682Aebc29df' diff --git a/projects/polkamarkets/index.js b/projects/polkamarkets/index.js index f7805480d3a5..8d654cd55e4f 100644 --- a/projects/polkamarkets/index.js +++ b/projects/polkamarkets/index.js @@ -1,90 +1,79 @@ -const sdk = require("@defillama/sdk"); +const ADDRESSES = require('../helper/coreAssets.json') +const { sumTokens2 } = require('../helper/unwrapLPs') +const { staking } = require('../helper/staking') -const protocols = [ - { - chain: "moonriver", - predictionMarketContractAddress: "0xdcbe79f74c98368141798ea0b7b979b9ba54b026", - realitioContractAddress: "0x60d7956805ec5a698173def4d0e1ecdefb06cc57", - polkAddress: "0x8b29344f368b5fa35595325903fe0eaab70c8e1f" - }, - { - chain: "moonbeam", - predictionMarketContractAddress: "0x21DFb0a12D77f4e0D2cF9008d0C2643d1e36DA41", - realitioContractAddress: "0x83d3f4769a19f1b43337888b0290f5473cf508b2", - polkAddress: "0x8b29344f368b5fa35595325903fe0eaab70c8e1f" +const config = { + ethereum: { + polk: '0xd478161c952357f05f0292b56012cd8457f1cfbf', + stakingContracts: [ + "0xfa443f0ec4aed3e87c6d608ecf737a83d950427b", // realitio v1 + ], + v1: '0xc24a02d81dee67fd52cc95b0d04172032971ea10', }, - { - chain: "ethereum", - predictionMarketContractAddress: "0xc24a02d81dee67fd52cc95b0d04172032971ea10", - realitioContractAddress: "0xfa443f0ec4aed3e87c6d608ecf737a83d950427b", - polkAddress: "0xd478161c952357f05f0292b56012cd8457f1cfbf" - } -]; - -function chainTvl(chain) { - return async function tvl({timestamp}, ethBlock, chainBlocks) { - const balances = {}; - const chainProtocols = protocols.filter(protocol => protocol.chain === chain); - const block = chainBlocks[chain]; - - for (const protocol of chainProtocols) { - const balance = ( - await sdk.api.eth.getBalance({ - target: protocol.predictionMarketContractAddress, - params: timestamp, - chain, - block, - }) - ).output; - - sdk.util.sumSingleBalance(balances, protocol.chain, Number(balance) / 1e18); - } - - return balances; - } -} - -function chainStaking(chain) { - return async function staking(timestamp, ethBlock, chainBlocks) { - const balances = {}; - const chainProtocols = protocols.filter(protocol => protocol.chain === chain); - const block = chainBlocks[chain]; - - for (const protocol of chainProtocols) { - const polkBalance = ( - await sdk.api.erc20.balanceOf({ - target: protocol.polkAddress, - owner: protocol.realitioContractAddress, - params: timestamp, - chain, - block, - }) - ).output; - - sdk.util.sumSingleBalance( - balances, - "polkamarkets", - Number(polkBalance) / 1e18 - ); - } - - return balances; - } -} - -module.exports = { - methodology: - "Polkamarkets TVL equals the contracts' EVM balance + bonds contracts' POLK balance.", moonriver: { - tvl: chainTvl('moonriver'), - staking: chainStaking('moonriver') + polk: '0x8b29344f368b5fa35595325903fe0eaab70c8e1f', + stakingContracts: [ + "0x60d7956805ec5a698173def4d0e1ecdefb06cc57", // realitio v1 + "0x9aB1213d360bEa3edA75D88D81D7fbfc9fd37F2b", // realitio v2 + ], + v1: '0xdcbe79f74c98368141798ea0b7b979b9ba54b026', + v2: { + contract: '0x6413734f92248D4B29ae35883290BD93212654Dc', + tokens: ['0x98878b06940ae243284ca214f92bb71a2b032b8a'], + }, }, moonbeam: { - tvl: chainTvl('moonbeam'), - staking: chainStaking('moonbeam') + polk: '0x8b29344f368b5fa35595325903fe0eaab70c8e1f', + stakingContracts: [ + "0x83d3f4769a19f1b43337888b0290f5473cf508b2", // realitio v1 + "0xf5872382381cc1a37993d185abb6281fe47f5380", // realitio v2 + ], + v1: '0x21DFb0a12D77f4e0D2cF9008d0C2643d1e36DA41', + v2: { + contract: '0xaaC0068EbE0BFff0FE5E3819af0c46850dC4Cc05', + tokens: ['0xacc15dc74880c9944775448304b263d191c6077f'], + }, }, - ethereum: { - tvl: chainTvl('ethereum'), - staking: chainStaking('ethereum') + polygon: { + polk: '0x996F19d4b1cE6D5AD72CEaaa53152CEB1B187fD0', + stakingContracts: [ + "0x83d3f4769a19f1b43337888b0290f5473cf508b2", // realitio v2 + ], + v2: { + contract: '0x60d7956805ec5a698173def4d0e1ecdefb06cc57', + tokens: [ADDRESSES.polygon.WMATIC_2, ADDRESSES.polygon.USDC, ADDRESSES.polygon.USDT], + }, + }, + xdai: { + polk: '0x9a2a80c38abb1fdc3cb0fbf94fefe88bef828e00', + stakingContracts: [ + "0x537dc41fbb4f9faa4b9d6f8e6c2eb9071274f72b", // predictionMarketV3Manager + "0xBC39fa757886E8A56422Abc460b1FFfc70bbaeC6", // predictionMarketV3Factory + ], + }, + celo: { + polk: '0xb4d8a602fff7790eec3f2c0c1a51a475ee399b2d', + stakingContracts: [ + "0x1f021be85d6b4d1867c43ef98d30ccc5a44791de", // predictionMarketV3Manager + "0x0ec82449555efbe9a67cc51de3ef23a56dd79352", // predictionMarketV3Factory + ], }, -}; +} + +module.exports = { + methodology: + "Polkamarkets TVL equals the V1 contracts' EVM balance + V2 contracts tokens balance.\n Polkamarkets staking TVL is the POLK balance of the V1+V2 bonds contracts, plus the POLK balance of V3 predictionMarketManager and predictionMarketFactory contracts.", +} + +Object.keys(config).forEach(chain => { + const { v1, v2, polk = ADDRESSES.null, stakingContracts = [] } = config[chain] + module.exports[chain] = { + tvl: async (api) => { + const ownerTokens = [] + if (v1) ownerTokens.push([[ADDRESSES.null], v1]) + if (v2) ownerTokens.push([v2.tokens, v2.contract]) + return sumTokens2({ api, ownerTokens, blacklistedTokens: polk ? [polk] : [] }) + }, + staking: staking(stakingContracts, polk ?? []), + } +}) diff --git a/projects/polygon/index.js b/projects/polygon/index.js index 90168975dadd..4af516fc7fe1 100644 --- a/projects/polygon/index.js +++ b/projects/polygon/index.js @@ -74,7 +74,7 @@ async function tvl(_, block, _c) { '0x1494ca1f11d487c2bbe4543e90080aeba4ba3c2b', '0xc944e90c64b2c07662a292be6244bdf05cda44a7', '0x04Fa0d235C4abf4BcF4787aF4CF447DE572eF828', - '0x3432b6a60d23ca0dfca7761b7ab56459d9c964d0', + ADDRESSES.ethereum.FXS, '0x43Dfc4159D86F3A37A5A4B3D4580b888ad7d4DDd', '0x0cec1a9154ff802e7934fc916ed7ca50bde6844e', '0xa47c8bf37f92abed4a126bda807a7b7498661acd', diff --git a/projects/poolz-vesting/index.js b/projects/poolz-vesting/index.js new file mode 100644 index 000000000000..a5f64f55e856 --- /dev/null +++ b/projects/poolz-vesting/index.js @@ -0,0 +1,27 @@ +const config = { + bsc: { factory: '0xd82c03bd0543b567c9cec7b822373be2b167f00f', POOLX: '0xbAeA9aBA1454DF334943951d51116aE342eAB255',lockedDealV2: '0x436CE2ce8d8d2Ccc062f6e92faF410DB4d397905', }, + base: { factory: '0x7ff9315f538df7ec76ec4815249dd30519726460', }, + arbitrum: { factory: '0x9cfd8c7834be0dfe41f3fe68c29124066d5cd13b', lockedDealV2: '0x7Ff9315f538dF7eC76Ec4815249Dd30519726460', }, + ethereum: { factory: '0x9ff1db30c66cd9d3311b4b22da49791610922b13', lockedDealV2: '0x285B4866257eF51FfBDD239c10dE5f9493413d8f', }, + manta: { factory: '0x7Ff9315f538dF7eC76Ec4815249Dd30519726460', }, + telos: { factory: '0x2Bb9cFF524C76eb2eA27bC6cDbB93447115D8dcC', }, + polygon: { factory: '0x06fd710fD167f1f08b61e457F41D6e7c7DD9AF3D', lockedDealV2: '0x9D13B213852669077131f8A24A676f27ab0C2931', }, +} + +Object.keys(config).forEach(chain => { + const { factory, POOLX, blacklistedTokens = [], lockedDealV2, } = config[chain] + module.exports[chain] = { + tvl: () => ({}), + vesting: async (api) => { + if (POOLX) blacklistedTokens.push(POOLX) + const tokens = await api.fetchList({ lengthAbi: 'totalVaults', itemAbi: 'vaultIdToTokenAddress', target: factory }) + const vaults = await api.fetchList({ lengthAbi: 'totalVaults', itemAbi: 'vaultIdToVault', target: factory }) + if (lockedDealV2) await api.sumTokens({ owner: lockedDealV2, tokens, blacklistedTokens, }) + return api.sumTokens({ tokensAndOwners2: [tokens, vaults], blacklistedTokens }) + } + } + if (POOLX) module.exports[chain].staking = async (api) => { + const vaults = await api.fetchList({ lengthAbi: 'totalVaults', itemAbi: 'vaultIdToVault', target: factory }) + return api.sumTokens({ owners: vaults, tokens: [POOLX] }) + } +}) \ No newline at end of file diff --git a/projects/predx/index.js b/projects/predx/index.js new file mode 100644 index 000000000000..cde2245fe818 --- /dev/null +++ b/projects/predx/index.js @@ -0,0 +1,47 @@ +const ADDRESSES = require('../helper/coreAssets.json') +const { sumTokensExport } = require('../helper/unwrapLPs') + +module.exports = { + zklink: { + tvl: sumTokensExport({ + owners: ["0x986Ca3A4F05AA7EA5733d81Da6649043f43cB9A8"], + tokens: [ADDRESSES.zklink.USDT] + }), + }, + base: { + tvl: sumTokensExport({ + owners: ["0xa6368fd44e699f6bca2ab3a02C44beFCA7257cF4"], + tokens: [ADDRESSES.base.USDC] + }), + }, + sei: { + tvl: sumTokensExport({ + owners: ["0xACbd78769333697ebB2c859a8344d1507b45F044"], + tokens: ["0x3894085Ef7Ff0f0aeDf52E2A2704928d1Ec074F1"] + }), + }, + linea: { + tvl: sumTokensExport({ + owners: ["0xF9AD26Bb325f4C82F26bF2549b65e6f9a4a04a78"], + tokens: [ADDRESSES.linea.USDC] + }), + }, + bsc: { + tvl: sumTokensExport({ + owners: ["0x38Db024F8EA400A57c15C25D1DC46aE868C08a2F"], + tokens: [ADDRESSES.bsc.USDT] + }), + }, + mantle: { + tvl: sumTokensExport({ + owners: ["0x38Db024F8EA400A57c15C25D1DC46aE868C08a2F"], + tokens: [ADDRESSES.mantle.USDC] + }), + }, + btr: { + tvl: sumTokensExport({ + owners: ["0x92CdC3a149A6bc3f39136eF4A94292cDC2Cc4b9b"], + tokens: ["0x9827431e8b77e87c9894bd50b055d6be56be0030"] + }), + }, +} diff --git a/projects/primex-finance/index.js b/projects/primex-finance/index.js index d2bc988eaba0..78d3fb750c23 100644 --- a/projects/primex-finance/index.js +++ b/projects/primex-finance/index.js @@ -21,7 +21,7 @@ const config = { EPMX: "0xDc6D1bd104E1efa4A1bf0BBCf6E0BD093614E31A", OM: "0xc3ec80343d2bae2f8e680fdadde7c17e71e114ea", SAND: "0xbbba073c31bf03b8acf7c28ef0738decf3695683", - QUICK: "0xb5c064f955d8e7f38fe0460c556a72987494ee17", + QUICK: ADDRESSES.polygon.QUICK, UNI: "0xb33eaad8d922b1083446dc23f610c2567fb5180f", MANA: "0xa1c57f48f0deb89f569dfbe6e2b7f46d33606fd4", BAL: "0x9a71012b13ca4d3d0cdc72a177df3ef03b0e76a3", diff --git a/projects/primitive/abi.json b/projects/primitive/abi.json deleted file mode 100644 index bb002254d713..000000000000 --- a/projects/primitive/abi.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "risky": "address:risky", - "stable": "address:stable" -} \ No newline at end of file diff --git a/projects/primitive/index.js b/projects/primitive/index.js index 4ef2810089dd..92c9ae42a13b 100644 --- a/projects/primitive/index.js +++ b/projects/primitive/index.js @@ -5,6 +5,6 @@ const v1TVL = require('./v1') module.exports = { ethereum: { start: 1647932400, // unix timestamp (utc 0) specifying when the project began, or where live data begins - tvl: sdk.util.sumChainTvls([rmmTVL, v1TVL]), // + tvl: sdk.util.sumChainTvls([rmmTVL, v1TVL, ]), // }, } \ No newline at end of file diff --git a/projects/primitive/rmm.js b/projects/primitive/rmm.js index 74bfe74e2274..2656aace690e 100644 --- a/projects/primitive/rmm.js +++ b/projects/primitive/rmm.js @@ -1,29 +1,11 @@ -const sdk = require('@defillama/sdk') -const {sumTokens} = require("../helper/unwrapLPs"); -const abi = require("./abi.json"); - const engine_weth_usdc = '0xd3541aD19C9523c268eDe8792310867C57BE39e4' // WETH-USDC Pair const engines = [engine_weth_usdc] -module.exports = async function tvl(time, ethBlock, chainBlocks) { - const [{output: risky}, {output: stable}] = await Promise.all([ - sdk.api.abi.multiCall({ - abi: abi['risky'], - calls: engines.map(e => ({target: e})), - block: ethBlock, - }), - sdk.api.abi.multiCall({ - abi: abi['stable'], - calls: engines.map(e => ({target: e})), - block: ethBlock, - }) - ]) - - const tokensAndOwners = risky.map((call, idx) => [ - [call.output, call.input.target], - [stable[idx].output, call.input.target] - ]).flat() - const balances = {} - await sumTokens(balances, tokensAndOwners, ethBlock, 'ethereum') - return balances +module.exports = async function tvl(api) { + const risky = await api.multiCall({ abi: 'address:risky', calls: engines}) + const stable = await api.multiCall({ abi: 'address:stable', calls: engines}) + const toa = [] + risky.forEach((v, i) => toa.push([v, engines[i]])) + stable.forEach((v, i) => toa.push([v, engines[i]])) + return api.sumTokens({ tokensAndOwners: toa }) } \ No newline at end of file diff --git a/projects/primitive/v1.js b/projects/primitive/v1.js index da4c2082b7f8..ecf1b391b98f 100644 --- a/projects/primitive/v1.js +++ b/projects/primitive/v1.js @@ -1,270 +1,24 @@ -const ADDRESSES = require('../helper/coreAssets.json') -const sdk = require('@defillama/sdk') -const BigNumber = require('bignumber.js') -const getCacheBalances = 'function getCacheBalances() view returns (uint256, uint256)' const getUnderlyingTokenAddress = "address:getUnderlyingTokenAddress" const getStrikeTokenAddress = "address:getStrikeTokenAddress" -const redeemToken = "address:redeemToken" -const getPair = 'function getPair(address, address) view returns (address)' -const token0 = 'address:token0' -const token1 = 'address:token1' -const getReserves = 'function getReserves() view returns (uint112 _reserve0, uint112 _reserve1, uint32 _blockTimestampLast)' const { getLogs } = require('../helper/cache/getLogs') const START_BLOCK = 11142900 const REGISTRY = '0x16274044dab9635Df2B5AeAF7CeCb5f381c71680' -const FACTORY = '0xC0AEe478e3658e2610c5F7A4A2E1777cE9e4f2Ac' -const ZERO_ADDRESS = ADDRESSES.null module.exports = async function tvl(api) { - const block = api.block - - const logs = ( - await getLogs({ - api, - target: REGISTRY, - fromBlock: START_BLOCK, - topic: 'DeployedOptionClone(address,address,address)', - }) - ) - - const optionAddresses = logs - .map((log) => `0x${log.topics[2].substring(26)}`) - .map((optionAddress) => optionAddress.toLowerCase()) - - const allRedeemAddresses = logs - .map((log) => `0x${log.topics[3].substring(26)}`) - .map((redeemAddress) => redeemAddress.toLowerCase()) - - const [ - underlyingAddresses, - strikeAddresses, - redeemAddresses, - ] = await Promise.all([ - sdk.api.abi - .multiCall({ - abi: getUnderlyingTokenAddress, - calls: optionAddresses.map((optionAddress) => ({ - target: optionAddress, - })), - block, - }) - .then(({ output }) => output), - sdk.api.abi - .multiCall({ - abi: getStrikeTokenAddress, - calls: optionAddresses.map((optionAddress) => ({ - target: optionAddress, - })), - block, - }) - .then(({ output }) => output), - sdk.api.abi - .multiCall({ - abi: redeemToken, - calls: optionAddresses.map((optionAddress) => ({ - target: optionAddress, - })), - block, - }) - .then(({ output }) => output), - ]) - - const options = {} - // add underlyingAddresses - underlyingAddresses.forEach((underlyingAddress) => { - const tokenAddress = underlyingAddress.output.toLowerCase() - - const optionAddress = underlyingAddress.input.target.toLowerCase() - options[optionAddress] = { - underlyingAddress: tokenAddress, - } - }) - - // add strikeAddresses - strikeAddresses.forEach((strikeAddress) => { - const tokenAddress = strikeAddress.output.toLowerCase() - const optionAddress = strikeAddress.input.target.toLowerCase() - options[optionAddress] = { - ...(options[optionAddress] || {}), - strikeAddress: tokenAddress, - } - }) - - redeemAddresses.forEach((redeemAddress) => { - const tokenAddress = redeemAddress.output.toLowerCase() - const optionAddress = redeemAddress.input.target.toLowerCase() - options[optionAddress] = { - ...(options[optionAddress] || {}), - redeemAddress: tokenAddress, - } - }) - - // The internally tracked balances of underlying and strike tokens in the Primitive option contracts - const caches = ( - await sdk.api.abi.multiCall({ - abi: getCacheBalances, - calls: Object.keys(options).map((optionAddress) => ({ - target: optionAddress, - })), - block, - }) - ).output - - // ===== Sushiswap Pools ===== - - const optionPairAddresses = ( - await sdk.api.abi.multiCall({ - abi: getPair, - calls: Object.keys(options).map((optionAddress, i) => ({ - target: FACTORY, - params: [ - options[optionAddress].underlyingAddress, - options[optionAddress].redeemAddress, - ], - })), - block, - }) - ).output - - const optionPairs = [] - - optionPairAddresses.forEach((optionPairAddress) => { - const marketAddress = optionPairAddress.output.toLowerCase() - if (marketAddress !== ZERO_ADDRESS) optionPairs.push(marketAddress) - }) - - const [token0Addresses, token1Addresses] = await Promise.all([ - sdk.api.abi - .multiCall({ - abi: token0, - calls: optionPairs.map((marketAddress) => ({ - target: marketAddress, - })), - block, - }) - .then(({ output }) => output), - sdk.api.abi - .multiCall({ - abi: token1, - calls: optionPairs.map((marketAddress) => ({ - target: marketAddress, - })), - block, - }) - .then(({ output }) => output), - ]) - - const pairs = {} - // add token0Addresses - token0Addresses.forEach((token0Address) => { - const tokenAddress = token0Address.output.toLowerCase() - - if ( - allRedeemAddresses.indexOf(tokenAddress) != -1 - ) { - const pairAddress = token0Address.input.target.toLowerCase() - pairs[pairAddress] = { - token0Address: tokenAddress, - } - } - }) - - // add token1Addresses - token1Addresses.forEach((token1Address) => { - const tokenAddress = token1Address.output.toLowerCase() - if ( - allRedeemAddresses.indexOf(tokenAddress) != -1 - ) { - const pairAddress = token1Address.input.target.toLowerCase() - pairs[pairAddress] = { - ...(pairs[pairAddress] || {}), - token1Address: tokenAddress, - } - } - }) - - // Reserves of option pools in Sushiswap - const reserves = ( - await sdk.api.abi.multiCall({ - abi: getReserves, - calls: Object.keys(pairs).map((pairAddress) => ({ - target: pairAddress, - })), - block, - }) - ).output - - // ===== Accumulators ===== - - // accumulate the balances in the Sushiswap option pools - const inSushiSwap = reserves.reduce((accumulator, reserve, i) => { - const pairAddress = reserve.input.target.toLowerCase() - const pair = pairs[pairAddress] || {} - - // handle reserve0 - if (pair.token0Address) { - const reserve0 = new BigNumber(reserve.output['0']) - if (!reserve0.isZero()) { - const existingBalance = new BigNumber( - accumulator[pair.token0Address] || '0' - ) - - accumulator[pair.token0Address] = existingBalance - .plus(reserve0) - .toFixed() - } - } - - // handle reserve1 - if (pair.token1Address) { - const reserve1 = new BigNumber(reserve.output['1']) - - if (!reserve1.isZero()) { - const existingBalance = new BigNumber( - accumulator[pair.token1Address] || '0' - ) - - accumulator[pair.token1Address] = existingBalance - .plus(reserve1) - .toFixed() - } - } - - return accumulator - }, {}) - - // accumulate the caches of Primitive with the reserves of Sushiswap - return caches.reduce((accumulator, cache, i) => { - const optionAddress = cache.input.target.toLowerCase() - const option = options[optionAddress] || {} - - // handle underlyingCache - if (option.underlyingAddress) { - const underlyingCache = new BigNumber(cache.output['0']) - - const existingBalance = new BigNumber( - accumulator[option.underlyingAddress] || '0' - ) - - accumulator[option.underlyingAddress] = existingBalance - .plus(underlyingCache) - .toFixed() - } - - // handle strikeCache - if (option.strikeAddress) { - const strikeCache = new BigNumber(cache.output['1']) - - const existingBalance = new BigNumber( - accumulator[option.strikeAddress] || '0' - ) - - accumulator[option.strikeAddress] = existingBalance - .plus(strikeCache) - .toFixed() - } - - return accumulator - }, inSushiSwap) + const logs = (await getLogs({ + api, + target: REGISTRY, + fromBlock: START_BLOCK, + onlyArgs: true, + eventAbi: 'event DeployedOptionClone (address indexed from, address indexed optionAddress, address indexed redeemAddress)' + })) + + const tokensAndOwners = [] + const options = logs.map(i => i.optionAddress) + const underlying = await api.multiCall({ abi: getUnderlyingTokenAddress, calls: options}) + const strikes = await api.multiCall({ abi: getStrikeTokenAddress, calls: options}) + underlying.forEach((v, i) => tokensAndOwners.push([v, options[i]])) + strikes.forEach((v, i) => tokensAndOwners.push([v, options[i]])) + return api.sumTokens({ tokensAndOwners }) } diff --git a/projects/prosper/index.js b/projects/prosper/index.js deleted file mode 100644 index f4ee0239426b..000000000000 --- a/projects/prosper/index.js +++ /dev/null @@ -1,20 +0,0 @@ -const utils = require('../helper/utils') -const BigNumber = require('bignumber.js') - -const currentPoolEndpoint = 'https://avax.prosper.so/api/actualPool?chainId=43114&asset=AVAX%2FUSD&duration=60&token=AVAX' -const avaxCoingeckoId = 'avalanche-2' - -async function tvl(timestamp, block) { - const currentPool = await utils.fetchURL(currentPoolEndpoint) - const tvl = BigNumber(currentPool.data.bearsQuote).plus(currentPool.data.bullsQuote).div(1e18) - - return { - [avaxCoingeckoId]: tvl.toNumber() - } -} - -module.exports = { - avax:{ - tvl, - }, -} \ No newline at end of file diff --git a/projects/pstake-btc/index.js b/projects/pstake-btc/index.js new file mode 100644 index 000000000000..8fc11f236578 --- /dev/null +++ b/projects/pstake-btc/index.js @@ -0,0 +1,11 @@ +const { sumTokensExport } = require("../helper/sumTokens"); +const sdk = require("@defillama/sdk"); + +const owner = "bc1qajcp935tuvqakut95f0sc9qm09hxjj6egexl9d"; + +module.exports = { + methodology: `Total amount of BTC in ${owner}.`, + bitcoin: { + tvl: sdk.util.sumChainTvls([sumTokensExport({ owner })]), + }, +}; \ No newline at end of file diff --git a/projects/pstake/index.js b/projects/pstake/index.js index 152e4a171359..000d7f5832c2 100644 --- a/projects/pstake/index.js +++ b/projects/pstake/index.js @@ -66,13 +66,8 @@ function cosmostvl() { }; } -const owner = "bc1qajcp935tuvqakut95f0sc9qm09hxjj6egexl9d"; - module.exports = { methodology: `Total amount of liquid staked tokens on Persistence.`, bsc: { tvl: bsctvl }, persistence: { tvl: cosmostvl() }, - bitcoin: { - tvl: sdk.util.sumChainTvls([sumTokensExport({ owner })]), - }, }; diff --git a/projects/pumpbtc/index.js b/projects/pumpbtc/index.js index bce675989a47..f49afeaa69e2 100644 --- a/projects/pumpbtc/index.js +++ b/projects/pumpbtc/index.js @@ -5,7 +5,7 @@ module.exports = { } const config = { ethereum: { owners: ['0x1fCca65fb6Ae3b2758b9b2B394CB227eAE404e1E', '0x3d9bCcA8Bc7D438a4c5171435f41a0AF5d5E6083'], tokens: ['0xC96dE26018A54D51c097160568752c4E3BD6C364', ADDRESSES.ethereum.WBTC], }, - bsc: { owners: ['0x2Ee808F769AB697C477E0aF8357315069b66bCBb'], tokens: ['0x7130d2a12b9bcbfae4f2634d864a1ee1ce3ead9c'], }, + bsc: { owners: ['0x2Ee808F769AB697C477E0aF8357315069b66bCBb'], tokens: [ADDRESSES.bsc.BTCB], }, mantle: { owners: ['0xd6Ab15B2458B6EC3E94cE210174d860FdBdd6b96'], tokens: ['0xC96dE26018A54D51c097160568752c4E3BD6C364'], }, } diff --git a/projects/radial/index.js b/projects/radial/index.js index 3ba2035c4e1d..f3d6c0ce01e4 100644 --- a/projects/radial/index.js +++ b/projects/radial/index.js @@ -1,243 +1,18 @@ const { - standardPoolInfoAbi, - getPoolInfo, - getSymbolsAndBalances, - isLP, - isYV, - } = require("../helper/masterchef"); - const sdk = require("@defillama/sdk"); - const { default: BigNumber } = require("bignumber.js"); - const { handleYearnTokens } = require("../creditum/helper.js"); - const { unwrapUniswapLPs } = require("../helper/unwrapLPs"); - - const tokenAbi = 'address:token' - const token0Abi = 'address:token0' - const token1Abi = 'address:token1' - const getReservesAbi = 'function getReserves() view returns (uint112 _reserve0, uint112 _reserve1, uint32 _blockTimestampLast)' - const shareValue = "uint256:getShareValue"; - const xSCREAM = "0xe3D17C7e840ec140a7A51ACA351a482231760824"; - const xCREDIT = "0xd9e28749e80D867d5d14217416BFf0e668C10645"; - const shareTarot = 'function shareValuedAsUnderlying(uint256 _share) returns (uint256 underlyingAmount_)'; - const xTAROT = "0x74D1D2A851e339B8cB953716445Be7E8aBdf92F4"; - const fBEET = "0xfcef8a994209d6916EB2C86cDD2AFD60Aa6F54b1"; - const masterChef = "0x6f536B36d02F362CfF4278190f922582d59E7e08"; - const chain = "fantom"; - const tokenIsOnCoingecko = true; - const includeYVTokens = true; - const stakingToken = "0xf04d7f53933becbf51ddf1f637fe7ecaf3d4ff94"; - - async function tvl(timestamp, ethBlock, {[chain]: block}) { - const transform = i => `fantom:${i}`; - - const poolInfo = await getPoolInfo( - masterChef, - block, - chain, - standardPoolInfoAbi - ); - const [symbols, tokenBalances] = await getSymbolsAndBalances( - masterChef, - block, - chain, - poolInfo - ); - - const balances = {}; - - const lpPositions = []; - - await Promise.all( - symbols.output.map(async (symbol, idx) => { - const balance = tokenBalances.output[idx].output; - const token = symbol.input.target.toLowerCase(); - if (token === stakingToken) { - return; - } else if (isLP(symbol.output, token, chain)) { - lpPositions.push({ - balance, - token, - }); - } else if (includeYVTokens && isYV(symbol.output)) { - let underlyingToken = ( - await sdk.api.abi.call({ - target: token, - abi: tokenAbi, - block, - chain, - }) - ).output; - sdk.util.sumSingleBalance( - balances, - transform(underlyingToken), - balance - ); - } else { - sdk.util.sumSingleBalance(balances, transform(token), balance); - } - }) - ); - - const [token0, token1] = await Promise.all([ - sdk.api.abi.multiCall({ - calls: lpPositions.map((p) => ({ - target: p.token, - })), - abi: token0Abi, - block, - chain, - }), - sdk.api.abi.multiCall({ - calls: lpPositions.map((p) => ({ - target: p.token, - })), - abi: token1Abi, - block, - chain, - }), - ]); - - const pool2LpPositions = []; - const outsideLpPositions = []; - lpPositions.forEach((position, idx) => { - if ( - token0.output[idx].output.toLowerCase() === stakingToken || - token1.output[idx].output.toLowerCase() === stakingToken - ) { - pool2LpPositions.push(position); - } else { - outsideLpPositions.push(position); - } - }); - await unwrapUniswapLPs(balances, outsideLpPositions, block, chain, transform); - - if (!tokenIsOnCoingecko) { - const maxPool2ByToken = ( - await sdk.api.abi.multiCall({ - calls: pool2LpPositions.map((p) => ({ - target: stakingToken, - params: [p.token], - })), - abi: "erc20:balanceOf", - block, - chain, - }) - ).output.reduce((max, curr) => { - if (BigNumber(curr.output).gt(max.output)) { - return curr; - } - return max; - }); - const poolAddress = maxPool2ByToken.input.params[0].toLowerCase(); - const poolReserves = await sdk.api.abi.call({ - block, - chain, - abi: getReservesAbi, - target: poolAddress, - }); - const posToken0 = token0.output.find( - (t) => t.input.target.toLowerCase() === poolAddress - ).output; - const posToken1 = token1.output.find( - (t) => t.input.target.toLowerCase() === poolAddress - ).output; - let price, otherToken; - if (posToken0.toLowerCase() === stakingToken) { - price = poolReserves.output[1] / poolReserves.output[0]; - otherToken = transform(posToken1); - } else { - price = poolReserves.output[0] / poolReserves.output[1]; - otherToken = transform(posToken0); - } - const transformedStakingToken = transform(stakingToken); - Object.values(balances).forEach((balance) => { - Object.entries(balance).forEach(([addr, bal]) => { - if (addr.toLowerCase() === transformedStakingToken) { - balance[otherToken] = BigNumber(bal).times(price).toFixed(0); - delete balance[addr]; - } - }); - }); - } - const calldata = { - chain, - block, - }; - - await handleYearnTokens( - balances, - [ - "0x637ec617c86d24e421328e6caea1d92114892439", - "0xef0210eb96c7eb36af8ed1c20306462764935607", - "0x0dec85e74a92c52b7f708c4b10207d9560cefaf0", - "0x0A0b23D9786963DE69CB2447dC125c49929419d8", - "0xCe2Fc0bDc18BD6a4d9A725791A3DEe33F3a23BB7", - "0x2C850cceD00ce2b14AA9D658b7Cad5dF659493Db", - "0xd817A100AB8A29fE3DBd925c2EB489D67F758DA9", - ], - "0x6f536B36d02F362CfF4278190f922582d59E7e08", - block, - chain, - transform - ); - - const screamShare = await sdk.api.abi.call({ - ...calldata, - target: xSCREAM, - abi: shareValue, - }); - - sdk.util.sumSingleBalance( - balances, - transform("0xe0654C8e6fd4D733349ac7E09f6f23DA256bF475"), - BigNumber(screamShare.output) - .times(balances['fantom:0xe3d17c7e840ec140a7a51aca351a482231760824']) - .div(1e18) - .toFixed(0) - ); - delete balances[transform(xSCREAM)]; - // node test.js projects/radial/index.js - const creditShare = await sdk.api.abi.call({ - ...calldata, - target: xCREDIT, - abi: shareValue, - }); - sdk.util.sumSingleBalance( - balances, - transform("0x77128dfdd0ac859b33f44050c6fa272f34872b5e"), - BigNumber(creditShare.output) - .times(balances['fantom:0xd9e28749e80d867d5d14217416bff0e668c10645']) - .div(1e18) - .toFixed(0) - ); - delete balances[transform(xCREDIT)]; - - const tarotShare = await sdk.api.abi.call({ - ...calldata, - target: xTAROT, - abi: shareTarot, - params: balances['fantom:0x74d1d2a851e339b8cb953716445be7e8abdf92f4'], - }); - sdk.util.sumSingleBalance( - balances, - transform("0xc5e2b037d30a390e62180970b3aa4e91868764cd"), - tarotShare.output - ); - delete balances[transform(xTAROT)]; - - sdk.util.sumSingleBalance( - balances, - transform("0xf24bcf4d1e507740041c9cfd2dddb29585adce1e"), - balances['fantom:0xfcef8a994209d6916eb2c86cdd2afd60aa6f54b1'] - ); - delete balances[transform(fBEET)]; - return balances; - } - - module.exports = { - fantom: { - tvl, - }, - }; - - // node test.js projects/radial/index.js - \ No newline at end of file + standardPoolInfoAbi, +} = require("../helper/masterchef"); +const { sumTokens2 } = require("../helper/unwrapLPs"); + +const masterChef = "0x6f536B36d02F362CfF4278190f922582d59E7e08"; +const stakingToken = "0xf04d7f53933becbf51ddf1f637fe7ecaf3d4ff94"; + +async function tvl(api) { + const info = await api.fetchList({ lengthAbi: 'poolLength', itemAbi: standardPoolInfoAbi, target: masterChef }) + return sumTokens2({ api, owner: masterChef, tokens: info.map(i => i.lpToken), blacklistedTokens: [stakingToken] }) +} + +module.exports = { + fantom: { + tvl, + }, +} \ No newline at end of file diff --git a/projects/redacted/index.js b/projects/redacted/index.js index 8aedcf51b413..fdb21318cae0 100644 --- a/projects/redacted/index.js +++ b/projects/redacted/index.js @@ -7,7 +7,7 @@ const treasuries = ["0xa52fd396891e7a74b641a2cb1a6999fcf56b077e", "0x086c98855df const cvxCRVStaking = '0x3Fe65692bfCD0e6CF84cB1E7d24108E434A7587e' const CVX = ADDRESSES.ethereum.CVX const cvxCRV = ADDRESSES.ethereum.cvxCRV -const FXS = '0x3432b6a60d23ca0dfca7761b7ab56459d9c964d0' +const FXS = ADDRESSES.ethereum.FXS const veFXS = '0xc8418aF6358FFddA74e09Ca9CC3Fe03Ca6aDC5b0' const CRV = ADDRESSES.ethereum.CRV const veCRV = '0x5f3b5DfEb7B28CDbD7FAba78963EE202a494e2A2' diff --git a/projects/return-finance/index.js b/projects/return-finance/index.js index 8a173a7ca469..3efa30dd642e 100644 --- a/projects/return-finance/index.js +++ b/projects/return-finance/index.js @@ -6,15 +6,17 @@ module.exports = { const config = { ethereum: [ - "0xFD360A096E4a4c3C424fc3aCd85da8010D0Db9a5", - "0x201254227f9fE57296C257397Be6c617389a8cCb", + "0xD8785CDae9Ec24b8796c45E3a2D0F7b03194F826", + "0xe5c26497D9492AD2328DFEE7dcA240e55cff1779", + "0xc2d4d9070236bA4ffefd7cf565eb98d11bFeB8E1", + "0x2C2f0FFbFA1B8b9C85400f1726e1bc0892e63D9F", ], avax: [ - "0x3B6385493a1d4603809dDbaE647200eF8baA53F5", - "0xB86e10A24172155aE20B524e6e8E17a244c4d3aE", + "0x0271A46c049293448C2d4794bCD51f953Bf742e8", + "0x3A3dAdbca3ec5a815431f45eca33EF1520388Ef2", ], - polygon: ["0x3B6385493a1d4603809dDbaE647200eF8baA53F5"], - base: ["0x3B6385493a1d4603809dDbaE647200eF8baA53F5"], + polygon: ["0x0271A46c049293448C2d4794bCD51f953Bf742e8"], + base: ["0xd99d6D4EA1CDa97cC8eaE2A21007C47D3ae54d5F"], }; diff --git a/projects/reya-perp/index.js b/projects/reya-perp/index.js new file mode 100644 index 000000000000..88906971ed3d --- /dev/null +++ b/projects/reya-perp/index.js @@ -0,0 +1,6 @@ +const { sumTokensExport } = require('../helper/unwrapLPs') +const ADDRESSES = require('../helper/coreAssets.json') + +module.exports = { + reya: { tvl: sumTokensExport({ owner: '0xA763B6a5E09378434406C003daE6487FbbDc1a80', tokens: [ADDRESSES.reya.RUSD]})} +} \ No newline at end of file diff --git a/projects/rose/abi.json b/projects/rose/abi.json deleted file mode 100644 index 5df5018200b8..000000000000 --- a/projects/rose/abi.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "balanceOf": "function balanceOf(address, address) view returns (uint256)", - "balances": "function balances(uint256 arg0) view returns (uint256)", - "totalBorrow": "function totalBorrow() view returns (uint128 elastic, uint128 base)" -} \ No newline at end of file diff --git a/projects/rose/index.js b/projects/rose/index.js index 3f6d920792ba..51ec625430e4 100644 --- a/projects/rose/index.js +++ b/projects/rose/index.js @@ -1,181 +1,47 @@ const ADDRESSES = require('../helper/coreAssets.json') -const sdk = require("@defillama/sdk"); -const { default: BigNumber } = require("bignumber.js"); +const { staking } = require('../helper/staking') + +const stablesPool = "0xc90dB0d8713414d78523436dC347419164544A3f" +const fraxPool = "0xa34315F1ef49392387Dd143f4578083A9Bd33E94" +const atustPool = "0x8fe44f5cce02D5BE44e3446bBc2e8132958d22B8" +const maiPool = "0x65a761136815B45A9d78d9781d22d47247B49D23" + +const DAI = "0xe3520349F477A5F6EB06107066048508498A291b" +const USDC = ADDRESSES.aurora.USDC_e +const USDT = ADDRESSES.aurora.USDT_e +const FRAX = ADDRESSES.aurora.FRAX +const UST = "0x5ce9F0B6AFb36135b5ddBF11705cEB65E634A9dC" +const MAI = ADDRESSES.moonbeam.MAI +const ROSE = "0xdcD6D4e2B3e1D1E1E6Fa8C21C8A323DcbecfF970" +const STROSE = "0xe23d2289FBca7De725DC21a13fC096787A85e16F" +const NEAR = ADDRESSES.aurora.NEAR +const WETH = "0xC9BdeEd33CD01541e1eeD10f90519d2C06Fe3feB" +const WBTC = "0xf4eb217ba2454613b15dbdea6e5f22276410e89e" + +const VASE = "0xee793001Ce9Fa988712B15a59CCf5dC7d54b22FF" -const abi = require("./abi.json"); - -// pool addresses -const stablesPool = "0xc90dB0d8713414d78523436dC347419164544A3f"; -const fraxPool = "0xa34315F1ef49392387Dd143f4578083A9Bd33E94"; -const atustPool = "0x8fe44f5cce02D5BE44e3446bBc2e8132958d22B8"; -const maiPool = "0x65a761136815B45A9d78d9781d22d47247B49D23"; -// const busdPool = "0xD6cb7Bb7D63f636d1cA72A1D3ed6f7F67678068a"; -const rusdPool = "0x79B0a67a4045A7a8DC04b17456F4fe15339cBA34"; - -// token addresses -const DAI = "0xe3520349F477A5F6EB06107066048508498A291b"; -const USDC = ADDRESSES.aurora.USDC_e; -const USDT = ADDRESSES.aurora.USDT_e; -const FRAX = ADDRESSES.aurora.FRAX; -const UST = "0x5ce9F0B6AFb36135b5ddBF11705cEB65E634A9dC"; -const MAI = ADDRESSES.moonbeam.MAI; -// const BUSD = "0x5C92A4A7f59A9484AFD79DbE251AD2380E589783"; -const RUSD = "0x19cc40283B057D6608C22F1D20F17e16C245642E"; -const ROSE = "0xdcD6D4e2B3e1D1E1E6Fa8C21C8A323DcbecfF970"; -const STROSE = "0xe23d2289FBca7De725DC21a13fC096787A85e16F"; -const NEAR = ADDRESSES.aurora.NEAR; -const WETH = "0xC9BdeEd33CD01541e1eeD10f90519d2C06Fe3feB"; -const WBTC = "0xf4eb217ba2454613b15dbdea6e5f22276410e89e"; - -// garden addresses -const gardenNear = "0x64C922E3824ab40cbbEdd6C8092d148C283d3D3D"; -const gardenUsdc = "0xfbAF3eBF228eB712b1267285787e51aDd70086bB"; -const gardenUsdt = "0x0F44fCD177098Cb2B063B50f6C62e4F1E1f9d596"; -const gardenWeth = "0x084355FDd5fcfd55d60C5B8626756a6906576f13"; -const gardenAtust = "0xe8F7F08D50e12145Cb722cfF861e6A9b43EADBA1"; -const gardenWbtc = "0x6bA5B45149996597d96e6dB19E4E1eFA81a6df97"; - -const VASE = "0xee793001Ce9Fa988712B15a59CCf5dC7d54b22FF"; - -// pool to underlying tokens map const poolToTokensMap = { [stablesPool]: [DAI, USDC, USDT], [fraxPool]: [FRAX], [atustPool]: [UST], [maiPool]: [MAI], - // [busdPool]: [BUSD], - [rusdPool]: [RUSD], -}; - -// garden to underlying tokens map -const gardenToTokensMap = { - [gardenNear]: [NEAR], - [gardenUsdc]: [USDC], - [gardenUsdt]: [USDT], - [gardenWeth]: [WETH], - [gardenAtust]: [UST], - [gardenWbtc]: [WBTC], -}; - -// tvl calculation -const tvl = async (timestamp, ethBlock, chainBlock) => { - let tvl = {}; - let calls = []; - - const block = chainBlock.aurora; - - Object.entries(poolToTokensMap).forEach(([poolAddress, poolTokens]) => { - poolTokens.forEach((_, tokenIndex) => { - calls.push({ - target: poolAddress, - params: tokenIndex, - }); - }); - }); - - // pool balances - const balances = await sdk.api.abi.multiCall({ - calls: calls, - block, - abi: abi.balances, - chain: "aurora", - }); - - balances.output.forEach((res) => { - const amount = res.output; - const poolAddress = res.input.target; - const tokenAddress = poolToTokensMap[poolAddress][res.input.params[0]]; - sdk.util.sumSingleBalance(tvl, `aurora:${tokenAddress}`, amount); - }); - - // unsupported stablecoin tokens - tvl["FRAX"] = new BigNumber(tvl[`aurora:${FRAX}`]) - .div(new BigNumber(10).pow(18)) - .toNumber(); - delete tvl[`aurora:${FRAX}`]; - tvl["RUSD"] = new BigNumber(tvl[`aurora:${RUSD}`]) - .div(new BigNumber(10).pow(18)) - .toNumber(); - delete tvl[`aurora:${RUSD}`]; - - // format calls to vase for collateral - calls = []; - Object.entries(gardenToTokensMap).forEach(([gardenAddress, gardenTokens]) => { - gardenTokens.forEach((gardenToken) => { - calls.push({ - target: VASE, - params: [gardenToken, gardenAddress], - }); - }); - }); - - const vaseCollateralBalances = await sdk.api.abi.multiCall({ - calls: calls, - block, - abi: abi.balanceOf, - chain: "aurora", - }); - - vaseCollateralBalances.output.forEach((res) => { - const amount = res.output; - const tokenAddress = res.input.params[0]; - sdk.util.sumSingleBalance(tvl, `aurora:${tokenAddress}`, amount); - }); - - return tvl; -}; - -// staking calculation -const staking = async (timestamp, ethBlock, chainBlock) => { - const balances = {}; - const stRoseTvl = await sdk.api.erc20.balanceOf({ - target: ROSE, - owner: STROSE, - chain: "aurora", - block: chainBlock.aurora, - }); - - sdk.util.sumSingleBalance(balances, `aurora:${ROSE}`, stRoseTvl.output); - return balances; -}; - -const borrowed = async (timestamp, ethBlock, chainBlock) => { - const calls = []; - Object.entries(gardenToTokensMap).forEach(([gardenAddress, gardenTokens]) => { - gardenTokens.forEach((_) => { - calls.push({ - target: gardenAddress, - params: [], - }); - }); - }); - - const borrowedAmounts = await sdk.api.abi.multiCall({ - calls: calls, - block: chainBlock.aurora, - abi: abi.totalBorrow, - chain: "aurora", - }); +} - borrowedAmounts.output.forEach((res) => { - const amount = res.output[0]; - sdk.util.sumSingleBalance(borrowed, `aurora:${RUSD}`, amount); - }); +const tvl = async (api) => { + const ownerTokens = [] - borrowed["RUSD"] = new BigNumber(borrowed[`aurora:${RUSD}`]) - .div(new BigNumber(10).pow(18)) - .toNumber(); - delete borrowed[`aurora:${RUSD}`]; + Object.entries(poolToTokensMap).forEach(([pool, tokens]) => ownerTokens.push([tokens, pool])) + const gardenTokens = [NEAR, USDC, USDT, WETH, UST, WBTC] + ownerTokens.push([gardenTokens, VASE]) - return borrowed; -}; + return api.sumTokens({ ownerTokens}) +} module.exports = { methodology: - "TVL is computed as the sum of the underlying token balances on all Rose liquidity pools. Staking accounts for total ROSE token staked. Borrowed accounts for debt in RUSD for all open collateralized debt positions.", + "TVL is computed as the sum of the underlying token balances on all Rose liquidity pools", aurora: { tvl, - staking, - borrowed + staking: staking(STROSE, ROSE), }, -}; +} diff --git a/projects/sailing-portfolios/index.js b/projects/sailing-portfolios/index.js index 4eefd2366bd4..40fab41fd1a4 100644 --- a/projects/sailing-portfolios/index.js +++ b/projects/sailing-portfolios/index.js @@ -10,7 +10,7 @@ async function tvl(api) { }) const tokens = await api.multiCall({ abi: 'address[]:getPortfolioAssets', calls: portfolios}) const ownerTokens = portfolios.map((portfolio, i) => [tokens[i], portfolio]) - return api.sumTokens({ ownerTokens }) + return api.sumTokens({ ownerTokens, blacklistedTokens: ['0x47a663C082926d0d913cAcB89240c3f4bc409a88'] }) } module.exports = { diff --git a/projects/satori/index.js b/projects/satori/index.js index cd0d499a0ea2..585ac7c448be 100644 --- a/projects/satori/index.js +++ b/projects/satori/index.js @@ -2,8 +2,8 @@ const ADDRESSES = require("../helper/coreAssets.json"); const { sumTokensExport } = require("../helper/unwrapLPs"); const USDT_TOKEN_CONTRACT = ADDRESSES.astarzk.USDT; -const EZETH_BASE = "0x2416092f143378750bb29b79eD961ab195CcEea5"; -const EZETH_LINEA = "0x2416092f143378750bb29b79eD961ab195CcEea5"; +const EZETH_BASE = ADDRESSES.blast.ezETH; +const EZETH_LINEA = ADDRESSES.blast.ezETH; const ZK = "0x5A7d6b2F92C77FAD6CCaBd7EE0624E64907Eaf3E"; const WALLET_ADDR = [ "0x62e724cB4d6C6C7317e2FADe4A03001Fe7856940", @@ -63,4 +63,13 @@ module.exports = { tokens: [ADDRESSES.xlayer.USDC], }), }, + arbitrum:{ + tvl: sumTokensExport({ + owners: [ + "0x5aCCEb99De5cc07168C193396C1fdC3E3abEEED7", + "0xAE9a83510cbB26c58595BA671f131e0A03Fe9A03", + ], + tokens: [ADDRESSES.arbitrum.USDC_CIRCLE], + }), + }, }; diff --git a/projects/satoshi-protocol/index.js b/projects/satoshi-protocol/index.js index e986a37bd85a..93a7a9af2ca9 100644 --- a/projects/satoshi-protocol/index.js +++ b/projects/satoshi-protocol/index.js @@ -55,6 +55,10 @@ module.exports = { '0xf1A7b474440702BC32F622291B3A01B80247835E', // BITLAYER WBTC Collateral '0xe9897fe6C8bf96D5ef8B0ECC7cBfEdef9818232c', // BITLAYER stBTC Collateral ], + nymInformation: { + address: '0xC562321a494290bE5FeDF9092cee35DE6f884D50', + fromBlock: 3442163, + } }), bob: createExports({ troveList: [ diff --git a/projects/saturnswap/index.js b/projects/saturnswap/index.js new file mode 100644 index 000000000000..d9a275ed698e --- /dev/null +++ b/projects/saturnswap/index.js @@ -0,0 +1,52 @@ +const { sumTokensExport } = require('../helper/chain/cardano') + +module.exports = { + timetravel: false, + cardano: { + tvl: sumTokensExport({ scripts: ['addr1zyd0sj57d9lpu7cy9g9qdurpazqc9l4eaxk6j59nd2gkh4275jq4yvpskgayj55xegdp30g5rfynax66r8vgn9fldndsqzf5tn'] },), // 0x0f4b4f7f7e507f3b6e9e954d5f6f3f8f7fa06e0f + } +} + +/* +// graph query for info +https://api.saturnswap.io/v1/graphql +query { + pools(first: 1000, order: { pool_stats: { tvl: DESC } }) { + edges { + node { + lp_fee_percent + name + pool_stats { + tvl + user_fees_earned_1d + updated_at + volume_1d + reserve_token_two + reserve_token_one + price + } + token_project_one { + asset_name + id + policy_id + name + ticker + price + decimals + } + token_project_one_id + token_project_two { + asset_name + id + policy_id + name + price + decimals + ticker + } + } + } + } +} + +*/ \ No newline at end of file diff --git a/projects/scribe-v4/index.js b/projects/scribe-v4/index.js new file mode 100644 index 000000000000..e9f4d28a25b4 --- /dev/null +++ b/projects/scribe-v4/index.js @@ -0,0 +1,9 @@ +const { uniV3Export } = require('../helper/uniswapV3') + +module.exports = uniV3Export({ + scroll: { + factory: '0xDc62aCDF75cc7EA4D93C69B2866d9642E79d5e2e', + fromBlock: 7680915, + isAlgebra: true, + }, +}) diff --git a/projects/snowbank.js b/projects/snowbank.js index a395f0226a37..45e333f821d1 100644 --- a/projects/snowbank.js +++ b/projects/snowbank.js @@ -1,51 +1,11 @@ -const { sumTokensAndLPsSharedOwners } = require("./helper/unwrapLPs"); -const sdk = require('@defillama/sdk'); - +const { staking } = require('./helper/staking') const TimeStaking = "0x85784d5e2CCae89Bcb39EbF0ac6Cdc93d42d99AD" const time = "0x7d1232b90d3f809a54eeaeebc639c62df8a8942f" -const staking = async (timestamp, ethBlock, chainBlocks) => { - const balances = {}; - - const stakingBalance = await sdk.api.abi.call({ - abi: 'erc20:balanceOf', - target: time, - params: TimeStaking, - block: chainBlocks.avax, - chain: 'avax' - }); - - sdk.util.sumSingleBalance(balances, 'avax:'+time, stakingBalance.output); - - return balances; -}; - -// https://app.wonderland.money/#/bonds -const treasury = "0xa82422A5FD4F9cB85cD4aAc393cD3296A27dD873" -const mim = "0x130966628846BFd36ff31a822705796e8cb8C18D" - -async function tvl(timestamp, block, chainBlocks) { - const balances = {}; - - await sumTokensAndLPsSharedOwners( - balances, - [ - [mim, false], - ["0x425c45adfb53861e5db8f17d9b072ab60d4404d8", true], - ["0xa3d2cfe49df9d1ea0dc589b69252e1eddc417d6d", true], - ], - [treasury], - chainBlocks.avax, - 'avax', - addr=>addr.toLowerCase()==="0x130966628846bfd36ff31a822705796e8cb8c18d"?"0x99d8a9c45b2eca8864373a26d1459e3dff1e17f3":`avax:${addr}` - ); - - return balances; -} module.exports = { avax:{ - tvl, - staking + tvl: () => ({}), + staking: staking(TimeStaking, time) }, methodology: "Counts tokens on the treasury for tvl and staked SB for staking", diff --git a/projects/solace-finance/config.js b/projects/solace-finance/config.js index 51f428ae11d8..71d2817f982b 100644 --- a/projects/solace-finance/config.js +++ b/projects/solace-finance/config.js @@ -40,7 +40,7 @@ module.exports = { TokenTicker: "WMATIC", }, { - PoolToken: "0x45c32fA6DF82ead1e2EF74d17b76547EDdFaFF89", + PoolToken: ADDRESSES.polygon.FRAX, TokenTicker: "FRAX", }, { diff --git a/projects/spartacus/index.js b/projects/spartacus/index.js index 8042057ed5d4..8379f460d4f8 100644 --- a/projects/spartacus/index.js +++ b/projects/spartacus/index.js @@ -1,6 +1,7 @@ const { staking } = require('../helper/staking') module.exports = { + deadFrom: '2023-09-23', fantom: { tvl: () => 0, staking: staking("0x9863056B4Bdb32160A70107a6797dD06B56E8137", "0x5602df4A94eB6C680190ACCFA2A475621E0ddBdc") diff --git a/projects/spiko/index.js b/projects/spiko/index.js new file mode 100644 index 000000000000..969fbee11a08 --- /dev/null +++ b/projects/spiko/index.js @@ -0,0 +1,21 @@ +const assets = { + polygon: [ + '0xe4880249745eAc5F1eD9d8F7DF844792D560e750', + '0xa0769f7A8fC65e47dE93797b4e21C073c117Fc80' + ], + ethereum: [ + '0xe4880249745eAc5F1eD9d8F7DF844792D560e750', + '0xa0769f7A8fC65e47dE93797b4e21C073c117Fc80' + ] +} + +module.exports = {} + +Object.keys(assets).forEach(chain => { + module.exports[chain] = { + tvl: (api) => api.multiCall({ + abi: 'erc20:totalSupply', + calls: assets[api.chain].map(target => ({ target })) + }).then(supplies => api.add(assets[api.chain], supplies)) + } +}) \ No newline at end of file diff --git a/projects/stablejack/index.js b/projects/stablejack/index.js index e44943b7302f..ae8f8296c2ae 100644 --- a/projects/stablejack/index.js +++ b/projects/stablejack/index.js @@ -1,3 +1,4 @@ +const ADDRESSES = require('../helper/coreAssets.json') const { sumTokensExport } = require('../helper/unwrapLPs') module.exports = { @@ -6,9 +7,9 @@ module.exports = { async function tvl(api) { const wsAVAX = '0x7aa5c727270c7e1642af898e0ea5b85a094c17a1' - const sAVAX = '0x2b2C81e08f1Af8835a78Bb2A90AE924ACE0eA4bE' + const sAVAX = ADDRESSES.avax.SAVAX const wsAvaxBal= await api.call({ abi: 'erc20:balanceOf', target: wsAVAX, params: '0xDC325ad34C762C19FaAB37d439fbf219715f9D58'}) const wsAvaxSupply = await api.call({ abi: 'uint256:totalSupply', target: wsAVAX }) - const sAvaxBal= await api.call({ abi: 'erc20:balanceOf', target: '0x2b2C81e08f1Af8835a78Bb2A90AE924ACE0eA4bE', params: wsAVAX}) + const sAvaxBal= await api.call({ abi: 'erc20:balanceOf', target: ADDRESSES.avax.SAVAX, params: wsAVAX}) api.add(sAVAX, wsAvaxBal * sAvaxBal / wsAvaxSupply) } \ No newline at end of file diff --git a/projects/stablekoi/abi.json b/projects/stablekoi/abi.json deleted file mode 100644 index 7e8058d689af..000000000000 --- a/projects/stablekoi/abi.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "totalSupply": "uint256:totalSupply" -} \ No newline at end of file diff --git a/projects/stablekoi/index.js b/projects/stablekoi/index.js index 1d575933f521..a4d6392f42a2 100644 --- a/projects/stablekoi/index.js +++ b/projects/stablekoi/index.js @@ -1,76 +1,28 @@ const ADDRESSES = require('../helper/coreAssets.json') -const { sumTokens } = require("../helper/unwrapLPs"); -const { GraphQLClient, gql } = require("graphql-request"); -const abi = require("./abi.json"); -const sdk = require("@defillama/sdk"); -const { default: BigNumber } = require("bignumber.js"); -const { toUSDTBalances } = require("../helper/balances"); const { getConfig } = require('../helper/cache') -const chain = "godwoken"; - -async function tvl(ts, _block, chainBlocks) { - const balances = {}; +async function tvl(api) { const tokensAndOwners = []; const poolInfo = await getConfig('stable-koi-v0', "https://app.stablekoi.com/lists/poollist.json"); poolInfo.forEach((pool) => { pool.tokens.forEach((token) => tokensAndOwners.push([token, pool.address])); }); - await sumTokens(balances, tokensAndOwners, chainBlocks[chain], chain); - return balances + return api.sumTokens({ tokensAndOwners }) } -async function tvl_v1(ts, _block, chainBlocks) { - const balances = {}; - const chain = "godwoken_v1"; +async function tvl_v1(api) { const tokensAndOwners = []; - // const poolInfo = await get('https://app-v1.stablekoi.com/api/pools'); v1Pools.forEach((pool) => { pool.tokens.forEach((token) => tokensAndOwners.push([token.address, pool.address])); }); - await sumTokens(balances, tokensAndOwners, chainBlocks[chain], chain); - return balances + return api.sumTokens({ tokensAndOwners }) } -const yokaiInfoAPI = - "https://www.yokaiswap.com/subgraphs/name/yokaiswap/exchange"; -async function fetchTokenPriceFromYokaiSwap(token) { - const graphQLClient = new GraphQLClient(yokaiInfoAPI); - - const query = gql` - query tokens { - tokens(where:{id:\"${token.toLowerCase()}\"}) { - derivedUSD - } - } - `; - - const data = await graphQLClient.request(query); - - return (data.tokens[0] || { derivedUSD: 0 }).derivedUSD; -} - -const koi = "0xd66eb642eE33837531FdA61eb7Ab15B15658BcaB"; -const koiStakingRewards = "0x9d7AACf560e493A7B0666d85BDE216d6d38Ec429"; -async function staking(ts, _block, chainBlocks) { - const [{ output: totalStakedKOI }, { output: koiDecimals }, koiPrice] = - await Promise.all([ - sdk.api.abi.call({ - abi: abi.totalSupply, - target: koiStakingRewards, - chain, - block: chainBlocks[chain], - }), - sdk.api.erc20.decimals(koi, chain), - fetchTokenPriceFromYokaiSwap(koi), - ]); - - return toUSDTBalances( - BigNumber(totalStakedKOI) - .multipliedBy(BigNumber(koiPrice)) - .dividedBy(BigNumber(10).pow(BigNumber(koiDecimals))) - .toFixed(0) - ); +async function staking(api) { + const koi = "0xd66eb642eE33837531FdA61eb7Ab15B15658BcaB"; + const koiStakingRewards = "0x9d7AACf560e493A7B0666d85BDE216d6d38Ec429"; + const totalStakedKOI = await api.call({ abi: 'erc20:totalSupply', target: koiStakingRewards }) + api.add(koi, totalStakedKOI) } module.exports = { @@ -82,65 +34,39 @@ module.exports = { tvl: tvl_v1, }, hallmarks: [ - [Math.floor(new Date('2022-08-26')/1e3), "Add godwoken v1 chain tvl"], + [Math.floor(new Date('2022-08-26') / 1e3), "Add godwoken v1 chain tvl"], ], } const v1Pools = [ { - "name": "USDC|eth↔USDC|bsc", "address": "0xB76B94bA69f0C2c556ee86F57e57F5F20A705d18", "tokens": [ { - "name": "USD Coin (Ethereum)", "address": "0x186181e225dc1Ad85a4A94164232bD261e351C33", }, - { - "symbol": "USDC|bsc", - "address": ADDRESSES.godwoken_v1.USDC_bsc, - } + { "address": ADDRESSES.godwoken_v1.USDC_bsc, } ] }, { - "name": "USDC|eth↔USDT|eth", "address": "0xA1F83F8F142c1069d33a898498AFEA6257387133", "tokens": [ - { - "symbol": "USDC|eth", - "address": "0x186181e225dc1Ad85a4A94164232bD261e351C33", - }, - { - "symbol": "USDT|eth", - "address": "0x8E019acb11C7d17c26D334901fA2ac41C1f44d50", - } + { "address": "0x186181e225dc1Ad85a4A94164232bD261e351C33", }, + { "address": "0x8E019acb11C7d17c26D334901fA2ac41C1f44d50", } ] }, { - "name": "USDT|eth↔USDT|bsc", "address": "0x2c13f5DB105C6ab13ba183Abb7c0CBe38bE45A92", "tokens": [ - { - "symbol": "USDT|eth", - "address": "0x8E019acb11C7d17c26D334901fA2ac41C1f44d50", - }, - { - "symbol": "USDT|bsc", - "address": ADDRESSES.godwoken_v1.USDT_bsc, - } + { "address": "0x8E019acb11C7d17c26D334901fA2ac41C1f44d50", }, + { "address": ADDRESSES.godwoken_v1.USDT_bsc, } ] }, { - "name": "WBTC|eth↔BTCB|bsc", "address": "0x2360D9699dc82b684F986fBcc2ddf3Ab54Ff60dD", "tokens": [ - { - "symbol": "WBTC|eth", - "address": ADDRESSES.godwoken_v1.WBTC_eth, - }, - { - "symbol": "BTCB|bsc", - "address": ADDRESSES.godwoken_v1.BTCB_bsc, - } + { "address": ADDRESSES.godwoken_v1.WBTC_eth, }, + { "address": ADDRESSES.godwoken_v1.BTCB_bsc, } ] } ] \ No newline at end of file diff --git a/projects/stader/index.js b/projects/stader/index.js index 8a5746897459..617a0aef1de2 100644 --- a/projects/stader/index.js +++ b/projects/stader/index.js @@ -7,21 +7,13 @@ async function getData() { return _res; } -async function hbarTvl(timestamp) { +async function hbarTvl() { const res = await get("https://universe.staderlabs.com/common/tvl"); return { "hedera-hashgraph": res.hedera.native, }; } -async function fantomTvl() { - const res = await getData(); - return { - "fantom": res.fantom.native, - }; -} - - async function maticTvl() { const res = await getData(); return { @@ -29,13 +21,6 @@ async function maticTvl() { }; } -async function terra2Tvl() { - const res = await getData(); - return { - "terra-luna-2": res.terra.native || 0, - }; -} - async function bscTvl() { const res = await getData(); return { @@ -43,13 +28,6 @@ async function bscTvl() { }; } -async function nearTvl() { - const res = await getData(); - return { - near: res.near.native, - }; -} - async function ethTvl(api) { return await api.call({ abi: "uint256:totalAssets", @@ -75,13 +53,13 @@ module.exports = { tvl: () => ({}), }, terra2: { - tvl: terra2Tvl, + tvl: () => ({}), }, bsc: { tvl: bscTvl, }, near: { - tvl: nearTvl, + tvl: () => ({}), }, ethereum: { tvl: async (api) => { diff --git a/projects/stakedicp/index.js b/projects/stakedicp/index.js index 1f9728e2c097..54a68c79086f 100644 --- a/projects/stakedicp/index.js +++ b/projects/stakedicp/index.js @@ -1,4 +1,3 @@ -const BigNumber = require("bignumber.js"); const { get } = require("../helper/http"); const url = 'https://h6uvl-xiaaa-aaaap-qaawa-cai.raw.ic0.app/tvl'; @@ -10,7 +9,7 @@ async function tvl(_timestamp, _block) { throw new Error("Unknown"); } return { - "coingecko:internet-computer": BigNumber(tvl).div(1e8).toFixed(0), + "coingecko:internet-computer": tvl/1e8, }; } diff --git a/projects/stargatefinance-v2/index.js b/projects/stargatefinance-v2/index.js index a06659ce58e8..cff96fe32721 100644 --- a/projects/stargatefinance-v2/index.js +++ b/projects/stargatefinance-v2/index.js @@ -83,6 +83,12 @@ const CONFIG = { '0x81F6138153d473E8c5EcebD3DC8Cd4903506B075', ], }, + sei: { + pools: [ + '0x45d417612e177672958dC0537C45a8f8d754Ac2E', //usdc pool + '0x0dB9afb4C33be43a0a0e396Fd1383B4ea97aB10a' + ], + }, } const createTvlFunction = (pools) => { diff --git a/projects/steakHut-lb/index.js b/projects/steakHut-lb/index.js index c1150bedcf04..2fd3a0043f77 100644 --- a/projects/steakHut-lb/index.js +++ b/projects/steakHut-lb/index.js @@ -33,6 +33,17 @@ const _vaults = { } async function tvl(api) { + //function to grab the tvl of enigma pools + async function fetchEnigmaData(factoryAddress) { + const enigmas = await api.fetchList({ lengthAbi: 'enigmaPositionNumber', itemAbi: 'enigmaAtIndex', target: factoryAddress }) + const token0s = await api.multiCall({ abi: 'address:token0', calls: enigmas }) + const token1s = await api.multiCall({ abi: 'address:token1', calls: enigmas }) + const bals = await api.multiCall({ abi: 'function getTotalAmounts() view returns (uint256 bal0, uint256 bal1)', calls: enigmas }) + bals.forEach(({ bal0, bal1 }, i) => { + api.add(token0s[i], bal0) + api.add(token1s[i], bal1) + }) + } //get the total shares from all vaults const vaults = _vaults[api.chain] const depositTokens = await api.multiCall({ abi: abi.want, calls: vaults }) @@ -61,15 +72,14 @@ async function tvl(api) { api.add(JOE_ADDRESS, await api.call({ target: HJOE_ADDRESS, abi: 'erc20:totalSupply' })) // engima tvl + const enigmaFactory_AVAX = `0xD751E0940CfadC35f84e60075d0f940a2545FB8d`; - const enigmas = await api.fetchList({ lengthAbi: 'enigmaPositionNumber', itemAbi: 'enigmaAtIndex', target: enigmaFactory_AVAX }) - const token0s = await api.multiCall({ abi: 'address:token0', calls: enigmas }) - const token1s = await api.multiCall({ abi: 'address:token1', calls: enigmas }) - const bals = await api.multiCall({ abi: 'function getTotalAmounts() view returns (uint256 bal0, uint256 bal1)', calls: enigmas }) - bals.forEach(({ bal0, bal1 }, i) => { - api.add(token0s[i], bal0) - api.add(token1s[i], bal1) - }) + const enigmaFactory_AVAX_PHAR = `0x653b809a4fa6ba0fc0a6dc1b3f92a362fcb6086d`; // Example BSC address + + // Fetch data for both factories + await fetchEnigmaData(enigmaFactory_AVAX); + await fetchEnigmaData(enigmaFactory_AVAX_PHAR); + } } diff --git a/projects/stormtrade/index.js b/projects/stormtrade/index.js index 2e1eda396769..29a9b0ff2f85 100644 --- a/projects/stormtrade/index.js +++ b/projects/stormtrade/index.js @@ -11,9 +11,9 @@ module.exports = { 'EQDynReiCeK8xlKRbYArpp4jyzZuF6-tYfhFM0O5ulOs5H0L', // jUSDT vault 'EQDpJnZP89Jyxz3euDaXXFUhwCWtaOeRmiUJTi3jGYgF8fnj', // TON-M vault 'EQAz6ehNfL7_8NI7OVh1Qg46HsuC4kFpK-icfqK9J3Frd6CJ', // USDT vault - 'EQBwfRtqEf3ZzhkeGsmXiC7hzTh1C5zZZzLgDH5VL8gENQ2A' // Notcoin pre-market vault + 'EQAG8_BzwlWkmqb9zImr9RJjjgZZCLMOQXP9PR0B1PYHvfSS', // Notcoin vault ], - tokens: [ADDRESSES.ton.jUSDT, ADDRESSES.ton.USDT, ADDRESSES.ton.TON] + tokens: [ADDRESSES.ton.jUSDT, ADDRESSES.ton.USDT, ADDRESSES.ton.TON, ADDRESSES.ton.NOT] }) ) } diff --git a/projects/stride/index.js b/projects/stride/index.js index ff146d5dab91..be7bb722a071 100644 --- a/projects/stride/index.js +++ b/projects/stride/index.js @@ -17,7 +17,7 @@ const chains = { juno: { chainId: "juno-1", denom: "ujuno", - coinGeckoId: "juno-network", + coinGeckoId: "juno-network", }, osmosis: { diff --git a/projects/strkfarm/erc4626.js b/projects/strkfarm/erc4626.js new file mode 100644 index 000000000000..d166b787bbaa --- /dev/null +++ b/projects/strkfarm/erc4626.js @@ -0,0 +1,48 @@ +const ERC4626Abi = [ + { + "name": "asset", + "type": "function", + "inputs": [], + "outputs": [ + { + "type": "core::starknet::contract_address::ContractAddress" + } + ], + "state_mutability": "view" + }, + { + "name": "balanceOf", + "type": "function", + "inputs": [ + { + "name": "account", + "type": "core::starknet::contract_address::ContractAddress" + } + ], + "outputs": [ + { + "type": "core::integer::u256" + } + ], + "state_mutability": "view", + "customInput": 'address', + }, + { + "name": "total_assets", + "type": "function", + "inputs": [], + "outputs": [ + { + "type": "core::integer::u256" + } + ], + "state_mutability": "view" + } +] + +const ERC4626AbiMap = {} +ERC4626Abi.forEach(i => ERC4626AbiMap[i.name] = i) + +module.exports = { + ERC4626AbiMap +} \ No newline at end of file diff --git a/projects/strkfarm/index.js b/projects/strkfarm/index.js new file mode 100644 index 000000000000..e2f767cd6b9b --- /dev/null +++ b/projects/strkfarm/index.js @@ -0,0 +1,80 @@ +/** + * STRKFarm is a yield aggregator and strategy builder on Starknet + * - We use various DeFi protocols on starknet to design yield strategies + */ + +const { multiCall } = require("../helper/chain/starknet"); +const ADDRESSES = require('../helper/coreAssets.json'); +const { ERC4626AbiMap } = require('./erc4626'); +const { ERC721StratAbiMap } = require('./sensei'); + +const STRATEGIES = { + "AutoCompounding": [{ // auto-compounds user tokens (e.g. STRK) by investing in zkLend + address: "0x00541681b9ad63dff1b35f79c78d8477f64857de29a27902f7298f7b620838ea", // STRK Auto-compounding + token: ADDRESSES.starknet.STRK + }, { + address: "0x016912b22d5696e95ffde888ede4bd69fbbc60c5f873082857a47c543172694f", // USDC Auto-compounding + token: ADDRESSES.starknet.USDC + }], + "Sensei": [{ // strategy using delta neutral looping across zklend and nostra protocols + address: "0x020d5fc4c9df4f943ebb36078e703369c04176ed00accf290e8295b659d2cea6", // STRK Sensei + token: ADDRESSES.starknet.STRK, + zToken: '0x06d8fa671ef84f791b7f601fa79fea8f6ceb70b5fa84189e3159d532162efc21' + }, { + address: "0x04937b58e05a3a2477402d1f74e66686f58a61a5070fcc6f694fb9a0b3bae422", + token: ADDRESSES.starknet.USDC, // USDC Sensei + zToken: '0x047ad51726d891f972e74e4ad858a261b43869f7126ce7436ee0b2529a98f486' + }] +} + +// returns tvl and token of the AutoCompounding strategies +async function computeAutoCompoundingTVL(api) { + const contracts = STRATEGIES.AutoCompounding; + // though these will be zToken (i.e. zkLend token, e.g. zUSDC), + // according to zkLend, 1zToken = 1 underlying token + // so, 1 zSTRK == 1 STRK, 1 zUSDC == 1 USDC + const totalAssets = await multiCall({ + calls: contracts.map(c => c.address), + abi: ERC4626AbiMap.total_assets + }); + + api.addTokens(contracts.map(c => c.token), totalAssets); +} + +// returns tvl and token of the Sensei strategies +async function computeSenseiTVL(api) { + // Sensei strategies contain multiple LP tokens in each contract bcz of looping and borrow, + // but we only consider the zToken bal divided by a factor (to offset looping) as TVL + // - This is bcz any deposit by user first gets deposited into zkLend for zToken + const contracts = STRATEGIES.Sensei; + const settings = await multiCall({ + calls: contracts.map(c => c.address), + abi: ERC721StratAbiMap.get_settings + }); + + const DENOMINATOR_FACTOR = 1000000n; + const offsetFactors = settings.map(s => s.coefs_sum2); // The factor is in 10**6 terms + const balances = await multiCall({ + calls: contracts.map(c => ({ + target: c.zToken, + params: c.address, + })), + abi: ERC4626AbiMap.balanceOf + }); + + const adjustedBalances = balances.map((b, i) => (b * DENOMINATOR_FACTOR) / (DENOMINATOR_FACTOR + BigInt(offsetFactors[i]))); + api.addTokens(contracts.map(c => c.token), adjustedBalances); +} + +async function tvl(api) { + await computeAutoCompoundingTVL(api); + await computeSenseiTVL(api); +} + +module.exports = { + doublecounted: true, + methodology: "The TVL is calculated as a sum of total assets deposited into strategies", + starknet: { + tvl, + }, +}; \ No newline at end of file diff --git a/projects/strkfarm/sensei.js b/projects/strkfarm/sensei.js new file mode 100644 index 000000000000..fcd8f18beb76 --- /dev/null +++ b/projects/strkfarm/sensei.js @@ -0,0 +1,41 @@ +const ERC721StratAbi = [ + { + "name": "get_settings", + "type": "function", + "inputs": [], + "outputs": [ + { + "name": "fee_percent", + "type": "core::integer::u128" + }, + { + "name": "fee_receiver", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "min_health_factor", + "type": "core::integer::u32" + }, + { + "name": "target_health_factor", + "type": "core::integer::u32" + }, + { + "name": "coefs_sum1", + "type": "core::integer::u128" + }, + { + "name": "coefs_sum2", + "type": "core::integer::u128" + } + ], + "state_mutability": "view" + } +] + +const ERC721StratAbiMap = {} +ERC721StratAbi.forEach(i => ERC721StratAbiMap[i.name] = i) + +module.exports = { + ERC721StratAbiMap +} \ No newline at end of file diff --git a/projects/strudel.js b/projects/strudel.js index bb5eda5226c3..5a2896b567dc 100644 --- a/projects/strudel.js +++ b/projects/strudel.js @@ -1,9 +1,7 @@ -const sdk = require('@defillama/sdk') - -async function tvl(ts, block) { - return { - 'bitcoin': (await sdk.api.erc20.totalSupply({ target: '0xe1406825186D63980fd6e2eC61888f7B91C4bAe4', block })).output / 1e18 - } +async function tvl(api) { + const BTC = '0xe1406825186D63980fd6e2eC61888f7B91C4bAe4' + const supply = await api.call({ abi: 'erc20:totalSupply', target: BTC }) + api.addCGToken('bitcoin', supply/1e18) } module.exports = { diff --git a/projects/sunpump/index.js b/projects/sunpump/index.js new file mode 100644 index 000000000000..9a3f1aa536e7 --- /dev/null +++ b/projects/sunpump/index.js @@ -0,0 +1,5 @@ +const { sumTokensExport, nullAddress } = require('../helper/sumTokens') + +module.exports = { + tron: { tvl: sumTokensExport({ owner: 'TTfvyrAz86hbZk5iDpKD78pqLGgi8C7AAw', tokens: [nullAddress] }) } +} \ No newline at end of file diff --git a/projects/sushiswap-kashi/kashi-lending.js b/projects/sushiswap-kashi/kashi-lending.js index 5fce7a573002..6f047d904bff 100644 --- a/projects/sushiswap-kashi/kashi-lending.js +++ b/projects/sushiswap-kashi/kashi-lending.js @@ -43,6 +43,9 @@ const kashiQuery = ` function kashiLending(chain, borrowed) { return async (api) => { + if(borrowed === true && api.timestamp > 1672534861){ + return {} + } const graphUrl = graphUrls[chain]; // Query graphql endpoint diff --git a/projects/sushiswap-v3/index.js b/projects/sushiswap-v3/index.js index 810caad4013a..64f6fd8beb17 100644 --- a/projects/sushiswap-v3/index.js +++ b/projects/sushiswap-v3/index.js @@ -100,6 +100,7 @@ module.exports = uniV3Export({ const config = { filecoin: { endpoint: 'https://sushi.laconic.com/subgraphs/name/sushiswap/v3-filecoin' }, europa: { endpoint: 'https://elated-tan-skat-graph.skalenodes.com:8000/subgraphs/name/sushi/v3-skale-europa' }, + zeta: { endpoint: 'https://api.goldsky.com/api/public/project_cls39ugcfyhbq01xl9tsf6g38/subgraphs/v3-zetachain/1.0.0/gn' }, } const query = `{ diff --git a/projects/swell-restaking/index.js b/projects/swell-restaking/index.js index 21d2809246fe..4e778c17f9b7 100644 --- a/projects/swell-restaking/index.js +++ b/projects/swell-restaking/index.js @@ -1,13 +1,12 @@ const { nullAddress } = require("../helper/tokenMapping") async function tvl(api) { - const tvl = await api.call({ - target: "0xFAe103DC9cf190eD75350761e95403b7b8aFa6c0", - abi: "uint256:totalETHDeposited" - }) + const totalSupply = await api.call({ target: '0xFAe103DC9cf190eD75350761e95403b7b8aFa6c0', abi: 'uint256:totalSupply'}); + const rate = await api.call({ target: '0xFAe103DC9cf190eD75350761e95403b7b8aFa6c0', abi: 'uint256:getRate'}); + return { - [nullAddress]: tvl - } + [nullAddress]: (totalSupply * rate)/1e18 + }; } module.exports = { diff --git a/projects/swell-swbtc/index.js b/projects/swell-swbtc/index.js new file mode 100644 index 000000000000..a419de3aeea2 --- /dev/null +++ b/projects/swell-swbtc/index.js @@ -0,0 +1,20 @@ +const ADDRESSES = require('../helper/coreAssets.json') + +const WBTC = ADDRESSES.ethereum.WBTC; +const swBTC = '0x8DB2350D78aBc13f5673A411D4700BCF87864dDE' + +async function tvl(api) { + const totalSupply = await api.call({ target: swBTC, abi: 'uint256:totalSupply'}); + const rate = await api.call({ target: swBTC, abi: 'uint256:pricePerShare'}); + + return { + [WBTC]: (totalSupply * rate)/1e8 + }; +} + +module.exports = { + doublecounted: true, + ethereum: { + tvl, + }, +} \ No newline at end of file diff --git a/projects/symbiosis-finance/config.js b/projects/symbiosis-finance/config.js index bc211d0e2eef..46832f3c7151 100644 --- a/projects/symbiosis-finance/config.js +++ b/projects/symbiosis-finance/config.js @@ -385,6 +385,7 @@ module.exports = { name: 'zeta', tokens: [ TOKENS.zeta.pufETH, + ADDRESSES.zeta.USDC_1, ], holders: [ '0x8a7F930003BedD63A1ebD99C5917FD6aE7E3dedf', // portal v2 diff --git a/projects/taco/index.js b/projects/taco/index.js new file mode 100644 index 000000000000..79a2ccfdbf9f --- /dev/null +++ b/projects/taco/index.js @@ -0,0 +1,23 @@ +const { get_account_tvl } = require("../helper/chain/eos"); + +// Taco Studios +// https://swap.tacocrypto.io +async function wax() { + const accounts = ["swap.taco"]; + const tokens = [ + ["eosio.token", "WAX", "wax"], + ["token.nefty", "NEFTY", "nefty"], + ["alien.worlds", "TLM", "alien-worlds"], + ["usdt.alcor", "USDT", "alcor-ibc-bridged-usdt-wax"], + ["wombattokens", "WOMBAT", "wombat"], + ["wuffi", "WUF", "wuffi"] + ]; + return await get_account_tvl(accounts, tokens, "wax"); +} + +module.exports = { + methodology: `Taco Studios TVL is achieved by querying token balances from a (v2 uniswap fork) swap contract`, + wax: { + tvl: wax + }, +} \ No newline at end of file diff --git a/projects/tangible-ustb/index.js b/projects/tangible-ustb/index.js index b04203fbda1b..1b0d2ba68578 100644 --- a/projects/tangible-ustb/index.js +++ b/projects/tangible-ustb/index.js @@ -1,8 +1,9 @@ +const ADDRESSES = require('../helper/coreAssets.json') const { sumTokensExport } = require('../helper/unwrapLPs') const USTB = '0x83fedbc0b85c6e29b589aa6bdefb1cc581935ecd' module.exports = { ethereum: { - tvl: sumTokensExport({ owner: USTB, tokens: ["0x59D9356E565Ab3A36dD77763Fc0d87fEaf85508C"]}), + tvl: sumTokensExport({ owner: USTB, tokens: [ADDRESSES.ethereum.USDM]}), }, } \ No newline at end of file diff --git a/projects/tbtc/index.js b/projects/tbtc/index.js index 0ac5ec61809c..fac1e605c8d9 100644 --- a/projects/tbtc/index.js +++ b/projects/tbtc/index.js @@ -27,6 +27,7 @@ const owners = [ module.exports = { methodology: "BTC on btc chain", + ethereum: {tvl: () => ({}) }, bitcoin: { tvl: sdk.util.sumChainTvls([ sumTokensExport({ owners }), diff --git a/projects/teahouse-v3/abi.js b/projects/teahouse-v3/abi.js index f286f9420cd6..798f7ec2aa79 100644 --- a/projects/teahouse-v3/abi.js +++ b/projects/teahouse-v3/abi.js @@ -1,6 +1,7 @@ module.exports = { + assetToken0: "function assetToken0() view returns (address)", assetToken1: "function assetToken1() view returns (address)", - estimatedValueIntoken1: "function estimatedValueInToken1() view returns (uint256 value1)", + vaultAllUnderlyingAssets: "function vaultAllUnderlyingAssets() view returns (uint256 amount0, uint256 amount1)", getAssets: "function getAssets() view returns (address[])", getAssetsBalance: "function getAssetsBalance() view returns (uint256[])", assetType: "function assetType(address) external returns (uint8)", @@ -13,11 +14,19 @@ module.exports = { outputs: [{ name: "address", type: "felt" }], customType: "address", }, - estimated_value_in_token0: { + asset_token1: { type: "function", state_mutability: "view", - name: "estimated_value_in_token0", + name: "asset_token1", inputs: [], - outputs: [{ name: "value", type: "Uint256" }], + outputs: [{ name: "address", type: "felt" }], + customType: "address", + }, + vault_all_underlying_assets: { + type: "function", + state_mutability: "view", + name: "vault_all_underlying_assets", + inputs: [], + outputs: [{ name: "amount", "type": "(core::integer::u256, core::integer::u256)" }], }, -}; +}; \ No newline at end of file diff --git a/projects/teahouse-v3/index.js b/projects/teahouse-v3/index.js index df331983caf0..f90a68739d48 100644 --- a/projects/teahouse-v3/index.js +++ b/projects/teahouse-v3/index.js @@ -45,19 +45,25 @@ chains.forEach((chain) => { tvl: async (api) => { const vaults = await getVaultContractsAddress(chain); - // EVM pair vault - let tokens = await api.multiCall({ + let tokens0 = await api.multiCall({ + abi: abi.assetToken0, + calls: vaults.pair, + }); + let tokens1 = await api.multiCall({ abi: abi.assetToken1, calls: vaults.pair, }); let bals = await api.multiCall({ - abi: abi.estimatedValueIntoken1, + abi: abi.vaultAllUnderlyingAssets, calls: vaults.pair, }); - api.addTokens(tokens, bals); + let bals0 = bals.map(innerArray => innerArray[0]); + let bals1 = bals.map(innerArray => innerArray[1]); + api.addTokens(tokens0, bals0); + api.addTokens(tokens1, bals1); // EVM portfolio vault - tokens = await api.multiCall({ abi: abi.getAssets, calls: vaults.port }); + let tokens = await api.multiCall({ abi: abi.getAssets, calls: vaults.port }); bals = await api.multiCall({ abi: abi.getAssetsBalance, calls: vaults.port }); let assetTypes = await Promise.all(tokens.map( async (tokenArr, index) => @@ -88,15 +94,22 @@ chains.forEach((chain) => { api.addTokens(tokens, bals); // Starknet pair vault - tokens = await starknet.multiCall({ + tokens0 = await starknet.multiCall({ abi: abi.asset_token0, calls: vaults.starknetPair, }); + tokens1 = await starknet.multiCall({ + abi: abi.asset_token1, + calls: vaults.starknetPair, + }); bals = await starknet.multiCall({ - abi: abi.estimated_value_in_token0, + abi: abi.vault_all_underlying_assets, calls: vaults.starknetPair, }); - api.addTokens(tokens, bals); + bals0 = bals.map(innerArray => innerArray.amount['0']); + bals1 = bals.map(innerArray => innerArray.amount['1']); + api.addTokens(tokens0, bals0); + api.addTokens(tokens1, bals1); return api.getBalances(); }, diff --git a/projects/templedao/index.js b/projects/templedao/index.js index 31116013d66a..94488f4ec8f8 100644 --- a/projects/templedao/index.js +++ b/projects/templedao/index.js @@ -16,7 +16,7 @@ const auraLocker = '0x3Fa73f1E5d8A792C80F426fc8F84FBF7Ce9bBCAC'; const templeTreasuryContract = "0x5c8898f8e0f9468d4a677887bc03ee2659321012"; const FRAX = ADDRESSES.ethereum.FRAX; -const FXS = "0x3432b6a60d23ca0dfca7761b7ab56459d9c964d0"; +const FXS = ADDRESSES.ethereum.FXS; const CVX_FXS = ADDRESSES.ethereum.cvxFXS; const AURA = '0xC0c293ce456fF0ED870ADd98a0828Dd4d2903DBF' const TEMPLE_DENDEND1 = '0x8A5058100E60e8F7C42305eb505B12785bbA3BcA'; diff --git a/projects/tezfin/index.js b/projects/tezfin/index.js index 956de546b306..15eefb3ea7a8 100644 --- a/projects/tezfin/index.js +++ b/projects/tezfin/index.js @@ -11,7 +11,8 @@ async function tvl() { // v2 contracts "KT1MCXxbtS62tk4CUxv29BHnqTBtvsFFGzBm", // ꜰXTZ v2 "KT1WQM7wj64GHCndwV8REccQ6N4tqZ3uRNqs", // ꜰUSDtz v2 - "KT1HCRJhfqmWKRJtZXzvTkY4iisfuR4w6pkB" // ꜰUSDt v2 + "KT1HCRJhfqmWKRJtZXzvTkY4iisfuR4w6pkB", // ꜰUSDt v2 + "KT19gZac3vqV3ZeMJbhMX7Xy8kcocKK4Tbz1" // ꜰtzBTC v2 ], includeTezos: true, }); @@ -26,7 +27,8 @@ async function borrowed() { // v2 contracts "KT1MCXxbtS62tk4CUxv29BHnqTBtvsFFGzBm", // ꜰXTZ v2 "KT1WQM7wj64GHCndwV8REccQ6N4tqZ3uRNqs", // ꜰUSDtz v2 - "KT1HCRJhfqmWKRJtZXzvTkY4iisfuR4w6pkB" // ꜰUSDt v2 + "KT1HCRJhfqmWKRJtZXzvTkY4iisfuR4w6pkB", // ꜰUSDt v2 + "KT19gZac3vqV3ZeMJbhMX7Xy8kcocKK4Tbz1" // ꜰtzBTC v2 ]; const balances = {}; diff --git a/projects/tokemak/index.js b/projects/tokemak/index.js index 91a870b2828a..6f52e0e1ea29 100644 --- a/projects/tokemak/index.js +++ b/projects/tokemak/index.js @@ -27,7 +27,7 @@ const gohm = "0x0ab87046fbb341d058f17cbc4c1133f25a20a52f"; const alcxPool = "0xD3B5D9a561c293Fb42b446FE7e237DaA9BF9AA84"; const alcx = "0xdBdb4d16EdA451D0503b854CF79D55697F90c8DF"; const fxsPool = "0xADF15Ec41689fc5b6DcA0db7c53c9bFE7981E655"; -const fxs = "0x3432B6A60D23Ca0dFCa7761B7ab56459D9C964D0"; +const fxs = ADDRESSES.ethereum.FXS; const tcrPool = "0x15A629f0665A3Eb97D7aE9A7ce7ABF73AeB79415"; const tcr = "0x9C4A4204B79dd291D6b6571C5BE8BbcD0622F050"; const toke = ADDRESSES.ethereum.TOKE; diff --git a/projects/tonhedge/index.js b/projects/tonhedge/index.js new file mode 100644 index 000000000000..1035597c78c9 --- /dev/null +++ b/projects/tonhedge/index.js @@ -0,0 +1,11 @@ +const { sumTokensExport } = require("../helper/chain/ton"); +const ADDRESSES = require("../helper/coreAssets.json"); + +const addr = "EQBXZo11H4wUq3azWDphoUhlV710a-7rvUsqZUGLP9tUcf37" + +module.exports = { + methodology: 'Counts TON Hedge smartcontract balance as TVL.', + ton: { + tvl: sumTokensExport({ owner: addr, tokens: [ADDRESSES.ton.USDT] }), + } +} diff --git a/projects/treasury/aavegotchi.js b/projects/treasury/aavegotchi.js index 295ca69cecd4..a175c5d5ef63 100644 --- a/projects/treasury/aavegotchi.js +++ b/projects/treasury/aavegotchi.js @@ -1,31 +1,36 @@ -const ADDRESSES = require('../helper/coreAssets.json') +const ADDRESSES = require("../helper/coreAssets.json"); const { nullAddress, treasuryExports } = require("../helper/treasury"); const aavegotchiTreasury2 = "0xFFE6280ae4E864D9aF836B562359FD828EcE8020"; -const treasury2 = "0xfb76e9be55758d0042e003c1e46e186360f0627e" +const treasury2 = "0xfb76e9be55758d0042e003c1e46e186360f0627e"; const GHST = "0x3F382DbD960E3a9bbCeaE22651E88158d2791550"; - module.exports = treasuryExports({ ethereum: { - tokens: [ - nullAddress, - ADDRESSES.ethereum.DAI//DAI - ], - owners: [aavegotchiTreasury2, treasury2, '0x53c3CA81EA03001a350166D2Cc0fcd9d4c1b7B62'], + tokens: [ + nullAddress, + ADDRESSES.ethereum.DAI, //DAI + ], + owners: [aavegotchiTreasury2, treasury2, "0x53c3CA81EA03001a350166D2Cc0fcd9d4c1b7B62"], ownTokens: [GHST], }, polygon: { - tokens: [ - nullAddress, - ADDRESSES.polygon.DAI, - ADDRESSES.polygon.USDC - ], - owners: ['0xb208f8BB431f580CC4b216826AFfB128cd1431aB', '0x27DF5C6dcd360f372e23d5e63645eC0072D0C098', '0x939b67F6F6BE63E09B0258621c5A24eecB92631c', - '0x62DE034b1A69eF853c9d0D8a33D26DF5cF26682E', '0x8c8E076Cd7D2A17Ba2a5e5AF7036c2b2B7F790f6', '0x48eA1d45142fC645fDcf78C133Ac082eF159Fe14', '0x6fb7e0AAFBa16396Ad6c1046027717bcA25F821f', -'0x921D8FDF089775D5AC61b2d6e8f34F1edd554D8f', -'0xa8D00712abE7af3446cdC651c159737cCFB43255', '0xed7cb3973C7bFE4bf78dA8E5f52EB04c0dF53d3B', '0x62DE034b1A69eF853c9d0D8a33D26DF5cF26682E', '0x8c8E076Cd7D2A17Ba2a5e5AF7036c2b2B7F790f6', -'0xAbA69f6E893B18bE066a237f723F43315BBF9D9A'], - ownTokens: ['0x385eeac5cb85a38a9a07a70c73e0a3271cfb54a7'], + tokens: [nullAddress, ADDRESSES.polygon.DAI, ADDRESSES.polygon.USDC], + owners: [ + "0xb208f8BB431f580CC4b216826AFfB128cd1431aB", + "0x27DF5C6dcd360f372e23d5e63645eC0072D0C098", + "0x939b67F6F6BE63E09B0258621c5A24eecB92631c", + "0x62DE034b1A69eF853c9d0D8a33D26DF5cF26682E", + "0x8c8E076Cd7D2A17Ba2a5e5AF7036c2b2B7F790f6", + "0x48eA1d45142fC645fDcf78C133Ac082eF159Fe14", + "0x6fb7e0AAFBa16396Ad6c1046027717bcA25F821f", + "0x921D8FDF089775D5AC61b2d6e8f34F1edd554D8f", + "0xa8D00712abE7af3446cdC651c159737cCFB43255", + "0xed7cb3973C7bFE4bf78dA8E5f52EB04c0dF53d3B", + "0x62DE034b1A69eF853c9d0D8a33D26DF5cF26682E", + "0x8c8E076Cd7D2A17Ba2a5e5AF7036c2b2B7F790f6", + "0xAbA69f6E893B18bE066a237f723F43315BBF9D9A", + ], + ownTokens: ["0x385eeac5cb85a38a9a07a70c73e0a3271cfb54a7"], }, -}) \ No newline at end of file +}); diff --git a/projects/treasury/alchemix.js b/projects/treasury/alchemix.js index bc0f2b8cdba6..9faea3c7b1a3 100644 --- a/projects/treasury/alchemix.js +++ b/projects/treasury/alchemix.js @@ -27,10 +27,10 @@ module.exports = treasuryExports({ ADDRESSES.ethereum.CRV, ADDRESSES.ethereum.YFI, "0xa258C4606Ca8206D8aA700cE2143D7db854D168c", - "0x3432B6A60D23Ca0dFCa7761B7ab56459D9C964D0", + ADDRESSES.ethereum.FXS, "0x6c3F90f043a72FA612cbac8115EE7e52BDe6E490", "0xF1bB87563A122211d40d393eBf1c633c330377F9", //xpremia - "0x3432B6A60D23Ca0dFCa7761B7ab56459D9C964D0", + ADDRESSES.ethereum.FXS, "0x7f50786A0b15723D741727882ee99a0BF34e3466" ], owners: [alchemixTreasury, operations_treasury, treasury2, treasury3, treasury4, treasury5], diff --git a/projects/treasury/dexfinance.js b/projects/treasury/dexfinance.js index d336eb63cc5f..db92c5584afd 100644 --- a/projects/treasury/dexfinance.js +++ b/projects/treasury/dexfinance.js @@ -19,10 +19,10 @@ module.exports = treasuryExports({ '0xd56734d7f9979dd94fae3d67c7e928234e71cd4c', //tia '0x0c880f6761f1af8d9aa9c466984b80dab9a8c9e8', //pendle '0x25d887ce7a35172c62febfd67a1856f20faebb00', //pepe - '0xf97f4df75117a78c1a5a0dbb814af92458539fb4', //link - '0xfc5a1a6eb076a2c7ad06ed22c90d7e710e35ad0a', //gmx - '0x912ce59144191c1204e64559fe8253a0e49e6548', //arb - '0x2f2a2543b76a4166549f7aab2e75bef0aefc5b0f', //wbtc + ADDRESSES.arbitrum.LINK, //link + ADDRESSES.arbitrum.GMX, //gmx + ADDRESSES.arbitrum.ARB, //arb + ADDRESSES.arbitrum.WBTC, //wbtc ] }, avax: { @@ -55,7 +55,7 @@ module.exports = treasuryExports({ // owners: [mainTreasury], // tokens: [ // ADDRESSES.pulse.WETH, - // '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', //usdc(fork) + // ADDRESSES.ethereum.USDC, //usdc(fork) // '0x30fcb23a906493371b1721c8feb8815804808d74', //sdai // '0xaa2c47a35c1298795b5271490971ec4874c8e53d', //usdex // '0x6386704cd6f7a584ea9d23ccca66af7eba5a727e', //spark diff --git a/projects/treasury/frax.js b/projects/treasury/frax.js index 744f04050e09..1ceb3a51181a 100644 --- a/projects/treasury/frax.js +++ b/projects/treasury/frax.js @@ -3,7 +3,7 @@ const { nullAddress, treasuryExports } = require("../helper/treasury"); const treasury = "0x9AA7Db8E488eE3ffCC9CdFD4f2EaECC8ABeDCB48"; const fpis = "0xc2544A32872A91F4A553b404C6950e89De901fdb"; -const fxs = "0x3432B6A60D23Ca0dFCa7761B7ab56459D9C964D0"; +const fxs = ADDRESSES.ethereum.FXS; const treasuryarb = "0xe61d9ed1e5dc261d1e90a99304fadcef2c76fd10" module.exports = treasuryExports({ diff --git a/projects/treasury/iq.js b/projects/treasury/iq.js index d7e909d3eed8..caa545cdbd24 100644 --- a/projects/treasury/iq.js +++ b/projects/treasury/iq.js @@ -13,7 +13,7 @@ module.exports = treasuryExports({ "0x9D45081706102E7aadDD0973268457527722E274", ADDRESSES.ethereum.WETH, ADDRESSES.ethereum.WBTC, - "0x3432B6A60D23Ca0dFCa7761B7ab56459D9C964D0", + ADDRESSES.ethereum.FXS, "0xEF9F994A74CB6EF21C38B13553caa2E3E15F69d0" ], owners: [treasury], diff --git a/projects/treasury/jade-protocol.js b/projects/treasury/jade-protocol.js index ca55cdf63ca8..9ea92d434bbc 100644 --- a/projects/treasury/jade-protocol.js +++ b/projects/treasury/jade-protocol.js @@ -19,7 +19,7 @@ module.exports = treasuryExports({ ADDRESSES.ethereum.USDC, ADDRESSES.ethereum.WBTC, ADDRESSES.ethereum.sfrxETH, - '0x3432B6A60D23Ca0dFCa7761B7ab56459D9C964D0', // FXS + ADDRESSES.ethereum.FXS, // FXS ], owners: [treasury, treasury1], }, diff --git a/projects/treasury/mahaxyz.js b/projects/treasury/mahaxyz.js index 4518730cbeeb..511605dca021 100644 --- a/projects/treasury/mahaxyz.js +++ b/projects/treasury/mahaxyz.js @@ -1,4 +1,4 @@ -const { nullAddress, treasuryExports } = require("../helper/treasury"); +const { treasuryExports } = require("../helper/treasury"); const treasury = "0x6357EDbfE5aDA570005ceB8FAd3139eF5A8863CC"; @@ -6,9 +6,11 @@ module.exports = treasuryExports({ ethereum: { owners: [treasury], ownTokens: [ - "0x745407c86DF8DB893011912d3aB28e68B62E49B0", // MAHA - "0xB4d930279552397bbA2ee473229f89Ec245bc365", // MAHA - "0x6b7127a638eDC7Db04bEde220c7c49930fdB4160" // MAHAETH - ] + "0x745407c86DF8DB893011912d3aB28e68B62E49B0", // MAHA + ], + blacklistedTokens: [ + "0xB4d930279552397bbA2ee473229f89Ec245bc365", // MAHA + "0x6b7127a638eDC7Db04bEde220c7c49930fdB4160" // MAHAETH + ], }, -}) \ No newline at end of file +}) diff --git a/projects/treasury/perpetual-protocol.js b/projects/treasury/perpetual-protocol.js index 720990d2d430..6da27dbd951a 100644 --- a/projects/treasury/perpetual-protocol.js +++ b/projects/treasury/perpetual-protocol.js @@ -9,7 +9,7 @@ module.exports = treasuryExports({ ethereum: { tokens: [ nullAddress, - '0x3432B6A60D23Ca0dFCa7761B7ab56459D9C964D0',//FXS + ADDRESSES.ethereum.FXS,//FXS '0xca1207647Ff814039530D7d35df0e1Dd2e91Fa84',//DHT '0x73968b9a57c6E53d41345FD57a6E6ae27d6CDB2F',//SDT '0x1494CA1F11D487c2bBe4543E90080AeBa4BA3C2b',//DPI diff --git a/projects/treasury/railgun.js b/projects/treasury/railgun.js index f303f476c7fd..ef4d5f5acb93 100644 --- a/projects/treasury/railgun.js +++ b/projects/treasury/railgun.js @@ -22,12 +22,12 @@ module.exports = treasuryExports({ ADDRESSES.ethereum.USDC, ADDRESSES.ethereum.USDT, ADDRESSES.ethereum.DAI, - "0x3432B6A60D23Ca0dFCa7761B7ab56459D9C964D0",//fxs + ADDRESSES.ethereum.FXS,//fxs ADDRESSES.ethereum.WSTETH, ADDRESSES.ethereum.CVX, "0xEB4C2781e4ebA804CE9a9803C67d0893436bB27D",//renbtc ADDRESSES.ethereum.cvxCRV, - "0x3432B6A60D23Ca0dFCa7761B7ab56459D9C964D0",//wbtc + ADDRESSES.ethereum.FXS,//wbtc "0x99D8a9C45b2ecA8864373A26D1459e3Dff1e17F3",//mim ADDRESSES.ethereum.LUSD, "0x090185f2135308BaD17527004364eBcC2D37e5F6",//spell @@ -101,7 +101,7 @@ module.exports = treasuryExports({ "0x8f006D1e1D9dC6C98996F50a4c810F17a47fBF19",//nsfw ADDRESSES.fantom.renBTC, "0x9c891326Fd8b1a713974f73bb604677E1E63396D",//islami - "0x45c32fA6DF82ead1e2EF74d17b76547EDdFaFF89",//frax + ADDRESSES.polygon.FRAX,//frax "0xB0B195aEFA3650A6908f15CdaC7D92F8a5791B0B",//bob "0x580A84C73811E1839F75d86d75d88cCa0c241fF4",//qi "0x980111ae1B84E50222C8843e3A7a038F36Fecd2b",//stack diff --git a/projects/treasury/saddle.js b/projects/treasury/saddle.js index 21e629170a46..8eaa74b41d59 100644 --- a/projects/treasury/saddle.js +++ b/projects/treasury/saddle.js @@ -6,7 +6,7 @@ module.exports = treasuryExports({ tokens: [ '0x5575552988a3a80504bbaeb1311674fcfd40ad4b', '0x2cab3abfc1670d1a452df502e216a66883cdf079', - '0x17fc002b466eec40dae837fc4be5c67993ddbd6f', + ADDRESSES.arbitrum.FRAX, ADDRESSES.arbitrum.USDC, ], owners: ['0x8e6e84ddab9d13a17806d34b097102605454d147'], diff --git a/projects/treasury/silo-finance.js b/projects/treasury/silo-finance.js index 169f4f5fbb19..790fdb9f0fc8 100644 --- a/projects/treasury/silo-finance.js +++ b/projects/treasury/silo-finance.js @@ -38,7 +38,7 @@ module.exports = mergeExports([ ADDRESSES.ethereum.CRV, // CRV ADDRESSES.ethereum.CRVUSD, // crvUSD "0xc944E90C64B2c07662A292be6244BDf05Cda44a7", // GRT - "0x3432B6A60D23Ca0dFCa7761B7ab56459D9C964D0" // FXS + ADDRESSES.ethereum.FXS // FXS ], owners: ETHEREUM_MAINNET_TREASURIES, ownTokens: [SILO_ETHEREUM_MAINNET, XAI_ETHEREUM_MAINNET], diff --git a/projects/treasury/venus.js b/projects/treasury/venus.js index 2098881e8064..6933612a32f8 100644 --- a/projects/treasury/venus.js +++ b/projects/treasury/venus.js @@ -18,7 +18,7 @@ module.exports = treasuryExports({ ADDRESSES.bsc.BETH, //BETH ADDRESSES.bsc.WBNB, venusBTC, - "0x2170Ed0880ac9A755fd29B2688956BD959F933F8", //eth + ADDRESSES.bsc.ETH, //eth "0xecA88125a5ADbe82614ffC12D0DB554E2e2867C8", // venusUSDC "0xf508fCD89b8bd15579dc79A6827cB4686A3592c8", // venusETH "0xfD5840Cd36d94D7229439859C0112a4185BC0255", // venusUSDT @@ -37,10 +37,10 @@ module.exports = treasuryExports({ "0x3EE2200Efb3400fAbB9AacF31297cBdD1d435D47", //ada "0xF8A0BF9cF54Bb92F17374d9e9A321E6a111a51bD", //link "0xbA2aE424d960c26247Dd6c32edC70B295c744C43", //doge - "0x40af3827F39D0EAcBF4A168f8D4ee67c121D11c9", //tusd + ADDRESSES.bsc.TUSD, //tusd "0x0D8Ce2A99Bb6e3B7Db580eD848240e4a0F9aE153", //fil "0xCC42724C6683B7E57334c4E856f4c9965ED682bD", //matic - "0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56", //busd + ADDRESSES.bsc.BUSD, //busd "0x52F24a5e03aee338Da5fd9Df68D2b6FAe1178827", //ankrbnb "0xCE7de646e7208a4Ef112cb6ed5038FA6cC6b12e3", //trx "0x352Cb5E19b12FC216548a2677bD0fce83BaE434B", //btt diff --git a/projects/treasury/zunami.js b/projects/treasury/zunami.js index fe860711528e..ed61bfd4fc15 100644 --- a/projects/treasury/zunami.js +++ b/projects/treasury/zunami.js @@ -15,7 +15,7 @@ module.exports = treasuryExports({ ADDRESSES.ethereum.CVX, ADDRESSES.ethereum.vlCVX, "0x73968b9a57c6E53d41345FD57a6E6ae27d6CDB2F", // SDT - "0x3432B6A60D23Ca0dFCa7761B7ab56459D9C964D0" // FXS + ADDRESSES.ethereum.FXS // FXS ], owners: [treasury], ownTokens: [ZUN] diff --git a/projects/typhoon.js b/projects/typhoon.js index e919f9fe1edb..6fb3199e55e6 100644 --- a/projects/typhoon.js +++ b/projects/typhoon.js @@ -1,21 +1,9 @@ -const ADDRESSES = require('./helper/coreAssets.json') -const sdk = require('@defillama/sdk'); +const { sumTokensExport, nullAddress } = require('./helper/unwrapLPs'); const tornado = '0x9cDb933eDab885bB767658B9ED5C3800bc1d761B'; const reserve = '0xC9B4Dff1ce5384C7014579099e63EA0092e14eD5'; -const weth = ADDRESSES.ethereum.WETH; - -async function tvl(timestamp, block) { - return { [weth] : Number((await sdk.api.eth.getBalance({ - target: tornado, - block - })).output) + Number((await sdk.api.eth.getBalance({ - target: reserve, - block - })).output)}; -} module.exports = { - ethereum: { - tvl - } + ethereum: { + tvl: sumTokensExport({ tokens: [nullAddress], owners: [tornado, reserve], }) + } }; \ No newline at end of file diff --git a/projects/ufarm-digital/index.js b/projects/ufarm-digital/index.js new file mode 100644 index 000000000000..be9f3a79ab70 --- /dev/null +++ b/projects/ufarm-digital/index.js @@ -0,0 +1,45 @@ +const ADDRESSES = require('../helper/coreAssets.json') +const { getConfig } = require('../helper/cache') + +const { getLogs2 } = require('../helper/cache/getLogs') +const { sumTokens2 } = require('../helper/unwrapLPs') +const config = { + arbitrum: { + fromBlock: 211275856, + ufarmCore: '0x46Df84E70deDB8a17eA859F1B07B00FB83b8a81F', + valueToken: ADDRESSES.arbitrum.USDT, + endpoint: 'https://api.ufarm.digital/api/v1/pool?limit=500', + blacklistedTokens: ['0xc36442b4a4522e871399cd717abdd847ab11fe88'], // uni v3 NFT + }, +} + +module.exports = { + methodology: 'Counts the AUM of all pools registered in the UFarm Protocol', +} + +Object.keys(config).forEach(chain => { + const { ufarmCore, valueToken, fromBlock, endpoint } = config[chain] + module.exports[chain] = { + tvl: async (api) => { + const { data } = await getConfig('ufarm-digital/' + api.chain, endpoint) + const ownerTokens = data.map(i => [i.assetAllocation.map(i => i.asset), i.poolAddress]) + return sumTokens2({ api, ownerTokens, resolveLP: true, resolveUniV3: true, owners: ownerTokens.map(i => i[1]) }) + + /* const logs = await getLogs2({ + api, + factory: ufarmCore, + eventAbi: 'event FundCreated(bytes32 indexed,uint256,address fund)', + fromBlock, + }) + const funds = logs.map(log => log.fund) + const pools = (await Promise.all(funds.map(fund => getLogs2({ + api, + factory: fund, + eventAbi: 'event PoolCreated(string,string,uint256,uint256,uint256,uint256,uint256,uint256,address pool,address)', + fromBlock, + })))).flat().map(i => i.pool) + const values = await api.multiCall({ abi: 'uint256:getTotalCost', calls: pools}) + api.addTokens(valueToken, values) */ + } + } +}) diff --git a/projects/umoja/index.js b/projects/umoja/index.js new file mode 100644 index 000000000000..9d749591da38 --- /dev/null +++ b/projects/umoja/index.js @@ -0,0 +1,16 @@ +const Address = require("../helper/coreAssets.json"); +const Http = require("../helper/http"); +const token = Address.arbitrum.USDC_CIRCLE + +module.exports = { + timetravel: false, + misrepresentedTokens: true, + arbitrum: { + tvl: async function (api) { + const data = await Http.get("https://api.protocol.umoja.xyz/tokens/tvl/d-llama"); + + for (const entry of data) + if (entry.currency == "USDC") api.add(token, entry.tvl * 1e6) + } + } +}; \ No newline at end of file diff --git a/projects/unagii.js b/projects/unagii.js index 20408950cae9..5ace1a038ae4 100644 --- a/projects/unagii.js +++ b/projects/unagii.js @@ -1,9 +1,4 @@ -const sdk = require('@defillama/sdk') -const { getChainTransform } = require('./helper/portedTokens') -const chain = 'ethereum' - -async function tvl(_, block) { - const transform = await getChainTransform(chain) +async function tvl(api) { const vaults = [ '0x4aD0b81f92B16624BBcF46FC0030cFBBf8d02376', '0xBc5991cCd8cAcEba01edC44C2BB9832712c29cAB', @@ -20,38 +15,15 @@ async function tvl(_, block) { '0xDe07f45688cb6CfAaC398c1485860e186D55996D', ] - const { output: minters } = await sdk.api.abi.multiCall({ - abi: abi.minter, - calls: v2Vaults.map(i => ({ target: i })), - chain, block, - }) - - minters.forEach(({ output }) => vaults.push(output)) - - const { output: tokens } = await sdk.api.abi.multiCall({ - abi: abi.token, - calls: vaults.map(i => ({ target: i })), - chain, block, - }) - - const { output: totalAssets } = await sdk.api.abi.multiCall({ - abi: abi.totalAssets, - calls: vaults.map(i => ({ target: i })), - chain, block, - }) - const balances = {} - tokens.forEach(({ output }, i) => sdk.util.sumSingleBalance(balances, transform(output), totalAssets[i].output)) - return balances + const minters = await api.multiCall({ abi: "address:minter", calls: v2Vaults}) + vaults.push(...minters) + const tokens = await api.multiCall({ abi: 'address:token', calls: vaults}) + const bals = await api.multiCall({ abi: 'uint256:totalAssets', calls: vaults}) + api.add(tokens, bals) } module.exports = { ethereum: { tvl } -} - -const abi = { - minter: "address:minter", - token: "address:token", - totalAssets: "uint256:totalAssets", } \ No newline at end of file diff --git a/projects/unibtc/index.js b/projects/unibtc/index.js new file mode 100644 index 000000000000..d6ec58d87706 --- /dev/null +++ b/projects/unibtc/index.js @@ -0,0 +1,41 @@ +const ADDRESSES = require('../helper/coreAssets.json') +const defaultVault = '0xF9775085d726E782E83585033B58606f7731AB18' + +const config = { + ethereum: { + vault: '0x047D41F2544B7F63A8e991aF2068a363d210d6Da', + tokens: [ADDRESSES['ethereum'].WBTC, '0xc96de26018a54d51c097160568752c4e3bd6c364'] + }, + optimism: { + vault: defaultVault, + tokens: [ADDRESSES['optimism'].WBTC] + }, + mantle: { + vault: defaultVault, + tokens: ['0xC96dE26018A54D51c097160568752c4E3BD6C364'] + }, + bsquared: { + vault: defaultVault, + tokens: [ADDRESSES.null,ADDRESSES['bsquared'].WBTC] + }, + merlin: { + vault: defaultVault, + tokens: [ADDRESSES.null,ADDRESSES['merlin'].WBTC,ADDRESSES['merlin'].WBTC_1] + }, + btr: { + vault: defaultVault, + tokens: [ADDRESSES.null, ADDRESSES['btr'].WBTC] + }, +} + +const tvl = (chainConfig) => { + return async (api) => { + return api.sumTokens({ tokens: chainConfig.tokens, owner: chainConfig.vault }) + } +} + +Object.keys(config).forEach(chain => { + module.exports[chain] = { + tvl: tvl(config[chain]) + } +}) diff --git a/projects/valuedefi.js b/projects/valuedefi.js index 71df0f560268..289eeec2832b 100644 --- a/projects/valuedefi.js +++ b/projects/valuedefi.js @@ -18,42 +18,20 @@ const bscDexTVL = getUniTVL({ useDefaultCoreAssets: true, }) -async function bscStableSwapTvl(_, _b, { bsc: block }) { - const chain = 'bsc' - const { output: poolLength } = await sdk.api.abi.call({ - target: stableSwapFactory, - abi: abis.allPoolsLength, - chain, block, - }) - - const params = createIncrementArray(poolLength).map(i => ({ params: i })) - - const { output: pools } = await sdk.api.abi.multiCall({ - target: stableSwapFactory, - abi: abis.allPools, - calls: params, - chain, block, - }) +async function bscStableSwapTvl(api) { + const pools = await api.fetchList({ lengthAbi: 'allPoolsLength', itemAbi: 'allPools', target: stableSwapFactory}) - const { output: tokenLength } = await sdk.api.abi.multiCall({ - abi: abis.getTokenLength, - calls: pools.map(i => ({ target: i.output })), - chain, block, - }) + const tokenLength = await api.multiCall({ abi: abis.getTokenLength, calls: pools, }) const tokenCalls = [] - tokenLength.forEach(i => { - createIncrementArray(i.output).forEach(j => tokenCalls.push({ target: i.input.target, params: j })) + tokenLength.forEach((i, idx) => { + createIncrementArray(i).forEach(j => tokenCalls.push({ target: pools[idx], params: j })) }) - const { output: tokens } = await sdk.api.abi.multiCall({ - abi: abis.getToken, - calls: tokenCalls, - chain, block, - }) + const tokens = await api.multiCall({ abi: abis.getToken, calls: tokenCalls, }) - const toa = tokens.map(i => ([i.output, i.input.target])) - return sumTokens2({ tokensAndOwners: toa, chain, block }) + const toa = tokens.map((i, idx) => ([i, tokenCalls[idx].target])) + return sumTokens2({ tokensAndOwners: toa, api}) } module.exports = { diff --git a/projects/vaultka/index.js b/projects/vaultka/index.js index 9aa974756c60..b314fd6ffe13 100644 --- a/projects/vaultka/index.js +++ b/projects/vaultka/index.js @@ -1,6 +1,7 @@ //import utils const ADDRESSES = require("../helper/coreAssets.json"); const { staking } = require("../helper/staking"); +const { getProvider, getTokenBalance, sumTokens2 } = require("../helper/solana"); // 19/12/2023 ALP Leverage Vault // 29/11/2023 GMXV2 Leverage(Neutral) Vault // 12/11/2023 GLP Compound Vault @@ -21,6 +22,25 @@ module.exports = { [1707385004, "GLM(basket of GMs)"], ], + solana: { + tvl: async (api) => { + const lendingSol = "DMhoXyVNpCFeCEfEjEQfS6gzAEcPUUSXM8Xnd2UXJfiS"; + const jupSol = "jupSoLaHXQiZZTSfEWMTRRgpnyFm8f6sZdosWBjx93v"; + const jitoSol = "J1toso1uCk3RLmjorhTtrVwY9HJ7X8V9yYac6Y7kGCPn"; + const jupSolProgram = "6j6Fwxf7UzfaXqQA2QraWGEAYUYzjjZP3t6ChzjzkmL9"; + const jitoSolProgram = "6MAnq2z4ww8nnvfd8sec4sRMhTEdsdZXB1FLgqaYsg4d"; + + return sumTokens2({ + owner: lendingSol, + tokensAndOwners: [ + [jupSol, jupSolProgram], + [jitoSol, jitoSolProgram], + ], + solOwners: [lendingSol], + }); + }, + }, + arbitrum: { tvl: async (api) => { const vaults = [ diff --git a/projects/velhalla.js b/projects/velhalla.js index 7c4ceb9579b7..be54a03c1f3f 100644 --- a/projects/velhalla.js +++ b/projects/velhalla.js @@ -1,24 +1,8 @@ -const ADDRESSES = require('./helper/coreAssets.json') -const sdk = require("@defillama/sdk"); -const owner = "0x7DeD7f9D3dF541190F666FB6897483e46D54e948"; -const target = ADDRESSES.velas.SCAR; - -async function staking(timestamp, block, chainBlocks) { - return { - [`bsc:${target}`]: ( - await sdk.api.erc20.balanceOf({ - target, - owner, - block: chainBlocks.velas, - chain: "velas", - }) - ).output, - }; -} +const { staking } = require('./helper/staking') module.exports = { velas: { tvl: () => ({}), - staking, + staking: staking('0x7DeD7f9D3dF541190F666FB6897483e46D54e948', '0x8d9fb713587174ee97e91866050c383b5cee6209'), }, -}; \ No newline at end of file +} \ No newline at end of file diff --git a/projects/velo/index.js b/projects/velo/index.js new file mode 100644 index 000000000000..172b47fed802 --- /dev/null +++ b/projects/velo/index.js @@ -0,0 +1,44 @@ +const { getUniTVL } = require('../helper/unknownTokens') + +const AprFixLockedAddresses = [ + "0x5e10B2247a430f97c94205894B9185F687A32345", + "0x13c5C83cf9B9aC68FA18272B756Bce1635196132", + "0x022af5ce19720a938Ba8C9E66FdF1Da1606298eF", + "0x37cCcC19acAB91E8bC6074Cb4EaaFef1185ee1Bb", + "0x051bB49EdB865Bb4cC9277BbB132C922403B07e4", + "0x2703E5D3709782e85957E40a9c834AFD4D45caF9", + "0x5935DC3250a0d8a0aC7c2e4AB925C4FEf2F8FDf8", + "0x59098E3c6C5Bcbecb4117C6eF59b341d1F0F3083", + "0xDa000FA80C5E9cb4E24a66bFF6a56cC454422e78", + "0xEfA6EAbcb5fa35827DDB236046B3DDB6d257022B", + "0xc12A93bf62CfD50620BCfDDD903913903DF647B4", + "0xc322a2110958c1365e88D88aef65Ebdf335b6E67" +]; + +const AprFixLockWithChangeableRatioTvl = [ + "0xEF03B465A6D7baDF8727819104d29F0405d1Ce65" +] + +const OldFarmContractAddress = "0x33472144Eaa7540E7badA5a1ab7Da372e48a9252" +const CurrentFarmContractAddress = "0xDD3e2da1d017A564b8225bc8e92f2970cfa61945" + +const VELO = '0xf486ad071f3bee968384d2e39e2d8af0fcf6fd46' + +async function staking(api) { + const totalStaked = await api.multiCall({ abi: 'uint256:totalStaked', calls: AprFixLockedAddresses.concat(AprFixLockWithChangeableRatioTvl) }) + api.add(VELO, totalStaked) + const tokens = [ + "0x3c8EC1728C080f76dc83baA5d51A0cC367B4A35F", // VELO_DEPRECATED_TOKEN + "0xf486ad071f3bee968384d2e39e2d8af0fcf6fd46", // VELO_TOKEN + "0xC2d4A3709e076A7A3487816362994a78ddaeabB6", // EVRY_TOKEN + ] + return api.sumTokens({ owners: [OldFarmContractAddress, CurrentFarmContractAddress], tokens }) +} + +module.exports = { + methodology: 'Sums the total value locked of all farms and locked pools in Velo Finance.', + bsc: { + tvl: getUniTVL({ factory: '0xa328180188a30feF1d82c9FC916E627DB6E17238', blacklistedTokens: [VELO] }), + staking, + }, +}; diff --git a/projects/vertex/index.js b/projects/vertex/index.js index e82cca2d13ca..34acb291b6b3 100644 --- a/projects/vertex/index.js +++ b/projects/vertex/index.js @@ -21,6 +21,16 @@ const mantleConfig = { "perpEngine": "0x38080ee5fb939d045A9e533dF355e85Ff4f7e13D" } +const seiConfig = { + "querier": "0xecc3dE1cD86CB07c3763D21A45041791574964C2", + //"feeCalculator": "", + "clearinghouse": "0xaE1510367aA8d500bdF507E251147Ea50B22307F", + "clearinghouseLiq": "0xa1a457b7bba489c3434D9Cb44b88101354CCF192", + "endpoint": "0x2777268EeE0d224F99013Bc4af24ec756007f1a6", + "spotEngine": "0x3E113cde3D6309e9bd45Bf7E273ecBB8b50ca127", + "perpEngine": "0x0F54f46979C62aB73D03Da60eBE044c8D63F724f" +} + module.exports = { arbitrum: { @@ -34,5 +44,11 @@ module.exports = { owners: [mantleConfig.clearinghouse, mantleConfig.endpoint], tokens: ["0xcDA86A272531e8640cD7F1a92c01839911B90bb0", ADDRESSES.mantle.USDC, ADDRESSES.mantle.WETH, ADDRESSES.mantle.WMNT], }) + }, + sei: { + tvl: sumTokensExport({ + owners: [seiConfig.clearinghouse, seiConfig.endpoint], + tokens: [ADDRESSES.sei.USDC, ADDRESSES.sei.USDT], + }) } } \ No newline at end of file diff --git a/projects/vesq/index.js b/projects/vesq/index.js index 01cf8e6b395a..78916b6cd3ff 100644 --- a/projects/vesq/index.js +++ b/projects/vesq/index.js @@ -8,7 +8,7 @@ const treasuryTokens = [ [ADDRESSES.polygon.DAI, false], //DAI ["0x2e1ad108ff1d8c782fcbbb89aad783ac49586756", false], //TUSD ["0xa3fa99a148fa48d14ed51d610c367c61876997f1", false], //MAI - ["0x45c32fa6df82ead1e2ef74d17b76547eddfaff89", false], //FRAX + [ADDRESSES.polygon.FRAX, false], //FRAX ["0x692597b009d13c4049a947cab2239b7d6517875f", false], //UST ["0x27f8d03b3a2196956ed754badc28d73be8830a6e", false], //amDAI ["0xd8cA34fd379d9ca3C6Ee3b3905678320F5b45195", false], //gOHM diff --git a/projects/vesu/index.js b/projects/vesu/index.js index 2e85366489a4..665a01f14ff8 100644 --- a/projects/vesu/index.js +++ b/projects/vesu/index.js @@ -1,3 +1,4 @@ +const ADDRESSES = require('../helper/coreAssets.json') const { multiCall, sumTokens } = require("../helper/chain/starknet"); const { abi, allAbi } = require("./abi"); @@ -5,12 +6,12 @@ const INTERNAL_SCALE = 10 ** 18; const SINGLETON = "0x02545b2e5d519fc230e9cd781046d3a64e092114f07e44771e0d719d148725ef"; const POOL_ID = "0x4dc4f0ca6ea4961e4c8373265bfd5317678f4fe374d76f3fd7135f57763bf28"; const ASSETS = [ - "0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7", - "0x03fe2b97c1fd336e750087d68b9b867997fd64a2661ff3ca5a7c771641e8e7ac", - "0x053c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8", - "0x068f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8", - "0x042b8f0484674ca266ac5d08e4ac6a3fe65bd3129795def2dca5c34ecc5f96d2", - "0x04718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d", + ADDRESSES.starknet.ETH, + ADDRESSES.starknet.WBTC, + ADDRESSES.starknet.USDC, + ADDRESSES.starknet.USDT, + ADDRESSES.starknet.WSTETH, + ADDRESSES.starknet.STRK, ]; async function tvl(api) { diff --git a/projects/vfat/index.js b/projects/vfat/index.js index 5fcc39dd58d1..45dfe145ae3d 100644 --- a/projects/vfat/index.js +++ b/projects/vfat/index.js @@ -321,3 +321,5 @@ Object.keys(config).forEach(chain => { module.exports[chain] = { tvl } }) + +module.exports.isHeavyProtocol = true diff --git a/projects/visor/config.js b/projects/visor/config.js index 69ab6e93011e..2135640455ee 100644 --- a/projects/visor/config.js +++ b/projects/visor/config.js @@ -114,6 +114,7 @@ const HYPE_REGISTRY = { ], scroll: [ ["0x683292172E2175bd08e3927a5e72FC301b161300", 4651930], // Uniswap + ["0x0B79d5117dd22eDC1e5F2649aC32746aF7Ca3445", 8111003], // Scribe ], blast: [ ["0xFc13Ebe7FEB9595D70195E9168aA7F3acE153621", 1727054], // Uniswap @@ -135,6 +136,9 @@ const HYPE_REGISTRY = { ["0x683292172E2175bd08e3927a5e72FC301b161300", 6414342], // Uniswap ["0xC27DDd78FC49875Fe6F844B72bbf31DFBB099881", 6414350], // Sushiswap ], + iotaevm: [ + ["0xF44cECB1CF40ee12303E85Eb8651263c01812EaD", 223591], // wagmi + ], }; Object.keys(HYPE_REGISTRY).forEach(chain => { diff --git a/projects/waxfusion/index.js b/projects/waxfusion/index.js new file mode 100644 index 000000000000..4dba2e750e40 --- /dev/null +++ b/projects/waxfusion/index.js @@ -0,0 +1,18 @@ +const { get_account_tvl } = require("../helper/chain/eos"); + +// WaxFusion +// https://waxfusion.io +async function wax() { + const accounts = ["dapp.fusion", "pol.fusion", "cpu1.fusion", "cpu2.fusion", "cpu3.fusion"]; + const tokens = [ + ["eosio.token", "WAX", "wax"] + ]; + return await get_account_tvl(accounts, tokens, "wax"); +} + +module.exports = { + methodology: `WaxFusion TVL is achieved by querying token balances from liquid staking contracts`, + wax: { + tvl: wax + }, +} \ No newline at end of file diff --git a/projects/wing.js b/projects/wing.js index b68791d482dd..0d8e4c5aa2e6 100644 --- a/projects/wing.js +++ b/projects/wing.js @@ -69,7 +69,7 @@ module.exports = mergeExports([ ADDRESSES.ethereum.WETH, '0x5d3a536E4D6DbD6114cc1Ead35777bAB948E3643', '0x39AA39c021dfbaE8faC545936693aC917d5E7563', - '0xdAC17F958D2ee523a2206206994597C13D831ec7', + ADDRESSES.ethereum.USDT, '0x70e36f6BF80a52b3B46b3aF8e106CC0ed743E8e4', '0xc00e94Cb662C3520282E6f5717214004A7f26888', '0x4Ddc2D193948926D02f9B1fE9e1daa0718270ED5', diff --git a/projects/wonderland/index.js b/projects/wonderland/index.js index 10028e4ccf44..023a1f9903d4 100644 --- a/projects/wonderland/index.js +++ b/projects/wonderland/index.js @@ -44,7 +44,7 @@ async function ethTvl(timestamp, ethBlock, chainBlocks) { balances, [ [ADDRESSES.ethereum.LUSD, false], - ["0x3432B6A60D23Ca0dFCa7761B7ab56459D9C964D0", false], // FRAX + [ADDRESSES.ethereum.FXS, false], // FRAX [ADDRESSES.ethereum.CVX, false], [ADDRESSES.ethereum.cvxCRV, false], ["0x55C08ca52497e2f1534B59E2917BF524D4765257", false], // UwU diff --git a/projects/xrpl-dex/app.js b/projects/xrpl-dex/app.js index 4faf69b22a00..178092d168c5 100644 --- a/projects/xrpl-dex/app.js +++ b/projects/xrpl-dex/app.js @@ -111,7 +111,7 @@ const getAllPoolsReserves = async (poolAddresses, atLedgerIndex) => { }); }); if (errors.length > 0) - throw new Error(errors) + throw new Error(errors[0]) return poolsWithReserves } @@ -131,15 +131,15 @@ async function main() { const cacheKey = 'cache' let { allPools, lastPoolUpdate, lastDataUpdate, tvl } = await getCache(projectKey, cacheKey) if (!lastPoolUpdate || timeNow - lastPoolUpdate > 3 * aDayInSeconds) { - try { + // try { console.time("xrpl-dex fetch pool list"); allPools = await discoverPools(null, 1); console.timeEnd("xrpl-dex fetch pool list"); lastPoolUpdate = getTimeNow(); await setCache(projectKey, cacheKey, { allPools, lastPoolUpdate, lastDataUpdate, tvl }) - } catch (e) { - console.error(e) - } + // } catch (e) { + // console.error(e) + // } } if (lastDataUpdate && timeNow - lastDataUpdate < 2 * 60 * 60) { // data was updated recently, no need to update diff --git a/projects/xy-finance/index.js b/projects/xy-finance/index.js index 307d67cbecb6..7124d5d4d7d3 100644 --- a/projects/xy-finance/index.js +++ b/projects/xy-finance/index.js @@ -145,14 +145,16 @@ const yPoolDepositContract = { "contractAddress": "0xEC8476DCC72b4AB6Cbc3C2bD7f50A15891485fDB", "tokenAddress": "0xA2ae6273Dd65F9fA76C3d383eDe9c1261e025DAC" }, - "DBX": { - "contractAddress": "0x812e9eE2437a3e4FE0A4A4A7f195536844301f07", - "tokenAddress": "0x061E31e7768b39a4282822b65569F8d814dC15f6" - }, - "DBC": { - "contractAddress": "0xD99995b63F44fc500B702251262B7d9f35adA0BC", - "tokenAddress": "0x730B05d100EeFb92f04016C6c0cF6f2bBB2C3A57" - }, + // DBX is already counted from DBX tvl on Arbitrum since its just a mint on Cronos + // "DBX": { + // "contractAddress": "0x812e9eE2437a3e4FE0A4A4A7f195536844301f07", + // "tokenAddress": "0x061E31e7768b39a4282822b65569F8d814dC15f6" + // }, + // DBC is already counted from DBC tvl on Arbitrum since its just a mint on Cronos + // "DBC": { + // "contractAddress": "0xD99995b63F44fc500B702251262B7d9f35adA0BC", + // "tokenAddress": "0x730B05d100EeFb92f04016C6c0cF6f2bBB2C3A57" + // }, "SINGLE": { "contractAddress": "0x9A4cC214782Fea5880394eFDE60187797a2FEF01", "tokenAddress": "0x0804702a4E749d39A35FDe73d1DF0B1f1D6b8347" @@ -161,14 +163,20 @@ const yPoolDepositContract = { "contractAddress": "0x58F29F7d759aef5B8e34C8e4152d6117893017aB", "tokenAddress": "0xae620DC4B9b6e44FBeb4a949F63AC957Cc43b5dD" }, - "LLT": { - "contractAddress": "0x141E379505C3b89C5BBE4Bd2353f12CA4681e3D2", - "tokenAddress": "0x92073dE2706eB8f0265998bCf7B8F751e1349b8F" - }, + // LLT is already counted from LLT tvl on Polygon since its just a mint on Cronos + // "LLT": { + // "contractAddress": "0x141E379505C3b89C5BBE4Bd2353f12CA4681e3D2", + // "tokenAddress": "0x92073dE2706eB8f0265998bCf7B8F751e1349b8F" + // }, "RIP": { "contractAddress": "0xd15f36e89e08A67AEe910629fCe9aBA7D2e8Ac80", "tokenAddress": "0x34aceA6Cc02578aF041a5E976b7289ca23cCB7A8" + }, + "STUCK": { + "contractAddress": "0xc1Ae654b7D9C6a2Cfb0f97254AB5246AAbd2Ce7b", + "tokenAddress": "0xa0D445dC147f598d63518b5783CA97Cd8Bd9f5Bc" } + }, "56": { "ETH": { @@ -211,10 +219,11 @@ const yPoolDepositContract = { "contractAddress": "0xf4137e5D07b476e5A30f907C3e31F9FAAB00716b", "tokenAddress": ADDRESSES.polygon.USDC }, - "BLU": { - "contractAddress": "0x7C1C974367Ee28D3d7aBb088f5FCd748B3759EA4", - "tokenAddress": "0x759d34685468604c695De301ad11A9418e2f1038", - }, + // BLU is already counted from BLU tvl on Cronos since its just a mint on Polygon + // "BLU": { + // "contractAddress": "0x7C1C974367Ee28D3d7aBb088f5FCd748B3759EA4", + // "tokenAddress": "0x759d34685468604c695De301ad11A9418e2f1038", + // }, "CANDY": { "contractAddress": "0x5Bd40e579Cb7D37784689044E6C7c333E2E300e6", "tokenAddress": "0x54E53ed24C12c1d3Df7D653587E2f27d3FbaE3d2", @@ -269,10 +278,11 @@ const yPoolDepositContract = { "contractAddress": "0x680ab543ACd0e52035E9d409014dd57861FA1eDf", "tokenAddress": ADDRESSES.arbitrum.USDC }, - "DBF": { - "contractAddress": "0xa1fB1F1E5382844Ee2D1BD69Ef07D5A6Abcbd388", - "tokenAddress": "0x38A896c29Eb54c566A3fD593f559174520Dc6F75" - }, + // DBF is already counted from DBF tvl on Cronos since its just a mint on Arbitrum + // "DBF": { + // "contractAddress": "0xa1fB1F1E5382844Ee2D1BD69Ef07D5A6Abcbd388", + // "tokenAddress": "0x38A896c29Eb54c566A3fD593f559174520Dc6F75" + // }, "DBX": { "contractAddress": "0x156C04ca75f11817DdbF887692990F3E46e8982B", "tokenAddress": "0x0b257fe969d8782fAcb4ec790682C1d4d3dF1551" @@ -389,14 +399,21 @@ const yPoolDepositContract = { "contractAddress": "0xd15f36e89e08A67AEe910629fCe9aBA7D2e8Ac80", "tokenAddress": ADDRESSES.base.USDbC }, - "LOOT": { - "contractAddress": "0x141E379505C3b89C5BBE4Bd2353f12CA4681e3D2", - "tokenAddress": "0x94a42083948d86432246eAD625B30d49014A4BFF" - }, - "RIP": { - "contractAddress": "0x0790eF241DC85Adf32998aae5E5738579c417701", - "tokenAddress": "0x34aceA6Cc02578aF041a5E976b7289ca23cCB7A8" - } + // LOOT is already counted from LOOT tvl on Ethereum since its just a mint on Base + // "LOOT": { + // "contractAddress": "0x141E379505C3b89C5BBE4Bd2353f12CA4681e3D2", + // "tokenAddress": "0x94a42083948d86432246eAD625B30d49014A4BFF" + // }, + // RIP is already counted from RIP tvl on Cronos since its just a mint on Base + // "RIP": { + // "contractAddress": "0x0790eF241DC85Adf32998aae5E5738579c417701", + // "tokenAddress": "0x34aceA6Cc02578aF041a5E976b7289ca23cCB7A8" + // }, + // STUCK is already counted from STUCK tvl on Cronos since its just a mint on Base + // "STUCK": { + // "contractAddress": "0xc1Ae654b7D9C6a2Cfb0f97254AB5246AAbd2Ce7b", + // "tokenAddress": "0xa0D445dC147f598d63518b5783CA97Cd8Bd9f5Bc" + // } }, "5000": { "ETH": { @@ -411,10 +428,11 @@ const yPoolDepositContract = { "contractAddress": "0x0241fb446d6793866245b936F2C3418F818bDcD3", "tokenAddress": ADDRESSES.mantle.USDT }, - "LOOT": { - "contractAddress": "0x141E379505C3b89C5BBE4Bd2353f12CA4681e3D2", - "tokenAddress": "0x94a42083948d86432246eAD625B30d49014A4BFF" - } + // LOOT is already counted from LOOT tvl on Ethereum since its just a mint on Mantle + // "LOOT": { + // "contractAddress": "0x141E379505C3b89C5BBE4Bd2353f12CA4681e3D2", + // "tokenAddress": "0x94a42083948d86432246eAD625B30d49014A4BFF" + // } }, "534352": { "ETH": { @@ -431,10 +449,11 @@ const yPoolDepositContract = { "contractAddress": "0xFa77c2DecCB21ACb9Bf196408Bf6aD5973D07762", "tokenAddress": ethAddress }, - "LOOT": { - "contractAddress": "0xD95841e7eC6b61f708829B57a3433C3Fd24B2A8c", - "tokenAddress": "0x1C559a960aE5293eA56C40EFC3c0169B413DDcF3" - } + // LOOT is already counted from LOOT tvl on Ethereum since its just a mint on Blast + // "LOOT": { + // "contractAddress": "0xD95841e7eC6b61f708829B57a3433C3Fd24B2A8c", + // "tokenAddress": "0x1C559a960aE5293eA56C40EFC3c0169B413DDcF3" + // } }, "196": { "ETH": { @@ -457,22 +476,26 @@ const yPoolDepositContract = { } }, "6699": { - "USDC": { - "contractAddress": "0xd15f36e89e08A67AEe910629fCe9aBA7D2e8Ac80", - "tokenAddress": "0xcE8f4E26e2532A78DAcD7A497A1827692b14b31D" - }, - "ETH": { - "contractAddress": "0x4F19699cb57543B76167b7d38040f34db4d11fEC", - "tokenAddress": "0x7e6ecF974310d75325Ab1209253250aC7fCCe09b" - }, - "PEPE": { - "contractAddress": "0x0790eF241DC85Adf32998aae5E5738579c417701", - "tokenAddress": "0x4aE774bF3dEfF2eaD31D5D51Aa636EE216fBE274" - }, - "MOG": { - "contractAddress": "0x141E379505C3b89C5BBE4Bd2353f12CA4681e3D2", - "tokenAddress": "0xfaffa4b4D8538A2ba63bEa39ACbF709E3A972714" - }, + // USDC is already counted from USDC tvl on Base since its just a mint on OxChain + // "USDC": { + // "contractAddress": "0xd15f36e89e08A67AEe910629fCe9aBA7D2e8Ac80", + // "tokenAddress": "0xcE8f4E26e2532A78DAcD7A497A1827692b14b31D" + // }, + // ETH is already counted from ETH tvl on Base since its just a mint on OxChain + // "ETH": { + // "contractAddress": "0x4F19699cb57543B76167b7d38040f34db4d11fEC", + // "tokenAddress": "0x7e6ecF974310d75325Ab1209253250aC7fCCe09b" + // }, + // PEPE is already counted from PEPE tvl on Ethereum since its just a mint on OxChain + // "PEPE": { + // "contractAddress": "0x0790eF241DC85Adf32998aae5E5738579c417701", + // "tokenAddress": "0x4aE774bF3dEfF2eaD31D5D51Aa636EE216fBE274" + // }, + // MOG is already counted from MOG tvl on Ethereum since its just a mint on OxChain + // "MOG": { + // "contractAddress": "0x141E379505C3b89C5BBE4Bd2353f12CA4681e3D2", + // "tokenAddress": "0xfaffa4b4D8538A2ba63bEa39ACbF709E3A972714" + // }, // "BITCOIN": { // "contractAddress": "0xD95841e7eC6b61f708829B57a3433C3Fd24B2A8c", // "tokenAddress": "0x92073dE2706eB8f0265998bCf7B8F751e1349b8F" diff --git a/projects/zklend/index.js b/projects/zklend/index.js index 61e5138e09bd..b9b7c1bbf815 100644 --- a/projects/zklend/index.js +++ b/projects/zklend/index.js @@ -3,12 +3,14 @@ const { multiCall, sumTokens } = require('../helper/chain/starknet') const { marketAbi } = require('./abi'); const market = '0x4c0a5193d58f74fbace4b74dcf65481e734ed1714121bdc571da345540efa05' +const stakingContract = '0x0212c219a68c8fe38f37951123d1ec877570dfa891de270aa4f8634c5e60bc23' const assets = [ ADDRESSES.starknet.WBTC, ADDRESSES.starknet.ETH, ADDRESSES.starknet.USDC, ADDRESSES.starknet.DAI, + ADDRESSES.starknet.DAI_1, ADDRESSES.starknet.USDT, ADDRESSES.starknet.WSTETH, ADDRESSES.starknet.STRK @@ -21,7 +23,7 @@ async function tvl(api) { async function staking(api) { return sumTokens({ api, - owner: market, + owner: stakingContract, tokens: [ ADDRESSES.starknet.ZEND ]